|
Lines 37-46
Link Here
|
| 37 |
[% INCLUDE 'datatables.inc' %] |
37 |
[% INCLUDE 'datatables.inc' %] |
| 38 |
<script type="text/javascript"> |
38 |
<script type="text/javascript"> |
| 39 |
//<![CDATA[ |
39 |
//<![CDATA[ |
| 40 |
var MSG_CONFIRM_CLEAN = _("Clear all reservoir records staged in this batch? This cannot be undone."); |
|
|
| 41 |
var MSG_CONFIRM_UNDO_IMPORT = _("Are you sure you want to undo the import of this batch into the catalog?"); |
| 42 |
var MSG_CONFIRM_DELETE = _("Are you sure you want to permanently delete this batch?"); |
| 43 |
|
| 44 |
$(document).ready(function(){ |
40 |
$(document).ready(function(){ |
| 45 |
$("#staged-record-matching-rules select").change(function(){ |
41 |
$("#staged-record-matching-rules select").change(function(){ |
| 46 |
var str = $(this).attr("id"); |
42 |
var str = $(this).attr("id"); |
|
Lines 134-139
$(document).ready(function(){
Link Here
|
| 134 |
); |
130 |
); |
| 135 |
}, |
131 |
}, |
| 136 |
})); |
132 |
})); |
|
|
133 |
$("#import_batch_form").on("submit",function(){ |
| 134 |
return submitBackgroundJob( document.getElementById("import_batch_form") ); |
| 135 |
}); |
| 136 |
$("#revert_batch_form").on("submit",function(){ |
| 137 |
return confirm( _("Are you sure you want to undo the import of this batch into the catalog?") ) && submitBackgroundJob( document.getElementById("revert_batch_form") ); |
| 138 |
}); |
| 137 |
[% END %] |
139 |
[% END %] |
| 138 |
$("body").on("click",".previewMARC", function(e){ |
140 |
$("body").on("click",".previewMARC", function(e){ |
| 139 |
e.preventDefault(); |
141 |
e.preventDefault(); |
|
Lines 147-152
$(document).ready(function(){
Link Here
|
| 147 |
$("#marcPreviewLabel").html(""); |
149 |
$("#marcPreviewLabel").html(""); |
| 148 |
$("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); |
150 |
$("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/loading-small.gif\" alt=\"\" /> "+_("Loading")+"</div>"); |
| 149 |
}); |
151 |
}); |
|
|
152 |
$(".batch_form").on("submit",function(){ |
| 153 |
if( $(this).hasClass("delete") ){ |
| 154 |
return confirm( _("Are you sure you want to permanently delete this batch?") ); |
| 155 |
} else { |
| 156 |
return confirm( _("Clear all reservoir records staged in this batch? This cannot be undone.") ); |
| 157 |
} |
| 158 |
}); |
| 150 |
}); |
159 |
}); |
| 151 |
|
160 |
|
| 152 |
//]]> |
161 |
//]]> |
|
Lines 339-351
$(document).ready(function(){
Link Here
|
| 339 |
|
348 |
|
| 340 |
<div> |
349 |
<div> |
| 341 |
[% IF ( can_commit ) %] |
350 |
[% IF ( can_commit ) %] |
| 342 |
<form action="[% script_name %]" method="post"> |
351 |
<form action="[% script_name %]" method="post" id="import_batch_form"> |
| 343 |
<input type="hidden" name="op" value="commit-batch" /> |
352 |
<input type="hidden" name="op" value="commit-batch" /> |
| 344 |
<input type="hidden" name="runinbackground" value="" /> |
353 |
<input type="hidden" name="runinbackground" value="" /> |
| 345 |
<input type="hidden" name="completedJobID" value="" /> |
354 |
<input type="hidden" name="completedJobID" value="" /> |
| 346 |
<input type="hidden" name="import_batch_id" value="[% import_batch_id %]" /> |
355 |
<input type="hidden" name="import_batch_id" value="[% import_batch_id %]" /> |
| 347 |
<fieldset class="action"> |
356 |
<fieldset class="action"> |
| 348 |
<input type="submit" class="button" name="mainformsubmit" value="Import this batch into the catalog" onclick="return submitBackgroundJob(this.form);" /> |
357 |
<input type="submit" class="button" name="mainformsubmit" value="Import this batch into the catalog" /> |
| 349 |
<br/> |
358 |
<br/> |
| 350 |
[% IF ( record_type != 'auth' ) %] |
359 |
[% IF ( record_type != 'auth' ) %] |
| 351 |
Add new bibliographic records into this framework: |
360 |
Add new bibliographic records into this framework: |
|
Lines 362-373
$(document).ready(function(){
Link Here
|
| 362 |
<div id="jobfailed"></div></div> |
371 |
<div id="jobfailed"></div></div> |
| 363 |
[% END %] |
372 |
[% END %] |
| 364 |
[% IF ( can_revert ) %] |
373 |
[% IF ( can_revert ) %] |
| 365 |
<form action="[% script_name %]" method="post"> |
374 |
<form action="[% script_name %]" method="post" id="revert_batch_form"> |
| 366 |
<input type="hidden" name="op" value="revert-batch" /> |
375 |
<input type="hidden" name="op" value="revert-batch" /> |
| 367 |
<input type="hidden" name="runinbackground" value="" /> |
376 |
<input type="hidden" name="runinbackground" value="" /> |
| 368 |
<input type="hidden" name="completedJobID" value="" /> |
377 |
<input type="hidden" name="completedJobID" value="" /> |
| 369 |
<input type="hidden" name="import_batch_id" value="[% import_batch_id %]" /> |
378 |
<input type="hidden" name="import_batch_id" value="[% import_batch_id %]" /> |
| 370 |
<fieldset class="action"><input type="submit" class="button" name="mainformsubmit" value="Undo import into catalog" onclick="return confirm(MSG_CONFIRM_UNDO_IMPORT) && submitBackgroundJob(this.form);" /></fieldset> |
379 |
<fieldset class="action"><input type="submit" class="button" name="mainformsubmit" value="Undo import into catalog" /></fieldset> |
| 371 |
</form> |
380 |
</form> |
| 372 |
<div id="jobpanel"><div id="jobstatus">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div> |
381 |
<div id="jobpanel"><div id="jobstatus">Job progress: <div id="jobprogress"></div> <span id="jobprogresspercent">0</span>%</div> |
| 373 |
<div id="jobfailed"></div></div> |
382 |
<div id="jobfailed"></div></div> |
|
Lines 454-469
Page
Link Here
|
| 454 |
<td>[% batch_lis.num_items %][% IF ( batch_lis.num_items ) %] <a href="[% batch_lis.script_name %]?import_batch_id=[% batch_lis.import_batch_id %]&op=create_labels">(Create label batch)</a>[% END %]</td> |
463 |
<td>[% batch_lis.num_items %][% IF ( batch_lis.num_items ) %] <a href="[% batch_lis.script_name %]?import_batch_id=[% batch_lis.import_batch_id %]&op=create_labels">(Create label batch)</a>[% END %]</td> |
| 455 |
<td class="actions"> |
464 |
<td class="actions"> |
| 456 |
[% IF ( batch_lis.can_clean ) %] |
465 |
[% IF ( batch_lis.can_clean ) %] |
| 457 |
<form method="post" action="[% batch_lis.script_name %]" name="clean_batch_[% batch_lis.import_batch_id %]" id="clean_batch_[% batch_lis.import_batch_id %]" > |
466 |
<form method="post" action="[% batch_lis.script_name %]" name="clean_batch_[% batch_lis.import_batch_id %]" id="clean_batch_[% batch_lis.import_batch_id %]" class="batch_form batch_clean" > |
| 458 |
<input type="hidden" name="import_batch_id" value="[% batch_lis.import_batch_id %]" /> |
467 |
<input type="hidden" name="import_batch_id" value="[% batch_lis.import_batch_id %]" /> |
| 459 |
<input type="hidden" name="op" value="clean-batch" /> |
468 |
<input type="hidden" name="op" value="clean-batch" /> |
| 460 |
<button class="btn btn-mini" onclick="return confirm(MSG_CONFIRM_CLEAN);"><i class="fa fa-eraser"></i> Clean</button> |
469 |
<button type="submit" class="btn btn-mini"><i class="fa fa-eraser"></i> Clean</button> |
| 461 |
</form> |
470 |
</form> |
| 462 |
[% ELSIF ( batch_lis.import_status == 'cleaned' ) %] |
471 |
[% ELSIF ( batch_lis.import_status == 'cleaned' ) %] |
| 463 |
<form method="post" action="/cgi-bin/koha/tools/manage-marc-import.pl" name="delete_batch_[% batch_lis.import_batch_id %]" id="delete_batch_[% batch_lis.import_batch_id %]"> |
472 |
<form method="post" action="/cgi-bin/koha/tools/manage-marc-import.pl" name="delete_batch_[% batch_lis.import_batch_id %]" id="delete_batch_[% batch_lis.import_batch_id %]" class="batch_form batch_delete"> |
| 464 |
<input type="hidden" name="import_batch_id" value="[% batch_lis.import_batch_id %]" /> |
473 |
<input type="hidden" name="import_batch_id" value="[% batch_lis.import_batch_id %]" /> |
| 465 |
<input type="hidden" name="op" value="delete-batch" /> |
474 |
<input type="hidden" name="op" value="delete-batch" /> |
| 466 |
<button class="btn btn-mini" onclick="return confirm(MSG_CONFIRM_DELETE);"><i class="fa fa-trash"></i> Delete</button> |
475 |
<button type="submit" class="btn btn-mini"><i class="fa fa-trash"></i> Delete</button> |
| 467 |
</form> |
476 |
</form> |
| 468 |
[% END %] |
477 |
[% END %] |
| 469 |
</td> |
478 |
</td> |
| 470 |
- |
|
|