List: use on, not scroll; cosmetic changes

This commit is contained in:
rlx 2014-09-22 16:24:11 +02:00
parent 5314f6c73a
commit ac3b736e72

View file

@ -116,7 +116,9 @@ Ox.List = function(options, self) {
sort: updateSort,
sortable: updateSortable
})
.scroll(scroll);
.on({
scroll: scroll
});
self.options.sort = self.options.sort.map(function(sort) {
return Ox.isString(sort) ? {
@ -530,7 +532,11 @@ Ox.List = function(options, self) {
function findCell(e) {
var $element = $(e.target);
while (!$element.is('.OxCell') && !$element.is('.OxPage') && !$element.is('body')) {
while (
!$element.is('.OxCell')
&& !$element.is('.OxPage')
&& !$element.is('body')
) {
$element = $element.parent();
}
return $element.is('.OxCell') ? $element : null;