diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js index 3251684d8..89ca82f68 100644 --- a/chrome/content/zotero/overlay.js +++ b/chrome/content/zotero/overlay.js @@ -1674,9 +1674,10 @@ var ZoteroPane = new function() createBib: 11, loadReport: 12, sep4: 13, - recognizePDF: 14, - renameAttachments: 15, - reindexItem: 16 + createParent: 14, + recognizePDF: 15, + renameAttachments: 16, + reindexItem: 17 }; var menu = document.getElementById('zotero-itemmenu'); @@ -1715,7 +1716,7 @@ var ZoteroPane = new function() if (canRecognize && !Zotero_RecognizePDF.canRecognize(items[i])) { canRecognize = false; } - if(!canIndex && !canRecognize) { + if (!canIndex && !canRecognize) { break; } } @@ -1727,12 +1728,26 @@ var ZoteroPane = new function() } if (canRecognize) { show.push(m.recognizePDF); + hide.push(m.createParent); } else { hide.push(m.recognizePDF); + + var canCreateParent = true; + for (var i=0; i +