mirror of
https://github.com/nasa/openmct.git
synced 2025-06-13 04:38:15 +00:00
[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:
@ -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
|
||||
));
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user