X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/5fa477181f00d867a51d9f6e4fb1915522d725f5..4a10da821d96b8e462cc9db5e74e2507445eee76:/modules/data/saveDialog.js?ds=inline diff --git a/modules/data/saveDialog.js b/modules/data/saveDialog.js index a772ba6..0bdb718 100644 --- a/modules/data/saveDialog.js +++ b/modules/data/saveDialog.js @@ -20,6 +20,7 @@ define([ this.setElement(this.template()); this.$el.modal({backdrop: 'static'}); this.$el.modal('show'); + this.$('textarea').focus(); }, onSave: function(e) { @@ -29,7 +30,7 @@ define([ data: {description: view.$el.find('textarea').val()}, success: function() { view.actionsDisabled = false; view.close(); }, error: function() { view.actionsDisabled = false; view.close(); }, - }) + }); }, close: function(e) { if(e) @@ -41,6 +42,7 @@ define([ }, toggleButtons: function(toggle) { this.$('.btn, button').toggleClass('disabled', !toggle); + this.$('textarea').attr('disabled', !toggle); this.actionsDisabled = !toggle; } }); @@ -49,6 +51,6 @@ define([ create: function() { return new DialogView(); } - } + }; }); \ No newline at end of file