List: use on, not scroll; cosmetic changes
This commit is contained in:
parent
5314f6c73a
commit
ac3b736e72
1 changed files with 14 additions and 8 deletions
|
@ -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;
|
||||
|
@ -849,12 +855,12 @@ Ox.List = function(options, self) {
|
|||
result.data.items.forEach(function(v, i) {
|
||||
var pos = offset + i;
|
||||
self.$items[pos] = Ox.ListItem({
|
||||
construct: self.options.construct,
|
||||
data: v,
|
||||
//format: self.options.format,
|
||||
position: pos,
|
||||
unique: self.options.unique
|
||||
});
|
||||
construct: self.options.construct,
|
||||
data: v,
|
||||
//format: self.options.format,
|
||||
position: pos,
|
||||
unique: self.options.unique
|
||||
});
|
||||
isSelected(pos) && self.$items[pos].addClass('OxSelected');
|
||||
self.$items[pos].appendTo(self.$pages[page]);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue