diff options
author | Zhenyu Wu <Adam_5Wu@hotmail.com> | 2018-03-20 17:26:01 -0400 |
---|---|---|
committer | Zhenyu Wu <Adam_5Wu@hotmail.com> | 2018-03-20 17:26:01 -0400 |
commit | 40bd9711052b3b3f10687fdbb28fe2a656b2e1e0 (patch) | |
tree | b400fc248fc0b01ab6acf039f74d21db76b161cf | |
parent | 79a4b9dd44ecae6bcb5a446100c8af7562f3279a (diff) | |
download | phpvirtualbox-40bd9711052b3b3f10687fdbb28fe2a656b2e1e0.zip phpvirtualbox-40bd9711052b3b3f10687fdbb28fe2a656b2e1e0.tar.gz phpvirtualbox-40bd9711052b3b3f10687fdbb28fe2a656b2e1e0.tar.bz2 |
Make snapshot dialog faster to operate
-rw-r--r-- | panes/tabVMSnapshots.html | 5 |
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')});
}
|