Переглянути джерело

불필요한 파일 삭제

gagamel 4 роки тому
батько
коміт
15013f6c90
1 змінених файлів з 0 додано та 129 видалено
  1. 0 129
      src/main/webapp/ux/plugins/gaga/gaga.smarteditor.js

+ 0 - 129
src/main/webapp/ux/plugins/gaga/gaga.smarteditor.js

@@ -1,129 +0,0 @@
-/*
- * Smart Editor Java Script written by gagamel.
- *
- * Copyright (c) 2010 gagamel
- * Dual licensed under GPL (GPL-LICENSE.txt) licenses.
- *
- * $Date: 2019-07-02 $
- *
- * 사용 예)
- * 		// HTML 태그는 textarea로 구성
- * 		// id는 gagaSe.createSmartEditor 함수 호출 시에 넘겨줘야 한다.
- * 		<textarea name="contentKorWeb" id="contentKorWeb" rows="5" cols="50" style="width: 100%; height: 400px;"></textarea>
- *
- * 		// Import할 자바스크립트 파일
- * 		<script type="text/javascript" src="/smartEditor/js/HuskyEZCreator.js?v=2019070303" charset="utf-8"></script>
- * 		<script type="text/javascript" src="/ux/plugins/gaga/gaga.smarteditor.js?v=2019070301"></script>
- *
- * 		<script type="text/javascript">
- * 			// Get a SmartEditor options
- * 			var seOptions = gagaSe.getEditorOptions();
- *
- * 			$(document).ready(function() {
- * 				// Create a SmartEditor
- * 				gagaSe.createSmartEditor(seOptions, 'contentKorWeb');
- * 			});
- * 		</script>
- */
-
-var gagaSe = {
-	obj : {
-		oEditors : []
-	},
-
-	/**
-	 * Get a Smart Editor options
-	 */
-	getEditorOptions : function() {
-		return {
-				oAppRef: this.obj.oEditors,
-				sSkinURI: '/smartEditor/SEditorSkin.html',
-				htParams : {
-					bUseToolbar : true, // 툴바사용
-					bUseVerticalResizer : true, // 입력창크기조절바사용
-					bUseModeChanger : true, // 모드탭(Editor|HTML|TEXT)사용
-					fOnBeforeUnload : function() {
-					}
-				},
-
-				fCreator: 'createSEditorInIFrame'
-		};
-	},
-
-	/**
-	 * Create a Smart Editor
-	 * @param editorId - 에디터 ID
-	 */
-	createSmartEditor : function(editorOptions, editorId) {
-		editorOptions.elPlaceHolder = editorId;
-		nhn.husky.EZCreator.createInIFrame(editorOptions);
-	},
-
-	/**
-	 * 스마트에디터에 입력한 내용이 editorId로 지정된 textarea에 설정되고,
-	 * textarea에 설정된 값을 반환한다.
-	 * @param editorId - 에디터 ID
-	 */
-	getContents : function(editorId) {
-		this.obj.oEditors.getById[editorId].exec("UPDATE_IR_FIELD", []);
-		return document.getElementById(editorId).value;
-	},
-
-	setContents : function(editorId, content) {
-		var newContent = "";
-		if (content != null) {
-			newContent = content.replaceAll("&lt;", "<").replaceAll("&gt;",">").replaceAll("&quot;","\"");
-		}
-
-		try {
-			this.obj.oEditors.getById[editorId].exec("SET_IR", [newContent]);
-		} catch(e) {
-			$('#'+editorId).val(newContent);
-		}
-	},
-
-	/**
-	 * @type   : function
-	 * @access : public
-	 * @desc   : 스마트에디터 유효성 검사
-	 * <pre>
-	 *     gagaSe.getContents('contentKorWeb');
-	 *     getContents 를 먼저 해줘야 textarea에 스마트에디터 내용이 들어간다.
-	 *     if (!gagaSe.validationCheck($('#registerwebKorViewYn') , $('#contentKorWeb'))) return;
-	 *     또는
-	 *     if (!gagaSe.validationCheck($('#detailForm input:checkbox[name=webKorViewYn]') , $('#detailForm textarea[name=contentKorWeb]'))) return;
-	 * </pre>
-	 * @param  : elTarget - 국가/디바이스 스마트에디터(필수)
-	 * @param  : elCheck - 국가/디바이스 체크박스(옵션)
-	 * @since  : 2019/08/21
-	 * @author : rladbwnd5
-	 */
-	validationCheck : function(elTarget, elCheck) {
-		if (elTarget.prop('tagName') != 'TEXTAREA') {
-			mcxDialog.alert('파라메터 입력 오류');
-			console.log('입력하신 파라메터는 ' + elTarget.prop('tagName') + '입니다. textarea를  입력하세요.');
-			return false;
-		}
-
-		var checkStr = $(elTarget).val().replaceAll("<p>", "").replaceAll("</p>","").replaceAll("<br>","").replaceAll("<span style=\"white-space:pre\">","").replaceAll("&nbsp;","").replaceAll("</span>","");
-		var checked = $(elCheck).is(":checked") ? true : false;
-
-		if (checked) {
-			if (gagajf.isNull(checkStr)) {
-				var TargetNm = $(elCheck)[0].labels[0].textContent;
-				mcxDialog.alert(TargetNm + '에 체크된 내용을 입력하세요.');
-				return false;
-			}
-		} else {
-			if (elCheck == null) {
-				if (gagajf.isNull(checkStr)) {
-					mcxDialog.alert('내용을 입력하세요.');
-					return false;
-				}
-			}
-		}
-
-		return true;
-	}
-
-}