Title: [174774] trunk/Websites/bugs.webkit.org
- Revision
- 174774
- Author
- [email protected]
- Date
- 2014-10-16 09:01:22 -0700 (Thu, 16 Oct 2014)
Log Message
Fix "View Diff" buttons on edit attachment page
* js/attachment.js:
(viewPrettyPatch): Change code syntax from Perl to _javascript_.
When I moved this method from
template/en/custom/attachment/edit.html.tmpl into
js/attachment.js during the Bugzilla 4.2.1 merge, I wrote some
of the code using Perl syntax.
* template/en/custom/attachment/edit.html.tmpl:
- Fix 120-column truncation of code. (That's what you get for
copying and pasting code from 'git diff' in a terminal
window.)
- Pass attachment_id into the viewPrettyPatch() method since
the method expects it.
Modified Paths
Diff
Modified: trunk/Websites/bugs.webkit.org/js/attachment.js (174773 => 174774)
--- trunk/Websites/bugs.webkit.org/js/attachment.js 2014-10-16 16:01:21 UTC (rev 174773)
+++ trunk/Websites/bugs.webkit.org/js/attachment.js 2014-10-16 16:01:22 UTC (rev 174774)
@@ -265,7 +265,7 @@
function viewPrettyPatch(attachment_id)
{
viewing_formatted_diff = !viewing_formatted_diff;
- var src = "" . $attachment_id;
+ var src = "" + attachment_id;
var buttonText = "View Formatted Diff";
if (viewing_formatted_diff) {
src += "&action=""
Modified: trunk/Websites/bugs.webkit.org/template/en/custom/attachment/edit.html.tmpl (174773 => 174774)
--- trunk/Websites/bugs.webkit.org/template/en/custom/attachment/edit.html.tmpl 2014-10-16 16:01:21 UTC (rev 174773)
+++ trunk/Websites/bugs.webkit.org/template/en/custom/attachment/edit.html.tmpl 2014-10-16 16:01:22 UTC (rev 174774)
@@ -225,7 +225,7 @@
[% IF user.id %]
[%# if WEBKIT_CHANGES %]
[% IF attachment.ispatch %]
- document.write('<button type="button" id="viewPrettyPatchButton" _onclick_="viewPrettyPatch();">View Formatt
+ document.write('<button type="button" id="viewPrettyPatchButton" _onclick_="viewPrettyPatch(attachment_id);">View Formatted Diff<\/button>');
[% END %]
[%# endif // WEBKIT_CHANGES %]
document.write('<button type="button" id="editButton" _onclick_="editAsComment(patchviewerinstalled);">Edit Attachment As Comment<\/button>');
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes