diff options
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' |