diff --git a/o2web/source/o2_core/o2/widget/O2Identity.js b/o2web/source/o2_core/o2/widget/O2Identity.js index 7b3663239d2bf80bc6a2178c32c5193fd4dc5008..b9fc79c36e7e8749767fc8034df792ff04bd294a 100644 --- a/o2web/source/o2_core/o2/widget/O2Identity.js +++ b/o2web/source/o2_core/o2/widget/O2Identity.js @@ -468,6 +468,34 @@ o2.widget.O2QueryView = new Class({ } } }); + +o2.widget.O2QueryStatement = new Class({ + Extends: o2.widget.O2View, + getPersonData: function(){ + if (!this.data.query){ + var data = null; + o2.Actions.load("x_query_assemble_designer").StatementAction.get(this.data.id, function(json){ + data = json.data + }, null, false); + this.data = data; + return data; + }else{ + return this.data; + } + }, + open : function (e) { + if( this.data.id && this.data.query ){ + var appId = "query.StatementDesigner" + this.data.id; + if (layout.desktop.apps[appId]){ + layout.desktop.apps[appId].setCurrent(); + }else { + var options = {"id": this.data.id, "application": this.data.query, "appId": appId}; + layout.desktop.openApplication(e, "query.StatementDesigner", options); + } + } + } +}); + o2.widget.O2QueryStat = new Class({ Extends: o2.widget.O2View, getPersonData: function(){ diff --git a/o2web/source/x_component_Selector/QueryStatement.js b/o2web/source/x_component_Selector/QueryStatement.js new file mode 100644 index 0000000000000000000000000000000000000000..b7fd1d4601b4a701cdb6260d3bc3e0bad77bbea7 --- /dev/null +++ b/o2web/source/x_component_Selector/QueryStatement.js @@ -0,0 +1,162 @@ +MWF.xApplication.Selector = MWF.xApplication.Selector || {}; +MWF.xDesktop.requireApp("Selector", "Person", null, false); +MWF.xApplication.Selector.QueryStatement = new Class({ + Extends: MWF.xApplication.Selector.Person, + options: { + "style": "default", + "count": 0, + "title": MWF.xApplication.Selector.LP.selectStatement, + "values": [], + "names": [], + "expand": false, + "forceSearchInItem" : true + }, + _init : function(){ + this.selectType = "querystatement"; + this.className = "QueryStatement"; + }, + loadSelectItems: function(addToNext){ + this.queryAction.listApplication(function(json){ + if (json.data.length){ + json.data.each(function(data){ + if (!data.statementList){ + this.queryAction.listStatement(data.id, function(statementsJson){ + data.statementList = statementsJson.data; + }.bind(this), null, false); + } + if (data.statementList && data.statementList.length){ + var category = this._newItemCategory(data, this, this.itemAreaNode); + data.statementList.each(function(d){ + d.applicationName = data.name; + var item = this._newItem(d, this, category.children); + this.items.push(item); + }.bind(this)); + } + }.bind(this)); + } + }.bind(this)); + }, + + _scrollEvent: function(y){ + return true; + }, + _getChildrenItemIds: function(data){ + return data.statementList || []; + }, + _newItemCategory: function(data, selector, item, level){ + return new MWF.xApplication.Selector.QueryStatement.ItemCategory(data, selector, item, level) + }, + + _listItemByKey: function(callback, failure, key){ + return false; + }, + _getItem: function(callback, failure, id, async){ + this.queryAction.getStatement(function(json){ + if (callback) callback.apply(this, [json]); + }.bind(this), failure, ((typeOf(id)==="string") ? id : id.id), async); + }, + _newItemSelected: function(data, selector, item){ + return new MWF.xApplication.Selector.QueryStatement.ItemSelected(data, selector, item) + }, + _listItemByPinyin: function(callback, failure, key){ + return false; + }, + _newItem: function(data, selector, container, level){ + return new MWF.xApplication.Selector.QueryStatement.Item(data, selector, container, level); + } +}); +MWF.xApplication.Selector.QueryStatement.Item = new Class({ + Extends: MWF.xApplication.Selector.Person.Item, + _getShowName: function(){ + return this.data.name; + }, + _setIcon: function(){ + this.iconNode.setStyle("background-image", "url("+"../x_component_Selector/$Selector/default/icon/view.png)"); + }, + loadSubItem: function(){ + return false; + }, + checkSelectedSingle: function(){ + var selectedItem = this.selector.options.values.filter(function(item, index){ + if (typeOf(item)==="object"){ + if( this.data.id && item.id ){ + return this.data.id === item.id; + }else{ + return this.data.name === item.name; + } + //return (this.data.id === item.id) || (this.data.name === item.name) ; + } + //if (typeOf(item)==="object") return (this.data.id === item.id) || (this.data.name === item.name) ; + if (typeOf(item)==="string") return (this.data.id === item) || (this.data.name === item); + return false; + }.bind(this)); + if (selectedItem.length){ + this.selectedSingle(); + } + }, + checkSelected: function(){ + + var selectedItem = this.selector.selectedItems.filter(function(item, index){ + if( item.data.id && this.data.id){ + return item.data.id === this.data.id; + }else{ + return item.data.name === this.data.name; + } + //return (item.data.id === this.data.id) || (item.data.name === this.data.name); + }.bind(this)); + if (selectedItem.length){ + //selectedItem[0].item = this; + selectedItem[0].addItem(this); + this.selectedItem = selectedItem[0]; + this.setSelected(); + } + } +}); + +MWF.xApplication.Selector.QueryStatement.ItemSelected = new Class({ + Extends: MWF.xApplication.Selector.Person.ItemSelected, + _getShowName: function(){ + return this.data.name; + }, + _setIcon: function(){ + this.iconNode.setStyle("background-image", "url("+"../x_component_Selector/$Selector/default/icon/view.png)"); + }, + check: function(){ + if (this.selector.items.length){ + var items = this.selector.items.filter(function(item, index){ + //return (item.data.id === this.data.id) || (item.data.name === this.data.name); + if( item.data.id && this.data.id){ + return item.data.id === this.data.id; + }else{ + return item.data.name === this.data.name; + } + }.bind(this)); + this.items = items; + if (items.length){ + items.each(function(item){ + item.selectedItem = this; + item.setSelected(); + }.bind(this)); + } + } + } +}); + +MWF.xApplication.Selector.QueryStatement.ItemCategory = new Class({ + Extends: MWF.xApplication.Selector.Person.ItemCategory, + _getShowName: function(){ + return this.data.name; + }, + createNode: function(){ + this.node = new Element("div", { + "styles": this.selector.css.selectorItemCategory_department + }).inject(this.container); + }, + _setIcon: function(){ + this.iconNode.setStyle("background-image", "url("+"../x_component_Selector/$Selector/default/icon/applicationicon.png)"); + }, + _hasChild: function(){ + return (this.data.statementList && this.data.statementList.length); + }, + check: function(){} +}); diff --git a/o2web/source/x_component_Selector/lp/en.js b/o2web/source/x_component_Selector/lp/en.js index 2c141815fa39e5a9c35c7443425d54f414cf0285..315bb8f20ada04e06228978e3ab0a02288b2f484 100644 --- a/o2web/source/x_component_Selector/lp/en.js +++ b/o2web/source/x_component_Selector/lp/en.js @@ -10,6 +10,7 @@ MWF.xApplication.Selector.LP = MWF.SelectorLP = { "selectAppliction": "Select Process Appliction", "selectProcess": "Select Process", "selectView": "Select View", + "selectStatement": "Select Statement", "selectCMSApplication": "Select CMS Application", "selectCMSCategory": "Select CMS Category", "searchDescription" : "search", diff --git a/o2web/source/x_component_Selector/lp/zh-cn.js b/o2web/source/x_component_Selector/lp/zh-cn.js index 4fc4ce4f02ce4a30e2d768f81fdf18fa7c61d8bb..6dd2a6625f00318e07324d2012bb09b707230a28 100644 --- a/o2web/source/x_component_Selector/lp/zh-cn.js +++ b/o2web/source/x_component_Selector/lp/zh-cn.js @@ -12,6 +12,7 @@ MWF.xApplication.Selector.LP = MWF.SelectorLP = { "selectAppliction": "选择流程应用", "selectProcess": "选择流程", "selectView": "选择视图", + "selectStatement" : "选择查询", "selectTable": "选择数据表", "selectFormStyle" : "选择表单样式", "selectCMSApplication": "选择内容管理应用", diff --git a/o2web/source/x_component_cms_FormDesigner/$Main/bottom/icon/statement.png b/o2web/source/x_component_cms_FormDesigner/$Main/bottom/icon/statement.png new file mode 100644 index 0000000000000000000000000000000000000000..c3dc749b71592952ec7fb9267158d182c174c342 Binary files /dev/null and b/o2web/source/x_component_cms_FormDesigner/$Main/bottom/icon/statement.png differ diff --git a/o2web/source/x_component_cms_FormDesigner/$Main/bottom/tools.json b/o2web/source/x_component_cms_FormDesigner/$Main/bottom/tools.json index d3f1dacdbc0e1fd93c350a7b6d538fe65e2859fd..05f91726673fef3f663ec24c0c3162af05c0a0c8 100644 --- a/o2web/source/x_component_cms_FormDesigner/$Main/bottom/tools.json +++ b/o2web/source/x_component_cms_FormDesigner/$Main/bottom/tools.json @@ -194,5 +194,15 @@ "icon": "comment.png", "text": "评论", "className": "Comment" + }, + "statementSelector": { + "icon": "statement.png", + "text": "选择查询", + "className": "StatementSelector" + }, + "statement": { + "icon": "statement.png", + "text": "嵌入查询", + "className": "Statement" } } \ No newline at end of file diff --git a/o2web/source/x_component_cms_FormDesigner/$Main/default/icon/statement.png b/o2web/source/x_component_cms_FormDesigner/$Main/default/icon/statement.png new file mode 100644 index 0000000000000000000000000000000000000000..c3dc749b71592952ec7fb9267158d182c174c342 Binary files /dev/null and b/o2web/source/x_component_cms_FormDesigner/$Main/default/icon/statement.png differ diff --git a/o2web/source/x_component_cms_FormDesigner/$Main/default/tools.json b/o2web/source/x_component_cms_FormDesigner/$Main/default/tools.json index 076f59ceb4d80968db79146e4c1c0268f2999f72..60bef9eaaae88160583fd4a9e6dc2aa14f3210c0 100644 --- a/o2web/source/x_component_cms_FormDesigner/$Main/default/tools.json +++ b/o2web/source/x_component_cms_FormDesigner/$Main/default/tools.json @@ -195,5 +195,15 @@ "icon": "comment.png", "text": "评论", "className": "Comment" + }, + "statementSelector": { + "icon": "statement.png", + "text": "选择查询", + "className": "StatementSelector" + }, + "statement": { + "icon": "statement.png", + "text": "嵌入查询", + "className": "Statement" } } \ No newline at end of file diff --git a/o2web/source/x_component_cms_FormDesigner/Module/Package.js b/o2web/source/x_component_cms_FormDesigner/Module/Package.js index 0a88f4f31e48f44e2bfe5d914d4455f9e3c790a5..f7ead6ad0eebaf7c9bbbfa16da313de13c3c701a 100644 --- a/o2web/source/x_component_cms_FormDesigner/Module/Package.js +++ b/o2web/source/x_component_cms_FormDesigner/Module/Package.js @@ -41,4 +41,6 @@ MWF.xDesktop.requireApp("cms.FormDesigner", "Module.Office", null, false); MWF.xDesktop.requireApp("cms.FormDesigner", "Module.Attachment", null, false); MWF.xDesktop.requireApp("cms.FormDesigner", "Module.Log", null, false); MWF.xDesktop.requireApp("cms.FormDesigner", "Module.Office", null, false); -MWF.xDesktop.requireApp("cms.FormDesigner", "Module.Comment", null, false); \ No newline at end of file +MWF.xDesktop.requireApp("cms.FormDesigner", "Module.Comment", null, false); +MWF.xDesktop.requireApp("cms.FormDesigner", "Module.Statement", null, false); +MWF.xDesktop.requireApp("cms.FormDesigner", "Module.StatementSelector", null, false); \ No newline at end of file diff --git a/o2web/source/x_component_cms_FormDesigner/Module/Statement.js b/o2web/source/x_component_cms_FormDesigner/Module/Statement.js new file mode 100644 index 0000000000000000000000000000000000000000..70c226b511ffa430a0c01bb761b7c0533c2b15a9 --- /dev/null +++ b/o2web/source/x_component_cms_FormDesigner/Module/Statement.js @@ -0,0 +1,39 @@ +MWF.xApplication.cms.FormDesigner.Module = MWF.xApplication.cms.FormDesigner.Module || {}; +MWF.xDesktop.requireApp("process.FormDesigner", "Module.Statement", null, false); +MWF.xApplication.cms.FormDesigner.Module.Statement = MWF.CMSFCStatement = new Class({ + Extends: MWF.FCStatement, + Implements : [MWF.CMSFCMI]//, + //_createViewNode: function(callback){ + // if (!this.viewNode) this.viewNode = new Element("div", {"styles": this.css.viewNode}).inject(this.node); + // this.node.setStyle("background", "transparent"); + // + // this.viewTable = new Element("table", { + // "styles": this.css.viewTitleTableNode, + // "border": "0px", + // "cellPadding": "0", + // "cellSpacing": "0" + // }).inject(this.viewNode); + // this.viewLine = new Element("tr", {"styles": this.css.viewTitleLineNode}).inject(this.viewTable); + // + // if (this.json.select!="no"){ + // this.viewSelectCell = new Element("td", { + // "styles": this.css.viewTitleCellNode + // }).inject(this.viewLine); + // this.viewSelectCell.setStyle("width", "10px"); + // } + // this.form.designer.actions.getQueryView(this.json["view"], function(json){ + // var viewData = JSON.decode(json.data.data); + // viewData.selectEntryList.each(function(column){ + // // if (column.export){ + // var viewCell = new Element("td", { + // "styles": this.css.viewTitleCellNode, + // "text": column.displayName + // }).inject(this.viewLine); + // // } + // }.bind(this)); + // + // if (callback) callback(); + // }.bind(this)); + // this._setViewNodeTitle(); + //} +}); diff --git a/o2web/source/x_component_cms_FormDesigner/Module/StatementSelector.js b/o2web/source/x_component_cms_FormDesigner/Module/StatementSelector.js new file mode 100644 index 0000000000000000000000000000000000000000..718c36e1aabf5d120ca08e2f046f432dadb4b963 --- /dev/null +++ b/o2web/source/x_component_cms_FormDesigner/Module/StatementSelector.js @@ -0,0 +1,6 @@ +MWF.xApplication.cms.FormDesigner.Module = MWF.xApplication.cms.FormDesigner.Module || {}; +MWF.xDesktop.requireApp("process.FormDesigner", "Module.StatementSelector", null, false); +MWF.xApplication.cms.FormDesigner.Module.StatementSelector = MWF.CMSFCStatementSelector = new Class({ + Extends: MWF.FCStatementSelector, + Implements : [MWF.CMSFCMI] +}); diff --git a/o2web/source/x_component_cms_FormDesigner/Script.js b/o2web/source/x_component_cms_FormDesigner/Script.js index 359796cc0361c5d154da09b6c002f02aaf8018ae..feb0a2da3fcfad676924c8b276fd05521ae2006c 100644 --- a/o2web/source/x_component_cms_FormDesigner/Script.js +++ b/o2web/source/x_component_cms_FormDesigner/Script.js @@ -102,6 +102,10 @@ MWF.xApplication.cms.FormDesigner.Script = new Class({ this.loadAuthorScript(v); break; case "Reader": this.loadReaderScript(v); break; + case "Statement": + this.loadStatementScript(v); break; + case "StatementSelector": + this.loadStatementSelectorScript(v); break; } this.bindDataId(v); }, diff --git a/o2web/source/x_component_portal_PageDesigner/Script.js b/o2web/source/x_component_portal_PageDesigner/Script.js index c33d202771631e26eb922d737a9f0414db63edbd..620ff94307f1093d3442d17994ce554c77005595 100644 --- a/o2web/source/x_component_portal_PageDesigner/Script.js +++ b/o2web/source/x_component_portal_PageDesigner/Script.js @@ -158,6 +158,10 @@ MWF.xApplication.portal.PageDesigner.Script = new Class({ this.loadSubformScript(v); break; case "ViewSelector": this.loadViewSelectorScript(v); break; + case "Statement": + this.loadStatementScript(v); break; + case "StatementSelector": + this.loadStatementSelectorScript(v); break; } this.bindDataId(v); }, @@ -421,6 +425,14 @@ MWF.xApplication.portal.PageDesigner.Script = new Class({ this.loadEventsScript(data); }, + loadStatementScript: function(data){ + this.loadEventsScript(data); + }, + loadStatementSelectorScript: function(data){ + this.addScriptItem(data.selectedScript, "code", data, "selectedScript"); + this.loadEventsScript(data); + }, + loadEventsScript: function(data){ Object.each(data.events, function(event, key){ diff --git a/o2web/source/x_component_process_FormDesigner/$Main/bottom/icon/statement.png b/o2web/source/x_component_process_FormDesigner/$Main/bottom/icon/statement.png new file mode 100644 index 0000000000000000000000000000000000000000..c3dc749b71592952ec7fb9267158d182c174c342 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/$Main/bottom/icon/statement.png differ diff --git a/o2web/source/x_component_process_FormDesigner/$Main/bottom/tools.json b/o2web/source/x_component_process_FormDesigner/$Main/bottom/tools.json index 1f052a7bdae805d1d8c3f4a3a23a0506fbbe7048..f5aaff38623f78f093fdcc98a23ddb2e6b6b7445 100644 --- a/o2web/source/x_component_process_FormDesigner/$Main/bottom/tools.json +++ b/o2web/source/x_component_process_FormDesigner/$Main/bottom/tools.json @@ -174,5 +174,15 @@ "icon": "office.png", "text": "Office控件", "className": "Office" + }, + "statementSelector": { + "icon": "statement.png", + "text": "选择查询", + "className": "StatementSelector" + }, + "statement": { + "icon": "statement.png", + "text": "嵌入查询", + "className": "Statement" } } \ No newline at end of file diff --git a/o2web/source/x_component_process_FormDesigner/$Main/default/icon/statement.png b/o2web/source/x_component_process_FormDesigner/$Main/default/icon/statement.png new file mode 100644 index 0000000000000000000000000000000000000000..c3dc749b71592952ec7fb9267158d182c174c342 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/$Main/default/icon/statement.png differ diff --git a/o2web/source/x_component_process_FormDesigner/$Main/default/tools.json b/o2web/source/x_component_process_FormDesigner/$Main/default/tools.json index 82720eb1ca29124a97b0379909bd25f6f171b0c2..cd77817072dbc829b00eefbfc415eb583633c609 100644 --- a/o2web/source/x_component_process_FormDesigner/$Main/default/tools.json +++ b/o2web/source/x_component_process_FormDesigner/$Main/default/tools.json @@ -191,5 +191,15 @@ "icon": "office.png", "text": "Office控件", "className": "Office" + }, + "statementSelector": { + "icon": "statement.png", + "text": "选择查询", + "className": "StatementSelector" + }, + "statement": { + "icon": "statement.png", + "text": "嵌入查询", + "className": "Statement" } } \ No newline at end of file diff --git a/o2web/source/x_component_process_FormDesigner/Module/Package.js b/o2web/source/x_component_process_FormDesigner/Module/Package.js index 73889f9e14595733567de0fee7dae7c2a9192beb..45289b13d617a956373118cdc0ac9849291d45a5 100644 --- a/o2web/source/x_component_process_FormDesigner/Module/Package.js +++ b/o2web/source/x_component_process_FormDesigner/Module/Package.js @@ -41,3 +41,5 @@ MWF.xDesktop.requireApp("process.FormDesigner", "Module.Attachment", null, false MWF.xDesktop.requireApp("process.FormDesigner", "Module.Orgfield", null, false); MWF.xDesktop.requireApp("process.FormDesigner", "Module.Org", null, false); MWF.xDesktop.requireApp("process.FormDesigner", "Module.Opinion", null, false); +MWF.xDesktop.requireApp("process.FormDesigner", "Module.Statement", null, false); +MWF.xDesktop.requireApp("process.FormDesigner", "Module.StatementSelector", null, false); diff --git a/o2web/source/x_component_process_FormDesigner/Module/Statement.js b/o2web/source/x_component_process_FormDesigner/Module/Statement.js new file mode 100644 index 0000000000000000000000000000000000000000..19c1165416976c649db685d20d947440a16d6f8d --- /dev/null +++ b/o2web/source/x_component_process_FormDesigner/Module/Statement.js @@ -0,0 +1,124 @@ +MWF.xApplication.process.FormDesigner.Module = MWF.xApplication.process.FormDesigner.Module || {}; +MWF.xDesktop.requireApp("process.FormDesigner", "Module.View", null, false); +MWF.xApplication.process.FormDesigner.Module.Statement = MWF.FCStatement = new Class({ + Extends: MWF.FCView, + options: { + "style": "default", + "propertyPath": "../x_component_process_FormDesigner/Module/Statement/statement.html" + }, + + initialize: function(form, options){ + this.setOptions(options); + + this.path = "../x_component_process_FormDesigner/Module/Statement/"; + this.cssPath = "../x_component_process_FormDesigner/Module/Statement/"+this.options.style+"/css.wcss"; + + this.imagePath_default = "../x_component_query_ViewDesigner/$Statement/"; + this.imagePath_custom = "../x_component_process_FormDesigner/Module/Actionbar/"; + + this._loadCss(); + this.moduleType = "element"; + this.moduleName = "statement"; + + this.form = form; + this.container = null; + this.containerNode = null; + }, + _createMoveNode: function(){ + this.moveNode = new Element("div", { + "MWFType": "statement", + "id": this.json.id, + "styles": this.css.moduleNodeMove, + "events": { + "selectstart": function(){ + return false; + } + } + }).inject(this.form.container); + }, + + _createNode: function(){ + this.node = this.moveNode.clone(true, true); + this.node.setStyles(this.css.moduleNode); + this.node.set("id", this.json.id); + this.node.addEvent("selectstart", function(){ + return false; + }); + + this.iconNode = new Element("div", { + "styles": this.css.iconNode + }).inject(this.node); + new Element("div", { + "styles": this.css.iconNodeIcon + }).inject(this.iconNode); + new Element("div", { + "styles": this.css.iconNodeText, + "text": "Statement" + }).inject(this.iconNode); + + this.iconNode.addEvent("click", function(){ + this._checkView(); + }.bind(this)); + }, + _createViewNode: function(callback){ + + if (!this.viewNode) this.viewNode = new Element("div", {"styles": this.css.viewNode}).inject(this.node); + if( !this.actionbarNode)this.actionbarNode = new Element("div.actionbarNode",{}).inject( this.viewNode, "top" ); + + this.node.setStyle("background", "transparent"); + + + this.viewTable = new Element("table", { + "styles": this.css.viewTitleTableNode, + "border": "0px", + "cellPadding": "0", + "cellSpacing": "0" + }).inject(this.viewNode); + this.viewLine = new Element("tr", {"styles": this.css.viewTitleLineNode}).inject(this.viewTable); + + if (this.json.select!="no"){ + this.viewSelectCell = new Element("td", { + "styles": this.css.viewTitleCellNode + }).inject(this.viewLine); + this.viewSelectCell.setStyle("width", "10px"); + } + + MWF.Actions.get("x_query_assemble_designer").getView(this.json["queryView"].id, function(json){ + var viewData = JSON.decode(json.data.data); + + this.viewData = viewData; + if( this.json.actionbar === "show" ){ + this.actionbarList = []; + this._showActionbar(); + } + + var columnList = viewData.selectEntryList || viewData.selectList; + columnList.each(function(column){ + if (!column.hideColumn){ + var viewCell = new Element("td", { + "styles": this.css.viewTitleCellNode, + "text": column.displayName + }).inject(this.viewLine); + } + }.bind(this)); + + if (callback) callback(); + }.bind(this)); + this._setViewNodeTitle(); + }, + _checkView: function(callback){ + if (this.json["queryView"] && this.json["queryView"]!="none"){ + this.iconNode.setStyle("display", "none"); + if (this.viewNode) this.viewNode.destroy(); + this.viewNode = null; + this._createViewNode(function(){ + if (callback) callback(); + }.bind(this)); + }else{ + this.iconNode.setStyle("display", "block"); + if (this.viewNode) this.viewNode.destroy(); + this.node.setStyles(this.css.moduleNode); + if (callback) callback(); + } + } +}); diff --git a/o2web/source/x_component_process_FormDesigner/Module/Statement/default/css.wcss b/o2web/source/x_component_process_FormDesigner/Module/Statement/default/css.wcss new file mode 100644 index 0000000000000000000000000000000000000000..ef614b1500ec2963faa32de2326e592b84b58164 --- /dev/null +++ b/o2web/source/x_component_process_FormDesigner/Module/Statement/default/css.wcss @@ -0,0 +1,91 @@ +{ + "moduleNodeMove": { + "border": "2px dashed #ffa200", + "height": "22px", + "line-height": "22px", + "overflow": "hidden", + "margin": "3px", + "display": "block", + "-webkit-user-select": "none", + "-moz-user-select": "none", + "position": "absolute", + "z-index": 10002, + "opacity": 0.7, + "width": "100px", + "cursor": "move", + "background-color": "#EEE" + }, + "moduleNodeShow": { + "border": "1px dashed #333", + "height": "2px", + "cursor": "pointer", + "line-height": "22px", + "overflow": "hidden", + "margin": "3px", + "-webkit-user-select": "none", + "-moz-user-select": "none", + "position": "static", + "display": "block", + "top": "auto", + "left": "auto", + "width": "auto", + "opacity": 0.5, + "background": "#ffa200" + }, + "moduleNode": { + "border": "1px dashed #333", + "height": "100px", + "cursor": "pointer", + "line-height": "22px", + "overflow": "hidden", + "margin": "3px", + "-webkit-user-select": "none", + "-moz-user-select": "none", + "position": "static", + "display": "block", + "top": "auto", + "left": "auto", + "width": "auto", + "opacity": 1, + "background": "transparent" + }, + "iconNode": { + "width": "70px", + "height": "24px", + "color": "#999", + "font-size": "12px", + "position": "static", + "margin": "10px auto" + }, + "iconNodeIcon":{ + "width": "24px", + "height": "24px", + "background": "url("+"../x_component_process_FormDesigner/Module/Statement/default/icon/statement.png) 5px center no-repeat", + "float": "left" + }, + "iconNodeText":{ + "line-height": "24px", + "height": "24px", + "width": "44px", + "float": "right" + }, + "viewNode": { + "overflow": "hidden", + "height": "100%" + }, + "viewTitleTableNode": { + "width": "100%", + "height": "30px", + "background-color": "#EEE", + "border": "1px solid #999" + }, + "viewTitleLineNode": { + "line-height": "30px" + }, + "viewTitleCellNode": { + "border-left": "1px solid #FFF", + "border-right": "1px solid #999", + "padding": "0px 10px" + } + +} \ No newline at end of file diff --git a/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/copy.png b/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/copy.png new file mode 100644 index 0000000000000000000000000000000000000000..195dc6d6c365d298e466026b37c1959d96119ea7 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/copy.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/copy1.png b/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/copy1.png new file mode 100644 index 0000000000000000000000000000000000000000..1398026fb8577130ad7d3bfebf8f4f148dc312a9 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/copy1.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/delete.png b/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/delete.png new file mode 100644 index 0000000000000000000000000000000000000000..08f249365afd29594b51210c6e21ba253897505d Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/delete.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/delete1.png b/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/delete1.png new file mode 100644 index 0000000000000000000000000000000000000000..8f420087aae2f5a6e8cb22376e257d0ee8b2e12e Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/delete1.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/move.png b/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/move.png new file mode 100644 index 0000000000000000000000000000000000000000..bcb1887d01afffceac856906a84243c331ee6ad1 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/move.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/move1.png b/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/move1.png new file mode 100644 index 0000000000000000000000000000000000000000..c50bda51149245dfc2f8d081b359c898173eb2f3 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/move1.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/multi.png b/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/multi.png new file mode 100644 index 0000000000000000000000000000000000000000..af4ac536c02e950d651f2ad8313037bb1eb57f8a Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/multi.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/single.png b/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/single.png new file mode 100644 index 0000000000000000000000000000000000000000..4a224d783435d5f10cfdbffae2149356e8b83766 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/single.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/statement.png b/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/statement.png new file mode 100644 index 0000000000000000000000000000000000000000..3d09261a26eb97c6dedc1d3504cbc2cf915eb642 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/Statement/default/icon/statement.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/Statement/statement.html b/o2web/source/x_component_process_FormDesigner/Module/Statement/statement.html new file mode 100644 index 0000000000000000000000000000000000000000..5e9ce3342da215738fa2b5a55574cd78f2fefa43 --- /dev/null +++ b/o2web/source/x_component_process_FormDesigner/Module/Statement/statement.html @@ -0,0 +1,168 @@ +
+
+ + + + + + + + + + + + + + + + + +
标识:
名称:
描述:
Class:
+ +
+
+ +
+
+ +
+
+ + + + + +
查询:
+ + + + + +
立即载入: + 是 + 否 +
+
+ + + + + + + + + + + + + + + + + + + + + +
显示标题 + 显示 + 不显示 +
选择文件 + +
操作条 + 显示 + 不显示 +
+ +
过滤
+
+
+ + + + + + + + + + + + + + + + + +
标题:
路径:
数据类型:
+ 作为默认过滤条件
+ 作为自定义过滤数据 +
+ + + + + + + + + + + + + + +
逻辑:
比较:
值: + + + + + + +
+
+
+
+
默认过滤条件
+
+
自定义过滤数据
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/o2web/source/x_component_process_FormDesigner/Module/Statement/template.json b/o2web/source/x_component_process_FormDesigner/Module/Statement/template.json new file mode 100644 index 0000000000000000000000000000000000000000..8dd83f0350d704824d7f77b2d9c166fac051cfd4 --- /dev/null +++ b/o2web/source/x_component_process_FormDesigner/Module/Statement/template.json @@ -0,0 +1,90 @@ +{ + "id": "", + "name": "", + "type": "Statement", + "description": "", + "view": "", + "isTitle": "yes", + "select": "no", //single, multi + "isOpen": "yes", + "events": { + "queryLoad": { + "code": "", + "html": "" + }, + "postLoad": { + "code": "", + "html": "" + }, + "load": { + "code": "", + "html": "" + }, + "loadView" : { + "code": "", + "html": "" + }, + "select": { + "code": "", + "html": "" + }, + "openDocument": { + "code": "", + "html": "" + }, + "click": { + "code": "", + "html": "" + }, + "dblclick": { + "code": "", + "html": "" + }, + "keydown": { + "code": "", + "html": "" + }, + "keypress": { + "code": "", + "html": "" + }, + "keyup": { + "code": "", + "html": "" + }, + "mousedown": { + "code": "", + "html": "" + }, + "mousemove": { + "code": "", + "html": "" + }, + "mouseout": { + "code": "", + "html": "" + }, + "mouseover": { + "code": "", + "html": "" + }, + "mouseup": { + "code": "", + "html": "" + }, + "focus": { + "code": "", + "html": "" + }, + "blur": { + "code": "", + "html": "" + } + }, + "properties": {}, + "class": "", + "styles": {}, + "titleStyles":{}, + "itemStyles": {}, + "container": "" +} \ No newline at end of file diff --git a/o2web/source/x_component_process_FormDesigner/Module/StatementSelector.js b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector.js new file mode 100644 index 0000000000000000000000000000000000000000..9557a0506d02c05e6ca1b0154cef70cf78239bbc --- /dev/null +++ b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector.js @@ -0,0 +1,25 @@ +MWF.xApplication.process.FormDesigner.Module = MWF.xApplication.process.FormDesigner.Module || {}; +MWF.xDesktop.requireApp("process.FormDesigner", "Module.$Element", null, false); +MWF.xApplication.process.FormDesigner.Module.StatementSelector = MWF.FCStatementSelector = new Class({ + Extends: MWF.xApplication.process.FormDesigner.Module.Button, + Implements: [Options, Events], + options: { + "style": "default", + "propertyPath": "../x_component_process_FormDesigner/Module/StatementSelector/StatementSelector.html" + }, + + initialize: function(form, options){ + this.setOptions(options); + + this.path = "../x_component_process_FormDesigner/Module/StatementSelector/"; + this.cssPath = "../x_component_process_FormDesigner/Module/StatementSelector/"+this.options.style+"/css.wcss"; + + this._loadCss(); + this.moduleType = "element"; + this.moduleName = "statementSelector"; + + this.form = form; + this.container = null; + this.containerNode = null; + } +}); diff --git a/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/StatementSelector.html b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/StatementSelector.html new file mode 100644 index 0000000000000000000000000000000000000000..6c8718861d3c9ad6097ed0a50f82d0d0b3fd2649 --- /dev/null +++ b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/StatementSelector.html @@ -0,0 +1,198 @@ +
+
+ + + + + + + + + + + + + +
标识:
名称:
描述:
+ +
+
+ +
视图选择框
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
选择框标题:
列标题: + 显示 + 隐藏 +
默认展开 + 展开 + 不展开 +
选择: + 单选 + 多选 +
操作条 + 显示 + 不显示 +
+
+ + + + + + + + + + + + + + + + +
+ + + + + +
查询:
+
+ +
+
+ +
选择结果处理
+ + + + + +
处理方式: + 赋值 + 脚本 +
+ +
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + +
标题:
路径:
数据类型:
+ 作为默认过滤条件
+ 作为自定义过滤数据 +
+ + + + + + + + + + + + + + +
逻辑:
比较:
值: + + + + + + +
+
+
+
+
默认过滤条件
+
+
自定义过滤数据
+ +
+
+ +
+
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/css.wcss b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/css.wcss new file mode 100644 index 0000000000000000000000000000000000000000..ef16f4a94df5981dcb56ec5d6ac9050dc758bfd8 --- /dev/null +++ b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/css.wcss @@ -0,0 +1,55 @@ +{ + "moduleNodeMove": { + "border-radius": "5px", + "border": "1px solid #ffa200", + "overflow": "hidden", + "margin": "3px", + "-webkit-user-select": "none", + "-moz-user-select": "none", + "position": "absolute", + "z-index": 10002, + "opacity": 0.7, + "cursor": "move", + "height": "26px", + "display": "inline-block" + }, + "moduleNodeShow": { + "border": "1px solid #333", + "margin": "3px", + "-webkit-user-select": "none", + "-moz-user-select": "none", + "position": "static", + "top": "auto", + "left": "auto", + "width": "18px", + "height": "2px", + "opacity": 0.5, + "display": "inline-block", + "background": "#ffa200" + }, + "moduleNode": { + "border-radius": "5px", + "border-top": "1px solid #999", + "border-left": "1px solid #999", + "border-right": "1px solid #333", + "border-bottom": "1px solid #333", + "overflow": "hidden", + "cursor": "pointer", + "margin": "3px", + "-webkit-user-select": "none", + "-moz-user-select": "none", + "position": "static", + "top": "auto", + "left": "auto", + "opacity": 1, + "height": "26px", + "display": "inline-block" + }, + "buttonIcon": { + "height": "26px", + "cursor": "pointer", + "border": "0px", + "margin": "0px" + } + +} \ No newline at end of file diff --git a/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/buttonIcon.png b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/buttonIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..fdcd08c037c25c5df8d12e5331904c89ce611590 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/buttonIcon.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/copy.png b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/copy.png new file mode 100644 index 0000000000000000000000000000000000000000..195dc6d6c365d298e466026b37c1959d96119ea7 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/copy.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/copy1.png b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/copy1.png new file mode 100644 index 0000000000000000000000000000000000000000..1398026fb8577130ad7d3bfebf8f4f148dc312a9 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/copy1.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/delete.png b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/delete.png new file mode 100644 index 0000000000000000000000000000000000000000..08f249365afd29594b51210c6e21ba253897505d Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/delete.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/delete1.png b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/delete1.png new file mode 100644 index 0000000000000000000000000000000000000000..8f420087aae2f5a6e8cb22376e257d0ee8b2e12e Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/delete1.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/hand2.png b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/hand2.png new file mode 100644 index 0000000000000000000000000000000000000000..6ef4e93833befc4e6c1e2a9842d99664c80a13d0 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/hand2.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/hand3.png b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/hand3.png new file mode 100644 index 0000000000000000000000000000000000000000..7638be165f4cb28e2f6a8bfb80c87afcefffb9a8 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/hand3.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/inputtext.png b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/inputtext.png new file mode 100644 index 0000000000000000000000000000000000000000..cb8f917c59dc9d11984222e00720b350e6286a2e Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/inputtext.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/move.png b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/move.png new file mode 100644 index 0000000000000000000000000000000000000000..bcb1887d01afffceac856906a84243c331ee6ad1 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/move.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/move1.png b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/move1.png new file mode 100644 index 0000000000000000000000000000000000000000..c50bda51149245dfc2f8d081b359c898173eb2f3 Binary files /dev/null and b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/default/icon/move1.png differ diff --git a/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/template.json b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/template.json new file mode 100644 index 0000000000000000000000000000000000000000..32a258a8793dcd07bd093e318ed3b0fc391dcc6a --- /dev/null +++ b/o2web/source/x_component_process_FormDesigner/Module/StatementSelector/template.json @@ -0,0 +1,85 @@ +{ + "id": "", + "name": "", + "type": "statementSelector", + "description": "", + "titleStyles": {}, + "itemStyles": {}, + "title": "选择", + "isTitle": true, + "select": "single", //"single", "multi" + "application": "", + "statementName": "", + "result": "setValue", //setValue., script + "selectedSetValues": {}, + "selectedScript": { + "code": "", + "html": "" + }, + "events": { + "queryLoad": { + "code": "", + "html": "" + }, + "postLoad": { + "code": "", + "html": "" + }, + "load": { + "code": "", + "html": "" + }, + "click": { + "code": "", + "html": "" + }, + "dblclick": { + "code": "", + "html": "" + }, + "keydown": { + "code": "", + "html": "" + }, + "keypress": { + "code": "", + "html": "" + }, + "keyup": { + "code": "", + "html": "" + }, + "mousedown": { + "code": "", + "html": "" + }, + "mousemove": { + "code": "", + "html": "" + }, + "mouseout": { + "code": "", + "html": "" + }, + "mouseover": { + "code": "", + "html": "" + }, + "mouseup": { + "code": "", + "html": "" + }, + "focus": { + "code": "", + "html": "" + }, + "blur": { + "code": "", + "html": "" + } + }, + "properties": {}, + "class": "", + "styles": {}, + "container": "" +} \ No newline at end of file diff --git a/o2web/source/x_component_process_FormDesigner/Property.js b/o2web/source/x_component_process_FormDesigner/Property.js index 6d5b6beea677c550d63421321a8f5cdb4f427555..7646d67394ef814f8140e9ab667a19f8e7d9d61a 100644 --- a/o2web/source/x_component_process_FormDesigner/Property.js +++ b/o2web/source/x_component_process_FormDesigner/Property.js @@ -1241,6 +1241,7 @@ debugger; var viewNodes = this.propertyContent.getElements(".MWFViewSelect"); var cmsviewNodes = this.propertyContent.getElements(".MWFCMSViewSelect"); var queryviewNodes = this.propertyContent.getElements(".MWFQueryViewSelect"); + var queryStatementNodes = this.propertyContent.getElements(".MWFQueryStatementSelect"); var querystatNodes = this.propertyContent.getElements(".MWFQueryStatSelect"); var fileNodes = this.propertyContent.getElements(".MWFImageFileSelect"); var processFileNodes = this.propertyContent.getElements(".MWFProcessImageFileSelect"); @@ -1307,6 +1308,15 @@ debugger; }); }.bind(this)); + queryStatementNodes.each(function(node){ + new MWF.xApplication.process.ProcessDesigner.widget.PersonSelector(node, this.form.designer, { + "type": "QueryStatement", + "count": 1, + "names": [this.data[node.get("name")]], + "onChange": function(ids){this.saveViewItem(node, ids);}.bind(this) + }); + }.bind(this)); + querystatNodes.each(function(node){ new MWF.xApplication.process.ProcessDesigner.widget.PersonSelector(node, this.form.designer, { "type": "QueryStat", diff --git a/o2web/source/x_component_process_ProcessDesigner/widget/PersonSelector.js b/o2web/source/x_component_process_ProcessDesigner/widget/PersonSelector.js index 1f73406953bf6d724cc8e4a3fae947b44cfc9e37..14bcc53771c0ae0b0762bb2cbadf4410290b0de4 100644 --- a/o2web/source/x_component_process_ProcessDesigner/widget/PersonSelector.js +++ b/o2web/source/x_component_process_ProcessDesigner/widget/PersonSelector.js @@ -76,28 +76,30 @@ MWF.xApplication.process.ProcessDesigner.widget.PersonSelector = new Class({ if (name){ var data = (typeOf(name)==="string") ? {"name": name, "id": name}: name; MWF.require("MWF.widget.O2Identity", function(){ - if (this.options.type.toLowerCase()==="identity") this.identitys.push(new MWF.widget.O2Identity(data, this.node)); - if (this.options.type.toLowerCase()==="unit") this.identitys.push(new MWF.widget.O2Unit(data, this.node)); - if (this.options.type.toLowerCase()==="group") this.identitys.push(new MWF.widget.O2Group(data, this.node)); - if (this.options.type.toLowerCase()==="person") this.identitys.push(new MWF.widget.O2Person(data, this.node)); + var type = this.options.type.toLowerCase(); + if (type==="identity") this.identitys.push(new MWF.widget.O2Identity(data, this.node)); + if (type==="unit") this.identitys.push(new MWF.widget.O2Unit(data, this.node)); + if (type==="group") this.identitys.push(new MWF.widget.O2Group(data, this.node)); + if (type==="person") this.identitys.push(new MWF.widget.O2Person(data, this.node)); - if (this.options.type.toLowerCase()==="application") this.identitys.push(new MWF.widget.O2Application(data, this.node)); - if (this.options.type.toLowerCase()==="process") this.identitys.push(new MWF.widget.O2Process(data, this.node)); - if (this.options.type.toLowerCase()==="formfield") this.identitys.push(new MWF.widget.O2FormField(data, this.node)); - if (this.options.type.toLowerCase()==="view") this.identitys.push(new MWF.widget.O2View(data, this.node)); - if (this.options.type.toLowerCase()==="cmsview") this.identitys.push(new MWF.widget.O2CMSView(data, this.node)); - if (this.options.type.toLowerCase()==="queryview") this.identitys.push(new MWF.widget.O2QueryView(data, this.node)); - if (this.options.type.toLowerCase()==="querystat") this.identitys.push(new MWF.widget.O2QueryStat(data, this.node)); - if (this.options.type.toLowerCase()==="dutyname") this.identitys.push(new MWF.widget.O2Duty(data, this.node)); - if (this.options.type.toLowerCase()==="cmsapplication") this.identitys.push(new MWF.widget.O2CMSApplication(data, this.node)); - if (this.options.type.toLowerCase()==="cmscategory") this.identitys.push(new MWF.widget.O2CMSCategory(data, this.node)); + if (type==="application") this.identitys.push(new MWF.widget.O2Application(data, this.node)); + if (type==="process") this.identitys.push(new MWF.widget.O2Process(data, this.node)); + if (type==="formfield") this.identitys.push(new MWF.widget.O2FormField(data, this.node)); + if (type==="view") this.identitys.push(new MWF.widget.O2View(data, this.node)); + if (type==="cmsview") this.identitys.push(new MWF.widget.O2CMSView(data, this.node)); + if (type==="queryview") this.identitys.push(new MWF.widget.O2QueryView(data, this.node)); + if (type==="querystatement") this.identitys.push(new MWF.widget.O2QueryStatement(data, this.node)); + if (type==="querystat") this.identitys.push(new MWF.widget.O2QueryStat(data, this.node)); + if (type==="dutyname") this.identitys.push(new MWF.widget.O2Duty(data, this.node)); + if (type==="cmsapplication") this.identitys.push(new MWF.widget.O2CMSApplication(data, this.node)); + if (type==="cmscategory") this.identitys.push(new MWF.widget.O2CMSCategory(data, this.node)); - if (this.options.type.toLowerCase()==="portalfile") this.identitys.push(new MWF.widget.O2File(data, this.node)); - if (this.options.type.toLowerCase()==="processfile") this.identitys.push(new MWF.widget.O2File(data, this.node)); + if (type==="portalfile") this.identitys.push(new MWF.widget.O2File(data, this.node)); + if (type==="processfile") this.identitys.push(new MWF.widget.O2File(data, this.node)); - if (this.options.type.toLowerCase()==="dictionary") this.identitys.push(new MWF.widget.O2Dictionary(data, this.node)); - if (this.options.type.toLowerCase()==="script") this.identitys.push(new MWF.widget.O2Script(data, this.node)); - if (this.options.type.toLowerCase()==="formstyle") this.identitys.push(new MWF.widget.O2FormStyle(data, this.node)); + if (type==="dictionary") this.identitys.push(new MWF.widget.O2Dictionary(data, this.node)); + if (type==="script") this.identitys.push(new MWF.widget.O2Script(data, this.node)); + if (type==="formstyle") this.identitys.push(new MWF.widget.O2FormStyle(data, this.node)); }.bind(this)); } }.bind(this)); @@ -143,30 +145,32 @@ MWF.xApplication.process.ProcessDesigner.widget.PersonSelector = new Class({ if (this.options.type.toLowerCase()!=="duty") this.node.empty(); MWF.require("MWF.widget.O2Identity", function(){ items.each(function(item){ - if (this.options.type.toLowerCase()==="identity") this.identitys.push(new MWF.widget.O2Identity(item.data, this.node)); - if (this.options.type.toLowerCase()==="person") this.identitys.push(new MWF.widget.O2Person(item.data, this.node)); - if (this.options.type.toLowerCase()==="unit") this.identitys.push(new MWF.widget.O2Unit(item.data, this.node)); - if (this.options.type.toLowerCase()==="group") this.identitys.push(new MWF.widget.O2Group(item.data, this.node)); + var type = this.options.type.toLowerCase(); + if (type==="identity") this.identitys.push(new MWF.widget.O2Identity(item.data, this.node)); + if (type==="person") this.identitys.push(new MWF.widget.O2Person(item.data, this.node)); + if (type==="unit") this.identitys.push(new MWF.widget.O2Unit(item.data, this.node)); + if (type==="group") this.identitys.push(new MWF.widget.O2Group(item.data, this.node)); - if (this.options.type.toLowerCase()==="application") this.identitys.push(new MWF.widget.O2Application(item.data, this.node)); - if (this.options.type.toLowerCase()==="process") this.identitys.push(new MWF.widget.O2Process(item.data, this.node)); - if (this.options.type.toLowerCase()==="cmsapplication") this.identitys.push(new MWF.widget.O2CMSApplication(item.data, this.node)); - if (this.options.type.toLowerCase()==="cmscategory") this.identitys.push(new MWF.widget.O2CMSCategory(item.data, this.node)); + if (type==="application") this.identitys.push(new MWF.widget.O2Application(item.data, this.node)); + if (type==="process") this.identitys.push(new MWF.widget.O2Process(item.data, this.node)); + if (type==="cmsapplication") this.identitys.push(new MWF.widget.O2CMSApplication(item.data, this.node)); + if (type==="cmscategory") this.identitys.push(new MWF.widget.O2CMSCategory(item.data, this.node)); - if (this.options.type.toLowerCase()==="formfield") this.identitys.push(new MWF.widget.O2FormField(item.data, this.node)); - if (this.options.type.toLowerCase()==="view") this.identitys.push(new MWF.widget.O2View(item.data, this.node)); - if (this.options.type.toLowerCase()==="cmsview") this.identitys.push(new MWF.widget.O2CMSView(item.data, this.node)); - if (this.options.type.toLowerCase()==="queryview") this.identitys.push(new MWF.widget.O2QueryView(item.data, this.node)); - if (this.options.type.toLowerCase()==="querystat") this.identitys.push(new MWF.widget.O2QueryStat(item.data, this.node)); - if (this.options.type.toLowerCase()==="dutyname") this.identitys.push(new MWF.widget.O2Duty(item.data, this.node)); - if (this.options.type.toLowerCase()==="portalfile") this.identitys.push(new MWF.widget.O2File(item.data, this.node)); - if (this.options.type.toLowerCase()==="processfile") this.identitys.push(new MWF.widget.O2File(item.data, this.node)); + if (type==="formfield") this.identitys.push(new MWF.widget.O2FormField(item.data, this.node)); + if (type==="view") this.identitys.push(new MWF.widget.O2View(item.data, this.node)); + if (type==="cmsview") this.identitys.push(new MWF.widget.O2CMSView(item.data, this.node)); + if (type==="queryview") this.identitys.push(new MWF.widget.O2QueryView(item.data, this.node)); + if (type==="querystatement") this.identitys.push(new MWF.widget.O2QueryStatement(item.data, this.node)); + if (type==="querystat") this.identitys.push(new MWF.widget.O2QueryStat(item.data, this.node)); + if (type==="dutyname") this.identitys.push(new MWF.widget.O2Duty(item.data, this.node)); + if (type==="portalfile") this.identitys.push(new MWF.widget.O2File(item.data, this.node)); + if (type==="processfile") this.identitys.push(new MWF.widget.O2File(item.data, this.node)); - if (this.options.type.toLowerCase()==="dictionary") this.identitys.push(new MWF.widget.O2Dictionary(item.data, this.node)); - if (this.options.type.toLowerCase()==="script") this.identitys.push(new MWF.widget.O2Script(item.data, this.node)); - if (this.options.type.toLowerCase()==="formstyle") this.identitys.push(new MWF.widget.O2FormStyle(item.data, this.node)); + if (type==="dictionary") this.identitys.push(new MWF.widget.O2Dictionary(item.data, this.node)); + if (type==="script") this.identitys.push(new MWF.widget.O2Script(item.data, this.node)); + if (type==="formstyle") this.identitys.push(new MWF.widget.O2FormStyle(item.data, this.node)); }.bind(this)); - if (this.options.type.toLowerCase()==="duty") { + if (type==="duty") { items.each(function(item){ new MWF.xApplication.process.ProcessDesigner.widget.PersonSelector.DutyInput(this, item.data, this.node, 20000); }.bind(this));