mirror of
https://github.com/nasa/openmct.git
synced 2025-01-11 23:42:41 +00:00
[Windowing] View Set
Sets the view to bethe current page's view mode. WTD-16.
This commit is contained in:
parent
29efb5cf3b
commit
21462bf60d
@ -57,19 +57,21 @@ define(
|
|||||||
* Open the object in a new tab
|
* Open the object in a new tab
|
||||||
*/
|
*/
|
||||||
perform: function () {
|
perform: function () {
|
||||||
var genPath = [ROOT_ID].concat(($route.current.params.ids || DEFAULT_PATH)),
|
var selectedDomainObject = getSelectedObject(),
|
||||||
selectedDomainObject = getSelectedObject(),
|
mode = "browse",
|
||||||
context = selectedDomainObject &&
|
context = selectedDomainObject &&
|
||||||
selectedDomainObject.getCapability('context'),
|
selectedDomainObject.getCapability('context'),
|
||||||
objectPath = context ? context.getPath() : [],
|
objectPath = context ? context.getPath() : [],
|
||||||
ids = objectPath.map(function (selectedDomainObject) {
|
ids = objectPath.map(function (selectedDomainObject) {
|
||||||
return selectedDomainObject.getId();
|
return selectedDomainObject.getId();
|
||||||
}),
|
}),
|
||||||
viewKey = $location.search().view,
|
viewPath = "?view=" + $location.search().view,
|
||||||
partialPath = "index.html#/browse/" + ids.slice(1).join("/") +
|
partialPath = "index.html#/" + mode + "/" +
|
||||||
"?view=" + viewKey;
|
ids.slice(1).join("/") + viewPath;
|
||||||
|
|
||||||
window.open(partialPath, "_blank");
|
window.open(partialPath, "_blank");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user