From 6b30915df24f7f5082d0ad3a636e57de12d4bb7d Mon Sep 17 00:00:00 2001 From: Vishmita Date: Mon, 8 Oct 2012 12:57:33 +0530 Subject: [Fix]replace callenabled for on_button_cancel bzr revid: vja@tinyerp.com-20121008072733-kveozkvheu9kiti2 --- addons/web_view_editor/static/src/js/view_editor.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'addons/web_view_editor/static/src') diff --git a/addons/web_view_editor/static/src/js/view_editor.js b/addons/web_view_editor/static/src/js/view_editor.js index e65f0ab5d38..f26e12a55d7 100644 --- a/addons/web_view_editor/static/src/js/view_editor.js +++ b/addons/web_view_editor/static/src/js/view_editor.js @@ -1014,9 +1014,7 @@ instance.web_view_editor.ViewEditor = instance.web.Widget.extend({ var action_manager = new instance.web.ActionManager(self); $.when(action_manager.do_action(action)).then(function() { var controller = action_manager.dialog_widget.views['form'].controller; - controller.on_button_cancel.add_last(function(){ - action_manager.destroy() - }); + controller.on("on_button_cancel",self,action_manager.destroy); controller.do_save.add_last(function(){ action_manager.destroy(); var value =controller.fields.name.get('value'); -- cgit v1.2.3 From 777243bef32482803e8ccbc6735293c19187a54a Mon Sep 17 00:00:00 2001 From: Vishmita Date: Mon, 8 Oct 2012 15:03:15 +0530 Subject: [Fix]Improve code bzr revid: vja@tinyerp.com-20121008093315-tnfnrr0rhum2yyoy --- addons/web_view_editor/static/src/js/view_editor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'addons/web_view_editor/static/src') diff --git a/addons/web_view_editor/static/src/js/view_editor.js b/addons/web_view_editor/static/src/js/view_editor.js index f26e12a55d7..b3a4f0dcfac 100644 --- a/addons/web_view_editor/static/src/js/view_editor.js +++ b/addons/web_view_editor/static/src/js/view_editor.js @@ -1014,7 +1014,9 @@ instance.web_view_editor.ViewEditor = instance.web.Widget.extend({ var action_manager = new instance.web.ActionManager(self); $.when(action_manager.do_action(action)).then(function() { var controller = action_manager.dialog_widget.views['form'].controller; - controller.on("on_button_cancel",self,action_manager.destroy); + controller.on("on_button_cancel",self,function(){ + action_manager.destroy(); + }); controller.do_save.add_last(function(){ action_manager.destroy(); var value =controller.fields.name.get('value'); -- cgit v1.2.3 From 46b5ac9a377c9470b20aae0e8bdbdf0d359871af Mon Sep 17 00:00:00 2001 From: "vta vta@openerp.com" <> Date: Wed, 10 Oct 2012 13:40:07 +0200 Subject: [FIX] Fixed on_button_cancel. bzr revid: vta@openerp.com-20121010114007-3cw3qlxu2zwt1k0s --- addons/web_view_editor/static/src/js/view_editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web_view_editor/static/src') diff --git a/addons/web_view_editor/static/src/js/view_editor.js b/addons/web_view_editor/static/src/js/view_editor.js index b3a4f0dcfac..40d333afa0f 100644 --- a/addons/web_view_editor/static/src/js/view_editor.js +++ b/addons/web_view_editor/static/src/js/view_editor.js @@ -1014,7 +1014,7 @@ instance.web_view_editor.ViewEditor = instance.web.Widget.extend({ var action_manager = new instance.web.ActionManager(self); $.when(action_manager.do_action(action)).then(function() { var controller = action_manager.dialog_widget.views['form'].controller; - controller.on("on_button_cancel",self,function(){ + controller.on("on_button_cancel", self, function(){ action_manager.destroy(); }); controller.do_save.add_last(function(){ -- cgit v1.2.3