diff --git a/platform/commonUI/edit/src/actions/RemoveDialog.js b/platform/commonUI/edit/src/actions/RemoveDialog.js index 049b26ba0f..751d9e0560 100644 --- a/platform/commonUI/edit/src/actions/RemoveDialog.js +++ b/platform/commonUI/edit/src/actions/RemoveDialog.js @@ -69,8 +69,8 @@ define([], function () { } ] }; + setTimeout(() => this.removeCallback(domainObject)); - dialog = this.dialogService.showBlockingMessage(model); }; return RemoveDialog; diff --git a/platform/commonUI/edit/src/policies/EditContextualActionPolicy.js b/platform/commonUI/edit/src/policies/EditContextualActionPolicy.js index e974ed06bd..a9e2da3cf7 100644 --- a/platform/commonUI/edit/src/policies/EditContextualActionPolicy.js +++ b/platform/commonUI/edit/src/policies/EditContextualActionPolicy.js @@ -55,16 +55,19 @@ define( navigatedObject = this.navigationService.getNavigation(), actionMetadata = action.getMetadata ? action.getMetadata() : {}; + // FIXME: need to restore support for changing contextual actions + // based on edit mode. // if (navigatedObject.hasCapability("editor") && navigatedObject.getCapability("editor").isEditContextRoot()) { - if (selectedObject.hasCapability("editor") && selectedObject.getCapability("editor").inEditContext()) { - return this.editModeBlacklist.indexOf(actionMetadata.key) === -1; - } else { - //Target is in the context menu - return this.nonEditContextBlacklist.indexOf(actionMetadata.key) === -1; - } + // if (selectedObject.hasCapability("editor") && selectedObject.getCapability("editor").inEditContext()) { + // return this.editModeBlacklist.indexOf(actionMetadata.key) === -1; + // } else { + // //Target is in the context menu + // return this.nonEditContextBlacklist.indexOf(actionMetadata.key) === -1; + // } // } else { // return true; // } + return true; }; return EditContextualActionPolicy; diff --git a/src/MCT.js b/src/MCT.js index 55635cfcb5..d937099cc4 100644 --- a/src/MCT.js +++ b/src/MCT.js @@ -41,6 +41,7 @@ define([ './styles-new/core.scss', './styles-new/notebook.scss', './ui/components/layout/Layout.vue', + '../platform/core/src/capabilities/ContextualDomainObject', 'vue' ], function ( EventEmitter, @@ -63,6 +64,7 @@ define([ coreStyles, NotebookStyles, Layout, + ContextualDomainObject, Vue ) { /** @@ -241,6 +243,34 @@ define([ this.legacyBundle.extensions[category].push(extension); }; + /** + * Return a legacy object, for compatibility purposes only. This method + * will be deprecated and removed in the future. + * @private + */ + MCT.prototype.legacyObject = function (domainObject) { + if (Array.isArray(domainObject)) { + // an array of domain objects. [object, ...ancestors] representing + // a single object with a given chain of ancestors. We instantiate + // as a single contextual domain object. + return domainObject + .map((o) => { + let keyString = objectUtils.makeKeyString(o.identifier); + let oldModel = objectUtils.toOldFormat(o); + return this.$injector.get('instantiate')(oldModel, keyString); + }) + .reverse() + .reduce((parent, child) => { + return new ContextualDomainObject(child, parent); + }); + + } else { + let keyString = objectUtils.makeKeyString(domainObject.identifier); + let oldModel = objectUtils.toOldFormat(domainObject); + return this.$injector.get('instantiate')(oldModel, keyString); + } + }; + /** * Set path to where assets are hosted. This should be the path to main.js. * @memberof module:openmct.MCT# diff --git a/src/api/composition/CompositionCollection.js b/src/api/composition/CompositionCollection.js index 5c5fbd64b7..3834e84c3c 100644 --- a/src/api/composition/CompositionCollection.js +++ b/src/api/composition/CompositionCollection.js @@ -177,7 +177,11 @@ define([ CompositionCollection.prototype.load = function () { return this.provider.load(this.domainObject) .then(function (children) { - return Promise.all(children.map(this.onProviderAdd, this)); + return Promise.all(children.map((c) => this.publicAPI.objects.get(c))); + }.bind(this)) + .then(function (childObjects) { + childObjects.forEach(c => this.add(c, true)); + return childObjects; }.bind(this)) .then(function (children) { this.emit('load'); diff --git a/src/plugins/folderView/components/GridItem.vue b/src/plugins/folderView/components/GridItem.vue new file mode 100644 index 0000000000..ee0d46a4ce --- /dev/null +++ b/src/plugins/folderView/components/GridItem.vue @@ -0,0 +1,160 @@ + + + + + diff --git a/src/plugins/folderView/components/GridView.vue b/src/plugins/folderView/components/GridView.vue index 8fd3a271f7..fcfb1f6b33 100644 --- a/src/plugins/folderView/components/GridView.vue +++ b/src/plugins/folderView/components/GridView.vue @@ -1,28 +1,10 @@ @@ -177,17 +159,11 @@ diff --git a/src/plugins/folderView/components/ListItem.vue b/src/plugins/folderView/components/ListItem.vue new file mode 100644 index 0000000000..c15232913c --- /dev/null +++ b/src/plugins/folderView/components/ListItem.vue @@ -0,0 +1,72 @@ + + + + + diff --git a/src/plugins/folderView/components/ListView.vue b/src/plugins/folderView/components/ListView.vue index e54abd378c..1058fa84f4 100644 --- a/src/plugins/folderView/components/ListView.vue +++ b/src/plugins/folderView/components/ListView.vue @@ -2,60 +2,50 @@
- - - - - - + + + + + + - - - - - - + +
- Name - - Type - - Created Date - - Updated Date -
+ Name + + Type + + Created Date + + Updated Date +
-
- {{item.model.name}} -
{{ item.type.name }}{{ formatTime(item.model.persisted, 'YYYY-MM-DD HH:mm:ss:SSS') }}Z{{ formatTime(item.model.modified, 'YYYY-MM-DD HH:mm:ss:SSS') }}Z
@@ -96,48 +86,16 @@ } } } - - .c-list-item { - &__name { - @include ellipsize(); - } - - &__type-icon { - color: $colorKey; - display: inline-block; - width: 1em; - margin-right:$interiorMarginSm; - } - - &.is-alias { - // Object is an alias to an original. - [class*='__type-icon'] { - &:after { - color: $colorIconAlias; - content: $glyph-icon-link; - font-family: symbolsfont; - display: block; - position: absolute; - text-shadow: rgba(black, 0.5) 0 1px 2px; - top: auto; left: -1px; bottom: 1px; right: auto; - transform-origin: bottom left; - transform: scale(0.65); - } - } - } - } - - - /******************************* LIST ITEM */ diff --git a/src/ui/components/layout/mct-tree.vue b/src/ui/components/layout/mct-tree.vue index b72ae10b38..cd2269ed03 100644 --- a/src/ui/components/layout/mct-tree.vue +++ b/src/ui/components/layout/mct-tree.vue @@ -114,7 +114,7 @@ return { id: this.openmct.objects.makeKeyString(c.identifier), object: c, - path: [c.identifier] + objectPath: [c] }; })) }, diff --git a/src/ui/components/layout/tree-item.vue b/src/ui/components/layout/tree-item.vue index 2596bf3398..c79e9a5070 100644 --- a/src/ui/components/layout/tree-item.vue +++ b/src/ui/components/layout/tree-item.vue @@ -7,7 +7,9 @@ :expanded="expanded" @click="toggleChildren"> - + +