From 4154c2cd31f23c5d5fb336dfcd68ba192b297f93 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 16 Sep 2015 22:45:14 +1200 Subject: More JavaScript code cleanup --- web/app/view/user/UserDialogController.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/app/view/user') diff --git a/web/app/view/user/UserDialogController.js b/web/app/view/user/UserDialogController.js index cd37f70cf..dd3109d37 100644 --- a/web/app/view/user/UserDialogController.js +++ b/web/app/view/user/UserDialogController.js @@ -19,7 +19,7 @@ Ext.define('Traccar.view.user.UserDialogController', { alias: 'controller.userDialog', init: function() { - if (Traccar.getApplication().getUser().get('admin')) { + if (Traccar.app.getUser().get('admin')) { this.lookupReference('adminField').setDisabled(false); } }, @@ -28,7 +28,7 @@ Ext.define('Traccar.view.user.UserDialogController', { var dialog = button.up('window').down('form'); dialog.updateRecord(); var record = dialog.getRecord(); - if (record === Traccar.getApplication().getUser()) { + if (record === Traccar.app.getUser()) { record.save(); } else { var store = Ext.getStore('Users'); -- cgit v1.2.3