Index: lams_central/web/includes/javascript/dialog.js =================================================================== diff -u -r06c6921e9173ff630c99268f69463adf1a5e4834 -r6ad3d1341b3dc1f066c69c7129a8c1dff15980a5 --- lams_central/web/includes/javascript/dialog.js (.../dialog.js) (revision 06c6921e9173ff630c99268f69463adf1a5e4834) +++ lams_central/web/includes/javascript/dialog.js (.../dialog.js) (revision 6ad3d1341b3dc1f066c69c7129a8c1dff15980a5) @@ -4,12 +4,16 @@ * Checks if the dialog is already opened. * If not, creates a new dialog with the given ID and init parameters. */ -function showDialog(id, initParams, extraButtons) { +function showDialog(id, initParams, extraButtons, recreate) { var dialog = $('#' + id); + // is it open already? if (dialog.length > 0) { - // is it open already? - dialog.dialog('moveToTop'); - return; + if (recreate){ + dialog.dialog('close'); + } else { + dialog.dialog('moveToTop'); + return; + } } // create a new dialog by cloning a template