mirror of
https://github.com/nasa/openmct.git
synced 2025-06-19 23:53:49 +00:00
Fixes testathon 3/21 (#2328)
* fix error in location.vue because of drawing objects in selection * add conditional to check if view is editable before forcing edit after create * show original location only in inspector, add original location for drawing objects * fix document title * set document title in browse.js * sort items in create menu * sort children in tree by name * remove ordering from tree items * add loading spinner * fix minor bug
This commit is contained in:
committed by
Andrew Henry
parent
78dccf1e0a
commit
a27b3737f1
@ -71,6 +71,12 @@ define(
|
||||
openmct.editor.cancel();
|
||||
}
|
||||
|
||||
function isFirstViewEditable(domainObject) {
|
||||
let firstView = openmct.objectViews.get(domainObject)[0];
|
||||
|
||||
return firstView && firstView.canEdit && firstView.canEdit(domainObject);
|
||||
}
|
||||
|
||||
function navigateAndEdit(object) {
|
||||
let objectPath = object.getCapability('context').getPath(),
|
||||
url = '#/browse/' + objectPath
|
||||
@ -82,7 +88,9 @@ define(
|
||||
|
||||
window.location.href = url;
|
||||
|
||||
openmct.editor.edit();
|
||||
if (isFirstViewEditable(object.useCapability('adapter'))) {
|
||||
openmct.editor.edit();
|
||||
}
|
||||
}
|
||||
|
||||
newModel.type = this.type.getKey();
|
||||
|
Reference in New Issue
Block a user