403Webshell
Server IP : 38.190.208.107  /  Your IP : 216.73.217.1
Web Server : nginx/1.28.1
System : Linux ht2026040333114 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64
User : root ( 0)
PHP Version : 8.2.28
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv,eval,assert,passthru,system,exec,shell_exec,popen,proc_open
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/wp.4/wp-content/themes/woodmart/js/scripts/global/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/wp.4/wp-content/themes/woodmart/js/scripts/global/btnsToolTips.js
/* global woodmart_settings */
(function($) {
	woodmartThemeModule.$document.on('wdBackHistory wdProductsTabsLoaded wdSearchFullScreenContentLoaded wdActionAfterAddToCart wdShopPageInit wdArrowsLoadProducts wdLoadMoreLoadProducts wdUpdateWishlist wdQuickViewOpen wdQuickShopSuccess wdProductBaseHoverIconsResize wdRecentlyViewedProductLoaded updated_checkout updated_cart_totals', function () {
		woodmartThemeModule.btnsToolTips();
	});

	woodmartThemeModule.$document.on('wdUpdateTooltip', function (e, $this) {
		woodmartThemeModule.updateTooltip($this);
	});

	$.each([
		'frontend/element_ready/wd_products.default',
		'frontend/element_ready/wd_products_tabs.default',
		'frontend/element_ready/wd_single_product_nav.default',
		'frontend/element_ready/wd_single_product_size_guide_button.default',
		'frontend/element_ready/wd_single_product_compare_button.default',
		'frontend/element_ready/wd_single_product_wishlist_button.default'
	], function(index, value) {
		woodmartThemeModule.wdElementorAddAction(value, function() {
			woodmartThemeModule.btnsToolTips();
		});
	});

	woodmartThemeModule.btnsToolTips = function() {
		// Bootstrap tooltips
		$(woodmart_settings.tooltip_top_selector).on('mouseenter', function() {
			var $this = $(this);
			var placement = getTooltipPosition($this);

			initTooltip($this, placement);
		});
		document.querySelectorAll(woodmart_settings.tooltip_top_selector).forEach(el => {
			el.addEventListener('touchstart', function(event) {
				var $this = $(this);
				var placement = getTooltipPosition($this);

				initTooltip($this, placement);
			}, { passive: true });
		});

		$(woodmart_settings.tooltip_left_selector).on('mouseenter', function() {
			initTooltip($(this), woodmartThemeModule.$body.hasClass('rtl') ? 'right' : 'left');
		});
		document.querySelectorAll(woodmart_settings.tooltip_left_selector).forEach(el => {
			el.addEventListener('touchstart', function(event) {
				initTooltip($(this), woodmartThemeModule.$body.hasClass('rtl') ? 'right' : 'left');
			}, { passive: true });
		});

		function initTooltip( $this, placement ) {
			if ((! $this.hasClass('wd-hint') && ! $this.closest('.wd-review-likes').length && woodmartThemeModule.windowWidth <= 1024) || $this.hasClass('wd-tooltip-inited') || $this.hasClass('wd-with-html')) {
				return;
			}

			$this.tooltip({
				animation: false,
				container: 'body',
				trigger  : 'hover',
				boundary: 'window',
				placement: placement,
				title    : function () {
					var $this = $(this);

					if ($this.find('.added_to_cart').length > 0) {
						return $this.find('.add_to_cart_button').text();
					}

					if ($this.find('.add_to_cart_button').length > 0) {
						return $this.find('.add_to_cart_button').text();
					}

					if ($this.find('.wd-swatch-text').length > 0) {
						return $this.find('.wd-swatch-text').text();
					}

					if ($this.closest('.wd-review-likes').length) {
						return woodmart_settings.review_likes_tooltip;
					}

					return $this.text();
				}
			});

			$this.tooltip('show');

			$this.addClass('wd-tooltip-inited');
		}

		$('.wd-tooltip.wd-with-html').each(function() {
			var $this = $(this);
			var timeout;

			$this.on('mouseenter touchstart', { passive: true }, function() {
				if (!$(this).hasClass('wd-tooltip-inited')) {
					initHtmlTooltips($this);
				}

				$this.tooltip('show');

				$('#' + $this.attr('aria-describedby'))
					.on('mouseenter touchstart', { passive: true }, function() {
						clearTimeout(timeout);
					})
					.on('mouseleave touchend', { passive: true }, function() {
						clearTimeout(timeout);

						timeout = setTimeout(function() {
							$this.tooltip('hide');
						}, 100);
					});
			});

			$this.on('mouseleave touchend', { passive: true }, function() {
				clearTimeout(timeout);

				timeout = setTimeout(function() {
					$this.tooltip('hide');

					$('#' + $this.attr('aria-describedby')).off('mouseenter mouseleave touchstart touchend');
				}, 100);
			});
		});

		function initHtmlTooltips($el) {
			$el.tooltip({
				animation: false,
				container: 'body',
				trigger: 'manual',
				boundary: 'window',
				placement: 'top',
				sanitize: false,
				html: true,
				title: function() {
					return $(this).html();
				}
			});

			$el.addClass('wd-tooltip-inited');
		}

		function getTooltipPosition($el) {
			if ( ! $el.is('[class*="wd-tooltip-"]') ) {
				return 'top';
			}

			let placement = 'top';
			const classes = $el.attr('class').split(' ');

			for (let i = 0; i < classes.length; i++) {
				if (classes[i].indexOf('wd-tooltip-') === 0) {
					placement = classes[i].replace('wd-tooltip-', '');
				}
			}

			if ('start' === placement) {
				placement = woodmartThemeModule.$body.hasClass('rtl') ? 'right' : 'left';
			} else if ('end' === placement) {
				placement = woodmartThemeModule.$body.hasClass('rtl') ? 'left' : 'right';
			}

			return placement;
		}
	};

	woodmartThemeModule.updateTooltip = function($this) {
		var $tooltip = $($this);

		if ( !$tooltip.hasClass('wd-tooltip-inited') ) {
			$tooltip = $tooltip.parent('.wd-tooltip-inited');
		}

		if (woodmartThemeModule.windowWidth <= 1024 || !$tooltip.hasClass('wd-tooltip-inited') || 'undefined' === typeof ($.fn.tooltip) || !$tooltip.is(':hover')) {
			return;
		}

		$tooltip.tooltip('show');
	};

	$(document).ready(function() {
		woodmartThemeModule.btnsToolTips();
	});
})(jQuery);


Youez - 2016 - github.com/yon3zu
LinuXploit