|
Lines 205-244
Link Here
|
| 205 |
[% END # /UNLESS tag %] |
205 |
[% END # /UNLESS tag %] |
| 206 |
</div> <!-- / #toolbar --> |
206 |
</div> <!-- / #toolbar --> |
| 207 |
|
207 |
|
| 208 |
<div id="selections-toolbar" class="toolbar noprint"> |
208 |
<div class="selections-toolbar toolbar noprint"> |
| 209 |
[% IF ( OpacHighlightedWords ) %] |
209 |
[% IF ( OpacHighlightedWords ) %] |
| 210 |
<div class="highlight_controls noprint"> |
210 |
<div class="highlight_controls noprint"> |
| 211 |
<a href="#" class="btn btn-link btn-sm highlight_toggle" id="highlight_toggle_off"><i class="fa fa-fw fa-pencil" aria-hidden="true"></i> Unhighlight</a> |
211 |
<a href="#" class="btn btn-link btn-sm highlight_toggle" id="highlight_toggle_off"><i class="fa fa-fw fa-pencil" aria-hidden="true"></i> Unhighlight</a> |
| 212 |
<a href="#" class="btn btn-link btn-sm highlight_toggle" id="highlight_toggle_on"><i class="fa fa-fw fa-pencil" aria-hidden="true"></i> Highlight</a> |
212 |
<a href="#" class="btn btn-link btn-sm highlight_toggle" id="highlight_toggle_on"><i class="fa fa-fw fa-pencil" aria-hidden="true"></i> Highlight</a> |
| 213 |
</div> |
213 |
</div> |
| 214 |
<span class="sep">|</span> |
|
|
| 215 |
[% END %] |
214 |
[% END %] |
| 216 |
<!-- checkall, clearall are now needed for placehold --> |
|
|
| 217 |
<span class="checkall"></span> |
| 218 |
<span class="clearall"></span> <span class="sep">|</span> |
| 219 |
|
215 |
|
| 220 |
<span class="links"> |
216 |
<div class="check_control"> |
| 221 |
[% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %] |
217 |
<!-- checkall, clearall are now needed for placehold --> |
| 222 |
<span class="addto"></span> |
218 |
<span class="clearall"> |
| 223 |
[% END %] |
219 |
<a id="CheckAll" class="btn btn-link btn-sm" href="#">Select all</a> |
| 224 |
<span id="placehold"></span> |
220 |
</span> |
|
|
221 |
<span class="checkall"> |
| 222 |
<a id="CheckNone" class="btn btn-link btn-sm" href="#">Clear all</a> |
| 223 |
</span> |
| 224 |
</div> |
| 225 |
|
225 |
|
| 226 |
[% IF ( TagsInputEnabled && loggedinusername ) %] |
226 |
<div class="links"> |
| 227 |
<span id="tagsel_span"> |
227 |
[% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) || loggedinusername ) %] |
| 228 |
<button id="tagsel_tag" class="btn btn-link btn-sm disabled" type="submit" style="display:none"><i class="fa fa-fw fa-tag" aria-hidden="true"></i> Tag</button> |
228 |
<span class="selections">Select titles to:</span> |
| 229 |
</span> |
229 |
[% END %] |
| 230 |
<div id="tagsel_form" style="display:none"> |
230 |
[% IF Koha.Preference( 'opacbookbag' ) == 1 OR Koha.Preference('virtualshelves') %] |
| 231 |
<label for="tagsel_new">New tag:</label> |
231 |
<span class="addto"> |
| 232 |
<input type="text" name="tagsel_new" id="tagsel_new" maxlength="100" /> |
232 |
<select class="disabled form-control form-control-sm" name="addto" id="addto"> |
| 233 |
<input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-sm btn-primary" title="Add" type="submit" value="Add" /> |
233 |
<option>Add to...</option> |
| 234 |
<a href="#" id="tagsel_cancel">(done)</a> |
234 |
[% IF Koha.Preference( 'opacbookbag' ) == 1 %] |
| 235 |
</div> |
235 |
<option value="addtocart">Cart</option> |
| 236 |
<div id="tagsel_status" class="tagsel_tatus" style="display:none;"> |
236 |
[% END %] |
| 237 |
Tag status here. |
237 |
[% IF Koha.Preference('virtualshelves') %] |
| 238 |
</div> |
238 |
[% IF loggedinusername AND add_to_some_private_shelves.count %] |
| 239 |
[% END %] |
239 |
<optgroup label="Your lists:"> |
| 240 |
</span> <!-- / .links --> |
240 |
[% SET number_of_private_shelves = 0 %] |
| 241 |
</div> <!-- / #selections-toolbar --> |
241 |
[% FOREACH s IN add_to_some_private_shelves %] |
|
|
242 |
[% IF shelfnumber != s.shelfnumber %] |
| 243 |
<option id="s[% s.shelfnumber | html %]" value="addtolist">[% s.shelfname | html %]</option> |
| 244 |
[% SET number_of_private_shelves = number_of_private_shelves + 1 %] |
| 245 |
[% IF number_of_private_shelves == 10 %][% LAST %][% END %] |
| 246 |
[% END %] |
| 247 |
[% END %] |
| 248 |
</optgroup> |
| 249 |
[% END %] |
| 250 |
[% IF add_to_some_public_shelves.count %] |
| 251 |
<optgroup label="Public lists:"> |
| 252 |
[% SET number_of_public_shelves = 0 %] |
| 253 |
[% FOREACH s IN add_to_some_public_shelves %] |
| 254 |
[% IF shelfnumber != s.shelfnumber %] |
| 255 |
<option id="s[% s.shelfnumber | html %]" value="addtolist">[% s.shelfname | html %]</option> |
| 256 |
[% SET number_of_public_shelves = number_of_public_shelves + 1 %] |
| 257 |
[% IF number_of_public_shelves == 10 %][% LAST %][% END %] |
| 258 |
[% END %] |
| 259 |
[% END %] |
| 260 |
</optgroup> |
| 261 |
[% END %] |
| 262 |
[% IF ( add_to_some_private_shelves and add_to_some_private_shelves.count > 10 ) or ( add_to_some_public_shelves and add_to_some_public_shelves.count > 10 ) %] |
| 263 |
<option value="morelists">[ More lists ]</option> |
| 264 |
[% END %] |
| 265 |
<option value="newlist">[ New list ]</option>" |
| 266 |
[% END # /IF virtualshelves %] |
| 267 |
</select> |
| 268 |
<input type="submit" class="btn btn-sm btn-primary" value="Save" /> |
| 269 |
</span> |
| 270 |
[% END # /IF opacbookbag || virtualshelves %] |
| 271 |
|
| 272 |
[% IF ( ( Koha.Preference( 'RequestOnOpac' ) == 1 ) && ( Koha.Preference( 'opacuserlogin' ) == 1 ) && DisplayMultiPlaceHold ) %] |
| 273 |
<button class="btn btn-link btn-sm hold disabled" type="button"> |
| 274 |
<i class="fa fa-fw fa-bookmark" aria-hidden="true"></i> Place hold |
| 275 |
</button> |
| 276 |
[% END %] |
| 277 |
|
| 278 |
[% IF ( TagsInputEnabled && loggedinusername ) %] |
| 279 |
<span id="tagsel_span"> |
| 280 |
<button id="tagsel_tag" class="btn btn-link btn-sm disabled" type="submit" style="display:none"><i class="fa fa-fw fa-tag" aria-hidden="true"></i> Tag</button> |
| 281 |
</span> |
| 282 |
[% END %] |
| 283 |
</div> <!-- / .links --> |
| 284 |
[% IF ( TagsInputEnabled && loggedinusername ) %] |
| 285 |
<div id="tagsel_form" style="display:none"> |
| 286 |
<label for="tagsel_new">New tag:</label> |
| 287 |
<input type="text" name="tagsel_new" id="tagsel_new" maxlength="100" /> |
| 288 |
<input id="tagsel_button" name="tagsel_button" class="tagsel_button btn btn-sm btn-primary" title="Add" type="submit" value="Add" /> |
| 289 |
<a href="#" id="tagsel_cancel">(done)</a> |
| 290 |
</div> |
| 291 |
<div id="tagsel_status" class="tagsel_tatus" style="display:none;"> |
| 292 |
Tag status here. |
| 293 |
</div> |
| 294 |
[% END %] |
| 295 |
</div> <!-- / .selections-toolbar --> |
| 242 |
</div> <!-- /#floating --> |
296 |
</div> <!-- /#floating --> |
| 243 |
|
297 |
|
| 244 |
<!-- TABLE RESULTS START --> |
298 |
<!-- TABLE RESULTS START --> |
|
Lines 714-726
Link Here
|
| 714 |
function enableCheckboxActions(){ |
768 |
function enableCheckboxActions(){ |
| 715 |
// Enable/disable controls if checkboxes are checked |
769 |
// Enable/disable controls if checkboxes are checked |
| 716 |
var checkedBoxes = $(".cb:checked"); |
770 |
var checkedBoxes = $(".cb:checked"); |
| 717 |
var controls = $("#selections-toolbar .links a, #selections-toolbar .links input, #selections-toolbar .links select, #selections-toolbar .links label, #selections-toolbar .links button"); |
771 |
var controls = $(".selections-toolbar .links a, .selections-toolbar .links input, .selections-toolbar .links select, .selections-toolbar .links label, .selections-toolbar .links button"); |
| 718 |
if ($(checkedBoxes).size()) { |
772 |
if ($(checkedBoxes).size()) { |
| 719 |
$("#selections").html(_("With selected titles: ")); |
773 |
$(".selections").html(_("With selected titles: ")); |
| 720 |
$(controls).removeClass("disabled"); |
774 |
$(controls).removeClass("disabled"); |
| 721 |
} else { |
775 |
} else { |
| 722 |
$("#selections").html(_("Select titles to: ")); |
776 |
$(".selections").html(_("Select titles to: ")); |
| 723 |
$(controls).addClass("disabled"); |
777 |
$(controls).addClass("disabled"); |
| 724 |
} |
778 |
} |
| 725 |
} |
779 |
} |
| 726 |
|
780 |
|
|
Lines 771-820
Link Here
|
| 771 |
e.preventDefault(); |
825 |
e.preventDefault(); |
| 772 |
}); |
826 |
}); |
| 773 |
|
827 |
|
| 774 |
var param1 = ""; |
|
|
| 775 |
[% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) || loggedinusername ) %] |
| 776 |
param1 += "<span id=\"selections\">"+_("Select titles to: ")+"</span>"; |
| 777 |
[% END %] |
| 778 |
|
| 779 |
[% IF Koha.Preference( 'opacbookbag' ) == 1 OR Koha.Preference('virtualshelves') %] |
| 780 |
param1 += "<select class=\"disabled\" name=\"addto\" id=\"addto\"><option>"+_("Add to...")+"</option>"; |
| 781 |
|
| 782 |
[% IF Koha.Preference( 'opacbookbag' ) == 1 %] |
| 783 |
param1 += "<option value=\"addtocart\">"+_("Cart")+"<\/option>"; |
| 784 |
[% END %] |
| 785 |
[% IF Koha.Preference('virtualshelves') %] |
| 786 |
[% IF loggedinusername AND add_to_some_private_shelves.count %] |
| 787 |
param1 += "<optgroup label=\""+_("Your lists:")+"\">"; |
| 788 |
[% SET number_of_private_shelves = 0 %] |
| 789 |
[% FOREACH s IN add_to_some_private_shelves %] |
| 790 |
[% IF shelfnumber != s.shelfnumber %] |
| 791 |
param1 += "<option id=\"s[% s.shelfnumber | html %]\" value=\"addtolist\">[% s.shelfname | html %]<\/option>"; |
| 792 |
[% SET number_of_private_shelves = number_of_private_shelves + 1 %] |
| 793 |
[% IF number_of_private_shelves == 10 %][% LAST %][% END %] |
| 794 |
[% END %] |
| 795 |
[% END %] |
| 796 |
param1 += "<\/optgroup>"; |
| 797 |
[% END %] |
| 798 |
[% IF add_to_some_public_shelves.count %] |
| 799 |
param1 += "<optgroup label=\""+_("Public lists:")+"\">"; |
| 800 |
[% SET number_of_public_shelves = 0 %] |
| 801 |
[% FOREACH s IN add_to_some_public_shelves %] |
| 802 |
[% IF shelfnumber != s.shelfnumber %] |
| 803 |
param1 += "<option id=\"s[% s.shelfnumber | html %]\" value=\"addtolist\">[% s.shelfname | html %]<\/option>"; |
| 804 |
[% SET number_of_public_shelves = number_of_public_shelves + 1 %] |
| 805 |
[% IF number_of_public_shelves == 10 %][% LAST %][% END %] |
| 806 |
[% END %] |
| 807 |
[% END %] |
| 808 |
param1 += "<\/optgroup>"; |
| 809 |
[% END %] |
| 810 |
[% IF ( add_to_some_private_shelves and add_to_some_private_shelves.count > 10 ) or ( add_to_some_public_shelves and add_to_some_public_shelves.count > 10 ) %] |
| 811 |
param1 += "<option value=\"morelists\">[ "+_("More lists")+" ]<\/option>"; |
| 812 |
[% END %] |
| 813 |
param1 +="<option value=\"newlist\">"+_("[ New list ]")+"<\/option>" |
| 814 |
[% END # /IF virtualshelves %] |
| 815 |
param1 += "<\/select> <input type=\"submit\" class=\"btn btn-sm btn-primary\" value=\""+_("Save")+"\" />"; |
| 816 |
[% END # /IF opacbookbag || virtualshelves %] |
| 817 |
|
| 818 |
$('.resort').change(function() { |
828 |
$('.resort').change(function() { |
| 819 |
$('#bookbag_form').submit(); |
829 |
$('#bookbag_form').submit(); |
| 820 |
}); |
830 |
}); |
|
Lines 823-839
Link Here
|
| 823 |
$('#bookbag_form').submit(); |
833 |
$('#bookbag_form').submit(); |
| 824 |
}); |
834 |
}); |
| 825 |
|
835 |
|
| 826 |
$("span.clearall").html("<a id=\"CheckNone\" class=\"btn btn-link btn-sm \" href=\"#\">"+_("Clear all")+"<\/a>"); |
|
|
| 827 |
$("span.checkall").html("<a id=\"CheckAll\" class=\"btn btn-link btn-sm \" href=\"#\">"+_("Select all")+"<\/a>"); |
| 828 |
|
| 829 |
[% IF Koha.Preference( 'opacbookbag' ) == 1 %] |
| 830 |
$("span.addto").html(param1); |
| 831 |
[% ELSE %] |
| 832 |
[% IF ( ( Koha.Preference( 'virtualshelves' ) == 1 ) && loggedinusername ) %] |
| 833 |
$("span.addto").html(param1); |
| 834 |
[% END %] |
| 835 |
[% END %] |
| 836 |
|
| 837 |
[% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %] |
836 |
[% IF ( ( Koha.Preference( 'opacbookbag' ) == 1 ) || ( Koha.Preference( 'virtualshelves' ) == 1 ) ) %] |
| 838 |
[% IF Koha.Preference( 'virtualshelves' ) == 1 %] |
837 |
[% IF Koha.Preference( 'virtualshelves' ) == 1 %] |
| 839 |
$("#addto").on("change",function(){ |
838 |
$("#addto").on("change",function(){ |
|
Lines 893-905
Link Here
|
| 893 |
enableCheckboxActions(); |
892 |
enableCheckboxActions(); |
| 894 |
}); |
893 |
}); |
| 895 |
|
894 |
|
| 896 |
[% IF ( ( Koha.Preference( 'RequestOnOpac' ) == 1 ) && ( Koha.Preference( 'opacuserlogin' ) == 1 ) && DisplayMultiPlaceHold ) %] |
895 |
$(".hold").on("click", function(e){ |
| 897 |
$("#placehold").html("<button class=\"btn btn-link btn-sm hold disabled\" type=\"submit\"><i class=\"fa fa-fw fa-bookmark\" aria-hidden=\"true\"></i>" + _("Place hold") + "</button>"); |
896 |
e.preventDefault(); |
| 898 |
$("#placehold").find("button.hold").click(function(){ |
897 |
holdMultiple(); |
| 899 |
holdMultiple(); |
898 |
}); |
| 900 |
return false; |
|
|
| 901 |
}); |
| 902 |
[% END %] |
| 903 |
|
899 |
|
| 904 |
[% IF ( query_desc ) %] |
900 |
[% IF ( query_desc ) %] |
| 905 |
[% IF ( OpacHighlightedWords ) %] |
901 |
[% IF ( OpacHighlightedWords ) %] |
|
Lines 910-917
Link Here
|
| 910 |
q_array = q_array.splice(0,-1); |
906 |
q_array = q_array.splice(0,-1); |
| 911 |
} |
907 |
} |
| 912 |
highlightOn(); |
908 |
highlightOn(); |
| 913 |
$("#highlight_toggle_on" ).hide().click(function() {highlightOn() ;}); |
909 |
$("#highlight_toggle_on" ).hide().click(function(e) { |
| 914 |
$("#highlight_toggle_off").show().click(function() {highlightOff();}); |
910 |
e.preventDefault(); |
|
|
911 |
highlightOn(); |
| 912 |
}); |
| 913 |
$("#highlight_toggle_off").show().click(function(e) { |
| 914 |
e.preventDefault(); |
| 915 |
highlightOff(); |
| 916 |
}); |
| 915 |
[% END # /IF OpacHighlightedWords %] |
917 |
[% END # /IF OpacHighlightedWords %] |
| 916 |
[% IF ( OverDriveEnabled ) %] |
918 |
[% IF ( OverDriveEnabled ) %] |
| 917 |
var $overdrive_results = $( '<div id="overdrive-results">' + MSG_SEARCHING.format('OverDrive') + ' <img class="throbber" src="[% interface | html %]/lib/jquery/plugins/themes/classic/throbber.gif" /></div>' ); |
919 |
var $overdrive_results = $( '<div id="overdrive-results">' + MSG_SEARCHING.format('OverDrive') + ' <img class="throbber" src="[% interface | html %]/lib/jquery/plugins/themes/classic/throbber.gif" /></div>' ); |