diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-11-07 06:07:18 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-11-07 06:07:18 +1300 |
commit | 33783a40ebe4af278bf4f9fa6ca7fa75452c1304 (patch) | |
tree | 27b803a30aaf27165e84a236e36f6e91db51d000 /web/app/Application.js | |
parent | 941d09ba9d24fedeab268e9d109d5be9e8008282 (diff) | |
download | trackermap-web-33783a40ebe4af278bf4f9fa6ca7fa75452c1304.tar.gz trackermap-web-33783a40ebe4af278bf4f9fa6ca7fa75452c1304.tar.bz2 trackermap-web-33783a40ebe4af278bf4f9fa6ca7fa75452c1304.zip |
Add reports to the mobile view
Diffstat (limited to 'web/app/Application.js')
-rw-r--r-- | web/app/Application.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/web/app/Application.js b/web/app/Application.js index 5c96b9bf..fc6ff5e7 100644 --- a/web/app/Application.js +++ b/web/app/Application.js @@ -76,6 +76,17 @@ Ext.define('Traccar.Application', { 'Root' ], + isMobile: function () { + return window.matchMedia && window.matchMedia('(max-width: 768px)').matches; + }, + + showReports: function (show) { + var rootPanel = Ext.getCmp('rootPanel'); + if (rootPanel) { + rootPanel.setActiveItem(show ? 1 : 0); + } + }, + setUser: function (data) { var reader = Ext.create('Ext.data.reader.Json', { model: 'Traccar.model.User' |