fix some bugs with find on home screen
This commit is contained in:
parent
a4d0ae4067
commit
7ac199a879
4 changed files with 19 additions and 1 deletions
|
@ -372,6 +372,7 @@ pandora.URL = (function() {
|
||||||
} else {
|
} else {
|
||||||
if (
|
if (
|
||||||
!pandora.$ui.appPanel
|
!pandora.$ui.appPanel
|
||||||
|
|| (keys.length == 1 && keys[0] == 'span')
|
||||||
|| keys.every(function(key) {
|
|| keys.every(function(key) {
|
||||||
return /^videoPoints/.test(key);
|
return /^videoPoints/.test(key);
|
||||||
})
|
})
|
||||||
|
|
|
@ -113,6 +113,14 @@ pandora.ui.findElement = function() {
|
||||||
.css({
|
.css({
|
||||||
float: 'right',
|
float: 'right',
|
||||||
margin: '4px'
|
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() {
|
function autocompleteFunction() {
|
||||||
return pandora.user.ui.find.conditions.length ? function(value, callback) {
|
return pandora.user.ui.find.conditions.length ? function(value, callback) {
|
||||||
|
|
|
@ -107,7 +107,15 @@ pandora.ui.home = function() {
|
||||||
click: function() {
|
click: function() {
|
||||||
var folder = pandora.getListData().folder;
|
var folder = pandora.getListData().folder;
|
||||||
folder && pandora.$ui.folderList[folder].options({selected: []});
|
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();
|
that.fadeOutScreen();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -750,6 +750,7 @@ pandora.selectList = function() {
|
||||||
// has a findKey as key and "=" as operator (and all other conditions
|
// 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
|
// are either list or groups), or if all conditions in an | query have
|
||||||
// the same group id as key and "==" as operator
|
// the same group id as key and "==" as operator
|
||||||
|
Ox.print('getFindState', find)
|
||||||
var conditions, indices, state = {index: -1, key: '*', value: ''};
|
var conditions, indices, state = {index: -1, key: '*', value: ''};
|
||||||
if (find.operator == '&') {
|
if (find.operator == '&') {
|
||||||
// number of conditions that are not list or groups
|
// number of conditions that are not list or groups
|
||||||
|
|
Loading…
Reference in a new issue