Skip to content

Commit 14b4e0e

Browse files
committed
Merge pull request #122 from Textalk/revert-116-jeton_interpolation_provider
Revert "Jeton's interpolation provider"
2 parents 2b9d7b5 + cf44b6e commit 14b4e0e

21 files changed

+39
-84
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
node_modules
22
coverage
33
bower_components
4-
.idea

dist/bootstrap-decorator.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/schema-form.js

-21
Original file line numberDiff line numberDiff line change
@@ -1177,27 +1177,6 @@ angular.module('schemaForm').directive('sfChanged', function() {
11771177
};
11781178
});
11791179

1180-
/**
1181-
* Sets attributes 'type' and 'placeholder' to input elements
1182-
*/
1183-
angular.module('schemaForm').directive('sfDefaultInput', [function () {
1184-
1185-
return {
1186-
restrict: 'A',
1187-
scope: {
1188-
sfType: '=',
1189-
sfPlaceholder: '='
1190-
},
1191-
link: function (scope, element) {
1192-
1193-
element.attr('type', scope.sfType);
1194-
element.attr('placeholder', scope.sfPlaceholder);
1195-
1196-
}
1197-
1198-
};
1199-
1200-
}]);
12011180
/*
12021181
FIXME: real documentation
12031182
<form sf-form="form" sf-schema="schema" sf-decorator="foobar"></form>

dist/schema-form.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
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" ng-class="item.style || 'btn-primary'"
5-
ng-value="item.title"
4+
class="btn {{ item.style || 'btn-primary' }}"
5+
value="{{item.title}}"
66
ng-if="item.type === 'submit'">
7-
<button ng-repeat-end class="btn" ng-class="item.style || 'btn-default'"
7+
<button ng-repeat-end class="btn {{ item.style || 'btn-default' }}"
88
type="button"
99
ng-if="item.type !== 'submit'"
10-
ng-click="buttonClick($event,item)" ng-bind="item.title"></button>
10+
ng-click="buttonClick($event,item)">{{item.title}}</button>
1111
</div>

src/directives/decorators/bootstrap/array.html

+3-3
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" ng-bind="form.title"></h3>
2+
<h3 ng-show="form.title && form.notitle !== true">{{ 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" ng-bind="form.title"></h3>
1313
<div class="clearfix" style="padding: 15px;">
1414
<button ng-click="appendToArray()"
1515
type="button"
16-
class="btn pull-right" ng-class="form.style.add || 'btn-default'">
16+
class="btn {{ form.style.add || 'btn-default' }} pull-right">
1717
<i class="glyphicon glyphicon-plus"></i>
18-
<span ng-bind="form.add || 'Add'"></span>
18+
{{ form.add || 'Add'}}
1919
</button>
2020
</div>
2121
<div class="help-block"

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

+1-1
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

+1-1
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()" ng-bind="form.title"></label>
2+
<label class="control-label" ng-show="showTitle()">{{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

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
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()" ng-bind="form.title"></label>
2+
<label class="control-label" ng-show="showTitle()">{{form.title}}</label>
33

44
<input ng-show="form.key"
5-
sf-default-input
6-
sf-type="form.type"
7-
sf-placeholder="form.placeholder"
5+
type="{{form.type}}"
86
sf-changed="form"
7+
placeholder="{{form.placeholder}}"
98
class="form-control"
109
ng-model-options="form.ngModelOptions"
1110
ng-model="$$value$$"
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<fieldset ng-disabled="form.readonly">
2-
<legend ng-show="form.title" ng-bind="form.title"></legend>
2+
<legend ng-show="form.title">{{ 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>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<fieldset ng-disabled="form.readonly">
2-
<legend ng-show="form.title" ng-bind="form.title"></legend>
2+
<legend ng-show="form.title">{{ 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

+2-2
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()" ng-bind="form.title"></label>
3+
<label class="control-label" ng-show="showTitle()">{{form.title}}</label>
44
</div>
55
<div class="btn-group">
6-
<label class="btn" ng-class="(item.value === $$value$$) ? form.style.selected || 'btn-primary' : form.style.unselected || 'btn-primary'"
6+
<label class="btn {{ (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

+1-1
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()" ng-bind="form.title"></label>
2+
<label class="control-label" ng-show="showTitle()">{{form.title}}</label>
33
<div>
44
<label class="radio-inline" ng-repeat="item in form.titleMap" >
55
<input type="radio"

src/directives/decorators/bootstrap/radios.html

+1-1
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()" ng-bind="form.title"></label>
2+
<label class="control-label" ng-show="showTitle()">{{form.title}}</label>
33
<div class="radio" ng-repeat="item in form.titleMap" >
44
<label>
55
<input type="radio"
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="form-group">
2-
<label ng-show="showTitle()" ng-bind="form.title"></label>
3-
<input ng-if="form.type !== 'textarea'" type="text" disabled class="form-control" ng-value="$$value$$">
4-
<textarea ng-if="form.type === 'textarea'" disabled class="form-control" ng-bind="$$value$$"></textarea>
2+
<label ng-show="showTitle()">{{form.title}}</label>
3+
<input ng-if="form.type !== 'textarea'" type="text" disabled class="form-control" value="{{$$value$$}}">
4+
<textarea ng-if="form.type === 'textarea'" disabled class="form-control">{{$$value$$}}</textarea>
55
<div class="help-block" ng-show="form.description" ng-bind-html="form.description"></div>
66
</div>

src/directives/decorators/bootstrap/select.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
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()" ng-bind="form.title"></label>
2+
<label class="control-label" ng-show="showTitle()">
3+
{{form.title}}
4+
</label>
35
<select ng-model="$$value$$"
46
ng-model-options="form.ngModelOptions"
57
sf-changed="form"
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
<div class="form-group">
22
<input type="submit"
3-
class="btn"
4-
ng-class="form.style || 'btn-primary'"
5-
ng-value="form.title"
3+
class="btn {{ form.style || 'btn-primary' }}"
4+
value="{{form.title}}"
65
ng-if="form.type === 'submit'">
7-
<button class="btn"
8-
ng-class="form.style || 'btn-default'"
6+
<button class="btn {{ form.style || 'btn-default' }}"
97
type="button"
108
ng-click="buttonClick($event,form)"
11-
ng-if="form.type !== 'submit'" ng-bind="form.title"></button>
9+
ng-if="form.type !== 'submit'">{{form.title}}</button>
1210
</div>

src/directives/decorators/bootstrap/tabarray.html

+6-7
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
<li ng-repeat="item in modelArray track by $index"
99
ng-click="$event.preventDefault() || (selected.tab = $index)"
1010
ng-class="{active: selected.tab === $index}">
11-
<a href="#" ng-bind="evalExpr(form.title,{'$index':$index, value: item}) || $index"></a>
11+
<a href="#">{{evalExpr(form.title,{'$index':$index, value: item}) || $index}}</a>
1212
</li>
1313
<li ng-click="$event.preventDefault() || (selected.tab = appendToArray().length - 1)">
1414
<a href="#">
1515
<i class="glyphicon glyphicon-plus"></i>
16-
<span ng-bind="form.add || 'Add'"></span>
16+
{{ form.add || 'Add'}}
1717
</a>
1818
</li>
1919
</ul>
@@ -30,10 +30,9 @@
3030

3131
<button ng-click="selected.tab = deleteFromArray($index).length - 1"
3232
type="button"
33-
class="btn pull-right"
34-
ng-class="form.style.remove || 'btn-default'">
33+
class="btn {{ form.style.remove || 'btn-default' }} pull-right">
3534
<i class="glyphicon glyphicon-trash"></i>
36-
<span ng-bind="form.remove || 'Remove'"></span>
35+
{{ form.remove || 'Remove'}}
3736
</button>
3837
</div>
3938
</div>
@@ -45,12 +44,12 @@
4544
<li ng-repeat="item in modelArray track by $index"
4645
ng-click="$event.preventDefault() || (selected.tab = $index)"
4746
ng-class="{active: selected.tab === $index}">
48-
<a href="#" ng-bind="evalExpr(form.title,{'$index':$index, value: item}) || $index"></a>
47+
<a href="#">{{evalExpr(form.title,{'$index':$index, value: item}) || $index}}</a>
4948
</li>
5049
<li ng-click="$event.preventDefault() || appendToArray()">
5150
<a href="#">
5251
<i class="glyphicon glyphicon-plus"></i>
53-
<span ng-bind="form.add || 'Add'"></span>
52+
{{ form.add || 'Add'}}
5453
</a>
5554
</li>
5655
</ul>

src/directives/decorators/bootstrap/tabs.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<li ng-repeat="tab in form.tabs"
44
ng-click="$event.preventDefault() || (selected.tab = $index)"
55
ng-class="{active: selected.tab === $index}">
6-
<a href="#" ng-bind="tab.title"></a>
6+
<a href="#">{{ tab.title }}</a>
77
</li>
88
</ul>
99

src/directives/decorators/bootstrap/textarea.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="form-group has-feedback" ng-class="{'has-error': hasError(), 'has-success': hasSuccess()}">
2-
<label ng-show="showTitle()" ng-bind="form.title"></label>
2+
<label ng-show="showTitle()">{{form.title}}</label>
33
<textarea class="form-control"
44
sf-changed="form"
55
ng-model="$$value$$"
@@ -10,5 +10,5 @@
1010
class="form-control-feedback"
1111
ng-class="evalInScope(form.feedback) || { 'glyphicon': true, 'glyphicon-ok': hasSuccess(), 'glyphicon-remove': hasError() }"></span>
1212
-->
13-
<span class="help-block" ng-bind="(hasError() && errorMessage(schemaError())) || form.description"></span>
13+
<span class="help-block">{{ (hasError() && errorMessage(schemaError())) || form.description}}</span>
1414
</div>

src/directives/default-input.js

-21
This file was deleted.

0 commit comments

Comments
 (0)