From 89635f1bc356bb9146c73e25530872e15e6acfec Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Tue, 19 Mar 2013 13:50:05 +0100 Subject: Fix dirty dialog behavior Dirty dialog was displayed twice because of double event registration in menu widget. https://fedorahosted.org/freeipa/ticket/3236 --- install/ui/src/freeipa/Application_controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'install/ui/src/freeipa/Application_controller.js') diff --git a/install/ui/src/freeipa/Application_controller.js b/install/ui/src/freeipa/Application_controller.js index 16b639e73..03b987a1f 100644 --- a/install/ui/src/freeipa/Application_controller.js +++ b/install/ui/src/freeipa/Application_controller.js @@ -179,13 +179,13 @@ define(['dojo/_base/declare', var current_facet = this.current_facet; if (current_facet && !current_facet.can_leave()) { - var permit_clb = function() { + var permit_clb = lang.hitch(this, function() { // Some facet's might not call reset before this call but after // so they are still dirty. Calling reset prevent's opening of // dirty dialog again. if (current_facet.is_dirty()) current_facet.reset(); //TODO change this.router.navigate_to_hash(event.hash, event.facet); - }; + }); var dialog = current_facet.show_leave_dialog(permit_clb); this.router.canceled = true; -- cgit