- fix broken QuickCopy export
- fix dragging issues caused by Zotero.wait()
This commit is contained in:
parent
c96d0c2af8
commit
83d98dae19
4 changed files with 5 additions and 6 deletions
|
@ -188,7 +188,7 @@ var Zotero_File_Interface = new function() {
|
|||
} else {
|
||||
Components.classes["@mozilla.org/widget/clipboardhelper;1"]
|
||||
.getService(Components.interfaces.nsIClipboardHelper)
|
||||
.copyString(obj.output.replace(/\r\n/g, "\n"));
|
||||
.copyString(obj.string.replace(/\r\n/g, "\n"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1869,7 +1869,7 @@ Zotero.ItemTreeView.prototype.onDragStart = function (event) {
|
|||
return;
|
||||
}
|
||||
|
||||
var text = obj.output.replace(/\r\n/g, "\n");
|
||||
var text = obj.string.replace(/\r\n/g, "\n");
|
||||
event.dataTransfer.setData("text/plain", text);
|
||||
}
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ Zotero.QuickCopy = new function() {
|
|||
*
|
||||
* |callback| is only necessary if using an export format and should be
|
||||
* a function suitable for Zotero.Translate.setHandler, taking parameters
|
||||
* |obj| and |worked|. The generated content should be placed in obj.output
|
||||
* |obj| and |worked|. The generated content should be placed in obj.string
|
||||
* and |worked| should be true if the operation is successful.
|
||||
*
|
||||
* If bibliography format, the process is synchronous and an object
|
||||
|
@ -168,6 +168,7 @@ Zotero.QuickCopy = new function() {
|
|||
|
||||
if (mode == 'export') {
|
||||
var translation = new Zotero.Translate.Export;
|
||||
translation.noWait = true; // needed not to break drags
|
||||
translation.setItems(items);
|
||||
translation.setTranslator(format);
|
||||
translation.setHandler("done", callback);
|
||||
|
|
|
@ -95,8 +95,7 @@ Zotero.Translate.Sandbox = {
|
|||
// Allow progress meter to update
|
||||
//
|
||||
// This can probably be re-enabled for web translators once badly asynced ones are fixed
|
||||
if (translate instanceof Zotero.Translate.Import || translate instanceof Zotero.Translate.Export) {
|
||||
Zotero.debug("waiting");
|
||||
if(!translate.noWait && (translate instanceof Zotero.Translate.Import || translate instanceof Zotero.Translate.Export)) {
|
||||
Zotero.wait();
|
||||
}
|
||||
|
||||
|
@ -418,7 +417,6 @@ Zotero.Translate.Sandbox = {
|
|||
}
|
||||
|
||||
translate._runHandler("itemDone", item);
|
||||
Zotero.wait();
|
||||
return item;
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue