kopia lustrzana https://github.com/FacilMap/facilmap
More compatibility to old FacilMap permalinks
rodzic
8b2cb35c90
commit
e8294f1c8f
|
@ -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]);
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue