View | Details | Raw Unified | Return to bug 22490
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/js/authtype.js (-4 / +4 lines)
Lines 41-47 $(document).ready(function() { Link Here
41
        var filename = $(this).val();
41
        var filename = $(this).val();
42
        if ( ! /(?:\.csv|\.ods)$/.test(filename)) {
42
        if ( ! /(?:\.csv|\.ods)$/.test(filename)) {
43
            $(this).css("background-color","yellow");
43
            $(this).css("background-color","yellow");
44
            alert(_("Please select a CSV (.csv) or ODS (.ods) spreadsheet file."));
44
            alert(__("Please select a CSV (.csv) or ODS (.ods) spreadsheet file."));
45
            $(this).val("");
45
            $(this).val("");
46
            $(this).css("background-color","white");
46
            $(this).css("background-color","white");
47
        }
47
        }
Lines 56-64 $(document).ready(function() { Link Here
56
        var id = $(this).attr('id');
56
        var id = $(this).attr('id');
57
        var obj = $('#' + id + ' input:file');
57
        var obj = $('#' + id + ' input:file');
58
        if (/(?:\.csv|\.ods)$/.test(obj.val())) {
58
        if (/(?:\.csv|\.ods)$/.test(obj.val())) {
59
            if (confirm(_("Do you really want to import the authority type fields and subfields? This will overwrite the current configuration. For safety reasons please use the export option to make a backup"))) {
59
            if (confirm(__("Do you really want to import the authority type fields and subfields? This will overwrite the current configuration. For safety reasons please use the export option to make a backup"))) {
60
                var authtypecode = $('#' + id + ' input:hidden[name=authtypecode]').val();
60
                var authtypecode = $('#' + id + ' input:hidden[name=authtypecode]').val();
61
                $('#importing_' + authtypecode).find("span").html(_("Importing to authority type: %s. Importing from file: %s").format("<strong>" + authtypecode + "</strong>", "<i>" + obj.val().replace(new RegExp("^.+[/\\\\]"),"") + "</i>"));
61
                $('#importing_' + authtypecode).find("span").html(__("Importing to authority type: %s. Importing from file: %s").format("<strong>" + authtypecode + "</strong>", "<i>" + obj.val().replace(new RegExp("^.+[/\\\\]"),"") + "</i>"));
62
                if (navigator.userAgent.toLowerCase().indexOf('msie') != -1) {
62
                if (navigator.userAgent.toLowerCase().indexOf('msie') != -1) {
63
                    var timestamp = new Date().getTime();
63
                    var timestamp = new Date().getTime();
64
                    $('#importing_' + authtypecode).find("img").attr('src', '[% interface | html %]/[% theme | html %]/img/loading-small.gif' + '?' +timestamp);
64
                    $('#importing_' + authtypecode).find("img").attr('src', '[% interface | html %]/[% theme | html %]/img/loading-small.gif' + '?' +timestamp);
Lines 73-79 $(document).ready(function() { Link Here
73
            }
73
            }
74
        }
74
        }
75
        obj.css("background-color","yellow");
75
        obj.css("background-color","yellow");
76
        alert(_("Please select a CSV (.csv) or ODS (.ods) spreadsheet file."));
76
        alert(__("Please select a CSV (.csv) or ODS (.ods) spreadsheet file."));
77
        obj.val("");
77
        obj.val("");
78
        bj.css("background-color","white");
78
        bj.css("background-color","white");
79
        return false;
79
        return false;
(-)a/koha-tmpl/intranet-tmpl/prog/js/background-job-progressbar.js (-1 / +1 lines)
Lines 69-75 function submitBackgroundJob(f) { Link Here
69
                backgroundJobProgressTimer = setInterval("updateJobProgress()", 500);
69
                backgroundJobProgressTimer = setInterval("updateJobProgress()", 500);
70
            },
70
            },
71
            error: function(xml, textStatus) {
71
            error: function(xml, textStatus) {
72
                humanMsg.displayMsg( '<p>' + _('Import of record(s) failed: ') + textStatus + '</p></br>'+xml.responseText, { className: 'humanError' } );
72
                humanMsg.displayMsg( '<p>' + __('Import of record(s) failed: ') + textStatus + '</p></br>'+xml.responseText, { className: 'humanError' } );
73
            }
73
            }
74
74
75
        });
75
        });
(-)a/koha-tmpl/intranet-tmpl/prog/js/calendar.js (-1 / +1 lines)
Lines 114-120 function DateTime_from_syspref(date_time) { Link Here
114
        },
114
        },
115
        messages: {
115
        messages: {
116
            input_name_of_later_date_field: {
116
            input_name_of_later_date_field: {
117
                is_date_after: _("Validation error to be shown, i.e. End date must come after start date")
117
                is_date_after: __("Validation error to be shown, i.e. End date must come after start date")
118
            }
118
            }
119
        }
119
        }
120
    });
120
    });
(-)a/koha-tmpl/intranet-tmpl/prog/js/datatables.js (-1 / +1 lines)
Lines 875-881 jQuery.fn.dataTable.ext.errMode = function(settings, note, message) { Link Here
875
                        if ( existing_search ) {
875
                        if ( existing_search ) {
876
                            $(this).html( '<input type="text" value="%s" style="width: 100%" />'.format(existing_search) );
876
                            $(this).html( '<input type="text" value="%s" style="width: 100%" />'.format(existing_search) );
877
                        } else {
877
                        } else {
878
                            var search_title = _("%s search").format(title);
878
                            var search_title = __("%s search").format(title);
879
                            $(this).html( '<input type="text" placeholder="%s" style="width: 100%" />'.format(search_title) );
879
                            $(this).html( '<input type="text" placeholder="%s" style="width: 100%" />'.format(search_title) );
880
                        }
880
                        }
881
                    }
881
                    }
(-)a/koha-tmpl/intranet-tmpl/prog/js/item_search_fields.js (-1 / +1 lines)
Lines 2-8 Link Here
2
2
3
jQuery.validator.addMethod("marcfield", function(value, element) {
3
jQuery.validator.addMethod("marcfield", function(value, element) {
4
    return this.optional(element) || /^[0-9a-zA-Z]+$/.test(value);
4
    return this.optional(element) || /^[0-9a-zA-Z]+$/.test(value);
5
}, _("Please enter letters or numbers") );
5
}, __("Please enter letters or numbers") );
6
6
7
$(document).ready(function(){
7
$(document).ready(function(){
8
    $("#add_field_form").hide();
8
    $("#add_field_form").hide();
(-)a/koha-tmpl/intranet-tmpl/prog/js/letter.js (-1 / +1 lines)
Lines 147-153 $(document).ready(function() { Link Here
147
    $(".content_sms").on("keyup", function(){
147
    $(".content_sms").on("keyup", function(){
148
        var length = $(this).val().length;
148
        var length = $(this).val().length;
149
        var sms_counter = ("#sms_counter_" + $(this).data('lang'));
149
        var sms_counter = ("#sms_counter_" + $(this).data('lang'));
150
        $(sms_counter).html(length + "/" + sms_limit + _(" characters"));
150
        $(sms_counter).html(length + "/" + sms_limit + __(" characters"));
151
        if ( length  > sms_limit ) {
151
        if ( length  > sms_limit ) {
152
            $(sms_counter).css("color", "red");
152
            $(sms_counter).css("color", "red");
153
        } else {
153
        } else {
(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/results.js (-3 / +3 lines)
Lines 54-64 function verify_cover_images() { Link Here
54
                    if( div.hasClass("coce-coverimg") ){
54
                    if( div.hasClass("coce-coverimg") ){
55
                        /* Identify which service's image is being loaded by IntranetCoce system pref */
55
                        /* Identify which service's image is being loaded by IntranetCoce system pref */
56
                        if( $(img).attr("src").indexOf('amazon.com') >= 0 ){
56
                        if( $(img).attr("src").indexOf('amazon.com') >= 0 ){
57
                            div.find(".hint").html(_("Coce image from Amazon.com"));
57
                            div.find(".hint").html(__("Coce image from Amazon.com"));
58
                        } else if( $(img).attr("src").indexOf('google.com') >= 0 ){
58
                        } else if( $(img).attr("src").indexOf('google.com') >= 0 ){
59
                            div.find(".hint").html(_("Coce image from Google Books"));
59
                            div.find(".hint").html(__("Coce image from Google Books"));
60
                        } else if( $(img).attr("src").indexOf('openlibrary.org') >= 0 ){
60
                        } else if( $(img).attr("src").indexOf('openlibrary.org') >= 0 ){
61
                            div.find(".hint").html(_("Coce image from Open Library"));
61
                            div.find(".hint").html(__("Coce image from Open Library"));
62
                        } else {
62
                        } else {
63
                            blanks.push( coverId );
63
                            blanks.push( coverId );
64
                            div.remove();
64
                            div.remove();
(-)a/koha-tmpl/intranet-tmpl/prog/js/pages/tags-review.js (-4 / +4 lines)
Lines 32-44 function count_reject () { Link Here
32
}
32
}
33
33
34
var success_approve = function(tag){
34
var success_approve = function(tag){
35
    // window.alert(_("AJAX approved tag: ") + tag);
35
    // window.alert(__("AJAX approved tag: ") + tag);
36
};
36
};
37
var failure_approve = function(tag){
37
var failure_approve = function(tag){
38
    window.alert( __("AJAX failed to approve tag: %s").format(decodeURIComponent(tag)) );
38
    window.alert( __("AJAX failed to approve tag: %s").format(decodeURIComponent(tag)) );
39
};
39
};
40
var success_reject  = function(tag){
40
var success_reject  = function(tag){
41
    // window.alert(_("AJAX rejected tag: ") + tag);
41
    // window.alert(__("AJAX rejected tag: ") + tag);
42
};
42
};
43
var failure_reject  = function(tag){
43
var failure_reject  = function(tag){
44
    window.alert( __("AJAX failed to reject tag: %s").format(decodeURIComponent(tag)) );
44
    window.alert( __("AJAX failed to reject tag: %s").format(decodeURIComponent(tag)) );
Lines 55-61 var indeterminate_test = function(tag){ Link Here
55
55
56
var success_test_call = function() {
56
var success_test_call = function() {
57
    $('#test_button').prop('disabled', false);
57
    $('#test_button').prop('disabled', false);
58
    $('#test_button').html("<i class='fa fa-check-square-o' aria-hidden='true'></i>" +_(" Test"));
58
    $('#test_button').html("<i class='fa fa-check-square-o' aria-hidden='true'></i>" +__(" Test"));
59
};
59
};
60
60
61
$(document).ready(function() {
61
$(document).ready(function() {
Lines 100-106 $(document).ready(function() { Link Here
100
        pull_counts();
100
        pull_counts();
101
        var getelement;
101
        var getelement;
102
        var gettitle;
102
        var gettitle;
103
        // window.alert(_("Click detected on ") + event.target + ": " + $(event.target).html);
103
        // window.alert(__("Click detected on ") + event.target + ": " + $(event.target).html);
104
        if ($(event.target).is('.ok')) {
104
        if ($(event.target).is('.ok')) {
105
            $.ajax(Object.assign({}, review_ajax_params, {
105
            $.ajax(Object.assign({}, review_ajax_params, {
106
                data: {
106
                data: {
(-)a/koha-tmpl/intranet-tmpl/prog/js/patron-autocomplete.js (-1 / +1 lines)
Lines 46-52 function patron_autocomplete(node, options) { Link Here
46
                },
46
                },
47
                error: function(e) {
47
                error: function(e) {
48
                    if ( e.state() != 'rejected' ) {
48
                    if ( e.state() != 'rejected' ) {
49
                        alert( _("An error occurred. Check the logs") );
49
                        alert( __("An error occurred. Check the logs") );
50
                    }
50
                    }
51
                    return response();
51
                    return response();
52
                }
52
                }
(-)a/koha-tmpl/intranet-tmpl/prog/js/resolve_claim_modal.js (-1 / +1 lines)
Lines 5-11 $('body').on('click', '.return-claim-tools-resolve', function() { Link Here
5
    $('#claims-returned-resolved-modal-id').val(id);
5
    $('#claims-returned-resolved-modal-id').val(id);
6
    $("#new_lost_status").val(current_lost_status);
6
    $("#new_lost_status").val(current_lost_status);
7
    let selected_option = $("#new_lost_status option:selected");
7
    let selected_option = $("#new_lost_status option:selected");
8
    $(selected_option).text(_("%s (current status)").format($(selected_option).text()));
8
    $(selected_option).text(__("%s (current status)").format($(selected_option).text()));
9
    $('#claims-returned-resolved-modal').modal()
9
    $('#claims-returned-resolved-modal').modal()
10
});
10
});
11
11
(-)a/koha-tmpl/intranet-tmpl/prog/js/rotating-collections.js (-1 / +1 lines)
Lines 5-11 $(document).ready(function(){ Link Here
5
5
6
    $(".confirmdelete").click(function(){
6
    $(".confirmdelete").click(function(){
7
        $(this).parents('tr').addClass("warn");
7
        $(this).parents('tr').addClass("warn");
8
        if(confirm(_("Are you sure you want to delete this rotating collection?"))){
8
        if(confirm(__("Are you sure you want to delete this rotating collection?"))){
9
            return true;
9
            return true;
10
        } else {
10
        } else {
11
            $(this).parents('tr').removeClass("warn");
11
            $(this).parents('tr').removeClass("warn");
(-)a/koha-tmpl/intranet-tmpl/prog/js/xmlControlfield.js (-2 / +1 lines)
Lines 212-218 function changeH4Result(form, h4_result, tr_result, pos, value) Link Here
212
            }).responseXML;
212
            }).responseXML;
213
            if (this.xmlDoc) this.renderTemplate();
213
            if (this.xmlDoc) this.renderTemplate();
214
            $("*").ajaxError(function(evt, request, settings){
214
            $("*").ajaxError(function(evt, request, settings){
215
                alert(_("AJAX error: receiving data from %s").format(settings.url));
215
                alert(__("AJAX error: receiving data from %s").format(settings.url));
216
            });
216
            });
217
        },//loadXmlValues
217
        },//loadXmlValues
218
218
219
- 

Return to bug 22490