Merge branch 'wip-mdl-30375' of git://github.com/rajeshtaneja/moodle
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 23 Nov 2011 12:28:24 +0000 (13:28 +0100)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Wed, 23 Nov 2011 12:28:24 +0000 (13:28 +0100)
blocks/comments/block_comments.php
comment/comment.js

index 60bca8d..a00cd09 100644 (file)
@@ -74,7 +74,7 @@ class block_comments extends block_base {
         $args->linktext  = get_string('showcomments');
         $args->notoggle  = true;
         $args->autostart = true;
-        $args->displaycancel = true;
+        $args->displaycancel = false;
         $comment = new comment($args);
         $comment->set_view_permission(true);
 
index 87f0e9e..dcf669e 100644 (file)
@@ -58,6 +58,7 @@ M.core_comment = {
                         return false;
                     }, this);
                 }
+                scope.toggle_textarea(false);
                 CommentHelper.confirmoverlay = new Y.Overlay({
 bodyContent: '<div class="comment-delete-confirm"><a href="#" id="confirmdelete-'+this.client_id+'">'+M.str.moodle.yes+'</a> <a href="#" id="canceldelete-'+this.client_id+'">'+M.str.moodle.no+'</a></div>',
                                         visible: false
@@ -79,6 +80,7 @@ bodyContent: '<div class="comment-delete-confirm"><a href="#" id="confirmdelete-
                             var cid = scope.client_id;
                             var ta = Y.one('#dlg-content-'+cid);
                             ta.set('value', '');
+                            scope.toggle_textarea(false);
                             var container = Y.one('#comment-list-'+cid);
                             var result = scope.render([obj], true);
                             var newcomment = Y.Node.create(result.html);