fix a bug in pandora.getFindState

This commit is contained in:
rolux 2012-05-22 18:14:34 +02:00
parent a9092036e3
commit 929ac10071
2 changed files with 4 additions and 3 deletions

View file

@ -1245,8 +1245,9 @@ pandora.unloadWindow = function() {
return filter.index > -1;
}).length;
// indices of non-advanced find queries
indices = Ox.indicesOf(pandora.site.findKeys, function(findKey) {
var index = oneCondition(find.conditions, findKey.id, '=');
indices = find.conditions.map(function(condition) {
return oneCondition(find.conditions, condition.key, '=');
}).filter(function(index) {
return index > -1;
});
state = conditions == 1 && indices.length == 1 ? {

View file

@ -7,7 +7,7 @@ pandora.ui.viewSelect = function() {
sortKey = !ui.item ? 'listSort' : 'itemSort',
viewKey = !ui.item ? 'listView' : 'itemView',
items = pandora.site[viewKey + 's'].filter(function(view) {
return ['data', 'files'].indexOf(view.id) == -1;
return view.id != 'data' && view.id != 'files';
}).map(function(view) {
return {id: view.id, title: 'View ' + view.title};
}),