This commit is contained in:
Paolo Possanzini
2018-04-03 15:05:57 +02:00
parent 7427cb85e2
commit d61a4bc871
3 changed files with 10 additions and 5 deletions
+5 -3
View File
@@ -12,7 +12,8 @@
</header>
<div class="title" >{{'maint_' + selectedSection | localize('maint_' + selectedSection) }}</div>
<section class="scrollable">
<group-soft-key v-for="b in sectionButtons(selectedSection)" :key="b.id"
<div v-for="b in sectionButtons(selectedSection)" :key="b.id">
<group-soft-key
v-if="b.type==2" :title="'softkey_' + b.id | localize('softkey_' + b.id)"
:selected="false"
:subkeys="b.subKeys"
@@ -20,15 +21,16 @@
:activeSubKeys="getSubKeysActive(b.subKeys)"
@position="setSoftKeyPosition"
@click="toggleMenu(b)"></group-soft-key>
<on-off-soft-key v-for="b in sectionButtons(selectedSection)" :key="b.id"
<on-off-soft-key
:disabled="!getSoftKeyActive(b.id)"
v-if="b.type==0" :title="'softkey_' + b.id | localize('softkey_' + b.id)"
:checked="getSoftKeyStatus(b.id)"
@checkChanged="softKeyChanged(b.id)"></on-off-soft-key>
<procedure-soft-key v-for="b in sectionButtons(selectedSection)" :key="b.id"
<procedure-soft-key
:disabled="!getSoftKeyActive(b.id)"
@click="softKeyChanged(b.id)"
v-if="b.type==1" :title="'softkey_' + b.id | localize('softkey_' + b.id)" ></procedure-soft-key>
</div>
</section>
<group-soft-key v-if="selectedSoftKey!=null"
:title="'softkey_' + selectedSoftKey.id | localize('softkey_' + selectedSoftKey.id)"
@@ -41,12 +41,12 @@ export default {
methods: {
getSoftKeyStatus(id) {
if (this.subkeysStatus)
return this.subkeysStatus[id] || false;
return this.subkeysStatus[id] || false;
return false;
},
getSoftKeyActive(id) {
if(this.activeSubKeys)
return this.activeSubKeys[id] || false;
return this.activeSubKeys[id] || false;
return false;
},
getSubKeyText(value) {
@@ -33,6 +33,9 @@ export default {
this.ischecked = n;
}
},
mounted: function() {
this.ischecked = this.checked;
},
methods: {
toggleCheck() {
this.$emit("checkChanged");