From 23716b457d5aa1d6e1511d15d93854ea7b2ecec9 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 30 Jul 2014 10:33:29 +0100 Subject: [PATCH] CRM-15053 - Fix unsaved change warning in profile designer dialog --- js/view/crm.designer.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/view/crm.designer.js b/js/view/crm.designer.js index daf8aec41b..07501e6b8f 100644 --- a/js/view/crm.designer.js +++ b/js/view/crm.designer.js @@ -49,6 +49,7 @@ initialize: function(options) { CRM.designerApp.vent.on('ufUnsaved', this.onUfChanged, this); + CRM.designerApp.vent.on('ufSaved', this.onUfSaved, this); }, onClose: function() { this.undoAlert && this.undoAlert.close && this.undoAlert.close(); @@ -57,6 +58,10 @@ onUfChanged: function(isUfUnsaved) { this.isUfUnsaved = isUfUnsaved; }, + onUfSaved: function() { + CRM.designerApp.vent.off('ufUnsaved', this.onUfChanged, this); + this.isUfUnsaved = false; + }, onRender: function() { var designerDialog = this; designerDialog.$el.dialog({ -- 2.25.1