提交 ac147d95 编写于 作者: U unknown

选择人员的数据

上级 b25d8bd5
......@@ -23,7 +23,7 @@ MWF.xApplication.Selector.Identity = new Class({
this.className = "Identity";
},
loadSelectItems : function(){
if( this.options.isCheckStatus || this.options.showSelectedCount ) {
if( this.className === "Identity" && (this.options.isCheckStatus || this.options.showSelectedCount )) {
var unitList = [];
var groupList = [];
......@@ -778,7 +778,7 @@ MWF.xApplication.Selector.Identity.ItemSelected = new Class({
items.each(function(item){
item.selectedItem = this;
item.setSelected();
if( this.selector.options.showSelectedCount ){
if( this.selector.options.showSelectedCount && this.selector.selectType == "identity" ){
if(item.category && item.category._addSelectedCount )item.category._addSelectedCount( 1, true );
}
}.bind(this));
......
......@@ -419,9 +419,15 @@ MWF.xApplication.Selector.IdentityWidthDutyCategoryByUnit.ItemSelected = new Cla
MWF.xApplication.Selector.IdentityWidthDutyCategoryByUnit.ItemCategory = new Class({
Extends: MWF.xApplication.Selector.IdentityWidthDuty.ItemCategory,
_getShowName: function(){
return this.data.name;
},
_getSelectedCount : function(){
if( typeOf( this.selectedCount ) === "number" )return this.selectedCount;
if( typeOf( this.selectedCount ) === "number" ){
return this.selectedCount;
}else{
return 0
}
},
_getNestItemCount : function(){
return this.data.subNestedIdentityCount;
......
......@@ -2111,7 +2111,7 @@ MWF.xApplication.Selector.Person.Item = new Class({
item.actionNode.setStyles( this.selector.css.selectorItemActionNode_single );
}
}
if( this.selector.options.showSelectedCount ){
if( this.selector.options.showSelectedCount && this.selector.selectType == "identity" ){
if(item.category && item.category._addSelectedCount )item.category._addSelectedCount( -1, true );
}
}.bind(this));
......@@ -2447,10 +2447,13 @@ MWF.xApplication.Selector.Person.ItemCategory = new Class({
var m = this.textNode.getStyle("margin-left").toFloat()+indent;
this.textNode.setStyle("margin-left", ""+m+"px");
if( this.selector.options.showSelectedCount && this._getSelectedCount ){
this.selectedCountNode = new Element("span", {
"text": this._getSelectedCount()
}).inject(this.textNode);
if( this.selector.options.showSelectedCount && this.selector.selectType == "identity" && this._getSelectedCount ){
var selectedCount = this._getSelectedCount();
if( selectedCount > 0 ){
this.selectedCountNode = new Element("span", {
"text": this._getSelectedCount()
}).inject(this.textNode);
}
}
this.children = new Element("div.children", {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册