Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

save and load templates, with tabula-java-1.0.0 #711

Merged
merged 24 commits into from
Aug 10, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
610233a
Add save and load
cheapsteak May 4, 2017
b7defcb
Merge branch 'master' of git://github.com/cheapsteak/tabula into chea…
jeremybmerrill Jul 8, 2017
fc4d5b2
you can upload templates and they're displayed on the front page
jeremybmerrill Jul 8, 2017
c569c59
Merge branch 'cheapsteak-master' into feature/templates
jeremybmerrill Jul 8, 2017
85d0704
can save selections as a template from selection page
jeremybmerrill Jul 10, 2017
e4efed3
you can delete templates
jeremybmerrill Jul 10, 2017
9a02427
you can load templates (but it's all ugly)
Jul 11, 2017
9925c43
you can rename templates on the front page
jeremybmerrill Jul 14, 2017
7f003bf
you can download templates
jeremybmerrill Jul 14, 2017
6e18a4c
templates are in the right format now; also they're validated
jeremybmerrill Jul 14, 2017
20746e3
fixes template upload
jeremybmerrill Jul 16, 2017
f36d3ba
moves template library to its own page
jeremybmerrill Aug 8, 2017
343acb2
Merge branch 'tabula-java-1.0.0' into feature/templates
jeremybmerrill Aug 8, 2017
2b4da47
Merge branch 'tabula-java-1.0.0' into feature/templates
jeremybmerrill Aug 9, 2017
954cc8c
refactors workspace to work with the new Tabula::Workspace thingy Man…
jeremybmerrill Aug 9, 2017
4756734
convert old workspaces to the the new kind; deactivate load template …
jeremybmerrill Aug 10, 2017
574272d
rename a variable for clarity
jeremybmerrill Aug 10, 2017
533f410
endpoint for getting just the list of documents
jeremybmerrill Aug 10, 2017
d9422e1
remove puts
jazzido Aug 10, 2017
2f44389
remove a puts
jeremybmerrill Aug 10, 2017
e9fd394
moves create_template method inline, since it's used only once
jeremybmerrill Aug 10, 2017
160651e
remove some console logs
jeremybmerrill Aug 10, 2017
7b83be4
try to convince Travis to work
jeremybmerrill Aug 10, 2017
e49ac4f
fiddle with Travis again
jeremybmerrill Aug 10, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rename a variable for clarity
  • Loading branch information
jeremybmerrill committed Aug 10, 2017
commit 574272d47ffd9a7aa6a1e2795268be12b7042a84
4 changes: 2 additions & 2 deletions webapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@
<script type="text/template" id="select-control-panel-template" >
<span class="filename"><%= original_filename %></span>

<a href="javascript:void(0)"><button id="restore-detected-tables" type="button" class="btn btn-default <%= restore_detected_tables %>" <%= disable_detected_tables %>><span class="glyphicon glyphicon-flash"></span><span class="glyphicon glyphicon-refresh"></span> Autodetect Tables</button></a>
<a href="javascript:void(0)"><button id="restore-detected-tables" type="button" class="btn btn-default <%= restore_detected_tables %>" <%= disabled_if_there_are_selections %>><span class="glyphicon glyphicon-flash"></span><span class="glyphicon glyphicon-refresh"></span> Autodetect Tables</button></a>
<a href="javascript:void(0)"><button type="button" id="clear-all-selections" class="btn btn-default" <%= disable_clear_all_selections %>><span class="glyphicon glyphicon-remove-circle"></span> Clear All Selections</button></a>
<a href="javascript:void(0)"><button type="button" id="all-data" class="btn btn-success" <%= disable_download_all %>><span class="glyphicon glyphicon-eye-open"></span> Preview & Export Extracted Data</button></a>

<span style="float: right;" class="template-menu">

<div class="dropdown" <%= disable_load_template %> style="display: inline;">
<button type="button" class="dropdown-toggle btn btn-link" data-toggle="dropdown" href="#" <%= disable_detected_tables %>><span class="glyphicon glyphicon-import" title="You may only load a template if there are no selections active in your PDF."></span> Load Template</button>
<button type="button" class="dropdown-toggle btn btn-link" data-toggle="dropdown" href="#" <%= disabled_if_there_are_selections %>><span class="glyphicon glyphicon-import" title="You may only load a template if there are no selections active in your PDF."></span> Load Template</button>
<div id="template-dropdown-container" class="dropdown-menu">
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion webapp/static/js/pdf_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ Tabula.ControlPanelView = Backbone.View.extend({ // only one

// three states: autodetection still incomplete, autodetection done but no tables found, autodetection done and tables found
'restore_detected_tables': this.pdf_view.hasAutodetectedTables ? "autodetect-finished" : "autodetect-in-progress",
'disable_detected_tables': numOfSelectionsOnPage > 0 || this.pdf_view.pdf_document.autodetected_selections.size() === 0 ? 'disabled="disabled"' : '',
'disabled_if_there_are_selections': numOfSelectionsOnPage > 0 || this.pdf_view.pdf_document.autodetected_selections.size() === 0 ? 'disabled="disabled"' : '',

'disable_save_template':numOfSelectionsOnPage == 0 ? 'disabled="disabled"' : '',
'disable_load_template': numOfSelectionsOnPage > 0 ? 'disabled="disabled"' : ''
Expand Down