Compare commits

...

3 Commits

Author SHA1 Message Date
8c56edc5fa Fix transactions (#4396) 2021-10-29 09:20:37 -07:00
eadcd2dead [FolderGridView] Allow more consistent drag and drop (#4391)
* also fix lint warning introduced outside of this PR
2021-10-28 15:01:19 -07:00
c36fa211d2 Change version to 1.8.0 2021-10-26 14:21:17 -07:00
3 changed files with 12 additions and 21 deletions

View File

@ -1,6 +1,6 @@
{
"name": "openmct",
"version": "1.7.8",
"version": "1.8.0",
"description": "The Open MCT core platform",
"devDependencies": {
"@braintree/sanitize-url": "^5.0.2",

View File

@ -96,8 +96,7 @@ function (
SaveAsAction.prototype.save = function () {
var self = this,
domainObject = this.domainObject,
dialog = new SaveInProgressDialog(this.dialogService),
toUndirty = [];
dialog = new SaveInProgressDialog(this.dialogService);
function doWizardSave(parent) {
var wizard = self.createWizard(parent);
@ -132,11 +131,14 @@ function (
return fetchObject(object.getModel().location);
}
function saveObject(parent) {
return self.openmct.editor.save().then(() => {
// Force mutation for search indexing
return parent;
});
function saveObject(object) {
//persist the object, which adds it to the transaction and then call editor.save
return object.getCapability("persistence").persist()
.then(() => {
return self.openmct.editor.save().then(() => {
return object;
});
});
}
function addSavedObjectToParent(parent) {
@ -150,17 +152,6 @@ function (
});
}
function undirty(object) {
return object.getCapability('persistence').refresh();
}
function undirtyOriginals(object) {
return object.getCapability("persistence").persist()
.then(function () {
return object;
});
}
function indexForSearch(addedObject) {
addedObject.useCapability('mutation', (model) => {
return model;
@ -187,10 +178,9 @@ function (
return getParent(domainObject)
.then(doWizardSave)
.then(showBlockingDialog)
.then(getParent)
.then(saveObject)
.then(getParent)
.then(addSavedObjectToParent)
.then(undirtyOriginals)
.then((addedObject) => {
return fetchObject(addedObject.getId());
})

View File

@ -3,6 +3,7 @@
display: flex;
flex-flow: column nowrap;
overflow: auto;
height: 100%;
&__item {
flex: 0 0 auto;