From b0cea409c69a88964b59d76c5c7394d67c34be18 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 12 Apr 2020 02:16:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E5=9B=BE=E6=A0=B7=E5=BC=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=BC=80=E5=8F=91=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E7=9A=84=E9=A2=84=E8=A7=88=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../o2/widget/$Paging/default/css.wcss | 5 +++++ .../o2_core/o2/widget/$Paging/forum/css.wcss | 4 ++++ .../o2_core/o2/widget/$Paging/red/css.wcss | 5 +++++ o2web/source/o2_core/o2/widget/Paging.js | 4 +++- .../$Viewer/default/css.wcss | 6 +++--- .../source/x_component_query_Query/Viewer.js | 21 ++++++++++--------- .../$Main/default/toolbars.html | 2 +- .../$View/skin/styles_blue-flat.json | 4 +++- .../$View/skin/styles_blue-simple.json | 9 +++++++- .../$View/skin/styles_cmcc.json | 9 +++++++- .../$View/skin/styles_default.json | 9 +++++++- .../$View/skin/styles_official.json | 10 ++++++++- .../$View/skin/styles_red-simple.json | 9 +++++++- .../x_component_query_ViewDesigner/Main.js | 3 +++ .../x_component_query_ViewDesigner/View.js | 20 ++++++++++++++++-- .../lp/zh-cn.js | 1 + 16 files changed, 98 insertions(+), 23 deletions(-) diff --git a/o2web/source/o2_core/o2/widget/$Paging/default/css.wcss b/o2web/source/o2_core/o2/widget/$Paging/default/css.wcss index dfa8434914..059c21023f 100644 --- a/o2web/source/o2_core/o2/widget/$Paging/default/css.wcss +++ b/o2web/source/o2_core/o2/widget/$Paging/default/css.wcss @@ -1,7 +1,12 @@ { + "pagingBarWraper" : { + "height" : "60px", + "overflow" : "hidden" + }, "pagingBar" : { "float": "left", "margin-left": "10px", + "margin-top": "18px", "height": "24px", "color": "#777777" }, diff --git a/o2web/source/o2_core/o2/widget/$Paging/forum/css.wcss b/o2web/source/o2_core/o2/widget/$Paging/forum/css.wcss index 548c298537..603e6c90d4 100644 --- a/o2web/source/o2_core/o2/widget/$Paging/forum/css.wcss +++ b/o2web/source/o2_core/o2/widget/$Paging/forum/css.wcss @@ -1,4 +1,8 @@ { + "pagingBarWraper" : { + "height" : "56px", + "overflow" : "hidden" + }, "pagingBar" : { "float" : "right", "margin-right" : "10px", diff --git a/o2web/source/o2_core/o2/widget/$Paging/red/css.wcss b/o2web/source/o2_core/o2/widget/$Paging/red/css.wcss index 51a68293cd..40e75a37aa 100644 --- a/o2web/source/o2_core/o2/widget/$Paging/red/css.wcss +++ b/o2web/source/o2_core/o2/widget/$Paging/red/css.wcss @@ -1,7 +1,12 @@ { + "pagingBarWraper" : { + "height" : "60px", + "overflow" : "hidden" + }, "pagingBar" : { "float": "left", "margin-left": "10px", + "margin-top": "18px", "height": "24px", "color": "#777777" }, diff --git a/o2web/source/o2_core/o2/widget/Paging.js b/o2web/source/o2_core/o2/widget/Paging.js index 62aa206587..bc25c2fb84 100644 --- a/o2web/source/o2_core/o2/widget/Paging.js +++ b/o2web/source/o2_core/o2/widget/Paging.js @@ -56,7 +56,9 @@ o2.widget.Paging = new Class({ createNode: function() { var _self = this; - this.node = new Element("div.pagingBar", {styles: this.css.pagingBar}).inject(this.container); + this.wraper = new Element("div.pagingBarWraper", {styles: this.css.pagingBarWraper}).inject(this.container); + + this.node = new Element("div.pagingBar", {styles: this.css.pagingBar}).inject(this.wraper); var i, max, min; diff --git a/o2web/source/x_component_query_Query/$Viewer/default/css.wcss b/o2web/source/x_component_query_Query/$Viewer/default/css.wcss index d639b877bf..3c51ec5467 100644 --- a/o2web/source/x_component_query_Query/$Viewer/default/css.wcss +++ b/o2web/source/x_component_query_Query/$Viewer/default/css.wcss @@ -16,11 +16,11 @@ "overflow": "hidden" }, "viewPageNode": { - "height": "80px" +// "height": "80px" }, "viewPageAreaNode": { - "height": "24px", - "margin-top": "28px" +// "height": "24px", +// "margin-top": "28px" }, "viewPageContentNode": { "float": "left", diff --git a/o2web/source/x_component_query_Query/Viewer.js b/o2web/source/x_component_query_Query/Viewer.js index 374422b2d9..ae370df0ea 100644 --- a/o2web/source/x_component_query_Query/Viewer.js +++ b/o2web/source/x_component_query_Query/Viewer.js @@ -108,12 +108,12 @@ MWF.xApplication.query.Query.Viewer = MWF.QViewer = new Class({ }, loadLayout: function(){ this.node = new Element("div", {"styles": this.css.node}).inject(this.container); - this.actionbarAreaNode = new Element("div", {"styles": this.css.actionbarAreaNode}).inject(this.node); + this.actionbarAreaNode = new Element("div.actionbarAreaNode", {"styles": this.css.actionbarAreaNode}).inject(this.node); //if (this.options.export) this.exportAreaNode = new Element("div", {"styles": this.css.exportAreaNode}).inject(this.node); this.searchAreaNode = new Element("div", {"styles": this.css.searchAreaNode}).inject(this.node); this.viewAreaNode = new Element("div", {"styles": this.css.viewAreaNode}).inject(this.node); - this.viewPageNode = new Element("div", {"styles": this.css.viewPageNode}).inject(this.node); - this.viewPageAreaNode = new Element("div", {"styles": this.css.viewPageAreaNode}).inject(this.viewPageNode); + // this.viewPageNode = new Element("div", {"styles": this.css.viewPageNode}).inject(this.node); + this.viewPageAreaNode = new Element("div", {"styles": this.css.viewPageAreaNode}).inject(this.node); }, loadMacro: function (callback) { MWF.require("MWF.xScript.Macro", function () { @@ -169,7 +169,7 @@ MWF.xApplication.query.Query.Viewer = MWF.QViewer = new Class({ var exportSize = this.actionbarAreaNode.getComputedSize(); h = h-exportSize.totalHeight; } - var pageSize = this.viewPageNode.getComputedSize(); + var pageSize = this.viewPageAreaNode.getComputedSize(); h = h-pageSize.totalHeight; this.viewAreaNode.setStyle("height", ""+h+"px"); }, @@ -2040,13 +2040,14 @@ MWF.xApplication.query.Query.Viewer.Paging = new Class({ this.loadPaging( false ) }, loadPaging : function( firstLoading ){ - this.pagingNode = this.node.getFirst("div"); - if( !this.pagingNode ){ - this.pagingNode = new Element("div").inject( this.node ); - } - this.pagingNode.empty(); + // this.pagingNode = this.node.getFirst("div"); + // if( !this.pagingNode ){ + // this.pagingNode = new Element("div").inject( this.node ); + // } + // this.pagingNode.empty(); + this.node.empty(); - this.paging = new o2.widget.Paging(this.pagingNode, { + this.paging = new o2.widget.Paging(this.node, { //style : this.options.skin && this.options.skin.pagingBar ? this.options.skin.pagingBar : "default", countPerPage: this.view.json.pageSize || this.view.options.perPageCount, visiblePages: this.json.visiblePages ? this.json.visiblePages.toInt() : 9, diff --git a/o2web/source/x_component_query_ViewDesigner/$Main/default/toolbars.html b/o2web/source/x_component_query_ViewDesigner/$Main/default/toolbars.html index a379257bac..a3e0913ea9 100644 --- a/o2web/source/x_component_query_ViewDesigner/$Main/default/toolbars.html +++ b/o2web/source/x_component_query_ViewDesigner/$Main/default/toolbars.html @@ -2,7 +2,7 @@ - + diff --git a/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_blue-flat.json b/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_blue-flat.json index f0c080bcfc..c2f066fb90 100644 --- a/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_blue-flat.json +++ b/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_blue-flat.json @@ -45,7 +45,9 @@ "container" : { "width" : "100%", "padding-left" : "10px", - "padding-right" : "10px" + "padding-right" : "10px", + "border-top" : "0px", + "border-bottom" : "1px solid #4a90e2" } } }, diff --git a/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_blue-simple.json b/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_blue-simple.json index 3169a7ab4f..78dbdc5fab 100644 --- a/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_blue-simple.json +++ b/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_blue-simple.json @@ -2,7 +2,14 @@ "name": "蓝色简洁", "actionbar": { "style": "xform_blue_simple", - "customIconStyle" : "" + "customIconStyle" : "", + "forceStyles" : { + "container" : { + "width" : "100%", + "border-top" : "0px", + "border-bottom" : "1px solid #4a90e2" + } + } }, "paging" : { "style" : "default" diff --git a/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_cmcc.json b/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_cmcc.json index e2f4a249ad..6558a850f3 100644 --- a/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_cmcc.json +++ b/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_cmcc.json @@ -2,7 +2,14 @@ "name": "集团样式", "actionbar": { "style": "cmcc", - "customIconStyle" : "white" + "customIconStyle" : "white", + "forceStyles" : { + "container" : { + "width" : "100%", + "border-top" : "0px", + "border-bottom" : "1px solid #4a90e2" + } + } }, "paging" : { "style" : "default" diff --git a/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_default.json b/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_default.json index 70c887d8a0..1d9ad7bd8c 100644 --- a/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_default.json +++ b/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_default.json @@ -37,7 +37,14 @@ }, "actionbar": { "style": "xform_blue_simple", - "customIconStyle" : "" + "customIconStyle" : "", + "forceStyles" : { + "container" : { + "width" : "100%", + "border-top" : "0px", + "border-bottom" : "1px solid #4a90e2" + } + } }, "paging" : { "style" : "default" diff --git a/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_official.json b/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_official.json index a58a583de9..6b170c2044 100644 --- a/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_official.json +++ b/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_official.json @@ -1,7 +1,15 @@ { "name": "公文样式", "actionbar": { - "style": "xform_red_simple" + "style": "xform_red_simple", + "customIconStyle" : "", + "forceStyles" : { + "container" : { + "width" : "100%", + "border-top" : "0px", + "border-bottom" : "1px solid #cc3d3d" + } + } }, "paging" : { "style" : "default" diff --git a/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_red-simple.json b/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_red-simple.json index 302613341d..e90590768c 100644 --- a/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_red-simple.json +++ b/o2web/source/x_component_query_ViewDesigner/$View/skin/styles_red-simple.json @@ -2,7 +2,14 @@ "name": "红色简洁", "actionbar": { "style": "xform_red_simple", - "customIconStyle" : "" + "customIconStyle" : "", + "forceStyles" : { + "container" : { + "width" : "100%", + "border-top" : "0px", + "border-bottom" : "1px solid #cc3d3d" + } + } }, "paging" : { "style" : "red" diff --git a/o2web/source/x_component_query_ViewDesigner/Main.js b/o2web/source/x_component_query_ViewDesigner/Main.js index cd73c826cf..38c48fdcbf 100644 --- a/o2web/source/x_component_query_ViewDesigner/Main.js +++ b/o2web/source/x_component_query_ViewDesigner/Main.js @@ -782,6 +782,9 @@ MWF.xApplication.query.ViewDesigner.Main = new Class({ this.options.id = this.view.data.id; }.bind(this)); }, + preview : function(){ + this.view.preview(); + }, saveViewAs: function(){ this.view.saveAs(); }, diff --git a/o2web/source/x_component_query_ViewDesigner/View.js b/o2web/source/x_component_query_ViewDesigner/View.js index 4fa1a6b107..907b23fc92 100644 --- a/o2web/source/x_component_query_ViewDesigner/View.js +++ b/o2web/source/x_component_query_ViewDesigner/View.js @@ -28,6 +28,7 @@ MWF.xApplication.query.ViewDesigner.View = new Class({ this.designer = designer; this.data = data; + if (!this.data.data) this.data.data = {}; this.parseData(); @@ -47,7 +48,7 @@ MWF.xApplication.query.ViewDesigner.View = new Class({ if(this.designer.application) this.data.applicationName = this.designer.application.name; if(this.designer.application) this.data.application = this.designer.application.id; - this.isNewView = (this.data.id) ? false : true; + this.isNewView = (this.data.name) ? false : true; this.items = []; this.view = this; @@ -575,6 +576,20 @@ MWF.xApplication.query.ViewDesigner.View = new Class({ // this.items.push(new MWF.xApplication.process.DictionaryDesigner.Dictionary.item("ROOT", this.data.data, null, 0, this, true)); // }, + preview: function(){ + if( this.isNewView ){ + this.designer.notice( this.designer.lp.saveViewNotice, "error" ); + return; + } + this.saveSilence( function () { + var url = "/x_desktop/app.html?app=query.Query&status="; + url += JSON.stringify({ + id : this.data.application, + viewId : this.data.id + }); + window.open(url,"_blank"); + }.bind(this)); + }, saveSilence: function(callback){ if (!this.data.name){ this.designer.notice(this.designer.lp.notice.inputName, "error"); @@ -583,6 +598,7 @@ MWF.xApplication.query.ViewDesigner.View = new Class({ this.designer.actions.saveView(this.data, function(json){ this.data.id = json.data.id; + this.isNewView = false; //this.page.textNode.set("text", this.data.name); if (this.lisNode) { this.lisNode.getLast().set("text", this.data.name+"("+this.data.alias+")"); @@ -599,7 +615,7 @@ MWF.xApplication.query.ViewDesigner.View = new Class({ //} this.designer.actions.saveView(this.data, function(json){ this.designer.notice(this.designer.lp.notice.save_success, "success", this.node, {"x": "left", "y": "bottom"}); - + this.isNewView = false; this.data.id = json.data.id; //this.page.textNode.set("text", this.data.name); if (this.lisNode) { diff --git a/o2web/source/x_component_query_ViewDesigner/lp/zh-cn.js b/o2web/source/x_component_query_ViewDesigner/lp/zh-cn.js index 99fce69d2f..437ae072a1 100644 --- a/o2web/source/x_component_query_ViewDesigner/lp/zh-cn.js +++ b/o2web/source/x_component_query_ViewDesigner/lp/zh-cn.js @@ -13,6 +13,7 @@ MWF.xApplication.query.ViewDesigner.LP = { "name": "名称", "alias": "别名", "description": "描述", + "saveViewNotice" : "请先保存视图!", "application" : "数据应用", "newView" : "新视图", -- GitLab