Lines 1-65
Link Here
|
1 |
[% USE raw %] |
1 |
[% USE raw %] |
2 |
[% USE Asset %] |
2 |
[% USE Asset %] |
3 |
[% USE Koha %] |
3 |
[% USE Koha %] |
|
|
4 |
[% SET footerjs = 1 %] |
4 |
[% INCLUDE 'doc-head-open.inc' %] |
5 |
[% INCLUDE 'doc-head-open.inc' %] |
5 |
<title>Koha › Tools › Batch item modification</title> |
6 |
<title>Koha › Tools › Batch item modification</title> |
6 |
[% INCLUDE 'doc-head-close.inc' %] |
7 |
[% INCLUDE 'doc-head-close.inc' %] |
7 |
[% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %] |
|
|
8 |
[% Asset.js("js/background-job-progressbar.js") | $raw %] |
9 |
[% Asset.js("js/cataloging.js") | $raw %] |
10 |
[% INCLUDE 'datatables.inc' %] |
11 |
[% Asset.js("js/pages/batchMod.js") | $raw %] |
12 |
<script> |
13 |
// Prepare array of all column headers, incrementing each index by |
14 |
// two to accommodate control and title columns |
15 |
var allColumns = new Array([% FOREACH item_header_loo IN item_header_loop %]'[% loop.count | html %]'[% UNLESS ( loop.last ) %],[% END %][% END %]); |
16 |
for( x=0; x<allColumns.length; x++ ){ |
17 |
allColumns[x] = Number(allColumns[x]) + 2; |
18 |
} |
19 |
|
20 |
$(document).ready(function(){ |
21 |
$("input[name='disable_input']").click(function() { |
22 |
var row = $(this).attr("id"); |
23 |
row = row.replace("row","hint"); |
24 |
var todisable = $(this).parent().find("[name='field_value'],[name='tag'],[name='subfield'],[name='mandatory']"); |
25 |
var regex_link = $(this).parent().find("[name='field_regex']"); |
26 |
if ($(this).is(":checked")) { |
27 |
$(todisable).prop('disabled', true); |
28 |
$("#"+row).html(_("This subfield will be deleted")); |
29 |
$(regex_link).hide(); |
30 |
} else { |
31 |
$(todisable).prop('disabled', false); |
32 |
$("#"+row).html(""); |
33 |
$(regex_link).show(); |
34 |
} |
35 |
}); |
36 |
$("#mainformsubmit").on("click",function(){ |
37 |
return submitBackgroundJob(this.form); |
38 |
}); |
39 |
$('a[name="field_regex"]').click(function() { |
40 |
var id = $(this).attr('id'); |
41 |
var editor = $(this).parent().find("[name='field_value']"); |
42 |
var regex = $(this).parent().find("[name='regex_fields']"); |
43 |
var disable_input = $(this).parent().find("[name='disable_input']"); |
44 |
if ($(this).html() == 'RegEx') { |
45 |
$(editor).hide(); |
46 |
$(regex).show(); |
47 |
$(this).html('Text'); |
48 |
$(disable_input).prop('disabled', true); |
49 |
} else { |
50 |
$(editor).show(); |
51 |
$(regex).hide(); |
52 |
$(this).html('RegEx'); |
53 |
$(disable_input).prop('disabled', false); |
54 |
} |
55 |
return false; |
56 |
}); |
57 |
}); |
58 |
</script> |
59 |
<style>input[type=checkbox]{ margin : 0 .5em; }</style> |
8 |
<style>input[type=checkbox]{ margin : 0 .5em; }</style> |
60 |
[% Asset.css("css/addbiblio.css") | $raw %] |
9 |
[% Asset.css("css/addbiblio.css") | $raw %] |
61 |
[% Asset.css("css/humanmsg.css") | $raw %] |
10 |
[% Asset.css("css/humanmsg.css") | $raw %] |
62 |
[% INCLUDE 'select2.inc' %] |
|
|
63 |
</head> |
11 |
</head> |
64 |
|
12 |
|
65 |
<body id="tools_batchMod-edit" class="tools"> |
13 |
<body id="tools_batchMod-edit" class="tools"> |
Lines 327-333
Link Here
|
327 |
[% ELSE %] |
275 |
[% ELSE %] |
328 |
<a href="#" id="buttonDot_[% mv.id | html %]" class="buttonDot" title="Tag editor">...</a> |
276 |
<a href="#" id="buttonDot_[% mv.id | html %]" class="buttonDot" title="Tag editor">...</a> |
329 |
[% END %] |
277 |
[% END %] |
330 |
[% mv.javascript | $raw %] |
|
|
331 |
[% ELSIF ( mv.type == 'text' ) %] |
278 |
[% ELSIF ( mv.type == 'text' ) %] |
332 |
<input type="text" tabindex="1" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="255" value="[%- mv.value | html -%]" /> |
279 |
<input type="text" tabindex="1" id="[%- mv.id | html -%]" name="field_value" class="input_marceditor" size="50" maxlength="255" value="[%- mv.value | html -%]" /> |
333 |
[% ELSIF ( mv.type == 'hidden' ) %] |
280 |
[% ELSIF ( mv.type == 'hidden' ) %] |
Lines 411-414
Link Here
|
411 |
</fieldset> <!-- /.action --> |
358 |
</fieldset> <!-- /.action --> |
412 |
[% END #/IF show %] |
359 |
[% END #/IF show %] |
413 |
</form> |
360 |
</form> |
|
|
361 |
|
362 |
[% MACRO jsinclude BLOCK %] |
363 |
[% Asset.js("lib/jquery/plugins/humanmsg.js") | $raw %] |
364 |
[% Asset.js("js/background-job-progressbar.js") | $raw %] |
365 |
[% Asset.js("js/cataloging.js") | $raw %] |
366 |
[% INCLUDE 'datatables.inc' %] |
367 |
[% Asset.js("js/pages/batchMod.js") | $raw %] |
368 |
[% INCLUDE 'select2.inc' %] |
369 |
<script> |
370 |
// Prepare array of all column headers, incrementing each index by |
371 |
// two to accommodate control and title columns |
372 |
var allColumns = new Array([% FOREACH item_header_loo IN item_header_loop %]'[% loop.count | html %]'[% UNLESS ( loop.last ) %],[% END %][% END %]); |
373 |
for( x=0; x<allColumns.length; x++ ){ |
374 |
allColumns[x] = Number(allColumns[x]) + 2; |
375 |
} |
376 |
|
377 |
$(document).ready(function(){ |
378 |
$("input[name='disable_input']").click(function() { |
379 |
var row = $(this).attr("id"); |
380 |
row = row.replace("row","hint"); |
381 |
var todisable = $(this).parent().find("[name='field_value'],[name='tag'],[name='subfield'],[name='mandatory']"); |
382 |
var regex_link = $(this).parent().find("[name='field_regex']"); |
383 |
if ($(this).is(":checked")) { |
384 |
$(todisable).prop('disabled', true); |
385 |
$("#"+row).html(_("This subfield will be deleted")); |
386 |
$(regex_link).hide(); |
387 |
} else { |
388 |
$(todisable).prop('disabled', false); |
389 |
$("#"+row).html(""); |
390 |
$(regex_link).show(); |
391 |
} |
392 |
}); |
393 |
$("#mainformsubmit").on("click",function(){ |
394 |
return submitBackgroundJob(this.form); |
395 |
}); |
396 |
$('a[name="field_regex"]').click(function() { |
397 |
var id = $(this).attr('id'); |
398 |
var editor = $(this).parent().find("[name='field_value']"); |
399 |
var regex = $(this).parent().find("[name='regex_fields']"); |
400 |
var disable_input = $(this).parent().find("[name='disable_input']"); |
401 |
if ($(this).html() == 'RegEx') { |
402 |
$(editor).hide(); |
403 |
$(regex).show(); |
404 |
$(this).html('Text'); |
405 |
$(disable_input).prop('disabled', true); |
406 |
} else { |
407 |
$(editor).show(); |
408 |
$(regex).hide(); |
409 |
$(this).html('RegEx'); |
410 |
$(disable_input).prop('disabled', false); |
411 |
} |
412 |
return false; |
413 |
}); |
414 |
}); |
415 |
</script> |
416 |
[% IF ( show ) %] |
417 |
[%- # Loop over fields which may have plugin JavaScript -%] |
418 |
[%- UNLESS (too_many_items_process) -%] |
419 |
[%- FOREACH ite IN item -%] |
420 |
[% SET mv = ite.marc_value %] |
421 |
[%- IF ( mv.type == 'text2' ) -%] |
422 |
<!-- subfield[% ite.tag | html %][% ite.subfield | html %][% ite.random | html %] --> |
423 |
[% mv.javascript | $raw %] |
424 |
[%- END -%] |
425 |
[%- END -%] |
426 |
[%- END -%] |
427 |
[%- END -%] |
428 |
[% END %] |
429 |
|
414 |
[% INCLUDE 'intranet-bottom.inc' %] |
430 |
[% INCLUDE 'intranet-bottom.inc' %] |
415 |
- |
|
|