aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl/event_head.tpl
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-11-18 23:50:42 +0100
committerMario Vavti <mario@mariovavti.com>2015-11-18 23:50:42 +0100
commite4145deeb7a72ac321113fde672e1b499ecb0d2d (patch)
treece2fb59fd9d2ec1d13ea0960215967600098ca13 /view/tpl/event_head.tpl
parent68da4d90dcbda1240ae014768a66a164fd5d2b36 (diff)
downloadvolse-hubzilla-e4145deeb7a72ac321113fde672e1b499ecb0d2d.tar.gz
volse-hubzilla-e4145deeb7a72ac321113fde672e1b499ecb0d2d.tar.bz2
volse-hubzilla-e4145deeb7a72ac321113fde672e1b499ecb0d2d.zip
some events refacturing
Diffstat (limited to 'view/tpl/event_head.tpl')
-rwxr-xr-xview/tpl/event_head.tpl85
1 files changed, 30 insertions, 55 deletions
diff --git a/view/tpl/event_head.tpl b/view/tpl/event_head.tpl
index fd0ef0d9b..5d87caa7c 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/min/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'>&lsaquo;</span>",
- next: "<span class='fc-text-arrow'>&rsaquo;</span>",
- prevYear: "<span class='fc-text-arrow'>&laquo;</span>",
- nextYear: "<span class='fc-text-arrow'>&raquo;</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() {