diff options
author | redmatrix <git@macgirvin.com> | 2016-06-16 05:08:26 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-06-16 05:08:26 -0700 |
commit | aa77b04860a68370d829f1081418e69777d0e1f9 (patch) | |
tree | 3b46494707be3560c855e1b1a4cdcd329f7fa570 /view/js/mod_cal.js | |
parent | a2a87fec54e9da8defea30b8e252a8691a83dfc0 (diff) | |
parent | 8924f94d05fcbe6a34bb46d7bb4b2ba63ac78da2 (diff) | |
download | volse-hubzilla-aa77b04860a68370d829f1081418e69777d0e1f9.tar.gz volse-hubzilla-aa77b04860a68370d829f1081418e69777d0e1f9.tar.bz2 volse-hubzilla-aa77b04860a68370d829f1081418e69777d0e1f9.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'view/js/mod_cal.js')
-rw-r--r-- | view/js/mod_cal.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/view/js/mod_cal.js b/view/js/mod_cal.js new file mode 100644 index 000000000..0bf97fcf7 --- /dev/null +++ b/view/js/mod_cal.js @@ -0,0 +1,22 @@ +/** + * JavaScript for mod/cal + */ + +$(document).ready( function() { + $(document).on('click','#fullscreen-btn', on_fullscreen); + $(document).on('click','#inline-btn', on_inline); +}); + +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'); + } +} |