[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( define(
[], [],
@ -21,6 +21,7 @@ define(
description: "X coordinate", description: "X coordinate",
control: "textfield", control: "textfield",
pattern: "^\\d+$", pattern: "^\\d+$",
disabled: true,
size: 2, size: 2,
key: "x" key: "x"
}, },

View File

@ -1,6 +1,6 @@
<a href="" <a href=""
class="t-btn l-btn s-btn s-icon-btn s-very-subtle" 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()"> ng-click="structure.click()">
<span class="ui-symbol icon"> <span class="ui-symbol icon">
{{structure.glyph}} {{structure.glyph}}

View File

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