fix a bug where the selected item in a list would not be sticky

This commit is contained in:
rolux 2011-11-07 19:40:09 +00:00
parent d378b130f0
commit 0452e32b79

View file

@ -79,13 +79,13 @@ pandora.UI = (function() {
} }
add.itemFind = pandora.isItemFind(args.find) add.itemFind = pandora.isItemFind(args.find)
? args.find : pandora.site.user.ui.itemFind; ? args.find : pandora.site.user.ui.itemFind;
} else {
list = self.previousUI._list;
} }
// it is important to check for find first, so that if find item = args['item'] || pandora.user.ui.item;
// changes list, pandora.user.ui._list is correct here // it is important to check for find first, so that
item = args['item'] || pandora.user.ui.item, // if find changes list, list is correct here
list = pandora.user.ui._list || self.previousUI._list;
if (!pandora.user.ui.lists[list]) { if (!pandora.user.ui.lists[list]) {
add['lists.' + that.encode(list)] = {}; add['lists.' + that.encode(list)] = {};
} }