소스 검색

Fix select duplication

Fix the select elements duplication in case of validation error.
Emmanuel Vella 12 년 전
부모
커밋
25ce399e05
1개의 변경된 파일4개의 추가작업 그리고 5개의 파일을 삭제
  1. 4 5
      Resources/public/base.js

+ 4 - 5
Resources/public/base.js

@@ -45,13 +45,12 @@ var Admin = {
             var target;
 
             /* Hack to handle qTip on select */
-            if(jQuery(input).is("select")) {
-              jQuery(element).prepend("<span></span>");
-              target = jQuery('span', element);
-              jQuery(input).appendTo(target);
+            if(jQuery(input).is('select')) {
+                input.wrap('<span></span>');
+                target = input.parent();
             }
             else {
-              target = input;
+                target = input;
             }
 
             target.qtip({