aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/mod_cal.js
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-06-16 12:22:32 +0200
committerMario Vavti <mario@mariovavti.com>2016-06-16 12:22:32 +0200
commit5b479d63d62ef893360fd210947012310e8f9755 (patch)
tree645851428225a5c7d25c6194e8442e39ff199dec /view/js/mod_cal.js
parenta873b7b6e8cde0ab9443feb457763e36315cd6d1 (diff)
parent8924f94d05fcbe6a34bb46d7bb4b2ba63ac78da2 (diff)
downloadvolse-hubzilla-5b479d63d62ef893360fd210947012310e8f9755.tar.gz
volse-hubzilla-5b479d63d62ef893360fd210947012310e8f9755.tar.bz2
volse-hubzilla-5b479d63d62ef893360fd210947012310e8f9755.zip
Merge branch 'dev' into sabre32
Diffstat (limited to 'view/js/mod_cal.js')
-rw-r--r--view/js/mod_cal.js22
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');
+ }
+}