diff options
Diffstat (limited to 'view/tpl/event_head.tpl')
-rwxr-xr-x | view/tpl/event_head.tpl | 85 |
1 files changed, 30 insertions, 55 deletions
diff --git a/view/tpl/event_head.tpl b/view/tpl/event_head.tpl index fd0ef0d9b..346dfb154 100755 --- a/view/tpl/event_head.tpl +++ b/view/tpl/event_head.tpl @@ -1,6 +1,7 @@ <link rel='stylesheet' type='text/css' href='{{$baseurl}}/library/fullcalendar/fullcalendar.css' /> -<script language="javascript" type="text/javascript" - src="{{$baseurl}}/library/fullcalendar/fullcalendar.min.js"></script> +<script language="javascript" type="text/javascript" src="{{$baseurl}}/library/moment/moment.min.js"></script> +<script language="javascript" type="text/javascript" src="{{$baseurl}}/library/fullcalendar/fullcalendar.min.js"></script> +<script language="javascript" type="text/javascript" src="{{$baseurl}}/library/fullcalendar/lang-all.js"></script> <script> function showEvent(eventid) { @@ -20,31 +21,34 @@ $('#event-edit-preview').val(0); } + function exportDate() { + var moment = $('#events-calendar').fullCalendar('getDate'); + var sT = 'events/' + moment.year() + '/' + (moment.month() + 1) + '/export'; + window.location.href=sT; + } + + function changeView(action, viewName) { + $('#events-calendar').fullCalendar(action, viewName); + var view = $('#events-calendar').fullCalendar('getView'); + $('#title').text(view.title); + } + $(document).ready(function() { $('#events-calendar').fullCalendar({ - events: '{{$baseurl}}/events/json/', - header: { - left: 'prev,next today', - center: 'title', - right: 'month,agendaWeek,agendaDay' - }, + events: '{{$baseurl}}/events/json', + header: false, + lang: '{{$lang}}', + eventLimit: 3, + height: 'auto', + monthNames: aStr['monthNames'], monthNamesShort: aStr['monthNamesShort'], dayNames: aStr['dayNames'], dayNamesShort: aStr['dayNamesShort'], - buttonText: { - prev: "<span class='fc-text-arrow'>‹</span>", - next: "<span class='fc-text-arrow'>›</span>", - prevYear: "<span class='fc-text-arrow'>«</span>", - nextYear: "<span class='fc-text-arrow'>»</span>", - today: aStr['today'], - month: aStr['month'], - week: aStr['week'], - day: aStr['day'] - }, + allDayText: aStr['allday'], - timeFormat: 'H(:mm)', + timeFormat: 'HH:mm', eventClick: function(calEvent, jsEvent, view) { showEvent(calEvent.id); }, @@ -100,46 +104,17 @@ var hash = location.hash.split("-") if (hash.length==2 && hash[0]=="#link") showEvent(hash[1]); - }); -</script> + // echo the title + var view = $('#events-calendar').fullCalendar('getView'); + $('#title').text(view.title); + -{{if $editselect != 'none'}} -<script language="javascript" type="text/javascript" - src="{{$baseurl}}/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script> -<script language="javascript" type="text/javascript"> - - - tinyMCE.init({ - theme : "advanced", - mode : "{{$editselect}}", - plugins : "bbcode,paste", - theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code", - theme_advanced_buttons2 : "", - theme_advanced_buttons3 : "", - theme_advanced_toolbar_location : "top", - theme_advanced_toolbar_align : "center", - theme_advanced_blockformats : "blockquote,code", - gecko_spellcheck : true, - paste_text_sticky : true, - entity_encoding : "raw", - add_unload_trigger : false, - remove_linebreaks : false, - force_p_newlines : false, - force_br_newlines : true, - forced_root_block : '', - content_css: "{{$baseurl}}/view/custom_tinymce.css", - theme_advanced_path : false, - setup : function(ed) { - ed.onInit.add(function(ed) { - ed.pasteAsPlainText = true; - }); - } }); - {{else}} - <script language="javascript" type="text/javascript"> - {{/if}} +</script> + +<script> $(document).ready(function() { $('#id_share').change(function() { |