sync find select and find menu (fixes #591)

This commit is contained in:
rolux 2012-03-18 15:11:16 +00:00
commit 364c9b004a
2 changed files with 9 additions and 3 deletions

View file

@ -4,7 +4,8 @@ pandora.ui.findElement = function() {
var findIndex = pandora.user.ui._findState.index,
findKey = pandora.user.ui._findState.key,
findValue = pandora.user.ui._findState.value,
hasPressedClear = false;
hasPressedClear = false,
previousFindKey = findKey;
var that = Ox.FormElementGroup({
elements: Ox.merge(pandora.user.ui._list ? [
pandora.$ui.findListSelect = Ox.Select({
@ -48,7 +49,7 @@ pandora.ui.findElement = function() {
change: function(data) {
if (data.value == 'advanced') {
that.update();
// fixme: uncheck menu item!
pandora.$ui.mainMenu.checkItem('findMenu_find_' + previousFindKey);
pandora.$ui.filterDialog = pandora.ui.filterDialog().open();
} else {
pandora.$ui.mainMenu.checkItem('findMenu_find_' + data.value);
@ -56,6 +57,7 @@ pandora.ui.findElement = function() {
autocomplete: autocompleteFunction(),
placeholder: ''
}).focusInput(true);
previousFindKey = data.value;
}
}
}),