8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Koha › [% IF op == 'view' %]Lists › Contents of [% shelf.shelfname | html %][% ELSE %]Lists[% END %][% IF op == 'add_form' %] › Create new list[% END %][% IF op == 'edit_form' %] › Edit list [% shelf.shelfname | html %][% END %]</title>
10 [% INCLUDE 'doc-head-close.inc' %]
11 <style>textarea { width: 100%; }</style>
13 [% BLOCK list_permissions %]
15 <label for="allow_changes_from">Allow changes to contents from: </label>
16 <select name="allow_changes_from" id="allow_changes_from" onchange="AdjustRemark()">
18 [% IF shelf.allow_change_from_owner %]<option value="0">Nobody</option>[% ELSE %]<option value="0" selected="selected">Nobody</option>[% END %]
20 [% IF shelf.allow_change_from_owner && (( !shelf.is_public && !shelf.is_shared ) || !shelf.allow_change_from_others ) %]
21 <option value="1" selected="selected">Owner only</option>
23 <option value="1">Owner only</option>
26 [% IF shelf.allow_change_from_others %]<option value="2" selected="selected">Anyone seeing this list</option>[% ELSE %]<option value="2">Anyone seeing this list</option>[% END %]
29   <span id="anyone_remark" style="display:none;color:red;">The Anyone permission has no actual effect while this list is strictly private.</span>
34 <body id="lists_shelves" class="lists">
35 [% INCLUDE 'header.inc' %]
36 [% INCLUDE 'cat-search.inc' %]
38 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
41 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
46 <a href="/cgi-bin/koha/virtualshelves/shelves.pl">Lists</a>
50 <a href="#" aria-current="page">
56 [% IF shelf AND shelf.is_private %]
57 [% IF op == 'view' OR op == 'edit_form' %]
59 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&category=[% PRIVATE | uri %]">Your lists</a>
63 <a href="#" aria-current="page">
69 [% ELSIF shelf AND shelf.is_public %]
72 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&category=[% PUBLIC | uri %]">Public lists</a>
76 <a href="#" aria-current="page">
85 <a href="#" aria-current="page">
86 Contents of <em>[% shelf.shelfname | html %]</em>
91 [% IF op == 'add_form' %]
93 <a href="#" aria-current="page">
99 [% IF op == 'edit_form' %]
101 <a href="#" aria-current="page">
102 Edit list <em>[% shelf.shelfname | html %]</em>
109 <div class="main container-fluid">
111 <div class="col-sm-10 col-sm-push-1">
114 [% INCLUDE 'virtualshelves-toolbar.inc' %]
116 [% FOR m IN messages %]
117 <div class="dialog [% m.type | html %]">
119 [% CASE 'error_on_update' %]
120 <span>An error occurred when updating this list.</span>
121 [% CASE 'error_on_insert' %]
122 <span>An error occurred when creating this list.</span>
123 [% CASE 'error_on_delete' %]
124 <span>An error occurred when deleting this list.</span>
125 [% CASE 'error_on_add_biblio' %]
126 [% IF m.item_barcode %]
127 <span>The item ([% m.item_barcode | html %]) has not been added to the list. Please verify it is not already in the list.</span>
129 <span>The record ([% m.bibnum | html %]) has not been added to the list. Please verify it is not already in the list.</span>
131 [% CASE 'success_on_update' %]
132 <span>List updated.</span>
133 [% CASE 'success_on_insert' %]
134 <span>List created.</span>
135 [% CASE 'success_on_delete' %]
136 <span>List deleted.</span>
137 [% CASE 'success_on_add_biblio' %]
138 [% IF m.item_barcode %]
139 <span>The item ([% m.item_barcode | html %]) has been added to the list.</span>
141 <span>The record ([% m.bibnum | html %]) has been added to the list.</span>
143 [% CASE 'success_on_remove_biblios' %]
144 <span>The item has been removed from the list.</span>
145 [% CASE 'does_not_exist' %]
146 <span>This list does not exist.</span>
147 [% CASE 'item_does_not_exist' %]
148 [% IF m.item_barcode %]
149 <span>The item ([% m.item_barcode | html %]) does not exist.</span>
151 <span>The record ([% m.bibnum | html %]) does not exist.</span>
153 [% CASE 'unauthorized_on_view' %]
154 <span>You do not have permission to view this list.</span>
155 [% CASE 'unauthorized_on_update' %]
156 <span>You do not have permission to update this list.</span>
157 [% CASE 'unauthorized_on_delete' %]
158 <span>You do not have permission to delete this list.</span>
159 [% CASE 'unauthorized_on_add_biblio' %]
160 <span>You do not have permission to add a record to this list.</span>
161 [% CASE 'no_biblio_removed' %]
162 <span>No record was removed.</span>
163 [% CASE 'Koha::Exceptions::Virtualshelves::DuplicateObject' %]
164 <span>An error occurred when creating this list. The name [% shelfname | html %] already exists.</span>
165 [% CASE 'Koha::Exceptions::Virtualshelves::UseDbAdminAccount' %]
166 <span>List could not be created. (Do not use the database administrator account.)</span>
167 [% CASE 'DBIx::Class::Exception' %]
170 [% m.code | html %] [% m.msg | html %]
175 [% IF op == 'view' %]
178 <h3>Contents of <em>[% shelf.shelfname | html %]</em></h3>
179 <div class="pages">[% pagination_bar | $raw %]</div>
180 <form action="/cgi-bin/koha/virtualshelves/shelves.pl" id="listform" method="post">
181 <input type="hidden" name="op" value="remove_biblios" />
182 <input type="hidden" name="referer" value="view" />
183 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
185 [% IF direction == 'asc' %]
186 [% SET new_direction = 'desc' %]
188 [% SET direction = 'desc' %]
189 [% SET new_direction = 'asc' %]
193 <div id="searchheader" class="searchheader noprint">
194 <div id="selection_ops"><span class="checkall"></span> |
195 <span class="clearall"></span>
197 <span class="addto">| </span>
199 [% IF CAN_user_reserveforothers && Koha.Preference('DisplayMultiPlaceHold') %]
200 <div class="btn-group"><button class="btn btn-default btn-xs placehold"><i class="fa fa-sticky-note-o"></i> Place hold</button></div>
202 [% IF can_remove_biblios %]
203 <div class="btn-group"><button type="submit" class="btn btn-default btn-xs list-remove"><i class="fa fa-trash"></i> Remove selected</button></div>
205 [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]<div class="btn-group"><button type="submit" class="btn btn-default btn-xs merge-items"><i class="fa fa-compress"></i> Merge selected</button></div>[% END %]
210 <table id="searchresults" class="dataTable">
213 [% IF ( itemsloop ) %]<th class="checkall"> </th>[% END %]
215 [% UNLESS ( item_level_itypes ) %]<th>Item type</th>[% END %]
216 [% IF sortfield == 'title' %]
217 <th class="sorting_[% direction | html %]">
221 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]&sortfield=title&direction=[% IF sortfield != 'title' %]asc[% ELSE %][% new_direction | uri %][% END %]">Title</a>
223 [% IF sortfield == 'author' %]
224 <th class="sorting_[% direction | html %]">
228 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]&sortfield=author&direction=[% IF sortfield != 'author' %]asc[% ELSE %][% new_direction | uri %][% END %]">Author</a>
230 [% IF sortfield == 'dateadded' %]
231 <th class="sorting_[% direction | html %]">
235 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]&sortfield=dateadded&direction=[% IF sortfield != 'dateadded' %]asc[% ELSE %][% new_direction | uri %][% END %]">Date added</a>
237 [% IF sortfield == 'itemcallnumber' %]
238 <th class="sorting_[% direction | html %]">
242 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]&sortfield=itemcallnumber&direction=[% IF sortfield != 'itemcallnumber' %]asc[% ELSE %][% new_direction | uri %][% END %]">Call number</a>
246 [% FOREACH itemsloo IN itemsloop %]
250 <input type="checkbox" class="selection" value="[% itemsloo.biblionumber | html %]" name="biblionumber" />
253 [% UNLESS ( item_level_itypes ) %]<td>
254 [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]<img src="[% itemsloo.imageurl | html %]" alt="[% itemsloo.description | html %]" title="[% itemsloo.description | html %]" />[% END %][% itemsloo.description | html %]
257 [% IF ( itemsloo.XSLTBloc ) %]
258 [% itemsloo.XSLTBloc | $raw %]
260 [% INCLUDE 'biblio-title.inc' biblio=itemsloo link = 1 %]
264 [% IF ( itemsloo.notforloan ) %]
265 <span class="noholdstext">No holds allowed</span>
267 [% IF ( itemsloo.ITEM_RESULTS.size ) %]
268 <a id="reserve_[% itemsloo.biblionumber | html %]" href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber | html %]">Holds</a>
269 [% IF ( holdfor ) %] <span class="holdforlink">| <a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% itemsloo.biblionumber | uri %]&findborrower=[% holdfor_cardnumber | uri %]">Place hold for [% holdfor_firstname | html %] [% holdfor_surname | html %] ([% holdfor_cardnumber | html %])</a></span>[% END %]
271 <span class="noholdstext">No holds allowed</span>
274 [% IF ( CAN_user_editcatalogue_edit_catalogue ) %]
275 | <a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% itemsloo.biblionumber | uri %]">Edit record</a>
277 [% IF ( CAN_user_editcatalogue_edit_items ) %]
278 | <a href="/cgi-bin/koha/cataloguing/additem.pl?biblionumber=[% itemsloo.biblionumber | uri %]">Edit items</a>
282 <td>[% itemsloo.author | html %]</td>
283 <td>[% itemsloo.dateadded | $KohaDates%]</td>
286 [% FOREACH result IN itemsloo.ITEM_RESULTS %]
288 [% result.holdingbranch | html %]
289 [% IF ( result.location_intranet ) %]<span class="shelvingloc">[% result.location_intranet | html %]</span>[% END %]
290 [% IF ( result.itemcallnumber ) %]
291 [<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&q=%22[% result.itemcallnumber |uri %]%22">[% result.itemcallnumber | html %]</a>]
298 [% END %]<!-- /itemsloop -->
300 <div class="pages">[% pagination_bar | $raw %]</div>
306 [% IF op == 'add_form' OR op == 'edit_form' %]
308 <form method="post" action="/cgi-bin/koha/virtualshelves/shelves.pl" class="validated">
309 <fieldset class="rows">
311 [% IF op == 'add_form' %]
312 <legend>Create a new list</legend>
313 <input type="hidden" name="op" value="add" />
315 <legend>Edit list <em>[% shelf.shelfname | html %]</em></legend>
316 <input type="hidden" name="op" value="edit" />
318 <input type="hidden" name="referer" value="[% referer | html %]" />
319 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
322 <label for="shelfname" class="required">Name: </label><input type="text" id="shelfname" name="shelfname" size="25" value="[% shelf.shelfname | html %]" required="required" class="focus required" />
323 <span class="required">Required</span>
326 <span class="label">Owner: </span>
327 [% IF op == 'add_form' %]
328 <input type="hidden" name="owner" id="owner" value="[% loggedinusernumber | html %]" />[% logged_in_user.userid | html %]
331 <input type="hidden" id="owner" name="owner" value="[% owner.borrowernumber | html %]" />[% owner.firstname _ ' ' _ owner.surname | html %]
333 <input type="hidden" id="owner" name="owner" value="[% loggedinusernumber | html %]" />[% logged_in_user.userid | html %]
337 <li><label for="sortfield" >Sort this list by: </label>
338 <select name="sortfield">
339 [% IF shelf.sortfield == "title" %]<option value="title" selected="selected">Title</option>[% ELSE %]<option value="title">Title</option>[% END %]
340 [% IF shelf.sortfield == "author" %]<option value="author" selected="selected">Author</option>[% ELSE %]<option value="author">Author</option>[% END %]
341 [% IF shelf.sortfield == "copyrightdate" %]<option value="copyrightdate" selected="selected">Copyrightdate</option>[% ELSE %]<option value="copyrightdate">Copyrightdate</option>[% END %]
342 [% IF shelf.sortfield == "itemcallnumber" %]<option value="itemcallnumber" selected="selected">Call number</option>[% ELSE %]<option value="itemcallnumber">Call number</option>[% END %]
343 [% IF shelf.sortfield == "dateadded" %]<option value="dateadded" selected="selected">Date added</option>[% ELSE %]<option value="dateadded">Date added</option>[% END %]
345 <li><label for="category">Category: </label>
346 <select id="category" name="category" onchange="AdjustRemark()">
347 [% IF shelf.is_private %]
348 <option value="1" selected="selected">Private</option>
350 <option value="1">Private</option>
352 [% IF shelf.is_public %]
353 <option value="2" selected="selected">Public</option>
355 <option value="2">Public</option>
359 [% INCLUDE list_permissions %]
364 <fieldset class="action">
365 <input type="submit" value="Save" class="submit" />
366 [% IF referer == 'view' %]
367 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=view&shelfnumber=[% shelf.shelfnumber | uri %]" class="cancel">Cancel</a>
369 [% IF category == PUBLIC %]
370 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&category=[% PUBLIC | uri %]" class="cancel">Cancel</a>
372 <a href="/cgi-bin/koha/virtualshelves/shelves.pl?op=list&category=[% PRIVATE | uri %]" class="cancel">Cancel</a>
380 [% IF op == 'list' %]
382 <div id="tabs" class="toptabs">
384 <li id="privateshelves_tab" class="active"><a href="#tab_content">Your lists</a></li>
385 <li id="publicshelves_tab" class="active"><a href="#tab_content">Public lists</a></li>
388 <div id="tab_content">
389 <table id="listresultst">
392 <th class="NoVisible">Type</th>
398 <th>Creation date</th>
399 <th>Modification date</th>
400 <th class="noExport">Actions</th>
402 <tr class="filters_row">
404 <th><input class="filter text_filter" id="searchshelfname_filter" placeholder="List name"></th>
407 <th><input class="filter text_filter" id="searchowner_filter" placeholder="Owner"></th>
409 <select class="filter text_filter" id="searchsortby_filter">
410 <option value=""></option>
411 <option value="title">Title</option>
412 <option value="author">Author</option>
413 <option value="copyrightdate">Copyrightdate</option>
414 <option value="itemcallnumber">Call number</option>
415 <option value="dateadded">Date added</option>
429 <form id="hold_form" method="get" action="/cgi-bin/koha/reserve/request.pl">
430 <!-- Value will be set here by placeHold() -->
431 <input id="hold_form_biblios" type="hidden" name="biblionumbers" value="" />
435 </div> <!-- /.col-sm-10.col-sm-push-2 -->
436 </div> <!-- /.row -->
438 [% IF ( can_add_biblios ) %]
440 <div class="modal" id="addToList" tabindex="-1" role="dialog" aria-labelledby="addToListLabel">
441 <div class="modal-dialog" role="document">
442 <form action="/cgi-bin/koha/virtualshelves/shelves.pl" method="post">
443 <div class="modal-content">
444 <div class="modal-header">
445 <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
446 <h4 class="modal-title" id="addToListLabel">Add items</h4>
448 <div class="modal-body">
449 <fieldset class="brief">
452 <label for="barcodes">Barcodes:</label>
453 <textarea name="barcodes" id="barcodes" rows="5"></textarea>
454 <input type="hidden" name="op" value="add_biblio" />
455 <input type="hidden" name="referer" value="view" />
456 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
459 <label for="biblionumbers">Biblio numbers:</label>
460 <textarea name="biblionumbers" id="biblionumbers" rows="5"></textarea>
461 <input type="hidden" name="op" value="add_biblio" />
462 <input type="hidden" name="referer" value="view" />
463 <input type="hidden" name="shelfnumber" value="[% shelf.shelfnumber | html %]" />
468 <div class="modal-footer">
469 <button type="submit" class="btn btn-default">Save</button>
470 <a href="#" data-dismiss="modal" class="cancel">Cancel</a>
478 [% MACRO jsinclude BLOCK %]
479 [% INCLUDE 'datatables.inc' %]
480 [% Asset.js("lib/jquery/plugins/jquery.dataTables.columnFilter.js") | $raw %]
483 $( document ).ready(function() {
485 setTimeout('window.close()', 1);
490 [% IF op == 'view' %]
491 [% Asset.js("lib/hc-sticky.js") | $raw %]
494 var MSG_NO_ITEM_SELECTED = _("Nothing is selected.");
495 var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?");
496 var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to remove this list?");
498 [% IF op == 'list' %]
499 $(document).ready(function(){
500 [% IF category == PUBLIC %]
501 var type = [% PUBLIC | html %];
503 var type = [% PRIVATE | html %];
506 var dtListResults = $("#listresultst").dataTable($.extend(true, {}, dataTablesDefaults, {
507 "aaSorting": [[ 5, "asc" ]],
509 'sAjaxSource': "/cgi-bin/koha/svc/virtualshelves/search",
510 'fnServerData': function(sSource, aoData, fnCallback) {
516 'value': $("#searchshelfname_filter").val(),
519 'value': $("#searchowner_filter").val(),
522 'value': $("#searchsortby_filter").val(),
524 'name': 'template_path',
525 'value': 'virtualshelves/tables/shelves_results.tt',
532 'success': function(json){
538 { 'mDataProp': 'dt_type' },
539 { 'mDataProp': 'dt_shelfname' },
540 { 'mDataProp': 'dt_count' },
541 { 'mDataProp': 'dt_is_shared' },
542 { 'mDataProp': 'dt_owner' },
543 { 'mDataProp': 'dt_sortby' },
544 { 'mDataProp': 'dt_created_on' },
545 { 'mDataProp': 'dt_modification_time' },
546 { 'mDataProp': 'dt_action', 'bSortable': false, 'sClass': 'actions' }
549 { "bVisible": false, "aTargets": [ 'NoVisible' ] }
552 'sPaginationType': 'full_numbers',
555 "bSortCellsTop": true
558 dtListResults.fnAddFilters("filter", 750);
560 var tabs = $("#tabs").tabs({
561 [% IF category == PUBLIC %]
566 activate: function(e, ui) {
567 var active = tabs.tabs("option", "active" );
569 type = [% PRIVATE | html %];
570 dtListResults.fnDraw();
571 } else if ( active == 1 ) {
572 type = [% PUBLIC | html %];
573 dtListResults.fnDraw();
577 $("body").on("click", ".deleteshelf", function(){
578 return confirmDelete(MSG_CONFIRM_DELETE_LIST);
583 [% IF shelf AND op == 'view' %]
585 $(document).ready(function(){
586 Sticky = $("#searchheader");
588 stickTo: "#listform",
589 stickyClass: "floating"
591 $("span.clearall").html("<a id=\"CheckNone\" href=\"/cgi-bin/koha/shelves.pl\"><i class=\"fa fa-remove\"></i>"+_(" Clear all")+"<\/a>");
592 $("span.checkall").html("<a id=\"CheckAll\" href=\"/cgi-bin/koha/shelves.pl\"><i class=\"fa fa-check\"></i>"+_(" Select all")+"<\/a>");
593 $("#CheckAll").click(function(e){
595 $(".selection").each(function(){
596 $(this).prop("checked", true);
600 $("#CheckNone").click(function(e){
602 $(".selection").each(function(){
603 $(this).prop("checked", false);
606 $(".placehold").on("click",function(e){
610 $(".addtocart").show();
611 var param1 = "| <label for=\"addto\">"+_("Add to:")+"<\/label><select name=\"addto\" id=\"addto\"><option value=\"\"><\/option>";
612 [% IF (Koha.Preference("intranetbookbag")) %]
613 param1 += "<option value=\"addtocart\">"+_("Cart")+"<\/option>";
615 [% IF Koha.Preference('virtualshelves') %]
616 [% IF add_to_some_private_shelves.count %]
617 param1 += "<optgroup label=\""+_("Your lists:")+"\">";
618 [% SET number_of_private_shelves = 0 %]
619 [% FOREACH s IN add_to_some_private_shelves %]
620 [% IF shelfnumber != s.shelfnumber %]
621 param1 += "<option id=\"s[% s.shelfnumber | html %]\" value=\"addtolist\">[% s.shelfname | html %]<\/option>";
622 [% SET number_of_private_shelves = number_of_private_shelves + 1 %]
623 [% IF number_of_private_shelves == 10 %][% LAST %][% END %]
626 param1 += "<\/optgroup>";
628 [% IF add_to_some_public_shelves.count %]
629 param1 += "<optgroup label=\""+_("Public lists:")+"\">";
630 [% SET number_of_public_shelves = 0 %]
631 [% FOREACH s IN add_to_some_public_shelves %]
632 [% IF shelfnumber != s.shelfnumber %]
633 param1 += "<option id=\"s[% s.shelfnumber | html %]\" value=\"addtolist\">[% s.shelfname | html %]<\/option>";
634 [% SET number_of_public_shelves = number_of_public_shelves + 1 %]
635 [% IF number_of_public_shelves == 10 %][% LAST %][% END %]
638 param1 += "<\/optgroup>";
640 [% IF add_to_some_private_shelves.count > 10 or add_to_some_public_shelves.count > 10 %]
641 param1 += "<option value=\"morelists\">[ "+_("More lists")+" ]<\/option>";
643 param1 +="<option value=\"newlist\">"+_("[ New list ]")+"<\/option>"
645 param1 += "<\/select> <button id=\"cartsubmit\" type=\"submit\" class=\"btn btn-default btn-xs\">"+_("Save")+"</button>";
646 $("span.addto").html(param1);
647 $("#cartsubmit").on("click",function(e){
651 $("#addto").change(function(){
654 $(".addto").find("input:submit").click(function(e){
658 $("#selection_ops").show();
659 $(".merge-items").on("click",function(e){
663 $("#listform").on("submit",function(e){
666 $(".list-remove").on("click",function(e){
667 if($(".selection").filter(":checked").length > 0){
668 return confirm(MSG_REMOVE_FROM_LIST);
670 alert(MSG_NO_ITEM_SELECTED);
674 $("#addToList").on("shown.bs.modal", function(e){
675 $("#barcodes").focus();
680 [% IF shelf AND op == 'edit_form' %]
681 $(document).ready(function(){
687 * This function checks if the adequate number of records are checked for merging
689 function MergeItems() {
690 var checkboxes = $("input:checkbox:checked");
691 if (checkboxes.length < 2) {
692 alert(_("At least two records must be selected for merging."));
695 $(checkboxes).each(function() {
696 params.push('biblionumber=' + $(this).val());
698 var url = '/cgi-bin/koha/cataloguing/merge.pl?' + params.join('&');
705 * This function checks all checkboxes if all are empty,
706 * or unchecks all if any already checked.
709 var checkboxes = document.getElementsByTagName('input');
710 var nbCheckbox = checkboxes.length;
711 var check = areAllChecked();
712 for(var i=0;i<nbCheckbox;i++){
713 if(checkboxes[i].getAttribute('type') == "checkbox" ){
714 checkboxes[i].checked = (check) ? 0 : 1;
719 * This function returns true if ALL checkboxes are checked
721 function areAllChecked(){
722 var checkboxes = document.getElementsByTagName('input');
723 var nbCheckbox = checkboxes.length;
724 for(var i=0;i<nbCheckbox;i++){
725 if(checkboxes[i].getAttribute('type') == "checkbox" ){
726 if(checkboxes[i].checked == 0){
734 function placeHold () {
735 var checkedItems = $(".selection:checked");
736 if ($(checkedItems).size() == 0) {
737 alert(MSG_NO_ITEM_SELECTED);
741 $(checkedItems).each(function() {
742 bibs += $(this).val() + "/";
744 $("#hold_form_biblios").val(bibs);
745 $("#hold_form").submit();
750 var checkboxes = $("#searchresults").find(":checkbox");
751 var vshelf = vShelfAdd(checkboxes);
752 if($("#addto").find("option:selected").attr("value") == "addtolist"){
753 var shelfnumber = $("#addto").find("option:selected").attr("id").replace("s","");
755 openWindow('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?shelfnumber='+shelfnumber+'&confirm=1&' + vshelf,'popup',500,500);
758 } else if($("#addto").find("option:selected").attr("value") == "newlist"){
760 openWindow('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?newshelf=1&' + vshelf,'popup',500,500);
763 } else if($("#addto").find("option:selected").attr("value") == "morelists"){
765 openWindow('/cgi-bin/koha/virtualshelves/addbybiblionumber.pl?' + vshelf,'popup',500,500);
769 if($("#addto").find("option:selected").attr("value") == "addtocart"){
770 addMultiple(checkboxes);
775 function AdjustRemark() {
776 var category = $("#category").val();
777 var perms = $("#allow_changes_from").val();
780 $("#anyone_remark").hide();
781 } else if( category==1 ) {
782 // If we move to Private (without shares), show Anyone remark
783 // Note: the number of shares is not tested real-time
784 [% IF !shelf.is_shared %]
785 $("#anyone_remark").show();
787 $("#anyone_remark").hide();
789 } else { // category==2
790 $("#anyone_remark").hide();
793 [% IF op == 'view' %]
796 open(CGIBIN+'virtualshelves/sendshelf.pl?shelfid=[% shelf.shelfnumber | html %]','win_form','scrollbars=no,resizable=no,height=300,width=450,top=50,left=100');
799 $(document).ready(function() {
800 $("#sendlist").click(function(){
804 $("#deleteshelf").click(function(e){
805 if(confirm(_("Are you sure you want to delete this list?"))){
817 [% INCLUDE 'intranet-bottom.inc' %]