Tree search implementation (#2280)

Re-implements search UI using legacy existing search service.
This commit is contained in:
Deep Tailor
2019-02-19 15:34:47 -08:00
committed by Andrew Henry
parent 1c77ef142c
commit 0e30fba72d
4 changed files with 84 additions and 35 deletions

View File

@ -169,15 +169,17 @@ function (
}
function saveAfterClone(clonedObject) {
return domainObject.getCapability("editor").save()
.then(resolveWith(clonedObject));
return this.openmct.editor.save().then(() => {
// Force mutation for search indexing
clonedObject.useCapability('mutation', (model) => {
return model;
});
return clonedObject;
})
}
function finishEditing(clonedObject) {
return domainObject.getCapability("editor").finish()
.then(function () {
return fetchObject(clonedObject.getId());
});
return fetchObject(clonedObject.getId())
}
function onSuccess(object) {

View File

@ -65,11 +65,10 @@ define(
CreateAction.prototype.perform = function () {
var newModel = this.type.getInitialModel(),
openmct = this.openmct,
newObject,
editAction;
newObject;
function onSave() {
openmct.editor.save();
// openmct.editor.save();
}
function onCancel() {
@ -81,7 +80,6 @@ define(
newObject = this.parent.useCapability('instantiation', newModel);
openmct.editor.edit();
editAction = newObject.getCapability("action").getActions("edit")[0];
newObject.getCapability("action").perform("save-as").then(onSave, onCancel);
// TODO: support editing object without saving object first.
// Which means we have to toggle createwizard afterwards. For now,