Index: lams_central/conf/language/lams/ApplicationResources.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_central/conf/language/lams/ApplicationResources.properties,v
diff -u -r1.138.2.30 -r1.138.2.31
--- lams_central/conf/language/lams/ApplicationResources.properties 28 Oct 2016 02:49:07 -0000 1.138.2.30
+++ lams_central/conf/language/lams/ApplicationResources.properties 1 Nov 2016 03:27:31 -0000 1.138.2.31
@@ -701,4 +701,6 @@
label.password.must.symbol =at least 1 symbol
label.email.send.me.a.copy=Send me a copy
+
+error.cannot.load.thumbnail=Unable to load sequence thumbnail.
#======= End labels: Exported 439 labels for en AU =====
Index: lams_central/conf/language/lams/ApplicationResources_en_AU.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_central/conf/language/lams/ApplicationResources_en_AU.properties,v
diff -u -r1.111.2.15 -r1.111.2.16
--- lams_central/conf/language/lams/ApplicationResources_en_AU.properties 28 Oct 2016 02:49:07 -0000 1.111.2.15
+++ lams_central/conf/language/lams/ApplicationResources_en_AU.properties 1 Nov 2016 03:27:31 -0000 1.111.2.16
@@ -700,4 +700,5 @@
label.password.must.symbol =at least 1 symbol
label.email.send.me.a.copy=Send me a copy
+error.cannot.load.thumbnail=Unable to load sequence thumbnail.
#======= End labels: Exported 439 labels for en AU =====
Index: lams_central/web/addLesson.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_central/web/addLesson.jsp,v
diff -u -r1.16.2.13 -r1.16.2.14
--- lams_central/web/addLesson.jsp 23 Oct 2016 15:00:29 -0000 1.16.2.13
+++ lams_central/web/addLesson.jsp 1 Nov 2016 03:27:14 -0000 1.16.2.14
@@ -89,6 +89,7 @@
+
Index: lams_central/web/includes/javascript/addLesson.js
===================================================================
RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/addLesson.js,v
diff -u -r1.7.2.6 -r1.7.2.7
--- lams_central/web/includes/javascript/addLesson.js 24 Oct 2016 14:55:28 -0000 1.7.2.6
+++ lams_central/web/includes/javascript/addLesson.js 1 Nov 2016 03:26:49 -0000 1.7.2.7
@@ -2,6 +2,7 @@
var tree,
lastSelectedUsers = {},
sortOrderAscending = {},
+ generatingLearningDesign = false;
submitInProgress = false;
@@ -17,6 +18,7 @@
*/
function initLessonTab(){
$('#ldScreenshotAuthor').load(function(){
+ generatingLearningDesign = false;
// hide "loading" animation
$('.ldChoiceDependentCanvasElement').css('display', 'none');
// show the thumbnail
@@ -25,23 +27,32 @@
var resized = resizeImage('ldScreenshotAuthor', 477);
toggleCanvasResize(resized ? CANVAS_RESIZE_OPTION_FIT
: CANVAS_RESIZE_OPTION_NONE);
- }).error(function(){
+ }).error(function(event){
+
// the LD SVG is missing, try to re-generate it
- var image = $(this),
- learningDesignID = $(this).data('learningDesignID');
-
- // iframe just to load Authoring for a single purpose, generate the SVG
- $('').appendTo('body').load(function(){
- // call svgGenerator.jsp code to store LD SVG on the server
- var frame = $(this),
- win = frame[0].contentWindow || frame[0].contentDocument;
- win.GeneralLib.saveLearningDesignImage();
- frame.remove();
- // load the image again, avoid caching
- image.attr('src', LD_THUMBNAIL_URL_BASE + learningDesignID + '&_t=' + new Date().getTime());
- }).attr('src', LAMS_URL
- + 'authoring/author.do?method=generateSVG&selectable=false&learningDesignID='
- + learningDesignID);
+ // check first though that we haven't tried already to do that!
+ if ( generatingLearningDesign ) {
+ generatingLearningDesign = false;
+ $('.ldChoiceDependentCanvasElement').css('display', 'none');
+ $('#ldCannotLoadSVG').css('display', 'inline');
+ } else {
+ var image = $(this),
+ learningDesignID = $(this).data('learningDesignID');
+
+ // iframe just to load Authoring for a single purpose, generate the SVG
+ $('').appendTo('body').load(function(){
+ // call svgGenerator.jsp code to store LD SVG on the server
+ generatingLearningDesign = true;
+ var frame = $(this),
+ win = frame[0].contentWindow || frame[0].contentDocument;
+ win.GeneralLib.saveLearningDesignImage();
+ frame.remove();
+ // load the image again, avoid caching
+ image.attr('src', LD_THUMBNAIL_URL_BASE + learningDesignID + '&_t=' + new Date().getTime());
+ }).attr('src', LAMS_URL
+ + 'authoring/author.do?method=generateSVG&selectable=false&learningDesignID='
+ + learningDesignID);
+ }
});
// generate LD initial tree; folderContents is declared in newLesson.jsp