aboutsummaryrefslogtreecommitdiff
path: root/web/app/Application.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-12-01 12:00:19 +0500
committerAbyss777 <abyss@fox5.ru>2016-12-01 12:00:19 +0500
commitb53b223a07dbba48321d42204ffbb07a33ac2caf (patch)
treea567dce2fcc0fe49ebcf26792fb92588a425da4f /web/app/Application.js
parent38b3a3e6df91b7c2135cfcca855826ce8f1b1e63 (diff)
downloadtrackermap-web-b53b223a07dbba48321d42204ffbb07a33ac2caf.tar.gz
trackermap-web-b53b223a07dbba48321d42204ffbb07a33ac2caf.tar.bz2
trackermap-web-b53b223a07dbba48321d42204ffbb07a33ac2caf.zip
- Handle eventId url parameter
- Fit map view to events positions markers
Diffstat (limited to 'web/app/Application.js')
-rw-r--r--web/app/Application.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/web/app/Application.js b/web/app/Application.js
index 8619ba96..bae3896e 100644
--- a/web/app/Application.js
+++ b/web/app/Application.js
@@ -141,5 +141,13 @@ Ext.define('Traccar.Application', {
} else {
Ext.Msg.alert(Strings.errorTitle, Strings.errorConnection);
}
- }
+ },
+
+ removeUrlParameter: function (param) {
+ var params = Ext.Object.fromQueryString(window.location.search);
+ delete params[param];
+ window.history.pushState(null, null, window.location.pathname + '?' + Ext.Object.toQueryString(params));
+ },
+
+ hasEventId: false
});