提交 b0cea409 编写于 作者: U unknown

视图样式调整,增加开发界面的预览功能

上级 77d7a8b7
{ {
"pagingBarWraper" : {
"height" : "60px",
"overflow" : "hidden"
},
"pagingBar" : { "pagingBar" : {
"float": "left", "float": "left",
"margin-left": "10px", "margin-left": "10px",
"margin-top": "18px",
"height": "24px", "height": "24px",
"color": "#777777" "color": "#777777"
}, },
......
{ {
"pagingBarWraper" : {
"height" : "56px",
"overflow" : "hidden"
},
"pagingBar" : { "pagingBar" : {
"float" : "right", "float" : "right",
"margin-right" : "10px", "margin-right" : "10px",
......
{ {
"pagingBarWraper" : {
"height" : "60px",
"overflow" : "hidden"
},
"pagingBar" : { "pagingBar" : {
"float": "left", "float": "left",
"margin-left": "10px", "margin-left": "10px",
"margin-top": "18px",
"height": "24px", "height": "24px",
"color": "#777777" "color": "#777777"
}, },
......
...@@ -56,7 +56,9 @@ o2.widget.Paging = new Class({ ...@@ -56,7 +56,9 @@ o2.widget.Paging = new Class({
createNode: function() { createNode: function() {
var _self = this; 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; var i, max, min;
......
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
"overflow": "hidden" "overflow": "hidden"
}, },
"viewPageNode": { "viewPageNode": {
"height": "80px" // "height": "80px"
}, },
"viewPageAreaNode": { "viewPageAreaNode": {
"height": "24px", // "height": "24px",
"margin-top": "28px" // "margin-top": "28px"
}, },
"viewPageContentNode": { "viewPageContentNode": {
"float": "left", "float": "left",
......
...@@ -108,12 +108,12 @@ MWF.xApplication.query.Query.Viewer = MWF.QViewer = new Class({ ...@@ -108,12 +108,12 @@ MWF.xApplication.query.Query.Viewer = MWF.QViewer = new Class({
}, },
loadLayout: function(){ loadLayout: function(){
this.node = new Element("div", {"styles": this.css.node}).inject(this.container); 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); //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.searchAreaNode = new Element("div", {"styles": this.css.searchAreaNode}).inject(this.node);
this.viewAreaNode = new Element("div", {"styles": this.css.viewAreaNode}).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.viewPageNode = new Element("div", {"styles": this.css.viewPageNode}).inject(this.node);
this.viewPageAreaNode = new Element("div", {"styles": this.css.viewPageAreaNode}).inject(this.viewPageNode); this.viewPageAreaNode = new Element("div", {"styles": this.css.viewPageAreaNode}).inject(this.node);
}, },
loadMacro: function (callback) { loadMacro: function (callback) {
MWF.require("MWF.xScript.Macro", function () { MWF.require("MWF.xScript.Macro", function () {
...@@ -169,7 +169,7 @@ MWF.xApplication.query.Query.Viewer = MWF.QViewer = new Class({ ...@@ -169,7 +169,7 @@ MWF.xApplication.query.Query.Viewer = MWF.QViewer = new Class({
var exportSize = this.actionbarAreaNode.getComputedSize(); var exportSize = this.actionbarAreaNode.getComputedSize();
h = h-exportSize.totalHeight; h = h-exportSize.totalHeight;
} }
var pageSize = this.viewPageNode.getComputedSize(); var pageSize = this.viewPageAreaNode.getComputedSize();
h = h-pageSize.totalHeight; h = h-pageSize.totalHeight;
this.viewAreaNode.setStyle("height", ""+h+"px"); this.viewAreaNode.setStyle("height", ""+h+"px");
}, },
...@@ -2040,13 +2040,14 @@ MWF.xApplication.query.Query.Viewer.Paging = new Class({ ...@@ -2040,13 +2040,14 @@ MWF.xApplication.query.Query.Viewer.Paging = new Class({
this.loadPaging( false ) this.loadPaging( false )
}, },
loadPaging : function( firstLoading ){ loadPaging : function( firstLoading ){
this.pagingNode = this.node.getFirst("div"); // this.pagingNode = this.node.getFirst("div");
if( !this.pagingNode ){ // if( !this.pagingNode ){
this.pagingNode = new Element("div").inject( this.node ); // this.pagingNode = new Element("div").inject( this.node );
} // }
this.pagingNode.empty(); // 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", //style : this.options.skin && this.options.skin.pagingBar ? this.options.skin.pagingBar : "default",
countPerPage: this.view.json.pageSize || this.view.options.perPageCount, countPerPage: this.view.json.pageSize || this.view.options.perPageCount,
visiblePages: this.json.visiblePages ? this.json.visiblePages.toInt() : 9, visiblePages: this.json.visiblePages ? this.json.visiblePages.toInt() : 9,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<span MWFnodetype="MWFToolBarSeparator"></span> <span MWFnodetype="MWFToolBarSeparator"></span>
<span MWFnodetype="MWFToolBarButton" MWFButtonImage="save.gif" title="保存视图" MWFButtonAction="saveView" MWFButtonText=""></span> <span MWFnodetype="MWFToolBarButton" MWFButtonImage="save.gif" title="保存视图" MWFButtonAction="saveView" MWFButtonText=""></span>
<span MWFnodetype="MWFToolBarButton" MWFButtonImage="saveNew.gif" title="视图另存为" MWFButtonAction="saveViewAs" MWFButtonText=""></span> <span MWFnodetype="MWFToolBarButton" MWFButtonImage="saveNew.gif" title="视图另存为" MWFButtonAction="saveViewAs" MWFButtonText=""></span>
<span MWFnodetype="MWFToolBarButton" MWFButtonImage="preview.png" title="预览" MWFButtonAction="preview" MWFButtonText=""></span>
<span MWFnodetype="MWFToolBarSeparator"></span> <span MWFnodetype="MWFToolBarSeparator"></span>
<span MWFnodetype="MWFToolBarButton" MWFButtonImage="formExplode.gif" title="视图导出" MWFButtonAction="viewExplode" MWFButtonText=""></span> <span MWFnodetype="MWFToolBarButton" MWFButtonImage="formExplode.gif" title="视图导出" MWFButtonAction="viewExplode" MWFButtonText=""></span>
......
...@@ -45,7 +45,9 @@ ...@@ -45,7 +45,9 @@
"container" : { "container" : {
"width" : "100%", "width" : "100%",
"padding-left" : "10px", "padding-left" : "10px",
"padding-right" : "10px" "padding-right" : "10px",
"border-top" : "0px",
"border-bottom" : "1px solid #4a90e2"
} }
} }
}, },
......
...@@ -2,7 +2,14 @@ ...@@ -2,7 +2,14 @@
"name": "蓝色简洁", "name": "蓝色简洁",
"actionbar": { "actionbar": {
"style": "xform_blue_simple", "style": "xform_blue_simple",
"customIconStyle" : "" "customIconStyle" : "",
"forceStyles" : {
"container" : {
"width" : "100%",
"border-top" : "0px",
"border-bottom" : "1px solid #4a90e2"
}
}
}, },
"paging" : { "paging" : {
"style" : "default" "style" : "default"
......
...@@ -2,7 +2,14 @@ ...@@ -2,7 +2,14 @@
"name": "集团样式", "name": "集团样式",
"actionbar": { "actionbar": {
"style": "cmcc", "style": "cmcc",
"customIconStyle" : "white" "customIconStyle" : "white",
"forceStyles" : {
"container" : {
"width" : "100%",
"border-top" : "0px",
"border-bottom" : "1px solid #4a90e2"
}
}
}, },
"paging" : { "paging" : {
"style" : "default" "style" : "default"
......
...@@ -37,7 +37,14 @@ ...@@ -37,7 +37,14 @@
}, },
"actionbar": { "actionbar": {
"style": "xform_blue_simple", "style": "xform_blue_simple",
"customIconStyle" : "" "customIconStyle" : "",
"forceStyles" : {
"container" : {
"width" : "100%",
"border-top" : "0px",
"border-bottom" : "1px solid #4a90e2"
}
}
}, },
"paging" : { "paging" : {
"style" : "default" "style" : "default"
......
{ {
"name": "公文样式", "name": "公文样式",
"actionbar": { "actionbar": {
"style": "xform_red_simple" "style": "xform_red_simple",
"customIconStyle" : "",
"forceStyles" : {
"container" : {
"width" : "100%",
"border-top" : "0px",
"border-bottom" : "1px solid #cc3d3d"
}
}
}, },
"paging" : { "paging" : {
"style" : "default" "style" : "default"
......
...@@ -2,7 +2,14 @@ ...@@ -2,7 +2,14 @@
"name": "红色简洁", "name": "红色简洁",
"actionbar": { "actionbar": {
"style": "xform_red_simple", "style": "xform_red_simple",
"customIconStyle" : "" "customIconStyle" : "",
"forceStyles" : {
"container" : {
"width" : "100%",
"border-top" : "0px",
"border-bottom" : "1px solid #cc3d3d"
}
}
}, },
"paging" : { "paging" : {
"style" : "red" "style" : "red"
......
...@@ -782,6 +782,9 @@ MWF.xApplication.query.ViewDesigner.Main = new Class({ ...@@ -782,6 +782,9 @@ MWF.xApplication.query.ViewDesigner.Main = new Class({
this.options.id = this.view.data.id; this.options.id = this.view.data.id;
}.bind(this)); }.bind(this));
}, },
preview : function(){
this.view.preview();
},
saveViewAs: function(){ saveViewAs: function(){
this.view.saveAs(); this.view.saveAs();
}, },
......
...@@ -28,6 +28,7 @@ MWF.xApplication.query.ViewDesigner.View = new Class({ ...@@ -28,6 +28,7 @@ MWF.xApplication.query.ViewDesigner.View = new Class({
this.designer = designer; this.designer = designer;
this.data = data; this.data = data;
if (!this.data.data) this.data.data = {}; if (!this.data.data) this.data.data = {};
this.parseData(); this.parseData();
...@@ -47,7 +48,7 @@ MWF.xApplication.query.ViewDesigner.View = new Class({ ...@@ -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.applicationName = this.designer.application.name;
if(this.designer.application) this.data.application = this.designer.application.id; 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.items = [];
this.view = this; this.view = this;
...@@ -575,6 +576,20 @@ MWF.xApplication.query.ViewDesigner.View = new Class({ ...@@ -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)); // 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){ saveSilence: function(callback){
if (!this.data.name){ if (!this.data.name){
this.designer.notice(this.designer.lp.notice.inputName, "error"); this.designer.notice(this.designer.lp.notice.inputName, "error");
...@@ -583,6 +598,7 @@ MWF.xApplication.query.ViewDesigner.View = new Class({ ...@@ -583,6 +598,7 @@ MWF.xApplication.query.ViewDesigner.View = new Class({
this.designer.actions.saveView(this.data, function(json){ this.designer.actions.saveView(this.data, function(json){
this.data.id = json.data.id; this.data.id = json.data.id;
this.isNewView = false;
//this.page.textNode.set("text", this.data.name); //this.page.textNode.set("text", this.data.name);
if (this.lisNode) { if (this.lisNode) {
this.lisNode.getLast().set("text", this.data.name+"("+this.data.alias+")"); this.lisNode.getLast().set("text", this.data.name+"("+this.data.alias+")");
...@@ -599,7 +615,7 @@ MWF.xApplication.query.ViewDesigner.View = new Class({ ...@@ -599,7 +615,7 @@ MWF.xApplication.query.ViewDesigner.View = new Class({
//} //}
this.designer.actions.saveView(this.data, function(json){ 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.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.data.id = json.data.id;
//this.page.textNode.set("text", this.data.name); //this.page.textNode.set("text", this.data.name);
if (this.lisNode) { if (this.lisNode) {
......
...@@ -13,6 +13,7 @@ MWF.xApplication.query.ViewDesigner.LP = { ...@@ -13,6 +13,7 @@ MWF.xApplication.query.ViewDesigner.LP = {
"name": "名称", "name": "名称",
"alias": "别名", "alias": "别名",
"description": "描述", "description": "描述",
"saveViewNotice" : "请先保存视图!",
"application" : "数据应用", "application" : "数据应用",
"newView" : "新视图", "newView" : "新视图",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册