From 277e785d956d496c06339a7632b77c2dd9e5ed56 Mon Sep 17 00:00:00 2001 From: Dongsheng Cai Date: Fri, 22 Jan 2010 07:40:41 +0000 Subject: [PATCH] "MDL-21170, fixed deleting comments" --- comment/comment.js | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/comment/comment.js b/comment/comment.js index a3302b7fe02..ecbd7c5555d 100644 --- a/comment/comment.js +++ b/comment/comment.js @@ -99,7 +99,7 @@ M.core_comment = (function(){ anim.animate(); } }, - request: function(args, redraw) { + request: function(args, noloading) { var params = {}; var scope = this; if (args['scope']) { @@ -145,7 +145,7 @@ M.core_comment = (function(){ cfg.form = args.form; } Y.io(this.api, cfg); - if (!redraw) { + if (!noloading) { this.wait(); } }, @@ -221,25 +221,7 @@ M.core_comment = (function(){ anim.onComplete.subscribe(remove_dom, cmt, this); anim.animate(); } - }); - this.cb = { - success: function(o) { - var resp = json_decode(o.responseText); - if (!comment_check_response(resp)) { - return; - } - var htmlid= 'comment-'+resp.commentid+'-'+resp.client_id; - this.el = document.getElementById(htmlid); - this.el.style.overflow = 'hidden'; - var attributes = { - width:{to:0}, - height:{to:0} - }; - var anim = new YAHOO.util.Anim(htmlid, attributes, 1, YAHOO.util.Easing.easeOut); - anim.onComplete.subscribe(this.remove_dom, [], this); - anim.animate(); - }, - } + }, true); }, register_delete_buttons: function() { var scope = this;