[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

abarth at webkit.org abarth at webkit.org
Wed Dec 22 13:02:56 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 7b50128d7a0fa44f3138abe67f3d2249ed9926ee
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Sep 6 12:59:46 2010 +0000

    2010-09-06  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Eric Seidel.
    
            [reviewtool] Add an "ok" button that collapses review comments
            https://bugs.webkit.org/show_bug.cgi?id=45255
    
            Many folks (including myself) are too trigger-happy with the "delete"
            button that we end up deleting perfectly good review comments.  This
            patch adds an "ok" button to absorb these clicks (and renames "delete"
            to "cancel").  When you click the ok button, the comment becomes
            non-editable and the box shrinks to fit the text.  You can click the
            text to get back to the editable version.
    
            * code-review.js:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66821 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/BugsSite/ChangeLog b/BugsSite/ChangeLog
index b5a0db8..a7d5323 100644
--- a/BugsSite/ChangeLog
+++ b/BugsSite/ChangeLog
@@ -1,3 +1,19 @@
+2010-09-06  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Eric Seidel.
+
+        [reviewtool] Add an "ok" button that collapses review comments
+        https://bugs.webkit.org/show_bug.cgi?id=45255
+
+        Many folks (including myself) are too trigger-happy with the "delete"
+        button that we end up deleting perfectly good review comments.  This
+        patch adds an "ok" button to absorb these clicks (and renames "delete"
+        to "cancel").  When you click the ok button, the comment becomes
+        non-editable and the box shrinks to fit the text.  You can click the
+        text to get back to the editable version.
+
+        * code-review.js:
+
 2010-08-31  Adam Barth  <abarth at webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/BugsSite/code-review.js b/BugsSite/code-review.js
index 4713e5e..d0a8ca5 100644
--- a/BugsSite/code-review.js
+++ b/BugsSite/code-review.js
@@ -67,7 +67,7 @@
     line.attr('data-has-comment', 'true');
     line.addClass('commentContext');
 
-    var comment_block = $('<div class="comment"><textarea data-comment-for="' + line.attr('id') + '"></textarea><div class="actions"><button class="delete">Delete</button></div></div>');
+    var comment_block = $('<div class="comment"><textarea data-comment-for="' + line.attr('id') + '"></textarea><div class="actions"><button class="ok">Ok</button><button class="cancel">Cancel</button></div></div>');
     insertCommentFor(line, comment_block);
     comment_block.children('textarea').focus();
   }
@@ -184,7 +184,7 @@
     $(document.body).prepend('<div id="comment_form" class="inactive"><div class="winter"></div><div class="lightbox"><iframe src="attachment.cgi?id=' + attachment_id + '&action=reviewform"></iframe></div></div>');
   });
 
-  $('.comment .delete').live('click', function() {
+  $('.comment .cancel').live('click', function() {
     var line_id = $(this).parentsUntil('.comment').parent().find('textarea').attr('data-comment-for');
     var line = $('#' + line_id)
     findCommentBlockFor(line).remove();
@@ -192,6 +192,18 @@
     trimCommentContextToBefore(line);
   });
 
+  $('.comment .ok').live('click', function() {
+    var comment_textarea = $(this).parentsUntil('.comment').parent().find('textarea');
+    var line_id = comment_textarea.attr('data-comment-for');
+    var line = $('#' + line_id)
+    findCommentBlockFor(line).hide().after($('<div class="frozen-comment"></div>').text(comment_textarea.val()));
+  });
+
+  $('.frozen-comment').live('click', function() {
+    $(this).prev().show();
+    $(this).remove();
+  });
+
   function focusOn(comment) {
     $('.focused').removeClass('focused');
     if (comment.length == 0)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list