aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/Notifications.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-06-27 17:41:39 +0500
committerAbyss777 <abyss@fox5.ru>2016-06-27 17:41:39 +0500
commit2716bcccafb3ec2f19858a5e5fea262af2a8cb30 (patch)
tree6bbdd9311c87677a5edbb862a83604771c4ec23b /web/app/view/Notifications.js
parent395779143dd61df7ba526ee7a80a91094291a30b (diff)
downloadtrackermap-server-2716bcccafb3ec2f19858a5e5fea262af2a8cb30.tar.gz
trackermap-server-2716bcccafb3ec2f19858a5e5fea262af2a8cb30.tar.bz2
trackermap-server-2716bcccafb3ec2f19858a5e5fea262af2a8cb30.zip
Made code more universal
Diffstat (limited to 'web/app/view/Notifications.js')
-rw-r--r--web/app/view/Notifications.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/web/app/view/Notifications.js b/web/app/view/Notifications.js
index 2ae980afe..211e5cd15 100644
--- a/web/app/view/Notifications.js
+++ b/web/app/view/Notifications.js
@@ -39,7 +39,7 @@ Ext.define('Traccar.view.Notifications', {
}
}, {
text: Strings.notificationWeb,
- dataIndex: 'web',
+ dataIndex: 'attributes.web',
xtype: 'checkcolumn',
flex: 1,
listeners: {
@@ -47,11 +47,12 @@ Ext.define('Traccar.view.Notifications', {
checkChange: 'onCheckChange'
},
renderer: function (value, metaData, record) {
- return (new Ext.ux.CheckColumn()).renderer(record.getData().attributes.web, metaData);
+ var fields = this.dataIndex.split('\.',2);
+ return (new Ext.ux.CheckColumn()).renderer(record.get(fields[0])[fields[1]], metaData);
}
}, {
text: Strings.notificationMail,
- dataIndex: 'mail',
+ dataIndex: 'attributes.mail',
xtype: 'checkcolumn',
flex: 1,
listeners: {
@@ -59,7 +60,8 @@ Ext.define('Traccar.view.Notifications', {
checkChange: 'onCheckChange'
},
renderer: function (value, metaData, record) {
- return (new Ext.ux.CheckColumn()).renderer(record.getData().attributes.mail, metaData);
+ var fields = this.dataIndex.split('\.',2);
+ return (new Ext.ux.CheckColumn()).renderer(record.get(fields[0])[fields[1]], metaData);
}
}],