cleanup
This commit is contained in:
parent
bff20cd96a
commit
721989b67b
1 changed files with 12 additions and 13 deletions
|
@ -272,12 +272,12 @@ Ox.List = function(options, self) {
|
||||||
} else {
|
} else {
|
||||||
arr = [pos];
|
arr = [pos];
|
||||||
if (Ox.min(self.selected) < pos) {
|
if (Ox.min(self.selected) < pos) {
|
||||||
for (i = pos - 1; i >= 0; i--) {
|
for (i = pos - 1; i >= 0; i--) {
|
||||||
if (isSelected(i)) {
|
if (isSelected(i)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
arr.push(i);
|
arr.push(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Ox.max(self.selected) > pos) {
|
if (Ox.max(self.selected) > pos) {
|
||||||
for (i = pos + 1; i < len; i++) {
|
for (i = pos + 1; i < len; i++) {
|
||||||
|
@ -1462,7 +1462,7 @@ Ox.List = function(options, self) {
|
||||||
updatePositions();
|
updatePositions();
|
||||||
emptyFirstPage();
|
emptyFirstPage();
|
||||||
fillFirstPage();
|
fillFirstPage();
|
||||||
}
|
};
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
closePreview <f> to be called when preview is closed externally
|
closePreview <f> to be called when preview is closed externally
|
||||||
|
@ -1575,7 +1575,8 @@ Ox.List = function(options, self) {
|
||||||
}
|
}
|
||||||
emptyFirstPage();
|
emptyFirstPage();
|
||||||
fillFirstPage();
|
fillFirstPage();
|
||||||
}
|
};
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
scrollToSelection <f> scroll list to current selection
|
scrollToSelection <f> scroll list to current selection
|
||||||
() -> <f> returns List Element
|
() -> <f> returns List Element
|
||||||
|
@ -1622,8 +1623,7 @@ Ox.List = function(options, self) {
|
||||||
fillFirstPage();
|
fillFirstPage();
|
||||||
}
|
}
|
||||||
return that;
|
return that;
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
sort <f> sort
|
sort <f> sort
|
||||||
|
@ -1632,7 +1632,7 @@ Ox.List = function(options, self) {
|
||||||
// but, fixme: better function name
|
// but, fixme: better function name
|
||||||
that.sort = function() {
|
that.sort = function() {
|
||||||
updateSort();
|
updateSort();
|
||||||
}
|
};
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
sortList <f> sort list
|
sortList <f> sort list
|
||||||
|
@ -1651,7 +1651,7 @@ Ox.List = function(options, self) {
|
||||||
that.triggerEvent('sort', self.options.sort[0]);
|
that.triggerEvent('sort', self.options.sort[0]);
|
||||||
}
|
}
|
||||||
return that;
|
return that;
|
||||||
}
|
};
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
value <f> get/set list value
|
value <f> get/set list value
|
||||||
|
@ -1668,7 +1668,6 @@ Ox.List = function(options, self) {
|
||||||
var pos = Ox.isNumber(id) ? id : getPositionById(id),
|
var pos = Ox.isNumber(id) ? id : getPositionById(id),
|
||||||
$item = self.$items[pos],
|
$item = self.$items[pos],
|
||||||
data = $item ? $item.options('data') : {};
|
data = $item ? $item.options('data') : {};
|
||||||
//Ox.print('List', 'that.value id key value pos', id, key, value, pos)
|
|
||||||
if (arguments.length == 1) {
|
if (arguments.length == 1) {
|
||||||
return data;
|
return data;
|
||||||
} else if (arguments.length == 2) {
|
} else if (arguments.length == 2) {
|
||||||
|
|
Loading…
Reference in a new issue