mirror of
https://github.com/nasa/openmct.git
synced 2025-06-23 09:25:29 +00:00
Tree search implementation (#2280)
Re-implements search UI using legacy existing search service.
This commit is contained in:
committed by
Andrew Henry
parent
1c77ef142c
commit
0e30fba72d
@ -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) {
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user