some improvements to url controller

This commit is contained in:
rolux 2011-10-08 13:09:16 +00:00
commit 63f6ed6d49
4 changed files with 33 additions and 28 deletions

View file

@ -102,7 +102,7 @@ pandora.ui.findElement = function() {
}
pandora.UI.set('find', {
conditions: conditions,
operator: ''
operator: '&'
});
}
}
@ -113,14 +113,6 @@ 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

@ -59,8 +59,7 @@ pandora.ui.home = function() {
})
.bind({
click: function() {
pandora.URL.pop();
that.fadeOutScreen();
$browseButton.triggerEvent('click');
}
})
.appendTo(that),
@ -105,18 +104,21 @@ pandora.ui.home = function() {
})
.bindEvent({
click: function() {
var folder = pandora.getListData().folder;
var folder = pandora.getListData().folder,
value = $findInput.value();
folder && pandora.$ui.folderList[folder].options({selected: []});
//pandora.URL.push('/=' + $findInput.value());
pandora.$ui.findInput.options({
value: value
});
that.fadeOutScreen();
pandora.UI.set('find', {
conditions: [{
key: '*',
value: $findInput.value(),
value: value,
operator: '='
}],
operator: '&'
});
that.fadeOutScreen();
}
})
.appendTo(that),
@ -135,7 +137,7 @@ pandora.ui.home = function() {
})
.bindEvent({
click: function() {
//pandora.URL.push();
pandora.URL.update();
that.fadeOutScreen();
}
})