[Forms] Add button control

Add an mct-control for buttons, for use in toolbars.
WTD-684.
This commit is contained in:
Victor Woeltjen 2015-01-15 15:26:27 -08:00
parent 4b51c37067
commit b5393ae9da
3 changed files with 17 additions and 2 deletions

View File

@ -34,6 +34,10 @@
"key": "textfield", "key": "textfield",
"templateUrl": "templates/controls/textfield.html" "templateUrl": "templates/controls/textfield.html"
}, },
{
"key": "button",
"templateUrl": "templates/controls/button.html"
},
{ {
"key": "composite", "key": "composite",
"templateUrl": "templates/controls/composite.html" "templateUrl": "templates/controls/composite.html"

View File

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

View File

@ -3,12 +3,12 @@
<div class="form"> <div class="form">
<span ng-repeat="section in structure.sections" <span ng-repeat="section in structure.sections"
class="control-group coordinates" class="control-group coordinates"
title="section.description"> title="{{section.description}}">
<ng-form ng-repeat="item in section.items" <ng-form ng-repeat="item in section.items"
ng-class="{ 'input-labeled': item.name }" ng-class="{ 'input-labeled': item.name }"
class="inline" class="inline"
title="item.description" title="{{item.description}}"
name="mctFormInner"> name="mctFormInner">
<label ng-if="item.name"> <label ng-if="item.name">