Skip to content

Commit

Permalink
close download dialog on enter
Browse files Browse the repository at this point in the history
  • Loading branch information
kicktheken committed Jun 23, 2013
1 parent 5099174 commit 352607d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/js/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -913,12 +913,13 @@ define(["actions","layer","canvas","pixel"],function Engine(Actions, Layer, Canv
_this.refreshBackground();
},
download: function() {
var $dialog = $('#download-dialog');
$("#exportname").keyup(function (e) {
if (e.keyCode == 13) { // enter key
_this.export($(this).val(),/\d+/.exec($('#scale').val()));
$dialog.dialog('close');
}
});
var dialog = $dialog = $('#download-dialog');
$dialog.dialog({
dialogClass: "no-close",
modal:true,
Expand All @@ -930,7 +931,6 @@ define(["actions","layer","canvas","pixel"],function Engine(Actions, Layer, Canv
buttons: {
Download: function() {
_this.export($('#exportname').val(),/\d+/.exec($('#scale').val()));
$(this).dialog('close');
},
Cancel: function() {
$(this).dialog('close');
Expand Down

0 comments on commit 352607d

Please sign in to comment.