fix a bug regarding selection of items after deleting the selected items from a list

This commit is contained in:
rolux 2011-10-18 02:50:45 +00:00
parent 8cedba5c79
commit 9662e087f1
2 changed files with 5 additions and 1 deletions

View file

@ -391,7 +391,10 @@ pandora.ui.list = function() {
pandora.getListData().editable && pandora.api.removeListItems({ pandora.getListData().editable && pandora.api.removeListItems({
list: pandora.user.ui._list, list: pandora.user.ui._list,
items: data.ids items: data.ids
}, pandora.reloadList); }, function() {
that.options({selected: []});
pandora.reloadList();
});
}, },
init: function(data) { init: function(data) {
pandora.$ui.total.html(pandora.ui.status('total', data)); pandora.$ui.total.html(pandora.ui.status('total', data));

View file

@ -687,6 +687,7 @@ pandora.reloadList = function() {
.bindEventOnce({ .bindEventOnce({
load: function(data) { load: function(data) {
pandora.$ui.list.gainFocus(); pandora.$ui.list.gainFocus();
// fixme: what is this?
if (data) pandora.$ui.list.options({selected: [data.items]}); if (data) pandora.$ui.list.options({selected: [data.items]});
} }
}) })