1/** 2 * Makes sure we have all the required levels on the Tribe Object 3 * 4 * @since 4.7.8 5 * 6 * @type {PlainObject} 7 */ 8tribe.events = tribe.events || {}; 9tribe.events.views = tribe.events.views || {}; 10 11/** 12 * Configures Multiday Events Pro Object in the Global Tribe variable 13 * 14 * @since 4.7.8 15 * 16 * @type {PlainObject} 17 */ 18tribe.events.views.multidayEventsPro = {}; 19 20/** 21 * Initializes in a Strict env the code that manages the Event Views 22 * 23 * @since 4.7.8 24 * 25 * @param {PlainObject} $ jQuery 26 * @param {PlainObject} obj tribe.events.views.manager 27 * 28 * @return {void} 29 */ 30( function( $, obj ) { 31 'use strict'; 32 var $document = $( document ); 33 34 /** 35 * Selector prefixes used for creating selectors 36 * 37 * @since 4.7.8 38 * 39 * @type {PlainObject} 40 */ 41 obj.selectorPrefixes = { 42 week: '.tribe-events-pro-week-grid__', 43 }; 44 45 /** 46 * Handles after multiday events init allowed views event. 47 * 48 * @since 4.7.8 49 * 50 * @param {Event} event event object for 'afterMultidayEventsInitAllowedViews.tribeEvents' event 51 * @param {jQuery} $container jQuery object of view container. 52 * 53 * @return {void} 54 */ 55 obj.handleAfterMultidayEventsInitAllowedViews = function( event, $container ) { 56 var allowedViews = $container.data( 'tribeEventsMultidayEventsAllowedViews' ); 57 allowedViews.push( 'week' ); 58 $container.data( 'tribeEventsMultidayEventsAllowedViews', allowedViews ); 59 tribe.events.views.multidayEvents.selectorPrefixes.week = obj.selectorPrefixes.week; 60 }; 61 62 /** 63 * Handles the initialization of multiday events when Document is ready 64 * 65 * @since 4.7.8 66 * 67 * @return {void} 68 */ 69 obj.ready = function() { 70 $document.on( 'afterMultidayEventsInitAllowedViews.tribeEvents', tribe.events.views.manager.selectors.container, obj.handleAfterMultidayEventsInitAllowedViews ); 71 }; 72 73 // Configure on document ready 74 $document.ready( obj.ready ); 75} )( jQuery, tribe.events.views.multidayEventsPro );
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.