@igea/oac_frontend 1.0.86 → 1.0.87
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/package.json
CHANGED
package/src/locales/en.json
CHANGED
|
@@ -109,7 +109,9 @@
|
|
|
109
109
|
"new_item": "New",
|
|
110
110
|
"stop_edit": "Stop edit",
|
|
111
111
|
"search": "Search",
|
|
112
|
-
"edit_from_other_user": "Another user is editing this item"
|
|
112
|
+
"edit_from_other_user": "Another user is editing this item",
|
|
113
|
+
"save_ok": "Form saved successfully",
|
|
114
|
+
"save_err": "Error saving the form"
|
|
113
115
|
},
|
|
114
116
|
"search": {
|
|
115
117
|
"fast": {
|
package/src/locales/it.json
CHANGED
|
@@ -112,7 +112,10 @@
|
|
|
112
112
|
"new_item": "Nuova",
|
|
113
113
|
"stop_edit": "Fine modifica",
|
|
114
114
|
"search": "Ricerca",
|
|
115
|
-
"edit_from_other_user": "Un altro utente sta modificando questo elemento"
|
|
115
|
+
"edit_from_other_user": "Un altro utente sta modificando questo elemento",
|
|
116
|
+
"save_ok": "Scheda salvata correttamente",
|
|
117
|
+
"save_err": "Errore nel salvataggio della scheda"
|
|
118
|
+
|
|
116
119
|
},
|
|
117
120
|
"search": {
|
|
118
121
|
"title" : "Ricerca",
|
|
@@ -19,7 +19,7 @@ const uploadValues = ["$UPLOAD$"];
|
|
|
19
19
|
|
|
20
20
|
const CLIENT_UUID = crypto.randomUUID();
|
|
21
21
|
|
|
22
|
-
const KEEP_LOCK_EVERY =
|
|
22
|
+
const KEEP_LOCK_EVERY = 45*1000;
|
|
23
23
|
|
|
24
24
|
document.addEventListener('DOMContentLoaded', () => {
|
|
25
25
|
|
|
@@ -144,7 +144,10 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
144
144
|
lastUpdateTs: 0,
|
|
145
145
|
lastSaveTs: 0,
|
|
146
146
|
isNew: true,
|
|
147
|
-
labels: {
|
|
147
|
+
labels: {
|
|
148
|
+
save_ok: el.dataset.label_save_ok,
|
|
149
|
+
save_err: el.dataset.label_save_err
|
|
150
|
+
},
|
|
148
151
|
search: {
|
|
149
152
|
offset: 0,
|
|
150
153
|
limit: 10,
|
|
@@ -668,14 +671,14 @@ document.addEventListener('DOMContentLoaded', () => {
|
|
|
668
671
|
console.log(obj);
|
|
669
672
|
if(!automatic){
|
|
670
673
|
if(obj.success){
|
|
671
|
-
alert(
|
|
674
|
+
alert(_this.labels.save_ok);
|
|
672
675
|
if(_this.isNew && obj.data){
|
|
673
676
|
_this.form_id = obj.data;
|
|
674
677
|
await fetch('/backend/ontology/form/lock/' + obj.data + "/" + CLIENT_UUID)
|
|
675
678
|
_this.form_keep_lock_timer = setInterval(_this.keepLock.bind(_this), KEEP_LOCK_EVERY)
|
|
676
679
|
}
|
|
677
680
|
}else
|
|
678
|
-
alert("
|
|
681
|
+
alert(_this.labels.save_err + ": " + obj.message);
|
|
679
682
|
}
|
|
680
683
|
_this.saving = false;
|
|
681
684
|
}).catch(error => {
|