diff options
Diffstat (limited to 'web/app/view/dialog')
-rw-r--r-- | web/app/view/dialog/Login.js | 41 | ||||
-rw-r--r-- | web/app/view/dialog/Server.js | 6 | ||||
-rw-r--r-- | web/app/view/dialog/User.js | 8 | ||||
-rw-r--r-- | web/app/view/dialog/UserController.js | 1 |
4 files changed, 56 insertions, 0 deletions
diff --git a/web/app/view/dialog/Login.js b/web/app/view/dialog/Login.js index 86917b94..d5658914 100644 --- a/web/app/view/dialog/Login.js +++ b/web/app/view/dialog/Login.js @@ -50,6 +50,47 @@ Ext.define('Traccar.view.dialog.Login', { margin: '10px auto 25px' } }, { + xtype: 'pickerfield', + fieldLabel: Strings.settingsServer, + editable: false, + value: window.location.host, + hidden: !window.appInterface && !(window.webkit && window.webkit.messageHandlers.appInterface), + createPicker: function () { + var self = this, popup = Ext.create({ + xtype: 'window', + closeAction: 'hide', + referenceHolder: true, + minWidth: 204, + layout: 'form', + header: false, + resizable: true, + items: [{ + xtype: 'textfield', + anchor: '100%', + reference: 'serverAddress', + value: window.location.href + }], + fbar: [{ + text: Strings.sharedSet, + handler: function () { + var message = 'server|' + popup.lookupReference('serverAddress').getValue(); + if (window.webkit && window.webkit.messageHandlers.appInterface) { + window.webkit.messageHandlers.appInterface.postMessage(message); + } + if (window.appInterface) { + window.appInterface.postMessage(message); + } + } + }, { + text: Strings.sharedCancel, + handler: function () { + self.collapse(); + } + }] + }); + return popup; + } + }, { xtype: 'combobox', name: 'language', fieldLabel: Strings.loginLanguage, diff --git a/web/app/view/dialog/Server.js b/web/app/view/dialog/Server.js index d9e225ec..6ee250b6 100644 --- a/web/app/view/dialog/Server.js +++ b/web/app/view/dialog/Server.js @@ -122,6 +122,12 @@ Ext.define('Traccar.view.dialog.Server', { uncheckedValue: false, name: 'limitCommands', fieldLabel: Strings.userLimitCommands + }, { + xtype: 'checkboxfield', + inputValue: true, + uncheckedValue: false, + name: 'disableReports', + fieldLabel: Strings.userDisableReports }] }] }, diff --git a/web/app/view/dialog/User.js b/web/app/view/dialog/User.js index 917f110c..7335ee79 100644 --- a/web/app/view/dialog/User.js +++ b/web/app/view/dialog/User.js @@ -145,6 +145,14 @@ Ext.define('Traccar.view.dialog.User', { disabled: true, reference: 'limitCommandsField' }, { + xtype: 'checkboxfield', + inputValue: true, + uncheckedValue: false, + name: 'disableReports', + fieldLabel: Strings.userDisableReports, + disabled: true, + reference: 'disableReportsField' + }, { xtype: 'datefield', name: 'expirationTime', fieldLabel: Strings.userExpirationTime, diff --git a/web/app/view/dialog/UserController.js b/web/app/view/dialog/UserController.js index 7383f9ee..4ba48563 100644 --- a/web/app/view/dialog/UserController.js +++ b/web/app/view/dialog/UserController.js @@ -31,6 +31,7 @@ Ext.define('Traccar.view.dialog.UserController', { this.lookupReference('expirationTimeField').setDisabled(false); this.lookupReference('deviceReadonlyField').setDisabled(false); this.lookupReference('limitCommandsField').setDisabled(false); + this.lookupReference('disableReportsField').setDisabled(false); } }, |