PageSourceSearch

http://www.koreafashion.org/js/dev.js

js koreafashion.org collected 2026-10-04 07:59:26 UTC 4,782 bytes, 193 lines download raw bytes

1/***
2현재 프로젝트 전용  스크립트 소스들.
3*/
4$(function(){
5	initForCommon();
6});
7
8
9
10
11
12
13/***
14	기본적인 공통으로 실행되어야 하는 스크립트들
15***/
16function initForCommon(){
17	$('#email2').change(function(){
18		chgDomains(this);
19	});
20	if($("[name=directEmail]").size() > 0){
21		if($('#email2').val() == ""){
22			$('#email2').val("직접 입력");
23			var _this = $('#email2').get(0);
24			chgDomains(_this);
25			$('#email2').val($("[name=directEmail]").val().split("@")[1]);
26		}
27	}
28	//$('[type=password][name*=password]').attr("placeholder", "최소8자, 숫자+영문 혼용");
29}
30
31
32
33/***
34email 셀렉트 옵션에 직접 입력 추가 스크립트.
35직접선택이 선택 됬을 경우 select를 span으로 감싸고 그 span에 input에 select의 id, name을 부여하고 select의 id, name을 제거한다.
36!(직접선택이 선택 됬을 경우) 직접선택으로 생겨난 input을 지우고 감싸던 span을 없앤다.
37param _this : select
38***/
39function chgDomains(_this){
40	var $_this = $(_this);
41	if( _this.value == '직접 입력' ) {
42		if( _this.parentNode.tagName.toUpperCase() != 'SPAN' ){
43			$_this.wrap("<span></span>");
44			var _attrId = $_this.attr("id");
45			var _attrName = $_this.attr("name")
46			$_this.parent().prepend("<input type='text' id='"+_attrId+"' name='"+_attrName+"'maxlength='100' class='inputEmail02'/> ");
47			$_this.attr("id", "");
48			$_this.attr("name", "");
49			$_this.prev().focus();
50		}
51	}else{
52		if( _this.parentNode.tagName.toUpperCase() == 'SPAN' ){
53			var _attrId = $_this.parent().find('input').attr("id");
54			var _attrName = $_this.parent().find('input').attr("name")
55			$_this.attr("id", _attrId);
56			$_this.attr("name", _attrName);
57			$_this.parent().find('input').remove();
58			$_this.unwrap();
59		}
60	}
61}
62
63
64
65
66// 휴대폰번호 4자리를 입력 시 다음 부분으로
67function evtKeyUp_move4word( _this){
68	var $this = $(_this);
69	if($this.val().length ==4)
70		$this.next().focus();
71}
72
73
74
75/***
76	placeholder가 안되는 브라우져에서 
77	value 로 대체
78***/
79function setPlaceHolderHtml4(targ, _val){
80	var $targ = $(targ);
81	if($targ.val() == "") $targ.val( _val);
82	$targ.bind('focus', function(){
83		if($targ.val() == _val) $targ.val( "");
84	});
85	$targ.bind('blur', function(){
86		if($targ.val() == "") $targ.val( _val );
87	});
88
89}
90
91
92
93
94
95//모바일(스마트폰+태블릿)일 때 실행 될 스크립트
96function isMobileTablet(){
97	if(navigator.userAgent.match(/Android|Mobile|iP(hone|od|ad)|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/)){
98		return true;
99	}else{
100		return false;
101	}
102}
103
104
105
106// 오직 숫자만
107var numValue_past = '';
108function isOnlyNumberNotHypen(obj){
109	var exp = /[^0-9+]/g;
110	if ( exp.test(obj.value) ) {
111		//alert("숫자만 입력가능합니다.");
112		obj.value = numValue_past;
113		obj.focus();
114	}else{
115		numValue_past = obj.value;
116	}
117}
118
119/***
120	param1 : 이벤트 부여 할 작은 체크박스들
121	param2 : 이벤트로 인해 체크제어 해줄 allCheckbox
122*/
123function evtAllCheckProp(selector, allCheckSelector){
124	$(selector).click(function(){
125		if( $(selector).size() == $(selector).filter('input:checked').size() ){
126			$(allCheckSelector).prop('checked', true);
127		}else{
128			$(allCheckSelector).prop('checked', false);
129		}
130	});
131	$(allCheckSelector).click(function(){
132		if( allCheckSelector.prop('checked')) selector.prop('checked', true);
133		else selector.prop('checked', false);
134	});
135}
136
137//무한 카테고리 생성
138function fn_select_category(obj){
139	
140	var category = $(obj).val();
141	var groupCategoryObj = $(obj).closest("#groupCategory");
142	var key = ($(obj).parent().index()+1);
143	var pcsorts = (key+1);
144	
145	$.post("/manage/include/productCategory/productCategorySelect.jsp",
146	{
147		rel_code:category,
148		pcsorts : pcsorts
149		
150	},function(data){
151		console.log($(obj))
152		$(obj).parent().nextAll().remove();
153		if(data.trim() == "0"){
154							
155		}else{
156			if($(obj).parent().next().size() > 0){
157				$(obj).parent().next().html(data);	
158			}else{
159				$(groupCategoryObj).append("<span>"+data+"</span>");
160			}
161			
162		}
163		
164	}).fail(function(error){
165		alert(error);
166	});
167	
168	var result = '';
169	$('[name=categoryFks]').each(function(i) {
170		if (i > 0) result += ',';
171		result += this.value;
172	});
173	$('[name=category]:eq(0)').val(result);
174}
175
176
177function fn_select_category_value(value){
178	
179	$.post("/manage/include/productCategory/productCategorySelectList.jsp",
180	{
181		paramCategoryfk:value
182		
183	},function(data){
184		if(data.trim() == "0"){
185							
186		}else{
187			$("#groupCategory").append(data);
188		}
189		
190	}).fail(function(error){
191		alert(error);
192	})
193}

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.