Scaffold: Load translator on double-click
This commit is contained in:
parent
1199059612
commit
1c6840f9a5
1 changed files with 8 additions and 0 deletions
|
@ -27,6 +27,14 @@ var Scaffold_Load = new function() {
|
||||||
this.onLoad = Zotero.Promise.coroutine(function* () {
|
this.onLoad = Zotero.Promise.coroutine(function* () {
|
||||||
var listitem, translator, listcell, set;
|
var listitem, translator, listcell, set;
|
||||||
var listbox = document.getElementById("listbox");
|
var listbox = document.getElementById("listbox");
|
||||||
|
|
||||||
|
listbox.addEventListener('dblclick', () => {
|
||||||
|
var translatorID = document.getElementById("listbox").selectedItem.getUserData("zotero-id");
|
||||||
|
if (!translatorID) return;
|
||||||
|
this.accept();
|
||||||
|
window.close();
|
||||||
|
});
|
||||||
|
|
||||||
var translators = {};
|
var translators = {};
|
||||||
|
|
||||||
// Get the matching translators
|
// Get the matching translators
|
||||||
|
|
Loading…
Reference in a new issue