More compatibility to old FacilMap permalinks

pull/54/merge
Candid Dauth 2016-10-20 14:48:40 +03:00
rodzic 8b2cb35c90
commit e8294f1c8f
2 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -148,6 +148,8 @@
if(typeof obj.q == "string")
ret.push(obj.q);
else if(typeof obj.s == "string")
ret.push(obj.s);
else if(typeof obj.q == "object") {
Object.keys(obj.q).sort(function(a, b){return a-b}).forEach(function(i) {
ret.push(obj.q[i]);

Wyświetl plik

@ -3,6 +3,9 @@
fm.app.controller("PadCtrl", function($scope, fmMap, $timeout) {
$scope.padId = decodeURIComponent(location.pathname.match(/[^\/]*$/)[0]);
if(location.search && (!location.hash || location.hash == "#"))
history.replaceState(null, "", fm.URL_PREFIX + ($scope.padId || "") + "#" + location.search.replace(/^\?/, ""));
$timeout(function() {
var map = fmMap.getMap("map");