root 3 gadi atpakaļ
vecāks
revīzija
65f68a44dd
1 mainītis faili ar 32 papildinājumiem un 30 dzēšanām
  1. 32 30
      js/Desktop/DeskTop.js

+ 32 - 30
js/Desktop/DeskTop.js

@@ -10,7 +10,7 @@ U.MD.D.I.Ip;
 
 //桌面图标的全局变量
 U.MD.D.I.DeskIcon = [
-    // { "Name": "我的云盘", "Url": "disk", "Img": { "x": "-15", "y": "-296"} },
+    // 
     // { "Name": "互联办公", "Url": "boomYun", "Img": { "x": "-844", "y": "-419"} },
     // { "Name": "Word", "Url": "word", "Img": { "x": "-462", "y": "-296"} },
     // { "Name": "Execl", "Url": "excel", "Img": { "x": "-523", "y": "-296"} },
@@ -21,10 +21,12 @@ U.MD.D.I.DeskIcon = [
     // { "Name": "系统设置", "Url": "systemSet", "Img": { "x": "-144", "y": "-413"} },
     // { "Name": "云端下载", "Url": "client", "Img": { "x": "-648", "y": "-357"} },
     // { "Name": "云端产品", "Url": "xz", "Img": { "x": "-24", "y": "-413"} }
-//    { "Name": "FTP", "Url": "ftp", "Img": { "x": "-24", "y": "-413"} },
-//    { "Name": "群文档", "Url": "group", "Img": { "x": "-85", "y": "-413"} },
-//    { "Name": "web编程", "Url": "frontEndProgramming", "Img": { "x": "-275", "y": "-297"} },
-//    { "Name": "后端编程", "Url": "backEndProgramming", "Img": { "x": "-275", "y": "-297"} },
+    //    { "Name": "FTP", "Url": "ftp", "Img": { "x": "-24", "y": "-413"} },
+    //    { "Name": "群文档", "Url": "group", "Img": { "x": "-85", "y": "-413"} },
+    //    { "Name": "web编程", "Url": "frontEndProgramming", "Img": { "x": "-275", "y": "-297"} },
+    //    { "Name": "后端编程", "Url": "backEndProgramming", "Img": { "x": "-275", "y": "-297"} },
+    { "Name": "项目管理", "Url": "backEndProgramming", "style": { "cssText": "background-image:url(/img/icon/project.png)" } },
+    { "Name": "学生管理", "Url": "backEndProgramming", "style": { "cssText": "background-image:url(/img/icon/student.png)" } }
 
 ];
 
@@ -69,10 +71,10 @@ U.MD.D.I.hiddenTaskbar = function (el) {
 */
 U.MD.D.I.initDesktopIcons = function (el) {
     var i, //用于循环
-    _content, //桌面图标元素
-    _iconcontent, //桌面图标元素
-    _frag = $$("frag"), //定义一个碎片元素
-    _DesktopIconInfo = U.MD.D.I.DeskIcon; //获取桌面图标
+        _content, //桌面图标元素
+        _iconcontent, //桌面图标元素
+        _frag = $$("frag"), //定义一个碎片元素
+        _DesktopIconInfo = U.MD.D.I.DeskIcon; //获取桌面图标
     //清楚桌面图标
     el.innerHTML = "";
     //循环创建桌面图标
@@ -89,7 +91,7 @@ U.MD.D.I.initDesktopIcons = function (el) {
             }, [_DesktopIconInfo[i]])
         }, _frag); // 
         _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
-        $$("div", { className: "U_MD_D_KOS U_Img", "style": { "backgroundPosition": _DesktopIconInfo[i].Img.x + "px " + _DesktopIconInfo[i].Img.y + "px"} }, _iconcontent);
+        $$("div", { className: "U_MD_D_KOS U_Img", "style": _DesktopIconInfo[i].style }, _iconcontent); //{ "backgroundPosition": _DesktopIconInfo[i].Img.x + "px " + _DesktopIconInfo[i].Img.y + "px" }
         $$("div", { className: "U_MD_D_KOX", "style": { "cssText": "text-shadow: #000 2px 1px 3px,#666 0 1px 0,#555 -1px 0 0,#999 0 -1px 0; -webkit-text-shadow: #333 1px 0 0,#666 0 1px 0,#555 -1px 0 0,#999 0 -1px 0; -moz-text-shadow: #333 1px 0 0,#666 0 1px 0,#555 -1px 0 0,#999 0 -1px 0; filter: Glow(color=#777777, strength=1)\9;" }, "innerHTML": _DesktopIconInfo[i].Name }, _iconcontent);
     }
     //加载好后给图标定位
@@ -283,7 +285,7 @@ U.MD.D.I.openApplication = function (str, obj, info) {
         _formdiv, //创建任务栏时同时弹出的窗体元素。
         _userinfo = US.userInfo, //登录用户信息
         _userid = obj.userid || _userinfo.UserId //登录用户id
-    ;
+        ;
     //选择应用处理
     switch (str) {
         case "friend": //好友打开
@@ -292,8 +294,8 @@ U.MD.D.I.openApplication = function (str, obj, info) {
             //  U.MD.N.urlWrite("friend/" + obj.directoryid, "好友"); //好友的url重写
             break;
         case "domain":
-            var _iframe = $$('iframe', { src: '//domain.1473.cn/DomainSystem.aspx/?fileId=' + info.fileId + '&type=' + info.type + '&mode=' + info.mode, frameborder: "0", style: { cssText: "width:100%;height:100%;border:0px"} });
-            _formdiv = new U.UF.UI.form("域名管理", _iframe, { id: "U_MD_DS_DomainShare", style: { "width": "370px", "height": "390px"} }).form;
+            var _iframe = $$('iframe', { src: '//domain.1473.cn/DomainSystem.aspx/?fileId=' + info.fileId + '&type=' + info.type + '&mode=' + info.mode, frameborder: "0", style: { cssText: "width:100%;height:100%;border:0px" } });
+            _formdiv = new U.UF.UI.form("域名管理", _iframe, { id: "U_MD_DS_DomainShare", style: { "width": "370px", "height": "390px" } }).form;
             if (_formdiv) {
                 //生成任务栏的变量
                 _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-15px -296px", "name": "网盘", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
@@ -443,7 +445,7 @@ U.MD.D.I.openApplication = function (str, obj, info) {
 //                     break;
 //                 default: break;
 //             }
-        
+
 //             if(U.MD.D.I.Ip && click){
 //                 var clickUrl = ':12588/useClick.php?name=' + click + '&ip=' + U.MD.D.I.Ip;
 //                 U.MD.D.I.Mysqlrequest(clickUrl,function(data){
@@ -471,29 +473,29 @@ U.MD.D.I.openApplication = function (str, obj, info) {
 //     xhr.send();
 // }
 
-/*判断是否是内网IP*/  
+/*判断是否是内网IP*/
 // U.MD.D.I.isInnerIPFn = function(str){
 
 //     var curPageUrl = str;
- 
+
 //     var reg1 = /(http|ftp|https|www):\/\//g;//去掉前缀
 //     curPageUrl =curPageUrl.replace(reg1,'');
 //     // console.log('curPageUrl-1  '+curPageUrl);
- 
+
 //     var reg2 = /\:+/g;//替换冒号为一点
 //     curPageUrl =curPageUrl.replace(reg2,'.');
 //     // console.log('curPageUrl-2  '+curPageUrl);
- 
+
 //     curPageUrl = curPageUrl.split('.');//通过一点来划分数组
- 
- 
+
+
 //     var ipAddress = curPageUrl[0]+'.'+curPageUrl[1]+'.'+curPageUrl[2]+'.'+curPageUrl[3];
 //     if(curPageUrl[2] != '16'){
 //         return ipAddress;
 //     }else{
 //         return false;
 //     }
-    
+
 // }  
 
 
@@ -508,42 +510,42 @@ U.MD.D.I.openApplication = function (str, obj, info) {
 //      localIPs = {},
 //      ipRegex = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/g,
 //      key;
- 
+
 //      function iterateIP(ip) {
 //          if (!localIPs[ip]) onNewIP(ip);
 //          localIPs[ip] = true;
 //     }
- 
+
 //       //create a bogus data channel
 //      pc.createDataChannel("");
- 
+
 //      // create offer and set local description
 //      pc.createOffer().then(function(sdp) {
 //          sdp.sdp.split('\n').forEach(function(line) {
 //              if (line.indexOf('candidate') < 0) return;
 //              line.match(ipRegex).forEach(iterateIP);
 //          });
-         
+
 //          pc.setLocalDescription(sdp, noop, noop);
 //      }).catch(function(reason) {
 //          // An error occurred, so handle the failure to connect
 //      });
- 
+
 //      //sten for candidate events
 //      pc.onicecandidate = function(ice) {
 //          if (!ice || !ice.candidate || !ice.candidate.candidate || !ice.candidate.candidate.match(ipRegex)) return;
 //          ice.candidate.candidate.match(ipRegex).forEach(iterateIP);
 //      };
 // }
- 
+
 // U.MD.D.I.getUserIpBool = function(callback){
 //     U.MD.D.I.getUserIP(function(ip){
 //      alert("Got IP! :" + ip);
 // });
 
-      
-   
-}
+
+
+//}
 
 
 //#endregion