Index: lams_central/web/includes/javascript/dialog.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/dialog.js,v diff -u -r1.1.2.4 -r1.1.2.5 --- lams_central/web/includes/javascript/dialog.js 9 Jun 2015 20:20:02 -0000 1.1.2.4 +++ lams_central/web/includes/javascript/dialog.js 25 Apr 2016 08:30:43 -0000 1.1.2.5 @@ -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