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