Edgewall Software

Ticket #2778 (closed defect: worksforme)

Opened 3 years ago

Last modified 3 years ago

site_javascript.cs

Reported by: Pedro Algarvio <ufs@…> Owned by: jonas
Priority: normal Milestone:
Component: general Version: 0.9.4
Severity: normal Keywords:
Cc:

Description

Following the same path of site_css.cs, site_header.cs and site_footer.cs, add site_javascript.cs so we can include our own javascript into trac.

Or is there currently a way I can include my javascript inside the <Head></Head> tags, besides messing trac's code?

Attachments

Change History

Changed 3 years ago by Pedro Algarvio <ufs@…>

Probably something like this:

  • /usr/share/trac/templates/

    old new  
    2121 /each ?><style type="text/css"><?cs include:"site_css.cs" ?></style> 
    2222 <script type="text/javascript" src="<?cs 
    2323   var:htdocs_location ?>js/trac.js"></script> 
     24 <?cs include "site_javascript.cs" ?> 
    2425</head> 
    2526<body> 
    2627<?cs include "site_header.cs" ?> 

Changed 3 years ago by matthew.donald@…

This is a very useful idea. Any chance of getting it into 0.9.5?

Changed 3 years ago by Pedro Algarvio <ufs@…>

heh, I feel no more need for this, sorry, I found out I can include <script></script> tags anywhere...

Changed 3 years ago by mgood

  • status changed from new to closed
  • resolution set to worksforme

Yes, the <script> tags can be included in site_header.cs, so there's no need for another template.

Add/Change #2778 (site_javascript.cs)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from jonas. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.