diff -r f7fb42d3f526 -r 614669e0e313 src/cm/media/js/client/c_icomments.js --- a/src/cm/media/js/client/c_icomments.js Mon Nov 22 14:58:38 2010 +0100 +++ b/src/cm/media/js/client/c_icomments.js Mon Nov 29 12:07:44 2010 +0100 @@ -172,7 +172,7 @@ } }, - setAnimationToPositionsAndFocus : function (y, focusCommentId) { + setAnimationToPositionsAndFocus : function (y, focusCommentId, reply) { this._initAnimations(); var lpad = (gPrefs.get('comments','threadpad') == '1') ? gConf['iCommentThreadPadding'] : 0 ; @@ -189,7 +189,7 @@ } if (iComment.commentId >= focusCommentId) - this._a.push(iComment.setAnimationToPosition([iCommentX, nextY], focusCommentId)) ; + this._a.push(iComment.setAnimationToPosition([iCommentX, nextY], focusCommentId, reply)) ; else this._a.push(iComment.setAnimationToPosition([iCommentX, nextY])) ; nextY += iComment.getHeight() ; @@ -225,6 +225,18 @@ gSync.resume(); }, + whenAnimationsEndReply : function () { + gGETValues = CY.JSON.parse(sv_get_params); + if ("comment_id_key" in gGETValues) { + var id_key = gGETValues["comment_id_key"]; + var focusComment = gDb.getCommentByIdKey(id_key); + if (focusComment != null) { + gSync.showReplyForm(gIComments.getIComment(focusComment.id)); + } + } + gSync.resume(); + }, + animationsEnded : function () { return ((this._a.length == 0) || (this._a.length == this._nbEndedAnim)) ; },