Index: lams_central/web/includes/javascript/comments.js =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/includes/javascript/comments.js,v diff -u -r1.3 -r1.4 --- lams_central/web/includes/javascript/comments.js 5 Jan 2016 05:43:46 -0000 1.3 +++ lams_central/web/includes/javascript/comments.js 18 Jan 2016 02:18:33 -0000 1.4 @@ -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); } }