diff --git a/o2web/source/o2_core/o2/lp/zh-cn.js b/o2web/source/o2_core/o2/lp/zh-cn.js index 8512c7f5fa1c0f09002753db64e897f7260266b7..39d1ec97e3e63dd7658630d81067294b5e6d1e3b 100644 --- a/o2web/source/o2_core/o2/lp/zh-cn.js +++ b/o2web/source/o2_core/o2/lp/zh-cn.js @@ -123,6 +123,7 @@ o2.LP.process = { } }; o2.LP.desktop = { + "homepage": "首页", "loadding": "正在为您加载系统资源,请稍候......", "lowBrowser": "您的浏览器版本过低啦!~系统已经不支持IE8及以下版本了!", "upgradeBrowser": "请升级您的浏览器:", diff --git a/o2web/source/o2_core/o2/o2.more.js b/o2web/source/o2_core/o2/o2.more.js index 6e0884f3c1259f6cf75dbf12917fe3d175b43d95..61481c32d11df2e96e31cf9d71f3d16cbe1f526a 100644 --- a/o2web/source/o2_core/o2/o2.more.js +++ b/o2web/source/o2_core/o2/o2.more.js @@ -517,6 +517,13 @@ h += (this.getStyle("padding-top").toFloat() || 0)+ (this.getStyle("padding-bottom").toFloat() || 0); if (!notMargin) h += (this.getStyle("margin-top").toFloat() || 0)+ (this.getStyle("margin-bottom").toFloat() || 0); return h; + }, + "getEdgeWidth": function(notMargin){ + var h = 0; + h += (this.getStyle("border-left-width").toFloat() || 0)+ (this.getStyle("border-right-width").toFloat() || 0); + h += (this.getStyle("padding-left").toFloat() || 0)+ (this.getStyle("padding-right").toFloat() || 0); + if (!notMargin) h += (this.getStyle("margin-left").toFloat() || 0)+ (this.getStyle("margin-right").toFloat() || 0); + return h; } }); Object.copy = function(from, to){ diff --git a/o2web/source/o2_core/o2/widget/$Menu/flatStyle/css.wcss b/o2web/source/o2_core/o2/widget/$Menu/flatStyle/css.wcss index 275a174267a61e7c5c59b5d8940ebae2bfdd6c4f..d02e43bd16ae396a3ae4059f92933dbb8541e311 100644 --- a/o2web/source/o2_core/o2/widget/$Menu/flatStyle/css.wcss +++ b/o2web/source/o2_core/o2/widget/$Menu/flatStyle/css.wcss @@ -22,7 +22,7 @@ "border-radius": "2px", "background-color": "#FFF", "padding": "0px", - "overflow": "hidden", + "overflow": "auto", "cursor": "default" }, "menuItem": { diff --git a/o2web/source/o2_core/o2/xDesktop/$Default/blue/style-pc.css b/o2web/source/o2_core/o2/xDesktop/$Default/blue/style-pc.css index 83d7e996119694c760ad0c9b5c51bb96586fd800..958067b820244d762e7d2c55e42c097972094958 100644 --- a/o2web/source/o2_core/o2/xDesktop/$Default/blue/style-pc.css +++ b/o2web/source/o2_core/o2/xDesktop/$Default/blue/style-pc.css @@ -159,7 +159,9 @@ background-size: cover; border-radius: 20px; } -.layout_content_taskbar_area_user_text {} +.layout_content_taskbar_area_user_text { + display: inline-block; +} .layout_content_taskbar_area_action { height: 70px; @@ -179,7 +181,7 @@ cursor: pointer; } .layout_content_taskbar_area_action_msg { - } +} .layout_content_taskbar_area_action_skin { } .layout_content_taskbar_area_action_skin_focus { diff --git a/o2web/source/o2_core/o2/xDesktop/$Default/cyan/style-pc.css b/o2web/source/o2_core/o2/xDesktop/$Default/cyan/style-pc.css index 187604d35989e22b3a75ede27aa3bc82a8ec167a..958067b820244d762e7d2c55e42c097972094958 100644 --- a/o2web/source/o2_core/o2/xDesktop/$Default/cyan/style-pc.css +++ b/o2web/source/o2_core/o2/xDesktop/$Default/cyan/style-pc.css @@ -159,7 +159,9 @@ background-size: cover; border-radius: 20px; } -.layout_content_taskbar_area_user_text {} +.layout_content_taskbar_area_user_text { + display: inline-block; +} .layout_content_taskbar_area_action { height: 70px; diff --git a/o2web/source/o2_core/o2/xDesktop/$Default/darkgreen/style-pc.css b/o2web/source/o2_core/o2/xDesktop/$Default/darkgreen/style-pc.css index 187604d35989e22b3a75ede27aa3bc82a8ec167a..958067b820244d762e7d2c55e42c097972094958 100644 --- a/o2web/source/o2_core/o2/xDesktop/$Default/darkgreen/style-pc.css +++ b/o2web/source/o2_core/o2/xDesktop/$Default/darkgreen/style-pc.css @@ -159,7 +159,9 @@ background-size: cover; border-radius: 20px; } -.layout_content_taskbar_area_user_text {} +.layout_content_taskbar_area_user_text { + display: inline-block; +} .layout_content_taskbar_area_action { height: 70px; diff --git a/o2web/source/o2_core/o2/xDesktop/$Default/gray/style-pc.css b/o2web/source/o2_core/o2/xDesktop/$Default/gray/style-pc.css index 187604d35989e22b3a75ede27aa3bc82a8ec167a..958067b820244d762e7d2c55e42c097972094958 100644 --- a/o2web/source/o2_core/o2/xDesktop/$Default/gray/style-pc.css +++ b/o2web/source/o2_core/o2/xDesktop/$Default/gray/style-pc.css @@ -159,7 +159,9 @@ background-size: cover; border-radius: 20px; } -.layout_content_taskbar_area_user_text {} +.layout_content_taskbar_area_user_text { + display: inline-block; +} .layout_content_taskbar_area_action { height: 70px; diff --git a/o2web/source/o2_core/o2/xDesktop/$Default/green/style-pc.css b/o2web/source/o2_core/o2/xDesktop/$Default/green/style-pc.css index 187604d35989e22b3a75ede27aa3bc82a8ec167a..958067b820244d762e7d2c55e42c097972094958 100644 --- a/o2web/source/o2_core/o2/xDesktop/$Default/green/style-pc.css +++ b/o2web/source/o2_core/o2/xDesktop/$Default/green/style-pc.css @@ -159,7 +159,9 @@ background-size: cover; border-radius: 20px; } -.layout_content_taskbar_area_user_text {} +.layout_content_taskbar_area_user_text { + display: inline-block; +} .layout_content_taskbar_area_action { height: 70px; diff --git a/o2web/source/o2_core/o2/xDesktop/$Default/navy/style-pc.css b/o2web/source/o2_core/o2/xDesktop/$Default/navy/style-pc.css index 187604d35989e22b3a75ede27aa3bc82a8ec167a..958067b820244d762e7d2c55e42c097972094958 100644 --- a/o2web/source/o2_core/o2/xDesktop/$Default/navy/style-pc.css +++ b/o2web/source/o2_core/o2/xDesktop/$Default/navy/style-pc.css @@ -159,7 +159,9 @@ background-size: cover; border-radius: 20px; } -.layout_content_taskbar_area_user_text {} +.layout_content_taskbar_area_user_text { + display: inline-block; +} .layout_content_taskbar_area_action { height: 70px; diff --git a/o2web/source/o2_core/o2/xDesktop/$Default/orange/style-pc.css b/o2web/source/o2_core/o2/xDesktop/$Default/orange/style-pc.css index 187604d35989e22b3a75ede27aa3bc82a8ec167a..958067b820244d762e7d2c55e42c097972094958 100644 --- a/o2web/source/o2_core/o2/xDesktop/$Default/orange/style-pc.css +++ b/o2web/source/o2_core/o2/xDesktop/$Default/orange/style-pc.css @@ -159,7 +159,9 @@ background-size: cover; border-radius: 20px; } -.layout_content_taskbar_area_user_text {} +.layout_content_taskbar_area_user_text { + display: inline-block; +} .layout_content_taskbar_area_action { height: 70px; diff --git a/o2web/source/o2_core/o2/xDesktop/$Default/purple/style-pc.css b/o2web/source/o2_core/o2/xDesktop/$Default/purple/style-pc.css index 187604d35989e22b3a75ede27aa3bc82a8ec167a..958067b820244d762e7d2c55e42c097972094958 100644 --- a/o2web/source/o2_core/o2/xDesktop/$Default/purple/style-pc.css +++ b/o2web/source/o2_core/o2/xDesktop/$Default/purple/style-pc.css @@ -159,7 +159,9 @@ background-size: cover; border-radius: 20px; } -.layout_content_taskbar_area_user_text {} +.layout_content_taskbar_area_user_text { + display: inline-block; +} .layout_content_taskbar_area_action { height: 70px; diff --git a/o2web/source/o2_core/o2/xDesktop/$Default/red/style-pc.css b/o2web/source/o2_core/o2/xDesktop/$Default/red/style-pc.css index 187604d35989e22b3a75ede27aa3bc82a8ec167a..958067b820244d762e7d2c55e42c097972094958 100644 --- a/o2web/source/o2_core/o2/xDesktop/$Default/red/style-pc.css +++ b/o2web/source/o2_core/o2/xDesktop/$Default/red/style-pc.css @@ -159,7 +159,9 @@ background-size: cover; border-radius: 20px; } -.layout_content_taskbar_area_user_text {} +.layout_content_taskbar_area_user_text { + display: inline-block; +} .layout_content_taskbar_area_action { height: 70px; diff --git a/o2web/source/o2_core/o2/xDesktop/$Default/tan/style-pc.css b/o2web/source/o2_core/o2/xDesktop/$Default/tan/style-pc.css index 187604d35989e22b3a75ede27aa3bc82a8ec167a..958067b820244d762e7d2c55e42c097972094958 100644 --- a/o2web/source/o2_core/o2/xDesktop/$Default/tan/style-pc.css +++ b/o2web/source/o2_core/o2/xDesktop/$Default/tan/style-pc.css @@ -159,7 +159,9 @@ background-size: cover; border-radius: 20px; } -.layout_content_taskbar_area_user_text {} +.layout_content_taskbar_area_user_text { + display: inline-block; +} .layout_content_taskbar_area_action { height: 70px; diff --git a/o2web/source/o2_core/o2/xDesktop/Default.js b/o2web/source/o2_core/o2/xDesktop/Default.js index 5cf34ce1f43ce7edc319a77cd7d53b82137050e5..f6e78847afa9f3704db854b66a78a9950e48060e 100644 --- a/o2web/source/o2_core/o2/xDesktop/Default.js +++ b/o2web/source/o2_core/o2/xDesktop/Default.js @@ -200,14 +200,39 @@ o2.xDesktop.Default = new Class({ loadDefaultPage: function(){ //默认载入首页 + var app; if (layout.config.indexPage && layout.config.indexPage.enable && layout.config.indexPage.portal){ appId = "portal.Portal"+layout.config.indexPage.portal; this.options.index = appId; - var options = {"portalId": layout.config.indexPage.portal, "pageId": layout.config.indexPage.page, "appId": appId}; - layout.openApplication(null, "portal.Portal", options); + //var options = {"portalId": layout.config.indexPage.portal, "pageId": layout.config.indexPage.page, "appId": appId}; + + app = { + "options": {"name": "portal.Portal", "portalId": layout.config.indexPage.portal, "pageId": layout.config.indexPage.page, "appId": appId}, + "close": function(){ + this.taskitem.destroy(); + }, + "setCurrent": function(){ + this.taskitem.textNode.click(); + } + }; + //layout.openApplication(null, "portal.Portal", options); }else{ - layout.openApplication(null, "Homepage"); + app = { + "options": {"name": "Homepage", "appId": "Homepage", "title": o2.LP.desktop.homepage}, + "close": function(){ + this.taskitem.destroy(); + }, + "setCurrent": function(){ + this.taskitem.textNode.click(); + } + }; + //layout.openApplication(null, "Homepage"); } + + taskitem = layout.desktop.createTaskItem(app); + app.taskitem = taskitem; + this.apps[app.options.appId] = app; + taskitem.textNode.click(); }, loadDefaultLnk: function(){ if (this.status && this.status.flatLnks && this.status.flatLnks.length){ @@ -1652,7 +1677,7 @@ o2.xDesktop.Default.TaskItem = new Class({ load: function(){ this.node = new Element("div.layout_content_taskbar_item").inject(this.container); this.iconNode = new Element("div"); - this.closeNode = new Element("div.layout_content_taskbar_item_icon", {"title": o2.LP.widget.close}).inject(this.node);; + this.closeNode = new Element("div.layout_content_taskbar_item_icon", {"title": o2.LP.widget.close}).inject(this.node); this.closeNode.addClass("icon_close"); if (this.app.options.appId==this.desktop.options.index){ this.closeNode.hide(); @@ -1718,6 +1743,8 @@ o2.xDesktop.Default.TaskItem = new Class({ this.app.refresh(); }.bind(this) }); + + if (this.desktop && this.desktop.checkTaskBarSize) this.desktop.checkTaskBarSize(); }, setText: function(str){ this.textNode.set("text", str || this.app.options.title); @@ -1744,6 +1771,7 @@ o2.xDesktop.Default.TaskItem = new Class({ destroy: function(){ this.iconNode.destroy(); this.node.destroy(); + if (this.desktop && this.desktop.checkTaskBarSize) this.desktop.checkTaskBarSize(); o2.release(this); }, setTaskitemSize: function(){ diff --git a/o2web/source/o2_core/o2/xDesktop/Menu.js b/o2web/source/o2_core/o2/xDesktop/Menu.js index 69f32ee36deefc25ddadb0cd8451491f637d9a01..3849e9ddb11c3a78adeeafa88502e24e72a8873b 100644 --- a/o2web/source/o2_core/o2/xDesktop/Menu.js +++ b/o2web/source/o2_core/o2/xDesktop/Menu.js @@ -25,6 +25,7 @@ MWF.xDesktop.Menu = new Class({ }).inject(this.options.container || $(document.body)); this.node.inject(this.borderNode); + this.hide = this.hideMenu.bind(this); this.fireEvent("postLoad"); } @@ -55,6 +56,16 @@ MWF.xDesktop.Menu = new Class({ }else{ this.pauseCount--; } + + var p = this.node.getPosition(document.body); + var size = this.node.getSize(); + var bodySize = document.body.getSize(); + if (p.y+size.y+10>bodySize.y){ + var y = bodySize.y-p.y-10; + this.node.setStyle("height", ""+y+"px"); + this.node.addEvent("mousedown", function(e){ e.stopPropagation(); }) + } + this.fireEvent("postShow"); } } diff --git a/o2web/source/x_component_Homepage/$Main/default/style.css b/o2web/source/x_component_Homepage/$Main/default/style.css index f9a5ef564ed1804be78c96c1f7f3c324b5a52c0d..8014e80ba0c5e8a6eaa2ee4f30ed82e4725e0e42 100644 --- a/o2web/source/x_component_Homepage/$Main/default/style.css +++ b/o2web/source/x_component_Homepage/$Main/default/style.css @@ -257,7 +257,7 @@ text-align: center; line-height: 24px; float: left; - margin-left: 10px; + margin-left: 5px; cursor: pointer; user-select: none; -ms-user-select: none; @@ -280,7 +280,7 @@ background-color: #ffffff; line-height: 20px; text-align: center; - margin-left: 10px; + margin-left: 8px; color: #666666; cursor: pointer; border: 1px solid #E6E6E6; @@ -293,7 +293,7 @@ border-radius: 10px; background-color: #ffffff; text-align: center; - margin-left: 10px; + margin-left: 8px; color: #666666; cursor: pointer; float: left; @@ -308,7 +308,7 @@ border-radius: 10px; background-color: #ffffff; text-align: center; - margin-left: 10px; + margin-left: 8px; color: #666666; cursor: pointer; float: left; @@ -374,7 +374,7 @@ .o2_homepage_infor_hotpicArea { height: 100%; - width: 42%; + width: 36%; float: left; background: #F7FBFF; border-radius: 8px; @@ -392,7 +392,6 @@ } .o2_homepage_infor_itemsArea { - margin-left: 42%; height: 100%; } .o2_homepage_infor_itemsArea_content { diff --git a/o2web/source/x_component_Homepage/$Main/default/taskContent.html b/o2web/source/x_component_Homepage/$Main/default/taskContent.html index 833c044cd15397a9c969d14e1f3654a448020941..0ea8f07a258301f170fb2b6b5b50b7f18222be75 100644 --- a/o2web/source/x_component_Homepage/$Main/default/taskContent.html +++ b/o2web/source/x_component_Homepage/$Main/default/taskContent.html @@ -13,6 +13,7 @@ +
diff --git a/o2web/source/x_component_Homepage/InforContent.js b/o2web/source/x_component_Homepage/InforContent.js index 37855d2b5af427a546f24b8512cade2aab8b047c..94b09a334bd053671c73f8dff70530272c8be211 100644 --- a/o2web/source/x_component_Homepage/InforContent.js +++ b/o2web/source/x_component_Homepage/InforContent.js @@ -289,6 +289,8 @@ MWF.xApplication.Homepage.InforContent.AllInfor = new Class({ }, loadItemsRes_item:function(){ o2.Actions.load("x_cms_assemble_control").DocumentAction.query_listWithFilterPaging(this.page, this.pageSize, { + "orderField": "publishTime", + "orderType": "DESC", "readFlag": "UNREAD" }, function(json){ this.itemCount = json.count; @@ -519,6 +521,8 @@ MWF.xApplication.Homepage.InforContent.Infor = new Class({ }, loadItemsRes: function(){ o2.Actions.load("x_cms_assemble_control").DocumentAction.query_listWithFilterPaging(this.page, this.pageSize, { + "orderField": "publishTime", + "orderType": "DESC", "readFlag": "UNREAD", "appIdList": [this.id] }, function(json){ diff --git a/o2web/source/x_component_Homepage/TaskContent.js b/o2web/source/x_component_Homepage/TaskContent.js index 0a7a30685bd1f541203914dcbb41d8e376d46477..ea551bf21ce6cc7f0b1477bd890f90b1659a6c1b 100644 --- a/o2web/source/x_component_Homepage/TaskContent.js +++ b/o2web/source/x_component_Homepage/TaskContent.js @@ -397,6 +397,16 @@ MWF.xApplication.Homepage.TaskContent.Task = new Class({ "click": function () { this.nextPage(); }.bind(this), }); + debugger; + var size = this.pageNode.getSize(); + var w1 = this.prevPageNode.getEdgeWidth(); + var w2 = this.nextPageNode.getEdgeWidth(); + var x1 = this.prevPageNode.getSize().x; + var x2 = this.nextPageNode.getSize().x; + var x = size.x - w1 - w2 - x1 - x2; + var count = (x/30).toInt()-2; + if (count<3) count = 3; + this.options.showPages = count; this.loadPageNumber(); }else{ diff --git a/o2web/source/x_component_process_Xform/Log.js b/o2web/source/x_component_process_Xform/Log.js index e490a58e0532c8217df98cdd461bb536e97ce133..df36607e24fbaf0063e5e270fcb9293bec70b2da 100644 --- a/o2web/source/x_component_process_Xform/Log.js +++ b/o2web/source/x_component_process_Xform/Log.js @@ -1647,16 +1647,17 @@ MWF.xApplication.process.Xform.Log = MWF.APPLog = new Class({ var imgAreaNode = new Element("div", {"styles": this.form.css.logMediaOpinionContentArea}).inject(imgNode); - //var height = 260; - //var width = 390; + // var height = 260; + // var width = 390; var width; + //var height; if (layout.mobile){ width = node.getParent().getParent().getSize().x-2; //height = width*2/3; }else{ var pNode = node.getParent().getParent(); var offset = imgNode.getPosition( pNode ); - width = Math.min( pNode.getSize().x - offset.x - 42, 800 ); + width = Math.min( pNode.getSize().x - offset.x - 42, 800 );x } var img = new Element("img", { @@ -1692,23 +1693,23 @@ MWF.xApplication.process.Xform.Log = MWF.APPLog = new Class({ //} - var p = iconNode.getPosition(this.form.app.content); - var s = iconNode.getSize(); - var size = (layout.mobile) ? {"x": width, "y": height}: imgNode.getSize(); - var contentSize = this.form.app.content.getSize(); - var contentScroll = (layout.mobile) ? document.body.getFirst().getScroll() : {"x": 0, "y": 0}; - var y = p.y-size.y; - var x = p.x+s.x/2-size.x/2; - - if (x<10) x = 10; - if (x+size.x>contentSize.x-10) x = contentSize.x-size.x-20; - if (y+size.y>contentSize.y-10) y = contentSize.y-size.y-20; - if (y<10) y = 10; - y=y+contentScroll.y; - - if (layout.mobile){ - x = 0; - } + // var p = iconNode.getPosition(this.form.app.content); + // var s = iconNode.getSize(); + // var size = (layout.mobile) ? {"x": width, "y": height}: imgNode.getSize(); + // var contentSize = this.form.app.content.getSize(); + // var contentScroll = (layout.mobile) ? document.body.getFirst().getScroll() : {"x": 0, "y": 0}; + // var y = p.y-size.y; + // var x = p.x+s.x/2-size.x/2; + // + // if (x<10) x = 10; + // if (x+size.x>contentSize.x-10) x = contentSize.x-size.x-20; + // if (y+size.y>contentSize.y-10) y = contentSize.y-size.y-20; + // if (y<10) y = 10; + // y=y+contentScroll.y; + // + // if (layout.mobile){ + // x = 0; + // } // imgNode.setStyles({ // "top": ""+y+"px", // "left": ""+x+"px" diff --git a/o2web/source/x_desktop/js/base.js b/o2web/source/x_desktop/js/base.js index a65e724dd48736a8a1b4e33994d1c0ae3915e9da..9567e56ba4496c1e4d2a74eb74d5a6e4b750c514 100644 --- a/o2web/source/x_desktop/js/base.js +++ b/o2web/source/x_desktop/js/base.js @@ -60,15 +60,6 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) { app.taskitem = taskitem; app.taskitem.app = app; - // if (layout.viewMode=="Default"){ - // if (!notCurrent){ - // app.load(!notCurrent); - // }else{ - // app.isLoadApplication = false; - // } - // }else{ - // app.load(!notCurrent); - // } app.isLoadApplication = true; app.load(!notCurrent); @@ -266,24 +257,6 @@ o2.xDesktop.requireApp = function (module, clazz, callback, async) { if (options) options.appId = appId; _createNewApplication(e, appNamespace, appName, (options || {"appId": appId}), statusObj, inBrowser, taskitem, notCurrent); } - // if (appNamespace.options.multitask){ - // if (options && options.appId){ - // if (layout.desktop.apps[options.appId]){ - // layout.desktop.apps[options.appId].setCurrent(); - // }else { - // _createNewApplication(e, appNamespace, appName, options, obj, inBrowser); - // } - // }else{ - // _createNewApplication(e, appNamespace, appName, options, obj, inBrowser); - // } - // }else{ - // if (layout.desktop.apps[appName]){ - // layout.desktop.apps[appName].setCurrent(); - // }else{ - // _createNewApplication(e, appNamespace, appName, options, obj, inBrowser); - // } - // } - // _createNewApplication(e, appNamespace, appName, (options || {}), statusObj, inBrowser); }.bind(this)); } };