* hit ctrl+esc to cancel update on initial popup
This commit is contained in:
parent
1cbafadef4
commit
5f06a4ae03
|
|
@ -12,6 +12,13 @@
|
|||
// updated once a download is started
|
||||
var updateSize = 0;
|
||||
|
||||
function cancelUpdate(e) {
|
||||
if(e.ctrlKey && e.keyCode == 27) {
|
||||
console.log("update canceled!");
|
||||
$('#client_update').hide();
|
||||
$('#client_update_overlay').hide();
|
||||
}
|
||||
}
|
||||
|
||||
// responsible for updating the contents of the update dialog
|
||||
// as well as registering for any event handlers
|
||||
|
|
@ -21,8 +28,13 @@
|
|||
|
||||
$('#client_update .dialog-inner').html(templateHtml);
|
||||
|
||||
$('#client_update').attr('data-mode', templateId);
|
||||
|
||||
// assign click handlers
|
||||
if(templateId == "update-start") {
|
||||
|
||||
$('body').on('keyup', cancelUpdate);
|
||||
|
||||
$("#client_update a.close-application").click(function() {
|
||||
// noop atm
|
||||
return false;
|
||||
|
|
@ -34,6 +46,9 @@
|
|||
})
|
||||
}
|
||||
else if(templateId == "update-downloading") {
|
||||
|
||||
$('body').off('keyup', cancelUpdate);
|
||||
|
||||
$("#client_update a.close-application").click(function() {
|
||||
// noop atm
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue