Merge branch '3.0'

This commit is contained in:
Simon Kornblith 2013-01-22 23:05:15 -05:00
commit bd688f333c
3 changed files with 9 additions and 8 deletions

View file

@ -671,7 +671,7 @@ var Zotero_File_Interface = new function() {
.redraw();
// Process redraw event
Zotero.mainThread.processNextEvent(false);
Zotero.wait(0);
} finally {
// Close nested event queue
if(eventQueuePushed) Zotero.mainThread.popEventQueue();

View file

@ -167,12 +167,13 @@ Zotero.Translate.Sandbox = {
*/
"loadTranslator":function(translate, type) {
const setDefaultHandlers = function(translate, translation) {
if(Zotero.Utilities.isEmpty(translation._handlers)) {
if(type !== "export") {
translation.setHandler("itemDone", function(obj, item) {
translate.Sandbox._itemDone(translate, item);
});
}
if(type !== "export"
&& (!translation._handlers['itemDone'] || !translation._handlers['itemDone'].length)) {
translation.setHandler("itemDone", function(obj, item) {
translate.Sandbox._itemDone(translate, item);
});
}
if(!translation._handlers['selectItems'] || !translation._handlers['selectItems'].length) {
translation.setHandler("selectItems", translate._handlers["selectItems"]);
}
}

View file

@ -1441,7 +1441,7 @@ Components.utils.import("resource://gre/modules/Services.jsm");
* @param {Integer} [timeout=50] Maximum number of milliseconds to wait
*/
this.wait = function (timeout) {
if (!timeout) {
if (timeout === undefined) {
timeout = 50;
}
var mainThread = Zotero.mainThread;