|
Lines 10-17
Link Here
|
| 10 |
[% IF ( UseTablesortForCirc ) %]<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>[% END %] |
10 |
[% IF ( UseTablesortForCirc ) %]<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>[% END %] |
| 11 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> |
11 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> |
| 12 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery-ui-timepicker-addon.js"></script> |
12 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery-ui-timepicker-addon.js"></script> |
|
|
13 |
<script type="text/javascript" src="[% themelang %]/js/pages/circulation.js"></script> |
| 13 |
<script type="text/javascript"> |
14 |
<script type="text/javascript"> |
| 14 |
//<![CDATA[ |
15 |
//<![CDATA[ |
|
|
16 |
var MSG_ADD_MESSAGE = _("Add a new message"); |
| 17 |
var MSG_EXPORT_SELECT_CHECKOUTS = _("You must select checkout(s) to export"); |
| 18 |
var MSG_EXPORT_DEFINE_CSV_FORMAT = _("You must define a CSV profile for export (in tools -> CSV export profiles) and fill the 'ExportWithCsvProfile' system preference"); |
| 15 |
[% IF ( borrowernumber ) %]if($.cookie("holdfor") != [% borrowernumber %]){ $.cookie("holdfor",null, { path: "/", expires: 0 }); }[% ELSE %]$.cookie("holdfor",null, { path: "/", expires: 0 });[% END %] |
19 |
[% IF ( borrowernumber ) %]if($.cookie("holdfor") != [% borrowernumber %]){ $.cookie("holdfor",null, { path: "/", expires: 0 }); }[% ELSE %]$.cookie("holdfor",null, { path: "/", expires: 0 });[% END %] |
| 16 |
[% IF ( UseTablesortForCirc ) %]$.tablesorter.addParser({ |
20 |
[% IF ( UseTablesortForCirc ) %]$.tablesorter.addParser({ |
| 17 |
id: 'articles', |
21 |
id: 'articles', |
|
Lines 61-116
Link Here
|
| 61 |
return printx_window('qslip'); } |
65 |
return printx_window('qslip'); } |
| 62 |
});[% END %] |
66 |
});[% END %] |
| 63 |
|
67 |
|
| 64 |
|
|
|
| 65 |
var allcheckboxes = $(".checkboxed"); |
| 66 |
$("#renew_all").click(function(){ |
| 67 |
$(allcheckboxes).checkCheckboxes(":input[name*=items]"); |
| 68 |
$(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]"); |
| 69 |
}); |
| 70 |
$("#CheckAllitems").click(function(){ |
| 71 |
$(allcheckboxes).checkCheckboxes(":input[name*=items]"); |
| 72 |
$(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]"); return false; |
| 73 |
}); |
| 74 |
$("#CheckNoitems").click(function(){ |
| 75 |
$(allcheckboxes).unCheckCheckboxes(":input[name*=items]"); return false; |
| 76 |
}); |
| 77 |
$("#CheckAllreturns").click(function(){ |
| 78 |
$(allcheckboxes).checkCheckboxes(":input[name*=barcodes]"); |
| 79 |
$(allcheckboxes).unCheckCheckboxes(":input[name*=items]"); return false; |
| 80 |
}); |
| 81 |
$("#CheckNoreturns" ).click(function(){ |
| 82 |
$(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]"); return false; |
| 83 |
}); |
| 84 |
|
| 85 |
$("#CheckAllexports").click(function(){ |
| 86 |
$(".checkboxed").checkCheckboxes(":input[name*=biblionumbers]"); |
| 87 |
$(".checkboxed").unCheckCheckboxes(":input[name*=items]"); |
| 88 |
return false; |
| 89 |
}); |
| 90 |
$("#CheckNoexports").click(function(){ |
| 91 |
$(".checkboxed").unCheckCheckboxes(":input[name*=biblionumbers]"); |
| 92 |
return false; |
| 93 |
}); |
| 94 |
|
| 95 |
$("#relrenew_all").click(function(){ |
| 96 |
$(allcheckboxes).checkCheckboxes(":input[name*=items]"); |
| 97 |
$(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]"); |
| 98 |
}); |
| 99 |
$("#relCheckAllitems").click(function(){ |
| 100 |
$(allcheckboxes).checkCheckboxes(":input[name*=items]"); |
| 101 |
$(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]"); return false; |
| 102 |
}); |
| 103 |
$("#relCheckNoitems").click(function(){ |
| 104 |
$(allcheckboxes).unCheckCheckboxes(":input[name*=items]"); return false; |
| 105 |
}); |
| 106 |
$("#relCheckAllreturns").click(function(){ |
| 107 |
$(allcheckboxes).checkCheckboxes(":input[name*=barcodes]"); |
| 108 |
$(allcheckboxes).unCheckCheckboxes(":input[name*=items]"); return false; |
| 109 |
}); |
| 110 |
$("#relCheckNoreturns").click(function(){ |
| 111 |
$(allcheckboxes).unCheckCheckboxes(":input[name*=barcodes]"); return false; |
| 112 |
}); |
| 113 |
|
| 114 |
[% IF ( CAN_user_circulate_override_renewals ) %] |
68 |
[% IF ( CAN_user_circulate_override_renewals ) %] |
| 115 |
[% IF ( AllowRenewalLimitOverride ) %] |
69 |
[% IF ( AllowRenewalLimitOverride ) %] |
| 116 |
$( '#override_limit' ).click( function () { |
70 |
$( '#override_limit' ).click( function () { |
|
Lines 122-223
var allcheckboxes = $(".checkboxed");
Link Here
|
| 122 |
} ).attr( 'checked', false ); |
76 |
} ).attr( 'checked', false ); |
| 123 |
[% END %] |
77 |
[% END %] |
| 124 |
[% END %] |
78 |
[% END %] |
| 125 |
// Clicking the table cell checks the checkbox inside it |
|
|
| 126 |
$("td").click(function(e){ |
| 127 |
if(e.target.tagName.toLowerCase() == 'td'){ |
| 128 |
$(this).find("input:checkbox:visible").each( function() { |
| 129 |
if($(this).attr("checked")){ |
| 130 |
$(this).removeAttr("checked"); |
| 131 |
} else { |
| 132 |
$(this).attr("checked","checked"); |
| 133 |
// radioCheckBox($(this)); |
| 134 |
} |
| 135 |
}); |
| 136 |
} |
| 137 |
}); |
| 138 |
// prevent adjacent checkboxes from being checked simultaneously |
| 139 |
function radioCheckBox(box){ |
| 140 |
box.parents("td").siblings().find("input:checkbox:visible").each(function(){ |
| 141 |
if($(this).attr("checked")){ |
| 142 |
$(this).removeAttr("checked"); |
| 143 |
} |
| 144 |
}); |
| 145 |
} |
| 146 |
|
| 147 |
$("#messages ul").after("<a href=\"#\" id=\"addmessage\">"+_("Add a new message")+"</a>"); |
| 148 |
$("#borrower_messages .cancel").click(function(){ |
| 149 |
$("#add_message_form").hide(); |
| 150 |
$("#addmessage").show(); |
| 151 |
}); |
| 152 |
$("#addmessage").click(function (){ |
| 153 |
$(this).hide(); |
| 154 |
$("#add_message_form").show(); |
| 155 |
}); |
| 156 |
|
| 157 |
$("input.radio").click(function(){ |
| 158 |
radioCheckBox($(this)); |
| 159 |
}); |
| 160 |
|
| 161 |
$("#newduedate").datetimepicker({ |
| 162 |
minDate: 1, // require that renewal date is after today |
| 163 |
hour: 23, |
| 164 |
minute: 59 |
| 165 |
}); |
| 166 |
$("#duedatespec").datetimepicker({ |
| 167 |
onClose: function(dateText, inst) { $("#barcode").focus(); }, |
| 168 |
hour: 23, |
| 169 |
minute: 59 |
| 170 |
}); |
| 171 |
$("#export_submit").click(function(){ |
| 172 |
var export_format = $("#export_formats").val(); |
| 173 |
export_checkouts(export_format); |
| 174 |
return false; |
| 175 |
}) |
| 176 |
}); |
79 |
}); |
| 177 |
|
|
|
| 178 |
function export_checkouts(format) { |
| 179 |
if ($("input:checkbox[name='biblionumbers'][checked]").length < 1){ |
| 180 |
alert(_("You must select a checkout to export")); |
| 181 |
return; |
| 182 |
} |
| 183 |
|
| 184 |
$("input:checkbox[name='biblionumbers']").each( function(){ |
| 185 |
var input_item = $(this).siblings("input:checkbox"); |
| 186 |
if ( $(this).is(":checked") ) { |
| 187 |
$(input_item).attr("checked", "checked"); |
| 188 |
} else { |
| 189 |
$(input_item).attr("checked", ""); |
| 190 |
} |
| 191 |
} ); |
| 192 |
|
| 193 |
if (format == 'iso2709_995') { |
| 194 |
format = 'iso2709'; |
| 195 |
$("#dont_export_item").val(0); |
| 196 |
} else if (format == 'iso2709') { |
| 197 |
$("#dont_export_item").val(1); |
| 198 |
} else { |
| 199 |
[% UNLESS ( export_with_csv_profile ) %] |
| 200 |
alert(_("You must define a csv profile for export (in tools>CSV export profiles) and fill the ExportWithCsvProfile system preference")); |
| 201 |
return false; |
| 202 |
[% END %] |
| 203 |
} |
| 204 |
document.issues.action="/cgi-bin/koha/tools/export.pl"; |
| 205 |
document.getElementById("export_format").value = format; |
| 206 |
document.issues.submit(); |
| 207 |
|
| 208 |
/* Reset form action to its initial value */ |
| 209 |
document.issues.action="/cgi-bin/koha/reserve/renewscript.pl"; |
| 210 |
|
| 211 |
}; |
| 212 |
|
| 213 |
function validate1(date) { |
| 214 |
var today = new Date(); |
| 215 |
if ( date < today ) { |
| 216 |
return true; |
| 217 |
} else { |
| 218 |
return false; |
| 219 |
} |
| 220 |
}; |
| 221 |
//]]> |
80 |
//]]> |
| 222 |
</script> |
81 |
</script> |
| 223 |
</head> |
82 |
</head> |
|
Lines 948-954
No patron matched <span class="ex">[% message %]</span>
Link Here
|
| 948 |
<select name="export_formats" id="export_formats"> |
807 |
<select name="export_formats" id="export_formats"> |
| 949 |
<option value="iso2709_995">ISO2709 with items</option> |
808 |
<option value="iso2709_995">ISO2709 with items</option> |
| 950 |
<option value="iso2709">ISO2709 without items</option> |
809 |
<option value="iso2709">ISO2709 without items</option> |
|
|
810 |
[% IF ( export_with_csv_profile ) %] |
| 951 |
<option value="csv">CSV</option> |
811 |
<option value="csv">CSV</option> |
|
|
812 |
[% ELSE %] |
| 813 |
<option value="">CSV</option> |
| 814 |
[% END %] |
| 952 |
</select> |
815 |
</select> |
| 953 |
<label for="export_remove_fields">Don't export fields:</label> <input type="text" id="export_remove_fields" name="export_remove_fields" value="[% export_remove_fields %]" title="Use for iso2709 exports" /> |
816 |
<label for="export_remove_fields">Don't export fields:</label> <input type="text" id="export_remove_fields" name="export_remove_fields" value="[% export_remove_fields %]" title="Use for iso2709 exports" /> |
| 954 |
<input type="hidden" name="op" value="export" /> |
817 |
<input type="hidden" name="op" value="export" /> |
| 955 |
- |
|
|