HubSpot/Singularity — pull request #138 by Eseb (2014-06-04 18:34:58+00:00)
Title: Added copy button to JSON dialog

Added Copy (to clipboard) button to JSON dialogs - issue #124

The flash element from ZeroClipboard acts up if it falls outside the body, which is can if there are next to no requests, so I had to add the "dirty hack" to help with that.

This'd only occur if the page body is so small such that the copy button would actually be outside it because of the Vex dialog. This is really unlikely in a production environment, but I added it just in case.

It can still be a problem if that holds true AND the user resizes their window vertically, which again, is very very unlikely to happen.

@gchomatas @tpetr @wsorenson