improve advanced find

This commit is contained in:
rolux 2011-11-04 12:13:04 +00:00
parent fb1722cb42
commit cedaad813e
2 changed files with 13 additions and 6 deletions

View file

@ -45,10 +45,14 @@ pandora.ui.findElement = function() {
change: function(data) {
var key = data.selected[0].id;
if (key == 'advanced') {
pandora.$ui.filterDialog = pandora.ui.filterDialog().open();
pandora.$ui.findInput.options({placeholder: 'Edit...'})
pandora.$ui.findInput.options({
placeholder: 'Edit Query...',
value: ''
});
(pandora.$ui.filterDialog || (
pandora.$ui.filterDialog = pandora.ui.filterDialog()
)).open();
} else {
pandora.$ui.mainMenu.checkItem('findMenu_find_' + key);
pandora.$ui.findInput.options({
autocomplete: autocompleteFunction(),
placeholder: ''
@ -64,14 +68,17 @@ pandora.ui.findElement = function() {
autocompleteSelectSubmit: true,
clear: true,
id: 'input',
placeholder: findKey == 'advanced' ? 'Edit...' : '',
placeholder: findKey == 'advanced' ? 'Edit Query...' : '',
value: findValue,
width: 192
})
.bindEvent({
focus: function(data) {
if (pandora.$ui.findSelect.value() == 'advanced') {
pandora.$ui.filterDialog = pandora.ui.filterDialog().open();
pandora.$ui.findInput.blurInput();
(pandora.$ui.filterDialog || (
pandora.$ui.filterDialog = pandora.ui.filterDialog()
)).open();
}
},
submit: function(data) {

View file

@ -178,7 +178,7 @@ pandora.ui.infoView = function(data) {
clickLink: pandora.clickLink,
editable: isEditable,
format: function(value) {
formatValue(value.split(', '), 'name')
return formatValue(value.split(', '), 'name');
},
placeholder: formatLight('Unknown Director'),
tooltip: isEditable ? 'Doubleclick to edit' : '',