diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2008-12-11 20:47:09 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2008-12-11 20:47:09 +0000 |
commit | bf10544e27a8c942e6907d059586119b80112337 (patch) | |
tree | aa0eebfdc37462908dfd099bc82329fdbfe20c2b /themes/default/js/ui.init.js | |
parent | faeb52e7f4d7a16242c9a7c1674cb1798058d179 (diff) |
Destroy the popup dialog when it closes so there is nothing hanging around and we can reuse it for a different popup
Diffstat (limited to 'themes/default/js/ui.init.js')
-rw-r--r-- | themes/default/js/ui.init.js | 5 |
1 files changed, 5 insertions, 0 deletions
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 = '<div id="gDialog"></div>'; + $("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' |