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
diff --git a/web/gui/src/main/webapp/app/fw/util/keys.js b/web/gui/src/main/webapp/app/fw/util/keys.js
index d157414..6c831f4 100644
--- a/web/gui/src/main/webapp/app/fw/util/keys.js
+++ b/web/gui/src/main/webapp/app/fw/util/keys.js
@@ -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';
diff --git a/web/gui/src/main/webapp/app/fw/widget/toolbar.js b/web/gui/src/main/webapp/app/fw/widget/toolbar.js
index d9429f8..74867e5 100644
--- a/web/gui/src/main/webapp/app/fw/widget/toolbar.js
+++ b/web/gui/src/main/webapp/app/fw/widget/toolbar.js
@@ -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) {
diff --git a/web/gui/src/main/webapp/app/view/topo/topo.js b/web/gui/src/main/webapp/app/view/topo/topo.js
index 0ed2a7c..82f1173 100644
--- a/web/gui/src/main/webapp/app/view/topo/topo.js
+++ b/web/gui/src/main/webapp/app/view/topo/topo.js
@@ -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' ]
]
};
diff --git a/web/gui/src/main/webapp/app/view/topo/topoToolbar.js b/web/gui/src/main/webapp/app/view/topo/topoToolbar.js
index 7a94bce..f9ff18b 100644
--- a/web/gui/src/main/webapp/app/view/topo/topoToolbar.js
+++ b/web/gui/src/main/webapp/app/view/topo/topoToolbar.js
@@ -65,8 +65,8 @@
keyData = d3.map(k2b);
keyData.forEach(function(key, value) {
var data = api.getActionEntry(key);
- value.cb = data[0]; // on-click callback
- value.tt = data[1]; // tooltip
+ value.cb = data[0]; // on-click callback
+ 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