javascript


In der deutschen Jira-Version wird das Datumsformat unter Administration – Globale Einstellungen Gestaltung eingestellt.
Hier ist ein Beispiel:

Datums-/Zeitformate
                            Format   Beispiel
  Zeitformat           HH:mm   22:28
  Datumsformat   EEEE HH:mm   Freitag 22:28
  Vollständiges Datums-/Zeitformat   dd. MMM yyyy HH:mm   21. Nov 2008 22:28
  Format Tag/Monat/Jahr   dd. MMM yyyy   21. Nov 2008
  Format Datumsauswahl (Format javascript)   dd. MMM yyyy (%e. %b %Y)   21. Nov 2008
  Format Datums-/Zeitauswahl (Format javascript)   dd. MMM yyyy HH:mm (%e. %b %Y %H:%M)   21. Nov 2008 22:28

Dabei muss man das Format für die Auswahl in Formularfeldern per JavaScript in einer externen Konfigurationsdatei einstellen:
WEB-INF/classes/jira-application.properties

Ein Beispiel:

# These two properties need to match for the datepicker to perform correctly
# The first date is in Java format
# (http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html).
# The second in unix format (see the FORMAT section of http://unixhelp.ed.ac.uk/CGI/man-cgi\
?date)
# Please note that the following options are not recognised: %c %D %E, %F, %G, %g, %h %r %R\
 %T %x %X %z %Z - _ ^ #
# After editing ensure the date picker creates valid dates, we also recommend you make this\
 format the same as Day/Month/Year Format
# in the administration section of JIRA
jira.date.picker.java.format = dd. MMM yyyy
jira.date.picker.javascript.format = %e. %b %Y

# These two properties need to match for the datetime picker to perform correctly
# The first date is in Java format
# (http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html).
# The second in unix format (see the FORMAT section of http://unixhelp.ed.ac.uk/CGI/man-cgi\
?date)
# Please note that the following options are not recognised: %c %D %E, %F, %G, %g, %h %r %R\
 %T %x %X %z %Z - _ ^ #
# After editing ensure the date time custom field picker creates valid dates
jira.date.time.picker.java.format = dd. MMM yyyy HH:mm
jira.date.time.picker.javascript.format = %e. %b %Y %H:%M

Say you create XHTML from XML using XSLT transformation (like me from Docbook to XHTML chunks using Docbook XSLT Stylesheets ) and you want to include some Javascript in the XHTML output.

If you serve your XHTML pages with mime-type: application/xhtml+xml rather then text/html , you will have to take care of xml-relevant characters within the script code (see Javascript and XHTML for a short explanation):

<script type="text/javascript">
/* <![CDATA[ */
// content of your Javascript goes here
/* ]]> */
 
or 
 
<script type="text/javascript">
// <![CDATA[ 
 content of your Javascript goes here
//]]>
</script>

Generating this output with xslt can be a little bit tricky. My solution (probably better exist) uses a trick shown in http://www.w3.org/TR/xslt#section-XML-Output-Method:

... xslt code ...
<script type="text/javascript">
	<xsl:text disable-output-escaping="yes">
	<![CDATA[//<![]]><![CDATA[CDATA[]]>
//javascript
	<![CDATA[//]]><![CDATA[]]]]><![CDATA[>]]>
        </xsl:text>
</script>
... xslt code