context menu and shared object link generation (#2199)

* temporarily disable remove dialog which is broken

* temporarily remove broken context action policy

* let openmct generate legacy objects

* ensure composition loads in specified order

* redo nav and add context menu support to tree

* componentize grid and list view, add context menus
This commit is contained in:
Pete Richards
2018-11-08 17:21:18 -08:00
committed by GitHub
parent 1069a45cfc
commit ff7df9ad1e
14 changed files with 417 additions and 171 deletions

View File

@@ -1,28 +1,10 @@
<template>
<div class="l-grid-view">
<div v-for="(item, index) in items"
v-bind:key="index"
class="l-grid-view__item c-grid-item"
:class="{ 'is-alias': item.isAlias === true }"
@click="navigate(item)">
<div class="c-grid-item__type-icon"
:class="(item.type.cssClass != undefined) ? 'bg-' + item.type.cssClass : 'bg-icon-object-unknown'">
</div>
<div class="c-grid-item__details">
<!-- Name and metadata -->
<div class="c-grid-item__name"
:title="item.model.name">{{item.model.name}}</div>
<div class="c-grid-item__metadata"
:title="item.type.name">
<span class="c-grid-item__metadata__type">{{item.type.name}}</span>
</div>
</div>
<div class="c-grid-item__controls">
<div class="icon-people" title='Shared'></div>
<button class="c-click-icon icon-info c-info-button" title='More Info'></button>
<div class="icon-pointer-right c-pointer-icon"></div>
</div>
</div>
<grid-item v-for="(item, index) in items"
:key="index"
:item="item"
:object-path="item.objectPath">
</grid-item>
</div>
</template>
@@ -177,17 +159,11 @@
<script>
import compositionLoader from './composition-loader';
import GridItem from './GridItem.vue';
export default {
components: {GridItem},
mixins: [compositionLoader],
inject: ['domainObject', 'openmct'],
methods: {
navigate(item) {
let currentLocation = this.openmct.router.currentLocation.path,
navigateToPath = `${currentLocation}/${this.openmct.objects.makeKeyString(item.model.identifier)}`;
this.openmct.router.setPath(navigateToPath);
}
}
inject: ['openmct']
}
</script>