diff options
author | friendica <info@friendica.com> | 2014-11-24 20:40:00 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-11-24 20:40:00 -0800 |
commit | 3bb0ef8a82ec660ff8ef37b9abc93da94234649a (patch) | |
tree | ecc02e3590420dcf30412044f0a73b9e88667a72 /view/tpl/events-js.tpl | |
parent | 89c5ffd7c84af178f496dee28671ad8870374c09 (diff) | |
download | volse-hubzilla-3bb0ef8a82ec660ff8ef37b9abc93da94234649a.tar.gz volse-hubzilla-3bb0ef8a82ec660ff8ef37b9abc93da94234649a.tar.bz2 volse-hubzilla-3bb0ef8a82ec660ff8ef37b9abc93da94234649a.zip |
Make events export track the current calendar. Turn it and 'new event' into buttons
Diffstat (limited to 'view/tpl/events-js.tpl')
-rwxr-xr-x | view/tpl/events-js.tpl | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/view/tpl/events-js.tpl b/view/tpl/events-js.tpl index ad41e983a..9812291bf 100755 --- a/view/tpl/events-js.tpl +++ b/view/tpl/events-js.tpl @@ -2,8 +2,17 @@ <div class="generic-content-wrapper-styled"> <h2>{{$title}}</h2> -<div id="export-event-link"><a href="{{$export.0}}" >{{$export.1}}</a></div> -<div id="new-event-link"><a href="{{$new_event.0}}" >{{$new_event.1}}</a></div> + +<div id="export-event-link"><button class="btn btn-default btn-sm" onclick="exportDate(); return false;" >{{$export.1}}</button></div> +<div id="new-event-link"><button class="btn btn-default btn-sm" onclick="window.location.href='{{$new_event.0}}'; return false;" >{{$new_event.1}}</button></div> + +<script> +function exportDate() { + var moment = $('#events-calendar').fullCalendar('getDate'); + var sT = 'events/' + moment.getFullYear() + '/' + (moment.getMonth() + 1) + '/export'; + window.location.href=sT; +} +</script> <div id="events-calendar"></div> </div> |