Index: lams_central/web/includes/javascript/comments.js =================================================================== diff -u -rd3c9d3f03c16e8f7025d7b2bfe84e68af4fc0746 -r5297fc67fa56d2984dfa874443ebcf7ddc6a0ca8 --- lams_central/web/includes/javascript/comments.js (.../comments.js) (revision d3c9d3f03c16e8f7025d7b2bfe84e68af4fc0746) +++ lams_central/web/includes/javascript/comments.js (.../comments.js) (revision 5297fc67fa56d2984dfa874443ebcf7ddc6a0ca8) @@ -1,7 +1,3 @@ - function resizeIframe() { - parent.resizeCommentFrame(document.body.scrollHeight); - } - function highlightMessage() { $('.highlight').filter($('table')).css('background','none'); $('.highlight').filter($('div')).effect('highlight', {color: "#fcf0ad"}, 6000); @@ -18,16 +14,17 @@ } } - function reloadThread(response) { + + function reloadThread(response, lamsUrl, savedCannotRedisplayMessage, errorCannotRedisplayMessage) { var threadDiv = document.getElementById('thread'+response.threadUid); var threadUid = response.threadUid; var commentUid = response.commentUid; if ( commentUid ) { if ( ! threadDiv) { - alert(''); + alert(savedCannotRedisplayMessage); } else { - var loadString = "viewTopicThread.do?&sessionMapID=" + response.sessionMapID + "&threadUid=" + threadUid+"&commentUid="+commentUid; + var loadString = lamsUrl+"comments/viewTopicThread.do?&sessionMapID=" + response.sessionMapID + "&threadUid=" + threadUid+"&commentUid="+commentUid; $(threadDiv).load(loadString, function() { // expand up to the reply - in case it is buried down in a lot of replies // don't need to do this if we have started a new thread. @@ -36,13 +33,12 @@ $('#msg'+commentUid).focus(); } highlightMessage(); - resizeIframe(); }); } } else if ( response.errMessage ) { // No valid id? Something failed. Assume it is a response message coming back. alert(response.errMessage); } else { - alert(''); + alert(errorCannotRedisplayMessage); } }