[Forms] Handle disabled state generally

Handle disabled state for items in a toolbar generally,
instead of only in buttons. WTD-684.
This commit is contained in:
Victor Woeltjen 2015-01-15 15:45:19 -08:00
parent 34416090f0
commit 46e17b9496
3 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/*global define*/
/*global define,window*/
define(
[],
@ -21,6 +21,7 @@ define(
description: "X coordinate",
control: "textfield",
pattern: "^\\d+$",
disabled: true,
size: 2,
key: "x"
},

View File

@ -1,6 +1,6 @@
<a href=""
class="t-btn l-btn s-btn s-icon-btn s-very-subtle"
ng-class="{ labeled: structure.text, disabled: structure.disabled }"
ng-class="{ labeled: structure.text }"
ng-click="structure.click()">
<span class="ui-symbol icon">
{{structure.glyph}}

View File

@ -15,9 +15,10 @@
{{item.name}}:
</label>
<mct-control key="item.control"
ng-class="{ disabled: item.disabled }"
ng-model="ngModel"
ng-required="item.required"
ng-pattern="getRegExp(row.pattern)"
ng-pattern="getRegExp(item.pattern)"
options="item.options"
structure="item"
field="item.key">