Move JS code out of attachment/diff-header.html.tmpl

RESOLVED FIXED in Bugzilla 3.4

Status

()

Bugzilla
Attachments & Requests
--
enhancement
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: Frédéric Buclin, Assigned: Frédéric Buclin)

Tracking

(Blocks: 1 bug)

Bugzilla 3.4
Bug Flags:
approval +

Details

Attachments

(1 attachment)

(Assignee)

Description

9 years ago
The JS code into diff-header.html.tmpl doesn't need to be generated on the fly, depending on the data passed to the template, so we can move it into js/attachment.js.
(Assignee)

Updated

9 years ago
Whiteboard: [Good Intro Bug]
(Assignee)

Comment 1

9 years ago
Created attachment 343906 [details] [diff] [review]
patch, v1
Assignee: attach-and-request → LpSolit
Status: NEW → ASSIGNED
Attachment #343906 - Flags: review?(wicked)
Attachment #343906 - Flags: review?(wicked) → review+
Comment on attachment 343906 [details] [diff] [review]
patch, v1

>Index: template/en/default/attachment/diff-header.html.tmpl
>===================================================================

This file certainly has many validation failures, especially in non-header mode that doesn't even have a DOCTYPE declaration. Header mode has script blocks within tbody tags, which is not allowed. These are not new for this patch so this is only a note keeping bug 273847 in mind.

>-  [% javascript %]

This removal caused a test warning:

t/008filter..........NOK 126#   Failed test '(en/default) template/en/default/attachment/diff-header.html.tmpl - filterexceptions.pl has extra members:
#   javascript

Remove that line and this patch is good to go.
Flags: approval?
(Assignee)

Comment 3

9 years ago
(In reply to comment #2)
> This removal caused a test warning:

Ah yes, you're right. I removed it on checkin. Thanks!

Checking in js/attachment.js;
/cvsroot/mozilla/webtools/bugzilla/js/attachment.js,v  <--  attachment.js
new revision: 1.4; previous revision: 1.3
done
Checking in template/en/default/filterexceptions.pl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/filterexceptions.pl,v  <--filterexceptions.pl
new revision: 1.118; previous revision: 1.117
done
Checking in template/en/default/attachment/diff-header.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/attachment/diff-header.html.tmpl,v  <--  diff-header.html.tmpl
new revision: 1.21; previous revision: 1.20
done
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Flags: approval? → approval+
Resolution: --- → FIXED
Whiteboard: [Good Intro Bug]
Target Milestone: --- → Bugzilla 3.4
You need to log in before you can comment on or make changes to this bug.