diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-07-07 22:36:10 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-07-07 22:36:10 -0700 |
commit | e6a115dfed5a7ffca76924e954c67205a90e46a2 (patch) | |
tree | e7f9b85eb0be03888be479ff1f3cb7da68ab149b /web/app | |
parent | 2a22ce7c01b5e75c029705ff043c9c08ba7592cc (diff) | |
download | trackermap-web-e6a115dfed5a7ffca76924e954c67205a90e46a2.tar.gz trackermap-web-e6a115dfed5a7ffca76924e954c67205a90e46a2.tar.bz2 trackermap-web-e6a115dfed5a7ffca76924e954c67205a90e46a2.zip |
Move update to static view
Diffstat (limited to 'web/app')
-rw-r--r-- | web/app/controller/Root.js | 12 | ||||
-rw-r--r-- | web/app/view/dialog/Login.js | 5 | ||||
-rw-r--r-- | web/app/view/dialog/LoginController.js | 12 |
3 files changed, 8 insertions, 21 deletions
diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js index 7c0345ad..c1700aa0 100644 --- a/web/app/controller/Root.js +++ b/web/app/controller/Root.js @@ -108,7 +108,7 @@ Ext.define('Traccar.controller.Root', { }, loadApp: function () { - var attribution, eventId; + var updateView, attributionView, eventId; if (window.webkit && window.webkit.messageHandlers.appInterface) { window.webkit.messageHandlers.appInterface.postMessage('login'); @@ -152,9 +152,13 @@ Ext.define('Traccar.controller.Root', { this.asyncUpdate(true); } }); - attribution = Ext.get('attribution'); - if (attribution) { - attribution.remove(); + updateView = Ext.get('update'); + if (updateView) { + updateView.remove(); + } + attributionView = Ext.get('attribution'); + if (attributionView) { + attributionView.remove(); } if (Traccar.app.isMobile()) { Ext.create('widget.mainMobile'); diff --git a/web/app/view/dialog/Login.js b/web/app/view/dialog/Login.js index 461ec353..3a2c247a 100644 --- a/web/app/view/dialog/Login.js +++ b/web/app/view/dialog/Login.js @@ -28,11 +28,6 @@ Ext.define('Traccar.view.dialog.Login', { header: false, closable: false, - listeners: { - afterrender: 'handleAdded', - beforedestroy: 'handleRemoved' - }, - items: { xtype: 'form', reference: 'form', diff --git a/web/app/view/dialog/LoginController.js b/web/app/view/dialog/LoginController.js index 5767a4bc..c25d9a83 100644 --- a/web/app/view/dialog/LoginController.js +++ b/web/app/view/dialog/LoginController.js @@ -29,18 +29,6 @@ Ext.define('Traccar.view.dialog.LoginController', { this.lookupReference('languageField').setValue(Locale.language); }, - handleAdded: function () { - var element = document.createElement('div'); - element.id = 'update'; - element.innerHTML = 'Switch to <a href="/modern/">modern interface</a>'; - document.getElementsByTagName('body')[0].appendChild(element); - }, - - handleRemoved: function () { - var element = document.getElementById('update'); - document.getElementsByTagName('body')[0].removeChild(element); - }, - login: function () { var form = this.lookupReference('form'); if (form.isValid()) { |