Quellcode durchsuchen

Merge branch 'beta'

root vor 5 Monaten
Ursprung
Commit
e5e7a97dc4
3 geänderte Dateien mit 33 neuen und 33 gelöschten Zeilen
  1. 1 1
      js/Controls/Basic.js
  2. 31 31
      js/Controls/Basic/Form.js
  3. 1 1
      js/Controls/index.js

+ 1 - 1
js/Controls/Basic.js

@@ -2045,7 +2045,7 @@ U.UF.UI.form.prototype = {
                             //关闭任务栏处理
                             if (U.MD.D.T.taskbar.close) {
                                 U.MD.D.T.taskbar.close({ "forms": _formel });
-                                U.MD.N.urlWrite("", "智慧课堂平台");
+                                //U.MD.N.urlWrite("", "智慧课堂平台");
                             }
                         } catch (e) { }
                         //回调处理

+ 31 - 31
js/Controls/Basic/Form.js

@@ -20,7 +20,7 @@ Namespace.register("U.UF.UI") //窗体的命名空间
  * @param	object	关闭、放大、缩小按钮区域的属性设置 { "style":{"left":"100px"}} 选填,有默认属性,原函数有注释
  * @param	element	窗体追加到制定的元素 选填 有默认的属性,原函数有注释
  */
-U.UF.UI.form = function(title, content, formattr, formfun, headattr, contentattr, headbottomattr, parentel) {
+U.UF.UI.form = function (title, content, formattr, formfun, headattr, contentattr, headbottomattr, parentel) {
     var _this = this;
     //所有的窗体中找到是否已经创建的窗体
     if (formattr && U.UF.UI.form.allForm[formattr.id]) {
@@ -89,7 +89,7 @@ U.UF.UI.form.allForm = {};
 U.UF.UI.form.prototype = {
     /** 初始化uform窗体
      */
-    create: function() {
+    create: function () {
         var i, //用于循环 
             _resizefun,
             _formel, //窗体元素
@@ -105,7 +105,7 @@ U.UF.UI.form.prototype = {
             _headattr = this.headattr || {}, //头部属性
             _contentattr = this.contentattr || {}, //内容的属性
             _replaceel = U.UF.UI.form.allForm[_formattr.id] ? U.UF.UI.form.allForm[_formattr.id].form : null //得到之前创建的窗体,如果窗体存在,那么下面创建后直接替换
-        ;
+            ;
         //窗体的统一属性设置,默认属性
         if (_formattr.style) {
             _formattr.style.cssText = _formattr.style.cssText || "";
@@ -115,7 +115,7 @@ U.UF.UI.form.prototype = {
                 cssText: "width: 70%; position: fixed; border: 1px solid #444; background-color: #fff; z-index: 10; border-radius: 1px; overflow: hidden;  -moz-box-shadow:0 0 30px 5px #555; -webkit-box-shadow:0 0 30px 5px #555; box-shadow:0 0 30px 5px #555; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius:5px;"
             };
         }
-        _formattr.close = U.UF.C.apply(this, function() { //关闭窗体;
+        _formattr.close = U.UF.C.apply(this, function () { //关闭窗体;
             U.UF.F.closeWindow(this.form); //关闭窗体
         });
         _formattr.usform = "true"; //设置窗体的属性,作为窗体的识别,有助于调用的用户通过js找到所有的窗体
@@ -124,13 +124,13 @@ U.UF.UI.form.prototype = {
         if (_formattr.onresize) {
             _resizefun = _formattr.onresize;
             _mousedown = _formattr.onmousedown;
-            _formattr.onresize = U.UF.C.apply(this, function() { //当窗体大小发生变化的处理
+            _formattr.onresize = U.UF.C.apply(this, function () { //当窗体大小发生变化的处理
                 this.size(); //大小变化处理
                 if (_resizefun) {
                     _resizefun(); //大小变化回调
                 }
             });
-            _formattr.onmousedown = U.UF.C.apply(this, function() {
+            _formattr.onmousedown = U.UF.C.apply(this, function () {
                 //窗体点击置顶的处理
                 if (this.istop !== false) {
                     this.top(); //大小变化处理
@@ -140,7 +140,7 @@ U.UF.UI.form.prototype = {
                 }
             });
         } else if (_formattr.onresize !== false) {
-            _formattr.onresize = U.UF.C.apply(this, function() { //当窗体大小发生变化的处理
+            _formattr.onresize = U.UF.C.apply(this, function () { //当窗体大小发生变化的处理
                 this.size(); //大小变化处理
             });
         }
@@ -167,7 +167,7 @@ U.UF.UI.form.prototype = {
             }
             //设置头部有拖拽事件
             if (this.isdrag) { //判断是否允许拖动窗体
-                _headattr.onmousedown = function() {
+                _headattr.onmousedown = function () {
                     U.UF.F.drag(_formel); //拖动事件调用
                 };
             }
@@ -210,7 +210,7 @@ U.UF.UI.form.prototype = {
         this.middle = _contentchildel; //中间的内容
         //在头部不存在的情况下,设置中间内容可以拖动
         if (this.title === false && this.isdrag) {
-            _contentel.onmousedown = function() {
+            _contentel.onmousedown = function () {
                 U.UF.F.drag(_formel); //拖动事件调用
             };
         }
@@ -220,22 +220,22 @@ U.UF.UI.form.prototype = {
             _stretchingel = $$("div", { style: { "cssText": "display: block;" } }, _formel);
             //拉伸的信息 key代表样式的结尾,value代表拉伸的方向
             _stretchinginfo = {
-                    "top": "cursor: n-resize; left: 0px; top: 0px; width: 100%; height: 5px;",
-                    "rightTop": "cursor: ne-resize; right: -2px; top: -2px; width: 12px; height: 12px;",
-                    "leftTop": "cursor: nw-resize; top: 0px; left: 0px; width: 12px; height: 12px;",
-                    "left": "cursor: w-resize; left: 0px; top: 0px; width: 5px; height: 100%;",
-                    "right": "cursor: e-resize; right: 0px; top: 0px; width: 5px; height: 100%;",
-                    "bottom": "cursor: s-resize; left: 0px; bottom: 0px; width: 100%; height: 5px;",
-                    "leftBottom": "cursor: sw-resize; left: -2px; bottom: -2px; width: 12px; height: 12px;",
-                    "rightBottom": "cursor: se-resize; right: -2px; bottom: -2px; width: 12px; height: 12px;"
-                }
-                //循环创建拉伸条,包含上、下、左、右、上左、下左、上右、下右
+                "top": "cursor: n-resize; left: 0px; top: 0px; width: 100%; height: 5px;",
+                "rightTop": "cursor: ne-resize; right: -2px; top: -2px; width: 12px; height: 12px;",
+                "leftTop": "cursor: nw-resize; top: 0px; left: 0px; width: 12px; height: 12px;",
+                "left": "cursor: w-resize; left: 0px; top: 0px; width: 5px; height: 100%;",
+                "right": "cursor: e-resize; right: 0px; top: 0px; width: 5px; height: 100%;",
+                "bottom": "cursor: s-resize; left: 0px; bottom: 0px; width: 100%; height: 5px;",
+                "leftBottom": "cursor: sw-resize; left: -2px; bottom: -2px; width: 12px; height: 12px;",
+                "rightBottom": "cursor: se-resize; right: -2px; bottom: -2px; width: 12px; height: 12px;"
+            }
+            //循环创建拉伸条,包含上、下、左、右、上左、下左、上右、下右
             for (i in _stretchinginfo) {
                 $$("div", {
                     "style": {
                         "cssText": "position: absolute; overflow: hidden; display: block; z-index: 10;" + _stretchinginfo[i]
                     },
-                    "onmousedown": U.UF.C.closure(function(scope, typename) {
+                    "onmousedown": U.UF.C.closure(function (scope, typename) {
                         //拉伸函数的调用
                         U.UF.F.stretching(_formel, typename, U.UF.C.apply(scope, scope.size));
                     }, [this, i])
@@ -257,15 +257,15 @@ U.UF.UI.form.prototype = {
                 },
                 "title": "点击关闭",
                 "onmousedown": U.UF.EV.stopBubble,
-                "onclick": U.UF.C.apply(this, function() {
+                "onclick": U.UF.C.apply(this, function () {
                     U.UF.F.closeWindow(this.form); //调用窗体关闭函数
                     try {
                         //关闭任务栏处理
                         if (U.MD.D.T.taskbar.close) {
                             U.MD.D.T.taskbar.close({ "forms": _formel });
-                            U.MD.N.urlWrite("", "智慧课堂平台");
+                            //U.MD.N.urlWrite("", "智慧课堂平台");
                         }
-                    } catch (e) {}
+                    } catch (e) { }
                     //回调处理
                     if (U.UF.C.isFunction(this.closecallback)) {
                         this.closecallback();
@@ -284,7 +284,7 @@ U.UF.UI.form.prototype = {
                 "title": "最大化",
                 "onmousedown": U.UF.EV.stopBubble,
                 //最大化点击事件处理
-                "onclick": function() {
+                "onclick": function () {
                     U.UF.F.windowZooming(_formel); //调用窗体最大化函数
                 }
             }, _headbottom);
@@ -292,7 +292,7 @@ U.UF.UI.form.prototype = {
             //如果有head头部的处理
             if (_headel) {
                 //头部双击放大缩小处理处理
-                _headel.ondblclick = U.UF.C.apply(_headel, function() {
+                _headel.ondblclick = U.UF.C.apply(_headel, function () {
                     //判断双击的元素是否在头部导航上,否则如果头部上有其他的按钮什么的双击了,也会触发放大方法
                     if (event.srcElement == this || U.UF.EL.isChild(this, event.srcElement)) {
                         _enlargeel.onclick(); //放大的处理
@@ -310,7 +310,7 @@ U.UF.UI.form.prototype = {
                 },
                 "title": "最小化",
                 "onmousedown": U.UF.EV.stopBubble,
-                "onclick": function() {
+                "onclick": function () {
                     U.UF.F.windowMinimize(_formel); //窗体最小化处理
                 }
             }, _headbottom);
@@ -338,12 +338,12 @@ U.UF.UI.form.prototype = {
     },
     /** 窗体每一次点击置顶
      */
-    top: function() {
+    top: function () {
         U.UF.F.topWindow(this.form); //点击置顶的处理
     },
     /** 窗体大小处理
      */
-    size: function() {
+    size: function () {
         var _headheight = 0; //head头部的高度
         //如果存在head头部,那么获取head头部处理
         if (this.header) {
@@ -360,7 +360,7 @@ U.UF.UI.form.prototype = {
 
 /** 窗体大小处理
  */
-U.UF.UI.form.windowResize = function() {
+U.UF.UI.form.windowResize = function () {
     var i,
         _style,
         _bodywidth = US.width, //获取原本在窗体大小没有变化前的width
@@ -370,7 +370,7 @@ U.UF.UI.form.windowResize = function() {
         _height, //高度
         _formel, //窗体元素
         _forms = U.UF.UI.form.allForm //获取所有的窗体
-    ;
+        ;
     //循环所有的窗体
     for (i in _forms) {
         _formel = _forms[i].form; //获取窗体的处理
@@ -399,7 +399,7 @@ U.UF.UI.form.windowResize = function() {
 
 /** 关闭所有的窗体
  */
-U.UF.UI.form.closeWindows = function() {
+U.UF.UI.form.closeWindows = function () {
     var i;
     for (i in U.UF.UI.form.allForm) {
         if (U.UF.UI.form.allForm[i].isclose) {

+ 1 - 1
js/Controls/index.js

@@ -2031,7 +2031,7 @@ U.UF.UI.form.prototype = {
                         //关闭任务栏处理
                         if (U.MD.D.T.taskbar.close) {
                             U.MD.D.T.taskbar.close({ "forms": _formel });
-                            U.MD.N.urlWrite("", "智慧课堂平台");
+                            //U.MD.N.urlWrite("", "智慧课堂平台");
                         }
                     } catch (e) { }
                     //回调处理