|
Lines 6-15
Link Here
|
| 6 |
var MSG_NO_TAG_SPECIFIED = _("No tag was specified."); |
6 |
var MSG_NO_TAG_SPECIFIED = _("No tag was specified."); |
| 7 |
var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?"); |
7 |
var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?"); |
| 8 |
var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?"); |
8 |
var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?"); |
|
|
9 |
var MSG_NO_RECORD_SELECTED = _("Please select one or more items"); |
| 9 |
|
10 |
|
| 10 |
[% IF ( opacuserlogin ) %][% IF ( RequestOnOpac ) %] |
11 |
[% IF ( opacuserlogin ) %][% IF ( RequestOnOpac ) %] |
| 11 |
function holdSelections() { |
12 |
function holdSelections() { |
| 12 |
var checkedBoxes = $(":checkbox:checked"); |
13 |
var checkedBoxes = $("input:checkbox:checked"); |
| 13 |
if ($(checkedBoxes).size() == 0) { |
14 |
if ($(checkedBoxes).size() == 0) { |
| 14 |
alert(MSG_NO_RECORD_SELECTED); |
15 |
alert(MSG_NO_RECORD_SELECTED); |
| 15 |
} else { |
16 |
} else { |
|
Lines 63-95
function tagAdded() {
Link Here
|
| 63 |
return false; |
64 |
return false; |
| 64 |
}[% END %][% END %][% END %] |
65 |
}[% END %][% END %][% END %] |
| 65 |
|
66 |
|
|
|
67 |
function enableCheckboxActions(){ |
| 68 |
// Enable/disable controls if checkboxes are checked |
| 69 |
var checkedBoxes = $(".checkboxed input:checkbox:checked"); |
| 70 |
if ($(checkedBoxes).size()) { |
| 71 |
$("#selections").html(_("With selected titles: ")); |
| 72 |
$("#selections-toolbar .links a").removeClass("disabled"); |
| 73 |
} else { |
| 74 |
$("#selections").html(_("Select titles to: ")); |
| 75 |
$("#selections-toolbar .links a").addClass("disabled"); |
| 76 |
} |
| 77 |
} |
| 78 |
|
| 66 |
$(function() { |
79 |
$(function() { |
| 67 |
[% IF ( opacbookbag ) %]$(".addtocart").show();[% END %] |
80 |
[% IF ( opacbookbag ) %]$(".addtocart").show();[% END %] |
| 68 |
$("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_('Clear All')+"<\/a>|"); |
81 |
$("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_('Clear all')+"<\/a>"); |
| 69 |
$("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_('Select All')+"<\/a>"); |
82 |
$("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_('Select all')+"<\/a>"); |
| 70 |
$("a.print").show(); |
83 |
$("a.print").show(); |
| 71 |
|
84 |
|
| 72 |
[% IF ( opacuserlogin ) %][% IF ( RequestOnOpac ) %]$("#placehold").html("<a href=\"#\" class=\"hold tag_hides\">"+_('Place Hold')+"<\/a>"); |
85 |
[% IF ( opacuserlogin ) %][% IF ( RequestOnOpac ) %]$("#placehold").html("<a href=\"#\" class=\"hold tag_hides disabled\">"+_('Place hold')+"<\/a>"); |
| 73 |
$("#toolbar a.hold").click(function(){ |
86 |
$("#selections-toolbar a.hold").click(function(){ |
| 74 |
holdSelections(); |
87 |
holdSelections(); |
| 75 |
return false; |
88 |
return false; |
| 76 |
});[% END %][% END %] |
89 |
});[% END %][% END %] |
| 77 |
|
90 |
|
| 78 |
$("#CheckAll").click(function(){ |
91 |
$("#CheckAll").click(function(){ |
| 79 |
$(".checkboxed").checkCheckboxes(); |
92 |
$(".checkboxed").checkCheckboxes(); |
|
|
93 |
enableCheckboxActions(); |
| 80 |
return false; |
94 |
return false; |
| 81 |
}); |
95 |
}); |
| 82 |
$("#CheckNone").click(function(){ |
96 |
$("#CheckNone").click(function(){ |
| 83 |
$(".checkboxed").unCheckCheckboxes(); |
97 |
$(".checkboxed").unCheckCheckboxes(); |
|
|
98 |
enableCheckboxActions(); |
| 84 |
return false; |
99 |
return false; |
| 85 |
}); |
100 |
}); |
| 86 |
|
101 |
|
|
|
102 |
$(".cb").click(function(){ |
| 103 |
enableCheckboxActions(); |
| 104 |
}); |
| 105 |
|
| 87 |
[% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %] |
106 |
[% IF ( opacuserlogin ) %][% IF ( loggedinusername ) %][% IF ( TagsEnabled ) %] |
| 88 |
$("#addtags").click(function(){ |
107 |
$("#addtags").click(function(){ |
| 89 |
tagSelected(); |
108 |
tagSelected(); |
| 90 |
return false; |
109 |
return false; |
| 91 |
}); |
110 |
}); |
| 92 |
$("#addtags").html("<a id=\"tagsel_tag\" href=\"#\">"+_("Tag")+"<\/a> |"); |
111 |
$("#addtags").html("<a id=\"tagsel_tag\" href=\"#\" class=\"disabled\">"+_("Tag")+"<\/a> "); |
| 93 |
|
112 |
|
| 94 |
$(".tagbutton").click(KOHA.Tags.add_tag_button); |
113 |
$(".tagbutton").click(KOHA.Tags.add_tag_button); |
| 95 |
[% IF ( loggedinusername ) %] |
114 |
[% IF ( loggedinusername ) %] |
|
Lines 112-117
$(function() {
Link Here
|
| 112 |
}); |
131 |
}); |
| 113 |
[% END %] |
132 |
[% END %] |
| 114 |
[% END %][% END %][% END %] |
133 |
[% END %][% END %][% END %] |
|
|
134 |
[% IF ( loggedinusername && manageshelf ) %] |
| 135 |
$("#myform").submit(function(){ |
| 136 |
var checkedBoxes = $(".checkboxed input:checkbox:checked"); |
| 137 |
if ($(checkedBoxes).size()) { |
| 138 |
return confirmDelete(MSG_REMOVE_FROM_LIST); |
| 139 |
} else { |
| 140 |
alert(MSG_NO_RECORD_SELECTED); |
| 141 |
return false; |
| 142 |
} |
| 143 |
}); |
| 144 |
$("#removeitems").html("<a href=\"#\" class=\"removeitems tag_hides disabled\">"+_("Remove from list")+"</a>") |
| 145 |
.click(function(){ |
| 146 |
$("#myform").submit(); |
| 147 |
return false; |
| 148 |
}); |
| 149 |
[% END %] |
| 115 |
[% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %] |
150 |
[% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %] |
| 116 |
}); |
151 |
}); |
| 117 |
function Check(f) { |
152 |
function Check(f) { |
|
Lines 185-218
$(function() {
Link Here
|
| 185 |
[% IF ( viewshelf ) %]<!-- Viewing a particular shelf --> |
220 |
[% IF ( viewshelf ) %]<!-- Viewing a particular shelf --> |
| 186 |
<h3><a href="/cgi-bin/koha/opac-shelves.pl">Lists</a> <img src="[% themelang %]/../images/caret.gif" width="16" height="16" alt=">" border="0" /> <em>[% shelfname |html %]</em></h3> |
221 |
<h3><a href="/cgi-bin/koha/opac-shelves.pl">Lists</a> <img src="[% themelang %]/../images/caret.gif" width="16" height="16" alt=">" border="0" /> <em>[% shelfname |html %]</em></h3> |
| 187 |
[% IF ( itemsloop ) %] |
222 |
[% IF ( itemsloop ) %] |
| 188 |
<div id="toolbar" class="list-actions"> <span class="checkall"></span> |
223 |
<div id="toolbar" class="list-actions"> |
| 189 |
<span class="clearall"></span> |
224 |
|
| 190 |
|
225 |
<a href="/cgi-bin/koha/opac-downloadshelf.pl?shelfid=[% shelfnumber %]" class="download" onclick="open(CGIBIN+'opac-downloadshelf.pl?shelfid=[% shelfnumber %]','win_form','dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false;">Download List</a> |
| 191 |
[% IF ( RequestOnOpac ) %] |
226 |
|
| 192 |
<span id="placehold"></span>[% UNLESS ( TagsEnabled ) %] |[% END %] |
227 |
[% IF ( opacuserlogin ) %]<span class="sendlist"><a href="/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelfnumber %]" class="send" onclick="open(CGIBIN+'opac-sendshelf.pl?shelfid=[% shelfnumber %]','win_form','dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false; ">Send List</a></span>[% END %] |
| 193 |
[% END %] |
228 |
|
| 194 |
[% IF ( loggedinusername ) %] |
229 |
<a class="print" href="opac-shelves.pl" onclick="print(); return false;">Print List</a> |
| 195 |
[% IF ( TagsEnabled ) %] |
230 |
|
| 196 |
<span id="addtags"></span> |
231 |
[% IF ( manageshelf ) %] <span class="sep">|</span> <form method="get" action="opac-shelves.pl"><input type="hidden" name="op" value="modif" /> |
| 197 |
<span id="tagsel_form" style="display:none"> |
|
|
| 198 |
<label for="tagsel_new" style="display:inline">New Tag:</label> |
| 199 |
<input name="tagsel_new" id="tagsel_new" maxlength="100" style="display:inline"/> |
| 200 |
<input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="tagsel_button" |
| 201 |
type="submit" value="Add" style="display:inline" /> |
| 202 |
<a href="#" id="tagsel_cancel" onclick="tagCanceled(); return false;" style="display:inline">Cancel</a> |
| 203 |
</span> |
| 204 |
[% END %][% END %] |
| 205 |
|
| 206 |
<a href="/cgi-bin/koha/opac-downloadshelf.pl?shelfid=[% shelfnumber %]" class="download tag_hides" onclick="open(CGIBIN+'opac-downloadshelf.pl?shelfid=[% shelfnumber %]','win_form','dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false;">Download List</a> |
| 207 |
|
| 208 |
[% IF ( opacuserlogin ) %]<span class="sendlist"><a href="/cgi-bin/koha/opac-sendshelf.pl?shelfid=[% shelfnumber %]" class="send tag_hides" onclick="open(CGIBIN+'opac-sendshelf.pl?shelfid=[% shelfnumber %]','win_form','dependant=yes,scrollbars=no,resizable=no,height=300,width=450,top=50,left=100'); return false; ">Send List</a></span>[% END %] |
| 209 |
|
| 210 |
<a class="print tag_hides" href="opac-shelves.pl" onclick="print(); return false;">Print List</a> |
| 211 |
|
| 212 |
[% IF ( manageshelf ) %] | <form method="get" action="opac-shelves.pl" class="tag_hides"><input type="hidden" name="op" value="modif" /> |
| 213 |
<input type="hidden" name="display" value="viewshelf" /> |
232 |
<input type="hidden" name="display" value="viewshelf" /> |
| 214 |
<input type="hidden" name="shelfnumber" value="[% shelfnumber %]" /> <input type="submit" class="editshelf tag_hides" value="Edit List" /></form> |
233 |
<input type="hidden" name="shelfnumber" value="[% shelfnumber %]" /> <input type="submit" class="editshelf" value="Edit List" /></form> |
| 215 |
<form method="post" action="opac-shelves.pl" class="tag_hides"> |
234 |
|
|
|
235 |
<form method="post" action="opac-shelves.pl"> |
| 216 |
<input type="hidden" value="1" name="shelves"/> |
236 |
<input type="hidden" value="1" name="shelves"/> |
| 217 |
<input type="hidden" value="1" name="DEL-[% shelfnumber %]"/> |
237 |
<input type="hidden" value="1" name="DEL-[% shelfnumber %]"/> |
| 218 |
<input type="submit" class="deleteshelf" value="Delete List" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"/> |
238 |
<input type="submit" class="deleteshelf" value="Delete List" onclick="return confirmDelete(MSG_CONFIRM_DELETE_LIST);"/> |
|
Lines 220-227
$(function() {
Link Here
|
| 220 |
|
240 |
|
| 221 |
|
241 |
|
| 222 |
</div> |
242 |
</div> |
| 223 |
|
243 |
<div id="selections-toolbar" class="list-actions"> |
| 224 |
<form action="/cgi-bin/koha/opac-shelves.pl" method="post" name="myform" class="checkboxed"> |
244 |
<span class="checkall"></span> <span class="clearall"></span> <span class="sep">|</span> |
|
|
245 |
<span class="links"><span id="selections">Select titles to: </span> |
| 246 |
[% IF ( RequestOnOpac ) %] |
| 247 |
<span id="placehold"></span> |
| 248 |
[% END %] |
| 249 |
[% IF ( loggedinusername ) %] |
| 250 |
[% IF ( TagsEnabled ) %] |
| 251 |
<span id="addtags"></span> |
| 252 |
<span id="tagsel_form" style="display:none"> |
| 253 |
<label for="tagsel_new" style="display:inline">New Tag:</label> |
| 254 |
<input name="tagsel_new" id="tagsel_new" maxlength="100" style="display:inline"/> |
| 255 |
<input id="tagsel_button" name="tagsel_button" class="input tagsel_button" title="tagsel_button" type="submit" value="Add" style="display:inline" /> |
| 256 |
<a href="#" id="tagsel_cancel" onclick="tagCanceled(); return false;" style="display:inline">Cancel</a> |
| 257 |
</span> |
| 258 |
[% END %] |
| 259 |
[% END %] |
| 260 |
[% IF ( loggedinusername && manageshelf ) %]<span id="removeitems"></span>[% END %]</span> |
| 261 |
</div> |
| 262 |
<form action="/cgi-bin/koha/opac-shelves.pl" method="post" id="myform" name="myform" class="checkboxed"> |
| 225 |
[% IF ( manageshelf ) %] |
263 |
[% IF ( manageshelf ) %] |
| 226 |
<input type="hidden" name="viewshelf" value="[% shelfnumber %]" /> |
264 |
<input type="hidden" name="viewshelf" value="[% shelfnumber %]" /> |
| 227 |
<input type="hidden" name="modifyshelfcontents" value="1" /> |
265 |
<input type="hidden" name="modifyshelfcontents" value="1" /> |
|
Lines 235-241
$(function() {
Link Here
|
| 235 |
[% ELSE %] |
273 |
[% ELSE %] |
| 236 |
<tr> |
274 |
<tr> |
| 237 |
[% END %] |
275 |
[% END %] |
| 238 |
<td><input type="checkbox" name="REM-[% itemsloo.biblionumber %]" |
276 |
<td><input type="checkbox" class="cb" name="REM-[% itemsloo.biblionumber %]" |
| 239 |
value="[% itemsloo.biblionumber %]" /></td> |
277 |
value="[% itemsloo.biblionumber %]" /></td> |
| 240 |
[% UNLESS ( item_level_itypes ) %] |
278 |
[% UNLESS ( item_level_itypes ) %] |
| 241 |
<td> |
279 |
<td> |
|
Lines 258-263
$(function() {
Link Here
|
| 258 |
[% END %] |
296 |
[% END %] |
| 259 |
[% IF ( itemsloo.title ) %][% itemsloo.title |html %][% ELSE %]No title[% END %] [% FOREACH subtitl IN itemsloo.subtitle %][% subtitl.subfield|html %][% END %]</a> |
297 |
[% IF ( itemsloo.title ) %][% itemsloo.title |html %][% ELSE %]No title[% END %] [% FOREACH subtitl IN itemsloo.subtitle %][% subtitl.subfield|html %][% END %]</a> |
| 260 |
[% IF ( itemsloo.author ) %]by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% itemsloo.author |url %]" title="Search for works by this author" class="author">[% itemsloo.author %]</a> |
298 |
[% IF ( itemsloo.author ) %]by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% itemsloo.author |url %]" title="Search for works by this author" class="author">[% itemsloo.author %]</a> |
|
|
299 |
|
| 261 |
[% ELSE %] |
300 |
[% ELSE %] |
| 262 |
[% END %] |
301 |
[% END %] |
| 263 |
<span class="results_summary"><span class="label">Publication:</span> |
302 |
<span class="results_summary"><span class="label">Publication:</span> |
|
Lines 360-366
$(function() {
Link Here
|
| 360 |
[% IF ( itemsloop ) %] |
399 |
[% IF ( itemsloop ) %] |
| 361 |
<input type="hidden" name="shelfnumber" value="[% shelfnumber %]" /> |
400 |
<input type="hidden" name="shelfnumber" value="[% shelfnumber %]" /> |
| 362 |
<input type="hidden" name="modifyshelfcontents" value="1" /> |
401 |
<input type="hidden" name="modifyshelfcontents" value="1" /> |
| 363 |
<input type="hidden" name="viewshelf" value="[% shelfnumber %]" /><input type="submit" value="Remove Selected Items" class="icon delete" onclick="return confirmDelete(MSG_REMOVE_FROM_LIST)" /> |
402 |
<input type="hidden" name="viewshelf" value="[% shelfnumber %]" /><input type="submit" value="Remove Selected Items" class="icon delete" /> |
| 364 |
[% ELSE %] |
403 |
[% ELSE %] |
| 365 |
<form method="post" action="opac-shelves.pl"> |
404 |
<form method="post" action="opac-shelves.pl"> |
| 366 |
<input type="hidden" name="DEL-[% shelfnumber %]" value="1" /> |
405 |
<input type="hidden" name="DEL-[% shelfnumber %]" value="1" /> |