]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
24h supported for fullcalendar.
authorSem <sembrestels@riseup.net>
Wed, 29 Aug 2012 21:28:04 +0000 (23:28 +0200)
committerSem <sembrestels@riseup.net>
Wed, 29 Aug 2012 21:28:04 +0000 (23:28 +0200)
views/default/event_calendar/full_calendar_view.php

index adbb8a359b01bba306beb844a895ffccbfbe1fd2..6fc59fcc8e0f7cf67ac070af9274f6a464492141 100644 (file)
@@ -3,6 +3,8 @@ elgg_load_js('elgg.full_calendar');
 elgg_load_js('lightbox');
 elgg_load_css('lightbox');
 
+$timeformat = elgg_get_plugin_setting('timeformat', 'event_calendar') == 24 ? 'H(:mm)' : 'h(:mm)t';
+
 // TODO: is there an easy way to avoid embedding JS?
 ?>
 <script>
@@ -187,7 +189,8 @@ fullcalendarInit = function() {
                                month: elgg.echo('event_calendar:month_label'),
                                week: elgg.echo('event_calendar:week_label'),
                                day: elgg.echo('event_calendar:day_label')
-                       }
+                       },
+                       timeFormat: "<?php echo $timeformat; ?>",
                });
        }