GUI -- Initial unit tests for Key Handler service. Still more to be done here.
Change-Id: I36e1504c571daebbcd2a147c1dffb37ef6c6beb6
diff --git a/web/gui/src/main/webapp/app/fw/lib/keys.js b/web/gui/src/main/webapp/app/fw/lib/keys.js
index 3c0a26a..c5f0a19 100644
--- a/web/gui/src/main/webapp/app/fw/lib/keys.js
+++ b/web/gui/src/main/webapp/app/fw/lib/keys.js
@@ -147,11 +147,14 @@
onos.factory('KeyService', ['FnService', function (fs) {
f = fs;
return {
- init: function () {
- console.log('initializing keydown handler....');
- d3.select('body').on('keydown', keyIn);
+ installOn: function (elem) {
+ elem.on('keydown', keyIn);
setupGlobalKeys();
- }
+ },
+ theme: function () {
+ return theme;
+ },
+ whatKey: whatKey
};
}]);