Index: lams_central/web/authoring/authoring.jsp =================================================================== diff -u -rdabd958941323b9081374acf913ed1accc6638ef -r1fd9b1e192318928a8507b7693d661147a3fea07 --- lams_central/web/authoring/authoring.jsp (.../authoring.jsp) (revision dabd958941323b9081374acf913ed1accc6638ef) +++ lams_central/web/authoring/authoring.jsp (.../authoring.jsp) (revision 1fd9b1e192318928a8507b7693d661147a3fea07) @@ -296,7 +296,7 @@
-
+
Index: lams_central/web/includes/javascript/authoring/authoringGeneral.js =================================================================== diff -u -r96b4477ba27be6b678e5b4e8e9f4303b3e1ad690 -r1fd9b1e192318928a8507b7693d661147a3fea07 --- lams_central/web/includes/javascript/authoring/authoringGeneral.js (.../authoringGeneral.js) (revision 96b4477ba27be6b678e5b4e8e9f4303b3e1ad690) +++ lams_central/web/includes/javascript/authoring/authoringGeneral.js (.../authoringGeneral.js) (revision 1fd9b1e192318928a8507b7693d661147a3fea07) @@ -17,7 +17,7 @@ MenuLib.init(); } - GeneralLib.newLearningDesign(true, true); + GeneralLib.newLearningDesign(true); if (!isReadOnlyMode) { layout.ld.contentFolderID = initContentFolderID; } @@ -1379,7 +1379,7 @@ /** * Removes existing activities and prepares canvas for a new sequence. */ - newLearningDesign : function(force, soft){ + newLearningDesign : function(force){ // force means that user should not be asked for confirmation. if (!force && (layout.activities.length > 0 || layout.regions.length > 0 @@ -1391,8 +1391,7 @@ $('#ldDescriptionDetails').slideUp(); - // soft means that data is manually reset, instead of simply reloading the page. - if (soft) { + if (force) { layout.ld = { 'maxUIID' : 0, 'designType' : null @@ -1402,19 +1401,6 @@ layout.labels = []; layout.floatingActivity = null; - if (!isReadOnlyMode) { - $('#ldDescriptionFieldTitle').text('Untitled'); - var editor = CKEDITOR.instances['ldDescriptionFieldDescription']; - editor.once('dataReady', function(){ - // do nothing - // this listener is just for saveLearningDesign() to detect that data was already cleared - }); - editor.setData(null); - $('#ldDescriptionLicenseSelect').val(0); - $('#ldDescriptionLicenseText').text(''); - GeneralLib.setModified(true); - } - if (paper) { paper.clear(); } else { @@ -1464,7 +1450,7 @@ var ld = response.ld; // remove existing activities - GeneralLib.newLearningDesign(true, true); + GeneralLib.newLearningDesign(true); layout.ld = { 'learningDesignID' : ld.learningDesignID, 'folderID' : ld.workspaceFolderID, @@ -1476,21 +1462,9 @@ if (!isReadOnlyMode) { $('#ldDescriptionFieldTitle').html(GeneralLib.escapeHtml(ld.title)); - var editor = CKEDITOR.instances['ldDescriptionFieldDescription']; - if (editor.hasListeners('dataReady')) { - // data was not cleared yet by newLearningDesign, so queue the current change - editor.once('dataReady', function(eventInfo){ - editor.setData(ld.description); - }); - } else { - // data was already cleared, so just set the description - editor.setData(ld.description); - } - - if (ld.licenseID) { - $('#ldDescriptionLicenseSelect').val(ld.licenseID || 0).change(); - $('#ldDescriptionLicenseText').text(ld.licenseText); - } + CKEDITOR.instances['ldDescriptionFieldDescription'].setData(ld.description); + $('#ldDescriptionLicenseSelect').val(ld.licenseID || 0).change(); + $('#ldDescriptionLicenseText').text(ld.licenseText || null); } var arrangeNeeded = false,