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.11 -r1.7.2.12 --- lams_central/web/includes/javascript/addLesson.js 30 Nov 2016 22:18:29 -0000 1.7.2.11 +++ lams_central/web/includes/javascript/addLesson.js 3 Dec 2016 09:41:13 -0000 1.7.2.12 @@ -316,15 +316,15 @@ function previewLesson(){ var ldNode = tree.getHighlightedNode(), - popupWidth = 1280, - popupHeight = 720; + popupWidth = 1280, + popupHeight = 720; if (!ldNode || !ldNode.data.learningDesignId) { $('#ldNotChosenError').show(); doSelectTab(1); return; } - $('body').css('cursor', 'wait'); + var previewButton = $('#previewButton').button('loading'); // initialize, create and enter the preview lesson $.ajax({ url : LAMS_URL + 'monitoring/monitoring.do', @@ -339,7 +339,7 @@ success : function(lessonID) { if (!lessonID) { alert(LABELS.PREVIEW_ERROR); - $('body').css('cursor', 'auto'); + previewButton.button('reset'); return; } @@ -352,10 +352,10 @@ cache : false, dataType : 'text', success : function() { - $('body').css('cursor', 'auto'); // open preview pop up window window.open(LAMS_URL + 'home.do?method=learner&mode=preview&lessonID='+lessonID,'Preview', 'width=' + popupWidth + ',height=' + popupHeight + ',resizable,status=yes'); + previewButton.button('reset'); } });