mirror of
https://github.com/nasa/openmct.git
synced 2024-12-21 22:17:49 +00:00
[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:
parent
34416090f0
commit
46e17b9496
@ -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"
|
||||||
},
|
},
|
||||||
|
@ -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}}
|
||||||
|
@ -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">
|
||||||
|
Loading…
Reference in New Issue
Block a user