1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 12:12:48 +01:00

Rebuild JS files

This commit is contained in:
Hillel Coren 2020-03-29 09:39:57 +03:00
parent ca6e981f29
commit bb3603acd3
19 changed files with 78 additions and 94 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1187,17 +1187,12 @@ function escapeRegExp(str) {
} }
function firstJSONError(json) { function firstJSONError(json) {
json = json['errors'];
for (var key in json) { for (var key in json) {
if ( ! json.hasOwnProperty(key)) { if ( ! json.hasOwnProperty(key)) {
continue; continue;
} }
var item = json[key]; return json[key] + '';
for (var subKey in item) {
if ( ! item.hasOwnProperty(subKey)) {
continue;
}
return item[subKey];
}
} }
return false; return false;
} }

View File

@ -265,23 +265,12 @@
var error = '{{ trans('texts.error_refresh_page') }}'; var error = '{{ trans('texts.error_refresh_page') }}';
if (data) { if (data) {
error = firstPaymentError(data.responseJSON); error = firstJSONError(data.responseJSON);
} }
swal({title: '{{ trans('texts.an_error_occurred') }}', text: error}); swal({title: '{{ trans('texts.an_error_occurred') }}', text: error});
} }
function firstPaymentError(json) {
json = json['errors'];
for (var key in json) {
if ( ! json.hasOwnProperty(key)) {
continue;
}
return json[key] + '';
}
return '';
}
function submitAction(action) { function submitAction(action) {
$('#action').val(action); $('#action').val(action);
$('.main-form').submit(); $('.main-form').submit();