aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/mod_events.js
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-06-16 12:21:59 +0200
committerMario Vavti <mario@mariovavti.com>2016-06-16 12:21:59 +0200
commit8924f94d05fcbe6a34bb46d7bb4b2ba63ac78da2 (patch)
tree54228f43ab23ee3426f176b7f09e24bc8d71549c /view/js/mod_events.js
parent7baa20d55901e42f57fa73c8473fd0f3ddf3a94d (diff)
downloadvolse-hubzilla-8924f94d05fcbe6a34bb46d7bb4b2ba63ac78da2.tar.gz
volse-hubzilla-8924f94d05fcbe6a34bb46d7bb4b2ba63ac78da2.tar.bz2
volse-hubzilla-8924f94d05fcbe6a34bb46d7bb4b2ba63ac78da2.zip
show month view in full height in fullscreen view
Diffstat (limited to 'view/js/mod_events.js')
-rw-r--r--view/js/mod_events.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/view/js/mod_events.js b/view/js/mod_events.js
index 74b811dd6..e67890b47 100644
--- a/view/js/mod_events.js
+++ b/view/js/mod_events.js
@@ -5,11 +5,29 @@
$(document).ready( function() {
enableDisableFinishDate();
$('#comment-edit-text-desc, #comment-edit-text-loc').bbco_autocomplete('bbcode');
+
+ $(document).on('click','#fullscreen-btn', on_fullscreen);
+ $(document).on('click','#inline-btn', on_inline);
});
+
function enableDisableFinishDate() {
if( $('#id_nofinish').is(':checked'))
$('#id_finish_text').prop("disabled", true);
else
$('#id_finish_text').prop("disabled", false);
}
+
+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
+ }
+}
+
+function on_inline() {
+ var view = $('#events-calendar').fullCalendar('getView');
+ if(view.type === 'month') {
+ $('#events-calendar').fullCalendar('option', 'height', 'auto');
+ }
+}