diff --git a/o2web/source/x_component_query_StatementDesigner/Statement.js b/o2web/source/x_component_query_StatementDesigner/Statement.js index 8ab9fa0a9b41333153900ffeab279759e9bd60a1..f96a5fa89f2015964edc3bff6027915ea722a937 100644 --- a/o2web/source/x_component_query_StatementDesigner/Statement.js +++ b/o2web/source/x_component_query_StatementDesigner/Statement.js @@ -3,7 +3,7 @@ MWF.xApplication.query = MWF.xApplication.query || {}; MWF.xApplication.query.StatementDesigner = MWF.xApplication.query.StatementDesigner || {}; MWF.APPDSMD = MWF.xApplication.query.StatementDesigner; -MWF.xDesktop.requireApp("query.StatementDesigner", "lp."+MWF.language, null, false); +MWF.xDesktop.requireApp("query.StatementDesigner", "lp." + MWF.language, null, false); MWF.xDesktop.requireApp("query.StatementDesigner", "Property", null, false); MWF.xDesktop.requireApp("query.ViewDesigner", "View", null, false); o2.require("o2.widget.JavascriptEditor", null, false); @@ -19,11 +19,11 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({ "propertyPath": "../x_component_query_StatementDesigner/$Statement/statement.html" }, - initialize: function(designer, data, options){ + initialize: function (designer, data, options) { this.setOptions(options); this.path = "../x_component_query_StatementDesigner/$Statement/"; - this.cssPath = "../x_component_query_StatementDesigner/$Statement/"+this.options.style+"/css.wcss"; + this.cssPath = "../x_component_query_StatementDesigner/$Statement/" + this.options.style + "/css.wcss"; this._loadCss(); @@ -36,47 +36,47 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({ //this.statementRunNode = this.designer.designerStatementArea; - 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.applicationName = this.designer.application.name; + if (this.designer.application) this.data.application = this.designer.application.id; this.isNewStatement = (this.data.id) ? false : true; this.view = this; this.autoSave(); - this.designer.addEvent("queryClose", function(){ + this.designer.addEvent("queryClose", function () { if (this.autoSaveTimerID) window.clearInterval(this.autoSaveTimerID); }.bind(this)); }, - parseData: function(){ + parseData: function () { this.json = this.data; if (!this.json.type) this.json.type = "select"; if (!this.json.format) this.json.format = "jpql"; if (!this.json.entityCategory) this.json.entityCategory = "official"; if (!this.json.entityClassName) this.json.entityClassName = "com.x.processplatform.core.entity.content.Task"; }, - autoSave: function(){ - this.autoSaveTimerID = window.setInterval(function(){ + autoSave: function () { + this.autoSaveTimerID = window.setInterval(function () { if (!this.autoSaveCheckNode) this.autoSaveCheckNode = this.designer.contentToolbarNode.getElement("#MWFAutoSaveCheck"); - if (this.autoSaveCheckNode){ - if (this.autoSaveCheckNode.get("checked")){ + if (this.autoSaveCheckNode) { + if (this.autoSaveCheckNode.get("checked")) { this.save(); } } }.bind(this), 60000); }, - load : function(){ + load: function () { // this.setAreaNodeSize(); // this.designer.addEvent("resize", this.setAreaNodeSize.bind(this)); this.areaNode.inject(this.node); - this.designer.statementListAreaNode.getChildren().each(function(node){ + this.designer.statementListAreaNode.getChildren().each(function (node) { var statement = node.retrieve("statement"); - if (statement.id==this.data.id){ - if (this.designer.currentListStatementItem){ + if (statement.id == this.data.id) { + if (this.designer.currentListStatementItem) { this.designer.currentListStatementItem.setStyles(this.designer.css.listStatementItem); } node.setStyles(this.designer.css.listStatementItem_current); @@ -89,15 +89,15 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({ // this.showProperty(); this.selected(); }, - selected: function(){ - if (this.currentSelectedModule){ - if (this.currentSelectedModule==this){ + selected: function () { + if (this.currentSelectedModule) { + if (this.currentSelectedModule == this) { return true; - }else{ + } else { this.currentSelectedModule.unSelected(); } } - if( this.view && this.view.domListNode ){ + if (this.view && this.view.domListNode) { this.view.domListNode.hide(); } @@ -105,28 +105,28 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({ this.isSelected = true; this.showProperty(); }, - unSelected: function(){ + unSelected: function () { this.currentSelectedModule = null; this.isSelected = false; this.hideProperty(); }, - showProperty: function(){ - if (!this.property){ + showProperty: function () { + if (!this.property) { this.property = new MWF.xApplication.query.StatementDesigner.Property(this, this.designer.designerContentArea, this.designer, { "path": this.options.propertyPath, - "onPostLoad": function(){ + "onPostLoad": function () { this.property.show(); }.bind(this) }); this.property.load(); - }else{ + } else { this.property.show(); } }, - hideProperty: function(){ + hideProperty: function () { if (this.property) this.property.hide(); }, - loadJpqlTab: function(callback){ + loadJpqlTab: function (callback) { var _self = this; MWF.require("MWF.widget.Tab", null, false); @@ -134,13 +134,13 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({ this.jpqlTab.load(); this.tabJpqlNode = Element("div"); - this.jpqlTabPageNode.inject( this.tabJpqlNode ); + this.jpqlTabPageNode.inject(this.tabJpqlNode); this.tabCountJpqlNode = Element("div"); - this.countJpqlTabPageNode.inject( this.tabCountJpqlNode ); + this.countJpqlTabPageNode.inject(this.tabCountJpqlNode); this.jpqlPage = this.jpqlTab.addTab(this.tabJpqlNode, this.designer.lp.queryStatement); - this.countJpqlPage = this.jpqlTab.addTab(this.tabCountJpqlNode, this.designer.lp.countStatement ); + this.countJpqlPage = this.jpqlTab.addTab(this.tabCountJpqlNode, this.designer.lp.countStatement); this.jpqlPage.showTabIm(); @@ -154,7 +154,7 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({ // this.selected(); // }.bind(this)); }, - loadTab: function(callback){ + loadTab: function (callback) { var _self = this; MWF.require("MWF.widget.Tab", null, false); @@ -162,31 +162,36 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({ this.tab.load(); this.tabRunNode = Element("div"); - this.pageRunNode = new Element("div", {"styles": {"overflow": "auto","background-color":"#fff"}}).inject(this.tabRunNode); - this.runArea.inject( this.pageRunNode ); + this.pageRunNode = new Element("div", { + "styles": { + "overflow": "auto", + "background-color": "#fff" + } + }).inject(this.tabRunNode); + this.runArea.inject(this.pageRunNode); - this.tabViewNode = Element("div", {"styles": { "height": "100%" }}); + this.tabViewNode = Element("div", {"styles": {"height": "100%"}}); this.pageViewNode = new Element("div.pageViewNode").inject(this.tabViewNode); - this.viewArea.inject( this.pageViewNode ); + this.viewArea.inject(this.pageViewNode); this.runPage = this.tab.addTab(this.tabRunNode, this.designer.lp.runTest); - this.viewPage = this.tab.addTab(this.tabViewNode, this.designer.lp.view ); + this.viewPage = this.tab.addTab(this.tabViewNode, this.designer.lp.view); this.runPage.showTabIm(); - this.viewPage.addEvent("postShow", function(){ - if( this.view ){ + this.viewPage.addEvent("postShow", function () { + if (this.view) { this.view.setContentHeight(); this.view.selected(); } }.bind(this)); - this.runPage.addEvent("postShow", function(){ + this.runPage.addEvent("postShow", function () { this.selected(); }.bind(this)); }, - loadStatement: function(){ + loadStatement: function () { //this.statementDesignerNode = new Element("div", {"styles": this.css.statementDesignerNode}).inject(this.areaNode); - this.loadStatementHtml(function(){ + this.loadStatementHtml(function () { this.designerArea = this.areaNode.getElement(".o2_statement_statementDesignerNode"); this.jpqlTabPageNode = this.areaNode.getElement(".o2_statement_statementJpqlTabPageNode"); @@ -211,7 +216,6 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({ this.jpqlTypeSelect = this.areaNode.getElement(".o2_statement_statementDesignerTypeContent").getElement("select"); - // this.jpqlSelectEditor = this.areaNode.getElement(".o2_statement_statementDesignerJpql_select"); // this.jpqlUpdateEditor = this.areaNode.getElement(".o2_statement_statementDesignerJpql_update"); // this.jpqlDeleteEditor = this.areaNode.getElement(".o2_statement_statementDesignerJpql_sdelete"); @@ -239,10 +243,10 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({ this.runResultNode = this.runContentNode.getLast(); this.setRunnerSize(); this.designer.addEvent("resize", this.setRunnerSize.bind(this)); - if (this.json.format=="script"){ + if (this.json.format == "script") { this.loadStatementScriptEditor(); this.loadStatementCountScriptEditor(); - }else{ + } else { this.loadStatementEditor(); this.loadStatementCountEditor(); } @@ -256,15 +260,15 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({ this.setEvent(); }.bind(this)); }, - loadStatementScriptEditor: function(){ - if (! this.scriptEditor){ + loadStatementScriptEditor: function () { + if (!this.scriptEditor) { debugger; - o2.require("o2.widget.ScriptArea", function(){ + o2.require("o2.widget.ScriptArea", function () { this.scriptEditor = new o2.widget.ScriptArea(this.scriptArea, { "isbind": false, "maxObj": this.designer.designNode, "title": this.designer.lp.scriptTitle, - "onChange": function(){ + "onChange": function () { this.json.scriptText = this.scriptEditor.toJson().code; }.bind(this) }); @@ -272,15 +276,15 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({ }.bind(this), false); } }, - loadStatementCountScriptEditor: function(){ - if (! this.countScriptEditor){ + loadStatementCountScriptEditor: function () { + if (!this.countScriptEditor) { debugger; - o2.require("o2.widget.ScriptArea", function(){ + o2.require("o2.widget.ScriptArea", function () { this.countScriptEditor = new o2.widget.ScriptArea(this.countScriptArea, { "isbind": false, "maxObj": this.designer.designNode, "title": this.designer.lp.scriptTitle, - "onChange": function(){ + "onChange": function () { this.json.countScriptText = this.countScriptEditor.toJson().code; }.bind(this) }); @@ -288,50 +292,53 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({ }.bind(this), false); } }, - setRunnerSize: function(){ + setRunnerSize: function () { debugger; var size = this.areaNode.getSize(); var designerSize = this.designerArea.getComputedSize(); - var y = size.y-designerSize.totalHeight; + var y = size.y - designerSize.totalHeight; var mTop = this.runArea.getStyle("margin-top").toInt(); var mBottom = this.runArea.getStyle("margin-bottom").toInt(); var pTop = this.runArea.getStyle("padding-top").toInt(); var pBottom = this.runArea.getStyle("padding-bottom").toInt(); - y = y-mTop-mBottom-pTop-pBottom-1; + y = y - mTop - mBottom - pTop - pBottom - 1; var tabSize = this.tabNode.getComputedSize(); y = y - tabSize.totalHeight; - this.runArea.setStyle("height", ""+y+"px"); + this.runArea.setStyle("height", "" + y + "px"); // var titleSize = this.runTitleNode.getComputedSize(); // y = y - titleSize.totalHeight; - this.runContentNode.setStyle("height", ""+y+"px"); + this.runContentNode.setStyle("height", "" + y + "px"); }, - loadStatementEditor: function(){ - if (!this.editor){ - o2.require("o2.widget.JavascriptEditor", function(){ - this.editor = new o2.widget.JavascriptEditor(this.jpqlEditorNode, {"title": "JPQL", "option": {"mode": "sql"}}); - this.editor.load(function(){ - if (this.json.data){ + loadStatementEditor: function () { + if (!this.editor) { + o2.require("o2.widget.JavascriptEditor", function () { + this.editor = new o2.widget.JavascriptEditor(this.jpqlEditorNode, { + "title": "JPQL", + "option": {"mode": "sql"} + }); + this.editor.load(function () { + if (this.json.data) { this.editor.editor.setValue(this.json.data); - }else{ + } else { var table = "table"; switch (this.json.type) { case "update": - this.editor.editor.setValue("UPDATE "+table+" o SET "); + this.editor.editor.setValue("UPDATE " + table + " o SET "); break; case "delete": - this.editor.editor.setValue("DELETE "+table+" o WHERE "); + this.editor.editor.setValue("DELETE " + table + " o WHERE "); break; default: - this.editor.editor.setValue("SELECT * FROM "+table+" o"); + this.editor.editor.setValue("SELECT * FROM " + table + " o"); } } this.json.data = this.editor.editor.getValue(); - this.editor.addEditorEvent("change", function(){ + this.editor.addEditorEvent("change", function () { debugger; this.data.data = this.editor.getValue(); this.checkJpqlType(); @@ -346,20 +353,23 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({ } }, - loadStatementCountEditor: function(){ - if (!this.countEditor){ - o2.require("o2.widget.JavascriptEditor", function(){ - this.countEditor = new o2.widget.JavascriptEditor(this.countJpqlEditorNode, {"title": "JPQL", "option": {"mode": "sql"}}); - this.countEditor.load(function(){ - if (this.json.countData){ + loadStatementCountEditor: function () { + if (!this.countEditor) { + o2.require("o2.widget.JavascriptEditor", function () { + this.countEditor = new o2.widget.JavascriptEditor(this.countJpqlEditorNode, { + "title": "JPQL", + "option": {"mode": "sql"} + }); + this.countEditor.load(function () { + if (this.json.countData) { this.countEditor.editor.setValue(this.json.countData); - }else{ + } else { var table = "table"; - this.countEditor.editor.setValue("SELECT count(o.id) FROM "+table+" o"); + this.countEditor.editor.setValue("SELECT count(o.id) FROM " + table + " o"); } this.json.countData = this.countEditor.editor.getValue(); - this.countEditor.addEditorEvent("change", function(){ + this.countEditor.addEditorEvent("change", function () { debugger; this.data.countData = this.countEditor.getValue(); }.bind(this)); @@ -373,27 +383,27 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({ } }, - setSatementTable: function(){ + setSatementTable: function () { if (!this.json.type) this.json.type = "select"; this.changeType(this.json.type, true); - if (this.json.data){ + if (this.json.data) { this.editor.editor.setValue(this.json.data); - }else{ + } else { var table = (this.json.tableObj) ? this.json.tableObj.name : "table"; switch (this.json.type) { case "update": - this.editor.editor.setValue("UPDATE "+table+" o SET "); + this.editor.editor.setValue("UPDATE " + table + " o SET "); break; case "delete": - this.editor.editor.setValue("DELETE "+table+" o WHERE "); + this.editor.editor.setValue("DELETE " + table + " o WHERE "); break; default: - this.editor.editor.setValue("SELECT * FROM "+table+" o"); + this.editor.editor.setValue("SELECT * FROM " + table + " o"); } } }, - checkJpqlType: function(){ + checkJpqlType: function () { var str = this.json.data; this.json.data = str; var jpql_select = /^select/i; @@ -403,44 +413,47 @@ MWF.xApplication.query.StatementDesigner.Statement = new Class({ if (jpql_update.test(str)) return this.changeType("update"); if (jpql_delete.test(str)) return this.changeType("delete"); }, - changeType: function(type, force){ - if (this.json.type!=type) this.json.type=type; - if (type != this.jpqlTypeSelect.options[this.jpqlTypeSelect.selectedIndex].value || force){ - for (var i=0; isize.x){ - this.viewTitleNode.setStyle("width", ""+(width-2)+"px"); - this.viewAreaNode.setStyle("width", ""+(width-2)+"px"); - }else{ - this.viewTitleNode.setStyle("width", ""+(size.x-2)+"px"); - this.viewAreaNode.setStyle("width", ""+(size.x-2)+"px"); + if (width > size.x) { + this.viewTitleNode.setStyle("width", "" + (width - 2) + "px"); + this.viewAreaNode.setStyle("width", "" + (width - 2) + "px"); + } else { + this.viewTitleNode.setStyle("width", "" + (size.x - 2) + "px"); + this.viewAreaNode.setStyle("width", "" + (size.x - 2) + "px"); } this.setContentColumnWidth(); this.setContentHeight(); }, - _setEditStyle: function(name, input, oldValue){ - if( name=="data.actionbarHidden" ){ - if( this.json.data.actionbarHidden ){ + _setEditStyle: function (name, input, oldValue) { + if (name == "data.actionbarHidden") { + if (this.json.data.actionbarHidden) { this.hideActionbar() - }else{ + } else { this.showActionbar() } } - if( name=="data.selectAllEnable" ){ - if( this.json.data.selectAllEnable ){ - this.viewTitleTrNode.getElement(".viewTitleCheckboxTd").setStyle("display","table-cell"); - this.viewContentTableNode.getElements(".viewContentCheckboxTd").setStyle("display","table-cell"); - }else{ - this.viewTitleTrNode.getElement(".viewTitleCheckboxTd").setStyle("display","none"); - this.viewContentTableNode.getElements(".viewContentCheckboxTd").setStyle("display","none"); + if (name == "data.selectAllEnable") { + if (this.json.data.selectAllEnable) { + this.viewTitleTrNode.getElement(".viewTitleCheckboxTd").setStyle("display", "table-cell"); + this.viewContentTableNode.getElements(".viewContentCheckboxTd").setStyle("display", "table-cell"); + } else { + this.viewTitleTrNode.getElement(".viewTitleCheckboxTd").setStyle("display", "none"); + this.viewContentTableNode.getElements(".viewContentCheckboxTd").setStyle("display", "none"); } } - if (name=="data.viewStyleType"){ + if (name == "data.viewStyleType") { var file = (this.stylesList && this.json.data.viewStyleType) ? this.stylesList[this.json.data.viewStyleType].file : null; var extendFile = (this.stylesList && this.json.data.viewStyleType) ? this.stylesList[this.json.data.viewStyleType].extendFile : null; - this.loadTemplateStyles( file, extendFile, function( templateStyles ){ + this.loadTemplateStyles(file, extendFile, function (templateStyles) { this.templateStyles = templateStyles; var oldFile, oldExtendFile; - if( oldValue && this.stylesList[oldValue] ){ + if (oldValue && this.stylesList[oldValue]) { oldFile = this.stylesList[oldValue].file; oldExtendFile = this.stylesList[oldValue].extendFile; } - this.loadTemplateStyles( oldFile, oldExtendFile, function( oldTemplateStyles ){ + this.loadTemplateStyles(oldFile, oldExtendFile, function (oldTemplateStyles) { this.json.data.styleConfig = (this.stylesList && this.json.data.viewStyleType) ? this.stylesList[this.json.data.viewStyleType] : null; @@ -1252,16 +1206,16 @@ MWF.xApplication.query.StatementDesigner.View = new Class({ if (this.templateStyles["view"]) this.setTemplateStyles(this.templateStyles["view"]); this.setAllStyles(); - this.actionbarList.each( function (module) { - if (oldTemplateStyles["actionbar"]){ + this.actionbarList.each(function (module) { + if (oldTemplateStyles["actionbar"]) { module.clearTemplateStyles(oldTemplateStyles["actionbar"]); } module.setStyleTemplate(); module.setAllStyles(); }) - this.pagingList.each( function (module) { - if (oldTemplateStyles["paging"]){ + this.pagingList.each(function (module) { + if (oldTemplateStyles["paging"]) { module.clearTemplateStyles(oldTemplateStyles["paging"]); } module.setStyleTemplate(); @@ -1279,41 +1233,41 @@ MWF.xApplication.query.StatementDesigner.View = new Class({ }.bind(this)) } - if (name=="data.viewStyles"){ + if (name == "data.viewStyles") { this.setCustomStyles(); } }, - loadTemplateStyle : function( callback ){ - this.loadStylesList(function(){ + loadTemplateStyle: function (callback) { + this.loadStylesList(function () { var oldStyleValue = ""; - if ((!this.json.data.viewStyleType) || !this.stylesList[this.json.data.viewStyleType]) this.json.data.viewStyleType="default"; - this.loadTemplateStyles( this.stylesList[this.json.data.viewStyleType].file, this.stylesList[this.json.data.viewStyleType].extendFile, - function( templateStyles ){ + if ((!this.json.data.viewStyleType) || !this.stylesList[this.json.data.viewStyleType]) this.json.data.viewStyleType = "default"; + this.loadTemplateStyles(this.stylesList[this.json.data.viewStyleType].file, this.stylesList[this.json.data.viewStyleType].extendFile, + function (templateStyles) { this.templateStyles = templateStyles; - if( !this.json.data.viewStyleType )this.json.data.viewStyleType = "default"; + if (!this.json.data.viewStyleType) this.json.data.viewStyleType = "default"; - if ( this.templateStyles && this.templateStyles["view"]){ + if (this.templateStyles && this.templateStyles["view"]) { var viewStyles = Object.clone(this.templateStyles["view"]); - if( viewStyles.contentGroupTd )delete viewStyles.contentGroupTd; - if( viewStyles.groupCollapseNode )delete viewStyles.groupCollapseNode; - if( viewStyles.groupExpandNode )delete viewStyles.groupExpandNode; - if(!this.json.data.viewStyles){ + if (viewStyles.contentGroupTd) delete viewStyles.contentGroupTd; + if (viewStyles.groupCollapseNode) delete viewStyles.groupCollapseNode; + if (viewStyles.groupExpandNode) delete viewStyles.groupExpandNode; + if (!this.json.data.viewStyles) { this.json.data.viewStyles = viewStyles; - }else{ - this.setTemplateStyles( viewStyles ); + } else { + this.setTemplateStyles(viewStyles); } } this.setCustomStyles(); - if(callback)callback(); + if (callback) callback(); }.bind(this) ); }.bind(this)); }, - clearTemplateStyles: function(styles){ - if (styles){ + clearTemplateStyles: function (styles) { + if (styles) { if (styles.container) this.removeStyles(styles.container, "container"); if (styles.table) this.removeStyles(styles.table, "table"); if (styles.titleTr) this.removeStyles(styles.titleTr, "titleTr"); @@ -1332,7 +1286,7 @@ MWF.xApplication.query.StatementDesigner.View = new Class({ } }, - setTemplateStyles: function(styles){ + setTemplateStyles: function (styles) { if (styles.container) this.copyStyles(styles.container, "container"); if (styles.table) this.copyStyles(styles.table, "table"); if (styles.titleTr) this.copyStyles(styles.titleTr, "titleTr"); @@ -1349,18 +1303,18 @@ MWF.xApplication.query.StatementDesigner.View = new Class({ if (styles.checkedRadioNode) this.copyStyles(styles.checkedRadioNode, "checkedRadioNode"); if (styles.tableProperties) this.copyStyles(styles.tableProperties, "tableProperties"); }, - removeStyles: function(from, to){ - if (this.json.data.viewStyles[to]){ - Object.each(from, function(style, key){ - if (this.json.data.viewStyles[to][key] && this.json.data.viewStyles[to][key]==style){ + removeStyles: function (from, to) { + if (this.json.data.viewStyles[to]) { + Object.each(from, function (style, key) { + if (this.json.data.viewStyles[to][key] && this.json.data.viewStyles[to][key] == style) { delete this.json.data.viewStyles[to][key]; } }.bind(this)); } }, - copyStyles: function(from, to){ + copyStyles: function (from, to) { if (!this.json.data.viewStyles[to]) this.json.data.viewStyles[to] = {}; - Object.each(from, function(style, key){ + Object.each(from, function (style, key) { if (!this.json.data.viewStyles[to][key]) this.json.data.viewStyles[to][key] = style; }.bind(this)); } @@ -1458,7 +1412,7 @@ MWF.xApplication.query.StatementDesigner.View = new Class({ MWF.xApplication.query.StatementDesigner.View.Column = new Class({ Extends: MWF.xApplication.query.ViewDesigner.View.Column, - initialize: function(json, view, next){ + initialize: function (json, view, next) { this.propertyPath = "../x_component_query_StatementDesigner/$Statement/column.html"; this.view = view; this.json = json; @@ -1468,11 +1422,11 @@ MWF.xApplication.query.StatementDesigner.View.Column = new Class({ this.domListNode = this.view.domListNode; this.load(); }, - selected: function(){ - if (this.view.statement.currentSelectedModule){ - if (this.view.statement.currentSelectedModule==this){ + selected: function () { + if (this.view.statement.currentSelectedModule) { + if (this.view.statement.currentSelectedModule == this) { return true; - }else{ + } else { this.view.statement.currentSelectedModule.unSelected(); } } @@ -1480,19 +1434,22 @@ MWF.xApplication.query.StatementDesigner.View.Column = new Class({ this.node.setStyles(this.css.viewTitleColumnNode_selected); this.listNode.setStyles(this.css.cloumnListNode_selected); new Fx.Scroll(this.view.areaNode, {"wheelStops": false, "duration": 100}).toElementEdge(this.node); - new Fx.Scroll(this.view.designer.propertyDomArea, {"wheelStops": false, "duration": 100}).toElement(this.listNode); + new Fx.Scroll(this.view.designer.propertyDomArea, { + "wheelStops": false, + "duration": 100 + }).toElement(this.listNode); this.view.statement.currentSelectedModule = this; this.isSelected = true; this._showActions(); this.showProperty(); }, - unSelected: function(){ + unSelected: function () { this.view.statement.currentSelectedModule = null; //this.node.setStyles(this.css.viewTitleColumnNode); - if (this.isError){ + if (this.isError) { this.node.setStyles(this.css.viewTitleColumnNode_error) - }else{ + } else { this.node.setStyles(this.css.viewTitleColumnNode) } @@ -1505,13 +1462,13 @@ MWF.xApplication.query.StatementDesigner.View.Column = new Class({ MWF.xApplication.query.StatementDesigner.View.Actionbar = new Class({ Extends: MWF.xApplication.query.ViewDesigner.View.Actionbar, - initialize: function(json, jsonList, view, options){ - this.setOptions( options ); + initialize: function (json, jsonList, view, options) { + this.setOptions(options); this.propertyPath = "../x_component_query_StatementDesigner/$Statement/actionbar.html"; this.path = "../x_component_query_ViewDesigner/$View/"; this.imagePath_default = "../x_component_query_ViewDesigner/$View/"; this.imagePath_custom = "../x_component_process_FormDesigner/Module/Actionbar/"; - this.cssPath = "../x_component_query_ViewDesigner/$View/"+this.options.style+"/actionbar.wcss"; + this.cssPath = "../x_component_query_ViewDesigner/$View/" + this.options.style + "/actionbar.wcss"; this.view = view; this.json = json; @@ -1521,14 +1478,14 @@ MWF.xApplication.query.StatementDesigner.View.Actionbar = new Class({ this.moduleName = "actionbar"; this.load(); }, - getJsonPath : function(){ + getJsonPath: function () { return "../x_component_query_StatementDesigner/$Statement/toolbars.json"; }, - selected: function(){ - if (this.view.statement.currentSelectedModule){ - if (this.view.statement.currentSelectedModule==this){ + selected: function () { + if (this.view.statement.currentSelectedModule) { + if (this.view.statement.currentSelectedModule == this) { return true; - }else{ + } else { this.view.statement.currentSelectedModule.unSelected(); } } @@ -1543,7 +1500,7 @@ MWF.xApplication.query.StatementDesigner.View.Actionbar = new Class({ //this._showActions(); this.showProperty(); }, - unSelected: function(){ + unSelected: function () { this.view.statement.currentSelectedModule = null; this.node.setStyles(this.css.toolbarWarpNode); @@ -1556,11 +1513,11 @@ MWF.xApplication.query.StatementDesigner.View.Actionbar = new Class({ MWF.xApplication.query.StatementDesigner.View.Paging = new Class({ Extends: MWF.xApplication.query.ViewDesigner.View.Paging, - selected: function(){ - if (this.view.statement.currentSelectedModule){ - if (this.view.statement.currentSelectedModule==this){ + selected: function () { + if (this.view.statement.currentSelectedModule) { + if (this.view.statement.currentSelectedModule == this) { return true; - }else{ + } else { this.view.statement.currentSelectedModule.unSelected(); } } @@ -1572,7 +1529,7 @@ MWF.xApplication.query.StatementDesigner.View.Paging = new Class({ this.isSelected = true; this.showProperty(); }, - unSelected: function(){ + unSelected: function () { this.view.statement.currentSelectedModule = null; this.node.setStyles(this.css.pagingWarpNode);