aboutsummaryrefslogtreecommitdiffstats
path: root/app/assets/javascripts
diff options
context:
space:
mode:
authorMarc Florisson2014-08-14 16:57:23 +0200
committerMarc Florisson2014-08-14 16:57:23 +0200
commitf81d7910a55fd2d3f881fa6778abbc7793af915e (patch)
tree0bf974d06119881232ef90f06fd7beea4dacac85 /app/assets/javascripts
parent1eae962b088d006be8d4cde19096aa5eca6608c8 (diff)
parent11ffb51486eae01f6d9f571155d7afaec8826130 (diff)
downloadchouette-core-f81d7910a55fd2d3f881fa6778abbc7793af915e.tar.bz2
Merge branch 'sismo' of github.com:afimb/chouette2 into sismo
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/time_tables.js.coffee23
1 files changed, 22 insertions, 1 deletions
diff --git a/app/assets/javascripts/time_tables.js.coffee b/app/assets/javascripts/time_tables.js.coffee
index 71b9ca14f..75889bd3f 100644
--- a/app/assets/javascripts/time_tables.js.coffee
+++ b/app/assets/javascripts/time_tables.js.coffee
@@ -5,7 +5,28 @@ jQuery ->
$('.time_tables .calendars.content').toggle('slow')
$('a.calendars .switcher').toggle()
- $('.time_tables a.calendars').click(switch_calendars)
+ $('.time_tables').on('click','a.calendars',switch_calendars)
+
+ switch_dates = (event) ->
+ event.preventDefault()
+ $('.time_tables .dates.content').toggle('slow')
+ $('a.dates .switcher').toggle()
+
+ $('.time_tables').on('click','a.dates',switch_dates)
+
+ switch_excluded_dates = (event) ->
+ event.preventDefault()
+ $('.time_tables .excluded_dates.content').toggle('slow')
+ $('a.excluded_dates .switcher').toggle()
+
+ $('.time_tables').on('click','a.excluded_dates',switch_excluded_dates)
+
+ switch_periods = (event) ->
+ event.preventDefault()
+ $('.time_tables .periods.content').toggle('slow')
+ $('a.periods .switcher').toggle()
+
+ $('.time_tables').on('click','a.periods',switch_periods)
# add trigger when creating new date or period entries to activate datepicker
tt_datepickerI18n = (index, element) ->