X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/413a5f1dc25d5c8a788127f40816f39c49cd0d1c..869d237d2f1675068423f664f13ce5b0f8707218:/src/editor/views/dialog/dialog.js?ds=inline diff --git a/src/editor/views/dialog/dialog.js b/src/editor/views/dialog/dialog.js index 0d4bbd4..bad349d 100644 --- a/src/editor/views/dialog/dialog.js +++ b/src/editor/views/dialog/dialog.js @@ -1,6 +1,5 @@ define(function(require) { - /* globals gettext */ 'use strict'; var _ = require('libs/underscore'), @@ -27,8 +26,8 @@ define(function(require) { }, show: function() { this.setElement(this.template(_.extend({ - executeButtonText: gettext('Submit'), - cancelButtonText: gettext('Cancel') + executeButtonText: null, + cancelButtonText: null }, this.options))); var body = this.$('.modal-body'); @@ -38,7 +37,7 @@ define(function(require) { throw new Error('Field type {type} not recognized.'.replace('{type}', field.type)); } body.append( - _.template(template)(_.extend({description: ''}, field)) + _.template(template)(_.extend({description: '', initialValue: ''}, field)) ); }); @@ -48,7 +47,7 @@ define(function(require) { this.$el.modal({backdrop: 'static'}); this.$el.modal('show'); - this.$('textarea').focus(); + this.$('textarea, input').first().focus(); }, onExecute: function(e) { e.preventDefault();