mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-06-02 18:31:43 +00:00

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
32 lines
884 B
JavaScript
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();
|
|
}
|
|
}
|
|
}); |