diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-03-25 17:27:25 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-25 17:27:25 +1300 |
commit | d68f47ef27eb6afc28444f2e7e0a8310ae4f25b5 (patch) | |
tree | 40ac870d42f129cd38bd43410cc7080cfdc3711c /web/app/view/MapController.js | |
parent | 49eebb3a0d11e3c4d6f6951312e44bf65ce02906 (diff) | |
parent | d1a21515aec2d8b6c0ecbc4ca10c54f594e4820e (diff) | |
download | trackermap-web-d68f47ef27eb6afc28444f2e7e0a8310ae4f25b5.tar.gz trackermap-web-d68f47ef27eb6afc28444f2e7e0a8310ae4f25b5.tar.bz2 trackermap-web-d68f47ef27eb6afc28444f2e7e0a8310ae4f25b5.zip |
Merge pull request #447 from Abyss777/save_state
Use cookies to save buttons state instead of User/Server attributes
Diffstat (limited to 'web/app/view/MapController.js')
-rw-r--r-- | web/app/view/MapController.js | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/web/app/view/MapController.js b/web/app/view/MapController.js index 57727f20..04e8c448 100644 --- a/web/app/view/MapController.js +++ b/web/app/view/MapController.js @@ -28,7 +28,6 @@ Ext.define('Traccar.view.MapController', { controller: { '*': { mapstaterequest: 'getMapState', - togglestaterequest: 'getToggleState', zoomtoalldevices: 'zoomToAllDevices' } }, @@ -46,14 +45,6 @@ Ext.define('Traccar.view.MapController', { init: function () { this.callParent(); this.lookupReference('showReportsButton').setVisible(Traccar.app.isMobile()); - this.lookupReference('deviceFollowButton').setPressed( - Traccar.app.getAttributePreference('web.followToggle', 'false') === 'true'); - this.lookupReference('showGeofencesButton').setPressed( - Traccar.app.getAttributePreference('web.geofenceToggle', 'true') === 'true'); - this.lookupReference('showLiveRoutes').setPressed( - Traccar.app.getAttributePreference('web.liveRouteToggle', 'false') === 'true'); - Ext.getCmp('muteButton').setPressed( - Traccar.app.getAttributePreference('web.muteToggle', 'true') === 'true'); }, showReports: function () { @@ -78,15 +69,6 @@ Ext.define('Traccar.view.MapController', { this.fireEvent('mapstate', center[1], center[0], zoom); }, - getToggleState: function () { - var state = {}; - state['web.followToggle'] = this.lookupReference('deviceFollowButton').pressed.toString(); - state['web.geofenceToggle'] = this.lookupReference('showGeofencesButton').pressed.toString(); - state['web.liveRouteToggle'] = this.lookupReference('showLiveRoutes').pressed.toString(); - state['web.muteToggle'] = Ext.getCmp('muteButton').pressed.toString(); - this.fireEvent('togglestate', state); - }, - updateGeofences: function () { this.getView().getGeofencesSource().clear(); if (this.lookupReference('showGeofencesButton').pressed) { |