mirror of
https://github.com/nasa/openmct.git
synced 2025-06-18 23:28:14 +00:00
Lock views and prevent editing (#3094)
* working lock and unlock * prevent flexible layout drop hints from showing * fix lint issue * wip * disable mousedown when not editing in DisplayLayout * continued wip * Cherrypick new glyphs from add-new-glyphs-062320 * More new glyphs, updated art - New glyphs: icon-unlocked and icon-target; - Updated art for icon-lock glyph; * Edit toggle refinements WIP - Markup, CSS in BrowseBar.vue; * More new glyphs, updated art - New glyphs: icon-unlocked and icon-target; - Updated art for icon-lock glyph; * Edit toggle refinements - Replaced toggle switch with button; * prevent styling changes when locked * fix lint issues * fix tests * make reviewer suggested changes Co-authored-by: charlesh88 <charlesh88@gmail.com>
This commit is contained in:
@ -37,12 +37,13 @@
|
||||
>
|
||||
<style-editor class="c-inspect-styles__editor"
|
||||
:style-item="staticStyle"
|
||||
:is-editing="isEditing"
|
||||
:is-editing="allowEditing"
|
||||
:mixed-styles="mixedStyles"
|
||||
@persist="updateStaticStyle"
|
||||
/>
|
||||
</div>
|
||||
<button
|
||||
v-if="allowEditing"
|
||||
id="addConditionSet"
|
||||
class="c-button c-button--major c-toggle-styling-button labeled"
|
||||
@click="addConditionSet"
|
||||
@ -63,7 +64,7 @@
|
||||
>
|
||||
<span class="c-object-label__name">{{ conditionSetDomainObject.name }}</span>
|
||||
</a>
|
||||
<template v-if="isEditing">
|
||||
<template v-if="allowEditing">
|
||||
<button
|
||||
id="changeConditionSet"
|
||||
class="c-button labeled"
|
||||
@ -96,7 +97,7 @@
|
||||
/>
|
||||
<style-editor class="c-inspect-styles__editor"
|
||||
:style-item="conditionStyle"
|
||||
:is-editing="isEditing"
|
||||
:is-editing="allowEditing"
|
||||
@persist="updateConditionalStyle"
|
||||
/>
|
||||
</div>
|
||||
@ -137,7 +138,13 @@ export default {
|
||||
conditions: undefined,
|
||||
conditionsLoaded: false,
|
||||
navigateToPath: '',
|
||||
selectedConditionId: ''
|
||||
selectedConditionId: '',
|
||||
locked: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
allowEditing() {
|
||||
return this.isEditing && !this.locked;
|
||||
}
|
||||
},
|
||||
destroyed() {
|
||||
@ -224,7 +231,13 @@ export default {
|
||||
this.selection.forEach((selectionItem) => {
|
||||
const item = selectionItem[0].context.item;
|
||||
const layoutItem = selectionItem[0].context.layoutItem;
|
||||
const layoutDomainObject = selectionItem[0].context.item;
|
||||
const isChildItem = selectionItem.length > 1;
|
||||
|
||||
if (layoutDomainObject && layoutDomainObject.locked) {
|
||||
this.locked = true;
|
||||
}
|
||||
|
||||
if (!isChildItem) {
|
||||
domainObject = item;
|
||||
itemStyle = getApplicableStylesForItem(item);
|
||||
|
Reference in New Issue
Block a user