fineui是帆软报表和BI产品线所使用的前端框架。
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

8 years ago
/**
* guy
* 标红行为
* @class BI.RedMarkBehavior
* @extends BI.Behavior
*/
BI.RedMarkBehavior = BI.inherit(BI.Behavior, {
7 years ago
_defaultConfig: function () {
8 years ago
return BI.extend(BI.RedMarkBehavior.superclass._defaultConfig.apply(this, arguments), {
});
},
7 years ago
_init: function () {
8 years ago
BI.RedMarkBehavior.superclass._init.apply(this, arguments);
},
7 years ago
doBehavior: function (items) {
8 years ago
var args = Array.prototype.slice.call(arguments, 1),
o = this.options;
7 years ago
BI.each(items, function (i, item) {
8 years ago
if(item instanceof BI.Single) {
if (o.rule(item.getValue(), item)) {
item.doRedMark && item.doRedMark.apply(item, args);
8 years ago
} else {
item.doRedMark && item.unRedMark.apply(item, args);
8 years ago
}
} else {
item.doBehavior && item.doBehavior.apply(item, args);
8 years ago
}
7 years ago
});
8 years ago
}
});