Repository: ambari Updated Branches: refs/heads/branch-2.1 08403ed47 -> 60302b397
AMBARI-12108. Alert Groups: edit + cancel notitications removes notification target (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/60302b39 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/60302b39 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/60302b39 Branch: refs/heads/branch-2.1 Commit: 60302b397cc89eca7ad60bf5722ad0f99cdb4bc9 Parents: 08403ed Author: Alex Antonenko <hiv...@gmail.com> Authored: Wed Jun 24 00:11:34 2015 +0300 Committer: Alex Antonenko <hiv...@gmail.com> Committed: Tue Jul 21 13:14:18 2015 +0300 ---------------------------------------------------------------------- ambari-web/app/views/common/editable_list.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/60302b39/ambari-web/app/views/common/editable_list.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/editable_list.js b/ambari-web/app/views/common/editable_list.js index 579ea66..b1d187d 100644 --- a/ambari-web/app/views/common/editable_list.js +++ b/ambari-web/app/views/common/editable_list.js @@ -33,11 +33,15 @@ App.EditableList = Ember.View.extend({ init: function () { this._super(); - this.set('itemsOriginal', Em.copy(this.get('items'))); + this.updateItemsOriginal(); this.set('input', ''); this.set('editMode', false); }, + updateItemsOriginal: function () { + this.set('itemsOriginal', Em.copy(this.get('items'))); + }.observes('items'), + onPrimary: function (event) { this.set('editMode', false); this.set('input', '');