diff options
author | Andrew Manning <tamanning@zoho.com> | 2016-06-16 19:45:02 -0400 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2016-06-16 19:45:02 -0400 |
commit | e5f4d80bbe0c085a55f676aa1b05fb9bab1e4dc7 (patch) | |
tree | 3b46494707be3560c855e1b1a4cdcd329f7fa570 /view/js/mod_cal.js | |
parent | f2dda646ecf1d11bf88c085d1174d3c147f799b1 (diff) | |
parent | aa77b04860a68370d829f1081418e69777d0e1f9 (diff) | |
download | volse-hubzilla-e5f4d80bbe0c085a55f676aa1b05fb9bab1e4dc7.tar.gz volse-hubzilla-e5f4d80bbe0c085a55f676aa1b05fb9bab1e4dc7.tar.bz2 volse-hubzilla-e5f4d80bbe0c085a55f676aa1b05fb9bab1e4dc7.zip |
Merge remote-tracking branch 'upstream/dev' into dev
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'); + } +} |