1
0
Fork 0
forked from 0x2620/oxjs

simplify event passing in Ox.List derivatives

This commit is contained in:
rolux 2012-06-30 11:20:37 +02:00
commit 7df61a8ac9
4 changed files with 20 additions and 23 deletions

View file

@ -62,16 +62,19 @@ Ox.TreeList = function(options, self) {
max: self.options.max,
min: self.options.min,
unique: 'id'
}, Ox.extend(Ox.clone(self), {updateCallbacks: []})) // pass event handler
})
.addClass('OxTableList OxTreeList')
.css({
width: self.options.width + 'px',
overflowY: 'scroll'
})
.bindEvent({
anyclick: clickItem,
select: selectItem,
toggle: toggleItems
.bindEvent(function(data, event) {
if (event == 'anyclick') {
clickItem(data);
} else if (event == 'toggle') {
toggleItems(data);
}
that.triggerEvent(event, data);
})
);