Lines 19-24
Link Here
|
19 |
<script type="text/javascript" src="[% interface %]/lib/shims/json2.min.js"></script> |
19 |
<script type="text/javascript" src="[% interface %]/lib/shims/json2.min.js"></script> |
20 |
<![endif]--> |
20 |
<![endif]--> |
21 |
<script type="text/javascript" src="[% interface %]/js/browser.js"></script> |
21 |
<script type="text/javascript" src="[% interface %]/js/browser.js"></script> |
|
|
22 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> |
22 |
<script type="text/javascript"> |
23 |
<script type="text/javascript"> |
23 |
//<![CDATA[ |
24 |
//<![CDATA[ |
24 |
var MSG_NO_ITEM_SELECTED = _("Nothing is selected."); |
25 |
var MSG_NO_ITEM_SELECTED = _("Nothing is selected."); |
Lines 48-55
function Dopop(link) {
Link Here
|
48 |
newin=window.open(link,'popup','width=500,height=500,toolbar=false,scrollbars=yes,resizeable=yes'); |
49 |
newin=window.open(link,'popup','width=500,height=500,toolbar=false,scrollbars=yes,resizeable=yes'); |
49 |
} |
50 |
} |
50 |
function cartList(){ |
51 |
function cartList(){ |
51 |
var checkboxes = $("#searchresults").find(":checkbox"); |
52 |
var vshelf = vShelfAdd(); |
52 |
var vshelf = vShelfAdd(checkboxes); |
|
|
53 |
if($("#addto").find("option:selected").attr("value") == "addtolist"){ |
53 |
if($("#addto").find("option:selected").attr("value") == "addtolist"){ |
54 |
var shelfnumber = $("#addto").find("option:selected").attr("id").replace("s",""); |
54 |
var shelfnumber = $("#addto").find("option:selected").attr("id").replace("s",""); |
55 |
if (vshelf) { |
55 |
if (vshelf) { |
Lines 68-74
function cartList(){
Link Here
|
68 |
return false; |
68 |
return false; |
69 |
} |
69 |
} |
70 |
if($("#addto").find("option:selected").attr("value") == "addtocart"){ |
70 |
if($("#addto").find("option:selected").attr("value") == "addtocart"){ |
71 |
addMultiple(checkboxes); |
71 |
addMultiple(); |
72 |
return false; |
72 |
return false; |
73 |
} |
73 |
} |
74 |
} |
74 |
} |
Lines 97-102
$("#forgetholdfor").click(function(){
Link Here
|
97 |
$(".btn-group").removeClass("open"); |
97 |
$(".btn-group").removeClass("open"); |
98 |
return false; |
98 |
return false; |
99 |
}); |
99 |
}); |
|
|
100 |
$("#searchheader").on("click", ".browse_selection", function(){ |
101 |
browse_selection(); |
102 |
return false; |
103 |
}); |
100 |
$('#sortbyform').find("input:submit").hide(); |
104 |
$('#sortbyform').find("input:submit").hide(); |
101 |
$('#sort_by').change(function() { |
105 |
$('#sort_by').change(function() { |
102 |
$('#sortbyform').submit(); |
106 |
$('#sortbyform').submit(); |
Lines 211-216
$('#sort_by').change(function() {
Link Here
|
211 |
delSingleRecord(biblionumber); |
215 |
delSingleRecord(biblionumber); |
212 |
}); |
216 |
}); |
213 |
|
217 |
|
|
|
218 |
[% UNLESS Koha.Preference('BrowseResultSelection') %] |
219 |
resetSearchContext(); |
220 |
[% END %] |
221 |
$(".selection").change(function(){ |
222 |
if ( $(this).is(':checked') == true ) { |
223 |
addBibToContext( $(this).val() ); |
224 |
} else { |
225 |
delBibToContext( $(this).val() ); |
226 |
} |
227 |
}); |
228 |
$("#bookbag_form").ready(function(){ |
229 |
$("#bookbag_form").unCheckCheckboxes(); |
230 |
var bibnums = getContextBiblioNumbers(); |
231 |
if (bibnums) { |
232 |
for (var i=0; i < bibnums.length; i++) { |
233 |
var id = ('#bib' + bibnums[i]); |
234 |
if ($(id)) { |
235 |
$(id).attr('checked', true); |
236 |
} |
237 |
} |
238 |
} |
239 |
}); |
214 |
}); |
240 |
}); |
215 |
|
241 |
|
216 |
|
242 |
|
Lines 231-240
function highlightOn() {
Link Here
|
231 |
}[% END %] |
257 |
}[% END %] |
232 |
|
258 |
|
233 |
function selectAll () { |
259 |
function selectAll () { |
234 |
$(".selection").prop("checked", true); |
260 |
$("#bookbag_form").checkCheckboxes(); |
|
|
261 |
$("#bookbag_form").find("input[type='checkbox'][name='biblionumber']").each(function(){ |
262 |
$(this).change(); |
263 |
} ); |
264 |
return false; |
235 |
} |
265 |
} |
236 |
function clearAll () { |
266 |
function clearAll () { |
237 |
$(".selection").prop("checked", false); |
267 |
$("#bookbag_form").unCheckCheckboxes(); |
|
|
268 |
$("#bookbag_form").find("input[type='checkbox'][name='biblionumber']").each(function(){ |
269 |
$(this).change(); |
270 |
} ); |
271 |
return false; |
238 |
} |
272 |
} |
239 |
function placeHold () { |
273 |
function placeHold () { |
240 |
var checkedItems = $(".selection:checked"); |
274 |
var checkedItems = $(".selection:checked"); |
Lines 267-272
function forgetPatron(){
Link Here
|
267 |
$("#placeholdc").html("<a class=\"btn btn-default btn-xs placehold\" href=\"#\"><i class=\"fa fa-sticky-note-o\"></i> "+_("Place hold")+"</a>"); |
301 |
$("#placeholdc").html("<a class=\"btn btn-default btn-xs placehold\" href=\"#\"><i class=\"fa fa-sticky-note-o\"></i> "+_("Place hold")+"</a>"); |
268 |
} |
302 |
} |
269 |
|
303 |
|
|
|
304 |
function browse_selection () { |
305 |
var bibnums = getContextBiblioNumbers(); |
306 |
if ( bibnums && bibnums.length > 0 ) { |
307 |
var browser = KOHA.browser('', parseInt('[% biblionumber %]', 10)); |
308 |
browser.create(1, '[% query_cgi %]', '[% limit_cgi | uri %]','[% sort_cgi | uri %]', bibnums, bibnums.length); |
309 |
window.location = '/cgi-bin/koha/catalogue/detail.pl?biblionumber=' + bibnums[0] + '&searchid='+browser.searchid; |
310 |
} else { |
311 |
alert(MSG_NO_ITEM_SELECTED); |
312 |
} |
313 |
return false; |
314 |
} |
315 |
|
316 |
|
270 |
function addToList () { |
317 |
function addToList () { |
271 |
var checkedItems = $(".selection:checked"); |
318 |
var checkedItems = $(".selection:checked"); |
272 |
if ($(checkedItems).size() == 0) { |
319 |
if ($(checkedItems).size() == 0) { |
Lines 391-396
var holdForPatron = function () {
Link Here
|
391 |
<div id="placeholdc" class="btn-group"><a class="btn btn-default btn-xs placehold" href="#"><i class="fa fa-sticky-note-o"></i> Place hold</a></div> |
438 |
<div id="placeholdc" class="btn-group"><a class="btn btn-default btn-xs placehold" href="#"><i class="fa fa-sticky-note-o"></i> Place hold</a></div> |
392 |
[% END %] |
439 |
[% END %] |
393 |
[% END %] |
440 |
[% END %] |
|
|
441 |
[% IF Koha.Preference('BrowseResultSelection') %] |
442 |
<div id="browse_selection" class="btn-group"><a class="btn btn-default btn-xs browse_selection" href="#"><i class="fa fa-sticky-note-o"></i> Browse selected records</a></div> |
443 |
[% END %] |
394 |
|
444 |
|
395 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %] <div class="btn-group"><a class="btn btn-default btn-xs" id="z3950submit" href="#"><i class="fa fa-search"></i> Z39.50/SRU search</a></div>[% END %] |
445 |
[% IF ( CAN_user_editcatalogue_edit_catalogue ) %] <div class="btn-group"><a class="btn btn-default btn-xs" id="z3950submit" href="#"><i class="fa fa-search"></i> Z39.50/SRU search</a></div>[% END %] |
396 |
</div> |
446 |
</div> |