PageSourceSearch

https://www.shahrsakhtafzar.com/fa/components/com_jsn/assets/js/name.js

js shahrsakhtafzar.com collected 2026-10-02 10:10:35 UTC 2,816 bytes, 57 lines download raw bytes

1jQuery(document).ready(function($){
2	// Name Field
3	$('#jform_firstname,#jform_secondname,#jform_lastname').change(function(){
4		var name='';
5		if($('#jform_firstname').length && $('#jform_firstname').val()!='') name=name+$('#jform_firstname').val();
6		if($('#jform_secondname').length && $('#jform_secondname').val()!='') name=name+' '+$('#jform_secondname').val();
7		if($('#jform_lastname').length && $('#jform_lastname').val()!='') name=name+' '+$('#jform_lastname').val();
8		$('#jform_name').val(name);
9	});
10	// Url Fields
11	$('input[type="url"]').blur(function(){
12		var value=$(this).val();
13		if(value!='' && value.indexOf('http://')<0 && value.indexOf('https://')<0) $(this).val('http://'+value);
14	});
15	// Normalize Form
16	if($("#member-profile .control-group,#member-profile .form-group,#member-registration .control-group,#member-registration .form-group").length==0){
17		$("#member-registration .control-label").next().addClass("controls").each(function(){
18			if($(this).parent(".privacy").length==0) $(this).parent().attr("class","control-group");
19			else $(this).parent().attr("class","control-group privacy");
20		});
21
22	}
23	// Patter Validator
24	try {
25		document.formvalidator.setHandler('pattern', function(value, element) {
26				    value = punycode.toASCII(value);
27		 	 	 	var regex = new RegExp('^'+element.attr('pattern')+'$', "g");
28		 	 	 	return regex.test(value);
29 	 	 	
30 	 	});
31	}
32	catch(err) {}
33});
34jQuery(window).load(function(){
35	if(jQuery('#user-form[name="adminForm"],#profile-form[name="adminForm"]').length){
36		jQuery('#myTabTabs a:not([href*="jsn_"])').each(function(){
37			jQuery('#myTabTabs').append(jQuery(this).parent());
38		});
39		jQuery('#myTabTabs a[href="#details"],#myTabTabs a[href="#account"]').prepend('<i style="margin-right: .25em;" class="icon icon-joomla"></i>');
40		jQuery('#myTabTabs a[href="#groups"]').prepend('<i style="margin-right: .25em;" class="icon icon-users"></i>');
41		jQuery('#myTabTabs a[href="#settings"],#myTabTabs a[href="#attrib-settings"]').prepend('<i style="margin-right: .25em;" class="icon icon-cog"></i>');
42		jQuery('#myTabTabs a[href*="jsn_"]').prepend('<i style="margin-right: .25em;" class="icon icon-user"></i>');
43		jQuery('#myTabTabs a').click(function(){
44			jQuery(this).tab('show');
45			setTimeout(function(){jQuery('.jsn_map').each(function(){
46				var id=jQuery(this).attr("id").substr(4);
47				var center = jQuery("#jform_"+id).geocomplete('map').getCenter();
48				google.maps.event.trigger(jQuery("#jform_"+id).geocomplete('map'), "resize");
49				jQuery("#jform_"+id).geocomplete('map').setCenter(center);
50				jQuery("#jform_"+id).geocomplete('map').setZoom(jQuery("#jform_"+id).geocomplete('options').maxZoom);
51			})
52		},100);
53			return false;
54		});
55		if(jQuery('#details.active,#account.active').length) jQuery('#myTabTabs li:first a').click();
56	}
57});

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.