mirror of
https://github.com/nasa/openmct.git
synced 2024-12-22 06:27:48 +00:00
Merge pull request #2707 from nasa/alternate-control-bar-fixes
[Telemetry Tables] - Alternate control bar fixes
This commit is contained in:
commit
47c388450f
@ -51,6 +51,14 @@ define([
|
||||
view(domainObject, objectPath) {
|
||||
let table = new TelemetryTable(domainObject, openmct);
|
||||
let component;
|
||||
|
||||
let markingProp = {
|
||||
enable: true,
|
||||
useAlternateControlBar: false,
|
||||
rowName: '',
|
||||
rowNamePlural: ''
|
||||
};
|
||||
|
||||
return {
|
||||
show: function (element, editMode) {
|
||||
component = new Vue({
|
||||
@ -60,15 +68,16 @@ define([
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isEditing: editMode
|
||||
}
|
||||
isEditing: editMode,
|
||||
markingProp
|
||||
};
|
||||
},
|
||||
provide: {
|
||||
openmct,
|
||||
table,
|
||||
objectPath
|
||||
},
|
||||
template: '<table-component :isEditing="isEditing" :marking="{enable: true}"/>'
|
||||
template: '<table-component :isEditing="isEditing" :marking="markingProp"/>'
|
||||
});
|
||||
},
|
||||
onEditModeChange(editMode) {
|
||||
|
@ -71,7 +71,7 @@
|
||||
<!-- main controlbar end -->
|
||||
|
||||
<!-- alternate controlbar start -->
|
||||
<div v-if="marking.useAlternateControlBar && markedRows.length"
|
||||
<div v-if="marking.useAlternateControlBar"
|
||||
class="c-table-control-bar c-control-bar"
|
||||
>
|
||||
<div class="c-control-bar__label">
|
||||
@ -86,6 +86,7 @@
|
||||
/>
|
||||
|
||||
<button
|
||||
:class="{'hide-nice': !markedRows.length}"
|
||||
class="c-button icon-x labeled"
|
||||
title="Deselect All"
|
||||
@click="unmarkAllRows()"
|
||||
@ -713,6 +714,10 @@ export default {
|
||||
|
||||
row.marked = false;
|
||||
this.markedRows.splice(positionInMarkedArray, 1);
|
||||
|
||||
if (this.isShowingMarkedRowsOnly) {
|
||||
this.visibleRows.splice(rowIndex, 1);
|
||||
}
|
||||
} else if (this.markedRows.length === 1) {
|
||||
this.unmarkAllRows();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user