|
Lines 51-56
function verify_images() {
Link Here
|
| 51 |
} |
51 |
} |
| 52 |
}); |
52 |
}); |
| 53 |
} |
53 |
} |
|
|
54 |
|
| 55 |
[% IF StaffDetailItemSelection %] |
| 56 |
function selectAllItems(div) { |
| 57 |
$("input[name='itemnumber'][type='checkbox']", div).attr('checked', 'checked'); |
| 58 |
} |
| 59 |
|
| 60 |
function deselectAllItems(div) { |
| 61 |
$("input[name='itemnumber'][type='checkbox']", div).removeAttr('checked'); |
| 62 |
} |
| 63 |
|
| 64 |
function itemSelectionExecuteAction(div) { |
| 65 |
var itemnumbers = new Array(); |
| 66 |
$("input[name='itemnumber'][type='checkbox']:checked", div).each(function() { |
| 67 |
itemnumbers.push($(this).val()); |
| 68 |
}); |
| 69 |
if (itemnumbers.length > 0) { |
| 70 |
var action = $('select[name="itemselection_action"]', div).val(); |
| 71 |
var del = (action == 'delete') ? 1 : 0; |
| 72 |
var url = '/cgi-bin/koha/tools/batchMod.pl?op=show'; |
| 73 |
if (action == 'delete') { |
| 74 |
url += '&del=1'; |
| 75 |
} |
| 76 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
| 77 |
url += '&src=' + '[% "/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber" |uri %]'; |
| 78 |
new_window = $("input[name='new_window']", div).attr('checked'); |
| 79 |
if (new_window) { |
| 80 |
window.open(url); |
| 81 |
} else { |
| 82 |
window.location.href = url; |
| 83 |
} |
| 84 |
} else { |
| 85 |
alert(_("Please select at least one item.")); |
| 86 |
} |
| 87 |
} |
| 88 |
[% END %] |
| 89 |
|
| 54 |
$(document).ready(function() { |
90 |
$(document).ready(function() { |
| 55 |
$('#bibliodetails').tabs(); |
91 |
$('#bibliodetails').tabs(); |
| 56 |
$('#search-form').focus(); |
92 |
$('#search-form').focus(); |
|
Lines 366-374
function verify_images() {
Link Here
|
| 366 |
</ul> |
402 |
</ul> |
| 367 |
|
403 |
|
| 368 |
[% BLOCK items_table %] |
404 |
[% BLOCK items_table %] |
|
|
405 |
[% IF (StaffDetailItemSelection) %] |
| 406 |
<a href="#" onclick="selectAllItems($(this).parent()); return false;">Select all</a> | |
| 407 |
<a href="#" onclick="deselectAllItems($(this).parent()); return false;">Deselect all</a> | |
| 408 |
<form onsubmit="itemSelectionExecuteAction($(this).parent()); return false;"> |
| 409 |
<label>Action:</label> |
| 410 |
<select name="itemselection_action"> |
| 411 |
[% IF CAN_user_tools_items_batchdel %] |
| 412 |
<option value="delete">Delete selected items</option> |
| 413 |
[% END %] |
| 414 |
[% IF CAN_user_tools_items_batchmod %] |
| 415 |
<option value="modify">Modify selected items</option> |
| 416 |
[% END %] |
| 417 |
</select> |
| 418 |
<input type="submit" value="Go" /> |
| 419 |
<input type="checkbox" name="new_window" /> |
| 420 |
<label>Open in new window</label> |
| 421 |
</form> |
| 422 |
[% END %] |
| 369 |
<table> |
423 |
<table> |
| 370 |
<thead> |
424 |
<thead> |
| 371 |
<tr> |
425 |
<tr> |
|
|
426 |
[% IF (StaffDetailItemSelection) %]<th></th>[% END %] |
| 372 |
[% IF ( item_level_itypes ) %]<th>Item type</th>[% END %] |
427 |
[% IF ( item_level_itypes ) %]<th>Item type</th>[% END %] |
| 373 |
<th>Current location</th> |
428 |
<th>Current location</th> |
| 374 |
<th>Home library</th> |
429 |
<th>Home library</th> |
|
Lines 391-396
function verify_images() {
Link Here
|
| 391 |
<tbody> |
446 |
<tbody> |
| 392 |
[% FOREACH item IN items %] |
447 |
[% FOREACH item IN items %] |
| 393 |
<tr> |
448 |
<tr> |
|
|
449 |
[% IF (StaffDetailItemSelection) %] |
| 450 |
<td style="text-align:center;vertical-align:middle"> |
| 451 |
<input type="checkbox" value="[% item.itemnumber %]" name="itemnumber" /> |
| 452 |
</td> |
| 453 |
[% END %] |
| 394 |
[% IF ( item_level_itypes ) %] |
454 |
[% IF ( item_level_itypes ) %] |
| 395 |
<td class="itype"> |
455 |
<td class="itype"> |
| 396 |
[% IF !noItemTypeImages && item.imageurl %] |
456 |
[% IF !noItemTypeImages && item.imageurl %] |