|
@@ -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({
|
|
|
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({
|
|
|
|
|
|
|
|
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({
|
|
|
},
|
|
},
|
|
|
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({
|
|
|
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;
|