fix lists select bug
This commit is contained in:
parent
4428ad4d5c
commit
73e6ce7292
1 changed files with 13 additions and 29 deletions
|
@ -6923,7 +6923,6 @@ 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) {
|
||||
|
@ -6933,28 +6932,13 @@ requires
|
|||
self.$items[pos].removeClass('OxSelected');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ids.forEach(function(id, i) {
|
||||
var pos = getPositionById(id);
|
||||
select(pos);
|
||||
self.selected.push(pos);
|
||||
!Ox.isUndefined(self.$items[pos]) &&
|
||||
self.$items[pos].addClass('OxSelected');
|
||||
});
|
||||
}
|
||||
// fixme: implement the rest of this
|
||||
/*
|
||||
self.selected.forEach(function(pos) {
|
||||
if (value.indexOf(self.ids[pos]) == -1) {
|
||||
deselect(pos);
|
||||
}
|
||||
});
|
||||
value.forEach(function(id) {
|
||||
if (self.ids.indexOf(id) > -1) {
|
||||
addToSelection(pos)
|
||||
} else {
|
||||
|
||||
}
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
function toggleSelection(pos) {
|
||||
if (!isSelected(pos)) {
|
||||
|
|
Loading…
Reference in a new issue