Keyconfig customizations
I've read the posts about customizing the hotkeys for creating a new item from the current page, etc., and I've done that with keyconfig. I wonder if there's a way to do further keyconfig settings. For example, I have A LOT of PDFs that I need to link to Zotero entries. Instead of going through all the keystrokes, is there a command for the "Link to file..." function under attachment?
And if you could, could you tell me how to find such things in the bowels of Zotero so I can maybe find others to do?
Thanks!
And if you could, could you tell me how to find such things in the bowels of Zotero so I can maybe find others to do?
Thanks!
Most code you'd want to call is in ZoteroPane in overlay.js. "Link to file..." is ZoteroPane.addAttachmentFromDialog(true), which you can see by looking at overlay.xul, which is where most of the main UI (buttons, menus, etc.) is defined.
But it might be quicker just to drag PDFs from the filesystem directly onto items... [Edit: Sorry, forgot you were trying to link, whereas dragging (currently) only imports.]
chrome://zotero/content/overlay.js
and looked for
ZoteroPane.addAttachmentFromDialog(true)
but I couldn't find it (I was doing that to learn how to look for stuff). I couldn't find the overlay.xul (should I just replace .js with .xul? If so, that didn't work).
Regardless, this is a BIG help. THANKS!
var ids = ZoteroPane.getSelectedItems(true);
if (ids.length == 1) {
ZoteroPane.addAttachmentFromDialog(true, ids[0]);
}
Look for addAttachmentFromDialog in overlay.js, not ZoteroPane.addAttachmentFromDialog.
For overlay.xul you'll need to view the page source if you're using a chrome URL (which actually renders the XUL).
It's better to use SVN or Trac.
Aaron
ZoteroPane.viewAttachment;
but it seems like I need something more in there to make it work. I've also got Zotero configured to open the file in the external viewer (Acrobat). Any further help would be appreciated!