fix lists select bug
This commit is contained in:
parent
4428ad4d5c
commit
73e6ce7292
1 changed files with 13 additions and 29 deletions
|
@ -6923,37 +6923,21 @@ requires
|
|||
}
|
||||
|
||||
function setSelected(ids) {
|
||||
if (ids.length == 0) {
|
||||
// fixme: can't use selectNone here,
|
||||
// since it'd trigger a select event
|
||||
$.each(self.$items, function(pos) {
|
||||
if (isSelected(pos)) {
|
||||
self.selected.splice(self.selected.indexOf(pos), 1);
|
||||
!Ox.isUndefined(self.$items[pos]) &&
|
||||
self.$items[pos].removeClass('OxSelected');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ids.forEach(function(id, i) {
|
||||
var pos = getPositionById(id);
|
||||
select(pos);
|
||||
});
|
||||
}
|
||||
// fixme: implement the rest of this
|
||||
/*
|
||||
self.selected.forEach(function(pos) {
|
||||
if (value.indexOf(self.ids[pos]) == -1) {
|
||||
deselect(pos);
|
||||
}
|
||||
// fixme: can't use selectNone here,
|
||||
// since it'd trigger a select event
|
||||
$.each(self.$items, function(pos) {
|
||||
if (isSelected(pos)) {
|
||||
self.selected.splice(self.selected.indexOf(pos), 1);
|
||||
!Ox.isUndefined(self.$items[pos]) &&
|
||||
self.$items[pos].removeClass('OxSelected');
|
||||
}
|
||||
});
|
||||
value.forEach(function(id) {
|
||||
if (self.ids.indexOf(id) > -1) {
|
||||
addToSelection(pos)
|
||||
} else {
|
||||
|
||||
}
|
||||
ids.forEach(function(id, i) {
|
||||
var pos = getPositionById(id);
|
||||
self.selected.push(pos);
|
||||
!Ox.isUndefined(self.$items[pos]) &&
|
||||
self.$items[pos].addClass('OxSelected');
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
function toggleSelection(pos) {
|
||||
|
|
Loading…
Reference in a new issue