otwcode/otwarchive — pull request #1292 by sarken (2013-08-07 22:07:09+00:00)
Title: 3722 slideDown Most Recent Bookmarks on first click

http://code.google.com/p/otwarchive/issues/detail?id=3722

When you select Show Most Recent Bookmarks the first time, the list of recent bookmarks just appears. When you select Hide Most Recent Bookmarks, the list slides up. When you select Show Most Recent Bookmarks a second time on the same item, the list slides down. It should always do the same thing. This makes it always slideDown.

Could also be accomplished by adding `.hide()` to `$j('#recent_<%= "#{@bookmark.bookmarkable_type.underscore}_#{@bookmark.id}"%>')` on the first line of fetch_recent.js, but since we already have `style="display: none;"` on the bookmark_blurb partial, I did that.

Changed the links to translation strings and fixed the problem of duplicate IDs by changing from `recent_<%= "#{bookmark.bookmarkable_type.underscore}_#{bookmark.bookmarkable_id}" %>` to `recent_<%= "#{bookmark.bookmarkable_type.underscore}_#{bookmark.bookmarkable_id}" %>`, which will guarantee a unique ID even when the page contains multiple bookmarks of the same item. By happy coincidence, this stops the annoying behavior wherein the most recent bookmarks would be shown attached to the first bookmark blurb for a given item instead of the one you actually clicked the Show Most Recent Bookmarks button on.