[Windowing] urlService
urlService added to the edit action bundle.json in addition to being implemented, however 2nd time edit bug still occurring. Also fixed urlService test suite. WTD 23.
This commit is contained in:
@@ -67,7 +67,7 @@
|
||||
"implementation": "actions/SaveAction.js",
|
||||
"name": "Save",
|
||||
"description": "Save changes made to these objects.",
|
||||
"depends": [ "$location" ],
|
||||
"depends": [ "$location", "urlService", "navigationService" ],
|
||||
"priority": "mandatory"
|
||||
},
|
||||
{
|
||||
@@ -76,7 +76,7 @@
|
||||
"implementation": "actions/CancelAction.js",
|
||||
"name": "Cancel",
|
||||
"description": "Discard changes made to these objects.",
|
||||
"depends": [ "$location" ]
|
||||
"depends": [ "$log", "$location", "urlService", "navigationService" ]
|
||||
}
|
||||
],
|
||||
"policies": [
|
||||
@@ -117,6 +117,13 @@
|
||||
"templateUrl": "templates/topbar-edit.html"
|
||||
}
|
||||
],
|
||||
"services": [
|
||||
{
|
||||
"key": "urlService",
|
||||
"implementation": "../../general/src/services/UrlService.js",
|
||||
"depends": [ "$location" ]
|
||||
}
|
||||
],
|
||||
"representers": [
|
||||
{
|
||||
"implementation": "representers/EditRepresenter.js",
|
||||
|
||||
@@ -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($location, context) {
|
||||
function CancelAction($log, $location, urlService, navigationService, context) {
|
||||
var domainObject = context.domainObject;
|
||||
|
||||
// Look up the object's "editor.completion" capability;
|
||||
@@ -50,7 +50,11 @@ define(
|
||||
// Discard the current root view (which will be the editing
|
||||
// UI, which will have been pushed atop the Browise UI.)
|
||||
function returnToBrowse() {
|
||||
$location.path("/browse");
|
||||
var urlBrowse = $location.path(urlService.urlForNewTab(
|
||||
"browse",
|
||||
domainObject
|
||||
));
|
||||
$location.path(urlBrowse);
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -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, context) {
|
||||
function SaveAction($location, urlService, navigationService, context) {
|
||||
var domainObject = context.domainObject;
|
||||
|
||||
// Invoke any save behavior introduced by the editor capability;
|
||||
@@ -45,7 +45,7 @@ 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("/browse");
|
||||
return $location.path(urlService.urlForNewTab("browse", domainObject));
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user