fixing more list selection bugs

This commit is contained in:
rolux 2011-09-17 13:04:10 +00:00
commit a8b0ae3da2
4 changed files with 25 additions and 10 deletions

View file

@ -181,10 +181,10 @@ pandora.ui.folderBrowserList = function(id) {
Ox.forEach(pandora.$ui.folderList, function($list, id_) {
id != id_ && $list.options('selected', []);
});
pandora.UI.set({list: data.ids[0]});
//pandora.UI.set({list: data.ids[0]});
pandora.URL.set('?find=list:' + data.ids[0]);
} else {
pandora.UI.set({list: ''});
//pandora.UI.set({list: ''});
pandora.URL.set('');
}
}

View file

@ -361,6 +361,7 @@ pandora.ui.folderList = function(id) {
Ox.forEach(pandora.$ui.folderList, function($list, id_) {
id != id_ && $list.options('selected', []);
});
//pandora.UI.set({list: data.ids[0]});
pandora.URL.set('?find=' + (id == 'volumes' ? 'volume' : 'list') + ':' + data.ids[0]);
} else {
//pandora.UI.set({list: ''});

View file

@ -2,6 +2,8 @@
pandora.ui.home = function() {
// fixme: if a list was selected previously, it will steal focus from the input element
var that = $('<div>')
.attr({id: 'home'})
.css({
@ -85,8 +87,11 @@ pandora.ui.home = function() {
})
.bindEvent({
submit: function(data) {
data.value && pandora.URL.set('/?find=' + data.value);
that.fadeOutScreen();
if (data.value) {
$findButton.triggerEvent('click');
} else {
$browseButton.triggerEvent('click');
}
}
})
.appendTo(that),
@ -105,6 +110,11 @@ pandora.ui.home = function() {
})
.bindEvent({
click: function() {
if (pandora.user.ui.list) {
Ox.forEach(pandora.$ui.folderList, function($list) {
$list.options({selected: []});
});
}
pandora.URL.set('/?find=' + $findInput.value());
that.fadeOutScreen();
}