jmuehlner commented on code in PR #796:
URL: https://github.com/apache/guacamole-client/pull/796#discussion_r1117479626
##########
guacamole/src/main/frontend/src/app/clipboard/directives/guacClipboard.js:
##########
@@ -40,13 +40,31 @@ angular.module('clipboard').directive('guacClipboard',
['$injector',
var config = {
restrict : 'E',
replace : true,
+ scope: {
+ /**
+ * The message that will be displayed within the Clipboard Editor
+ * when it does not have focus.
+ *
+ * @type String
+ */
+ inactiveContent : '=',
+ },
templateUrl : 'app/clipboard/templates/guacClipboard.html'
};
// guacClipboard directive controller
config.controller = ['$scope', '$injector', '$element',
function guacClipboardController($scope, $injector, $element) {
+ /**
+ * 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 updated with Clipboard data.
+ *
+ * @type Boolean
+ */
+ var isActive = false;
Review Comment:
If you expose this to the template (on `$scope`), you could have the
template itself render differently based on the state. That would move all the
display logic (css styles, translations, etc) out of the controller and into
the view where it belongs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]