Lines 200-205
Link Here
|
200 |
Tag status here. |
200 |
Tag status here. |
201 |
</div> |
201 |
</div> |
202 |
[% END %] |
202 |
[% END %] |
|
|
203 |
[% IF Koha.Preference('OpacBrowseResults') %] |
204 |
<span class="details_link"></span> |
205 |
[% END %] |
203 |
</span> <!-- / .links --> |
206 |
</span> <!-- / .links --> |
204 |
</div> <!-- / #selections-toolbar --> |
207 |
</div> <!-- / #selections-toolbar --> |
205 |
</div> <!-- /#floating --> |
208 |
</div> <!-- /#floating --> |
Lines 706-716
function tagAdded() {
Link Here
|
706 |
|
709 |
|
707 |
function enableCheckboxActions(){ |
710 |
function enableCheckboxActions(){ |
708 |
// Enable/disable controls if checkboxes are checked |
711 |
// Enable/disable controls if checkboxes are checked |
709 |
var checkedBoxes = $(".checkboxed input:checkbox:checked"); |
712 |
var bibnums = getContextBiblioNumbers(); |
710 |
var controls = $("#selections-toolbar .links a, #selections-toolbar .links input, #selections-toolbar .links select, , #selections-toolbar .links label") |
713 |
var controls = $("#selections-toolbar .links a, #selections-toolbar .links input, #selections-toolbar .links select, , #selections-toolbar .links label") |
711 |
if ($(checkedBoxes).size()) { |
714 |
if ( bibnums.length > 0 ) { |
712 |
$("#selections").html(_("With selected titles: ")); |
715 |
$("#selections").html(_("With selected titles: ")); |
713 |
$(controls).removeClass("disabled"); |
716 |
$(controls).removeClass("disabled"); |
|
|
717 |
// Hide or show details link |
718 |
// Update with first biblionumber in queue |
719 |
$(".details_link a").attr("href", "/cgi-bin/koha/opac-detail.pl?biblionumber=" + bibnums[0]); |
714 |
} else { |
720 |
} else { |
715 |
$("#selections").html(_("Select titles to: ")); |
721 |
$("#selections").html(_("Select titles to: ")); |
716 |
$(controls).addClass("disabled"); |
722 |
$(controls).addClass("disabled"); |
Lines 739-744
function highlightOn() {
Link Here
|
739 |
$(".highlight_toggle").toggle(); |
745 |
$(".highlight_toggle").toggle(); |
740 |
} |
746 |
} |
741 |
[% END %] |
747 |
[% END %] |
|
|
748 |
|
742 |
$(document).ready(function(){ |
749 |
$(document).ready(function(){ |
743 |
|
750 |
|
744 |
$(".moretoggle").click(function(e){ |
751 |
$(".moretoggle").click(function(e){ |
Lines 754-768
$(document).ready(function(){
Link Here
|
754 |
}); |
761 |
}); |
755 |
[% END %] |
762 |
[% END %] |
756 |
|
763 |
|
757 |
$(".cb").click(function(){ |
764 |
$(".cb").change(function(){ |
|
|
765 |
[% IF Koha.Preference('OpacBrowseResults') %] |
766 |
if ( $(this).is(':checked') == true ) { |
767 |
addBibToContext( $(this).val() ); |
768 |
} else { |
769 |
delBibToContext( $(this).val() ); |
770 |
} |
771 |
[% END %] |
758 |
enableCheckboxActions(); |
772 |
enableCheckboxActions(); |
759 |
}); |
773 |
}); |
|
|
774 |
|
775 |
$("span.details_link").html("<a href=\"#\" class=\"disabled\">"+_("Browse selected records")+"<\/a>"); |
776 |
$(".details_link a").click(function(e) { |
777 |
if ( $(this).hasClass("disabled") == true ) { |
778 |
e.preventDefault(); |
779 |
var checkedBoxes = $(".searchresults :checkbox:checked"); |
780 |
if ($(checkedBoxes).size() == 0) { |
781 |
alert(MSG_NO_RECORD_SELECTED); |
782 |
} else { |
783 |
alert(MSG_NEED_COOKIE_ENABLED); |
784 |
} |
785 |
return false; |
786 |
} |
787 |
}); |
760 |
enableCheckboxActions(); |
788 |
enableCheckboxActions(); |
761 |
|
789 |
|
762 |
$(".br-readonly a").on("click", function(e){ |
790 |
$(".br-readonly a").on("click", function(e){ |
763 |
e.preventDefault(); |
791 |
e.preventDefault(); |
764 |
}); |
792 |
}); |
765 |
|
793 |
|
|
|
794 |
$("#bookbag_form").ready(function(){ |
795 |
$("#bookbag_form").unCheckCheckboxes(); |
796 |
var bibnums = getContextBiblioNumbers(); |
797 |
if (bibnums) { |
798 |
for (var i=0; i < bibnums.length; i++) { |
799 |
var id = ('#bib' + bibnums[i]); |
800 |
if ($(id)) { |
801 |
$(id).attr('checked', true); |
802 |
} |
803 |
} |
804 |
} |
805 |
}); |
806 |
|
766 |
[% IF ( IDreamBooksResults ) %] |
807 |
[% IF ( IDreamBooksResults ) %] |
767 |
$('.idbresult').each(function() { |
808 |
$('.idbresult').each(function() { |
768 |
var isbn = $(this).children('a').text().replace(/\s*/,''); |
809 |
var isbn = $(this).children('a').text().replace(/\s*/,''); |
Lines 906-916
$(document).ready(function(){
Link Here
|
906 |
$("#CheckAll").click(function(){ |
947 |
$("#CheckAll").click(function(){ |
907 |
$("#bookbag_form").checkCheckboxes(); |
948 |
$("#bookbag_form").checkCheckboxes(); |
908 |
enableCheckboxActions(); |
949 |
enableCheckboxActions(); |
|
|
950 |
$("#bookbag_form").find("input[type='checkbox'][name='biblionumber']").each(function(){ |
951 |
$(this).change(); |
952 |
} ); |
909 |
return false; |
953 |
return false; |
910 |
}); |
954 |
}); |
911 |
$("#CheckNone").click(function(){ |
955 |
$("#CheckNone").click(function(){ |
912 |
$("#bookbag_form").unCheckCheckboxes(); |
956 |
$("#bookbag_form").unCheckCheckboxes(); |
913 |
enableCheckboxActions(); |
957 |
enableCheckboxActions(); |
|
|
958 |
$("#bookbag_form").find("input[type='checkbox'][name='biblionumber']").each(function(){ |
959 |
$(this).change(); |
960 |
} ); |
914 |
return false; |
961 |
return false; |
915 |
}); |
962 |
}); |
916 |
|
963 |
|