aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/css/mod_cal.css4
-rw-r--r--view/css/mod_events.css4
-rw-r--r--view/js/mod_cal.js22
-rw-r--r--view/js/mod_events.js18
4 files changed, 48 insertions, 0 deletions
diff --git a/view/css/mod_cal.css b/view/css/mod_cal.css
index f0b5c0166..184227a91 100644
--- a/view/css/mod_cal.css
+++ b/view/css/mod_cal.css
@@ -1,3 +1,7 @@
+.fc-scroller {
+ overflow: hidden !important;
+}
+
/* fix borders */
.fc th:first-child,
diff --git a/view/css/mod_events.css b/view/css/mod_events.css
index f0b5c0166..184227a91 100644
--- a/view/css/mod_events.css
+++ b/view/css/mod_events.css
@@ -1,3 +1,7 @@
+.fc-scroller {
+ overflow: hidden !important;
+}
+
/* fix borders */
.fc th:first-child,
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');
+ }
+}
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');
+ }
+}