aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-07-11 23:10:10 +1200
committerGitHub <noreply@github.com>2016-07-11 23:10:10 +1200
commit817360eee7dba57cf8b58e858f7acf60f27b5e68 (patch)
tree570ad7697e70a1b1d2ca6c2f5c38d204235e46cf /web
parent063ca2ff893a3db3977a42ea960787b067c549db (diff)
parentfe9ab15104d36a5d8d01375f9540d59a835bce5e (diff)
downloadtrackermap-server-817360eee7dba57cf8b58e858f7acf60f27b5e68.tar.gz
trackermap-server-817360eee7dba57cf8b58e858f7acf60f27b5e68.tar.bz2
trackermap-server-817360eee7dba57cf8b58e858f7acf60f27b5e68.zip
Merge pull request #2097 from Abyss777/master
Fix from in mail notifications
Diffstat (limited to 'web')
-rw-r--r--web/app/view/AttributesController.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/web/app/view/AttributesController.js b/web/app/view/AttributesController.js
index 3028e41eb..2a9e71849 100644
--- a/web/app/view/AttributesController.js
+++ b/web/app/view/AttributesController.js
@@ -40,17 +40,22 @@ Ext.define('Traccar.view.AttributesController', {
store.addListener('add', function (store, records, index, eOpts) {
for (i = 0; i < records.length; i++) {
this.getView().record.get('attributes')[records[i].get('name')] = records[i].get('value');
- this.getView().record.dirty = true;
}
+ this.getView().record.dirty = true;
}, this);
store.addListener('update', function (store, record, operation, modifiedFieldNames, details, eOpts) {
if (operation === Ext.data.Model.EDIT) {
+ if (record.modified.name !== record.get('name')) {
+ delete this.getView().record.get('attributes')[record.modified.name];
+ }
this.getView().record.get('attributes')[record.get('name')] = record.get('value');
this.getView().record.dirty = true;
}
}, this);
store.addListener('remove', function (store, records, index, isMove, eOpts) {
- delete this.getView().record.get('attributes')[records[index].get('name')];
+ for (var i = 0; i < records.length; i++) {
+ delete this.getView().record.get('attributes')[records[i].get('name')];
+ }
this.getView().record.dirty = true;
}, this);