Using ANY mode in Advanced Search window (not saved search) caused all library items to be returned
This commit is contained in:
parent
351d904dbe
commit
8d09efb9b5
1 changed files with 8 additions and 4 deletions
|
@ -29,14 +29,18 @@ var ZoteroAdvancedSearch = new function() {
|
||||||
var itemGroup = {
|
var itemGroup = {
|
||||||
isSearchMode: function() { return true; },
|
isSearchMode: function() { return true; },
|
||||||
getChildItems: function () {
|
getChildItems: function () {
|
||||||
var search = _searchBox.search.clone();
|
//var search = _searchBox.search.clone();
|
||||||
|
|
||||||
|
var s2 = new Zotero.Search();
|
||||||
|
s2.setScope(_searchBox.search);
|
||||||
|
|
||||||
// FIXME: Hack to exclude group libraries for now
|
// FIXME: Hack to exclude group libraries for now
|
||||||
var groups = Zotero.Groups.getAll();
|
var groups = Zotero.Groups.getAll();
|
||||||
for each(var group in groups) {
|
for each(var group in groups) {
|
||||||
search.addCondition('libraryID', 'isNot', group.libraryID);
|
s2.addCondition('libraryID', 'isNot', group.libraryID);
|
||||||
}
|
}
|
||||||
//var search = _searchBox.search;
|
|
||||||
var ids = search.search();
|
var ids = s2.search();
|
||||||
return Zotero.Items.get(ids);
|
return Zotero.Items.get(ids);
|
||||||
},
|
},
|
||||||
isLibrary: function () { return false; },
|
isLibrary: function () { return false; },
|
||||||
|
|
Loading…
Reference in a new issue