Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
This commit is contained in:
commit
523e7b5084
@ -668,8 +668,10 @@ class Events extends \Zotlabs\Web\Controller {
|
|||||||
'$export' => array(z_root()."/events/$y/$m/export",t('Export'),'',''),
|
'$export' => array(z_root()."/events/$y/$m/export",t('Export'),'',''),
|
||||||
'$calendar' => cal($y,$m,$links, ' eventcal'),
|
'$calendar' => cal($y,$m,$links, ' eventcal'),
|
||||||
'$events' => $events,
|
'$events' => $events,
|
||||||
'$upload' => t('Import'),
|
'$view_label' => t('View'),
|
||||||
'$submit' => t('Submit'),
|
'$month' => t('Month'),
|
||||||
|
'$week' => t('Week'),
|
||||||
|
'$day' => t('Day'),
|
||||||
'$prev' => t('Previous'),
|
'$prev' => t('Previous'),
|
||||||
'$next' => t('Next'),
|
'$next' => t('Next'),
|
||||||
'$today' => t('Today'),
|
'$today' => t('Today'),
|
||||||
|
@ -743,21 +743,6 @@ function widget_conversations($arr) {
|
|||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
||||||
function widget_eventsmenu($arr) {
|
|
||||||
if (! local_channel())
|
|
||||||
return;
|
|
||||||
|
|
||||||
return replace_macros(get_markup_template('events_menu_side.tpl'), array(
|
|
||||||
'$title' => t('Events Menu'),
|
|
||||||
'$day' => t('Day View'),
|
|
||||||
'$week' => t('Week View'),
|
|
||||||
'$month' => t('Month View'),
|
|
||||||
'$export' => t('Export'),
|
|
||||||
'$upload' => t('Import'),
|
|
||||||
'$submit' => t('Submit')
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
function widget_eventstools($arr) {
|
function widget_eventstools($arr) {
|
||||||
if (! local_channel())
|
if (! local_channel())
|
||||||
return;
|
return;
|
||||||
|
@ -19,15 +19,10 @@ function enableDisableFinishDate() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function on_fullscreen() {
|
function on_fullscreen() {
|
||||||
var view = $('#events-calendar').fullCalendar('getView');
|
$('#events-calendar').fullCalendar('option', 'height', $(window).height() - $('.section-title-wrapper').outerHeight(true) - 2); // -2 is for border width (.generic-content-wrapper top and bottom) of .generic-content-wrapper
|
||||||
if(view.type === 'month') {
|
|
||||||
$('#events-calendar').fullCalendar('option', 'height', $(window).height() - $('.section-title-wrapper').outerHeight(true) - 2); // -2 is for border width (top and bottom) of .generic-content-wrapper
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function on_inline() {
|
function on_inline() {
|
||||||
var view = $('#events-calendar').fullCalendar('getView');
|
var view = $('#events-calendar').fullCalendar('getView');
|
||||||
if(view.type === 'month') {
|
((view.type === 'month') ? $('#events-calendar').fullCalendar('option', 'height', '') : $('#events-calendar').fullCalendar('option', 'height', 'auto'));
|
||||||
$('#events-calendar').fullCalendar('option', 'height', '');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
[region=aside]
|
[region=aside]
|
||||||
[widget=eventsmenu][/widget]
|
|
||||||
[widget=eventstools][/widget]
|
[widget=eventstools][/widget]
|
||||||
[widget=tasklist][/widget]
|
[widget=tasklist][/widget]
|
||||||
[/region]
|
[/region]
|
||||||
|
@ -56,13 +56,13 @@ $(document).ready(function() {
|
|||||||
function makeFullScreen(full) {
|
function makeFullScreen(full) {
|
||||||
if(typeof full=='undefined' || full == true) {
|
if(typeof full=='undefined' || full == true) {
|
||||||
$('main').css({'transition': 'none'}).addClass('fullscreen');
|
$('main').css({'transition': 'none'}).addClass('fullscreen');
|
||||||
$('#fullscreen-btn, header, nav, aside').css({'display': 'none'});
|
$('#fullscreen-btn, header, nav, aside, #tabs-collapse-1').css({'visibility': 'hidden'});
|
||||||
$('#inline-btn').show();
|
$('#inline-btn').show();
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$('main').removeClass('fullscreen');
|
$('main').removeClass('fullscreen');
|
||||||
$('#fullscreen-btn, header, nav, aside').css({'display': ''});
|
$('#fullscreen-btn, header, nav, aside, #tabs-collapse-1').css({'visibility': ''});
|
||||||
$('#inline-btn').hide();
|
$('#inline-btn').hide();
|
||||||
$('main').css({'transition': ''});
|
$('main').css({'transition': ''});
|
||||||
}
|
}
|
||||||
|
@ -30,18 +30,18 @@
|
|||||||
function changeView(action, viewName) {
|
function changeView(action, viewName) {
|
||||||
$('#events-calendar').fullCalendar(action, viewName);
|
$('#events-calendar').fullCalendar(action, viewName);
|
||||||
var view = $('#events-calendar').fullCalendar('getView');
|
var view = $('#events-calendar').fullCalendar('getView');
|
||||||
if(view.type === 'agendaDay' || view.type === 'agendaWeek') {
|
|
||||||
|
if(view.type !== 'month' && !$('main').hasClass('fullscreen')) {
|
||||||
$('#events-calendar').fullCalendar('option', 'height', 'auto');
|
$('#events-calendar').fullCalendar('option', 'height', 'auto');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if($('main').hasClass('fullscreen')) {
|
$('#events-calendar').fullCalendar('option', 'height', '');
|
||||||
$('#calendar').fullCalendar('option', 'height', $(window).height() - $('.section-title-wrapper').outerHeight(true) - 2); // -2 is for border width (.generic-content-wrapper top and bottom) of .generic-content-wrapper
|
}
|
||||||
|
|
||||||
|
if($('main').hasClass('fullscreen')) {
|
||||||
|
$('#events-calendar').fullCalendar('option', 'height', $(window).height() - $('.section-title-wrapper').outerHeight(true) - 2); // -2 is for border width (.generic-content-wrapper top and bottom) of .generic-content-wrapper
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
$('#calendar').fullCalendar('option', 'height', '');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$('#title').text(view.title);
|
$('#title').text(view.title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,15 @@
|
|||||||
<div class="generic-content-wrapper">
|
<div class="generic-content-wrapper">
|
||||||
<div class="section-title-wrapper">
|
<div class="section-title-wrapper">
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
|
<div class="dropdown">
|
||||||
<button id="fullscreen-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen();"><i class="fa fa-expand"></i></button>
|
<button id="fullscreen-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen();"><i class="fa fa-expand"></i></button>
|
||||||
<button id="inline-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen(false);"><i class="fa fa-compress"></i></button>
|
<button id="inline-btn" type="button" class="btn btn-default btn-xs" onclick="makeFullScreen(false);"><i class="fa fa-compress"></i></button>
|
||||||
|
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown"><i class="fa fa-caret-down"></i> {{$view_label}}</button>
|
||||||
|
<ul class="dropdown-menu">
|
||||||
|
<li><a href="#" onclick="changeView('changeView', 'month'); return false;">{{$month}}</a></li>
|
||||||
|
<li><a href="#" onclick="changeView('changeView', 'agendaWeek'); return false;">{{$week}}</a></li>
|
||||||
|
<li><a href="#" onclick="changeView('changeView', 'agendaDay'); return false;">{{$day}}</a></li>
|
||||||
|
</ul>
|
||||||
<button class="btn btn-success btn-xs" onclick="openClose('form');">{{$new_event.1}}</button>
|
<button class="btn btn-success btn-xs" onclick="openClose('form');">{{$new_event.1}}</button>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button class="btn btn-default btn-xs" onclick="changeView('prev', false);" title="{{$prev}}"><i class="fa fa-backward"></i></button>
|
<button class="btn btn-default btn-xs" onclick="changeView('prev', false);" title="{{$prev}}"><i class="fa fa-backward"></i></button>
|
||||||
@ -10,6 +17,7 @@
|
|||||||
<button class="btn btn-default btn-xs" onclick="changeView('next', false);" title="{{$next}}"><i class="fa fa-forward"></i></button>
|
<button class="btn btn-default btn-xs" onclick="changeView('next', false);" title="{{$next}}"><i class="fa fa-forward"></i></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<h2 id="title"></h2>
|
<h2 id="title"></h2>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user