Update file-gallery-media.js

add `attach` button to attachment view.
replace attachment template with new version by removing the exiting one and renaming a previously inserted new version.
(see file-gallery.php)
Update file-gallery.php

add replacement attachment template for media modals using `print_media_templates` hook.
Update file-gallery.css

add css for `attach` button in media modals, additional css for toggle unused currently
Update attachments.php

minor bug fix for response if two of two selected items are already attached.
Update file-gallery-media.js

force refresh of library view
Update file-gallery.php

integrate duplicate filtering for new media modals (filter modified to allow currently attached copies and hide the originals)
Update file-gallery.js

force media modal to refresh data to reflect changes to attachments
image
regress refresh code, handled in file-gallery-media.js
refresh view and reset selection on open to reflect possible attachment changes made via fg
Merge pull request #12 from shaddowgh/master

duplicate filtering and attachment indicator
Merge pull request #11 from jjeaton/master

Remove PHP Notice for $output (media editor)
!== should be ===

made a mistake when converting "typeof undefined" to "equals void 0"
Update file-gallery.php
Merge pull request #13 from shaddowgh/master

fix for hardcoded post id in filtering query...OOPS!
Added missing equal sign to post_parent query