Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge

This commit is contained in:
redmatrix 2016-07-01 20:48:49 -07:00
commit 523e7b5084
7 changed files with 31 additions and 42 deletions

View File

@ -668,8 +668,10 @@ class Events extends \Zotlabs\Web\Controller {
'$export' => array(z_root()."/events/$y/$m/export",t('Export'),'',''),
'$calendar' => cal($y,$m,$links, ' eventcal'),
'$events' => $events,
'$upload' => t('Import'),
'$submit' => t('Submit'),
'$view_label' => t('View'),
'$month' => t('Month'),
'$week' => t('Week'),
'$day' => t('Day'),
'$prev' => t('Previous'),
'$next' => t('Next'),
'$today' => t('Today'),

View File

@ -743,21 +743,6 @@ function widget_conversations($arr) {
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) {
if (! local_channel())
return;

View File

@ -19,15 +19,10 @@ function enableDisableFinishDate() {
}
function on_fullscreen() {
var view = $('#events-calendar').fullCalendar('getView');
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
}
$('#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
}
function on_inline() {
var view = $('#events-calendar').fullCalendar('getView');
if(view.type === 'month') {
$('#events-calendar').fullCalendar('option', 'height', '');
}
((view.type === 'month') ? $('#events-calendar').fullCalendar('option', 'height', '') : $('#events-calendar').fullCalendar('option', 'height', 'auto'));
}

View File

@ -1,5 +1,4 @@
[region=aside]
[widget=eventsmenu][/widget]
[widget=eventstools][/widget]
[widget=tasklist][/widget]
[/region]

View File

@ -56,13 +56,13 @@ $(document).ready(function() {
function makeFullScreen(full) {
if(typeof full=='undefined' || full == true) {
$('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();
}
else {
$('main').removeClass('fullscreen');
$('#fullscreen-btn, header, nav, aside').css({'display': ''});
$('#fullscreen-btn, header, nav, aside, #tabs-collapse-1').css({'visibility': ''});
$('#inline-btn').hide();
$('main').css({'transition': ''});
}

View File

@ -30,18 +30,18 @@
function changeView(action, viewName) {
$('#events-calendar').fullCalendar(action, viewName);
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');
}
else {
if($('main').hasClass('fullscreen')) {
$('#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', '');
}
$('#events-calendar').fullCalendar('option', 'height', '');
}
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
}
$('#title').text(view.title);
}

View File

@ -1,13 +1,21 @@
<div class="generic-content-wrapper">
<div class="section-title-wrapper">
<div class="pull-right">
<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 class="btn btn-success btn-xs" onclick="openClose('form');">{{$new_event.1}}</button>
<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 id="events-spinner" class="btn btn-default btn-xs" onclick="changeView('today', false);" title="{{$today}}"><i class="fa fa-bullseye"></i></button>
<button class="btn btn-default btn-xs" onclick="changeView('next', false);" title="{{$next}}"><i class="fa fa-forward"></i></button>
<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="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>&nbsp;{{$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>
<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 id="events-spinner" class="btn btn-default btn-xs" onclick="changeView('today', false);" title="{{$today}}"><i class="fa fa-bullseye"></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>
<h2 id="title"></h2>