Lines 1-5
Link Here
|
1 |
/* Variables defined in letter.tt: */ |
1 |
/* Variables defined in letter.tt: */ |
2 |
/* global _ module add_form copy_form no_op_set MSG_EMPTY_TITLE_AND_CONTENT MSG_EMPTY_TEMPLATES code MSG_CODE_EXISTS MSG_CODE_EXISTS_FOR_LIBRARY MSG_NO_NOTICE_FOUND interface theme KohaTable columns_settings */ |
2 |
/* global _ module add_form copy_form no_op_set code interface theme KohaTable columns_settings */ |
3 |
|
3 |
|
4 |
var modal_loading = "<div id=\"loading\"><img src=\"" + interface + "/" + theme + "/img/spinner-small.gif\" alt=\"\" /> "+ __('Loading...') +"</div>"; |
4 |
var modal_loading = "<div id=\"loading\"><img src=\"" + interface + "/" + theme + "/img/spinner-small.gif\" alt=\"\" /> "+ __('Loading...') +"</div>"; |
5 |
|
5 |
|
Lines 18-26
function checkCodes( new_lettercode, new_branchcode ){
Link Here
|
18 |
success: function (data) { |
18 |
success: function (data) { |
19 |
if ( data.letters.length > 0 ) { |
19 |
if ( data.letters.length > 0 ) { |
20 |
if( new_branchcode === '' ) { |
20 |
if( new_branchcode === '' ) { |
21 |
alert( MSG_CODE_EXISTS.format(new_lettercode)); |
21 |
alert(__("A default letter with the code '%s' already exists.").format(new_lettercode)); |
22 |
} else { |
22 |
} else { |
23 |
alert( MSG_CODE_EXISTS_FOR_LIBRARY.format(new_lettercode, new_branchcode) ); |
23 |
alert(__("A letter with the code '%s' already exists for '%s'.").format(new_lettercode, new_branchcode)); |
24 |
} |
24 |
} |
25 |
$(".spinner").hide(); |
25 |
$(".spinner").hide(); |
26 |
} else { |
26 |
} else { |
Lines 49-57
$(document).ready(function() {
Link Here
|
49 |
{ "bSortable": false, "aTargets": [ "nosort" ] }, |
49 |
{ "bSortable": false, "aTargets": [ "nosort" ] }, |
50 |
{ "sType": "title-string", "aTargets" : [ "title-string"] } |
50 |
{ "sType": "title-string", "aTargets" : [ "title-string"] } |
51 |
], |
51 |
], |
52 |
"oLanguage": { |
|
|
53 |
"sZeroRecords": MSG_NO_NOTICE_FOUND |
54 |
}, |
55 |
"exportColumns": [0,1,2,3], |
52 |
"exportColumns": [0,1,2,3], |
56 |
}, columns_settings); |
53 |
}, columns_settings); |
57 |
|
54 |
|
Lines 92-98
$(document).ready(function() {
Link Here
|
92 |
) { |
89 |
) { |
93 |
var mtt = $(this).find('input[name="message_transport_type"]').val(); |
90 |
var mtt = $(this).find('input[name="message_transport_type"]').val(); |
94 |
at_least_one_exists = 1; // Only one template has to be filled in for form to be valid |
91 |
at_least_one_exists = 1; // Only one template has to be filled in for form to be valid |
95 |
alert( MSG_EMPTY_TITLE_AND_CONTENT.format( mtt ) ); |
92 |
alert(__("Please specify title and content for %s").format(mtt)); |
96 |
are_valid = 0; |
93 |
are_valid = 0; |
97 |
} else if ( title.length > 0 && content.length > 0 ) { |
94 |
} else if ( title.length > 0 && content.length > 0 ) { |
98 |
at_least_one_exists = 1; |
95 |
at_least_one_exists = 1; |
Lines 101-107
$(document).ready(function() {
Link Here
|
101 |
|
98 |
|
102 |
if ( ! at_least_one_exists ) { |
99 |
if ( ! at_least_one_exists ) { |
103 |
// No templates were filled out |
100 |
// No templates were filled out |
104 |
alert( MSG_EMPTY_TEMPLATES ); |
101 |
alert( __("Please fill at least one template.") ); |
105 |
return false; |
102 |
return false; |
106 |
} |
103 |
} |
107 |
|
104 |
|
108 |
- |
|
|