diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-07-04 23:18:37 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-07-04 23:18:37 -0700 |
commit | 8e3d7b88d4c05fa6c5a75907b850b897a0da9991 (patch) | |
tree | eb8ada1ada614cf99cf81e8483347a808274bbd9 /web/app/view/dialog/LoginController.js | |
parent | bece93bc00e97d1fe2fb50ff4dedb1d68c06bea4 (diff) | |
download | trackermap-web-8e3d7b88d4c05fa6c5a75907b850b897a0da9991.tar.gz trackermap-web-8e3d7b88d4c05fa6c5a75907b850b897a0da9991.tar.bz2 trackermap-web-8e3d7b88d4c05fa6c5a75907b850b897a0da9991.zip |
Add link for modern app
Diffstat (limited to 'web/app/view/dialog/LoginController.js')
-rw-r--r-- | web/app/view/dialog/LoginController.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/web/app/view/dialog/LoginController.js b/web/app/view/dialog/LoginController.js index c25d9a83..3b1adbd2 100644 --- a/web/app/view/dialog/LoginController.js +++ b/web/app/view/dialog/LoginController.js @@ -29,6 +29,18 @@ 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()) { |