Make events export track the current calendar. Turn it and 'new event' into buttons
This commit is contained in:
parent
89c5ffd7c8
commit
3bb0ef8a82
@ -28,6 +28,7 @@
|
|||||||
eventRender: function(event, element, view) {
|
eventRender: function(event, element, view) {
|
||||||
//console.log(view.name);
|
//console.log(view.name);
|
||||||
if (event.item['author']['xchan_name']==null) return;
|
if (event.item['author']['xchan_name']==null) return;
|
||||||
|
|
||||||
switch(view.name){
|
switch(view.name){
|
||||||
case "month":
|
case "month":
|
||||||
element.find(".fc-event-title").html(
|
element.find(".fc-event-title").html(
|
||||||
|
@ -2,8 +2,17 @@
|
|||||||
<div class="generic-content-wrapper-styled">
|
<div class="generic-content-wrapper-styled">
|
||||||
<h2>{{$title}}</h2>
|
<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 id="events-calendar"></div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user