diff --git a/static/js/pandora/URL.js b/static/js/pandora/URL.js index e76f94492..a6965d449 100644 --- a/static/js/pandora/URL.js +++ b/static/js/pandora/URL.js @@ -372,6 +372,7 @@ pandora.URL = (function() { } else { if ( !pandora.$ui.appPanel + || (keys.length == 1 && keys[0] == 'span') || keys.every(function(key) { return /^videoPoints/.test(key); }) diff --git a/static/js/pandora/ui/findElement.js b/static/js/pandora/ui/findElement.js index b995aa9e5..8f1d5bc61 100644 --- a/static/js/pandora/ui/findElement.js +++ b/static/js/pandora/ui/findElement.js @@ -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) { diff --git a/static/js/pandora/ui/home.js b/static/js/pandora/ui/home.js index 7ccfe7414..ee4f1350a 100644 --- a/static/js/pandora/ui/home.js +++ b/static/js/pandora/ui/home.js @@ -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(); } }) diff --git a/static/js/pandora/utils.js b/static/js/pandora/utils.js index 4b2fcba54..859decdf9 100644 --- a/static/js/pandora/utils.js +++ b/static/js/pandora/utils.js @@ -750,6 +750,7 @@ pandora.selectList = function() { // has a findKey as key and "=" as operator (and all other conditions // are either list or groups), or if all conditions in an | query have // the same group id as key and "==" as operator + Ox.print('getFindState', find) var conditions, indices, state = {index: -1, key: '*', value: ''}; if (find.operator == '&') { // number of conditions that are not list or groups