提交 1c53d6b9 编写于 作者: U unknown

修复人员选择执行queryLoadItem的问题

上级 d9219fa5
...@@ -1611,6 +1611,7 @@ MWF.xApplication.Selector.Person = new Class({ ...@@ -1611,6 +1611,7 @@ MWF.xApplication.Selector.Person = new Class({
MWF.xApplication.Selector.Person.Item = new Class({ MWF.xApplication.Selector.Person.Item = new Class({
initialize: function(data, selector, container, level, category, delay){ initialize: function(data, selector, container, level, category, delay){
this.clazz = "Item";
this.data = data; this.data = data;
this.selector = selector; this.selector = selector;
this.container = container; this.container = container;
...@@ -1632,7 +1633,9 @@ MWF.xApplication.Selector.Person.Item = new Class({ ...@@ -1632,7 +1633,9 @@ MWF.xApplication.Selector.Person.Item = new Class({
this.iconNode.setStyle("background-image", "url("+"../x_component_Selector/$Selector/"+style+"/icon/personicon.png)"); this.iconNode.setStyle("background-image", "url("+"../x_component_Selector/$Selector/"+style+"/icon/personicon.png)");
}, },
load: function(){ load: function(){
this.selector.fireEvent("queryLoadItem",[this]); if( this.clazz === "Item" ){
this.selector.fireEvent("queryLoadItem",[this]);
}
if( !this.node )this.node = new Element("div", { if( !this.node )this.node = new Element("div", {
"styles": this.selector.css.selectorItem "styles": this.selector.css.selectorItem
...@@ -1673,7 +1676,9 @@ MWF.xApplication.Selector.Person.Item = new Class({ ...@@ -1673,7 +1676,9 @@ MWF.xApplication.Selector.Person.Item = new Class({
this.check(); this.check();
this.selector.fireEvent("postLoadItem",[this]); if( this.clazz === "Item" ) {
this.selector.fireEvent("postLoadItem", [this]);
}
}, },
loadSubItem: function(){}, loadSubItem: function(){},
check: function(){ check: function(){
...@@ -1823,11 +1828,12 @@ MWF.xApplication.Selector.Person.Item = new Class({ ...@@ -1823,11 +1828,12 @@ MWF.xApplication.Selector.Person.Item = new Class({
}, },
selected: function(){ selected: function(){
var count = this.selector.options.maxCount || this.selector.options.count; var count = this.selector.options.maxCount || this.selector.options.count;
count = count.toInt();
if (!count) count = 0; if (!count) count = 0;
if( count == 1 && this.selector.emptySelectedItems){ if( count == 1 && this.selector.emptySelectedItems){
this.selector.emptySelectedItems(); this.selector.emptySelectedItems();
} }
if ((count.toInt()===0) || (this.selector.selectedItems.length+1)<=count) { if ((count===0) || (this.selector.selectedItems.length+1)<=count) {
this.isSelected = true; this.isSelected = true;
if( this.node ){ if( this.node ){
this.node.setStyles(this.selector.css.selectorItem_selected); this.node.setStyles(this.selector.css.selectorItem_selected);
...@@ -1932,6 +1938,7 @@ MWF.xApplication.Selector.Person.ItemSelected = new Class({ ...@@ -1932,6 +1938,7 @@ MWF.xApplication.Selector.Person.ItemSelected = new Class({
this.selector = selector; this.selector = selector;
this.container = this.selector.selectedNode; this.container = this.selector.selectedNode;
this.isSelected = false; this.isSelected = false;
this.clazz = "ItemSelected";
this.items = []; this.items = [];
if (item) this.items.push(item); if (item) this.items.push(item);
this.level = 0; this.level = 0;
......
...@@ -94,6 +94,8 @@ MWF.xApplication.process.FormDesigner.Main = new Class({ ...@@ -94,6 +94,8 @@ MWF.xApplication.process.FormDesigner.Main = new Class({
var module = this.form.currentSelectedModule; var module = this.form.currentSelectedModule;
if (module.moduleType != "form" && module.moduleName.indexOf("$") == -1) { if (module.moduleType != "form" && module.moduleName.indexOf("$") == -1) {
debugger;
this.form.fireEvent("queryGetFormData", [module.node]); this.form.fireEvent("queryGetFormData", [module.node]);
var html = module.getHtml(); var html = module.getHtml();
var json = module.getJson(); var json = module.getJson();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册