Skip to content

Commit bd0e900

Browse files
committed
fix(directives) More robustness passing options
1 parent 0e47834 commit bd0e900

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

dist/forms-angular.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! forms-angular 2015-02-04 */
1+
/*! forms-angular 2015-02-05 */
22
'use strict';
33

44
var formsAngular = angular.module('formsAngular', [
@@ -730,7 +730,7 @@ formsAngular
730730
}
731731
}
732732
for (prop in options) {
733-
if (options.hasOwnProperty(prop) && prop[0] !== '$') {
733+
if (options.hasOwnProperty(prop) && prop[0] !== '$' && typeof options[prop] !== 'undefined') {
734734
newElement += ' fng-opt-' + prop + '="' + options[prop].toString().replace(/"/g,'"') + '"';
735735
}
736736
}

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.

js/directives/form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ formsAngular
501501
}
502502
}
503503
for (prop in options) {
504-
if (options.hasOwnProperty(prop) && prop[0] !== '$') {
504+
if (options.hasOwnProperty(prop) && prop[0] !== '$' && typeof options[prop] !== 'undefined') {
505505
newElement += ' fng-opt-' + prop + '="' + options[prop].toString().replace(/"/g,'"') + '"';
506506
}
507507
}

less/forms-angular-with-bs3.css

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5891,18 +5891,20 @@ form .schema-foot blockquote {
58915891
border-color: rgba(0, 0, 0, 0.15);
58925892
}
58935893
form .schema-head {
5894-
margin-top: 0;
5894+
margin-top: 8px;
58955895
margin-bottom: 5px;
58965896
border: 1px solid #ddd;
58975897
padding: 4px 180px;
58985898
}
58995899
form .sub-doc {
5900-
padding: 0 5px 0 0;
5900+
padding: 5px 5px 2px 0;
59015901
width: 97%;
59025902
margin-bottom: 3px;
5903+
position: relative;
59035904
}
59045905
form .sub-doc-btns {
5905-
margin-left: 15px;
5906+
position: absolute;
5907+
right: 8px;
59065908
}
59075909
form .schema-foot {
59085910
padding: 5px 180px;
@@ -5985,9 +5987,14 @@ button.form-btn {
59855987
font-size: 14px;
59865988
padding: 2px 6px;
59875989
}
5988-
.form-horizontal .checkbox {
5990+
.form-horizontal select.input-sm {
5991+
font-size: 14px;
59895992
padding-left: 5px;
59905993
}
5994+
.form-horizontal .checkbox {
5995+
float: left;
5996+
padding: 5px 10px 0 6px;
5997+
}
59915998
.form-horizontal .control-label {
59925999
padding-top: 6px;
59936000
}
@@ -6040,6 +6047,9 @@ form .schema-foot {
60406047
border: 1px solid #e3e3e3;
60416048
border-radius: 4px;
60426049
}
6050+
form .sub-doc {
6051+
margin-left: 12px;
6052+
}
60436053
form .checkbox input[type="checkbox"] {
60446054
margin-left: -5px;
60456055
}

0 commit comments

Comments
 (0)