Closed
Bug 251469
Opened 20 years ago
Closed 20 years ago
Add an interface argument in header template to import <script src files
Categories
(Bugzilla :: Bugzilla-General, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.20
People
(Reporter: timello, Assigned: timello)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
1.09 KB,
patch
|
timeless
:
review+
|
Details | Diff | Splinter Review |
1.58 KB,
patch
|
justdave
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a2) Gecko/20040612 Firefox/0.8.0+ Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a2) Gecko/20040612 Firefox/0.8.0+ Currently, javascript just is passing using a string in header template. Maybe should be possible import a script source. Reproducible: Always Steps to Reproduce: 1. 2. 3. Expected Results: diff -u -u -r1.24 header.html.tmpl --- header.html.tmpl 17 Mar 2004 22:50:20 -0000 1.24 +++ header.html.tmpl 14 Jul 2004 22:49:32 -0000 @@ -30,6 +30,7 @@ # bodyattrs: any extra attributes for the <body> tag # onload: string. JavaScript code to run when the page finishes loading. # javascript: string. Javascript to go in the header. + # javascript_urls: list. List of URLs to Javascript # style: string. CSS style. # style_urls: list. List of URLs to CSS style sheets. # message: string. A message to display to the user. May contain HTML. @@ -70,6 +71,12 @@ [% javascript %] </script> [% END %] + + [% IF javascript_urls %] + [% FOREACH javascript_url = javascript_urls %] + <script src="[% javascript_url %]" type="text/javascript" language="JavaScript"></script> + [% END %] + [% END %] [%+ INCLUDE "global/help-header.html.tmpl" %]
Comment 1•20 years ago
|
||
Err, Tiago, could you package this as a patch and attach it? Myk, should we also clean up the callsites that import JS files to use this?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 2•20 years ago
|
||
Sorry, here it is!
Comment 3•20 years ago
|
||
Reassigning to patch author. Looks simple enough.
Assignee: justdave → tiago
Comment on attachment 153321 [details] [diff] [review] Patch for header template >@@ -70,6 +71,12 @@ >+ [% IF javascript_urls %] i don't think the if is needed (foreach should do the right thing tm), but this is in the style of, so i'll leave that for someone else to fix.
Attachment #153321 -
Flags: review+
Comment 5•20 years ago
|
||
Trivial, harmless and works. Why not help customizers out?
Status: NEW → ASSIGNED
Flags: approval?
Flags: approval2.18?
Updated•20 years ago
|
Flags: approval?
Flags: approval2.18?
Flags: approval2.18-
Flags: approval+
Target Milestone: --- → Bugzilla 2.20
Updated•20 years ago
|
Summary: Add an interface element in header template for import script source → Add an interface argument in header template to import <script src files
Comment 6•20 years ago
|
||
Needed some filtering, and fixed style_url while I was at it.
Updated•20 years ago
|
Attachment #153350 -
Flags: review+
Comment 7•20 years ago
|
||
Checked in both patch and bustage fix. Sorry for bustage, but thanks to Tiago for his first patch checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
QA Contact: matty_is_a_geek → default-qa
You need to log in
before you can comment on or make changes to this bug.
Description
•