many improvements!
This commit is contained in:
1 parent
da7cacb57e
commit
dda4e0b6ae
13 files changed
+245
-31
No files matched your search
@@ -3,9 +3,11 @@ root = this;
|
||||
root.controllers.controller('topBarCtrl', ['$scope', '$location', ($scope, $location) ->
|
||||
$scope.$on('$routeChangeSuccess', (next, current) ->
|
||||
$scope.path = _.filter($location.path().split("/"), (s) -> s)
|
||||
if $scope.path[5] == "query"
|
||||
$scope.path = $scope.path[0...-1]
|
||||
$scope.getHistoryUrl = (idx) ->
|
||||
ret = "#/" + ($scope.path[i] for i in [0...idx]).join("/")
|
||||
if $scope.path[idx] == "idx"
|
||||
if _.indexOf(["idx", "geojson"], $scope.path[idx]) != -1
|
||||
return ""
|
||||
if idx == 0
|
||||
ret += "servers"
|
||||
@@ -13,6 +15,8 @@ root.controllers.controller('topBarCtrl', ['$scope', '$location', ($scope, $loca
|
||||
ret += "/databases"
|
||||
else if idx == 2
|
||||
ret += "/collections"
|
||||
else if idx == 4
|
||||
ret += "/#{ $scope.path[4] }"
|
||||
return ret
|
||||
)
|
||||
])
|
||||
Reference in new issue
Block a user