Class CalendarResourceIncluder

java.lang.Object
com.atlassian.jira.web.action.util.CalendarResourceIncluder

public class CalendarResourceIncluder extends Object
This class exists to get around problems with calling out to other methods in velocity.

For the date pickers, we need to include the javascript for the calendar. However, many of the date pickers are generated in velocity, where it is not easy to call out to WebResourceManager (see macros.vm).

This class gives you a nice way of including resources.

See Also:
  • Constructor Details

    • CalendarResourceIncluder

      public CalendarResourceIncluder()
  • Method Details

    • hasTranslation

      public boolean hasTranslation(Locale locale)
      Checks if there is a translation for the pop-up calendar in the language of the given locale.
      Parameters:
      locale - user's locale.
      Returns:
      true if calendar is translated, false otherwise.
      Since:
      v3.12
    • includeForLocale

      public void includeForLocale(Locale locale)
      Include the javascript resources for the DHTML calendar.

      If a translation is not found for the locale then an English translation is used. See JRA-23434.

      Parameters:
      locale - The user's locale.
      Since:
      v4.2