aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/app.css4
-rw-r--r--web/app/controller/Root.js12
-rw-r--r--web/app/view/dialog/Login.js5
-rw-r--r--web/app/view/dialog/LoginController.js12
-rw-r--r--web/release.html1
5 files changed, 12 insertions, 22 deletions
diff --git a/web/app.css b/web/app.css
index c006931..f9f28bb 100644
--- a/web/app.css
+++ b/web/app.css
@@ -25,7 +25,9 @@ body.x-border-layout-ct, div.x-border-layout-ct {
}
#update {
- margin: 20px;
+ position: absolute;
+ width: 100%;
+ top: 20px;
font-weight: bold;
text-align: center;
}
diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js
index 7c0345a..c1700aa 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 461ec35..3a2c247 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 5767a4b..c25d9a8 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()) {
diff --git a/web/release.html b/web/release.html
index 76b146d..9b97715 100644
--- a/web/release.html
+++ b/web/release.html
@@ -10,6 +10,7 @@
</head>
<body>
<div id="spinner"></div>
+<div id="update">Switch to <a href="/modern/">modern interface</a></div>
<div id="attribution">Powered by <a href="https://www.traccar.org/">Traccar GPS Tracking System</a></div>
<script id="loadScript" src="load.js"></script>
</body>