浏览代码

#274: Fix feedback icons in input-group thanks to @tiagofontella

nghuuphuoc 11 年之前
父节点
当前提交
cfeb72a889
共有 5 个文件被更改,包括 18 次插入6 次删除
  1. 1 0
      CHANGELOG.md
  2. 1 0
      README.md
  3. 7 0
      dist/js/bootstrapValidator.js
  4. 2 2
      dist/js/bootstrapValidator.min.js
  5. 7 4
      src/js/bootstrapValidator.js

+ 1 - 0
CHANGELOG.md

@@ -7,6 +7,7 @@
 * [#164](https://github.com/nghuuphuoc/bootstrapvalidator/issues/164): Add ```container``` option for indicating the element showing all errors
 * [#175](https://github.com/nghuuphuoc/bootstrapvalidator/issues/175): Showing errors in tooltip or popover
 * [#211](https://github.com/nghuuphuoc/bootstrapvalidator/issues/211), [#235](https://github.com/nghuuphuoc/bootstrapvalidator/issues/235): Add new method ```getInvalidFields()``` that returns all invalid fields
+* [#274](https://github.com/nghuuphuoc/bootstrapvalidator/pull/274): Fix feedback icons in ```input-group```, thanks to [@tiagofontella](https://github.com/tiagofontella)
 
 ## v0.4.5 (2015-05-15)
 

+ 1 - 0
README.md

@@ -111,6 +111,7 @@ Big thanks to the contributors:
 * [@lloydde](https://github.com/lloydde)
 * [@narutosanjiv](https://github.com/narutosanjiv)
 * [@patmoore](https://github.com/patmoore)
+* [@tiagofontella](https://github.com/tiagofontella)
 * [@tomByrer](https://github.com/tomByrer)
 * [@vaz](https://github.com/vaz)
 * ... might be you! Let's [fork](https://github.com/nghuuphuoc/bootstrapvalidator/fork) and pull a request!

+ 7 - 0
dist/js/bootstrapValidator.js

@@ -353,6 +353,13 @@
                 if ($parent.find('label').length == 0) {
                     $icon.css('top', 0);
                 }
+                // Fix feedback icons in input-group
+	            if ($parent.find('.input-group-addon').length != 0) {
+	                $icon.css({
+                        'top': 0,
+                        'z-index': 100
+                    });
+	            }
             }
 
             // Set live mode

文件差异内容过多而无法显示
+ 2 - 2
dist/js/bootstrapValidator.min.js


+ 7 - 4
src/js/bootstrapValidator.js

@@ -352,10 +352,13 @@
                 if ($parent.find('label').length == 0) {
                     $icon.css('top', 0);
                 }
-                // Fix icons in .form-group > .input-group
-	        if ($parent.find('.input-group-addon').length != 0) {
-	            $icon.css({'top':0, 'z-index':100});
-	        }
+                // Fix feedback icons in input-group
+	            if ($parent.find('.input-group-addon').length != 0) {
+	                $icon.css({
+                        'top': 0,
+                        'z-index': 100
+                    });
+	            }
             }
 
             // Set live mode