• I added some code to wp-fullcalender/include/js/inline.js
    I’m going to loose it on the next update? will next update override the file?

    on line 25 i add some code to allow html in the title

    /*Allow html in title */
    element.find('.fc-title').html(event.title);

    and to switch the default views on mobile, on the end of the file, i add

    jQuery(document).ready(function($) {
    	
    	var calWindowWidth = jQuery(window).width();
    
    	if (calWindowWidth <= 1030 && calWindowWidth >= 768) {
    		jQuery('.wpfc-calendar').fullCalendar( 'changeView', 'basicWeek' );
       } else if (calWindowWidth <= 767) {
        	jQuery('.wpfc-calendar').fullCalendar( 'changeView', 'basicDay' );
       } else {
       		jQuery('.wpfc-calendar').fullCalendar( 'changeView', 'agendaWeek' );
       }
    
       jQuery(window).resize(function() {
    
       		var calResizeWidth = jQuery(window).width();
    
        	if (calResizeWidth <= 1030 && calResizeWidth >= 768) {
    			jQuery('.wpfc-calendar').fullCalendar( 'changeView', 'basicWeek' );
    	   	} else if (calResizeWidth <= 767 ) {
    			jQuery('.wpfc-calendar').fullCalendar( 'changeView', 'basicDay' );
    	   	} else {
    	   		jQuery('.wpfc-calendar').fullCalendar( 'changeView', 'agendaWeek' );
    	   	}
    	});
    }); /* end of as page load scripts */
    • This topic was modified 8 years, 1 month ago by andreacianni. Reason: better explanation of the question
  • The topic ‘will “inline.js” be overrided on plugin update?’ is closed to new replies.