/
CSS and JavaScript

CSS and JavaScript

If you want to reuse customized stylesheets and javascript files in several templates this is only doable by a dirty hack.

The hack

Create a new template. Do not add it to any to any Template Type Context and no need to enable it.

Specify whatever css or javascript you want to include in the file.

 

## Obtain the template manager
#set($templateManager = $timeTrackingComponentManager.getTemplateManager())
#set($templateCss = $templateManager.getTemplateByKey("mycsstemplate_template"))
 
<style type="text/css">
	$!templateCss.getVelocityFileObject().getContentAsString()
</style>
 

 

You can do the same with JavaScript.

Or if you only need css or script in one template file, just add it directly to the velocity template file.

Related content

Configuration
Configuration
More like this
JQL Functions
JQL Functions
More like this
Concepts
More like this
Custom Fields
Custom Fields
More like this
Schedules
More like this
Statuses
More like this