diff --git a/guacamole/src/main/frontend/src/app/clipboard/directives/guacClipboard.js b/guacamole/src/main/frontend/src/app/clipboard/directives/guacClipboard.js index f89494c4c..789756bd8 100644 --- a/guacamole/src/main/frontend/src/app/clipboard/directives/guacClipboard.js +++ b/guacamole/src/main/frontend/src/app/clipboard/directives/guacClipboard.js @@ -49,11 +49,29 @@ angular.module('clipboard').directive('guacClipboard', ['$injector', /** * The DOM element which will contain the clipboard contents within the - * user interface provided by this directive. + * user interface provided by this directive. We populate the clipboard + * editor via this DOM element rather than updating a model so that we + * are prepared for future support of rich text contents. * * @type Element */ - var element = $element[0]; + var element = $element[0].querySelectorAll('.clipboard.active')[0]; + + /** + * When isActive is set to true then the Clipboard data will be + * displayed in the Clipboard Editor. When false, the Clipboard Editor + * will not be displayed with Clipboard data. + * + * @type Boolean + */ + $scope.isActive = false; + + /** + * Updates clipboard editor to be active. + */ + $scope.setActive = function setActive() { + $scope.isActive = true; + }; /** * Rereads the contents of the clipboard field, updating the diff --git a/guacamole/src/main/frontend/src/app/clipboard/styles/clipboard.css b/guacamole/src/main/frontend/src/app/clipboard/styles/clipboard.css index 91fb328bb..d71287ac7 100644 --- a/guacamole/src/main/frontend/src/app/clipboard/styles/clipboard.css +++ b/guacamole/src/main/frontend/src/app/clipboard/styles/clipboard.css @@ -31,8 +31,6 @@ width: 100%; height: 2in; white-space: pre; - font-size: 1em; - overflow: auto; padding: 0.25em; } @@ -59,3 +57,14 @@ white-space: pre; overflow: hidden; } + +.active { + overflow: auto; + font-size: 1em; +} + +.inactive { + overflow: hidden; + font-size: 0.9em; + opacity: 0.5; +} diff --git a/guacamole/src/main/frontend/src/app/clipboard/templates/guacClipboard.html b/guacamole/src/main/frontend/src/app/clipboard/templates/guacClipboard.html index b860f0319..4e1ebda8e 100644 --- a/guacamole/src/main/frontend/src/app/clipboard/templates/guacClipboard.html +++ b/guacamole/src/main/frontend/src/app/clipboard/templates/guacClipboard.html @@ -1 +1,4 @@ - +