Global and Local Clear (#2418)
* first proto of global clear, working on tables * global clear works on plots * styling * Status bar migration to top of layout, WIP - Refine and remove legacy styles for Indicators; - Significant cleanup in Indicator markup; - Remove unnecessary wrapper component StatusBar.vue; - Move collapse-button styles to a more general location in _controls .scss; - New hasMenu mixin to allow easier application of disclosure control styling; * Status bar migration to top of layout, WIP - Refine styles and markup for Indicators; - Better separation of styles for clickable and non-clickable Indicators; * Status bar migration to top of layout, WIP - Added tracking style to indicator-template; - Moved click action to button in label of globalClearIndicator; - Removed unnecessary markup in Indicators.vue; - Commented out __head collapse button for now in Layout.vue; * Status Bar Migration WIP - Significant progress styling Indicators and their hover bubbles; - Pull back from clickable Indicators to hover approach; - Better theme-based constants for Indicator menu-related colors; * Status Bar Migration WIP - Significant refactor of label element naming in multiple indicator markup files; - Refactor label-related CSS; - Better class naming: no-collapse > no-minify; - Refactor example *-launch files to use buttons instead of <a> tags; - Significant progress on expanding shell head and button styling; * Status Bar Migration WIP - Cleanups, sanding on Indicator CSS; - Added local storage retention for head expanded state; - Adjust dark theme colors for $colorWarningHi for better legibility; - Other minor tweaks and fixes; * Status Bar Migration WIP - Suppress background in Indicators; - Restore Snow as default theme; * add a local clear action, rename plugin * objectViews extends eventemitter, table view provider provides an onClearData function that is called from ObjectView when clear event is emitted. TODO - support plots * add support for plots via legacy view provider * add test for clearDataAction * remove focus from test file * install the following plugins by default: Import Export Folder View Tabs View Flexible Layout LAD Table Go To Original Action * update test to include plugin level tests * remove focus from unit test
This commit is contained in:
committed by
Andrew Henry
parent
9517c1f2cd
commit
362e565a09
@@ -61,6 +61,8 @@ export default {
|
||||
if (this.composition) {
|
||||
this.composition._destroy();
|
||||
}
|
||||
|
||||
this.openmct.objectViews.off('clearData', this.clearData);
|
||||
},
|
||||
invokeEditModeHandler(editMode) {
|
||||
this.currentView.onEditModeChange(editMode);
|
||||
@@ -112,6 +114,8 @@ export default {
|
||||
this.removeSelectable = openmct.selection.selectable(
|
||||
this.$el, this.getSelectionContext(), true);
|
||||
}
|
||||
|
||||
this.openmct.objectViews.on('clearData', this.clearData);
|
||||
},
|
||||
show(object, viewKey, immediatelySelect) {
|
||||
if (this.unlisten) {
|
||||
@@ -187,6 +191,22 @@ export default {
|
||||
getComposableDomainObject(event) {
|
||||
let serializedDomainObject = event.dataTransfer.getData('openmct/composable-domain-object');
|
||||
return JSON.parse(serializedDomainObject);
|
||||
},
|
||||
clearData(domainObject) {
|
||||
if (domainObject) {
|
||||
let clearKeyString = this.openmct.objects.makeKeyString(domainObject.identifier),
|
||||
currentObjectKeyString = this.openmct.objects.makeKeyString(this.currentObject.identifier);
|
||||
|
||||
if (clearKeyString === currentObjectKeyString) {
|
||||
if (this.currentView.onClearData) {
|
||||
this.currentView.onClearData();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (this.currentView.onClearData) {
|
||||
this.currentView.onClearData();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user