@osimatic/helpers-js 1.0.60 → 1.0.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG +4 -1
- package/data_table.js +0 -4
- package/file.js +1 -1
- package/import_from_csv.js +5 -5
- package/package.json +1 -1
package/CHANGELOG
CHANGED
|
@@ -45,4 +45,7 @@ FormHelper.getFormErrorTextBis(...) -> FormHelper.getFormErrorText(...)
|
|
|
45
45
|
FormHelper.displayFormErrorsFromXhr(form, btnSubmit, xhr) -> FormHelper.displayFormErrors(form, btnSubmit, xhr.responseJSON)
|
|
46
46
|
|
|
47
47
|
1.0.35 :
|
|
48
|
-
ajout méthode HTTPRequest.init() (charge le polyfill de fetch)
|
|
48
|
+
ajout méthode HTTPRequest.init() (charge le polyfill de fetch)
|
|
49
|
+
|
|
50
|
+
1.0.61
|
|
51
|
+
DataTable.displayErrorFromXhr -> DataTable.displayError
|
package/data_table.js
CHANGED
|
@@ -268,10 +268,6 @@ class DataTable {
|
|
|
268
268
|
// }
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
static displayErrorFromXhr(div, jqxhr, defaultMessage) {
|
|
272
|
-
this.displayError(div, JSON.parse(jqxhr.responseJSON), defaultMessage);
|
|
273
|
-
}
|
|
274
|
-
|
|
275
271
|
static displayError(div, data, defaultMessage) {
|
|
276
272
|
var error = null;
|
|
277
273
|
if (data != null) {
|
package/file.js
CHANGED
|
@@ -111,7 +111,7 @@ class Img {
|
|
|
111
111
|
// $(img).attr('src', urlCreator.createObjectURL(data));
|
|
112
112
|
Img.setBlobToImg($(img), data);
|
|
113
113
|
},
|
|
114
|
-
error: (jqxhr, status,
|
|
114
|
+
error: (jqxhr, status, errorThrown) => HTTPRequest.logJqueryRequestFailure(jqxhr, status, errorThrown),
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
117
|
|
package/import_from_csv.js
CHANGED
|
@@ -95,13 +95,13 @@ class ImportFromCsv {
|
|
|
95
95
|
|
|
96
96
|
requestImportData(dataToImport,
|
|
97
97
|
// fonction callback en cas d'erreur de formulaire
|
|
98
|
-
|
|
99
|
-
console.log(
|
|
100
|
-
if (typeof
|
|
101
|
-
formMatching.find('div.errors').html(
|
|
98
|
+
(json) => {
|
|
99
|
+
console.log(json);
|
|
100
|
+
if (typeof json['import_list'] !== 'undefined') {
|
|
101
|
+
formMatching.find('div.errors').html(json['import_list']).removeClass('hide');
|
|
102
102
|
}
|
|
103
103
|
else {
|
|
104
|
-
formMatching.find('div.errors').html(ImportFromCsv.getErrorsHtmlOfImportData(
|
|
104
|
+
formMatching.find('div.errors').html(ImportFromCsv.getErrorsHtmlOfImportData(json, divResult)).removeClass('hide');
|
|
105
105
|
}
|
|
106
106
|
formMatching.find('button[type="submit"]').buttonLoader('reset');
|
|
107
107
|
}
|