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:
Deep Tailor
2019-03-25 18:26:39 -07:00
committed by Andrew Henry
parent 78dccf1e0a
commit a27b3737f1
9 changed files with 75 additions and 158 deletions

View File

@ -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();