You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
969 B
34 lines
969 B
/** |
|
* guy |
|
* 标红行为 |
|
* @class BI.RedMarkBehavior |
|
* @extends BI.Behavior |
|
*/ |
|
BI.RedMarkBehavior = BI.inherit(BI.Behavior, { |
|
_defaultConfig: function () { |
|
return BI.extend(BI.RedMarkBehavior.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
}); |
|
}, |
|
|
|
_init: function () { |
|
BI.RedMarkBehavior.superclass._init.apply(this, arguments); |
|
|
|
}, |
|
|
|
doBehavior: function (items) { |
|
var args = Array.prototype.slice.call(arguments, 1), |
|
o = this.options; |
|
BI.each(items, function (i, item) { |
|
if(item instanceof BI.Single) { |
|
if (o.rule(item.getValue(), item)) { |
|
item.doRedMark && item.doRedMark.apply(item, args); |
|
} else { |
|
item.doRedMark && item.unRedMark.apply(item, args); |
|
} |
|
} else { |
|
item.doBehavior && item.doBehavior.apply(item, args); |
|
} |
|
}); |
|
} |
|
}); |