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 276-284
function verify_images() {
Link Here
|
276 |
</ul> |
312 |
</ul> |
277 |
|
313 |
|
278 |
[% BLOCK items_table %] |
314 |
[% BLOCK items_table %] |
|
|
315 |
[% IF (StaffDetailItemSelection) %] |
316 |
<a href="#" onclick="selectAllItems($(this).parent()); return false;">Select all</a> | |
317 |
<a href="#" onclick="deselectAllItems($(this).parent()); return false;">Deselect all</a> | |
318 |
<form onsubmit="itemSelectionExecuteAction($(this).parent()); return false;"> |
319 |
<label>Action:</label> |
320 |
<select name="itemselection_action"> |
321 |
[% IF CAN_user_tools_items_batchdel %] |
322 |
<option value="delete">Delete selected items</option> |
323 |
[% END %] |
324 |
[% IF CAN_user_tools_items_batchmod %] |
325 |
<option value="modify">Modify selected items</option> |
326 |
[% END %] |
327 |
</select> |
328 |
<input type="submit" value="Go" /> |
329 |
<input type="checkbox" name="new_window" /> |
330 |
<label>Open in new window</label> |
331 |
</form> |
332 |
[% END %] |
279 |
<table> |
333 |
<table> |
280 |
<thead> |
334 |
<thead> |
281 |
<tr> |
335 |
<tr> |
|
|
336 |
[% IF (StaffDetailItemSelection) %]<th></th>[% END %] |
282 |
[% IF ( item_level_itypes ) %]<th>Item type</th>[% END %] |
337 |
[% IF ( item_level_itypes ) %]<th>Item type</th>[% END %] |
283 |
<th>Current location</th> |
338 |
<th>Current location</th> |
284 |
<th>Home Library</th> |
339 |
<th>Home Library</th> |
Lines 300-305
function verify_images() {
Link Here
|
300 |
<tbody> |
355 |
<tbody> |
301 |
[% FOREACH item IN items %] |
356 |
[% FOREACH item IN items %] |
302 |
<tr> |
357 |
<tr> |
|
|
358 |
[% IF (StaffDetailItemSelection) %] |
359 |
<td style="text-align:center;vertical-align:middle"> |
360 |
<input type="checkbox" value="[% item.itemnumber %]" name="itemnumber" /> |
361 |
</td> |
362 |
[% END %] |
303 |
[% IF ( item_level_itypes ) %] |
363 |
[% IF ( item_level_itypes ) %] |
304 |
<td class="itype"> |
364 |
<td class="itype"> |
305 |
[% IF !noItemTypeImages && item.imageurl %] |
365 |
[% IF !noItemTypeImages && item.imageurl %] |