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.24 -r1.1.2.25 --- lams_central/web/includes/javascript/dialog.js 23 Dec 2016 18:20:44 -0000 1.1.2.24 +++ lams_central/web/includes/javascript/dialog.js 16 May 2017 20:58:14 -0000 1.1.2.25 @@ -104,6 +104,12 @@ } dialog.on('show.bs.modal', initParams.modal ? initParams.open : function(event){ + + // skip all further actions if dialog is already shown (it's required due to bootstrap doesn't fire 'shown.bs.modal' event second time if dialog is currently open) + if (dialog.data('shown')) { + return; + } + dialog.css('visibility', 'hidden'); if (initParams.open) { initParams.open.call(dialog, event); @@ -121,6 +127,12 @@ if (!initParams.modal) { // make the dialog non-modal dialog.on('shown.bs.modal', function(){ + + // store 'shown.bs.modal' event was fired + dialog.data({ + 'shown' : true + }); + // the main modal div is maximised, we need to shrink it modalDialog.css({ 'margin' : 0