aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-07-01 06:36:25 -0400
committerAndrew Manning <tamanning@zoho.com>2016-07-01 06:36:25 -0400
commit0630609d6e60085f20d1430fd4044775dd9af5e9 (patch)
tree2556d3a10cf6328dbed962060888f74584b791db /view
parent205924ff294e5c0d9c57ed9a36dc899fcdd9c460 (diff)
parent7371e0862543922b65eac920e128ca4ef1348b13 (diff)
downloadvolse-hubzilla-0630609d6e60085f20d1430fd4044775dd9af5e9.tar.gz
volse-hubzilla-0630609d6e60085f20d1430fd4044775dd9af5e9.tar.bz2
volse-hubzilla-0630609d6e60085f20d1430fd4044775dd9af5e9.zip
Merge remote-tracking branch 'upstream/dev' into wiki
Diffstat (limited to 'view')
-rw-r--r--view/js/mod_events.js9
-rw-r--r--view/pdl/mod_events.pdl1
-rwxr-xr-xview/tpl/event_head.tpl14
-rwxr-xr-xview/tpl/events-js.tpl22
4 files changed, 24 insertions, 22 deletions
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/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>&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>