Index: lams_central/web/authoring/authoring.jsp =================================================================== diff -u -rd7807c73d8a9c76c44ea1a2a296d5f775afe2ac9 -r537eea81a1f3366c541a277dd8f95ea3f84dcbcb --- lams_central/web/authoring/authoring.jsp (.../authoring.jsp) (revision d7807c73d8a9c76c44ea1a2a296d5f775afe2ac9) +++ lams_central/web/authoring/authoring.jsp (.../authoring.jsp) (revision 537eea81a1f3366c541a277dd8f95ea3f84dcbcb) @@ -303,7 +303,7 @@ - Index: lams_central/web/includes/javascript/authoring/authoringActivity.js =================================================================== diff -u -r59a40ee1efb40ed1f0859adaedaaf2cdb372fcf3 -r537eea81a1f3366c541a277dd8f95ea3f84dcbcb --- lams_central/web/includes/javascript/authoring/authoringActivity.js (.../authoringActivity.js) (revision 59a40ee1efb40ed1f0859adaedaaf2cdb372fcf3) +++ lams_central/web/includes/javascript/authoring/authoringActivity.js (.../authoringActivity.js) (revision 537eea81a1f3366c541a277dd8f95ea3f84dcbcb) @@ -1408,10 +1408,16 @@ PropertyLib.validateConditionMappings(activity); }, 'open' : function() { + var dialog = $(this); // load contents after opening the dialog - $('iframe', this).attr('src', activity.authorURL).load(function(){ + $('iframe', dialog).attr('id','iframeForActivity').attr('src', activity.authorURL).load(function(){ // override the close function so it works with the dialog, not window - this.contentWindow.closeWindow = ActivityLib.closeActivityAuthoring; + this.contentWindow.closeWindow = function(){ + // detach the 'beforeClose' handler above, attach the standard one and close the dialog + dialog.off('hide.bs.modal').on('hide.bs.modal', function(){ + $('iframe', this).attr('src', null); + }).modal('hide'); + } }); } }, true); Index: lams_central/web/includes/javascript/authoring/authoringMenu.js =================================================================== diff -u -r57304bcaf26cbc87e4007de4bad27e4d13599d00 -r537eea81a1f3366c541a277dd8f95ea3f84dcbcb --- lams_central/web/includes/javascript/authoring/authoringMenu.js (.../authoringMenu.js) (revision 57304bcaf26cbc87e4007de4bad27e4d13599d00) +++ lams_central/web/includes/javascript/authoring/authoringMenu.js (.../authoringMenu.js) (revision 537eea81a1f3366c541a277dd8f95ea3f84dcbcb) @@ -714,7 +714,7 @@ 'open' : function() { var dialog = $(this); // load contents after opening the dialog - $('iframe', dialog).attr('src', LAMS_URL + '/authoring/template/list.jsp').load(function(){ + $('iframe', dialog).attr('id','templateModal').attr('src', LAMS_URL + '/authoring/template/list.jsp').load(function(){ // override the close function so it works with the dialog, not window this.contentWindow.closeWindow = function(){ // detach the 'beforeClose' handler above, attach the standard one and close the dialog