PageSourceSearch

https://www.wizo.org/wp-content/plugins/web3d-donations/assets/js/…&ver=2b8650c19cf404e05ac6c19fb0b7083f

js wizo.org collected 2026-09-24 22:28:15 UTC 13,368 bytes, 446 lines download raw bytes

1/**
2 * Plugin Name: gDonations WEB3D *
3 * ***************************** *
4 * jQuery *
5 * ***************************** *
6*/
7jQuery('document').ready(function($){
8	/***************************************************************************************
9	 * 	 Change currency simbol
10	 *	 #nav-monthly
11	 ***************************************************************************************
12	 */
13	$('#currency_mntl').change(function(){
14		var currency = $(this).val();
15		if(currency == 'ILS'){
16			$('.currency_simbol_mntl, .currency_simbol_modal').html("₪");
17		}else if(currency == 'USD'){
18			$('.currency_simbol_mntl, .currency_simbol_modal').html("$");
19		}else if(currency == 'EUR'){
20			$('.currency_simbol_mntl, .currency_simbol_modal').html("€");
21		}
22	});
23	// #nav-otime
24	$('#currency_otime').change(function(){
25		var currency = $(this).val();
26		if(currency == 'ILS'){
27			$('.currency_simbol_mntl, .currency_simbol_modal').html("₪");
28		}else if(currency == 'USD'){
29			$('.currency_simbol_mntl, .currency_simbol_modal').html("$");
30		}else if(currency == 'EUR'){
31			$('.currency_simbol_mntl, .currency_simbol_modal').html("€");
32		}
33	});
34	// #nav-projects
35	$('#currency_pj').change(function(){
36		var currency = $(this).val();
37		//alert(currency);
38
39		if(currency == 'ILS'){
40			$('.currency_simbol_mntl, .currency_simbol_modal').html("₪");
41			var ils_sh = $('option:selected', '#donationfor_pj').attr('data-pp_ils');
42			var ppshum = ils_sh;
43			$('#shum_pj').val(Number(ppshum).toFixed(2));
44			$("#shum_pj").addClass('is-valid');
45			//$('#shum_pj').attr({'disabled' : 'disabled'});
46
47		}else if(currency == 'USD'){
48			$('.currency_simbol_mntl, .currency_simbol_modal').html("$");
49			var dollar = $('option:selected', '#donationfor_pj').attr('data-pp_dollar');
50			var ppshum = dollar;
51			$('#shum_pj').val(Number(ppshum).toFixed(2));
52			$("#shum_pj").addClass('is-valid');
53			//$('#shum_pj').attr({'disabled' : 'disabled'});
54
55			// var exrates = $('option:selected', this).attr('data-exrates');
56			// var totasum	= $('option:selected', '#nprogect_pj').attr('data-ddsum');
57			// var exissum = $('option:selected', '#nprogect_pj').attr('data-eesum');
58
59			// console.log('exrates: '+exrates+' totasum: '+totasum+' exissum: '+exissum);
60
61			// var curTotalSum = totasum / exrates;
62			// var curExistSum = exissum / exrates;
63
64			// console.log('curTotalSum: '+curTotalSum+' curExistSum: '+curExistSum);
65
66			// $("#ddsum").html(curTotalSum);
67			// $("#eesum").html(curExistSum);
68
69		}else if(currency == 'EUR'){
70			$('.currency_simbol_mntl, .currency_simbol_modal').html("€");
71			var euro__ = $('option:selected', '#donationfor_pj').attr('data-pp_euro');
72			var ppshum = euro__;
73			$('#shum_pj').val(Number(ppshum).toFixed(2));
74			$("#shum_pj").addClass('is-valid');
75			//$('#shum_pj').attr({'disabled' : 'disabled'});
76			// var exrates = $('option:selected', this).attr('data-exrates');
77			// var totasum	= $('option:selected', '#nprogect_pj').attr('data-ddsum');
78			// var exissum = $('option:selected', '#nprogect_pj').attr('data-eesum');
79
80			// var curTotalSum = totasum * exrates;
81			// var cueExistSum = exissum * exrates;
82
83			// $("#ddsum").html(curTotalSum);
84			// $("#eesum").html(curExistSum);
85
86		}
87
88		var cmonth = $('#contmonth_pj').val();
89		//var fsum__ = $('#shum_pj').val();
90
91		$('#jsum-count').html(Number(ppshum).toFixed(2));
92		$('#mmont-pj').html(cmonth);
93
94		var fulsum = Number(ppshum) / cmonth;
95		$('#totalsum2pay_pj').html(fulsum.toFixed(2));
96
97	});
98
99	/***************************************************************************************
100	 * 	 Select sex
101	 *	 #nav-monthly
102	 ***************************************************************************************
103	 */
104	$(document).on('click', '#nav-monthly .sexdd', function(){
105		var gSex = $(this).attr('data-sex');
106		var cSex = $(this).attr('data-csex');
107		var iSex = $(this).attr('id');
108
109		//alert('gSex: '+gSex+' cSex: '+cSex+' iSex: '+iSex);
110		$('#sex_mntl_'+cSex).val(gSex);
111
112		/* sex_btn_m OR sex_btn_w */
113		if(iSex == 'sex_btn_m'+cSex){
114			$('#nav-monthly #sex_btn_w'+cSex).removeClass('selected');
115		}else if(iSex == 'sex_btn_w'+cSex){
116			$('#nav-monthly #sex_btn_m'+cSex).removeClass('selected');
117		}
118		
119		$(this).addClass('selected');
120	});
121	// #nav-otime
122	$(document).on('click', '#nav-otime .sexdd', function(){
123		var gSex = $(this).attr('data-sex');
124		var cSex = $(this).attr('data-csex');
125		var iSex = $(this).attr('id');
126
127		$('#sex_otime_'+cSex).val(gSex);
128
129		/* sex_btn_m OR sex_btn_w */
130		if(iSex == 'sex_btn_m'+cSex){
131			$('#nav-otime #sex_btn_w'+cSex).removeClass('selected');
132		}else if(iSex == 'sex_btn_w'+cSex){
133			$('#nav-otime #sex_btn_m'+cSex).removeClass('selected');
134		}
135		
136		$(this).addClass('selected');
137	});
138	// #nav-projects
139	$(document).on('click', '#nav-projects .sexdd', function(){
140		var gSex = $(this).attr('data-sex');
141		var cSex = $(this).attr('data-csex');
142		var iSex = $(this).attr('id');
143
144		$('#sex_pj_'+cSex).val(gSex);
145
146		/* sex_btn_m OR sex_btn_w */
147		if(iSex == 'sex_btn_m'+cSex){
148			$('#nav-projects #sex_btn_w'+cSex).removeClass('selected');
149		}else if(iSex == 'sex_btn_w'+cSex){
150			$('#nav-projects #sex_btn_m'+cSex).removeClass('selected');
151		}
152		$(this).addClass('selected');
153	});
154
155	/***************************************************************************************
156	 * 	 Activation paymethod
157	 *	 #nav-monthly
158	 *
159		#num_creditcard_mntl
160		#num_cctokef_mntl
161		#num_cckode_mntl
162		#dbit_mntl
163		#paypal_mntl
164	 ***************************************************************************************
165	 */
166
167    $('.selpaymethod_mntl').change(function(){
168		var name = $(this).attr('id');
169		//$(this).removeClass('is-valid');
170		if( name == 'paymethod_mntl_1' ){
171			// CreditCard
172			$(this).prop('checked', true);
173			//$(this).addClass('is-valid');
174  		return false;
175		}else if( name == 'paymethod_mntl_2' ){
176			// Bit
177			var cmonth = $("#contmonth_mntl").val();
178			//alert(cmonth);
179			if(cmonth > 1){
180				$("#iblock-newcalc").modal('show');
181			}
182			$(this).prop('checked', true);
183			$('#contmonth_mntl').val(1);
184
185			var fsum__ = $('#shum_mntl').val();
186			var fulsum = 1 * fsum__;
187			//alert(fulsum);
188
189			$('#msum-count').html(fsum__);
190			$('#mmont-montl').html('1');
191			$('#totalsum2pay_mntl').html(fulsum.toFixed(2));
192			// modal windows
193			$('#tsumm_modal').html(fsum__);
194			$('#totalsum2pay_modal').html(fulsum.toFixed(2));
195			//$(this).addClass('is-valid');
196  		return false;
197		}
198		if( name == 'paymethod_mntl_3' ){
199			// PayPal
200			$(this).prop('checked', true);
201			//$(this).addClass('is-valid');
202  		return false;
203		}
204	});
205	// #nav-otime
206	$('.selpaymethod_otime').change(function(){
207		var name = $(this).attr('id');
208		$(this).removeClass('is-valid');
209		if( name == 'paymethod_otime_1' ){
210			// CreditCard
211			$(this).prop('checked', true);
212			//$(this).addClass('is-valid');
213			return false;
214		}else if( name == 'paymethod_otime_2' ){
215			// Bit
216			var cmonth = $("#contmonth_otime").val();
217			//alert(cmonth);
218			if(cmonth > 1){
219				$("#iblock-newcalc").modal('show');
220			}
221			$(this).prop('checked', true);
222			$('#contmonth_otime').val(1);
223
224			var fsum__ = $('#shum_otime').val();
225			var fulsum = 1 * fsum__;
226			//alert(fulsum);
227			
228			$('#osum-count').html(fsum__);
229			$('#mmont-otime').html('1');
230			$('#totalsum2pay_otime').html(fulsum.toFixed(2));
231			// modal windows
232			$('#tsumm_modal').html(fsum__);
233			$('#totalsum2pay_modal').html(fulsum.toFixed(2));
234			//$(this).addClass('is-valid');
235			return false;
236		}else if( name == 'paymethod_otime_3' ){
237			// PayPal
238			$(this).prop('checked', true);
239			//$(this).addClass('is-valid');
240			return false;
241		}
242	});
243	// #nav-pj
244	$('.selpaymethod_pj').change(function(){
245		var name = $(this).attr('id');
246		$(this).removeClass('is-valid');
247		if( name == 'paymethod_pj_1' ){
248			// CreditCard
249			$(this).prop('checked', true);
250			//$(this).addClass('is-valid');
251			return false;
252		}else if( name == 'paymethod_pj_2' ){
253			// Bit
254			var cmonth = $("#contmonth_pj").val();
255			//alert(cmonth);
256			if(cmonth > 1){
257				$("#iblock-newcalc").modal('show');
258			}
259			$(this).prop('checked', true);
260			$('#contmonth_pj').val(1);
261
262			var fsum__ = $('#shum_pj').val();
263			var fulsum = 1 * fsum__;
264			//alert(fulsum);
265			
266			$('#jsum-count').html(fsum__);
267			$('#mmont-pj').html('1');
268			$('#totalsum2pay_pj').html(fulsum.toFixed(2));
269			// modal windows
270			$('#tsumm_modal').html(fsum__);
271			$('#totalsum2pay_modal').html(fulsum.toFixed(2));
272			//$(this).addClass('is-valid');
273			return false;
274		}else if( name == 'paymethod_pj_3' ){
275			// PayPal
276			$(this).prop('checked', true);
277			//$(this).addClass('is-valid');
278			return false;
279		}
280	});
281
282
283	/***************************************************************************************
284	 * 	 Activation use forms
285	 *	 #nav-monthly
286	 *
287	 ***************************************************************************************
288	 */
289	// $('#terms_mntl').change(function(){
290	// 	var status = $(this).prop('checked');
291	// 	//alert(status);
292	// 	if( status == false ){
293	// 		$('#submitData').attr('disabled', 'disabled');
294	// 	}else{
295	// 		$('#submitData').removeAttr('disabled');
296	// 	}
297	// });
298	// // #nav-otime
299	// $('#terms_otime').change(function(){
300	// 	var status = $(this).prop('checked');
301	// 	//alert(status);
302	// 	if( status == false ){
303	// 		$('#submitData2').attr('disabled', 'disabled');
304	// 	}else{
305	// 		$('#submitData2').removeAttr('disabled');
306	// 	}
307	// });
308	// // #nav-projects
309	// $('#terms_pj').change(function(){
310	// 	var status = $(this).prop('checked');
311	// 	//alert(status);
312	// 	if( status == false ){
313	// 		$('#submitData3').attr('disabled', 'disabled');
314	// 	}else{
315	// 		$('#submitData3').removeAttr('disabled');
316	// 	}
317	// });
318
319	$('#nprogect_pj').change(function(){
320		var valq = $(this).val();
321		//alert(valq);
322		if( valq == '0' ){
323			$('#donationfor_pj').attr('disabled', 'disabled');
324		}else{
325			console.log("#donationfor_pj: remove attr disabled");
326			$('#donationfor_pj').removeAttr('disabled');
327		}
328	});
329
330
331	/***************************************************************************************
332	 * 	 use forms
333	 *	 #nav-pj select pj
334	 *
335	 ***************************************************************************************
336	 */
337	$("#nprogect_pj").on('change', function(){
338		// #pj_infodata
339		var name = $('option:selected', this).val();
340		var desc = $('option:selected', this).attr('data-descr');
341		var dsum = $('option:selected', this).attr('data-ddsum');
342		var esum = $('option:selected', this).attr('data-eesum');
343		
344		var dollar = $('option:selected', this).attr('data-pp_dollar');
345		var euro__ = $('option:selected', this).attr('data-pp_euro');
346		var ils_sh = $('option:selected', this).attr('data-pp_ils');
347
348		var termid = $('option:selected', this).attr('data-parentid');
349
350		//var curren = $('#currency_pj option:selected').val();
351
352		$('option.default_opt').prop('selected', true);
353
354		$("option", "#donationfor_pj").css('display', 'none');
355		$(".hidden_group_dpj_"+termid).css('display', 'block');
356
357		// if(curren == 'ILS'){
358		// 	var ppshum = ils_sh;
359		// }else if(curren == 'USD'){
360		// 	var ppshum = dollar;
361		// }else if(curren == 'EUR'){
362		// 	var ppshum = euro__;
363		// }
364
365		$('.tpj_total').fadeIn();
366		$('#pj_name').html(name);
367		$("#pj_subname").html();
368		$('#ddsum').html(dsum);
369		$('#eesum').html(esum);
370		$('#pj_description').html(desc);
371
372		$('#shum_pj').val(); // ppshum
373		$("#shum_pj").addClass('is-invalid');
374
375		var cmonth = $('#contmonth_pj').val();
376		var fsum__ = $('#shum_pj').val();
377
378		$('#jsum-count').html(fsum__);
379		$('#mmont-pj').html(cmonth);
380		$('#totalsum2pay_pj').html(0); // fsum__ / cmonth
381	});
382
383	$("#donationfor_pj").on('change', function(){
384		var subname = $('option:selected', this).val();
385
386		if(subname != 'Custom sum'){
387			$("#shum_pj_div").fadeOut();
388			//$(this).addClass('is-valid');
389			return;
390		}
391	});
392
393	$("#donationfor_pj").on('change', function(){
394		var subname = $('option:selected', this).val();
395
396		if(subname == 'Custom sum'){
397			$("#shum_pj_div").fadeIn();
398			//$(this).addClass('is-valid');
399			return;
400		}
401
402		var dollar = $('option:selected', this).attr('data-pp_dollar');
403		var euro__ = $('option:selected', this).attr('data-pp_euro');
404		var ils_sh = $('option:selected', this).attr('data-pp_ils');
405
406		var curren = $('#currency_pj option:selected').val();
407
408		if(curren == 'ILS'){
409			var ppshum = ils_sh;
410		}else if(curren == 'USD'){
411			var ppshum = dollar;
412		}else if(curren == 'EUR'){
413			var ppshum = euro__;
414		}
415
416		$("#pj_subname").html(subname);
417
418		$('#shum_pj').val(ppshum);
419		$("#shum_pj").addClass('is-valid');
420
421		var cmonth = $('#contmonth_pj').val();
422		var fsum__ = $('#shum_pj').val();
423
424		$('#jsum-count').html(fsum__);
425		$('#mmont-pj').html(cmonth);
426
427		var fulsum = fsum__ / cmonth;
428		$('#totalsum2pay_pj').html(fulsum.toFixed(2));
429	});
430
431	$('#monthly_payments .badget-sum').on('click', function(){
432		$("#shum_mntl").addClass('in-valid');
433	});
434	$('#otime_payments .badget-sum').on('click', function(){
435		$("#shum_otime").addClass('in-valid');
436	});
437	$('#project_payments .badget-sum').on('click', function(){
438		//$("#shum_pj").attr('class', 'form-control is-valid');
439		$("#shum_pj").addClass('is-valid');
440	});
441
442
443/* -------------------------------------------------------------------------------*/
444/* --------------------------------END jQUERYS------------------------------------*/
445/* -------------------------------------------------------------------------------*/
446});

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.