PageSourceSearch

https://www.welcomebank.co.kr/web/cmn/js/pc/ext/ext_keypad.js?v=202609241

js welcomebank.co.kr collected 2026-09-24 10:52:07 UTC 8,953 bytes, 251 lines download raw bytes

1/*
2 * @설 명 : 가상 키패드 설정 스크립트.
3 * @dependency : jQuery-1.8 이상 버전.
4 * @2단계까지의 name space 는 package.js 에 정의 되어 있다.
5 * @===========================================================================
6 * @변경이력:
7 * @DATE AUTHOR DESCRIPTION
8 * @---------------------------------------------------------------------------
9 * @변경 이력은 이곳에 추가 합니다.
10 */
11
12(function ($) {
13	/**
14	 * ECMAScript 5 Strict Mode.
15	 */
16	"use strict";
17	// Active-X 용
18	var transkey_url='/3rdparty/raon/Transkey/transkey';
19	var transkey_surl ='/transkeyServlet';
20	document.write('<script type="text/javascript" src="'+transkey_url+'/rsa_oaep_files/rsa_oaep-min.js"></script>');
21	document.write('<script type="text/javascript" src="'+transkey_url+'/jsbn/jsbn-min.js"></script>');
22	document.write('<script type="text/javascript" src="'+transkey_url+'/TranskeyLibPack_op.js"></script>');
23	document.write('<script type="text/javascript" src="/3rdparty/raon/Transkey/transkey/transkey.js"></script>');
24	
25	// non Active-X 용
26	/*var touchenexBaseDir = "/3rdparty/raon/TouchEn";
27	document.write("<script type='text/javascript' charset='utf-8' src='" + touchenexBaseDir + "/cmn/exinstall.js'></script>");
28	document.write("<script type='text/javascript' charset='utf-8' src='" + touchenexBaseDir + "/cmn/exproto.js'></script>");
29
30	document.write("<script type='text/javascript' charset='utf-8' src='" + touchenexBaseDir + "/nxKey/js/TouchEnNxKey_Interface.js'></script>");
31	document.write("<script type='text/javascript' charset='utf-8' src='" + touchenexBaseDir + "/nxKey/js/TouchEnNxKey.js'></script>");
32	document.write("<script type='text/javascript' charset='utf-8' src='" + touchenexBaseDir + "/nxFw/js/TouchEnNxFirewall_Interface.js'></script>");
33	document.write("<script type='text/javascript' charset='utf-8' src='" + touchenexBaseDir + "/nxFw/js/TouchEnNxFirewall.js'></script>");*/
34	/**
35	 * 가상 키패드(nFilter) 설치 클래스.
36	 * 
37	 * @class
38	 * @param device
39	 */
40	ext.keyPad = function (device) {
41		/** 경로 셋팅 */
42		this.ipath = '/3rdParty/nshc/';
43		/** 가상키패드 디바이스 종류. */
44		this.device = device;
45		/** nFilter 암호화 수행 모듈 경로. */
46		this.nFilterUrl = '/3rdParty/nshc/nfilter/jsp/encryption.jsp';
47		/** 가사키패드 적용 필드 객체 배열. */
48		this.nFields = [];
49		/** 금액 필드 배열 */
50		this.moneyFields = [];
51		this.nFieldCryptKeys = [];
52
53		if (this.device == 'M') {
54			this.NFILTERSET = 1; // 필드 클릭하여 가상키보드 실행
55		} else {
56			if (IS_WIN)
57				this.NFILTERSET = 7; // 버튼 사용, 직접입력 사용, 한번 가상키보드 실행했으면 필드 클릭하여 가상키보드 실행, 직접입력이었으면 계속 직접입력
58			else {
59				this.NFILTERSET = 9; // 버튼 사용, 필드 클릭하면 가상키보드 실행(직접입력 할 수 없음)
60			}
61		}
62
63		/** 언어 */
64		this.locale = LOCALE.toLowerCase();
65		/** 언어코드 설정 **/
66		//setNFilterLanguage(this.locale);
67		
68		/** 사용자가 입력한 값을 특정 위치에 보여지게 하는 옵션. */
69//		nFilterPreview(false);
70		/** 타이틀 화면에 보여질지 여부 옵션. */
71//		nFilterInfoTitleEnabled(false);
72		/** 로딩바가 화면에 보여질지 여부 옵션. */
73//		setNFilterLoadingEnabled(false);
74		//setNFilterLoadingStatusEnable(true);
75		/** 이미지 경로 셋팅. */
76//		setImgPath(this.ipath);
77	};
78
79	/**
80	 * 가상 키패드 메서드.
81	 */
82	ext.keyPad.prototype = {
83		/**
84		 * 가상 키패드 초기화.
85		 * 
86		 * @param form
87		 */
88		init : function (form) {
89			// 언어 설정.
90//			nfGlobalLanguage = this.locale.toLowerCase();
91
92			// 필드 목록 초기화
93			this.nFields = [];
94
95//			setNFilterTMT("true"); // form 이 각각 초기화 되어도 동일한 치환테이블값을 설정하는 옵션
96//			setFormTemp(true, form.name); // form 태그에 암호화 데이타 저장할 히든필드 설정이 필요할 시 
97
98			// 필드 설정.
99			this.setField(form);
100
101			// 적용 필드가 있다면 가상키패드 초기화.
102			/*if (this.nFields.length > 0) {
103//				// 금액 필드 설정.
104				if (this.moneyFields.length > 0)
105//					setMoneyField(true, this.moneyFields.join('|'));
106					setNFilterMoneyFormatting(this.moneyFields.join('|'));
107				if (this.device == 'M') {
108//					setNFilterMobileInit(this.nFilterUrl); // 모바일
109				} else {
110					setNFilterEnableNoSecret(true);
111					nFilterKeypadInit(parseInt("1111", 2), true, false, '', this.nFields[0].name);
112				}
113			}*/
114		},
115		/**
116		 * 가상 키패드 field setting.
117		 * 
118		 * @param form
119		 */
120		setField : function (form) {
121			var $this = this;
122
123			var inputs = $(form || document.body).find(':input').filter('[class*=vkey]');
124			var encInputs = $(form || document.body).find(':input').filter('[enc*=on]');
125			
126			$(encInputs).each(function (inx) {
127				var cls = getClassName(this, 'filter');
128				if(cls.indexOf(':money') > -1 || cls.indexOf(':num') > -1){
129					//if(cls.indexOf(':eng') == 0 || cls.indexOf(':kor') == 0 || cls.indexOf(':spec') == 0){
130						if(cls.indexOf(':money') > -1){
131							$(this).attr("data-datatype", "money");
132						}else{
133							$(this).attr("data-datatype", "n");
134						}
135						$(this).addClass("e2e");	
136					//}
137				}
138			});
139
140			$(inputs).each(function (inx) {
141
142				var cls = getClassName(this, 'vkey');
143				// id 속성 없으면 생성해준다.
144				if (!this.id)
145					$(this).attr('id', this.name);
146
147				// 버튼 없는 키패드. 
148				if ($this.device != 'M' && cls.indexOf(':nobtn') > -1) {
149					// WIDOW 는 버튼이 없으면 가상 키패드 적용 안함.
150					if (IS_WIN ){
151						return;
152					} else {
153						//$this.NFILTERSET = 8;
154					}
155				}
156				if($("#"+this.id+"_tk_btn").length > 0){
157					return;
158				}
159				/*var html = "<div class=\"fL lH30\">";
160				html += "<span id="+this.id+"_tk_btn style=\"line-height: 24px; margin-left: 5px;\"> 마우스로 입력</span>";
161				html += "</div>";*/
162				
163				var html = "<span id="+this.id+"_tk_btn style=\"line-height: 24px; margin-left: 5px;\"> 마우스로 입력</span>";
164				
165				if(cls.indexOf(':num') > -1){
166					$(this).attr("data-tk-kbdType", "number");
167					$(this).after(html);
168				}else if (cls.indexOf(':qwe') > -1){
169					$(this).attr("data-tk-kbdType", "qwerty");
170					$(this).after(html);
171				}
172				
173				$(this).attr("onclick", "tk.onKeyboard(this)");
174				
175			});
176		},
177		/**
178		 * 키패드 입력값을 암호화 해서 nfilterPwd input 에 담는다.
179		 * 
180		 * @param form
181		 */
182		encrypted : function (form) {
183			var inputs = $(form || document.body).find(':input').filter('[class*=vkey]');
184			if ($(inputs).size() > 0) {
185				for ( var i=0; i<this.nFieldCryptKeys.length; i++){
186					if ( $(form).find("#"+this.nFieldCryptKeys[i]).size() > 0 ){
187						var edata = nFilterInputEncrypt(this.nFieldCryptKeys[i]);
188						$(form).find("#"+this.nFieldCryptKeys[i]).val(edata);
189					}
190				}
191			}
192		},
193		/**
194		 * 가상키패드로 입력시 버튼 입력 콜백.
195		 * 
196		 * @param {Object} fnc.
197		 */
198		setCallback : function (fnc) {
199			nFilterCallback = function (obj) {
200				fnc(obj);
201			};
202		},
203		
204		nfilterKeyShow : function(displayElementId, checkboxName, cls, keypadTypeBinary, formId){
205			var form = $('#'+formId); 
206			if ( form.find("#"+checkboxName).is(':checked') == true ){
207				var type = (form.find("#"+displayElementId).attr("type") == "password" ? false : true);
208				nFilterKeypadShow(keypadTypeBinary, type, '', displayElementId);
209				nFilterCallback = function(value) {
210					if ( value == "close"){
211						form.find("#"+checkboxName).attr("checked", false);
212						if ( IS_WIN ){
213							if ( IS_OPERA && navigator.userAgent.indexOf("Version/12.") > -1){
214								form.find("#"+displayElementId).attr("readonly", 'readonly');
215							} else {
216								form.find("#"+displayElementId).removeAttr("readOnly");
217							}
218						} else {
219							form.find("#"+displayElementId).attr("readOnly", 'readonly');
220						}
221						
222						form.find("#"+displayElementId).focus();
223					}
224				};
225			} else {
226				if ( IS_WIN ){
227					if ( IS_OPERA && navigator.userAgent.indexOf("Version/12.") > -1){
228						form.find("#"+displayElementId).attr("readOnly", 'readonly');
229					} else {
230						form.find("#"+displayElementId).removeAttr("readOnly");
231					}
232				} else {
233					form.find("#"+displayElementId).attr("readOnly", 'readonly');
234				}
235				form.find("#"+displayElementId).focus();
236				form.find("#"+displayElementId).val('');
237				form.find("#"+displayElementId+"_nfilter_sec").val('');
238			}
239		}
240	};
241})(jQuery);
242
243/**
244 * 가상키패드가 실행될때 호출된다.<br>
245 * 가상키패드의 타입을 설정해준다.
246 * 
247 * @returns
248 */
249function getDomainInfo () {
250	return ExeKeyPad.NFILTERSET;
251}

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.