fix lists select bug

This commit is contained in:
rlx 2011-01-13 21:48:39 +00:00
parent 4428ad4d5c
commit 73e6ce7292

View file

@ -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)) {