From 7cf139b65610e0385904292cf93f376fa5ffc939 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 3 Nov 2020 14:05:39 +0300 Subject: [PATCH] [DE] Refactoring form settings --- apps/documenteditor/main/app/view/FormSettings.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/documenteditor/main/app/view/FormSettings.js b/apps/documenteditor/main/app/view/FormSettings.js index d41dbedf0..85944ed46 100644 --- a/apps/documenteditor/main/app/view/FormSettings.js +++ b/apps/documenteditor/main/app/view/FormSettings.js @@ -208,6 +208,8 @@ define([ value : '' }); this.lockedControls.push(this.txtNewValue); + this.txtNewValue.on('changed:after', this.onAddItem.bind(this)); + this.txtNewValue.on('inputleave', function(){ me.fireEvent('editcomplete', me);}); this.list = new Common.UI.ListView({ el: $markup.findById('#form-list-list'), @@ -217,7 +219,7 @@ define([ itemTemplate: _.template([ '
', // '
<%= name %>
', - '
<%= name %>
', + '
<%= name %>
', '
' ].join('')) }); @@ -784,6 +786,7 @@ define([ }, onSelectItem: function(listView, itemView, record) { + this.txtNewValue.setValue(record.get('name')); this.disableListButtons(false); },