Lines 5-11
Link Here
|
5 |
[% USE ItemTypes %] |
5 |
[% USE ItemTypes %] |
6 |
[% USE AuthorisedValues %] |
6 |
[% USE AuthorisedValues %] |
7 |
[% USE ColumnsSettings %] |
7 |
[% USE ColumnsSettings %] |
8 |
|
8 |
[% SET footerjs = 1 %] |
9 |
[% BLOCK display_bormessagepref %] |
9 |
[% BLOCK display_bormessagepref %] |
10 |
[% IF ( bormessagepref ) %] |
10 |
[% IF ( bormessagepref ) %] |
11 |
<li>Patron notification: |
11 |
<li>Patron notification: |
Lines 33-161
Link Here
|
33 |
<title>Koha › Circulation › Check in [% title |html %]</title> |
33 |
<title>Koha › Circulation › Check in [% title |html %]</title> |
34 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> |
34 |
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" /> |
35 |
[% INCLUDE 'doc-head-close.inc' %] |
35 |
[% INCLUDE 'doc-head-close.inc' %] |
36 |
[% INCLUDE 'datatables.inc' %] |
|
|
37 |
[% INCLUDE 'columns_settings.inc' %] |
38 |
[% INCLUDE 'calendar.inc' %] |
39 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script> |
40 |
[% INCLUDE 'timepicker.inc' %] |
41 |
|
42 |
<script type="text/javascript"> |
43 |
//<![CDATA[ |
44 |
function Dopop(link) { |
45 |
var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top'); |
46 |
$("#barcode").focus(); |
47 |
} |
48 |
$(document).ready(function () { |
49 |
$(".modal").modal({ backdrop: 'static' }).on('shown', function() { |
50 |
$("#barcode").prop("disabled", true); |
51 |
}).on('hidden', function() { |
52 |
$("#barcode").prop("disabled", false).focus(); |
53 |
}); |
54 |
|
55 |
$(".modal").on('hidden.bs.modal', function (e) { $("#barcode").focus(); }); |
56 |
|
57 |
[% IF print_slip %] |
58 |
Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber %]&biblionumber=[% biblionumber %]'); |
59 |
[% END %] |
60 |
|
61 |
var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) %] |
62 |
var returns_table = KohaTable("#checkedintable", { |
63 |
"bFilter":false, |
64 |
"bPaginate":false, |
65 |
"bInfo":false, |
66 |
"bSort":false, |
67 |
"dom": 'B<"clearfix">t', |
68 |
}, columns_settings); |
69 |
|
70 |
$("#return_date_override").datetimepicker({ |
71 |
onClose: function(dateText, inst) { |
72 |
if (validate_date(dateText, inst) ) { |
73 |
$("#barcode").focus(); |
74 |
} |
75 |
}, |
76 |
defaultDate: -1, |
77 |
hour: 23, |
78 |
minute: 59, |
79 |
maxDate: 0 |
80 |
}).on("change", function(e, value) { |
81 |
if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");} |
82 |
}); |
83 |
$("#return_date_override").on("blur", function() { |
84 |
check_valid_return_date(); |
85 |
}); |
86 |
$("#checkin-form").submit(function( event ) { |
87 |
if ( !check_valid_return_date() ) { |
88 |
event.preventDefault(); |
89 |
} |
90 |
}); |
91 |
|
92 |
function check_valid_return_date() { |
93 |
if ( $("#return_date_override").val() ) { |
94 |
var datetime = DateTime_from_syspref( $("#return_date_override").val() ); |
95 |
var now = new Date(); |
96 |
if ( !datetime || datetime > now ) { |
97 |
alert("Invalid return date/time!"); |
98 |
$("#return_date_override").val("") |
99 |
return false; |
100 |
} |
101 |
} |
102 |
return true; |
103 |
} |
104 |
|
105 |
$("#exemptcheck").change(function () { |
106 |
if (this.checked == true) { |
107 |
$("#barcode").addClass("alert"); |
108 |
$("#exemptfines").show(); |
109 |
} else { |
110 |
$("#barcode").removeClass("alert"); |
111 |
$("#exemptfines").hide(); |
112 |
} |
113 |
$("#barcode").focus(); |
114 |
}); |
115 |
$("#dropboxcheck").change(function () { |
116 |
if (this.checked == true) { |
117 |
$("#barcode").addClass("alert"); |
118 |
$("#dropboxmode").show(); |
119 |
|
120 |
$("#return_date_override_fields :input").prop('disabled', true); |
121 |
$("#return_date_override").datetimepicker("disable"); |
122 |
} else { |
123 |
$("#barcode").removeClass("alert"); |
124 |
$("#dropboxmode").hide(); |
125 |
|
126 |
$("#return_date_override_fields :input").prop('disabled', false); |
127 |
$("#return_date_override").datetimepicker("enable"); |
128 |
} |
129 |
$("#barcode").focus(); |
130 |
}); |
131 |
$("#forgivemanualholdsexpire").change(function () { |
132 |
if (this.checked == true) { |
133 |
$("#barcode").addClass("alert"); |
134 |
$("#forgivemanualholdsexpire-alert").show(); |
135 |
} else { |
136 |
$("#barcode").removeClass("alert"); |
137 |
$("#forgivemanualholdsexpire-alert").hide(); |
138 |
} |
139 |
$("#barcode").focus(); |
140 |
}); |
141 |
[% IF(overduecharges) %] $("#barcode").focus(function () { |
142 |
if (($("#exemptcheck").prop("checked") == true) || ($("#dropboxcheck").prop("checked") == true)) { |
143 |
$("#barcode").addClass("alert"); |
144 |
} else { |
145 |
$("#barcode").removeClass("alert"); |
146 |
} |
147 |
}); |
148 |
$("#barcode").blur(function () { |
149 |
$("#barcode").removeClass("alert"); |
150 |
}); |
151 |
[% END %] |
152 |
$('.openWin').on("click",function(e){ |
153 |
Dopop( $(this).data("url") ); |
154 |
}); |
155 |
}); |
156 |
//]]> |
157 |
</script> |
158 |
</head> |
36 |
</head> |
|
|
37 |
|
159 |
<body id="circ_returns" class="circ"> |
38 |
<body id="circ_returns" class="circ"> |
160 |
<span class="audio-alert-success"></span> |
39 |
<span class="audio-alert-success"></span> |
161 |
|
40 |
|
Lines 809-812
$(document).ready(function () {
Link Here
|
809 |
</div> |
688 |
</div> |
810 |
</div> |
689 |
</div> |
811 |
</div> |
690 |
</div> |
|
|
691 |
|
692 |
[% MACRO jsinclude BLOCK %] |
693 |
[% INCLUDE 'datatables.inc' %] |
694 |
[% INCLUDE 'columns_settings.inc' %] |
695 |
[% INCLUDE 'calendar.inc' %] |
696 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script> |
697 |
[% INCLUDE 'timepicker.inc' %] |
698 |
|
699 |
<script type="text/javascript"> |
700 |
function Dopop(link) { |
701 |
var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top'); |
702 |
$("#barcode").focus(); |
703 |
} |
704 |
$(document).ready(function () { |
705 |
$(".modal").modal({ backdrop: 'static' }).on('shown', function() { |
706 |
$("#barcode").prop("disabled", true); |
707 |
}).on('hidden', function() { |
708 |
$("#barcode").prop("disabled", false).focus(); |
709 |
}); |
710 |
|
711 |
$(".modal").on('hidden.bs.modal', function (e) { $("#barcode").focus(); }); |
712 |
|
713 |
[% IF print_slip %] |
714 |
Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber %]&biblionumber=[% biblionumber %]'); |
715 |
[% END %] |
716 |
|
717 |
var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) %] |
718 |
var returns_table = KohaTable("#checkedintable", { |
719 |
"bFilter":false, |
720 |
"bPaginate":false, |
721 |
"bInfo":false, |
722 |
"bSort":false, |
723 |
"dom": 'B<"clearfix">t', |
724 |
}, columns_settings); |
725 |
|
726 |
$("#return_date_override").datetimepicker({ |
727 |
onClose: function(dateText, inst) { |
728 |
if (validate_date(dateText, inst) ) { |
729 |
$("#barcode").focus(); |
730 |
} |
731 |
}, |
732 |
defaultDate: -1, |
733 |
hour: 23, |
734 |
minute: 59, |
735 |
maxDate: 0 |
736 |
}).on("change", function(e, value) { |
737 |
if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");} |
738 |
}); |
739 |
$("#return_date_override").on("blur", function() { |
740 |
check_valid_return_date(); |
741 |
}); |
742 |
$("#checkin-form").submit(function( event ) { |
743 |
if ( !check_valid_return_date() ) { |
744 |
event.preventDefault(); |
745 |
} |
746 |
}); |
747 |
|
748 |
function check_valid_return_date() { |
749 |
if ( $("#return_date_override").val() ) { |
750 |
var datetime = DateTime_from_syspref( $("#return_date_override").val() ); |
751 |
var now = new Date(); |
752 |
if ( !datetime || datetime > now ) { |
753 |
alert("Invalid return date/time!"); |
754 |
$("#return_date_override").val("") |
755 |
return false; |
756 |
} |
757 |
} |
758 |
return true; |
759 |
} |
760 |
|
761 |
$("#exemptcheck").change(function () { |
762 |
if (this.checked == true) { |
763 |
$("#barcode").addClass("alert"); |
764 |
$("#exemptfines").show(); |
765 |
} else { |
766 |
$("#barcode").removeClass("alert"); |
767 |
$("#exemptfines").hide(); |
768 |
} |
769 |
$("#barcode").focus(); |
770 |
}); |
771 |
$("#dropboxcheck").change(function () { |
772 |
if (this.checked == true) { |
773 |
$("#barcode").addClass("alert"); |
774 |
$("#dropboxmode").show(); |
775 |
|
776 |
$("#return_date_override_fields :input").prop('disabled', true); |
777 |
$("#return_date_override").datetimepicker("disable"); |
778 |
} else { |
779 |
$("#barcode").removeClass("alert"); |
780 |
$("#dropboxmode").hide(); |
781 |
|
782 |
$("#return_date_override_fields :input").prop('disabled', false); |
783 |
$("#return_date_override").datetimepicker("enable"); |
784 |
} |
785 |
$("#barcode").focus(); |
786 |
}); |
787 |
$("#forgivemanualholdsexpire").change(function () { |
788 |
if (this.checked == true) { |
789 |
$("#barcode").addClass("alert"); |
790 |
$("#forgivemanualholdsexpire-alert").show(); |
791 |
} else { |
792 |
$("#barcode").removeClass("alert"); |
793 |
$("#forgivemanualholdsexpire-alert").hide(); |
794 |
} |
795 |
$("#barcode").focus(); |
796 |
}); |
797 |
|
798 |
[% IF(overduecharges) %] |
799 |
$("#barcode").focus(function () { |
800 |
if (($("#exemptcheck").prop("checked") == true) || ($("#dropboxcheck").prop("checked") == true)) { |
801 |
$("#barcode").addClass("alert"); |
802 |
} else { |
803 |
$("#barcode").removeClass("alert"); |
804 |
} |
805 |
}); |
806 |
$("#barcode").blur(function () { |
807 |
$("#barcode").removeClass("alert"); |
808 |
}); |
809 |
[% END %] |
810 |
|
811 |
$('.openWin').on("click",function(e){ |
812 |
Dopop( $(this).data("url") ); |
813 |
}); |
814 |
}); |
815 |
</script> |
816 |
[% END %] |
817 |
|
812 |
[% INCLUDE 'intranet-bottom.inc' %] |
818 |
[% INCLUDE 'intranet-bottom.inc' %] |