Skip to content

Commit 2904785

Browse files
committed
Merge branch 'b12consulting-master-upstream'
2 parents 74a5fe3 + d4e40a5 commit 2904785

File tree

6 files changed

+27
-5
lines changed

6 files changed

+27
-5
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,21 @@ See the documentation at http://www.forms-angular.org
1010

1111

1212

13+
## Installation of forms-angular
14+
Recommended: use yeoman generator.
15+
16+
Alternative: you can install both front-end and back-end modules:
17+
````
18+
npm install --save forms-angular
19+
bower install --save forms-angular
20+
````
21+
22+
## For developers of forms-angular
23+
````
24+
npm install -g tsd
25+
tsd update -so
26+
````
27+
Prepare a new release:
28+
````
29+
gulp all
30+
````

dist/forms-angular.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,7 @@ var fng;
544544
common += 'class="fng-select2' + allInputsVars.formControl + allInputsVars.compactClass + allInputsVars.sizeClassBS2 + '"';
545545
common += (fieldInfo.readonly ? ' readonly' : '');
546546
common += (fieldInfo.required ? ' ng-required="true"' : '');
547+
common += fieldInfo.add ? (' ' + fieldInfo.add + ' ') : '';
547548
if (fieldInfo.select2.fngAjax) {
548549
if (cssFrameworkService.framework() === 'bs2') {
549550
value = '<div class="input-append">';
@@ -565,6 +566,7 @@ var fng;
565566
}
566567
else {
567568
common += (fieldInfo.readonly ? 'disabled ' : '');
569+
common += fieldInfo.add ? (' ' + fieldInfo.add + ' ') : '';
568570
value = '<select ' + common + 'class="' + allInputsVars.formControl.trim() + allInputsVars.compactClass + allInputsVars.sizeClassBS2 + '" ' + requiredStr + '>';
569571
if (!isRequired) {
570572
value += '<option></option>';
@@ -1972,7 +1974,7 @@ var fng;
19721974
}
19731975
}
19741976
}
1975-
else if (mongooseType.instance === 'boolean') {
1977+
else if (mongooseType.instance.toLowerCase() === 'boolean') {
19761978
formInstructions.type = 'checkbox';
19771979
}
19781980
else if (mongooseType.instance === 'Number') {

dist/forms-angular.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/forms-angular.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/directives/form.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ module fng.directives {
9494
common += 'class="fng-select2' + allInputsVars.formControl + allInputsVars.compactClass + allInputsVars.sizeClassBS2 + '"';
9595
common += (fieldInfo.readonly ? ' readonly' : '');
9696
common += (fieldInfo.required ? ' ng-required="true"' : '');
97+
common += fieldInfo.add ? (' ' + fieldInfo.add + ' ') : '';
9798
if (fieldInfo.select2.fngAjax) {
9899
if (cssFrameworkService.framework() === 'bs2') {
99100
value = '<div class="input-append">';
@@ -112,6 +113,7 @@ module fng.directives {
112113
}
113114
} else {
114115
common += (fieldInfo.readonly ? 'disabled ' : '');
116+
common += fieldInfo.add ? (' ' + fieldInfo.add + ' ') : '';
115117
value = '<select ' + common + 'class="' + allInputsVars.formControl.trim() + allInputsVars.compactClass + allInputsVars.sizeClassBS2 + '" ' + requiredStr + '>';
116118
if (!isRequired) {
117119
value += '<option></option>';

js/services/form-generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ module fng.services {
344344
formInstructions.add = 'ui-date ui-date-format datepicker-popup-fix ';
345345
}
346346
}
347-
} else if (mongooseType.instance === 'boolean') {
347+
} else if (mongooseType.instance.toLowerCase() === 'boolean') {
348348
formInstructions.type = 'checkbox';
349349
} else if (mongooseType.instance === 'Number') {
350350
formInstructions.type = 'number';

0 commit comments

Comments
 (0)