Index: lams_central/web/includes/javascript/addLesson.js =================================================================== diff -u -rd1264becfcd788cf653fa077ef6ab90023a149fd -r7f5de60cba2fa6ed056786c5461af6e29518723f --- lams_central/web/includes/javascript/addLesson.js (.../addLesson.js) (revision d1264becfcd788cf653fa077ef6ab90023a149fd) +++ lams_central/web/includes/javascript/addLesson.js (.../addLesson.js) (revision 7f5de60cba2fa6ed056786c5461af6e29518723f) @@ -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'); } });