makes no sense to have the, more or less, exact same 25 line method 5
times..
could be moved to widget TK, but that's for another time.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Ext.urlEncode is deprecated, use Ext.Object.toQueryString instead
Signed-off-by: Tim Marx <t.marx@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Proxmox.button.Help renamed the css class for the button styling, as
this class is only used rarely and the widget toolkit does not
provides a (shared) css file itself, just rename it here too.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
we want the new behaviour of the proxmox button also in pve, but
we do not want to change to proxmox-widget-toolkit yet
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
The line:
> Ext.MessageBox.defaultButton = me.dangerous ? 2 : 1;
just set the button which should get triggered on an keyboard "Enter"
if no button is focused currently.
But often the 'Yes' buttons is focused so an enter press would
trigger it, even on a as 'dangerous' marked option.
Fix this, as else a to fast "Enter" press can cause more problems
than needed.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-By: Dominik Csapak <d.csapak@proxmox.com>
instead of manually setting the onlineHelpTooltip property
we now have a method which maps links to the docs to
titles
for now this uses a static hashmap, but in the future
we want to generate this by the pve-docs package
also most of the subheaders we can generate instead of
saving them because they simply have each word capitalized
(e.g. '_container_network' => 'Container Network')
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
this adds an option to set the helplink on the global event
also we now only set the link instead of the complete handler,
which is now static and gets the url from a property
(which we will set directly for other help buttons)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
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
This help button is meant to be added on InputPanels, where a
link to an online documentation chapter or subschapter is available.
Clicking on the help button will open the help in a new
browser tab.
Original idea similar to the pfSense GUI.
fix various type confusion, for example:
items: {} and items: []
style: string and style: {}
also fix object['property'] access with
object.property
also fix /=/ with either '=' or /\=/ where appropriate
(/=/ can be confused with /= according to jslint)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
the same code base as our pveButton
(selectionchange handling, confirm,etc.)
but with a split button (a button with a menu)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
since sometimes, we set the text of the console button
('shell' or 'upgrade')
we do not want to override this everytime, but only
when me.text === null
we cannot use applyIf either, because this overwrites only
if the field is undefined, not null
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>