root 2 роки тому
батько
коміт
ee66de54b1
1 змінених файлів з 10 додано та 10 видалено
  1. 10 10
      js/Controls/Basic.js

+ 10 - 10
js/Controls/Basic.js

@@ -2095,7 +2095,15 @@ U.UF.UI.form.prototype = {
         else {
             this.parentel.appendChild(_formel);
         }
-
+        //如果没有设置top和left那么居中弹出
+        if (_formel.style.top == "" && _formel.style.left == "" && _formel.style.right == "" && _formel.style.bottom == "") {
+            //居中置顶弹出
+            U.UF.F.windowTopCenter(_formel);
+        }
+        //否则置顶
+        else {
+            U.UF.F.topWindow(_formel);
+        }
         //创建中间内容元素
         _contentchildel = $$("div", _contentattr, _contentel);
         //如果是字符串的处理
@@ -2108,15 +2116,7 @@ U.UF.UI.form.prototype = {
         }
         this.middle = _contentchildel; //中间的内容
 
-        //如果没有设置top和left那么居中弹出
-        if (_formel.style.top == "" && _formel.style.left == "" && _formel.style.right == "" && _formel.style.bottom == "") {
-            //居中置顶弹出
-            U.UF.F.windowTopCenter(_formel);
-        }
-        //否则置顶
-        else {
-            U.UF.F.topWindow(_formel);
-        }
+
         //初始化的时候默认设置大小
         this.size();
     },