|
Lines 36-41
function verify_images() {
Link Here
|
| 36 |
} |
36 |
} |
| 37 |
}); |
37 |
}); |
| 38 |
} |
38 |
} |
|
|
39 |
|
| 40 |
[% IF StaffDetailItemSelection %] |
| 41 |
function selectAllItems(div) { |
| 42 |
$("input[name='itemnumber'][type='checkbox']", div).attr('checked', 'checked'); |
| 43 |
} |
| 44 |
|
| 45 |
function deselectAllItems(div) { |
| 46 |
$("input[name='itemnumber'][type='checkbox']", div).removeAttr('checked'); |
| 47 |
} |
| 48 |
|
| 49 |
function itemSelectionExecuteAction(div) { |
| 50 |
var itemnumbers = new Array(); |
| 51 |
$("input[name='itemnumber'][type='checkbox']:checked", div).each(function() { |
| 52 |
itemnumbers.push($(this).val()); |
| 53 |
}); |
| 54 |
if (itemnumbers.length > 0) { |
| 55 |
var action = $('select[name="itemselection_action"]', div).val(); |
| 56 |
var del = (action == 'delete') ? 1 : 0; |
| 57 |
var url = '/cgi-bin/koha/tools/batchMod.pl?op=show'; |
| 58 |
if (action == 'delete') { |
| 59 |
url += '&del=1'; |
| 60 |
} |
| 61 |
url += '&itemnumber=' + itemnumbers.join('&itemnumber='); |
| 62 |
url += '&src=' + '[% "/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber" |uri %]'; |
| 63 |
new_window = $("input[name='new_window']", div).attr('checked'); |
| 64 |
if (new_window) { |
| 65 |
window.open(url); |
| 66 |
} else { |
| 67 |
window.location.href = url; |
| 68 |
} |
| 69 |
} else { |
| 70 |
alert(_("Please select at least one item.")); |
| 71 |
} |
| 72 |
} |
| 73 |
[% END %] |
| 74 |
|
| 39 |
$(document).ready(function() { |
75 |
$(document).ready(function() { |
| 40 |
$('#bibliodetails').tabs(); |
76 |
$('#bibliodetails').tabs(); |
| 41 |
$('#search-form').focus(); |
77 |
$('#search-form').focus(); |
|
Lines 351-359
function verify_images() {
Link Here
|
| 351 |
</ul> |
387 |
</ul> |
| 352 |
|
388 |
|
| 353 |
[% BLOCK items_table %] |
389 |
[% BLOCK items_table %] |
|
|
390 |
[% IF (StaffDetailItemSelection) %] |
| 391 |
<a href="#" onclick="selectAllItems($(this).parent()); return false;">Select all</a> | |
| 392 |
<a href="#" onclick="deselectAllItems($(this).parent()); return false;">Deselect all</a> | |
| 393 |
<form onsubmit="itemSelectionExecuteAction($(this).parent()); return false;"> |
| 394 |
<label>Action:</label> |
| 395 |
<select name="itemselection_action"> |
| 396 |
[% IF CAN_user_tools_items_batchdel %] |
| 397 |
<option value="delete">Delete selected items</option> |
| 398 |
[% END %] |
| 399 |
[% IF CAN_user_tools_items_batchmod %] |
| 400 |
<option value="modify">Modify selected items</option> |
| 401 |
[% END %] |
| 402 |
</select> |
| 403 |
<input type="submit" value="Go" /> |
| 404 |
<input type="checkbox" name="new_window" /> |
| 405 |
<label>Open in new window</label> |
| 406 |
</form> |
| 407 |
[% END %] |
| 354 |
<table> |
408 |
<table> |
| 355 |
<thead> |
409 |
<thead> |
| 356 |
<tr> |
410 |
<tr> |
|
|
411 |
[% IF (StaffDetailItemSelection) %]<th></th>[% END %] |
| 357 |
[% IF ( item_level_itypes ) %]<th>Item type</th>[% END %] |
412 |
[% IF ( item_level_itypes ) %]<th>Item type</th>[% END %] |
| 358 |
<th>Current location</th> |
413 |
<th>Current location</th> |
| 359 |
<th>Home Library</th> |
414 |
<th>Home Library</th> |
|
Lines 375-380
function verify_images() {
Link Here
|
| 375 |
<tbody> |
430 |
<tbody> |
| 376 |
[% FOREACH item IN items %] |
431 |
[% FOREACH item IN items %] |
| 377 |
<tr> |
432 |
<tr> |
|
|
433 |
[% IF (StaffDetailItemSelection) %] |
| 434 |
<td style="text-align:center;vertical-align:middle"> |
| 435 |
<input type="checkbox" value="[% item.itemnumber %]" name="itemnumber" /> |
| 436 |
</td> |
| 437 |
[% END %] |
| 378 |
[% IF ( item_level_itypes ) %] |
438 |
[% IF ( item_level_itypes ) %] |
| 379 |
<td class="itype"> |
439 |
<td class="itype"> |
| 380 |
[% IF !noItemTypeImages && item.imageurl %] |
440 |
[% IF !noItemTypeImages && item.imageurl %] |