Index: lams_central/web/authoring/authoring.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/authoring/authoring.jsp,v diff -u -r1.6.2.23 -r1.6.2.24 --- lams_central/web/authoring/authoring.jsp 6 Apr 2016 20:33:03 -0000 1.6.2.23 +++ lams_central/web/authoring/authoring.jsp 8 Apr 2016 08:09:55 -0000 1.6.2.24 @@ -475,7 +475,7 @@
- +
Index: lams_central/web/includes/javascript/authoring/authoringGeneral.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/authoring/authoringGeneral.js,v diff -u -r1.51.2.33 -r1.51.2.34 --- lams_central/web/includes/javascript/authoring/authoringGeneral.js 6 Apr 2016 20:33:03 -0000 1.51.2.33 +++ lams_central/web/includes/javascript/authoring/authoringGeneral.js 8 Apr 2016 08:09:55 -0000 1.51.2.34 @@ -909,14 +909,6 @@ }); layout.dialogs.push(layout.ldStoreDialog); - - - $('#ldScreenshotAuthor', layout.ldStoreDialog).load(function(){ - // hide "loading" animation - $('.ldChoiceDependentCanvasElement', layout.ldStoreDialog).hide(); - // show the thumbnail - $(this).show(); - }); $('#ldStoreDialogImportPartFrame').load(function() { if (!$(this).attr('src')){ @@ -1012,6 +1004,7 @@ } }); } + }, @@ -2746,13 +2739,37 @@ + learningDesignID + '&_=' + new Date().getTime()); } else { $('#ldScreenshotLoading', layout.ldStoreDialog).show(); - // get the image of the chosen LD and prevent caching - $('#ldScreenshotAuthor', layout.ldStoreDialog) - .attr('src', LD_THUMBNAIL_URL_BASE + learningDesignID + '&_=' + new Date().getTime()) - .css({ - 'width' : 'auto', - 'height' : 'auto' - }); + + // load the thumbnail + $.ajax({ + dataType : 'text', + url : LD_THUMBNAIL_URL_BASE + learningDesignID, + cache : false, + success : function(response) { + // hide "loading" animation + $('.ldChoiceDependentCanvasElement', layout.ldStoreDialog).hide(); + // show the thumbnail + $('#ldScreenshotAuthor', layout.ldStoreDialog).html(response).show(); + }, + error : function(error) { + // the LD SVG is missing, try to re-generate it; if it is an another error, fail + if (error.status != 404) { + return; + } + // iframe just to load another instance of Authoring for a single purpose, generate the SVG + $('