diff options
author | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-11-19 00:00:35 +0100 |
---|---|---|
committer | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2015-11-19 00:00:35 +0100 |
commit | 7b4cfffc03ddb68617fd71479866f3bf4f106768 (patch) | |
tree | 8426e45064dd9f41857bbb02946cb7f3e7cfbb98 /view/tpl/event_head.tpl | |
parent | 33258803ea0c14d5037f2b5a4f23b424fe1aa301 (diff) | |
parent | db9c2992e3102323b7500213c1ddea3b8611e1f0 (diff) | |
download | volse-hubzilla-7b4cfffc03ddb68617fd71479866f3bf4f106768.tar.gz volse-hubzilla-7b4cfffc03ddb68617fd71479866f3bf4f106768.tar.bz2 volse-hubzilla-7b4cfffc03ddb68617fd71479866f3bf4f106768.zip |
Merge remote-tracking branch 'upstream/master'
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..d7734af3c 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: 'de', + 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() { |