GitHub user mike-jumper opened a pull request:

    https://github.com/apache/incubator-guacamole-client/pull/25

    GUACAMOLE-55: Add interface-level support for image clipboard contents

    This change implements a new directive, `guacClipboard`, which provides 
support for image clipboard contents in addition to text. All clipboard 
contents intended for (or coming from) this directive are communicated via the 
`data` property on the scope as `ClipboardData` objects. These objects are also 
consumed and produced by the `clipboardService` which has been refactored to 
support them. All of these objects, services, etc. have been collected together 
into their own "clipboard" module.
    
    Originally opened as #24, this revised set of changes fixes several bugs 
discovered during review of that PR.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mike-jumper/incubator-guacamole-client 
image-clipboard

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-guacamole-client/pull/25.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #25
    
----
commit 0eed6c32aeee5661f80e56d59affc12690acde75
Author: Michael Jumper <[email protected]>
Date:   2016-06-22T06:55:05Z

    GUACAMOLE-55: Move clipboard functionality to a new guacClipboard directive.

commit 0edc730308c5fc78a811c56a45cd6e30997c0dc7
Author: Michael Jumper <[email protected]>
Date:   2016-06-22T07:26:46Z

    GUACAMOLE-55: Only the guacClipboard directive should fire guacClipboard 
events.

commit 0c6383a0827a73a2f89c05e25ee00f4a1da48bbe
Author: Michael Jumper <[email protected]>
Date:   2016-06-22T07:42:31Z

    GUACAMOLE-55: Clipboard element must be "position: fixed" to avoid 
unnecessary scrolling of the document.

commit 01eddd2772d0285025bf448dc279a3bacc5651ff
Author: Michael Jumper <[email protected]>
Date:   2016-06-22T08:09:24Z

    GUACAMOLE-55: Restore focus state after attempting to read local clipboard.

commit 65897fdb64d713e582b967ab57be23956bfeaefb
Author: Michael Jumper <[email protected]>
Date:   2016-06-22T08:31:11Z

    GUACAMOLE-55: Check clipboard when guacClipboard directive is initialized.

commit 0a0933a23e935e80622b37ac292f06cdf3720a76
Author: Michael Jumper <[email protected]>
Date:   2016-06-22T08:46:32Z

    GUACAMOLE-55: Clean up event handlers after guacClipboard directive is 
destroyed.

commit 7f08766392027977d8e14452c5be04dcbf645b1e
Author: Michael Jumper <[email protected]>
Date:   2016-06-22T22:17:28Z

    GUACAMOLE-55: Add image support to the guacClipboard directive.

commit 8c5446127b1f11c63695fd125c20c32e2a1bc469
Author: Michael Jumper <[email protected]>
Date:   2016-06-23T07:24:01Z

    GUACAMOLE-55: Move clipboard handling to own module. Represent clipboard 
contents with ClipboardData type.

commit 17e97e43116238000391b60fcb87cbfd3d4cc98a
Author: Michael Jumper <[email protected]>
Date:   2016-06-23T07:39:27Z

    GUACAMOLE-55: Improve styling of copied images.

commit 2a20aefa9284ca42a4862dc1700227703cbcf04b
Author: Michael Jumper <[email protected]>
Date:   2016-06-28T01:33:15Z

    GUACAMOLE-55: Do not attempt to send empty text blobs.

commit 6e4e6454f77024bc77cc7021b0dee4d27c3cd0dc
Author: Michael Jumper <[email protected]>
Date:   2016-06-28T02:32:18Z

    GUACAMOLE-55: Switch to a content-editable div for the clipboard (rather 
than a textarea).

commit ea5ee1825b2190d2c62b3873d20e275377b059ab
Author: Michael Jumper <[email protected]>
Date:   2016-06-28T20:43:31Z

    GUACAMOLE-55: Update clipboardService to support non-text contents.

commit 16637b07321b2526dcca6869c193d6c9cf537043
Author: Michael Jumper <[email protected]>
Date:   2016-06-28T21:00:53Z

    GUACAMOLE-55: Prevent clipboard events generated by the clipboardService 
from disturbing the operations of the guacClipboard directive.

commit f289be05b2732eae4c057c4227b53cd87a248541
Author: Michael Jumper <[email protected]>
Date:   2016-06-28T21:50:16Z

    GUACAMOLE-55: Attempt to set local clipboard with received data.

commit 942fd5dd677f21af409ea40c086cad0a422b396e
Author: Michael Jumper <[email protected]>
Date:   2016-06-28T22:05:49Z

    GUACAMOLE-55: Remove unnecessary style - there is no longer a textarea in 
the guac menu.

commit 058665e1f5d9affb8e21b0376646c91884c9e967
Author: Michael Jumper <[email protected]>
Date:   2016-06-28T23:10:03Z

    GUACAMOLE-55: Define wait period before clipboard reads with a documented 
constant.

commit da098c42e13674a83214b61d70e257bae1f6f2f1
Author: Michael Jumper <[email protected]>
Date:   2016-06-29T00:25:22Z

    GUACAMOLE-55: Use the files collection if the clipboard data does not 
define an items collection.

commit e4f7c6d05852fc148f02a957b04d969b13bc1baf
Author: Michael Jumper <[email protected]>
Date:   2016-06-29T03:43:21Z

    GUACAMOLE-55: The clipboard-service-target needs to be "white-space: pre" 
as well, or newline characters are truncated by setLocalClipboard().

commit 6e1bbb3cf485439b775b18eb181161afdb92a921
Author: Michael Jumper <[email protected]>
Date:   2016-06-29T03:44:24Z

    GUACAMOLE-55: Remove unneeded reference to document.

commit 42e41560d8c3be9b7af4a1c6cff1989453b37281
Author: Michael Jumper <[email protected]>
Date:   2016-06-29T19:49:57Z

    GUACAMOLE-55: Ensure <p> / <div> elements within the clipboard contents are 
rendered with normal spacing.

commit 880df109e3df80d7873502fe5c7e757d7a7c0366
Author: Michael Jumper <[email protected]>
Date:   2016-06-29T19:50:22Z

    GUACAMOLE-55: Remove unnecessary reset-button style.

commit 2471cece7f07e0dd609e27f9f3c5500afb0c3a96
Author: Michael Jumper <[email protected]>
Date:   2016-06-29T19:57:00Z

    GUACAMOLE-55: Use own getTextContent() rather than element.textContent, as 
the textContent property does not preserve line breaks due to block level 
elements.

commit 3f51a6dd98f42183209627d643cca72834301d1f
Author: Michael Jumper <[email protected]>
Date:   2016-06-29T21:18:37Z

    GUACAMOLE-55: Directly render content to text, rather than trusting 
Selection.toString().

commit c68cedd6522de42e599a87b8969138672722ac10
Author: Michael Jumper <[email protected]>
Date:   2016-06-29T22:27:51Z

    GUACAMOLE-55: Correct outdated documentation within setTextContent().

commit 6ee4264a218b8194d746672b7d20d1141e17df48
Author: Michael Jumper <[email protected]>
Date:   2016-06-29T23:11:20Z

    GUACAMOLE-55: Strip any images which may be present prior to assigning text 
content.

commit 3f372cce68e480ce0cc0e28269b9db0b3e8f6f33
Author: Michael Jumper <[email protected]>
Date:   2016-06-29T23:31:18Z

    GUACAMOLE-55: Render <img> tags as their alt text.

commit b9a57897c54241f3700cbe333362b9f0b34eba93
Author: Michael Jumper <[email protected]>
Date:   2016-06-30T00:24:51Z

    GUACAMOLE-55: Set background to clipboard-service-target to match clipboard 
editor. Browser may otherwise explicitly add the background of the body to 
pasted text with inline styles.

commit 0679c10187e60ca16bd70c1cd37640e834972a0d
Author: Michael Jumper <[email protected]>
Date:   2016-06-30T01:40:35Z

    GUACAMOLE-55: Move local clipboad sync logic back into clientController. 
Keep the guacClipboard directive lean and with a single purpose.

commit b55c4c02115f859ef67387042bc2173fbd3f2d45
Author: Michael Jumper <[email protected]>
Date:   2016-06-30T02:36:39Z

    GUACAMOLE-55: Do not sync local clipboard if menu is open.

commit a4019b7f82db6b4a1febeb225289e661df745250
Author: Michael Jumper <[email protected]>
Date:   2016-06-30T02:57:01Z

    GUACAMOLE-55: Automatically fire guacClipboard events from index controller 
when local clipboard has changed.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to