PATH:
home
/
centosnipponia
/
public_html
/
BAK_doohannl
/
wp-content
/
themes
/
sydney-pro-ii
/
js
/
modules
/
src
/** * Reviews Advanced */ 'use strict'; sydney.reviewsAdvanced = { init: function() { const _this = this, modal = document.getElementsByClassName( 'sydney-adv-reviews-modal' )[0], modalClose = document.getElementsByClassName( 'sydney-adv-reviews-modal-close' )[0], writeButton = document.getElementsByClassName( 'sydney-adv-review-write-button' )[0]; if( typeof writeButton === 'undefined' ) { return false; } writeButton.addEventListener( 'click', this.toggleModalDisplay ); modalClose.addEventListener( 'click', this.toggleModalDisplay ); modal.addEventListener( 'click', function(e){ if( e.target.closest( '.sydney-adv-reviews-modal-body' ) !== null ) { return false; } _this.toggleModalDisplay(); } ); this.tabsBehavior(); window.addEventListener( 'sydney.shop.single.reviews.pagination.initialized', function(){ const last_nav_item = document.querySelectorAll( '.woocommerce-pagination > ul > li:last-child > span' ); if( ! last_nav_item.length ) { return false; } if( last_nav_item[0].classList.contains( 'current' ) ) { const pag_wrapper = document.getElementsByClassName( 'sydney-pagination-wrapper' )[0]; if( typeof pag_wrapper === 'undefined' ) { return false; } pag_wrapper.remove(); } } ); }, toggleModalDisplay: function() { const modal = document.getElementsByClassName( 'sydney-adv-reviews-modal' )[0]; event.preventDefault(); modal.classList.toggle( 'show' ); }, // Change tabs behavior when a comment is sent tabsBehavior: function() { const hash = window.location.hash, url = window.location.href; if( hash.toLowerCase().indexOf( 'comment-' ) == 0 && hash !== '#reviews' && hash !== '#tab-reviews' && url.indexOf( 'comment-page-' ) == 0 && url.indexOf( 'cpage=' ) == 0 ) { return false; } (function($){ $( 'body' ) // Tabs .on( 'init', '.wc-tabs-wrapper, .woocommerce-tabs', function() { var $tabs = $( this ).find( '.wc-tabs, ul.tabs' ).first(); var $tab_content = $( this ).find( '.wc-tab' ).first(); if ( hash.toLowerCase().indexOf( 'comment-' ) >= 0 || hash === '#reviews' || hash === '#tab-reviews' ) { $tabs.find( 'li:first a' ).trigger( 'click' ); setTimeout(function(){ $tab_content.show(); }, 500); } else if ( url.indexOf( 'comment-page-' ) > 0 || url.indexOf( 'cpage=' ) > 0 ) { $tabs.find( 'li:first a' ).trigger( 'click' ); setTimeout(function(){ $tab_content.show(); }, 500); } }); })(jQuery); } } sydneyDomReady( function() { sydney.reviewsAdvanced.init(); } );
[+]
..
[-] ajax-search.js
[edit]
[-] multistep-checkout.js
[edit]
[-] page-header-parallax.js
[edit]
[-] reading-progress.js
[edit]
[-] sydney-reviews-advanced.js
[edit]
[-] .htaccess.disabled
[edit]