diff --git a/chrome.manifest b/chrome.manifest index 5012c41ec..58cdf7d47 100644 --- a/chrome.manifest +++ b/chrome.manifest @@ -24,6 +24,7 @@ locale zotero hu-HU chrome/locale/hu-HU/zotero/ locale zotero is-IS chrome/locale/is-IS/zotero/ locale zotero it-IT chrome/locale/it-IT/zotero/ locale zotero ja-JP chrome/locale/ja-JP/zotero/ +locale zotero km chrome/locale/km/zotero/ locale zotero ko-KR chrome/locale/ko-KR/zotero/ locale zotero mn-MN chrome/locale/mn-MN/zotero/ locale zotero nb-NO chrome/locale/nb-NO/zotero/ diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js index b166d56fe..f38abf06b 100644 --- a/chrome/content/zotero/integration/quickFormat.js +++ b/chrome/content/zotero/integration/quickFormat.js @@ -969,7 +969,7 @@ var Zotero_QuickFormat = new function () { * Handle return or escape */ function _onQuickSearchKeyPress(event) { - qfGuidance.hide(); + if(qfGuidance) qfGuidance.hide(); var keyCode = event.keyCode; if(keyCode === event.DOM_VK_RETURN || keyCode === event.DOM_VK_ENTER) { diff --git a/chrome/content/zotero/itemPane.js b/chrome/content/zotero/itemPane.js index 90a275bcc..53bdee643 100644 --- a/chrome/content/zotero/itemPane.js +++ b/chrome/content/zotero/itemPane.js @@ -98,6 +98,8 @@ var ZoteroItemPane = new function() { var notes = Zotero.Items.get(item.getNotes()); if (notes.length) { for(var i = 0; i < notes.length; i++) { + let id = notes[i].id; + var icon = document.createElement('image'); icon.setAttribute('src','chrome://zotero/skin/treeitem-note.png'); @@ -109,8 +111,8 @@ var ZoteroItemPane = new function() { label.setAttribute('crop','end'); var box = document.createElement('box'); - box.setAttribute('onclick',"ZoteroPane_Local.selectItem(" + notes[i].id + ");"); box.setAttribute('class','zotero-clicky'); + box.addEventListener('click', function () { ZoteroPane_Local.selectItem(id); }); box.appendChild(icon); box.appendChild(label); @@ -118,7 +120,7 @@ var ZoteroItemPane = new function() { var removeButton = document.createElement('label'); removeButton.setAttribute("value","-"); removeButton.setAttribute("class","zotero-clicky zotero-clicky-minus"); - removeButton.setAttribute("onclick","ZoteroItemPane.removeNote(" + notes[i].id + ")"); + removeButton.addEventListener('click', function () { ZoteroItemPane.removeNote(id); }); } var row = document.createElement('row'); diff --git a/chrome/content/zotero/itemPane.xul b/chrome/content/zotero/itemPane.xul index c9facea7d..38af4e645 100644 --- a/chrome/content/zotero/itemPane.xul +++ b/chrome/content/zotero/itemPane.xul @@ -30,7 +30,7 @@