fix some more subtle bugs related to list selection, switching between lists, and info state

This commit is contained in:
rolux 2011-11-07 21:25:57 +00:00
parent 599262e309
commit 7ada9edc8e

View file

@ -31,6 +31,7 @@ pandora.UI = (function() {
item, item,
list, list,
listSettings = pandora.site.listSettings, listSettings = pandora.site.listSettings,
listView,
set = {}, set = {},
trigger = {}, trigger = {},
triggerEvents; triggerEvents;
@ -85,13 +86,15 @@ pandora.UI = (function() {
// it is important to check for find first, so that // it is important to check for find first, so that
// if find changes list, list is correct here // if find changes list, list is correct here
item = args.item || pandora.user.ui.item; item = args.item || pandora.user.ui.item;
listView = add.listView || args.listView;
if (args.listView) { if (listView) {
Ox.print('XXX') Ox.print('XXX')
if (pandora.isClipView(args.listView)) { if (pandora.isClipView(listView)) {
Ox.print('YYY') Ox.print('YYY')
// when switching to a clip view, clear list selection // when switching to a clip view, clear list selection
args.listSelection = []; // (but don't trigger an additional event)
add.listSelection = [];
} else if (['text', 'position'].indexOf(pandora.user.ui.listSort[0].key) > -1) { } else if (['text', 'position'].indexOf(pandora.user.ui.listSort[0].key) > -1) {
Ox.print('ZZZ') Ox.print('ZZZ')
// when switchin to a non-clip view, with a sort key that // when switchin to a non-clip view, with a sort key that