From bf10544e27a8c942e6907d059586119b80112337 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 11 Dec 2008 20:47:09 +0000 Subject: Destroy the popup dialog when it closes so there is nothing hanging around and we can reuse it for a different popup --- themes/default/js/ui.init.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'themes/default/js') diff --git a/themes/default/js/ui.init.js b/themes/default/js/ui.init.js index a131421b..9ba4a642 100644 --- a/themes/default/js/ui.init.js +++ b/themes/default/js/ui.init.js @@ -69,6 +69,7 @@ function handleDialogEvent(event) { function openDialog(element) { var href = $(element).attr("href"); var dialog = '
'; + $("body").append(dialog); $("#gDialog").dialog({ draggable: true, @@ -78,6 +79,10 @@ function openDialog(element) { opacity: 0.7, background: "black" }, + close: function (event, ui) { + $("#gDialog").dialog('destroy').remove(); + }, + resizable: true, title: $(element).attr("title"), width: '500px' -- cgit v1.2.3