PageSourceSearch

https://geonet.cl/wp-content/plugins/wedesigntech-directory-addon/modules/users/assets/frontend.js?ver=6.9.10

js geonet.cl collected 2026-10-08 05:47:34 UTC 4,243 bytes, 166 lines download raw bytes

1var dtDirectorySinglePageUsers = {
2
3	dtInit : function() {
4
5
6		// Author Swiper
7
8			var swiperGalleryIncharge = [];
9			var swiperInchargeIterator = 1;
10
11			jQuery('.dtdr-listings-author-container.swiper-container').each(function() {
12
13				var $swiperItem = jQuery(this);
14				var swiperUniqueId = 'swiperuniqueid-'+swiperInchargeIterator;
15
16				$swiperItem.attr('id', swiperUniqueId);
17
18				// Get swiper options
19
20				var slidesperview = parseInt($swiperItem.attr('data-carouselslidesperview'), 10);
21				var loopmode = true;
22				var mousewheelcontrol = true;
23
24				var pagination_class = '';
25				var pagination_type = '';
26
27				var pagination = ($swiperItem.attr('data-carouselpagination') != '') ? $swiperItem.attr('data-carouselpagination') : 'bullets';
28
29				if(pagination == 'bullets') {
30					var pagination_class = $swiperItem.find('.dtdr-swiper-bullet-pagination');
31					var pagination_type = 'bullets';
32				}
33
34				var spacebetween = parseInt($swiperItem.attr('data-carouselspacebetween'), 10);
35				if(spacebetween) {
36					spacebetween = spacebetween;
37				} else {
38					spacebetween = 0;
39				}
40
41				// Generate swiper
42				swiperGalleryIncharge[swiperUniqueId] = new Swiper('#'+swiperUniqueId, {
43
44					initialSlide: 0,
45					simulateTouch: true,
46					roundLengths: true,
47					keyboardControl: true,
48					paginationClickable: true,
49					autoHeight: true,
50					spaceBetween: spacebetween,
51
52					grabCursor: true,
53					slidesPerView: slidesperview,
54					loop:loopmode,
55					mousewheel: mousewheelcontrol,
56					direction: 'horizontal',
57
58					pagination: {
59						el: pagination_class,
60						type: pagination_type,
61						clickable: true,
62					},
63
64				});
65
66				if(pagination == 'arrows') {
67
68					$swiperItem.find('.dtdr-swiper-arrow-pagination .dtdr-swiper-arrow-prev').on('click', function(e) {
69						var swiperUniqueId = $swiperItem.attr('id');
70						swiperGalleryIncharge[swiperUniqueId].slidePrev();
71						e.preventDefault();
72					});
73
74					$swiperItem.find('.dtdr-swiper-arrow-pagination .dtdr-swiper-arrow-next').on('click', function(e) {
75						var swiperUniqueId = $swiperItem.attr('id');
76						swiperGalleryIncharge[swiperUniqueId].slideNext();
77						e.preventDefault();
78					});
79
80				}
81
82				swiperInchargeIterator++;
83
84			});
85
86
87		// Add to favourite author
88
89			jQuery( 'body' ).delegate( '.dtdr-listings-utils-favourite-author', 'click', function(e) {
90
91				if(!jQuery(this).hasClass('dtdr-login-link')) {
92
93					var this_item = jQuery(this);
94					var author_id = this_item.attr('data-authorid');
95					var user_id = this_item.attr('data-userid');
96
97					if(jQuery(this).hasClass('addtofavourite')) {
98						var favourite_label = 'addtofavourite';
99					} else {
100						var favourite_label = 'removefavourite';
101					}
102
103					jQuery.ajax({
104						type: "POST",
105						url: dtdrfrontendobject.ajaxurl,
106						data:
107						{
108							action: 'dtdr_listing_favourite_author_marker',
109							author_id: author_id,
110							user_id: user_id,
111						},
112						beforeSend: function(){
113							this_item.parents('.dtdr-listings-utils-favourite').prepend( '<span><i class="fa fa-spinner fa-spin"></i></span>' );
114						},
115						success: function (response) {
116							if(favourite_label == 'addtofavourite') {
117								this_item.html('<span class="fa fa-heart"></span>');
118								this_item.removeClass('addtofavourite');
119								this_item.addClass('removefavourite');
120							} else {
121								this_item.html('<span class="far fa-heart"></span>');
122								this_item.removeClass('removefavourite');
123								this_item.addClass('addtofavourite');
124							}
125						},
126						complete: function(){
127							this_item.parents('.dtdr-listings-utils-favourite').find("span:first").remove();
128						}
129					});
130
131				}
132
133				e.preventDefault();
134
135			});
136
137	}
138
139};
140
141jQuery(document).ready(function() {
142
143	"use strict";
144
145	if(!dtdrfrontendobject.elementorPreviewMode) {
146		dtDirectorySinglePageUsers.dtInit();
147	}
148
149});
150
151
152( function( $ ) {
153
154	"use strict";
155
156	var dtDirectorySinglePageUsersJs = function($scope, $){
157		dtDirectorySinglePageUsers.dtInit();
158	};
159
160    $(window).on('elementor/frontend/init', function(){
161		if(dtdrfrontendobject.elementorPreviewMode) {
162			elementorFrontend.hooks.addAction('frontend/element_ready/dtdr-widget-sp-author.default', dtDirectorySinglePageUsersJs);
163		}
164	});
165
166} )( jQuery );

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.