Merge branch '4.0'
Since modal windows (e.g., the Create Bib window and the Quick Copy site editor window) can't use yield, style retrieval (Zotero.Styles.getVisible()/getAll()) is now synchronous, depending on a previous async Zotero.Styles.init(). The translator list is generated in the prefs window and passed into the Quick Copy site editor, but it's possible the translators API should be changed to make getTranslators() synchronous with a prior init() as well.
This commit is contained in:
commit
99dd1c0697
187 changed files with 1227 additions and 443 deletions
|
@ -99,10 +99,9 @@ ZoteroAutoComplete.prototype.startSearch = Zotero.Promise.coroutine(function* (s
|
|||
sql += "JOIN itemCreators USING (creatorID) JOIN items USING (itemID) ";
|
||||
}
|
||||
sql += "WHERE CASE fieldMode "
|
||||
+ "WHEN 1 THEN lastName "
|
||||
+ "WHEN 0 THEN firstName || ' ' || lastName END "
|
||||
+ "LIKE ? ";
|
||||
var sqlParams = [searchString + '%'];
|
||||
+ "WHEN 1 THEN lastName LIKE ? "
|
||||
+ "WHEN 0 THEN (firstName || ' ' || lastName LIKE ?) OR (lastName LIKE ?) END "
|
||||
var sqlParams = [searchString + '%', searchString + '%', searchString + '%'];
|
||||
if (searchParams.libraryID !== undefined) {
|
||||
sql += " AND libraryID=?";
|
||||
sqlParams.push(searchParams.libraryID);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue