pve-manager/www/manager6/button/HelpButton.js
Emmanuel Kasper 285403bf62 Add custom syle to pveHelpButton
Next / OK are already displayed in blue, which is the 'call-to-action'
color we use everywhere.
To prevent stealing attention from these buttons, switch help button
to grey
2016-06-01 12:38:29 +02:00

32 lines
884 B
JavaScript

/* help button pointing to an online documentation
for components contained in a modal window
*/
Ext.define('PVE.button.Help', {
extend: 'Ext.button.Button',
alias: 'widget.pveHelpButton',
text: gettext('Help'),
// make help button less flashy by styling it like toolbar buttons
iconCls: ' x-btn-icon-el-default-toolbar-small fa fa-question-circle',
cls: 'x-btn-default-toolbar-small pve-help-button',
hidden: true,
controller: {
xclass: 'Ext.app.ViewController',
listen: {
global: {
pveShowHelp: 'onPveShowHelp',
pveHideHelp: 'onPveHideHelp'
}
},
onPveShowHelp: function(helpLink) {
this.getView().setHandler(function() {
var docsURI = window.location.origin +
'/pve-docs/' + helpLink;
window.open(docsURI);
});
this.getView().show();
},
onPveHideHelp: function() {
this.getView().hide();
}
}
});