Simon Hunt
Committed by Gerrit Code Review

GUI -- Added hotkeys (in parentheses) to the tooltips of the topology toolbar buttons.

- Added '.' (dot) keystroke to toggle toolbar show/hide
- Added 'comma' and 'dot' to the keys logical names
- removed debug statements from toolbar.js

Change-Id: Idc4a714b11715a9851d29a87ecb4999e7315dec2
...@@ -53,7 +53,9 @@ ...@@ -53,7 +53,9 @@
53 case 91: return 'cmdLeft'; 53 case 91: return 'cmdLeft';
54 case 93: return 'cmdRight'; 54 case 93: return 'cmdRight';
55 case 187: return 'equals'; 55 case 187: return 'equals';
56 + case 188: return 'comma';
56 case 189: return 'dash'; 57 case 189: return 'dash';
58 + case 190: return 'dot';
57 case 191: return 'slash'; 59 case 191: return 'slash';
58 case 192: return 'backQuote'; 60 case 192: return 'backQuote';
59 case 220: return 'backSlash'; 61 case 220: return 'backSlash';
......
...@@ -135,7 +135,6 @@ ...@@ -135,7 +135,6 @@
135 btn = bns.button(currentRow, bid, gid, cb, tooltip); 135 btn = bns.button(currentRow, bid, gid, cb, tooltip);
136 136
137 items[id] = btn; 137 items[id] = btn;
138 - $log.debug('adding button');
139 adjustWidth(btn.width()); 138 adjustWidth(btn.width());
140 return btn; 139 return btn;
141 } 140 }
...@@ -180,9 +179,6 @@ ...@@ -180,9 +179,6 @@
180 function show(cb) { 179 function show(cb) {
181 rotateArrowLeft(arrowDiv); 180 rotateArrowLeft(arrowDiv);
182 panel.show(cb); 181 panel.show(cb);
183 - $log.debug('tbar width', tbWidth);
184 - $log.debug('maxwidth', maxWidth);
185 - $log.debug('panel width', panel.width());
186 } 182 }
187 183
188 function hide(cb) { 184 function hide(cb) {
......
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
57 L: [tfs.cycleDeviceLabels, 'Cycle device labels'], 57 L: [tfs.cycleDeviceLabels, 'Cycle device labels'],
58 U: [tfs.unpin, 'Unpin node (hover mouse over)'], 58 U: [tfs.unpin, 'Unpin node (hover mouse over)'],
59 R: [resetZoom, 'Reset pan / zoom'], 59 R: [resetZoom, 'Reset pan / zoom'],
60 + dot: [ttbs.toggleToolbar, 'Toggle Toolbar'],
60 61
61 V: [tts.showRelatedIntentsAction, 'Show all related intents'], 62 V: [tts.showRelatedIntentsAction, 'Show all related intents'],
62 rightArrow: [tts.showNextIntentAction, 'Show next related intent'], 63 rightArrow: [tts.showNextIntentAction, 'Show next related intent'],
...@@ -73,7 +74,7 @@ ...@@ -73,7 +74,7 @@
73 74
74 _helpFormat: [ 75 _helpFormat: [
75 ['I', 'O', 'D', '-', 'H', 'M', 'P', 'B' ], 76 ['I', 'O', 'D', '-', 'H', 'M', 'P', 'B' ],
76 - ['X', 'Z', 'L', 'U', 'R' ], 77 + ['X', 'Z', 'L', 'U', 'R', '-', 'dot'],
77 ['V', 'rightArrow', 'leftArrow', 'W', 'A', 'F', '-', 'E' ] 78 ['V', 'rightArrow', 'leftArrow', 'W', 'A', 'F', '-', 'E' ]
78 ] 79 ]
79 }; 80 };
......
...@@ -65,8 +65,8 @@ ...@@ -65,8 +65,8 @@
65 keyData = d3.map(k2b); 65 keyData = d3.map(k2b);
66 keyData.forEach(function(key, value) { 66 keyData.forEach(function(key, value) {
67 var data = api.getActionEntry(key); 67 var data = api.getActionEntry(key);
68 - value.cb = data[0]; // on-click callback 68 + value.cb = data[0]; // on-click callback
69 - value.tt = data[1]; // tooltip 69 + value.tt = data[1] + ' (' + key + ')'; // tooltip
70 }); 70 });
71 } 71 }
72 72
...@@ -135,6 +135,10 @@ ...@@ -135,6 +135,10 @@
135 } 135 }
136 } 136 }
137 137
138 + function toggleToolbar() {
139 + toolbar.toggle();
140 + }
141 +
138 angular.module('ovTopo') 142 angular.module('ovTopo')
139 .factory('TopoToolbarService', ['$log', 'ToolbarService', 143 .factory('TopoToolbarService', ['$log', 'ToolbarService',
140 144
...@@ -146,7 +150,8 @@ ...@@ -146,7 +150,8 @@
146 init: init, 150 init: init,
147 createToolbar: createToolbar, 151 createToolbar: createToolbar,
148 destroyToolbar: destroyToolbar, 152 destroyToolbar: destroyToolbar,
149 - keyListener: keyListener 153 + keyListener: keyListener,
154 + toggleToolbar: toggleToolbar
150 }; 155 };
151 }]); 156 }]);
152 }()); 157 }());
...\ No newline at end of file ...\ No newline at end of file
......