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 @@
case 91: return 'cmdLeft';
case 93: return 'cmdRight';
case 187: return 'equals';
case 188: return 'comma';
case 189: return 'dash';
case 190: return 'dot';
case 191: return 'slash';
case 192: return 'backQuote';
case 220: return 'backSlash';
......
......@@ -135,7 +135,6 @@
btn = bns.button(currentRow, bid, gid, cb, tooltip);
items[id] = btn;
$log.debug('adding button');
adjustWidth(btn.width());
return btn;
}
......@@ -180,9 +179,6 @@
function show(cb) {
rotateArrowLeft(arrowDiv);
panel.show(cb);
$log.debug('tbar width', tbWidth);
$log.debug('maxwidth', maxWidth);
$log.debug('panel width', panel.width());
}
function hide(cb) {
......
......@@ -57,6 +57,7 @@
L: [tfs.cycleDeviceLabels, 'Cycle device labels'],
U: [tfs.unpin, 'Unpin node (hover mouse over)'],
R: [resetZoom, 'Reset pan / zoom'],
dot: [ttbs.toggleToolbar, 'Toggle Toolbar'],
V: [tts.showRelatedIntentsAction, 'Show all related intents'],
rightArrow: [tts.showNextIntentAction, 'Show next related intent'],
......@@ -73,7 +74,7 @@
_helpFormat: [
['I', 'O', 'D', '-', 'H', 'M', 'P', 'B' ],
['X', 'Z', 'L', 'U', 'R' ],
['X', 'Z', 'L', 'U', 'R', '-', 'dot'],
['V', 'rightArrow', 'leftArrow', 'W', 'A', 'F', '-', 'E' ]
]
};
......
......@@ -66,7 +66,7 @@
keyData.forEach(function(key, value) {
var data = api.getActionEntry(key);
value.cb = data[0]; // on-click callback
value.tt = data[1]; // tooltip
value.tt = data[1] + ' (' + key + ')'; // tooltip
});
}
......@@ -135,6 +135,10 @@
}
}
function toggleToolbar() {
toolbar.toggle();
}
angular.module('ovTopo')
.factory('TopoToolbarService', ['$log', 'ToolbarService',
......@@ -146,7 +150,8 @@
init: init,
createToolbar: createToolbar,
destroyToolbar: destroyToolbar,
keyListener: keyListener
keyListener: keyListener,
toggleToolbar: toggleToolbar
};
}]);
}());
\ No newline at end of file
......