diff options
author | Mario Vavti <mario@mariovavti.com> | 2019-06-17 10:28:47 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2019-06-17 10:28:47 +0200 |
commit | 2f80fdae974cf061de0cec70c6333cef33784d71 (patch) | |
tree | e085443f57bd3f3e711923ac6745a983a39d466d /view | |
parent | c5703306ef7eeca1a65ba7315881f3b583c5a535 (diff) | |
parent | 9507f191b02c05d4cbbbe0ab3072f5a8211b1312 (diff) | |
download | volse-hubzilla-2f80fdae974cf061de0cec70c6333cef33784d71.tar.gz volse-hubzilla-2f80fdae974cf061de0cec70c6333cef33784d71.tar.bz2 volse-hubzilla-2f80fdae974cf061de0cec70c6333cef33784d71.zip |
Merge branch 'dev'
Diffstat (limited to 'view')
-rw-r--r-- | view/pdl/mod_events.pdl | 8 | ||||
-rwxr-xr-x | view/tpl/cal_calendar.tpl | 105 | ||||
-rwxr-xr-x | view/tpl/cal_event.tpl (renamed from view/tpl/event_cal.tpl) | 0 | ||||
-rwxr-xr-x | view/tpl/mail_conv.tpl | 2 | ||||
-rwxr-xr-x | view/tpl/prv_message.tpl | 1 |
5 files changed, 107 insertions, 9 deletions
diff --git a/view/pdl/mod_events.pdl b/view/pdl/mod_events.pdl deleted file mode 100644 index e9a91e219..000000000 --- a/view/pdl/mod_events.pdl +++ /dev/null @@ -1,8 +0,0 @@ -[region=aside] -[widget=eventstools][/widget] -[widget=tasklist][/widget] -[/region] -[region=right_aside] -[widget=notifications][/widget] -[widget=newmember][/widget] -[/region] diff --git a/view/tpl/cal_calendar.tpl b/view/tpl/cal_calendar.tpl new file mode 100755 index 000000000..93ebaa235 --- /dev/null +++ b/view/tpl/cal_calendar.tpl @@ -0,0 +1,105 @@ +<script> +var calendar; + +$(document).ready(function() { + var calendarEl = document.getElementById('calendar'); + calendar = new FullCalendar.Calendar(calendarEl, { + plugins: [ 'dayGrid' ], + eventSources: [ {{$sources}} ], + + timeZone: '{{$timezone}}', + + locale: '{{$lang}}', + + eventTextColor: 'white', + header: false, + + height: 'auto', + + firstDay: {{$first_day}}, + + monthNames: aStr['monthNames'], + monthNamesShort: aStr['monthNamesShort'], + dayNames: aStr['dayNames'], + dayNamesShort: aStr['dayNamesShort'], + allDayText: aStr['allday'], + + eventClick: function(info) { + var event_id = info.event._def.extendedProps.item.id; + showEvent(event_id); + }, + + loading: function(isLoading, view) { + $('#events-spinner').show(); + $('#today-btn > i').hide(); + if(!isLoading) { + $('#events-spinner').hide(); + $('#today-btn > i').show(); + } + } + + }); + + calendar.render(); + + $('#title').text(calendar.view.title); + + $('#today-btn').on('click', function() { + calendar.today(); + $('#title').text(calendar.view.title); + }); + + $('#prev-btn').on('click', function() { + calendar.prev(); + $('#title').text(calendar.view.title); + }); + + $('#next-btn').on('click', function() { + calendar.next(); + $('#title').text(calendar.view.title); + }); + + $(document).on('click','#fullscreen-btn', updateSize); + $(document).on('click','#inline-btn', updateSize); + +}); + +function showEvent(event_id) { + $.get( + 'cal/{{$nick}}?id='+event_id, + function(data){ + $.colorbox({ scrolling: false, html: data, onComplete: function() { $.colorbox.resize(); }}); + } + ); +} + +function changeView(action, viewName) { + calendar.changeView(viewName); + $('#title').text(calendar.view.title); + $('#view_selector').html(views[calendar.view.type]); + return; +} + +function updateSize() { + calendar.updateSize(); +} +</script> + +<div class="generic-content-wrapper"> + <div class="section-title-wrapper"> + <div class="float-right"> + <div class="btn-group"> + <button id="prev-btn" class="btn btn-outline-secondary btn-sm" title="{{$prev}}"><i class="fa fa-backward"></i></button> + <button id="today-btn" class="btn btn-outline-secondary btn-sm" title="{{$today}}"><div id="events-spinner" class="spinner s"></div><i class="fa fa-bullseye" style="display: none; width: 1rem;"></i></button> + <button id="next-btn" class="btn btn-outline-secondary btn-sm" title="{{$next}}"><i class="fa fa-forward"></i></button> + </div> + <button id="fullscreen-btn" type="button" class="btn btn-outline-secondary btn-sm" onclick="makeFullScreen();"><i class="fa fa-expand"></i></button> + <button id="inline-btn" type="button" class="btn btn-outline-secondary btn-sm" onclick="makeFullScreen(false);"><i class="fa fa-compress"></i></button> + </div> + <h2 id="title"></h2> + <div class="clear"></div> + </div> + <div class="section-content-wrapper-np"> + <div id="calendar"></div> + </div> +</div> diff --git a/view/tpl/event_cal.tpl b/view/tpl/cal_event.tpl index d7662786b..d7662786b 100755 --- a/view/tpl/event_cal.tpl +++ b/view/tpl/cal_event.tpl diff --git a/view/tpl/mail_conv.tpl b/view/tpl/mail_conv.tpl index cd810e999..b0497fe99 100755 --- a/view/tpl/mail_conv.tpl +++ b/view/tpl/mail_conv.tpl @@ -1,4 +1,4 @@ -<div id="mail-{{$mail.id}}" class="mb-2 clearfix mail-conv-outside-wrapper"> +<div id="mail-{{$mail.id}}" class="mb-2 clearfix mail-conv-outside-wrapper"{{if $mail.sig}} data-sig="{{$mail.sig}}"{{/if}}> <div class="mb-2 clearfix wall-item-head"> <div class="wall-item-info" > <a href="{{$mail.from_url}}"><img class="wall-item-photo" src="{{$mail.from_photo}}" alt="{{$mail.from_name}}" /></a> diff --git a/view/tpl/prv_message.tpl b/view/tpl/prv_message.tpl index 59472f7d4..b8c81539d 100755 --- a/view/tpl/prv_message.tpl +++ b/view/tpl/prv_message.tpl @@ -11,6 +11,7 @@ <input type="hidden" id="inp-prvmail-expires" name="expires" value="{{$defexpire}}" /> <input type="hidden" name="media_str" id="jot-media" value="" /> <input type="hidden" name="preview" id="mail-preview" value="0" /> + <input type="hidden" name="signature" id="mail-sig" value="" /> {{if $new}} <div class="form-group"> <label for="recip">{{$to}}</label> |