explicit set button focus respecting the 'dangerous' option

port commit
4dc6bd326a829d5bf708c4a33722d5a8c6304f9c
from pve-manager
This commit is contained in:
Dominik Csapak 2018-01-04 11:28:58 +01:00
parent c47f5f46f4
commit a147a8cbb7

View File

@ -48,6 +48,7 @@ Ext.define('Proxmox.button.Button', {
icon: me.dangerous ? Ext.Msg.WARNING : Ext.Msg.QUESTION,
msg: msg,
buttons: Ext.Msg.YESNO,
defaultFocus: me.dangerous ? 'no' : 'yes',
callback: function(btn) {
if (btn !== 'yes') {
return;