cleanup List.js
This commit is contained in:
parent
697edd72a3
commit
a84fa05d73
1 changed files with 8 additions and 5 deletions
|
@ -118,8 +118,7 @@ Ox.List = function(options, self) {
|
|||
updateSort();
|
||||
}
|
||||
})
|
||||
.scroll(scroll),
|
||||
touchSelection = [];
|
||||
.scroll(scroll);
|
||||
|
||||
self.options.sort = self.options.sort.map(function(sort) {
|
||||
return Ox.isString(sort) ? {
|
||||
|
@ -144,10 +143,13 @@ Ox.List = function(options, self) {
|
|||
doubleclick: doubleclick
|
||||
}).on({
|
||||
touchend: function(e) {
|
||||
if(touchSelection.length && that.options('selected')[0] == touchSelection[0]) {
|
||||
if (
|
||||
self.touchSelection.length
|
||||
&& self.options.selected[0] == self.touchSelection[0]
|
||||
) {
|
||||
doubleclick(e);
|
||||
} else {
|
||||
touchSelection = Ox.clone(that.options('selected'));
|
||||
self.touchSelection = Ox.clone(self.options.selected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -210,7 +212,8 @@ Ox.List = function(options, self) {
|
|||
preview: false,
|
||||
requests: [],
|
||||
scrollTimeout: 0,
|
||||
selected: []
|
||||
selected: [],
|
||||
touchSelection: []
|
||||
});
|
||||
if (!self.isAsync) {
|
||||
self.selected = self.options.items.map(function(item, i) {
|
||||
|
|
Loading…
Reference in a new issue