zotero/zotero — pull request #20 by willsALMANJ (2011-12-27 20:04:20+00:00)
Title: Add multiple tags/creators as newline delimited list

This is a pull request for adding multiple tags and creators by pasting a newline delimited list into the textbox.

For creators, names can be entered as lastnname tab firstname or just as a full name. When pasting a list over an existing entry, that existing entry is not overwritten. In the case of creators, the list is inserted in front of the existing entry. I did it this way because it would otherwise be hard to insert a list (you would have to put the entry being overwritten into the pasted list in order to keep it) and the order is important for creator lists. I made an existing tag also not be overwritten just to be consistent with the way the creators work (though order does not matter for tags since Zotero sorts them alphabetically).

There are three relevant commits. In commit e10d049428, adding multiple tags/creators works basically the same way adding a tag/creator works currently in Zotero. If you paste a list of tags over an existing tag, the tags are added but no entry is selected after you hit enter. In commit 87c47c0615, I changed this so that if you add multiple tags over an existing tag, the tag after that existing tag is selected after you hit enter (or the tag before if you do shift+enter). For commit 3ef0b63c47, I changed the tagsbox so that if you edit an existing tag (i.e. not pasting a multiple tag list over it) and hit enter/shift+enter, the next/previous tag is selected instead of no tag selected. This behavior seems intuitive and preferable to me. Sometimes when I am entering tags, I notice a typo and shift+tab back and fix it. It is annoying that I then have to move my hand from the keyboard to the mouse and click on the tagsbox again to re-select it.