mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 07:35:14 +00:00
Merge branch 'dev' into sabre32
This commit is contained in:
commit
5b479d63d6
2 changed files with 40 additions and 0 deletions
22
view/js/mod_cal.js
Normal file
22
view/js/mod_cal.js
Normal file
|
@ -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');
|
||||
}
|
||||
}
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue