[Mobile] Clean-Up

Cleaned the unused code for the
backArrow and long touch gestures.
Commented out functions for later use
Currently shows the back arrow, however,
only will print to console on press.
Edited tests where mobile checks were breaking
and fixed.
This commit is contained in:
Shivam Dave
2015-07-28 10:56:29 -07:00
parent b0c42c12b7
commit e32403a75f
11 changed files with 57 additions and 78 deletions

View File

@ -64,23 +64,6 @@ define(
// domainObject
$location.path(urlService.urlForLocation("browse", domainObject));
}
function backArr() {
var priorRoute = $route.current,
// Act as if params HADN'T changed to avoid page reload
unlisten;
unlisten = $scope.$on('$locationChangeSuccess', function () {
// Checks path to make sure /browse/ is at front
// if so, change $route.current
if ($location.path().indexOf("/browse/") === 0) {
$route.current = priorRoute;
}
unlisten();
});
console.log(urlService.urlForBack("browse", $scope.navigatedObject));
$location.path(urlService.urlForBack("browse", $scope.navigatedObject));
}
// Callback for updating the in-scope reference to the object
// that is currently navigated-to.
@ -142,6 +125,10 @@ define(
navigateTo(domainObject);
}
}
function updateRouteBackArrow() {
console.log("Back Arrow");
}
// Load the root object, put it in the scope.
// Also, load its immediate children, and (possibly)
@ -172,7 +159,7 @@ define(
navigationService.removeListener(setNavigation);
});
$scope.backArrow = backArr;
$scope.backArrow = updateRouteBackArrow;
}