forked from 0x2620/oxjs
listmap bugfixes
This commit is contained in:
parent
314fcc7b0a
commit
9967d31396
2 changed files with 21 additions and 10 deletions
|
|
@ -1080,6 +1080,7 @@ Ox.List = function(options, self) {
|
|||
function setSelected(ids) {
|
||||
// fixme: can't use selectNone here,
|
||||
// since it'd trigger a select event
|
||||
Ox.print('setSelected', ids)
|
||||
self.$items.forEach(function($item, pos) {
|
||||
if (isSelected(pos)) {
|
||||
self.selected.splice(self.selected.indexOf(pos), 1);
|
||||
|
|
@ -1089,6 +1090,7 @@ Ox.List = function(options, self) {
|
|||
});
|
||||
ids.forEach(function(id, i) {
|
||||
var pos = getPositionById(id);
|
||||
Ox.print('pushing', pos, 'onto self.selected')
|
||||
self.selected.push(pos);
|
||||
!Ox.isUndefined(self.$items[pos]) &&
|
||||
self.$items[pos].addClass('OxSelected');
|
||||
|
|
@ -1217,6 +1219,7 @@ Ox.List = function(options, self) {
|
|||
}
|
||||
|
||||
function updateSelected() {
|
||||
Ox.print('updateSelected')
|
||||
var oldSelectedIds = getSelectedIds(),
|
||||
newSelectedIds = [];
|
||||
Ox.forEach(self.options.items, function(item) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue