fix some bugs with find on home screen

This commit is contained in:
rolux 2011-10-08 11:24:09 +00:00
commit 7ac199a879
4 changed files with 19 additions and 1 deletions

View file

@ -113,6 +113,14 @@ pandora.ui.findElement = function() {
.css({
float: 'right',
margin: '4px'
})
.bindEvent({
// find may be changed from the home screen
pandora_find: function(data) {
pandora.$ui.findInput.options({
value: data.value.conditions[0].value
});
}
});
function autocompleteFunction() {
return pandora.user.ui.find.conditions.length ? function(value, callback) {

View file

@ -107,7 +107,15 @@ pandora.ui.home = function() {
click: function() {
var folder = pandora.getListData().folder;
folder && pandora.$ui.folderList[folder].options({selected: []});
pandora.URL.push('/=' + $findInput.value());
//pandora.URL.push('/=' + $findInput.value());
pandora.UI.set('find', {
conditions: [{
key: '*',
value: $findInput.value(),
operator: '='
}],
operator: '&'
});
that.fadeOutScreen();
}
})