Opravena editace globálního nastavení- pokud uživatel nemá práva k

editaci, vidí nastavení jako read only. 
closes #141
This commit is contained in:
2014-09-29 15:42:28 +02:00
parent 1367dc9cdf
commit e16786eda4
6 changed files with 40 additions and 35 deletions
@@ -23,10 +23,10 @@
<template name="model">
<row>
<label value="@load(each)"/>
<textbox value="@bind(vm.settings.refunds[each][0])" inplace="true"/>
<textbox value="@bind(vm.settings.refunds[each][1])" inplace="true"/>
<textbox value="@bind(vm.settings.refunds[each][2])" inplace="true"/>
<textbox value="@bind(vm.settings.refunds[each][3])" inplace="true"/>
<textbox value="@bind(vm.settings.refunds[each][0])" inplace="true" readonly="@load(not vm.canSave)"/>
<textbox value="@bind(vm.settings.refunds[each][1])" inplace="true" readonly="@load(not vm.canSave)"/>
<textbox value="@bind(vm.settings.refunds[each][2])" inplace="true" readonly="@load(not vm.canSave)"/>
<textbox value="@bind(vm.settings.refunds[each][3])" inplace="true" readonly="@load(not vm.canSave)"/>
</row>
</template>
@@ -35,7 +35,7 @@
</tabpanel>
<tabpanel>
<vbox>
<button label="${labels.AddItem}" onClick="@command('addVehicle')" sclass="nicebutton"/>
<button label="${labels.AddItem}" onClick="@command('addVehicle')" sclass="nicebutton" disabled="@load(not vm.canSave)"/>
<grid model="@load(vm.settings.vehicles)">
<columns>
<column label="${labels.code}"/>
@@ -45,9 +45,9 @@
<rows>
<template name="model">
<row>
<textbox inplace="true" value="@bind(each.code)"/>
<textbox inplace="true" value="@bind(each.description)"/>
<button label="${labels.RemoveItem}" onClick="@command('removeVehicle', vehicle=each)"/>
<textbox inplace="true" value="@bind(each.code)" readonly="@load(not vm.canSave)"/>
<textbox inplace="true" value="@bind(each.description)" readonly="@load(not vm.canSave)"/>
<button label="${labels.RemoveItem}" onClick="@command('removeVehicle', vehicle=each)" disabled="@load(not vm.canSave)"/>
</row>
</template>
</rows>