Skip to content

Commit e738bef

Browse files
author
MattRawson
committed
- Removed all the hardcoded interpolation characters in the template files.
- Created default-input.js as a workaround to set placeholder and type attributes.
1 parent 764599d commit e738bef

18 files changed

+61
-37
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
22
coverage
33
bower_components
4+
.idea
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<div class="btn-group">
22
<input ng-repeat-start="item in form.items"
33
type="submit"
4-
class="btn {{ item.style || 'btn-primary' }}"
5-
value="{{item.title}}"
4+
class="btn" ng-class="item.style || 'btn-primary'"
5+
ng-value="item.title"
66
ng-if="item.type === 'submit'">
7-
<button ng-repeat-end class="btn {{ item.style || 'btn-default' }}"
7+
<button ng-repeat-end class="btn" ng-class="item.style || 'btn-default'"
88
type="button"
99
ng-if="item.type !== 'submit'"
10-
ng-click="buttonClick($event,item)">{{item.title}}</button>
10+
ng-click="buttonClick($event,item)" ng-bind="item.title"></button>
1111
</div>

src/directives/decorators/bootstrap/array.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div sf-array="form" ng-model="$$value$$" ng-model-options="form.ngModelOptions">
2-
<h3 ng-show="form.title && form.notitle !== true">{{ form.title }}</h3>
2+
<h3 ng-show="form.title && form.notitle !== true" ng-bind="form.title"></h3>
33
<ol class="list-group" ng-model="modelArray" ui-sortable>
44
<li class="list-group-item" ng-repeat="item in modelArray track by $index">
55
<button ng-click="deleteFromArray($index)"
@@ -13,9 +13,9 @@ <h3 ng-show="form.title && form.notitle !== true">{{ form.title }}</h3>
1313
<div class="clearfix" style="padding: 15px;">
1414
<button ng-click="appendToArray()"
1515
type="button"
16-
class="btn {{ form.style.add || 'btn-default' }} pull-right">
16+
class="btn pull-right" ng-class="form.style.add || 'btn-default'">
1717
<i class="glyphicon glyphicon-plus"></i>
18-
{{ form.add || 'Add'}}
18+
<span ng-bind="form.add || 'Add'"></span>
1919
</button>
2020
</div>
2121
<div class="help-block"

src/directives/decorators/bootstrap/bootstrap-decorator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ angular.module('schemaForm').config(['schemaFormDecoratorsProvider', function(de
4646
input: base + 'default.html',
4747
radios: base + 'radios.html',
4848
'radios-inline': base + 'radios-inline.html',
49-
radiobuttons: base + 'radio-buttons.html',
49+
radiobuttons: base + 'radio-buttons.html'
5050
});
5151

5252
}]).directive('sfFieldset', function() {

src/directives/decorators/bootstrap/checkboxes.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div sf-array="form" ng-model="$$value$$" class="form-group" ng-class="{'has-error': hasError(), 'has-success': hasSuccess()}">
2-
<label class="control-label" ng-show="showTitle()">{{form.title}}</label>
2+
<label class="control-label" ng-show="showTitle()" ng-bind="form.title"></label>
33
<div class="checkbox" ng-repeat="val in titleMapValues track by $index" >
44
<label>
55
<input type="checkbox"

src/directives/decorators/bootstrap/default.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<div class="form-group" ng-class="{'has-error': hasError(), 'has-success': hasSuccess(), 'has-feedback': form.feedback !== false }">
2-
<label class="control-label" ng-show="showTitle()">{{form.title}}</label>
2+
<label class="control-label" ng-show="showTitle()" ng-bind="form.title"></label>
33

44
<input ng-show="form.key"
5-
type="{{form.type}}"
5+
sf-default-input
6+
sf-type="form.type"
7+
sf-placeholder="form.placeholder"
68
sf-changed="form"
7-
placeholder="{{form.placeholder}}"
89
class="form-control"
910
ng-model-options="form.ngModelOptions"
1011
ng-model="$$value$$"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<fieldset ng-disabled="form.readonly">
2-
<legend ng-show="form.title">{{ form.title }}</legend>
2+
<legend ng-show="form.title" ng-bind="form.title"></legend>
33
<div class="help-block" ng-show="form.description" ng-bind-html="form.description"></div>
44
<div ng-transclude></div>
55
</fieldset>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<fieldset ng-disabled="form.readonly">
2-
<legend ng-show="form.title">{{ form.title }}</legend>
2+
<legend ng-show="form.title" ng-bind="form.title"></legend>
33
<div class="help-block" ng-show="form.description" ng-bind-html="form.description"></div>
44
<sf-decorator ng-repeat="item in form.items" form="item"></sf-decorator>
55
</fieldset>

src/directives/decorators/bootstrap/radio-buttons.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<div class="form-group" ng-class="{'has-error': hasError(), 'has-success': hasSuccess()}">
22
<div>
3-
<label class="control-label" ng-show="showTitle()">{{form.title}}</label>
3+
<label class="control-label" ng-show="showTitle()" ng-bind="form.title"></label>
44
</div>
55
<div class="btn-group">
6-
<label class="btn {{ (item.value === $$value$$) ? form.style.selected || 'btn-primary' : form.style.unselected || 'btn-primary'; }}"
6+
<label class="btn" ng-class="(item.value === $$value$$) ? form.style.selected || 'btn-primary' : form.style.unselected || 'btn-primary'"
77
ng-class="{ active: item.value === $$value$$ }"
88
ng-repeat="item in form.titleMap">
99
<input type="radio"

src/directives/decorators/bootstrap/radios-inline.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="form-group" ng-class="{'has-error': hasError(), 'has-success': hasSuccess()}">
2-
<label class="control-label" ng-show="showTitle()">{{form.title}}</label>
2+
<label class="control-label" ng-show="showTitle()" ng-bind="form.title"></label>
33
<div>
44
<label class="radio-inline" ng-repeat="item in form.titleMap" >
55
<input type="radio"

0 commit comments

Comments
 (0)