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/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