summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhenyu Wu <Adam_5Wu@hotmail.com>2018-03-20 17:26:01 -0400
committerZhenyu Wu <Adam_5Wu@hotmail.com>2018-03-20 17:26:01 -0400
commit40bd9711052b3b3f10687fdbb28fe2a656b2e1e0 (patch)
treeb400fc248fc0b01ab6acf039f74d21db76b161cf
parent79a4b9dd44ecae6bcb5a446100c8af7562f3279a (diff)
downloadphpvirtualbox-40bd9711052b3b3f10687fdbb28fe2a656b2e1e0.zip
phpvirtualbox-40bd9711052b3b3f10687fdbb28fe2a656b2e1e0.tar.gz
phpvirtualbox-40bd9711052b3b3f10687fdbb28fe2a656b2e1e0.tar.bz2
Make snapshot dialog faster to operate
-rw-r--r--panes/tabVMSnapshots.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/panes/tabVMSnapshots.html b/panes/tabVMSnapshots.html
index ddd0530..9f7405a 100644
--- a/panes/tabVMSnapshots.html
+++ b/panes/tabVMSnapshots.html
@@ -115,11 +115,12 @@ var vboxSnapshotButtons = [
}
$('#vboxSnapshotNewName').val(trans('Snapshot %1','VBoxSnapshotsWgt').replace('%1',(snMax+1)));
+ $('#vboxSnapshotNewName').select();
$('#vboxSnapshotNewDesc').val('');
var buttons = {};
- buttons[trans('OK','QIMessageBox')] = function() {
+ var OKBtn = buttons[trans('OK','QIMessageBox')] = function() {
// Get fresh VM state when this is clicked
var vm = vboxChooser.getSingleSelected();
@@ -194,6 +195,8 @@ var vboxSnapshotButtons = [
if(typeof callback == 'function') { callback({success:false,uicancel:true}); }
};
+ $('#vboxSnapshotNewName').off('keypress').on('keypress',function(e) { if (e.keyCode == 13) OKBtn.apply($('#vboxSnapshotNew')); });
+
$('#vboxSnapshotNew').dialog({'closeOnEscape':false,'width':'400px','height':'auto','buttons':buttons,'modal':true,'autoOpen':true,'dialogClass':'vboxDialogContent','title':'<img src="images/vbox/snapshot_take_16px.png" class="vboxDialogTitleIcon" height="16" width="16" /> ' + trans('Take Snapshot of Virtual Machine','VBoxTakeSnapshotDlg')});
}