aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/NotificationsController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-09-02 00:30:55 +1200
committerGitHub <noreply@github.com>2016-09-02 00:30:55 +1200
commitbfcf42c5d55083bec83451400a432c7004f063c5 (patch)
tree2ce4d56503523bb2ed58b0f6a1896423d99a66d8 /web/app/view/NotificationsController.js
parent1fe4c2e0b636646fddb28081c7cdfd3c5593ae77 (diff)
parent65bb228fd2dff0993ef4d8817175bdb96c854e1f (diff)
downloadtrackermap-server-bfcf42c5d55083bec83451400a432c7004f063c5.tar.gz
trackermap-server-bfcf42c5d55083bec83451400a432c7004f063c5.tar.bz2
trackermap-server-bfcf42c5d55083bec83451400a432c7004f063c5.zip
Merge pull request #2279 from Abyss777/fix_permissions
Fix find index in BasePermissionsController.js
Diffstat (limited to 'web/app/view/NotificationsController.js')
-rw-r--r--web/app/view/NotificationsController.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/web/app/view/NotificationsController.js b/web/app/view/NotificationsController.js
index d880c5d41..4e041eb99 100644
--- a/web/app/view/NotificationsController.js
+++ b/web/app/view/NotificationsController.js
@@ -23,7 +23,7 @@ Ext.define('Traccar.view.NotificationsController', {
],
init: function () {
- this.userId = this.getView().user.getData().id;
+ this.userId = this.getView().user.getId();
this.getView().getStore().load({
scope: this,
callback: function (records, operation, success) {
@@ -37,8 +37,8 @@ Ext.define('Traccar.view.NotificationsController', {
var i, index, attributes, storeRecord;
if (success) {
for (i = 0; i < records.length; i++) {
- index = this.getView().getStore().find('type', records[i].getData().type);
- attributes = records[i].getData().attributes;
+ index = this.getView().getStore().findExact('type', records[i].get('type'));
+ attributes = records[i].get('attributes');
storeRecord = this.getView().getStore().getAt(index);
storeRecord.set('attributes', attributes);
storeRecord.commit();
@@ -71,8 +71,8 @@ Ext.define('Traccar.view.NotificationsController', {
url: 'api/users/notifications',
jsonData: {
userId: this.userId,
- type: record.getData().type,
- attributes: record.getData().attributes
+ type: record.get('type'),
+ attributes: record.get('attributes')
},
callback: function (options, success, response) {
if (!success) {