Bug 8942: Translation process breaks javascript
Signed-off-by: Owen Leonard <oleonard@myacpl.org> I tested most scripts affected by this patch and visually verified all changes. Functionality is unaffected. Signed-off-by: Mason James <mtj@kohaaloha.com> Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This commit is contained in:
parent
6e13cc1aad
commit
714075d5c1
31 changed files with 94 additions and 86 deletions
|
@ -25,18 +25,18 @@ function Date_from_syspref(dstring) {
|
||||||
jQueryUI we expose the localization strings in the default configuration */
|
jQueryUI we expose the localization strings in the default configuration */
|
||||||
jQuery(function($){
|
jQuery(function($){
|
||||||
$.datepicker.regional[''] = {
|
$.datepicker.regional[''] = {
|
||||||
closeText: _('Done'),
|
closeText: _("Done"),
|
||||||
prevText: _('Prev'),
|
prevText: _("Prev"),
|
||||||
nextText: _('Next'),
|
nextText: _("Next"),
|
||||||
currentText: _('Today'),
|
currentText: _("Today"),
|
||||||
monthNames: [_('January'),_('February'),_('March'),_('April'),_('May'),_('June'),
|
monthNames: [_("January"),_("February"),_("March"),_("April"),_("May"),_("June"),
|
||||||
_('July'),_('August'),_('September'),_('October'),_('November'),_('December')],
|
_("July"),_("August"),_("September"),_("October"),_("November"),_("December")],
|
||||||
monthNamesShort: [_('Jan'), _('Feb'), _('Mar'), _('Apr'), _('May'), _('Jun'),
|
monthNamesShort: [_("Jan"), _("Feb"), _("Mar"), _("Apr"), _("May"), _("Jun"),
|
||||||
_('Jul'), _('Aug'), _('Sep'), _('Oct'), _('Nov'), _('Dec')],
|
_("Jul"), _("Aug"), _("Sep"), _("Oct"), _("Nov"), _("Dec")],
|
||||||
dayNames: [_('Sunday'), _('Monday'), _('Tuesday'), _('Wednesday'), _('Thursday'), _('Friday'), _('Saturday')],
|
dayNames: [_("Sunday"), _("Monday"), _("Tuesday"), _("Wednesday"), _("Thursday"), _("Friday"), _("Saturday")],
|
||||||
dayNamesShort: [_('Sun'), _('Mon'), _('Tue'), _('Wed'), _('Thu'), _('Fri'), _('Sat')],
|
dayNamesShort: [_("Sun"), _("Mon"), _("Tue"), _("Wed"), _("Thu"), _("Fri"), _("Sat")],
|
||||||
dayNamesMin: [_('Su'),_('Mo'),_('Tu'),_('We'),_('Th'),_('Fr'),_('Sa')],
|
dayNamesMin: [_("Su"),_("Mo"),_("Tu"),_("We"),_("Th"),_("Fr"),_("Sa")],
|
||||||
weekHeader: _('Wk'),
|
weekHeader: _("Wk"),
|
||||||
dateFormat: '[% IF ( dateformat_us ) %]mm/dd/yy[% ELSIF ( dateformat_metric ) %]dd/mm/yy[% ELSE %]yy-mm-dd[% END %]',
|
dateFormat: '[% IF ( dateformat_us ) %]mm/dd/yy[% ELSIF ( dateformat_metric ) %]dd/mm/yy[% ELSE %]yy-mm-dd[% END %]',
|
||||||
firstDay: [% CalendarFirstDayOfWeek %],
|
firstDay: [% CalendarFirstDayOfWeek %],
|
||||||
isRTL: [% IF ( bidi ) %]true[% ELSE %]false[% END %],
|
isRTL: [% IF ( bidi ) %]true[% ELSE %]false[% END %],
|
||||||
|
|
|
@ -31,7 +31,7 @@ function confirm_deletion() {
|
||||||
if (count>0){
|
if (count>0){
|
||||||
is_confirmed= alert(_('There are [ '+ count +' ] item(s) attached to this record \n You must delete all items before deleting this record.'));
|
is_confirmed= alert(_('There are [ '+ count +' ] item(s) attached to this record \n You must delete all items before deleting this record.'));
|
||||||
} else{
|
} else{
|
||||||
is_confirmed= confirm(_('Are you sure you want to delete this record? '));
|
is_confirmed= confirm(_("Are you sure you want to delete this record? "));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_confirmed) {
|
if (is_confirmed) {
|
||||||
|
|
|
@ -3,14 +3,14 @@
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
[% IF ( CAN_user_borrowers ) %]
|
[% IF ( CAN_user_borrowers ) %]
|
||||||
function confirm_deletion() {
|
function confirm_deletion() {
|
||||||
var is_confirmed = window.confirm(_('Are you sure you want to delete this patron? This cannot be undone.'));
|
var is_confirmed = window.confirm(_("Are you sure you want to delete this patron? This cannot be undone."));
|
||||||
if (is_confirmed) {
|
if (is_confirmed) {
|
||||||
window.location='/cgi-bin/koha/members/deletemem.pl?member=[% borrowernumber %]';
|
window.location='/cgi-bin/koha/members/deletemem.pl?member=[% borrowernumber %]';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[% IF ( is_child ) %]function confirm_updatechild() {
|
[% IF ( is_child ) %]function confirm_updatechild() {
|
||||||
var is_confirmed = window.confirm(_('Are you sure you want to update this child to an Adult category? This cannot be undone.'));
|
var is_confirmed = window.confirm(_("Are you sure you want to update this child to an Adult category? This cannot be undone."));
|
||||||
if (is_confirmed) {
|
if (is_confirmed) {
|
||||||
window.location='/cgi-bin/koha/members/update-child.pl?op=update&borrowernumber=[% borrowernumber %]&catcode=[% catcode %]&catcode_multi=[% CATCODE_MULTI %]';
|
window.location='/cgi-bin/koha/members/update-child.pl?op=update&borrowernumber=[% borrowernumber %]&catcode=[% catcode %]&catcode_multi=[% CATCODE_MULTI %]';
|
||||||
}
|
}
|
||||||
|
|
|
@ -384,7 +384,7 @@ function closeandprint(bg){
|
||||||
if(document.location = '/cgi-bin/koha/acqui/basketgroup.pl?op=closeandprint&basketgroupid=' + bg ){
|
if(document.location = '/cgi-bin/koha/acqui/basketgroup.pl?op=closeandprint&basketgroupid=' + bg ){
|
||||||
setTimeout("window.location.reload();",3000);
|
setTimeout("window.location.reload();",3000);
|
||||||
}else{
|
}else{
|
||||||
alert(_('Error downloading the file'));
|
alert(_("Error downloading the file"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,24 +15,24 @@ KOHA.AJAX = {
|
||||||
KOHA.xhr = xhr;
|
KOHA.xhr = xhr;
|
||||||
if ( !xhr.getResponseHeader( 'content-type' ).match( 'application/json' ) ) {
|
if ( !xhr.getResponseHeader( 'content-type' ).match( 'application/json' ) ) {
|
||||||
// Something really failed
|
// Something really failed
|
||||||
humanMsg.displayAlert( MSG_INTERNAL_SERVER_ERROR );
|
humanMsg.displayAlert( _("Internal Server Error, please reload the page") );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var error = eval( '(' + xhr.responseText + ')' );
|
var error = eval( '(' + xhr.responseText + ')' );
|
||||||
|
|
||||||
if ( error.type == 'auth' ) {
|
if ( error.type == 'auth' ) {
|
||||||
humanMsg.displayMsg( MSG_SESSION_TIMED_OUT );
|
humanMsg.displayMsg( _("You need to log in again, your session has timed out") );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( callback ) {
|
if ( callback ) {
|
||||||
callback( error );
|
callback( error );
|
||||||
} else {
|
} else {
|
||||||
humanMsg.displayAlert( MSG_DATA_NOT_SAVED );
|
humanMsg.displayAlert( _("Error; your data might not have been saved") );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
MarkRunning: function ( selector, text ) {
|
MarkRunning: function ( selector, text ) {
|
||||||
text = text || MSG_LOADING;
|
text = text || _("Loading...");
|
||||||
$( selector )
|
$( selector )
|
||||||
.attr( 'disabled', 'disabled' )
|
.attr( 'disabled', 'disabled' )
|
||||||
.each( function () {
|
.each( function () {
|
||||||
|
|
|
@ -36,26 +36,26 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
function confirm_close() {
|
function confirm_close() {
|
||||||
var is_confirmed = confirm(_('Are you sure you want to close this basket?'));
|
var is_confirmed = confirm(_("Are you sure you want to close this basket?"));
|
||||||
if (is_confirmed) {
|
if (is_confirmed) {
|
||||||
window.location = "[% script_name %]?op=close&basketno=[% basketno %]";
|
window.location = "[% script_name %]?op=close&basketno=[% basketno %]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function confirm_deletion() {
|
function confirm_deletion() {
|
||||||
var is_confirmed = confirm(_('Are you sure you want to delete this basket?'));
|
var is_confirmed = confirm(_("Are you sure you want to delete this basket?"));
|
||||||
if (is_confirmed) {
|
if (is_confirmed) {
|
||||||
window.location = "[% script_name %]?op=delete_confirm&basketno=[% basketno %]&booksellerid=[% booksellerid %]";
|
window.location = "[% script_name %]?op=delete_confirm&basketno=[% basketno %]&booksellerid=[% booksellerid %]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function confirm_delete_item(ordernumber, biblionumber) {
|
function confirm_delete_item(ordernumber, biblionumber) {
|
||||||
var is_confirmed = confirm(_('Are you sure you want to delete this order ?'));
|
var is_confirmed = confirm(_("Are you sure you want to delete this order ?"));
|
||||||
if (is_confirmed) {
|
if (is_confirmed) {
|
||||||
window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber;
|
window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function confirm_delete_biblio(ordernumber, biblionumber) {
|
function confirm_delete_biblio(ordernumber, biblionumber) {
|
||||||
var is_confirmed = confirm(_('Are you sure you want to delete this catalog record and order ?'));
|
var is_confirmed = confirm(_("Are you sure you want to delete this catalog record and order ?"));
|
||||||
if (is_confirmed) {
|
if (is_confirmed) {
|
||||||
window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber+"&delbiblio=1";
|
window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber+"&delbiblio=1";
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
function confirm_reopen(skip) {
|
function confirm_reopen(skip) {
|
||||||
var is_confirmed = skip || confirm(_('Are you sure you want to reopen this basket?'));
|
var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?"));
|
||||||
if (is_confirmed) {
|
if (is_confirmed) {
|
||||||
window.location = "[% script_name %]?op=reopen&basketno=[% basketno %]";
|
window.location = "[% script_name %]?op=reopen&basketno=[% basketno %]";
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@ function Check(ff) {
|
||||||
|
|
||||||
[% IF (AcqCreateItemOrdering) %]
|
[% IF (AcqCreateItemOrdering) %]
|
||||||
if(check_additem('[% UniqueItemFields %]') == false) {
|
if(check_additem('[% UniqueItemFields %]') == false) {
|
||||||
alert(_('Duplicate values detected. Please correct the errors and resubmit.') );
|
alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
|
||||||
if(tobedeleted) {
|
if(tobedeleted) {
|
||||||
$(lastitemblock).appendTo('#outeritemblock');
|
$(lastitemblock).appendTo('#outeritemblock');
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,6 +62,14 @@ function IEEventHandler_KeyDown() {
|
||||||
if(tobedeleted){
|
if(tobedeleted){
|
||||||
$(lastitemblock).remove();
|
$(lastitemblock).remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(check_additem('[% UniqueItemFields %]') == false){
|
||||||
|
alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
|
||||||
|
if(tobedeleted) {
|
||||||
|
$(lastitemblock).appendTo("#outeritemblock");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -78,14 +78,14 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
function confirm_delete_item(ordernumber, basketno, biblionumber) {
|
function confirm_delete_item(ordernumber, basketno, biblionumber) {
|
||||||
var is_confirmed = confirm(_('Are you sure you want to delete this order ?'));
|
var is_confirmed = confirm(_("Are you sure you want to delete this order ?"));
|
||||||
if (is_confirmed) {
|
if (is_confirmed) {
|
||||||
window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno="+basketno+"&quantity=0&biblionumber="+biblionumber+"&invoiceid=[% invoiceid %]";
|
window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno="+basketno+"&quantity=0&biblionumber="+biblionumber+"&invoiceid=[% invoiceid %]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function confirm_delete_biblio(ordernumber, basketno, biblionumber) {
|
function confirm_delete_biblio(ordernumber, basketno, biblionumber) {
|
||||||
var is_confirmed = confirm(_('Are you sure you want to delete this catalog record and order ?'));
|
var is_confirmed = confirm(_("Are you sure you want to delete this catalog record and order ?"));
|
||||||
if (is_confirmed) {
|
if (is_confirmed) {
|
||||||
window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno="+basketno+"&quantity=0&biblionumber="+biblionumber+"&delbiblio=1&invoiceid=[% invoiceid %]";
|
window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno="+basketno+"&quantity=0&biblionumber="+biblionumber+"&delbiblio=1&invoiceid=[% invoiceid %]";
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,7 @@ $(document).ready(function() {
|
||||||
var filename = $(this).val();
|
var filename = $(this).val();
|
||||||
if ( ! /(?:\.csv|\.sql|\.ods|\.xml)$/.test(filename)) {
|
if ( ! /(?:\.csv|\.sql|\.ods|\.xml)$/.test(filename)) {
|
||||||
$(this).css("background-color","yellow");
|
$(this).css("background-color","yellow");
|
||||||
alert(_('Please select an ods or xml file'));
|
alert(_("Please select an ods or xml file"));
|
||||||
$(this).val("");
|
$(this).val("");
|
||||||
$(this).css("background-color","white");
|
$(this).css("background-color","white");
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ $(document).ready(function() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
obj.css("background-color","yellow");
|
obj.css("background-color","yellow");
|
||||||
alert(_('Please select an spreadsheet (csv, ods, xml) or sql file'));
|
alert(_("Please select an spreadsheet (csv, ods, xml) or sql file"));
|
||||||
obj.val("");
|
obj.val("");
|
||||||
obj.css("background-color","white");
|
obj.css("background-color","white");
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -42,10 +42,10 @@ var $branch = "[% branch %]";
|
||||||
$(function(){
|
$(function(){
|
||||||
$('#alerttabs').tabs();
|
$('#alerttabs').tabs();
|
||||||
|
|
||||||
var blocked = _('Blocked!');
|
var blocked = _("Blocked!");
|
||||||
var saving = _('Saving...');
|
var saving = _("Saving...");
|
||||||
var disabledForAll = _('Disabled for all');
|
var disabledForAll = _("Disabled for all");
|
||||||
var disabledForCurrent = _('Disabled for') + ' ' + $branch;
|
var disabledForCurrent = _("Disabled for") + ' ' + $branch;
|
||||||
|
|
||||||
$('#branch_selector input:submit').hide();
|
$('#branch_selector input:submit').hide();
|
||||||
$('#branch').change(function(){
|
$('#branch').change(function(){
|
||||||
|
|
|
@ -73,7 +73,7 @@ $(document).ready(function(){
|
||||||
}
|
}
|
||||||
// If the field is not repeatable, we check if it already exists in the result table
|
// If the field is not repeatable, we check if it already exists in the result table
|
||||||
if (canbeadded == false) {
|
if (canbeadded == false) {
|
||||||
alert(_('The field is non-repeatable and already exists in the destination record. Therefore, you cannot add it.'));
|
alert(_("The field is non-repeatable and already exists in the destination record. Therefore, you cannot add it."));
|
||||||
pField.checked = 0;
|
pField.checked = 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
return(document.layouts.action[selected[0]].value);
|
return(document.layouts.action[selected[0]].value);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
alert(_('Please select only one ')+'[% label_element %]'+_(' to')+op+'.');
|
alert(_("Please select only one ")+"[% label_element %]"+_(" to")+op+".");
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
return(document.layouts.action.value);
|
return(document.layouts.action.value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
alert(_('Please select a ')+'[% label_element %].');
|
alert(_("Please select a ")+"[% label_element %].");
|
||||||
return (-1);
|
return (-1);
|
||||||
};
|
};
|
||||||
//]]>
|
//]]>
|
||||||
|
|
|
@ -39,14 +39,14 @@ $(document).ready(function() {
|
||||||
[% IF ( picture ) %]
|
[% IF ( picture ) %]
|
||||||
// new YAHOO.widget.Button("delpicture"); // FIXME: formatting mismatch between YUI and normal button
|
// new YAHOO.widget.Button("delpicture"); // FIXME: formatting mismatch between YUI and normal button
|
||||||
$('#delpicture').click(function(){
|
$('#delpicture').click(function(){
|
||||||
return confirm(_('Are you sure you want to delete this patron image? This cannot be undone.'));
|
return confirm(_("Are you sure you want to delete this patron image? This cannot be undone."));
|
||||||
});
|
});
|
||||||
$('#manage-patron-image').find("input[value*=Upload]").click(function(){
|
$('#manage-patron-image').find("input[value*=Upload]").click(function(){
|
||||||
if($("#uploadfile").val() == ""){
|
if($("#uploadfile").val() == ""){
|
||||||
alert(_("Please choose a file to upload"));
|
alert(_("Please choose a file to upload"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return confirm(_('Are you sure you want to replace the current patron image? This cannot be undone.'));
|
return confirm(_("Are you sure you want to replace the current patron image? This cannot be undone."));
|
||||||
});[% END %]
|
});[% END %]
|
||||||
$("#renew_all" ).click(function(){ $(".checkboxed").checkCheckboxes(":input[name*=items]" ); $(".checkboxed").unCheckCheckboxes(":input[name*=barcodes]"); });
|
$("#renew_all" ).click(function(){ $(".checkboxed").checkCheckboxes(":input[name*=items]" ); $(".checkboxed").unCheckCheckboxes(":input[name*=barcodes]"); });
|
||||||
$("#CheckAllitems" ).click(function(){ $(".checkboxed").checkCheckboxes(":input[name*=items]" ); $(".checkboxed").unCheckCheckboxes(":input[name*=barcodes]"); return false; });
|
$("#CheckAllitems" ).click(function(){ $(".checkboxed").checkCheckboxes(":input[name*=items]" ); $(".checkboxed").unCheckCheckboxes(":input[name*=barcodes]"); return false; });
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
$("span.clearall").html("<a id=\"CheckNone\" href=\"/cgi-bin/koha/offline_circ/list.pl\">"+_('Uncheck all')+"<\/a>");
|
$("span.clearall").html("<a id=\"CheckNone\" href=\"/cgi-bin/koha/offline_circ/list.pl\">"+_("Uncheck all")+"<\/a>");
|
||||||
$("span.checkall").html("<a id=\"CheckAll\" href=\"/cgi-bin/koha/offline_circ/list.pl\">"+_('Check all')+"<\/a>");
|
$("span.checkall").html("<a id=\"CheckAll\" href=\"/cgi-bin/koha/offline_circ/list.pl\">"+_("Check all")+"<\/a>");
|
||||||
$('#CheckNone').click(function() {
|
$('#CheckNone').click(function() {
|
||||||
$("#operations").unCheckCheckboxes();
|
$("#operations").unCheckCheckboxes();
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -18,7 +18,7 @@ function CheckUpload(f){
|
||||||
}
|
}
|
||||||
function CheckForm(f) {
|
function CheckForm(f) {
|
||||||
if (f.uploadedfileid.value == '') {
|
if (f.uploadedfileid.value == '') {
|
||||||
alert(_('Please upload a file first.'));
|
alert(_("Please upload a file first."));
|
||||||
} else {
|
} else {
|
||||||
$("#fileuploadstatus").hide();
|
$("#fileuploadstatus").hide();
|
||||||
$("#fileuploadform").slideUp();
|
$("#fileuploadform").slideUp();
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (batches.length < 1) {
|
if (batches.length < 1) {
|
||||||
alert(_('Please select at least one batch to export.'));
|
alert(_("Please select at least one batch to export."));
|
||||||
return; // no batch selected
|
return; // no batch selected
|
||||||
}
|
}
|
||||||
getstr = batches.join("&");
|
getstr = batches.join("&");
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
getstr = "batch_id="+document.layouts.action.value;
|
getstr = "batch_id="+document.layouts.action.value;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
alert(_('Please select at least one batch to export.'));
|
alert(_("Please select at least one batch to export."));
|
||||||
return; // no batch selected
|
return; // no batch selected
|
||||||
}
|
}
|
||||||
return GB_showCenter('Export Patron Cards', "/cgi-bin/koha/patroncards/print.pl?" + getstr, 700, 800);
|
return GB_showCenter('Export Patron Cards', "/cgi-bin/koha/patroncards/print.pl?" + getstr, 700, 800);
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
return(document.layouts.action[selected[0]].value);
|
return(document.layouts.action[selected[0]].value);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
alert(_('Please select only one ')+'[% card_element %]'+_(' to ') + op + '.');
|
alert(_("Please select only one ")+"[% card_element %]"+_(" to ") + op + ".");
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
return(document.layouts.action.value);
|
return(document.layouts.action.value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
alert(_('Please select a ')+'[% card_element %].');
|
alert(_("Please select a ")+"[% card_element %].");
|
||||||
return (-1);
|
return (-1);
|
||||||
};
|
};
|
||||||
//]]>
|
//]]>
|
||||||
|
|
|
@ -97,16 +97,16 @@ function checkMultiHold() {
|
||||||
var msg = '';
|
var msg = '';
|
||||||
|
|
||||||
switch (override_items[itemnumber].holdallowed) {
|
switch (override_items[itemnumber].holdallowed) {
|
||||||
case 0: msg = _( 'This item normally cannot be put on hold.' ); break;
|
case 0: msg = _("This item normally cannot be put on hold."); break;
|
||||||
case 1: msg = _( 'This item normally cannot be put on hold except for patrons from ' ) + override_items[itemnumber].homebranch + '.'; break;
|
case 1: msg = _("This item normally cannot be put on hold except for patrons from ") + override_items[itemnumber].homebranch + "."; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
msg += "\n\n" + _( 'Place hold on this item?' );
|
msg += "\n\n" + _("Place hold on this item?");
|
||||||
|
|
||||||
return confirm(msg);
|
return confirm(msg);
|
||||||
});
|
});
|
||||||
$("input.warning").click(function() {
|
$("input.warning").click(function() {
|
||||||
return confirm( _( 'None of these items can normally be put on hold for this patron.' ) + "\n\n" + _( 'Place hold?' ) );
|
return confirm( _("None of these items can normally be put on hold for this patron.") + "\n\n" + _("Place hold?") );
|
||||||
});
|
});
|
||||||
$("#requestany").click(function() {
|
$("#requestany").click(function() {
|
||||||
if(this.checked){
|
if(this.checked){
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
var selected = $("input:checked");
|
var selected = $("input:checked");
|
||||||
|
|
||||||
if (selected.length == 0) {
|
if (selected.length == 0) {
|
||||||
alert(_('Please select at least one item to export.'));
|
alert(_("Please select at least one item to export."));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
// Checks if the form can be sent (at least one checkbox must be checked)
|
// Checks if the form can be sent (at least one checkbox must be checked)
|
||||||
function checkForm() {
|
function checkForm() {
|
||||||
if ($("input:checked").length == 0) {
|
if ($("input:checked").length == 0) {
|
||||||
alert(_('Please select at least one item.'));
|
alert(_("Please select at least one item."));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -97,13 +97,13 @@
|
||||||
|
|
||||||
// Checks if the beginning date is valid
|
// Checks if the beginning date is valid
|
||||||
if (!parseInt(beginDate)) {
|
if (!parseInt(beginDate)) {
|
||||||
alert(_('The beginning date is missing or invalid.'));
|
alert(_("The beginning date is missing or invalid."));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checks if the ending date is valid
|
// Checks if the ending date is valid
|
||||||
if (!parseInt(endDate)) {
|
if (!parseInt(endDate)) {
|
||||||
alert(_('The ending date is missing or invalid.'));
|
alert(_("The ending date is missing or invalid."));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,13 +48,13 @@ td input,td input[type="submit"] { font-size: 85%; padding: 1px; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var success_approve = function(tag){
|
var success_approve = function(tag){
|
||||||
// window.alert(_('AJAX approved tag: ') + tag);
|
// window.alert(_("AJAX approved tag: ") + tag);
|
||||||
};
|
};
|
||||||
var failure_approve = function(tag){
|
var failure_approve = function(tag){
|
||||||
window.alert(_("AJAX failed to approve tag: ") + tag);
|
window.alert(_("AJAX failed to approve tag: ") + tag);
|
||||||
};
|
};
|
||||||
var success_reject = function(tag){
|
var success_reject = function(tag){
|
||||||
// window.alert(_('AJAX rejected tag: ') + tag);
|
// window.alert(_("AJAX rejected tag: ") + tag);
|
||||||
};
|
};
|
||||||
var failure_reject = function(tag){
|
var failure_reject = function(tag){
|
||||||
window.alert(_("AJAX failed to reject tag: ") + tag);
|
window.alert(_("AJAX failed to reject tag: ") + tag);
|
||||||
|
|
|
@ -56,16 +56,16 @@
|
||||||
$('#showHolidayType').val(holidayType);
|
$('#showHolidayType').val(holidayType);
|
||||||
|
|
||||||
if (holidayType == 'exception') {
|
if (holidayType == 'exception') {
|
||||||
$("#showOperationDelLabel").html(_('Delete this exception.'));
|
$("#showOperationDelLabel").html(_("Delete this exception."));
|
||||||
$("#holtype").attr("class","key exception").html(_("Holiday exception"));
|
$("#holtype").attr("class","key exception").html(_("Holiday exception"));
|
||||||
} else if(holidayType == 'weekday') {
|
} else if(holidayType == 'weekday') {
|
||||||
$("#showOperationDelLabel").html(_('Delete this holiday.'));
|
$("#showOperationDelLabel").html(_("Delete this holiday."));
|
||||||
$("#holtype").attr("class","key repeatableweekly").html(_("Holiday repeating weekly"));
|
$("#holtype").attr("class","key repeatableweekly").html(_("Holiday repeating weekly"));
|
||||||
} else if(holidayType == 'daymonth') {
|
} else if(holidayType == 'daymonth') {
|
||||||
$("#showOperationDelLabel").html(_('Delete this holiday.'));
|
$("#showOperationDelLabel").html(_("Delete this holiday."));
|
||||||
$("#holtype").attr("class","key repeatableyearly").html(_("Holiday repeating yearly"));
|
$("#holtype").attr("class","key repeatableyearly").html(_("Holiday repeating yearly"));
|
||||||
} else {
|
} else {
|
||||||
$("#showOperationDelLabel").html(_('Delete this holiday.'));
|
$("#showOperationDelLabel").html(_("Delete this holiday."));
|
||||||
$("#holtype").attr("class","key holiday").html(_("Unique holiday"));
|
$("#holtype").attr("class","key holiday").html(_("Unique holiday"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -237,12 +237,12 @@
|
||||||
var fileSizeInK = Math.round(evt.target.files[0].size/1024);
|
var fileSizeInK = Math.round(evt.target.files[0].size/1024);
|
||||||
|
|
||||||
if (!fileType.match(/comma-separated-values|csv|excel/i)) {
|
if (!fileType.match(/comma-separated-values|csv|excel/i)) {
|
||||||
alert(_('Uploads limited to csv. Incorrect filetype: ')+fileType);
|
alert(_("Uploads limited to csv. Incorrect filetype: ")+fileType);
|
||||||
parent.location='quotes-upload.pl';
|
parent.location='quotes-upload.pl';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (fileSizeInK > 512) {
|
if (fileSizeInK > 512) {
|
||||||
if (!confirm(evt.target.files[0].name+' '+fileSizeInK+_(' KB Do you really want to upload this file?'))) {
|
if (!confirm(evt.target.files[0].name+' '+fileSizeInK+_(" KB Do you really want to upload this file?"))) {
|
||||||
parent.location='quotes-upload.pl';
|
parent.location='quotes-upload.pl';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -268,11 +268,11 @@
|
||||||
success : function(){
|
success : function(){
|
||||||
var response = JSON.parse(jqXHR.responseText);
|
var response = JSON.parse(jqXHR.responseText);
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
alert(response.records+_(' quotes saved.'));
|
alert(response.records+_(" quotes saved."));
|
||||||
window.location.reload(true); // is this the best route?
|
window.location.reload(true); // is this the best route?
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
alert(response.records+_(' quotes saved, but an error has occurred. Please ask your administrator to check the server log for more details.'));
|
alert(response.records+_(" quotes saved, but an error has occurred. Please ask your administrator to check the server log for more details."));
|
||||||
window.location.reload(true); // is this the best route?
|
window.location.reload(true); // is this the best route?
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -284,9 +284,9 @@
|
||||||
return this.id;
|
return this.id;
|
||||||
}).get().join(', ');
|
}).get().join(', ');
|
||||||
if (!idsToDelete) {
|
if (!idsToDelete) {
|
||||||
alert(_('Please select a quote(s) by clicking the quote id(s) you desire to delete.'));
|
alert(_("Please select a quote(s) by clicking the quote id(s) you desire to delete."));
|
||||||
}
|
}
|
||||||
else if (confirm(_('Are you sure you wish to delete quote(s) ')+idsToDelete+'?')) {
|
else if (confirm(_("Are you sure you wish to delete quote(s) ")+idsToDelete+"?")) {
|
||||||
oTable.$('.selected').each(function(){
|
oTable.$('.selected').each(function(){
|
||||||
oTable.fnDeleteRow(this);
|
oTable.fnDeleteRow(this);
|
||||||
});
|
});
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
//<![CDATA[
|
//<![CDATA[
|
||||||
var oTable; /* oTable needs to be global */
|
var oTable; /* oTable needs to be global */
|
||||||
var sEmptyTable = _('No quotes available. Please use the "Add quote" button to add a quote.'); /* override the default message in datatables-strings.inc */
|
var sEmptyTable = _("No quotes available. Please use the \"Add quote\" button to add a quote."); /* override the default message in datatables-strings.inc */
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
/* NOTE: This is an ajax-source datatable and *not* a server-side sourced datatable. */
|
/* NOTE: This is an ajax-source datatable and *not* a server-side sourced datatable. */
|
||||||
/* See the datatable docs if you don't understand this difference. */
|
/* See the datatable docs if you don't understand this difference. */
|
||||||
|
@ -116,11 +116,11 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
alert(_('Please supply both the text and source of the quote before saving.'));
|
alert(_("Please supply both the text and source of the quote before saving."));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (e.keyCode == 27) {
|
else if (e.keyCode == 27) {
|
||||||
if (confirm(_('Are you sure you want to cancel adding this quote?'))) {
|
if (confirm(_("Are you sure you want to cancel adding this quote?"))) {
|
||||||
oTable.fnDeleteRow(node);
|
oTable.fnDeleteRow(node);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -149,9 +149,9 @@
|
||||||
return this.id;
|
return this.id;
|
||||||
}).get().join(', ');
|
}).get().join(', ');
|
||||||
if (!idsToDelete) {
|
if (!idsToDelete) {
|
||||||
alert(_('Please select a quote(s) by clicking the quote id(s) you desire to delete.'));
|
alert(_("Please select a quote(s) by clicking the quote id(s) you desire to delete."));
|
||||||
}
|
}
|
||||||
else if (confirm(_('Are you sure you wish to delete quote(s) ')+idsToDelete+'?')) {
|
else if (confirm(_("Are you sure you wish to delete quote(s) ")+idsToDelete+"?")) {
|
||||||
oTable.$('.selected').each(function(){
|
oTable.$('.selected').each(function(){
|
||||||
var quoteID = $(this).attr('id');
|
var quoteID = $(this).attr('id');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
|
@ -21,7 +21,7 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
function CheckForm(f) {
|
function CheckForm(f) {
|
||||||
if ($("#fileToUpload").value == '') {
|
if ($("#fileToUpload").value == '') {
|
||||||
alert(_('Please upload a file first.'));
|
alert(_("Please upload a file first."));
|
||||||
} else {
|
} else {
|
||||||
return submitBackgroundJob(f);
|
return submitBackgroundJob(f);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ $(document).ready(function(){
|
||||||
});
|
});
|
||||||
function CheckForm(f) {
|
function CheckForm(f) {
|
||||||
if ($("#fileToUpload").value == '') {
|
if ($("#fileToUpload").value == '') {
|
||||||
alert(_('Please upload a file first.'));
|
alert(_("Please upload a file first."));
|
||||||
} else {
|
} else {
|
||||||
return submitBackgroundJob(f);
|
return submitBackgroundJob(f);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,8 +9,8 @@ var MSG_NO_ITEM_SELECTED = _("Nothing is selected.");
|
||||||
|
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$("#addbarcode").focus();
|
$("#addbarcode").focus();
|
||||||
$("span.clearall").html("<a id=\"CheckNone\" href=\"/cgi-bin/koha/shelves.pl\">"+_('Clear all')+"<\/a>");
|
$("span.clearall").html("<a id=\"CheckNone\" href=\"/cgi-bin/koha/shelves.pl\">"+_("Clear all")+"<\/a>");
|
||||||
$("span.checkall").html("<a id=\"CheckAll\" href=\"/cgi-bin/koha/shelves.pl\">"+_('Select all')+"<\/a>");
|
$("span.checkall").html("<a id=\"CheckAll\" href=\"/cgi-bin/koha/shelves.pl\">"+_("Select all")+"<\/a>");
|
||||||
$("#CheckAll").click(function(){
|
$("#CheckAll").click(function(){
|
||||||
$(".checkboxed").checkCheckboxes();
|
$(".checkboxed").checkCheckboxes();
|
||||||
return false;
|
return false;
|
||||||
|
@ -37,7 +37,7 @@ $(document).ready(function(){
|
||||||
var checkboxes = $("input:checkbox:checked");
|
var checkboxes = $("input:checkbox:checked");
|
||||||
var nbCheckbox = checkboxes.length;
|
var nbCheckbox = checkboxes.length;
|
||||||
if (nbCheckbox != 2) {
|
if (nbCheckbox != 2) {
|
||||||
alert(_('Two records must be selected for merging.'));
|
alert(_("Two records must be selected for merging."));
|
||||||
} else {
|
} else {
|
||||||
location.href='/cgi-bin/koha/cataloguing/merge.pl?biblionumber=' + checkboxes[0].value + '&biblionumber=' + checkboxes[1].value;
|
location.href='/cgi-bin/koha/cataloguing/merge.pl?biblionumber=' + checkboxes[0].value + '&biblionumber=' + checkboxes[1].value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,12 +40,12 @@ $(document).ready(function(){
|
||||||
var shelfnumber = $("#addto").find("option:selected").attr("id").replace("s","");
|
var shelfnumber = $("#addto").find("option:selected").attr("id").replace("s","");
|
||||||
[% IF ( loggedinusername ) %]if (vShelfAdd()) {
|
[% IF ( loggedinusername ) %]if (vShelfAdd()) {
|
||||||
Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?selectedshelf='+shelfnumber+'&' + vShelfAdd());
|
Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?selectedshelf='+shelfnumber+'&' + vShelfAdd());
|
||||||
}[% ELSE %] alert(_('You must be logged in to create or add to Lists')); [% END %]
|
}[% ELSE %] alert(_("You must be logged in to create or add to Lists")); [% END %]
|
||||||
return false;
|
return false;
|
||||||
} else if($("#addto").find("option:selected").attr("value") == "newlist"){
|
} else if($("#addto").find("option:selected").attr("value") == "newlist"){
|
||||||
[% IF ( loggedinusername ) %]if (vShelfAdd()) {
|
[% IF ( loggedinusername ) %]if (vShelfAdd()) {
|
||||||
Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?newshelf=1&' + vShelfAdd());
|
Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?newshelf=1&' + vShelfAdd());
|
||||||
}[% ELSE %] alert(_('You must be logged in to create or add to Lists')); [% END %]
|
}[% ELSE %] alert(_("You must be logged in to create or add to Lists")); [% END %]
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if($("#addto").find("option:selected").attr("value") == "addtocart"){
|
if($("#addto").find("option:selected").attr("value") == "addtocart"){
|
||||||
|
|
|
@ -178,12 +178,12 @@ $(document).ready(function(){
|
||||||
} else if($("#addto").find("option:selected").attr("value") == "newlist"){
|
} else if($("#addto").find("option:selected").attr("value") == "newlist"){
|
||||||
[% IF ( loggedinusername ) %]if (vShelfAdd()) {
|
[% IF ( loggedinusername ) %]if (vShelfAdd()) {
|
||||||
Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?newshelf=1&' + vShelfAdd());
|
Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?newshelf=1&' + vShelfAdd());
|
||||||
}[% ELSE %] alert(_('You must be logged in to create or add to lists')); [% END %]
|
}[% ELSE %] alert(_("You must be logged in to create or add to lists")); [% END %]
|
||||||
return false;
|
return false;
|
||||||
} else if($("#addto").find("option:selected").attr("value") == "morelists"){
|
} else if($("#addto").find("option:selected").attr("value") == "morelists"){
|
||||||
[% IF ( loggedinusername ) %]if (vShelfAdd()) {
|
[% IF ( loggedinusername ) %]if (vShelfAdd()) {
|
||||||
Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?' + vShelfAdd());
|
Dopop('/cgi-bin/koha/opac-addbybiblionumber.pl?' + vShelfAdd());
|
||||||
}[% ELSE %] alert(_('You must be logged in to create or add to lists')); [% END %]
|
}[% ELSE %] alert(_("You must be logged in to create or add to lists")); [% END %]
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if($("#addto").find("option:selected").attr("value") == "addtocart" || $("#addto").attr("class") == "addtocart"){
|
if($("#addto").find("option:selected").attr("value") == "addtocart" || $("#addto").attr("class") == "addtocart"){
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
var inject_old = function(comment) {
|
var inject_old = function(comment) {
|
||||||
[% IF ( reviewid ) %]
|
[% IF ( reviewid ) %]
|
||||||
[% IF ( cgi_debug ) %]alert(_('injecting OLD comment: ')+comment);[% END %]
|
[% IF ( cgi_debug ) %]alert(_("injecting OLD comment: ")+comment);[% END %]
|
||||||
parent.opener.$('#c[% reviewid %] p').prev("small").prev("h5").html(_("Your edited comment (preview, pending approval)"));
|
parent.opener.$('#c[% reviewid %] p').prev("small").prev("h5").html(_("Your edited comment (preview, pending approval)"));
|
||||||
parent.opener.$('#c[% reviewid %] p').html(comment);
|
parent.opener.$('#c[% reviewid %] p').html(comment);
|
||||||
parent.opener.$('#c[% reviewid %] p').append(" <a href=\"#comment\" onclick=\"Dopop(\'/cgi-bin/koha/opac-review.pl?biblionumber=[% biblionumber | uri %]&reviewid=[% reviewid | uri%]\');\">"+_("Edit")+"<\/a>");
|
parent.opener.$('#c[% reviewid %] p').append(" <a href=\"#comment\" onclick=\"Dopop(\'/cgi-bin/koha/opac-review.pl?biblionumber=[% biblionumber | uri %]&reviewid=[% reviewid | uri%]\');\">"+_("Edit")+"<\/a>");
|
||||||
|
|
|
@ -82,11 +82,11 @@ function enableCheckboxActions(){
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
[% IF ( opacbookbag ) %]$(".addtocart").show();[% END %]
|
[% IF ( opacbookbag ) %]$(".addtocart").show();[% END %]
|
||||||
$("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_('Clear all')+"<\/a>");
|
$("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_("Clear all")+"<\/a>");
|
||||||
$("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_('Select all')+"<\/a>");
|
$("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_("Select all")+"<\/a>");
|
||||||
$("a.print").show();
|
$("a.print").show();
|
||||||
|
|
||||||
[% IF ( opacuserlogin ) %][% IF ( RequestOnOpac ) %]$("#placehold").html("<a href=\"#\" class=\"hold tag_hides disabled\">"+_('Place hold')+"<\/a>");
|
[% IF ( opacuserlogin ) %][% IF ( RequestOnOpac ) %]$("#placehold").html("<a href=\"#\" class=\"hold tag_hides disabled\">"+_("Place hold")+"<\/a>");
|
||||||
$("#selections-toolbar a.hold").click(function(){
|
$("#selections-toolbar a.hold").click(function(){
|
||||||
holdSelections();
|
holdSelections();
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -44,8 +44,8 @@ $.tablesorter.addParser({
|
||||||
[% END %]
|
[% END %]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
[% IF ( loggedinusername ) %]$("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_('Clear all')+"<\/a>");
|
[% IF ( loggedinusername ) %]$("span.clearall").html("<a id=\"CheckNone\" href=\"#\">"+_("Clear all")+"<\/a>");
|
||||||
$("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_('Select all')+"<\/a>");
|
$("span.checkall").html("<a id=\"CheckAll\" href=\"#\">"+_("Select all")+"<\/a>");
|
||||||
$("#CheckAll").click(function(){
|
$("#CheckAll").click(function(){
|
||||||
$(".checkboxed").checkCheckboxes();
|
$(".checkboxed").checkCheckboxes();
|
||||||
enableCheckboxActions();
|
enableCheckboxActions();
|
||||||
|
|
Loading…
Reference in a new issue