Bug 46153

Summary: Add Preview button to patch review bar
Product: WebKit Reporter: Darin Adler <darin>
Component: New BugsAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dbates
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Attachments:
Description Flags
Patch abarth: review+, abarth: commit-queue-

Darin Adler
Reported 2010-09-20 18:23:35 PDT
Add Preview button and link to bug to patch review bar
Attachments
Patch (3.05 KB, patch)
2010-09-20 18:28 PDT, Darin Adler
abarth: review+
abarth: commit-queue-
Darin Adler
Comment 1 2010-09-20 18:28:01 PDT
Adam Barth
Comment 2 2010-09-20 23:27:37 PDT
Comment on attachment 68169 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=68169&action=review > BugsSite/code-review.js:257 > + $(document.body).prepend('<div id="toolbar"><div class="actions"><button id="preview_comments">Preview</button><button id="post_comments">Publish</button></div><div class="message"><a href="show_bug.cgi?id=' + bug_id + '" target="_blank">bug ' + bug_id + '</a> <span class="commentStatus"></span> <span class="help">Double-click a line or click or drag on line numbers to add a comment.</span></div></div>'); Thanks for writing this patch. This should work great. The only problem is that bug_id won't necessarily be defined when this code runs. This code runs on DOMContentLoaded, but we fetch the bug_id asynchronously by loading the details page for the attachment. I'll land a modified version of this patch with just the preview button.
Adam Barth
Comment 3 2010-09-20 23:45:14 PDT
Darin Adler
Comment 4 2010-09-21 09:39:18 PDT
(In reply to comment #2) > The only problem is that bug_id won't necessarily be defined when this code runs. This code runs on DOMContentLoaded, but we fetch the bug_id asynchronously by loading the details page for the attachment. I'll land a modified version of this patch with just the preview button. Can you help me create a version of this that adds the bug link when the details page loading is complete?
Note You need to log in before you can comment on or make changes to this bug.