Fixes #624, search/tag selection still does not work for notes in non-saved-search collections
Also fixes some JS strict warnings in overlay.js
This commit is contained in:
parent
a24318ec6a
commit
bd66f44e91
|
@ -470,7 +470,7 @@ var ZoteroPane = new function()
|
||||||
{
|
{
|
||||||
if (!Zotero.stateCheck()) {
|
if (!Zotero.stateCheck()) {
|
||||||
this.displayErrorMessage(true);
|
this.displayErrorMessage(true);
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var item = new Zotero.Item(typeID);
|
var item = new Zotero.Item(typeID);
|
||||||
|
@ -1655,7 +1655,7 @@ var ZoteroPane = new function()
|
||||||
function addItemFromPage() {
|
function addItemFromPage() {
|
||||||
if (!Zotero.stateCheck()) {
|
if (!Zotero.stateCheck()) {
|
||||||
this.displayErrorMessage(true);
|
this.displayErrorMessage(true);
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var progressWin = new Zotero.ProgressWindow();
|
var progressWin = new Zotero.ProgressWindow();
|
||||||
|
|
|
@ -889,17 +889,17 @@ Zotero.ItemGroup.prototype.getChildItems = function()
|
||||||
* This accounts for the collection, saved search, quicksearch, tags, etc.
|
* This accounts for the collection, saved search, quicksearch, tags, etc.
|
||||||
*/
|
*/
|
||||||
Zotero.ItemGroup.prototype.getSearchObject = function() {
|
Zotero.ItemGroup.prototype.getSearchObject = function() {
|
||||||
|
var includeScopeChildren = false;
|
||||||
|
|
||||||
// Create/load the inner search
|
// Create/load the inner search
|
||||||
var s = new Zotero.Search();
|
var s = new Zotero.Search();
|
||||||
if (this.isLibrary()) {
|
if (this.isLibrary()) { }
|
||||||
s.addCondition('noChildren', true);
|
|
||||||
}
|
|
||||||
else if (this.isCollection()) {
|
else if (this.isCollection()) {
|
||||||
s.addCondition('noChildren', true);
|
|
||||||
s.addCondition('collectionID', 'is', this.ref.getID());
|
s.addCondition('collectionID', 'is', this.ref.getID());
|
||||||
if (Zotero.Prefs.get('recursiveCollections')) {
|
if (Zotero.Prefs.get('recursiveCollections')) {
|
||||||
s.addCondition('recursive', 'true');
|
s.addCondition('recursive', 'true');
|
||||||
}
|
}
|
||||||
|
includeScopeChildren = true;
|
||||||
}
|
}
|
||||||
else if (this.isSearch()){
|
else if (this.isSearch()){
|
||||||
s.load(this.ref['id']);
|
s.load(this.ref['id']);
|
||||||
|
@ -910,7 +910,7 @@ Zotero.ItemGroup.prototype.getSearchObject = function() {
|
||||||
|
|
||||||
// Create the outer (filter) search
|
// Create the outer (filter) search
|
||||||
var s2 = new Zotero.Search();
|
var s2 = new Zotero.Search();
|
||||||
s2.setScope(s);
|
s2.setScope(s, includeScopeChildren);
|
||||||
|
|
||||||
if (this.searchText) {
|
if (this.searchText) {
|
||||||
s2.addCondition('quicksearch', 'contains', this.searchText);
|
s2.addCondition('quicksearch', 'contains', this.searchText);
|
||||||
|
|
|
@ -224,6 +224,9 @@ var Zotero = new function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check if a DB transaction is open and, if so, disable Zotero
|
||||||
|
*/
|
||||||
function stateCheck() {
|
function stateCheck() {
|
||||||
if (Zotero.DB.transactionInProgress()) {
|
if (Zotero.DB.transactionInProgress()) {
|
||||||
this.initialized = false;
|
this.initialized = false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user