mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
Include datepicker i18n only as needed
* Restore the javascript_tag_for_i18n_datepicker helper (and actually use it) * Include the datepicker i18n JS in the asset precompilation list
This commit is contained in:
parent
91849c5316
commit
4b046b98ea
5 changed files with 10 additions and 9 deletions
|
|
@ -169,6 +169,14 @@ module ApplicationHelper
|
|||
return js.html_safe
|
||||
end
|
||||
|
||||
def javascript_tag_for_i18n_datepicker
|
||||
locale = I18n.locale
|
||||
# do not include en as locale since this the available by default
|
||||
if locale && locale != :en
|
||||
javascript_include_tag("jquery-ui/datepicker-#{locale}")
|
||||
end
|
||||
end
|
||||
|
||||
def done_path(controller_name, type)
|
||||
case controller_name
|
||||
when "contexts"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue