diff options
author | redmatrix <git@macgirvin.com> | 2016-07-01 20:48:49 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-07-01 20:48:49 -0700 |
commit | 523e7b5084b1ae62e151d1183f5150ffd9d9e60c (patch) | |
tree | 59ebb1acbd8d546a38bf9f099c13c2c914450df3 | |
parent | 41fa2d6c697bc4f7483e6c934b24c11fae368390 (diff) | |
parent | 0a119913406db6604ab6d44b53fdb1f07313db84 (diff) | |
download | volse-hubzilla-523e7b5084b1ae62e151d1183f5150ffd9d9e60c.tar.gz volse-hubzilla-523e7b5084b1ae62e151d1183f5150ffd9d9e60c.tar.bz2 volse-hubzilla-523e7b5084b1ae62e151d1183f5150ffd9d9e60c.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
-rw-r--r-- | Zotlabs/Module/Events.php | 6 | ||||
-rw-r--r-- | include/widgets.php | 15 | ||||
-rw-r--r-- | view/js/mod_events.js | 9 | ||||
-rw-r--r-- | view/pdl/mod_events.pdl | 1 | ||||
-rw-r--r-- | view/theme/redbasic/js/redbasic.js | 4 | ||||
-rwxr-xr-x | view/tpl/event_head.tpl | 14 | ||||
-rwxr-xr-x | view/tpl/events-js.tpl | 22 |
7 files changed, 30 insertions, 41 deletions
diff --git a/Zotlabs/Module/Events.php b/Zotlabs/Module/Events.php index 3f3f9fb4c..3187cddb4 100644 --- a/Zotlabs/Module/Events.php +++ b/Zotlabs/Module/Events.php @@ -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'), diff --git a/include/widgets.php b/include/widgets.php index 8a7f4b69f..7fc3f1aeb 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -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; diff --git a/view/js/mod_events.js b/view/js/mod_events.js index 66cf81ddd..a507a84d7 100644 --- a/view/js/mod_events.js +++ b/view/js/mod_events.js @@ -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')); } diff --git a/view/pdl/mod_events.pdl b/view/pdl/mod_events.pdl index a3bc0c019..8347d4c59 100644 --- a/view/pdl/mod_events.pdl +++ b/view/pdl/mod_events.pdl @@ -1,5 +1,4 @@ [region=aside] -[widget=eventsmenu][/widget] [widget=eventstools][/widget] [widget=tasklist][/widget] [/region] diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 58c2a9ceb..5209ad945 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -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': ''}); } diff --git a/view/tpl/event_head.tpl b/view/tpl/event_head.tpl index 4397c5c9d..fee4f17a3 100755 --- a/view/tpl/event_head.tpl +++ b/view/tpl/event_head.tpl @@ -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 + $('#events-calendar').fullCalendar('option', 'height', ''); + } - } - else { - $('#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); } diff --git a/view/tpl/events-js.tpl b/view/tpl/events-js.tpl index 7d5258ecd..3397411a8 100755 --- a/view/tpl/events-js.tpl +++ b/view/tpl/events-js.tpl @@ -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> {{$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> |