芝麻web文件管理V1.00
编辑当前文件:/var/www/cognitio.in/wp-content/plugins/the-events-calendar/src/resources/js/views/events-bar.min.js
/** * This JS file was auto-generated via Terser. * * Contributors should avoid editing this file, but instead edit the associated * non minified file file. For more information, check out our engineering docs * on how we handle JS minification in our engineering docs. * * @see: https://evnt.is/dev-docs-minification */ tribe.events=tribe.events||{},tribe.events.views=tribe.events.views||{},tribe.events.views.eventsBar={},function($,obj){"use strict";var $document=$(document);obj.selectors={eventsBar:'[data-js="tribe-events-events-bar"]',searchButton:'[data-js="tribe-events-search-button"]',searchButtonActiveClass:".tribe-events-c-events-bar__search-button--active",searchContainer:'[data-js="tribe-events-search-container"]'},obj.keyCode={END:35,HOME:36,LEFT:37,RIGHT:39},obj.deinitAccordion=function($header,$content){tribe.events.views.accordion.deinitAccordion(0,$header),tribe.events.views.accordion.deinitAccordionA11yAttrs($header,$content),$content.css("display","")},obj.initAccordion=function($container,$header,$content){tribe.events.views.accordion.initAccordion($container)(0,$header),tribe.events.views.accordion.initAccordionA11yAttrs($header,$content)},obj.handleSearchButtonClick=function(event){event.data.target.toggleClass(obj.selectors.searchButtonActiveClass.className())},obj.deinitSearchAccordion=function($container){var $searchButton=$container.find(obj.selectors.searchButton);$searchButton.removeClass(obj.selectors.searchButtonActiveClass.className());var $searchContainer=$container.find(obj.selectors.searchContainer);obj.deinitAccordion($searchButton,$searchContainer),$searchButton.off("click",obj.handleSearchButtonClick)},obj.initSearchAccordion=function($container){var $searchButton=$container.find(obj.selectors.searchButton),$searchContainer=$container.find(obj.selectors.searchContainer);obj.initAccordion($container,$searchButton,$searchContainer),$searchButton.on("click",{target:$searchButton},obj.handleSearchButtonClick)},obj.initState=function($container){$container.find(obj.selectors.eventsBar).data("tribeEventsState",{mobileInitialized:!1,desktopInitialized:!1})},obj.deinitEventsBar=function($container){obj.deinitSearchAccordion($container)},obj.initEventsBar=function($container){var $eventsBar=$container.find(obj.selectors.eventsBar);if($eventsBar.length){var state=$eventsBar.data("tribeEventsState"),isMobile=$container.data("tribeEventsState").isMobile;isMobile&&!state.mobileInitialized?(obj.initSearchAccordion($container),state.desktopInitialized=!1,state.mobileInitialized=!0,$eventsBar.data("tribeEventsState",state)):isMobile||state.desktopInitialized||(obj.deinitSearchAccordion($container),state.mobileInitialized=!1,state.desktopInitialized=!0,$eventsBar.data("tribeEventsState",state))}},obj.handleResize=function(event){obj.initEventsBar(event.data.container)},obj.handleClick=function(event){var $target=$(event.target),isParentSearchButton=Boolean($target.closest(obj.selectors.searchButton).length),isParentSearchContainer=Boolean($target.closest(obj.selectors.searchContainer).length);if(!isParentSearchButton&&!isParentSearchContainer){var $eventsBar=event.data.container.find(obj.selectors.eventsBar),$searchButton=$eventsBar.find(obj.selectors.searchButton);if($searchButton.hasClass(obj.selectors.searchButtonActiveClass.className())){var $searchContainer=$eventsBar.find(obj.selectors.searchContainer);$searchButton.removeClass(obj.selectors.searchButtonActiveClass.className()),tribe.events.views.accordion.closeAccordion($searchButton,$searchContainer)}}},obj.unbindEvents=function($container){$container.off("resize.tribeEvents",obj.handleResize),$document.off("click",obj.handleClick)},obj.bindEvents=function($container){$container.on("resize.tribeEvents",{container:$container},obj.handleResize),$document.on("click",{container:$container},obj.handleClick)},obj.deinit=function(event,jqXHR,settings){var $container=event.data.container;obj.deinitEventsBar($container),obj.unbindEvents($container),$container.off("beforeAjaxSuccess.tribeEvents",obj.deinit)},obj.init=function(event,index,$container,data){$container.find(obj.selectors.eventsBar).length&&(obj.initState($container),obj.initEventsBar($container),obj.bindEvents($container),$container.on("beforeAjaxSuccess.tribeEvents",{container:$container},obj.deinit))},obj.ready=function(){$document.on("afterSetup.tribeEvents",tribe.events.views.manager.selectors.container,obj.init)},$(obj.ready)}(jQuery,tribe.events.views.eventsBar);