[Windowing] urlService

Added the urlService to the unit
tests for the cancel and save buttons
also removed unused services. WTD 23.
This commit is contained in:
Shivam Dave
2015-06-25 14:07:02 -07:00
parent 6d28add055
commit 3a371483ab
5 changed files with 27 additions and 11 deletions

View File

@ -30,7 +30,7 @@ define(
* Edit Mode. Exits the editing user interface and invokes object
* capabilities to persist the changes that have been made.
*/
function CancelAction($log, $location, urlService, navigationService, context) {
function CancelAction($location, urlService, context) {
var domainObject = context.domainObject;
// Look up the object's "editor.completion" capability;
@ -50,7 +50,7 @@ define(
// Discard the current root view (which will be the editing
// UI, which will have been pushed atop the Browise UI.)
function returnToBrowse() {
var urlBrowse = $location.path(urlService.urlForNewTab(
var urlBrowse = $location.path(urlService.urlForLocation(
"browse",
domainObject
));

View File

@ -31,7 +31,7 @@ define(
* Edit Mode. Exits the editing user interface and invokes object
* capabilities to persist the changes that have been made.
*/
function SaveAction($location, urlService, navigationService, context) {
function SaveAction($location, urlService, context) {
var domainObject = context.domainObject;
// Invoke any save behavior introduced by the editor capability;
@ -45,7 +45,10 @@ define(
// Discard the current root view (which will be the editing
// UI, which will have been pushed atop the Browise UI.)
function returnToBrowse() {
return $location.path(urlService.urlForNewTab("browse", domainObject));
return $location.path(urlService.urlForLocation(
"browse",
domainObject
));
}
return {