* hit ctrl+esc to cancel update on initial popup

This commit is contained in:
Seth Call 2013-06-26 16:56:13 -05:00
parent 1cbafadef4
commit 5f06a4ae03
1 changed files with 15 additions and 0 deletions

View File

@ -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;