This commit is contained in:
Matteo Pagliazzi
2013-10-23 16:38:05 +02:00
parent 18c06b5043
commit 0c7ba32c6b
2 changed files with 9 additions and 3 deletions

View File

@@ -16,15 +16,21 @@ habitrpg.controller('MenuCtrl',
}
$scope.gotoOptions = function(){
$scope.viewingOptions = true;
$location.path('/options');
}
$scope.gotoTasks = function(){
$scope.viewingOptions = false;
$location.path('/tasks')
}
$scope.$on('$routeChangeSuccess', function(ev, current) {
if(current.$$route.originalPath === "/tasks"){
$scope.viewingOptions = false;
}else if(current.$$route.originalPath === "/options"){
$scope.viewingOptions = true;
}
});
//FIXME where to implement this in rewrite?

View File

@@ -5,7 +5,7 @@
h1.task-action-btn.tile.solid.user-reporter {{username(user.auth, user.profile.name)}}
ul.flyout-content.nav.stacked
li
a.task-action-btn.tile.solid(x-bind='click:toggleGamePane')
a.task-action-btn.tile.solid
span(ng-show='viewingOptions', ng-click='gotoTasks()')
i.icon-ok
| Tasks