Skip to content

Revert "Jeton's interpolation provider" #122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 14, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
node_modules
coverage
bower_components
.idea
2 changes: 1 addition & 1 deletion dist/bootstrap-decorator.min.js

Large diffs are not rendered by default.

21 changes: 0 additions & 21 deletions dist/schema-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -1177,27 +1177,6 @@ angular.module('schemaForm').directive('sfChanged', function() {
};
});

/**
* Sets attributes 'type' and 'placeholder' to input elements
*/
angular.module('schemaForm').directive('sfDefaultInput', [function () {

return {
restrict: 'A',
scope: {
sfType: '=',
sfPlaceholder: '='
},
link: function (scope, element) {

element.attr('type', scope.sfType);
element.attr('placeholder', scope.sfPlaceholder);

}

};

}]);
/*
FIXME: real documentation
<form sf-form="form" sf-schema="schema" sf-decorator="foobar"></form>
Expand Down
2 changes: 1 addition & 1 deletion dist/schema-form.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/directives/decorators/bootstrap/actions.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<div class="btn-group">
<input ng-repeat-start="item in form.items"
type="submit"
class="btn" ng-class="item.style || 'btn-primary'"
ng-value="item.title"
class="btn {{ item.style || 'btn-primary' }}"
value="{{item.title}}"
ng-if="item.type === 'submit'">
<button ng-repeat-end class="btn" ng-class="item.style || 'btn-default'"
<button ng-repeat-end class="btn {{ item.style || 'btn-default' }}"
type="button"
ng-if="item.type !== 'submit'"
ng-click="buttonClick($event,item)" ng-bind="item.title"></button>
ng-click="buttonClick($event,item)">{{item.title}}</button>
</div>
6 changes: 3 additions & 3 deletions src/directives/decorators/bootstrap/array.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div sf-array="form" ng-model="$$value$$" ng-model-options="form.ngModelOptions">
<h3 ng-show="form.title && form.notitle !== true" ng-bind="form.title"></h3>
<h3 ng-show="form.title && form.notitle !== true">{{ form.title }}</h3>
<ol class="list-group" ng-model="modelArray" ui-sortable>
<li class="list-group-item" ng-repeat="item in modelArray track by $index">
<button ng-click="deleteFromArray($index)"
Expand All @@ -13,9 +13,9 @@ <h3 ng-show="form.title && form.notitle !== true" ng-bind="form.title"></h3>
<div class="clearfix" style="padding: 15px;">
<button ng-click="appendToArray()"
type="button"
class="btn pull-right" ng-class="form.style.add || 'btn-default'">
class="btn {{ form.style.add || 'btn-default' }} pull-right">
<i class="glyphicon glyphicon-plus"></i>
<span ng-bind="form.add || 'Add'"></span>
{{ form.add || 'Add'}}
</button>
</div>
<div class="help-block"
Expand Down
2 changes: 1 addition & 1 deletion src/directives/decorators/bootstrap/bootstrap-decorator.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ angular.module('schemaForm').config(['schemaFormDecoratorsProvider', function(de
input: base + 'default.html',
radios: base + 'radios.html',
'radios-inline': base + 'radios-inline.html',
radiobuttons: base + 'radio-buttons.html'
radiobuttons: base + 'radio-buttons.html',
});

}]).directive('sfFieldset', function() {
Expand Down
2 changes: 1 addition & 1 deletion src/directives/decorators/bootstrap/checkboxes.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div sf-array="form" ng-model="$$value$$" class="form-group" ng-class="{'has-error': hasError(), 'has-success': hasSuccess()}">
<label class="control-label" ng-show="showTitle()" ng-bind="form.title"></label>
<label class="control-label" ng-show="showTitle()">{{form.title}}</label>
<div class="checkbox" ng-repeat="val in titleMapValues track by $index" >
<label>
<input type="checkbox"
Expand Down
7 changes: 3 additions & 4 deletions src/directives/decorators/bootstrap/default.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<div class="form-group" ng-class="{'has-error': hasError(), 'has-success': hasSuccess(), 'has-feedback': form.feedback !== false }">
<label class="control-label" ng-show="showTitle()" ng-bind="form.title"></label>
<label class="control-label" ng-show="showTitle()">{{form.title}}</label>

<input ng-show="form.key"
sf-default-input
sf-type="form.type"
sf-placeholder="form.placeholder"
type="{{form.type}}"
sf-changed="form"
placeholder="{{form.placeholder}}"
class="form-control"
ng-model-options="form.ngModelOptions"
ng-model="$$value$$"
Expand Down
2 changes: 1 addition & 1 deletion src/directives/decorators/bootstrap/fieldset-trcl.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<fieldset ng-disabled="form.readonly">
<legend ng-show="form.title" ng-bind="form.title"></legend>
<legend ng-show="form.title">{{ form.title }}</legend>
<div class="help-block" ng-show="form.description" ng-bind-html="form.description"></div>
<div ng-transclude></div>
</fieldset>
2 changes: 1 addition & 1 deletion src/directives/decorators/bootstrap/fieldset.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<fieldset ng-disabled="form.readonly">
<legend ng-show="form.title" ng-bind="form.title"></legend>
<legend ng-show="form.title">{{ form.title }}</legend>
<div class="help-block" ng-show="form.description" ng-bind-html="form.description"></div>
<sf-decorator ng-repeat="item in form.items" form="item"></sf-decorator>
</fieldset>
4 changes: 2 additions & 2 deletions src/directives/decorators/bootstrap/radio-buttons.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<div class="form-group" ng-class="{'has-error': hasError(), 'has-success': hasSuccess()}">
<div>
<label class="control-label" ng-show="showTitle()" ng-bind="form.title"></label>
<label class="control-label" ng-show="showTitle()">{{form.title}}</label>
</div>
<div class="btn-group">
<label class="btn" ng-class="(item.value === $$value$$) ? form.style.selected || 'btn-primary' : form.style.unselected || 'btn-primary'"
<label class="btn {{ (item.value === $$value$$) ? form.style.selected || 'btn-primary' : form.style.unselected || 'btn-primary'; }}"
ng-class="{ active: item.value === $$value$$ }"
ng-repeat="item in form.titleMap">
<input type="radio"
Expand Down
2 changes: 1 addition & 1 deletion src/directives/decorators/bootstrap/radios-inline.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="form-group" ng-class="{'has-error': hasError(), 'has-success': hasSuccess()}">
<label class="control-label" ng-show="showTitle()" ng-bind="form.title"></label>
<label class="control-label" ng-show="showTitle()">{{form.title}}</label>
<div>
<label class="radio-inline" ng-repeat="item in form.titleMap" >
<input type="radio"
Expand Down
2 changes: 1 addition & 1 deletion src/directives/decorators/bootstrap/radios.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="form-group" ng-class="{'has-error': hasError(), 'has-success': hasSuccess()}">
<label class="control-label" ng-show="showTitle()" ng-bind="form.title"></label>
<label class="control-label" ng-show="showTitle()">{{form.title}}</label>
<div class="radio" ng-repeat="item in form.titleMap" >
<label>
<input type="radio"
Expand Down
6 changes: 3 additions & 3 deletions src/directives/decorators/bootstrap/readonly.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="form-group">
<label ng-show="showTitle()" ng-bind="form.title"></label>
<input ng-if="form.type !== 'textarea'" type="text" disabled class="form-control" ng-value="$$value$$">
<textarea ng-if="form.type === 'textarea'" disabled class="form-control" ng-bind="$$value$$"></textarea>
<label ng-show="showTitle()">{{form.title}}</label>
<input ng-if="form.type !== 'textarea'" type="text" disabled class="form-control" value="{{$$value$$}}">
<textarea ng-if="form.type === 'textarea'" disabled class="form-control">{{$$value$$}}</textarea>
<div class="help-block" ng-show="form.description" ng-bind-html="form.description"></div>
</div>
4 changes: 3 additions & 1 deletion src/directives/decorators/bootstrap/select.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<div class="form-group" ng-class="{'has-error': hasError(), 'has-success': hasSuccess(), 'has-feedback': form.feedback !== false}">
<label class="control-label" ng-show="showTitle()" ng-bind="form.title"></label>
<label class="control-label" ng-show="showTitle()">
{{form.title}}
</label>
<select ng-model="$$value$$"
ng-model-options="form.ngModelOptions"
sf-changed="form"
Expand Down
10 changes: 4 additions & 6 deletions src/directives/decorators/bootstrap/submit.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
<div class="form-group">
<input type="submit"
class="btn"
ng-class="form.style || 'btn-primary'"
ng-value="form.title"
class="btn {{ form.style || 'btn-primary' }}"
value="{{form.title}}"
ng-if="form.type === 'submit'">
<button class="btn"
ng-class="form.style || 'btn-default'"
<button class="btn {{ form.style || 'btn-default' }}"
type="button"
ng-click="buttonClick($event,form)"
ng-if="form.type !== 'submit'" ng-bind="form.title"></button>
ng-if="form.type !== 'submit'">{{form.title}}</button>
</div>
13 changes: 6 additions & 7 deletions src/directives/decorators/bootstrap/tabarray.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<li ng-repeat="item in modelArray track by $index"
ng-click="$event.preventDefault() || (selected.tab = $index)"
ng-class="{active: selected.tab === $index}">
<a href="#" ng-bind="evalExpr(form.title,{'$index':$index, value: item}) || $index"></a>
<a href="#">{{evalExpr(form.title,{'$index':$index, value: item}) || $index}}</a>
</li>
<li ng-click="$event.preventDefault() || (selected.tab = appendToArray().length - 1)">
<a href="#">
<i class="glyphicon glyphicon-plus"></i>
<span ng-bind="form.add || 'Add'"></span>
{{ form.add || 'Add'}}
</a>
</li>
</ul>
Expand All @@ -30,10 +30,9 @@

<button ng-click="selected.tab = deleteFromArray($index).length - 1"
type="button"
class="btn pull-right"
ng-class="form.style.remove || 'btn-default'">
class="btn {{ form.style.remove || 'btn-default' }} pull-right">
<i class="glyphicon glyphicon-trash"></i>
<span ng-bind="form.remove || 'Remove'"></span>
{{ form.remove || 'Remove'}}
</button>
</div>
</div>
Expand All @@ -45,12 +44,12 @@
<li ng-repeat="item in modelArray track by $index"
ng-click="$event.preventDefault() || (selected.tab = $index)"
ng-class="{active: selected.tab === $index}">
<a href="#" ng-bind="evalExpr(form.title,{'$index':$index, value: item}) || $index"></a>
<a href="#">{{evalExpr(form.title,{'$index':$index, value: item}) || $index}}</a>
</li>
<li ng-click="$event.preventDefault() || appendToArray()">
<a href="#">
<i class="glyphicon glyphicon-plus"></i>
<span ng-bind="form.add || 'Add'"></span>
{{ form.add || 'Add'}}
</a>
</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion src/directives/decorators/bootstrap/tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<li ng-repeat="tab in form.tabs"
ng-click="$event.preventDefault() || (selected.tab = $index)"
ng-class="{active: selected.tab === $index}">
<a href="#" ng-bind="tab.title"></a>
<a href="#">{{ tab.title }}</a>
</li>
</ul>

Expand Down
4 changes: 2 additions & 2 deletions src/directives/decorators/bootstrap/textarea.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="form-group has-feedback" ng-class="{'has-error': hasError(), 'has-success': hasSuccess()}">
<label ng-show="showTitle()" ng-bind="form.title"></label>
<label ng-show="showTitle()">{{form.title}}</label>
<textarea class="form-control"
sf-changed="form"
ng-model="$$value$$"
Expand All @@ -10,5 +10,5 @@
class="form-control-feedback"
ng-class="evalInScope(form.feedback) || { 'glyphicon': true, 'glyphicon-ok': hasSuccess(), 'glyphicon-remove': hasError() }"></span>
-->
<span class="help-block" ng-bind="(hasError() && errorMessage(schemaError())) || form.description"></span>
<span class="help-block">{{ (hasError() && errorMessage(schemaError())) || form.description}}</span>
</div>
21 changes: 0 additions & 21 deletions src/directives/default-input.js

This file was deleted.