diff --git a/bbs/write.php b/bbs/write.php index 7f675d869..7d5bd3d47 100644 --- a/bbs/write.php +++ b/bbs/write.php @@ -96,12 +96,7 @@ if ($w == '') { alert('글을 답변할 권한이 없습니다.'.PHP_EOL.PHP_EOL.'회원이시라면 로그인 후 이용해 보십시오.', './login.php?$qstr&url='.urlencode($_SERVER['PHP_SELF'].'?bo_table='.$bo_table)); } - /* - if ($member['mb_point'] + $board['bo_comment_point'] < 0) - alert('보유하신 포인트('.number_format($member['mb_point']).')가 없거나 모자라서 글답변('.number_format($board['bo_comment_point']).')가 불가합니다.'.PHP_EOL.PHP_EOL.'포인트를 적립하신 후 다시 글답변 해 주십시오.'); - */ - - $tmp_point = $member['mb_point'] ? $member['mb_point'] : 0; + $tmp_point = isset($member['mb_point']) ? $member['mb_point'] : 0; if ($tmp_point + $board['bo_write_point'] < 0 && !$is_admin) alert('보유하신 포인트('.number_format($member['mb_point']).')가 없거나 모자라서 글답변('.number_format($board['bo_comment_point']).')가 불가합니다.'.PHP_EOL.PHP_EOL.'포인트를 적립하신 후 다시 글답변 해 주십시오.'); @@ -323,6 +318,7 @@ if (isset($write['wr_subject'])) { $subject = preg_replace("/\"/", """, get_text(cut_str($write['wr_subject'], 255), 0)); } +$content = ''; if ($w == '') { $content = $board['bo_insert_content']; } else if ($w == 'r') { diff --git a/bbs/write_update.php b/bbs/write_update.php index 365226283..77669e82c 100644 --- a/bbs/write_update.php +++ b/bbs/write_update.php @@ -1,8 +1,33 @@ lib)) include_once($captcha->lib); +$msg = array(); + +$wr_subject = ''; +if (isset($_POST['wr_subject'])) { + $wr_subject = trim($_POST['wr_subject']); +} +if ($wr_subject == '') { + $msg[] = '제목을 입력하세요.'; +} + +$wr_content = ''; +if (isset($_POST['wr_content'])) { + $wr_content = trim($_POST['wr_content']); +} +if ($wr_content == '') { + $msg[] = '내용을 입력하세요.'; +} + +$msg = implode('
', $msg); +if ($msg) { + alert($msg); +} + // 090710 if (substr_count($wr_content, '&#') > 50) { alert('내용에 올바르지 않은 코드가 다수 포함되어 있습니다.'); @@ -13,8 +38,9 @@ if (substr_count($wr_content, '&#') > 50) { $upload_max_filesize = ini_get('upload_max_filesize'); -if (empty($_POST)) - alert('파일 또는 글내용의 크기가 서버에서 설정한 값을 넘어 오류가 발생하였습니다.'.PHP_EOL.PHP_EOL.'post_max_size='.ini_get('post_max_size').' , upload_max_filesize='.$upload_max_filesize.PHP_EOL.PHP_EOL.'게시판관리자 또는 서버관리자에게 문의 바랍니다.'); +if (empty($_POST)) { + alert("파일 또는 글내용의 크기가 서버에서 설정한 값을 넘어 오류가 발생하였습니다.\\npost_max_size=".ini_get('post_max_size')." , upload_max_filesize=".$upload_max_filesize."\\n게시판관리자 또는 서버관리자에게 문의 바랍니다."); +} $w = $_POST['w']; $wr_link1 = mysql_real_escape_string($_POST['wr_link1']); @@ -24,30 +50,36 @@ $notice_array = explode(',', trim($board['bo_notice'])); if ($w == 'u' || $w == 'r') { $wr = get_write($write_table, $wr_id); - if (!$wr['wr_id']) - alert('글이 존재하지 않습니다.'.PHP_EOL.PHP_EOL.'글이 삭제되었거나 이동하였을 수 있습니다.'); + if (!$wr['wr_id']) { + alert("글이 존재하지 않습니다.\\n글이 삭제되었거나 이동하였을 수 있습니다."); + } } // 외부에서 글을 등록할 수 있는 버그가 존재하므로 비밀글은 사용일 경우에만 가능해야 함 -if (!$is_admin && !$board['bo_use_secret'] && $secret) +if (!$is_admin && !$board['bo_use_secret'] && $secret) { alert('비밀글 미사용 게시판 이므로 비밀글로 등록할 수 없습니다.'); +} // 외부에서 글을 등록할 수 있는 버그가 존재하므로 비밀글 무조건 사용일때는 관리자를 제외(공지)하고 무조건 비밀글로 등록 $secret = ''; -if (!$is_admin && $board['bo_use_secret'] == 2) +if (!$is_admin && $board['bo_use_secret'] == 2) { $secret = 'secret'; +} $html = ''; -if (isset($_POST['html']) && $_POST['html']) +if (isset($_POST['html']) && $_POST['html']) { $html = $_POST['html']; +} $mail = ''; -if (isset($_POST['mail']) && $_POST['mail']) +if (isset($_POST['mail']) && $_POST['mail']) { $mail = $_POST['mail']; +} $notice = ''; -if (isset($_POST['notice']) && $_POST['notice']) +if (isset($_POST['notice']) && $_POST['notice']) { $notice = $_POST['notice']; +} for ($i=1; $i<=10; $i++) { $var = "wr_$i"; @@ -58,30 +90,36 @@ for ($i=1; $i<=10; $i++) { } if ($w == '' || $w == 'u') { + // 김선용 1.00 : 글쓰기 권한과 수정은 별도로 처리되어야 함 - if($w =='u' && $member['mb_id'] && $wr['mb_id'] == $member['mb_id']) + if($w =='u' && $member['mb_id'] && $wr['mb_id'] == $member['mb_id']) { ; - else if ($member['mb_level'] < $board['bo_write_level']) + } else if ($member['mb_level'] < $board['bo_write_level']) { alert('글을 쓸 권한이 없습니다.'); + } // 외부에서 글을 등록할 수 있는 버그가 존재하므로 공지는 관리자만 등록이 가능해야 함 - if (!$is_admin && $notice) + if (!$is_admin && $notice) { alert('관리자만 공지할 수 있습니다.'); -} -else if ($w == 'r') -{ - if (in_array((int)$wr_id, $notice_array)) - alert('공지에는 답변 할 수 없습니다.'); + } - if ($member['mb_level'] < $board['bo_reply_level']) +} else if ($w == 'r') { + + if (in_array((int)$wr_id, $notice_array)) { + alert('공지에는 답변 할 수 없습니다.'); + } + + if ($member['mb_level'] < $board['bo_reply_level']) { alert('글을 답변할 권한이 없습니다.'); + } // 게시글 배열 참조 $reply_array = &$wr; // 최대 답변은 테이블에 잡아놓은 wr_reply 사이즈만큼만 가능합니다. - if (strlen($reply_array['wr_reply']) == 10) - alert('더 이상 답변하실 수 없습니다.'.PHP_EOL.PHP_EOL.'답변은 10단계 까지만 가능합니다.'); + if (strlen($reply_array['wr_reply']) == 10) { + alert("더 이상 답변하실 수 없습니다.\\n답변은 10단계 까지만 가능합니다."); + } $reply_len = strlen($reply_array['wr_reply']) + 1; if ($board['bo_reply_order']) { @@ -98,36 +136,33 @@ else if ($w == 'r') if ($reply_array['wr_reply']) $sql .= " and wr_reply like '{$reply_array['wr_reply']}%' "; $row = sql_fetch($sql); - if (!$row['reply']) + if (!$row['reply']) { $reply_char = $begin_reply_char; - else if ($row['reply'] == $end_reply_char) // A~Z은 26 입니다. - alert('더 이상 답변하실 수 없습니다.'.PHP_EOL.PHP_EOL.'답변은 26개 까지만 가능합니다.'); - else + } else if ($row['reply'] == $end_reply_char) { // A~Z은 26 입니다. + alert("더 이상 답변하실 수 없습니다.\\n답변은 26개 까지만 가능합니다."); + } else { $reply_char = chr(ord($row['reply']) + $reply_number); + } $reply = $reply_array['wr_reply'] . $reply_char; -} else + +} else { alert('w 값이 제대로 넘어오지 않았습니다.'); - - -if ($w == "" || $w == "r") -{ - if ($_SESSION["ss_datetime"] >= ($g4['server_time'] - $config['cf_delay_sec']) && !$is_admin) - alert('너무 빠른 시간내에 게시물을 연속해서 올릴 수 없습니다.'); - - set_session("ss_datetime", $g4['server_time']); - - // 동일내용 연속 등록 불가 - $row = sql_fetch(" select MD5(CONCAT(wr_ip, wr_subject, wr_content)) as prev_md5 from $write_table order by wr_id desc limit 1 "); - $curr_md5 = md5($_SERVER['REMOTE_ADDR'].$wr_subject.$wr_content); - if ($row['prev_md5'] == $curr_md5 && !$is_admin) - alert('동일한 내용을 연속해서 등록할 수 없습니다.'); -} +} if (!chk_captcha()) { alert('자동등록방지의 답변으로 입력한 숫자가 틀렸습니다.'); } +if ($w == '' || $w == 'r') { + if (isset($_SESSION['ss_datetime'])) { + if ($_SESSION['ss_datetime'] >= ($g4['server_time'] - $config['cf_delay_sec']) && !$is_admin) + alert('너무 빠른 시간내에 게시물을 연속해서 올릴 수 없습니다.'); + } + + set_session("ss_datetime", $g4['server_time']); +} + if (!isset($_POST['wr_subject']) || !trim($_POST['wr_subject'])) alert('제목을 입력하여 주십시오.'); @@ -135,12 +170,7 @@ if (!isset($_POST['wr_subject']) || !trim($_POST['wr_subject'])) @mkdir($g4['path'].'/data/file/'.$bo_table, 0707); @chmod($g4['path'].'/data/file/'.$bo_table, 0707); -// "인터넷옵션 > 보안 > 사용자정의수준 > 스크립팅 > Action 스크립팅 > 사용 안 함" 일 경우의 오류 처리 -// 이 옵션을 사용 안 함으로 설정할 경우 어떤 스크립트도 실행 되지 않습니다. -//if (!$_POST['wr_content']) die ("내용을 입력하여 주십시오."); - $chars_array = array_merge(range(0,9), range('a','z'), range('A','Z')); -//print_r2($chars_array); exit; // 가변 파일 업로드 $file_upload_msg = ''; @@ -241,18 +271,15 @@ for ($i=0; $i'; - - if (typeof(contents) === 'string') { - html += this.trimSpace(contents); - } - - html += ''; - doc.write(html); - doc.close(); -}, - -getWindowHandle : function (iframeObj) { - var iframeWin; - - if (iframeObj.contentWindow) - iframeWin = iframeObj.contentWindow; - else - throw '현재 브라우저에서 에디터를 실행할 수 없습니다.'; - - return iframeWin; -}, - -resetDoc : function () { - try { - this.editArea = this.getWindowHandle(this.cheditor.editArea); - this.doc = (GB.browser.msie) ? this.editArea.document : this.cheditor.editArea.contentDocument; - this.resetData(); - return true; - } - catch (e) { - alert(e.toString()); - return false; - } -}, - -resetEditArea : function () { - this.openDoc(this.doc, this.cheditor.textarea.value); - this.setDesignMode(true); - - var oSheet = this.doc.styleSheets[0]; - if (GB.browser.msie) { - oSheet.addRule('body', 'font-size:' + this.config.editorFontSize + - ';font-family:' + this.config.editorFontName + - ';color:' + this.config.editorFontColor + - ';margin:' + this.config.editAreaMargin + - ';line-height:' + this.config.lineHeight + - ';background-color:' + this.config.editorBgColor); - oSheet.addRule('table', 'font-size:' + this.config.editorFontSize + - ';line-height:' + this.config.lineHeight); - } - else { - oSheet.insertRule('body {font-size: ' + this.config.editorFontSize + - ';font-family: ' + this.config.editorFontName + - ';color: ' + this.config.editorFontColor + - ';margin: ' + this.config.editAreaMargin + - ';line-height:' + this.config.lineHeight + - ';background-color:' + this.config.editorBgColor + '}', 0); - oSheet.insertRule('table {font-size: ' + this.config.editorFontSize + - ';line-height:' + this.config.lineHeight + '}', 1); - } - - this.cheditor.editArea.style.padding = '0px'; - this.cheditor.editArea.style.margin = '0px'; -}, - -resizeGetY : function (ev) { - return GB.browser.msie ? - window.event.clientY + document.documentElement.scrollTop + document.body.scrollTop : - ev.clientY + window.pageYOffset; -}, - -resizeStart : function (ev) { - this.currentRS.elNode = this.cheditor.editArea; - this.currentRS.cursorStartY = this.resizeGetY(ev); - this.currentRS.elStartTop = parseInt(this.currentRS.elNode.style.height); - - if (isNaN(this.currentRS.elStartTop)) this.currentRS.elStartTop = 0; - - var self = this;//, ev = null; - ev = ev || window.event; - - self.resizeEditor.stopFunc = function() { self.resizeStop.call(self, ev); }; - self.resizeEditor.moveFunc = function(event) { self.resizeMove.call(self, event); }; - - if (GB.browser.msie) this.setDesignMode(false); - - this.currentRS.elNode.style.visibility = 'hidden'; - this.addEvent(document, "mousemove", self.resizeEditor.moveFunc); - this.addEvent(document, "mouseup", self.resizeEditor.stopFunc); - this.stopEvent(ev); -}, - -resizeMove : function (ev) { - var Y = this.resizeGetY(ev); - var H = this.currentRS.elStartTop + Y - this.currentRS.cursorStartY; - if (H < 1) { - this.resizeStop(ev); - H = 1; - } - this.config.editorHeight = this.currentRS.elNode.style.height = H + 'px'; - this.stopEvent(ev); -}, - -resizeStop : function (ev) { - this.removeEvent(document, "mouseup", this.resizeEditor.stopFunc); - this.removeEvent(document, "mousemove", this.resizeEditor.moveFunc); - this.stopEvent(ev); - this.currentRS.elNode.style.visibility = 'visible'; - this.editArea.focus(); - this.restoreRange(); - if (GB.browser.msie) this.setDesignMode(true); -}, - -switchEditorMode : function (changeMode) { - this.editArea.focus(); - if (this.cheditor.mode == changeMode) return; - - for (var i in this.cheditor.modetab) { - var className = this.cheditor.modetab[i].className; - className = className.replace(/\-off/,''); - if (i != changeMode) { - this.cheditor.modetab[i].className = className + '-off'; - } - else { - this.cheditor.modetab[i].className = className; - } - } - - switch (changeMode) { - case 'rich' : - this.richMode(); - this.showTagSelector(true); - break; - case 'code' : - this.editMode(); - this.showTagSelector(false); - break; - case 'preview' : - this.previewMode(); - this.showTagSelector(false); - break; - default : break; - } - - this.cheditor.mode = changeMode; -}, - -initTemplate : function () { - var self = this; - var xmlDoc = null; - var outputError = function(msg) { - alert(self.templateFile + ' 파일 로딩 중 오류가 발생하였습니다.\n원인: ' + msg); - }; - - if (window.ActiveXObject) { - xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); - xmlDoc.async = "false"; - xmlDoc.onreadystatechange = function() { - if (xmlDoc.readyState == 4) { - try { - self.xmlDoc = xmlDoc; - self.loadTemplate.call(self, xmlDoc); - } - catch(e) { - outputError(e.toString()); - } - } - }; - - xmlDoc.load(self.templatePath); - } - else if (window.XMLHttpRequest) { - xmlDoc = new XMLHttpRequest(); - if (xmlDoc.overrideMimeType) - xmlDoc.overrideMimeType('text/xml'); - - xmlDoc.onload = function() { - try { - self.xmlDoc = xmlDoc.responseXML; - self.loadTemplate.call(self, xmlDoc.responseXML); - } - catch(e) { - outputError(e.toString()); - } - }; - - xmlDoc.open("GET", self.templatePath, false); - xmlDoc.send(''); - } - else { - outputError("현재 브라우저에서 "+self.templateFile+" 파일을 사용할 수 없습니다."); - } -}, - -getCDATASection : function (node) { - if (node.hasChildNodes()) { - var elem = node.firstChild; - while (elem && elem.nodeType != GB.node.CDATA_SECTION_NODE) { - elem = elem.nextSibling; - } - - if (elem && elem.nodeType == GB.node.CDATA_SECTION_NODE) { - var data = elem.data; - data = data.replace(/\n/g, ''); - data = data.replace(/(\s+?)\<([^\>]*)\>/g, "<$2>"); - data = this.trimSpace(data); - return data; - } - } - return null; -}, - -setToolbarBgPosition : function (elem, attr) { - elem.style.backgroundPosition = attr; -}, - -getToolbarBgPosition : function (elem) { - var pos; - switch (elem.className) { - case 'cheditor-tb-bg' : pos = 3; break; - case 'cheditor-tb-bg-last' : pos = 6; break; - case 'cheditor-tb-bg-single' : pos = 9; break; - case 'cheditor-tb-bg30' : pos = 12; break; - case 'cheditor-tb-bg30-last' : pos = 15; break; - case 'cheditor-tb-bg55' : pos = 18; break; - case 'cheditor-tb-bg40' : pos = 21; break; - default : pos = 0; - } - return pos; -}, - -toolbarPreviousChecked : function (elem) { - var previousName = elem.previousSibling.getAttribute('name'); - if (previousName && this.toolbar[previousName]['checked'] == true) { - return this.toolbar[previousName].button; - } - - return false; -}, - -toolbarMouseOverUp : function (elem) { - this.setToolbarBgPosition(elem, "0 " + (~(((this.getToolbarBgPosition(elem) + 1) * elem.getAttribute('btnHeight'))) + 1) + 'px'); - - if (elem.getAttribute('name') == 'ForeColor' && elem.previousSibling.checked) { - this.setToolbarBgPosition(elem.previousSibling, - (~(elem.previousSibling.getAttribute('btnWidth')) + 1) + "px " + - (~((this.getToolbarBgPosition(elem.previousSibling)+2) * elem.previousSibling.getAttribute('btnHeight')) + 1) + 'px'); - return; - } - - if (elem.previousSibling && typeof elem.previousSibling.getAttribute('btnWidth') != null) { - var previous = this.toolbarPreviousChecked(elem); - if (previous) - { - this.setToolbarBgPosition(previous, (~(previous.getAttribute('btnWidth')) + 1) + "px " + - (~((this.getToolbarBgPosition(previous) + 2) * previous.getAttribute('btnHeight')) + 1) + 'px'); - return; - } - - if (elem.previousSibling.className == 'cheditor-tb-bg-first') { - this.setToolbarBgPosition(elem.previousSibling, (~(elem.previousSibling.getAttribute('btnWidth')) + 1) + "px 0"); - } - else { - this.setToolbarBgPosition(elem.previousSibling, - (~(elem.previousSibling.getAttribute('btnWidth')) + 1) + "px " + - (~(this.getToolbarBgPosition(elem.previousSibling) * elem.previousSibling.getAttribute('btnHeight')) + 1) + 'px'); - } - } -}, - - -toolbarMouseDownOut : function (elem) { - if (elem.previousSibling == null || typeof elem.previousSibling.getAttribute('btnWidth') == null) - return; - - var previous = this.toolbarPreviousChecked(elem); - if (previous) { - this.setToolbarBgPosition(previous, "0 " + - (~((this.getToolbarBgPosition(previous) + 2) * previous.getAttribute('btnHeight')) + 1) + 'px'); - return; - } - - this.setToolbarBgPosition(elem.previousSibling, - "0 " + (~(this.getToolbarBgPosition(elem.previousSibling) * elem.previousSibling.getAttribute('btnHeight')) + 1) + 'px'); -}, - -toolbarButtonChecked : function (elem) { - this.setToolbarBgPosition(elem, "0 " + (~((this.getToolbarBgPosition(elem) + 2) * elem.getAttribute('btnHeight')) + 1) + 'px'); -}, - -toolbarButtonUnchecked : function (elem) { - this.setToolbarBgPosition(elem, "0 " + (~(this.getToolbarBgPosition(elem) * elem.getAttribute('btnHeight')) + 1) + 'px'); -}, - -toolbarSetBackgroundImage : function (elem, disabled) { - if (GB.browser.msie || !elem.style.backgroundImage) - return; - - elem.style.backgroundImage = 'url('+(disabled ? this.toolbar.iconDisable : this.toolbar.icon)+')'; -}, - -toolbarDisable : function (elem, disable) { - if (disable) { - this.toolbarSetBackgroundImage(elem.firstChild, true); - - elem.firstChild.style.KhtmlOpacity = elem.firstChild.style.opacity = elem.firstChild.style.MozOpacity = 0.5; - elem.firstChild.style.filter = 'Alpha(opacity=50) gray'; - elem.style.cursor = 'default'; - - this.toolbarButtonUnchecked(elem); - this.toolbarMouseDownOut(elem); - - if (GB.browser.msie) elem.disabled = true; - else this.toolbar[elem.getAttribute('name')]['disabled'] = true; - - return true; - } - else { - this.toolbarSetBackgroundImage(elem.firstChild, false); - elem.style.cursor = 'pointer'; - elem.firstChild.style.KhtmlOpacity = elem.firstChild.style.opacity = elem.firstChild.style.MozOpacity = ''; - elem.firstChild.style.filter = ''; - - if (GB.browser.msie) elem.disabled = false; - else this.toolbar[elem.getAttribute('name')]['disabled'] = false; - - return false; - } -}, - -number2rgb : function (value) { - if (typeof value != "number") - return value; - - var r = value & 0xFF; - var g = (value >> 8) & 0xFF; - var b = (value >> 16) & 0xFF; - - return "rgb(" + r + "," + g + "," + b + ")"; -}, - -toolbarUpdate : function () { - var toolbar = this.toolbar; - var rng = this.getRange(); - var nodeType = this.getSelectionType(rng); - var pNode, ancestors = new Array(), ancestorsLen = 0; - var rngtext = (GB.browser.msie) ? rng.text == '' : rng.toString() == ''; - - if (GB.browser.msie) { - switch (nodeType) { - case GB.selection.SELECTION_TEXT : - case GB.selection.SELECTION_NONE : - pNode = rng.parentElement(); - break; - case GB.selection.SELECTION_ELEMENT : - pNode = rng.item(0); - break; - default : - pNode = this.doc; - } - } - else { - try { - pNode = rng.commonAncestorContainer; - if (!rng.collapsed && - rng.startContainer == rng.endContainer && - rng.startOffset - rng.endOffset < 2 && - rng.startContainer.hasChildNodes()) - { - pNode = rng.startContainer.childNodes[rng.startOffset]; - } - - if (nodeType == GB.selection.SELECTION_TEXT) - pNode = pNode.parentNode; - - if (rngtext) - rngtext = GB.offElements[pNode.nodeName] ? false : true; - } - catch (e) { pNode= this.doc; } - } - - var isControl = false, isTable = false; - - if (nodeType == GB.selection.SELECTION_ELEMENT) { - isControl = GB.browser.msie ? true : GB.offElements[pNode.nodeName]; - } - else { - while (pNode && pNode.nodeType == GB.node.ELEMENT_NODE && pNode.nodeName != 'BODY') { - ancestors.push(pNode); - if (pNode.nodeName == 'TD') isTable = true; - pNode = pNode.parentNode; - } - ancestorsLen = ancestors.length; - } - - var isNoOff = { 'ImageUpload':1, 'ImageUrl':1, 'EmotionIcon':1, 'Link':1, 'GoogleMap':1 }; - - if (!isTable && nodeType== GB.selection.SELECTION_ELEMENT && - (pNode.nodeName == 'TABLE' || pNode.nodeName == 'TD')) - { - isTable = true; - } - - for (var i in toolbar) { - var cmd = toolbar[i].cmd; - if (cmd == null) - continue; - - var autoOff = false; - - if (isControl && nodeType == GB.selection.SELECTION_ELEMENT) { - if (toolbar[i].group != 'Alignment') { - autoOff = (pNode.nodeName == 'IMG' && isNoOff[cmd]) ? false : true; - } - } - - if (toolbar[i].name == 'ModifyTable') { - autoOff = isTable ? false : true; - } - - var isDisable = this.toolbarDisable(toolbar[i].button, autoOff); - - if (toolbar[i].name == 'ForeColor' || toolbar[i].name == 'BackColor') { - toolbar[i].button.lastChild.style.display = isDisable ? 'none' : 'block'; - } - - if (toolbar[i].autocheck == null) - continue; - - switch (cmd) { - case 'Copy' : - case 'Cut' : - this.toolbarDisable(toolbar[i].button, rngtext); - break; - case 'UnLink' : - var el = true; - - for (var j=0; j < ancestorsLen; j++) { - if (ancestors[j].nodeName == 'A') { - el = false; - break; - } - } - - this.toolbarDisable(toolbar[i].button, el); - break; - case 'Paragraph' : - var wrapper = toolbar[i].button.firstChild; - var oldName = wrapper.firstChild; - var el = false; - - for (var j=0; j < ancestorsLen; j++) { - if (GB.paragraph[ancestors[j].nodeName]) { - wrapper.replaceChild(document.createTextNode(GB.paragraph[ancestors[j].nodeName]), oldName); - el = true; - break; - } - } - - if (!el) { - wrapper.replaceChild(document.createTextNode('스타일'), oldName); - } - break; - case 'ForeColor' : - case 'BackColor' : - if (cmd == 'BackColor' && !GB.browser.msie) - cmd = 'HiliteColor'; - - try { - var wrapper = toolbar[i].button.lastChild; - var fontAttr = this.number2rgb(this.doc.queryCommandValue(cmd)); - if (!fontAttr) - fontAttr = (cmd == 'ForeColor') ? this.config.editorFontColor : this.config.editorBgColor; - - wrapper.style.backgroundColor = fontAttr; - } - catch(e) {} - break; - case 'FontName' : - case 'FontSize' : - try { - var wrapper = toolbar[i].button.firstChild; - var el = false; - var fontAttr = this.doc.queryCommandValue(cmd); - - if (fontAttr) { - var newAttr = (cmd == 'FontSize') ? - (GB.fontSize[fontAttr] ? GB.fontSize[fontAttr] : fontAttr) : - fontAttr; - - wrapper.replaceChild(document.createTextNode(newAttr), wrapper.firstChild); - el = true; - } - - if (!el) { - var defaultAttr = (cmd == 'FontSize') ? this.config.editorFontSize : this.config.editorFontName; - if (wrapper.hasChildNodes()) { - wrapper.removeChild(wrapper.firstChild); - } - wrapper.appendChild(document.createTextNode(defaultAttr)); - } - } - catch(e) {} - break; - case 'TextBlock': - break; - default: - try { - var state = this.doc.queryCommandState(cmd); - if (state && (nodeType == GB.selection.SELECTION_TEXT || nodeType == GB.selection.SELECTION_NONE)) { - this.toolbarButtonChecked(toolbar[i].button); - toolbar[i].checked = true; - } - else { - this.toolbarButtonUnchecked(toolbar[i].button); - toolbar[i].checked = false; - } - - } - catch(e) {} - } - } -}, - -createButton : function (name, attr, group) { - var self = this; - var elem = null; - var method = attr.getElementsByTagName('Execution')[0].getAttribute('method'); - var cmd = attr.getElementsByTagName('Execution')[0].getAttribute('value'); - var check = attr.getAttribute('check'); - - elem = document.createElement('div'); - elem.className = attr.getAttribute('class'); - - var btnWidth = attr.getAttribute('width'); - elem.style.width = btnWidth + 'px'; - elem.setAttribute('btnWidth', btnWidth); - elem.setAttribute('name', name); - elem.setAttribute('method', method); - - var btnHeight = attr.getAttribute('height'); - elem.style.height = btnHeight + 'px'; - elem.setAttribute('btnHeight', btnHeight); - - var obj = { - 'button' : elem, - 'disabled' : false, - 'name' : name, - 'method' : method, - 'cmd' : cmd, - 'checked' : false, - 'group' : group, - 'autocheck' : check - }; - - self.toolbar[name] = obj; - self.addEvent(elem, 'mouseover', function() { - if ((obj.checked == false && obj.disabled == false)) - self.toolbarMouseOverUp(elem); - }); - self.addEvent(elem, 'mouseup', function(ev) { - if (obj.checked == false && obj.disabled == false) { - self.toolbarMouseOverUp(elem); - self.stopEvent(GB.browser.msie ? window.event : ev); - } - }); - self.addEvent(elem, 'mousedown', function(ev) { - if (obj.checked == false && obj.disabled == false) { - self.toolbarButtonChecked(elem); - self.toolbarMouseDownOut(elem); - self.stopEvent(GB.browser.msie ? window.event : ev); - } - - }); - self.addEvent(elem, 'click', function(ev) { - if (obj.disabled) return false; - - switch (obj.method) { - case 'doCmd' : - self.doCmd(obj.cmd, ''); - break; - case 'windowOpen' : - self.windowOpen(obj.cmd); - break; - case 'showPulldown' : - if (obj.checked) { - obj.checked = false; - self.boxHideAll(); - } - else { - obj.checked = true; - self.showPulldown(obj.cmd, obj.button); - } - - if (obj.checked == true) { - self.toolbarButtonChecked(elem); - self.toolbarMouseDownOut(elem); - self.stopEvent(GB.browser.msie ? window.event : ev); - } - break; - default : - break; - } - }); - self.addEvent(elem, 'mouseout', function() { - if (obj.checked == false) { - self.toolbarButtonUnchecked(elem); - self.toolbarMouseDownOut(elem); - } - }); - - return elem; -}, - -showToolbar : function (toolbar, toolbarWrapper) { - var self = this; - toolbarWrapper.className = 'cheditor-tb-wrapper'; - - var toolbarIcon = toolbar.getElementsByTagName('Image').item(0).getAttribute('file'); - var group = toolbar.getElementsByTagName('Group'); - var grpNum = group.length; - var tmpArr = toolbarIcon.split(/\./); - self.toolbar.icon = self.config.iconPath + toolbarIcon; - self.toolbar.iconDisable = self.config.iconPath + tmpArr[0] + '-disable' + '.' + tmpArr[1]; - - var appendSpaceBlock = function(pNode) { - var div = document.createElement('div'); - div.className = 'cheditor-tb-split'; - pNode.appendChild(div); - }; - - for (var i=0; i < grpNum; i++) { - var grpName = group[i].getAttribute('name'); - if (grpName == 'Split') { - appendSpaceBlock(toolbarWrapper); - continue; - } - - var btn = group[i].getElementsByTagName('Button'); - var btnNum = btn.length; - var grpDiv = document.createElement('div'); - - for (var j=0; j < btnNum; j++) { - var attr = btn[j].getElementsByTagName('Attribute')[0]; - var btnName = btn[j].getAttribute('name'); - - if (self.config['use'+btnName] != true) { - continue; - } - - var btnIcon = document.createElement('div'); - var btnElem = self.createButton(btnName, attr, grpName); - var icon = attr.getElementsByTagName('Icon')[0]; - - btnIcon.className = icon.getAttribute('class'); - - if (btn[j].getAttribute('tooltip') != null) { - btnElem.setAttribute('title', btn[j].getAttribute('tooltip')); - } - - var pos = icon.getAttribute('position'); - if (pos != null) { - btnIcon.style.backgroundImage = 'url('+self.toolbar.icon+')'; - btnIcon.style.backgroundRepeat = 'no-repeat'; - self.setToolbarBgPosition(btnIcon, (~pos + 1) + 'px center'); - } - else { - var txt = icon.getAttribute('alt'); - if (txt != null) { - btnIcon.appendChild(document.createTextNode(txt)); - } - } - - btnElem.appendChild(btnIcon); - - if (btnName == 'ForeColor' || btnName == 'BackColor') { - var currentColor = document.createElement('div'); - currentColor.className = 'cheditor-tb-color-btn'; - currentColor.style.backgroundColor = attr.getAttribute('default'); - btnElem.appendChild(currentColor); - } - - grpDiv.appendChild(btnElem); - } - - if (grpDiv.hasChildNodes() == false) - continue; - - if (grpDiv.childNodes.length > 1) { - grpDiv.firstChild.className = grpDiv.firstChild.className + '-first'; - grpDiv.lastChild.className = grpDiv.lastChild.className + '-last'; - while (grpDiv.hasChildNodes()) { - toolbarWrapper.appendChild(grpDiv.firstChild); - } - } - else { - if (grpDiv.firstChild.className == 'cheditor-tb-bg') { - grpDiv.firstChild.className = grpDiv.firstChild.className + '-single'; - } - toolbarWrapper.appendChild(grpDiv.firstChild); - } - - var spacer = document.createElement('div'); - spacer.className = 'cheditor-tb-button-spacer'; - toolbarWrapper.appendChild(spacer); - } - - appendSpaceBlock(toolbarWrapper); - - if (GB.browser.msie) { - var child = toolbarWrapper.getElementsByTagName('div'); - var len = child.length; - - for (var i=0; i < len; i++) { - self.unselectionElement(child[i]); - } - - self.unselectionElement(toolbarWrapper); - } - else { - self.unselectionElement(toolbarWrapper); - } -}, - -unselectionElement : function (elem) { - if (GB.browser.msie) { - elem.setAttribute('unselectable', 'On'); - elem.setAttribute('contentEditable', false); - } - else { - elem.onselectstart = new Function('return false'); - } -}, - -createEditorElement : function (container, toolbar) { - if (!container.hasChildNodes()) - return; - - var child = container.firstChild; - var self = this; - - do { - var id = child.getAttribute('id'); - switch (id) { - case 'toolbar' : - this.showToolbar(toolbar, child); - this.cheditor.toolbarWrapper = child; - break; - case 'viewMode' : - this.cheditor[id] = child; - this.cheditor.mode = 'rich'; - if (child.hasChildNodes()) { - var tab = child.childNodes; - this.cheditor.modetab = new Object(); - - for (var i=0; i'); }; - div.onmouseover = function() { self.pulldownMouseOver(this); }; - div.onmouseout = function() { self.pulldownMouseOut(this); }; - - var label = document.createElement('label'); - if (para.match(/H[123456]/)) { - var fontSize = {'H1':'24pt','H2':'18pt','H3':'14pt','H4':'12pt','H5':'10pt','H6':'8pt'}; - label.style.fontWeight = 'bold'; - label.style.fontSize = fontSize[para]; - } - else if (para == 'ADDRESS') - label.style.fontStyle = 'italic'; - - label.appendChild(document.createTextNode(GB.paragraph[para])); - div.appendChild(label); - - label.setAttribute('name', GB.paragraph[para]); - outputHtml.appendChild(div); - } - - self.createWindow(150, outputHtml); - self.createPulldownFrame(outputHtml, menu); - elem = self.pulldown[menu]; - } - - self.setPulldownClassName(elem.firstChild.getElementsByTagName('LABEL'), pNode); - self.windowPos(pNode, menu); - self.displayWindow(pNode, menu); -}, - -showFontSizeMenu : function (pNode) { - var self = this; - var menu = pNode.getAttribute('name'); - var elem = self.pulldown[menu]; - - if (!elem) { - var outputHtml = document.createElement('div'); - - for (var size in GB.fontSize) { - if (GB.fontSize[size] == null) break; - var div = document.createElement('div'); - var label = document.createElement('label'); - var text = size == 7 ? '가나다' : '가나다라'; - div.id = size; - div.onclick = function() { self.doCmdPopup("FontSize", this.id); }; - div.onmouseover = function() { self.pulldownMouseOver(this); }; - div.onmouseout = function() { self.pulldownMouseOut(this); }; - div.style.fontSize = GB.fontSize[size]; - - label.style.fontFamily = this.config.editorFontName; - label.setAttribute('name', GB.fontSize[size]); - label.appendChild(document.createTextNode(text+'('+GB.fontSize[size] +')')); - div.appendChild(label); - outputHtml.appendChild(div); - } - - self.createWindow(320, outputHtml); - self.createPulldownFrame(outputHtml, menu); - elem = self.pulldown[menu]; - } - - self.setPulldownClassName(elem.firstChild.getElementsByTagName('LABEL'), pNode); - self.windowPos(pNode, menu); - self.displayWindow(pNode, menu); -}, - -showTextBlockMenu : function (pNode) { - var self = this; - var menu = pNode.getAttribute('name'); - var elem = self.pulldown[menu]; - - if (!elem) { - var outputHtml = document.createElement('div'); - var quote = GB.textBlock; - - for (var i=0; i < quote.length; i++) { - var wrapper = document.createElement('div'); - var div = document.createElement('div'); - div.onclick = function() { self.boxStyle(this); }; - wrapper.onmouseover = function() { this.className = 'cheditor-pulldown-textblock-over'; }; - wrapper.onmouseout = function() { this.className = 'cheditor-pulldown-textblock-out'; }; - wrapper.className = 'cheditor-pulldown-textblock-out'; - div.style.border = quote[i][0]; - div.style.backgroundColor = quote[i][1]; - div.style.fontFamily = self.config.editorFontName; - - var label = document.createElement('label'); - label.appendChild(document.createTextNode('가나다라 ABC')); - div.appendChild(label); - wrapper.appendChild(div); - outputHtml.appendChild(wrapper); - - } - - self.createWindow(160, outputHtml); - self.createPulldownFrame(outputHtml, menu); - elem = self.pulldown[menu]; - elem.firstChild.className = 'cheditor-pulldown-textblock-container'; - } - - self.windowPos(pNode, menu); - self.displayWindow(pNode, menu); -}, - -createPulldownFrame : function (contents, id) { - var div = document.createElement('div'); - div.className = 'cheditor-pulldown-frame'; - div.appendChild(contents); - this.pulldown[id] = div; - this.cheditor.container.firstChild.appendChild(div); -}, - -setDefaultCss : function (ar) { - if (arguments.length == 0) { - ar = {cssName: 'default.css', doc: this.doc}; - if (GB.browser.msie || GB.browser.opera) { - ar = {cssName: 'p.css', doc: this.doc}; - } - } - - var cssFile = this.config.cssPath + ar.cssName, - head = ar.doc.getElementsByTagName('head')[0], - found = false; - - if (typeof head == 'undefined') - return; - - if (head.hasChildNodes()) { - var child = head.childNodes; - for (var i = 0; i < child.length; i++) { - if (child[i].tagName == 'LINK') { - var href = child[i].getAttribute('href'); - if (href != null && href == cssFile) { - found = true; - break; - } - } - } - } - - if (found == false) { - var css = head.appendChild(ar.doc.createElement('link')); - css.setAttribute('type', 'text/css'); - css.setAttribute('rel', 'stylesheet'); - css.setAttribute('media', 'all'); - css.setAttribute('href', this.config.cssPath + ar.cssName); - } -}, - -setEditorEvent : function () { - var self = this; - var keyArrow = function(event) { self.doOnArrowKeyPress(event); }; - self.addEvent(self.doc, "keydown", keyArrow); - - var keyPress = function(event) { self.doOnKeyPress(event); }; - self.addEvent(self.doc, "keypress", keyPress); - - var editorEvent = function() { self.doEditorEvent(); }; - self.addEvent(self.doc, "mouseup", editorEvent); - - var hideBox = function() { self.boxHideAll(); }; - self.addEvent(self.doc, "mousedown", hideBox); -}, - -addEvent : function (elem, ev, func) { - if (GB.browser.msie) - elem.attachEvent("on"+ev, func); - else - elem.addEventListener(ev, func, false); -}, - -removeEvent : function (elem, ev, func) { - if (GB.browser.msie) - elem.detachEvent("on"+ev, func); - else - elem.removeEventListener(ev, func, false); -}, - -stopEvent : function (ev) { - if (GB.browser.msie) { - ev.cancelBubble = true; - ev.returnValue = false; - } - else { - ev.preventDefault(); - ev.stopPropagation(); - } -}, - -toolbarButtonOut : function (elemButton, nTop) { - elemButton.style.top = -nTop + 'px'; -}, - -toolbarButtonOver : function (elemButton) { - var nTop = elemButton.style.top.substring(0, elemButton.style.top.length - 2); - elemButton.style.top = nTop - 22 + 'px'; -}, - -changeFontColor : function (color, type) { - if (type == 'BackColor' && !GB.browser.msie) { - type = 'HiliteColor'; - } - this.doCmdPopup(type, color); -}, - -getElement : function (elem, tag) { - while (elem != null && elem.tagName != tag) { - if (elem.nodeName == 'BODY') break; - elem = elem.parentNode; - } - return elem; -}, - -hyperLink: function (url, target, title) { - this.editArea.focus(); - var rng = this.range; - var pNode = null; - - if (GB.browser.msie) { - rng.select(); - rng.execCommand("UnLink", false); - rng.execCommand("CreateLink", false, url); - - switch (this.getSelectionType(rng)) { - case GB.selection.SELECTION_TEXT : - pNode = rng.parentElement(); - break; - case GB.selection.SELECTION_ELEMENT : - pNode = rng.item(0).parentNode; - break; - default : pNode = null; - } - - if (pNode && pNode.nodeName != 'A') pNode = this.getElement(pNode, 'A'); - } - else { - this.doc.execCommand("CreateLink", false, url); - pNode = this.getRange().startContainer; - } - - if (pNode) { - if (target) try { pNode.setAttribute("target", target); } catch(e) {}; - if (title) try { pNode.setAttribute("title", title); } catch(e) {}; - } -}, - -boxStyle: function (el) { - this.editArea.focus(); - var range = this.range || this.getRange(); - var quote = this.doc.createElement("blockquote"); - - if (el.currentStyle) { - quote.style.backgroundColor = el.currentStyle.backgroundColor; - quote.style.border = el.style.border; - } - else if (window.getComputedStyle) { - var compStyle = document.defaultView.getComputedStyle(el, null); - var style = compStyle.getPropertyValue('border-top-style'); - var width = compStyle.getPropertyValue('border-top-width'); - var color = compStyle.getPropertyValue('border-top-color'); - quote.style.border = width + ' ' + color + ' ' + style; - quote.style.backgroundColor = compStyle.getPropertyValue("background-color"); - } - else { - alert('현재 브라우저는 이 기능을 지원하지 않습니다.'); - return; - } - - quote.style.padding = "5px 10px"; - - if (GB.browser.msie) { - var ctx = range.htmlText; - quote.innerHTML = ctx ? ctx: '\u00A0'; - - this.setRange(range); - this.insertHTML(quote); - - var textRange = this.getRange(); - textRange.moveToElementText(range.parentElement()); - textRange.collapse(false); - textRange.select(); - } - else { - quote.appendChild((range != '') ? range.extractContents() : this.doc.createElement('br')); - quote.id = 'newquote'; - this.insertNodeAtSelection(quote); - - var oQuote = this.doc.getElementById('newquote'); - oQuote.removeAttribute('id'); - var oRef = oQuote.nextSibling; - if (!oRef) { - oQuote.parentNode.appendChild(this.doc.createElement('br')); - } - else if (oRef.nodeType == GB.node.TEXT_NODE && oRef.nodeValue == '') { - oQuote.parentNode.insertBefore(this.doc.createElement('br'), oRef); - } - } - this.boxHideAll(); -}, - -insertFlash: function (elem) { - this.editArea.focus(); - - if (typeof elem === 'string') { - var embed = null; - var div = this.doc.createElement('DIV'); - elem = this.trimSpace(elem); - - var pos = elem.toLowerCase().indexOf("embed"); - if (pos != -1) { - var str = elem.substr(pos); - pos = str.indexOf(">"); - div.innerHTML = "<" + str.substr(0, pos) + ">"; - embed = div.firstChild; - } - else { - div.innerHTML = elem; - var object = div.getElementsByTagName('OBJECT')[0]; - if (object && object.hasChildNodes()) { - var child = object.firstChild; - var movieHeight, movieWidth; - movieWidth = (isNaN(object.width) != true) ? object.width : 320; - movieHeight = (isNaN(object.height)!= true) ? object.height: 240; - var params = new Array(); - - do { - if ((child.nodeName == 'PARAM') && (typeof child.name != 'undefined') && (typeof child.value != 'undefined')) - { - params.push({key: (child.name == 'movie') ? 'src' : child.name, val: child.value}); - } - child = child.nextSibling; - } - while (child); - - if (params.length > 0) { - embed = this.doc.createElement('embed'); - embed.setAttribute("width", movieWidth); - embed.setAttribute("height", movieHeight); - - for (var i=0; i/g,'>'); - content = content.replace(/ /g, '&nbsp;'); - content = content.replace(reg2, "$1$2 $3=$4$5$6"); - content = content.replace(reg1, "$1$2$3$4"); - content = content.replace(/\n/g, '
'); - - this.doc.body.innerHTML = content; - - var tmpHeight = this.cheditor.editArea.offsetHeight + this.cheditor.toolbarWrapper.offsetHeight; - this.cheditor.toolbarWrapper.style.display = "none"; - this.cheditor.editArea.style.height = tmpHeight + 'px'; - this.cheditor.editArea.style.visibility = 'visible'; - this.setDesignMode(true); - this.editArea.focus(); -}, - -makeHtmlContent : function () { - if (GB.browser.msie) { - return this.doc.body.innerText; - } - - var html = this.doc.createRange(); - html.selectNodeContents(this.doc.body); - - return html.toString(); -}, - -resetStatusBar : function () { - if (this.config.showTagPath) - this.cheditor.tagPath.innerHTML = '<html> <body> '; -}, - -previewMode : function () { - this.range = null; - - if (this.config.useSource && this.cheditor.mode == 'code') { - this.putContents(this.makeHtmlContent()); - } - - this.cheditor.editArea.style.visibility = 'hidden'; - this.cheditor.editBlock.style.display = 'none'; - - var tmpHeight = this.cheditor.editArea.offsetHeight; - if (this.cheditor.mode == 'rich') - tmpHeight += this.cheditor.toolbarWrapper.offsetHeight; - - this.cheditor.toolbarWrapper.style.display = "none"; - this.cheditor.editArea.style.height = tmpHeight+'px'; - this.cheditor.editArea.style.visibility = 'visible'; - this.setImageEvent(false); - this.setDesignMode(false); -}, - -putContents : function (content) { - if (this.config.fullHTMLSource) { - if (this.config.outputXhtml) { - content = content.substr(content.search(/') + 1); - content = '' + content; - } - - this.doc.open(); - this.doc.write(content); - this.doc.close(); - } - else { - this.doc.body.innerHTML = content;; - } -}, - -getImages : function () { - var img = this.doc.body.getElementsByTagName('img'); - var imgNumber = this.images.length; - var imgArr = new Array(); - - for (var i=0; i 0 ? imgArr : null; -}, - -xhtmlParse : function (node, lang, encoding, needNewLine, inside_pre) { - var i; - var xhtmlText = ''; - var children = node.childNodes; - var len = children.length; - var newLine = needNewLine ? true : false; - var mediaAlign = ''; - - for (i = 0; i < len; i++) { - var child = children[i]; - - switch (child.nodeType) { - case 1: { - var elemName = String(child.tagName).toLowerCase(); - if (/^\W/.test(elemName) || elemName == '') break; - - if (elemName == 'meta') { - var meta_name = String(child.name).toLowerCase(); - if (meta_name == 'generator') break; - } - - if (elemName == 'html') { - xhtmlText = '\n\n'; - } - - if (GB.browser.msie) { - if (elemName == 'object' && !child.hasChildNodes()) { - xhtmlText += this.replaceObjectCode(child.outerHTML); - continue; - } - - if (elemName == 'embed') { - var parameter = /align=("[^\"]*"|'[^\']*'|[^\"\'\s]*)(\s|\>)/i; - var align_code = new String(child.outerHTML).match(parameter); - if (align_code) { - align_code = align_code[1]; - mediaAlign = align_code.replace(/("|')/g, ""); - } - } - } - - if (GB.XhtmlNewLineBefore.indexOf('|' + elemName + '|') != -1) { - if ((newLine || xhtmlText != '') && !inside_pre) xhtmlText += '\n'; - else newLine = true; - } - - xhtmlText += '<' + elemName; - - var attr = child.attributes; - var attrLength = attr.length; - var attrValue = ''; - var attrLang = false; - var attrXmlLang = false; - var attrXmlns = false; - var isAltAttr = false; - - for (var j = 0; j < attrLength; j++) { - var attrName = attr[j].nodeName.toLowerCase(); - - if (attrName == 'reparsed_attr') continue; - if (!attr[j].specified && attrName != 'selected' && attrName != 'style' && attrName != 'value' && - attrName != 'shape' && attrName != 'coords') - { - continue; - } - if ((attrName == 'shape' || attrName == 'coords') && elemName != 'area') continue; - if (attrName == 'selected' && !child.selected || attrName == 'style' && child.style.cssText == '') continue; - if (attrName == '_moz_dirty' || attrName == '_moz_resizing' || attrName == '_moz-userdefined' || - attrName == '_moz_editor_bogus_node' || (elemName == 'br' && attrName == 'type' && - child.getAttribute('type') == '_moz')) - { - continue; - } - if (elemName == 'img' && attrName == 'complete') continue; - - var validAttr = true; - - switch (attrName) { - case "style" : - var cssText = child.style.cssText.split(';'); - var reMake = []; - var attrLen = cssText.length; - - for (var ct=0; ct < attrLen; ct++) { - var kv = cssText[ct].split(':'); - if (kv[0] != '' && typeof kv[1] != 'undefined') - reMake.push(kv[0].toLowerCase() + ':' + kv[1]); - } - - attrValue = reMake.join(';'); - break; - case "class" : - attrValue = child.className; - break; - case "http-equiv": - attrValue = child.httpEquiv; - break; - case "noshade": - case "checked": - case "selected": - case "multiple": - case "nowrap": - case "disabled": - attrValue = attrName; - break; - default: - try { - attrValue = child.getAttribute(attrName, 2); - } - catch (e) { - validAttr = false; - } - } - - if (elemName == 'embed') { - switch (attrName) { - case 'align': - if (mediaAlign) attrValue = mediaAlign; - else attrValue = eval('child.' + attrName); - break; - case 'showstatusbar': - case 'showcontrols': - case 'autostart': - case 'type': - attrValue = attr[j].nodeValue; - break; - default: - break; - } - } - - if (attrName == 'lang' && elemName == 'html') { - attrLang = true; - attrValue = lang; - } - - if (attrName == 'xml:lang') { - attrXmlLang = true; - attrValue = lang; - } - - if (attrName == 'xmlns') attrXmlns = true; - - if (elemName == 'object' && attrName == 'src' && GB.browser.msie) { - attrValue = this.fixObjectSrc(child.outerHTML); - } - - if (validAttr) { - if (!(elemName == 'li' && attrName == 'value')) { - xhtmlText += ' ' + attrName + "="; - xhtmlText += (/"/.test(attrValue)) ? "'" + this.fix_attribute(attrValue) + "'" : '"' + attrValue + '"'; - } - } - - if (attrName == 'alt') isAltAttr = true; - } - - if (elemName == 'img' && !isAltAttr) xhtmlText += ' alt=""'; - - if (elemName == 'html') { - if (!attrLang) xhtmlText += ' lang="' + lang + '"'; - if (!attrXmlLang) xhtmlText += ' xml:lang="' + lang + '"'; - if (!attrXmlns) xhtmlText += ' xmlns="http://www.w3.org/1999/xhtml"'; - } - - if (!GB.cantHaveChildren[elemName] || child.hasChildNodes()) { - xhtmlText += '>'; - var innerTxt = '' + this.xhtmlParse(child, lang, encoding, newLine, inside_pre || (elemName == 'pre') ? true : false); - - switch (elemName) { - case 'style' : innerTxt = String(child.innerHTML).replace(/[\n\r]+/g, '\n'); break; - case 'script' : innerTxt = child.text; break; - default : break; - } - - if (innerTxt) xhtmlText += innerTxt; - xhtmlText += ''; - } - else { - xhtmlText += ' />'; - } - break; - } - case 3: { - var nodeText = child.nodeValue.replace(/^\n/g, ''); - xhtmlText += nodeText.replace(/\n{2,}$/g, '\n').replace(/\&/g, "&").replace(//g, '>').replace(/\u00A0/g, " "); - break; - } - default: - break; - } - } - return xhtmlText; -}, - -fix_attribute : function (text) { - return String(text).replace(/\&/g, "&").replace(//g, ">").replace(/\"/g, """); -}, - -fixObjectSrc : function (text) { - var obj = text.match(/]+)>/i); - if (obj) { - var value = obj[1].match(/src="([^"]+)"/i); - if (!value) { - value = obj[1].match(/src='([^']+)'/i); - if (!value) value = obj[1].match(/src=([^ ]+)/i); - } - if (value) return value[1]; - } - return ''; -}, - -replaceObjectCode : function (text) { - var tmpTxt = new String(text); - tmpTxt = tmpTxt.replace(/ style=/gi, ' style='); - tmpTxt = tmpTxt.replace(/ codeBase=/gi, ' codebase='); - tmpTxt = tmpTxt.replace(/ height=/gi, ' height='); - tmpTxt = tmpTxt.replace(/ width=/gi, ' width='); - tmpTxt = tmpTxt.replace(/ align=/gi, ' align='); - tmpTxt = tmpTxt.replace(/ classid=/gi, ' classid='); - tmpTxt = tmpTxt.replace(/ src=/gi, ' src='); - tmpTxt = tmpTxt.replace(/ NAME=/gi, ' name='); - tmpTxt = tmpTxt.replace(/ VALUE=/gi, ' value='); - tmpTxt = tmpTxt.replace(/ quality=/gi, ' quality='); - tmpTxt = tmpTxt.replace(/ TYPE=/gi, ' type='); - tmpTxt = tmpTxt.replace(/ PLUGINSPAGE=/gi, ' pluginspage='); - tmpTxt = tmpTxt.replace(//gi, ''); - tmpTxt = tmpTxt.replace(//gi, ''); - tmpTxt = tmpTxt.replace(//gi, ''); - return tmpTxt; -}, - -checkDocLinks : function () { - var links = this.doc.links; - var len = links.length; - var host = location.host; - this.cheditor.links = new Array(); - - for (var i=0; i < len; i++) { - if (this.config.includeHostname == false) { - var href = links[i].href; - if (href.indexOf(host) != -1) { - links[i].setAttribute('href', href.substring(href.indexOf(host) + host.length)); - } - } - - if (this.config.linkTarget != '' && this.config.linkTarget != null) { - if (!(links[i].getAttribute('target'))) { - links[i].setAttribute('target', this.config.linkTarget); - } - } - - if (GB.browser.msie) { - this.cheditor.links.push(links[i]); - } - } -}, - -checkDocImages : function () { - var img = this.doc.images; - var len = img.length; - var host = location.host; - - for (var i=0; i < len; i++) { - if (this.config.includeHostname == false) { - var imgsrc = img[i].src; - if (imgsrc) { - if (imgsrc.indexOf(host) != -1) { - img[i].src = imgsrc.substring(imgsrc.indexOf(host) + host.length); - } - } - } - if (img[i].style.width) img[i].removeAttribute('width'); - if (img[i].style.height) img[i].removeAttribute('height'); - } -}, - -getContents : function (fullSource) { - this.checkDocLinks(); - this.checkDocImages(); - - if ((GB.browser.msie || GB.browser.opera) && this.config.ieEnterMode == 'css') { - var para = this.doc.body.getElementsByTagName('P'); - var len = para.length; - for (var i=0; i < len; i++) { - if (para[i].style.cssText.toLowerCase().indexOf("margin") == -1) { - para[i].style.margin = '0px'; - } - continue; - } - } - - if (this.config.allowedScript == false) { - var script = this.doc.body.getElementsByTagName('SCRIPT'); - var remove = new Array(); - var i; - - for (i=0; i < script.length; i++) { - remove.push(script[i]); - } - - for (i=0; i < remove.length; i++) { - remove[i].parentNode.removeChild(remove[i]); - } - } - - var mydoc = new String(''); - - if (GB.browser.msie) this.doc.body.removeAttribute('contentEditable'); - - if (fullSource) { - var content = this.doc.documentElement; - if (GB.browser.msie) { - mydoc = content.outerHTML; - } - else { - var div = document.createElement('DIV'); - div.appendChild(content.cloneNode(true)); - mydoc = div.innerHTML; - } - } - else { - mydoc = this.doc.body.innerHTML; - } - - if (this.config.outputXhtml) { - var tmpDoc = GB.browser.msie ? this.cheditor.htmlEditable.contentWindow.document : - this.cheditor.htmlEditable.contentDocument; - tmpDoc.open(); - tmpDoc.write(mydoc); - tmpDoc.close(); - mydoc = this.xhtmlParse(fullSource ? tmpDoc : tmpDoc.body, this.config.xhtmlLang, this.config.xhtmlEncoding); - } - - if ((GB.browser.msie || GB.browser.opera) && this.config.ieEnterMode == 'div') { - mydoc = mydoc.replace(/<(\/?)P([^>]*)>/ig, - function (a, b, c) { - if (/^\S/.test(c)) return a; - return '<' + b + 'div' + c + '>'; - }); - } - - return this.makeAmpTag(mydoc); -}, - -returnContents : function (mydoc) { - this.setDesignMode(true); - this.cheditor.textarea.value = mydoc; - return mydoc; -}, - -makeAmpTag : function (str) { return str.replace(/</g, '&lt;').replace(/>/g, '&gt;'); }, -removeAmpTag: function (str) { return str.replace (/&lt;/g, '<').replace(/&gt;/g,'>'); }, - -getOutputContents : function (fullSource) { - this.resetViewHTML(); - return this.removeAmpTag(this.getContents(fullSource)); -}, - -outputHTML : function () { - return this.returnContents(this.getOutputContents(true)); -}, - -outputBodyHTML : function () { - return this.returnContents(this.getOutputContents(false)); -}, - -outputBodyText : function () { - return this.returnContents(this.getBodyText()); -}, - -getBodyText : function () { - this.resetViewHTML(); - var rdata = '' + (GB.browser.msie ? this.doc.body.innerText : this.doc.body.textContent); - return this.trimSpace(rdata); -}, - -returnFalse : function () { - this.editArea.focus(); - var img = this.doc.images; - for (var i=0; i 128) mbytes++; - } - - return (len-mbytes) + (mbytes*2); -}, - -resetViewHTML : function () { - if (this.cheditor.mode == 'code') { - this.switchEditorMode('rich'); - } -}, - -contentsLengthAll : function () { - return this.strLength(this.outputHTML()); -}, - -contentsLength : function () { - var content = '' + this.trimSpace(this.outputBodyHTML()); - if (!content || content == "") return 0; - return this.strLength(content); -}, - -inputLength : function () { - var content = this.getBodyText(); - if (content == '') return 0; - return this.strLength(content); -}, - -displayWindow : function (pNode, id) { - this.editArea.focus(); - this.boxHideAll(id); - - var pullDown = this.pulldown[id]; - pullDown.style.visibility = "visible"; - pullDown.style.zIndex = 1002; -}, - -pulldownMouseOver : function (el) { - if (el.className == 'cheditor-pulldown-selected') return; - el.className = "cheditor-pulldown-mouseover"; -}, -pulldownMouseOut : function (el) { - if (el.className == 'cheditor-pulldown-selected') return; - el.className = "cheditor-pulldown-mouseout"; -}, - -windowPos : function (pNode, id) { - var L = pNode.offsetLeft; - if (GB.browser.msie && GB.browser.ver > 7) L -= 1; - - var boxEl = this.pulldown[id]; - boxEl.style.left = L + 'px'; - boxEl.style.top = pNode.offsetTop + parseInt(pNode.style.height) + 1 + 'px'; -}, - -boxHideAll : function (showId) { - for (var menu in this.pulldown) { - var elem = this.pulldown[menu]; - if (elem != null) { - elem.style.visibility = 'hidden'; - var ishide = (typeof showId == 'undefined') ? true : menu != showId; - - if (this.toolbar != null && ishide) { - this.toolbar[menu].checked = false; - this.toolbarButtonUnchecked(this.toolbar[menu].button); - } - } - } -}, - -createWindow : function (width, div) { - div.className = 'cheditor-pulldown-container'; - div.style.width = width+'px'; -}, - -setColorTable : function (pNode, menu) { - var self = this; - var pulldown = document.createElement('div'); - pulldown.className = 'cheditor-pulldown-color-wrapper'; - - var k = 0, h = 70; - var container = document.createElement('div'); - var selected = document.createElement('div'); - selected.style.backgroundColor = pNode.lastChild.style.backgroundColor; - var label = document.createElement('label'); - selected.appendChild(label); - selected.className = 'cheditor-pulldown-color-selected'; - - if (label.hasChildNodes()) - label.removeChild(selected.firstChild); - - label.appendChild(document.createTextNode(pNode.lastChild.style.backgroundColor)); - container.appendChild(selected); - - for (var j=0; j < h; j++) { - var cell = document.createElement('div'); - - if (!(j+1 % 10)) { - cell.style.clear = 'both'; - container.appendChild(cell); - h++; - continue; - } - - cell.className = 'cheditor-pulldown-color-cell'; - cell.style.backgroundColor = GB.colors[k++]; - cell.onmouseover = function() { - this.className = 'cheditor-pulldown-color-over'; - selected.style.backgroundColor = this.style.backgroundColor; - label.replaceChild(document.createTextNode(this.style.backgroundColor.toUpperCase()), label.firstChild); - }; - cell.onmouseout = function() { - this.className = 'cheditor-pulldown-color-cell'; - }; - cell.onclick = function() { - self.changeFontColor(this.style.backgroundColor, menu); - }; - - cell.appendChild(document.createTextNode('\u00a0')); - container.appendChild(cell); - - if (j == 9 || j == 59) { - cell = document.createElement('div'); - cell.className = 'cheditor-pulldown-color-spacer'; - container.appendChild(cell); - } - } - - pulldown.appendChild(container); - return pulldown; -}, - -onKeyPressToolbarUpdate : function () { - var self = this; - if (self.tempTimer) { - clearTimeout(self.tempTimer); - } - - self.tempTimer = setTimeout(function() { - self.toolbarUpdate(); - self.tempTimer = null; - }, 30); - - if (self.config.showTagPath) self.doEditorEvent(); -}, - -doOnArrowKeyPress : function (ev) { - var key = ev.keyCode; - if (key != 8 && (key < 33 || key > 40)) return; - this.onKeyPressToolbarUpdate(); -}, - -doOnKeyPress : function (ev) { - if (GB.browser.msie && this.config.ieEnterMode == 'br') { - var key = this.editArea.event.keyCode; - if (key && key == 13) { - if (this.editArea.event.shiftKey == false) { - var rng = this.getRange(); - this.editArea.event.returnValue = false; - this.editArea.event.cancelBubble = true; - rng.pasteHTML('
'); - rng.select(); - rng.moveEnd("character", 1); - rng.moveStart("character", 1); - rng.collapse(false); - return false; - } - else - return this.editArea.event.keyCode = 13; - } - } - this.onKeyPressToolbarUpdate(); -}, - -setWinPosition : function (oWin, oWinWidth) { - var obj = this.cheditor.container; - var L = 0; - var T = 0; - - S = this.getWindowSize(); - - if (obj.offsetParent) { - do { - T += obj.offsetTop; - } while (obj = obj.offsetParent); - } - - T += this.cheditor.toolbarWrapperHeight; - - if (GB.browser.msie) L /= 2; - L = (S.width / 2) - (oWinWidth / 2); - oWin.style.left = L + 'px'; - oWin.style.top = T + 'px'; - oWin.style.width = oWinWidth + 'px'; -}, - -getWindowSize : function () { - var docMode = document.compatMode == 'CSS1Compat'; - var docBody = document.body; - var docElem = document.documentElement; - - return { - scrollX : window.pageXOffset|| (docMode ? docElem.scrollLeft : docBody.scrollLeft), - scrollY : window.pageYOffset|| (docMode ? docElem.scrollTop : docBody.scrollTop), - width : window.innerWidth || (docMode ? docElem.clientWidth : docBody.clientWidth), - height : window.innerHeight|| (docMode ? docElem.clientHeight : docBody.clientHeight) - }; -}, - -popupWinLoad : function (popupAttr) { - var self = this; - if (self.cheditor.popupTitle.hasChildNodes()) - self.cheditor.popupTitle.removeChild(self.cheditor.popupTitle.firstChild); - - self.cheditor.popupTitle.appendChild(document.createTextNode(popupAttr['title'])); - self.cheditor.popupElem.style.zIndex = 1002; - self.setWinPosition(self.cheditor.popupElem, popupAttr['width']); - - var iframe = document.createElement("iframe"); - iframe.setAttribute('frameBorder', 0); - iframe.setAttribute('name', popupAttr['tmpl']); - iframe.style.width = '100%'; - iframe.style.height = '100px'; - iframe.style.border = "0px"; - iframe.setAttribute('src', self.config.popupPath + popupAttr['tmpl']); - iframe.style.visibility = 'hidden'; - iframe.id = popupAttr['tmpl']; - - if (self.cheditor.popupFrameWrapper.hasChildNodes()) - self.cheditor.popupFrameWrapper.removeChild(self.cheditor.popupFrameWrapper.firstChild); - - self.cheditor.popupFrameWrapper.appendChild(iframe); - - var popWinResizeHeight = function () { - iframe.style.visibility = 'visible'; - iframe.contentWindow.focus(); - iframe.contentWindow.init.call(self, iframe, popupAttr['argv'] ? popupAttr['argv'] : null); - }; - - if (GB.browser.msie) { - var done = false; - iframe.onreadystatechange = function() { - if (!done && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")) { - done = true; - popWinResizeHeight(); - } - }; - } - else { - iframe.onload = popWinResizeHeight; - } - - self.cheditor.popupElem.style.display = 'block'; - - var modalSize = self.getWindowSize(); - self.cheditor.modalBackground.style.zIndex = self.modalElementZIndex; - if (GB.browser.opera) { - self.modalReSize = function() { - var modalSize = self.getWindowSize.call(self); - self.cheditor.modalBackground.style.height = modalSize.height + 'px'; - }; - window.addEventListener("resize", self.modalReSize, false); - } - - if (GB.browser.msie) { - if (GB.browser.ver < 7) self.cheditor.modalBackground.style.height = modalSize.height + 'px'; - self.cheditor.modalBackground.style.filter = 'alpha(opacity=50)'; - } - else - self.cheditor.modalBackground.style.opacity = .5; - - document.body.insertBefore(self.cheditor.modalBackground, document.body.firstChild); - self.cheditor.modalBackground.style.display = 'block'; - document.body.insertBefore(self.cheditor.popupElem, document.body.firstChild); - DragWindow.init(self.cheditor.dragHandle, self.cheditor.popupElem); -}, - -popupWinClose : function () { - if (this.cheditor.popupElem == null) - return; - - this.cheditor.popupElem.style.display = 'none'; - this.cheditor.popupElem.style.zIndex = -1; - this.cheditor.popupFrameWrapper.src = ""; - this.cheditor.modalBackground.style.display = 'none'; - this.cheditor.modalBackground.style.zIndex = -1; - - if (this.modalReSize != null) { - if (GB.browser.opera) { - window.removeEventListener("resize", self.modaReSize, false); - } - this.modalReSize = null; - } - - this.editArea.focus(); - this.restoreRange(); -}, - -restoreRange : function () { - if (GB.browser.msie) { - var rng = this.range || this.getRange(); - if (rng) { - rng.select(); - this.range = null; - } - } -}, - -windowOpen : function (popupName) { - this.editArea.focus(); - this.boxHideAll(); - this.setRange(this.getRange()); - - if (typeof GB.popupWindow[popupName] != 'undefined') - this.popupWinLoad(GB.popupWindow[popupName]); - else - alert('사용할 수 없는 명령입니다.'); -}, - -getSelection : function () { - return GB.browser.msie ? this.doc.selection : this.editArea.getSelection(); -}, - -getRange : function () { - var self = this; - var sel = self.getSelection(), rng = null; - - try { - if (sel) { - rng = GB.browser.msie ? (sel.createRange ? sel.createRange() : self.doc.createRange()) : sel.getRangeAt(0); - } - } - catch (e) {} - - if (!rng) { - rng = GB.browser.msie ? self.doc.body.createTextRange() : self.doc.createRange(); - } - - return (this.range = rng); -}, - -setRange : function (rng) { - if (GB.browser.msie) { - try { - rng.select(); - } - catch(e) {} - } - else { - var sel = this.getSelection(); - if (sel) { - sel.removeAllRanges(); - sel.addRange(rng); - } - } -}, - -getSelectionType : function (rng) { - if (!rng) return null; - var type = null; - - if (GB.browser.msie) { - type = GB.selection.SELECTION_NONE; - - try { - var selectionType = this.doc.selection.type; - type = (selectionType == 'Text') ? - GB.selection.SELECTION_TEXT : - ((selectionType == 'Control') ? - GB.selection.SELECTION_ELEMENT : GB.selection.SELECTION_NONE); - - if (type == GB.selection.SELECTION_NONE && selectionType.createRange().parentElement()) { - type = GB.selection.SELECTION_TEXT; - } - } - catch (e) {} - } - else { - type = GB.selection.SELECTION_TEXT; - if (rng.startContainer == rng.endContainer && rng.startContainer.nodeType == GB.node.ELEMENT_NODE) { - type = GB.selection.SELECTION_ELEMENT; - } - } - return type; -}, - -saveUndo : function () { - if (this.config.customUndo == false) return; - - var html = this.getContents(); - if (0 <= this.undoStackIndex && html == this.undoStack[this.undoStackIndex][0]) { - return; - } -}, - -doCmd : function (cmd, opt) { - var rng = null; - - this.editArea.focus(); - this.boxHideAll(); - - if (cmd == 'NewDocument') { - if (confirm('글 내용이 모두 사라집니다. 계속하시겠습니까?')) - this.doc.body.innerHTML = ''; - - this.images = new Array(); - this.editImages = new Object; - this.editArea.focus(); - this.toolbarUpdate(); - return; - } - - if (cmd == 'ClearTag') { - if (confirm('모든 HTML 태그를 삭제합니다. 계속하시겠습니까?\n(P, DIV, BR 태그와 텍스트는 삭제하지 않습니다.)')) { - var content = this.doc.body.innerHTML; - this.doc.body.innerHTML = content.replace(/<(\/?)([^>]*)>/g, - function(a, b, c) { - var el = c.toLowerCase().split(/ /)[0]; - if (el != 'p' && el != 'div' && el != 'br') return ''; - - return '<'+b+el+'>'; - }); - } - - this.editArea.focus(); - this.toolbarUpdate(); - return; - } - - if (cmd == 'Print') { - this.editArea.print(); - return; - } - - if (cmd == 'PageBreak') { - this.printPageBreak(); - this.editArea.focus(); - return; - } - - if (GB.browser.msie) { - rng = this.getRange(); - if (this.getSelectionType(rng) == GB.selection.SELECTION_NONE) - rng = this.doc; - } - else { - rng = this.doc; - } - - if (!GB.browser.msie && (cmd == 'Cut' || cmd == 'Copy' || cmd == 'Paste' || cmd == 'PasteFromWord')) { - try { rng.execCommand(cmd, false, opt); } - catch (e) { - var keyboard = ''; - var command = ''; - switch (cmd) { - case 'Cut' : keyboard = 'x'; command = '자르기'; break; - case 'Copy' : keyboard = 'c'; command = '복사'; break; - case 'Paste': keyboard = 'v'; command = '붙이기'; break; - } - - alert('사용하고 계신 브라우저에서는 \'' + command + '\' 명령을 사용하실 수 없습니다. \n' + - '키보드 단축키를 이용하여 주세요. \(윈도 사용자: Ctrl + ' + keyboard + ', 애플 사용자: Apple + ' + keyboard + '\)'); - } - - this.editArea.focus(); - return; - } - - try { - if (cmd == 'PasteFromWord') { - if (typeof this.cheditor.tmpdoc == 'undefined') { - var tmpframe = document.createElement('iframe'); - tmpframe.setAttribute('contentEditable', true); - tmpframe.style.visibility = 'hidden'; - tmpframe.style.height = tmpframe.style.width = '0px'; - tmpframe.setAttribute('frameBorder', 0); - this.cheditor.editWrapper.appendChild(tmpframe); - - var tmpdoc = tmpframe.contentWindow.document; - tmpdoc.designMode = 'On'; - tmpdoc.open("text/html","replace"); - tmpdoc.close(); - this.cheditor.tmpdoc = tmpdoc; - } - - rng = this.getRange(); - var tmpDoc = this.cheditor.tmpdoc; - tmpDoc.execCommand("SelectAll"); - tmpDoc.execCommand("Paste"); - - rng.pasteHTML(this.cleanFromWord(tmpDoc)); - rng.select(); - } - else if (cmd == 'Paste') { - rng.execCommand(cmd); - } - else { - rng.execCommand(cmd, false, opt); - } - } - catch (e) { - alert(cmd + ": 지원되지 않는 명령입니다."); - } - - this.toolbarUpdate(); -}, - -cleanFromWord : function (tmpDoc) { - for (var i=0; i < tmpDoc.body.all.length; i++) { - tmpDoc.body.all[i].removeAttribute("className", "", 0); - } - - var doc = tmpDoc.body.innerHTML; - doc = doc.replace(/MsoNormal/g, ""); - doc = doc.replace(/<\\?\?xml[^>]*>/g, ""); - doc = doc.replace(/<\/?o:p[^>]*>/g, ""); - doc = doc.replace(/<\/?v:[^>]*>/g, ""); - doc = doc.replace(/<\/?o:[^>]*>/g, ""); - doc = doc.replace(/<\/?st1:[^>]*>/g, ""); - doc = doc.replace(//g, ""); - doc = doc.replace(//g, ""); - doc = doc.replace(/<\\?\?xml[^>]*>/g, ""); - doc = doc.replace(/<\/?o:p[^>]*>/g, ""); - doc = doc.replace(/<\/?v:[^>]*>/g, ""); - doc = doc.replace(/<\/?o:[^>]*>/g, ""); - doc = doc.replace(/<\/?st1:[^>]*>/g, ""); - doc = doc.replace(/lang=.?[^" >]*/ig, ""); - doc = doc.replace(/type=.?[^" >]*/g, ""); - doc = doc.replace(/href=\'#[^\"]*\'/g, ""); - doc = doc.replace(/href=\"#[^\"]*\"/g, ""); - doc = doc.replace(/name=.?[^\" >]*/g, ""); - doc = doc.replace(/ clear=\"all\"/g, ""); - doc = doc.replace(/id=\"[^\"]*\"/g, ""); - doc = doc.replace(/title=\"[^\"]*\"/g, ""); - doc = doc.replace(/\n/g, ""); - doc = doc.replace(/\r/g, ""); - doc = doc.replace(/mso\-[^">;]*/g, ""); - doc = doc.replace(/]*/ig, "]*<\/span>/ig, ""); - return doc; -}, - -printPageBreak : function () { - var hr = document.createElement('hr'); - hr.style.pageBreakAfter = 'always'; - hr.style.border = '1px #999 dotted'; - this.insertHTML(hr); -}, - -doCmdPaste : function (html) { - this.editArea.focus(); - if (GB.browser.msie) { - if (this.range.item) { - var rng = this.doc.body.createTextRange(); - if (rng) { - rng.moveToElementText(this.range.item(0)); - rng.collapse(false); - rng.select(); - this.range.item(0).outerHTML = html; - } - this.toolbarUpdate(); - } - else { - this.range.pasteHTML(html); - this.range.collapse(false); - this.range.select(); - } - } - else { - this.insertNodeAtSelection(html); - } -}, - -doCmdPopup : function (cmd, opt) { - var self = this; - self.editArea.focus(); - var rng, oRange; - - if (GB.browser.msie) { - oRange = self.range || self.getRange(); - oRange.select(); - rng = (self.getSelectionType(oRange) == GB.selection.SELECTION_NONE) ? self.doc : oRange; - } - else { - rng = self.doc; - } - - try { - rng.execCommand(cmd, false, opt); - } - catch(e) { - alert(cmd + ": 지원되지 않는 명령입니다."); - } - - if (self.tempTimer) { - clearTimeout(self.tempTimer); - } - - self.tempTimer = setTimeout(function() { - self.toolbarUpdate(); - self.tempTimer = null; - }, 50); - - self.boxHideAll(); -}, - -modifyImage : function (img) { - var self = this; - var widthOptions = {'default' : { size: 'default', desc: '원본 크기'}, - 'custom' : { size: 'input', desc: '직접 입력:'}, - 'fitpage' : { size: '100%', desc: '페이지 크기에 맞춤'}, - 'px160' : { size: 160, desc: '썸네일, 160 픽셀'}, - 'px320' : { size: 320, desc: '작은 크기, 320 픽셀'}, - 'px640' : { size: 640, desc: '중간 크기, 640 픽셀'}, - 'px1024' : { size: 1024, desc: '크게, 1024 픽셀'}, - 'px1600' : { size: 1600, desc: '아주 크게, 1600 픽셀'} - }; - var imageAlign = {'left' : '왼쪽', - 'center' : '가운데', - 'right' : '오른쪽' - }; - - var selectedWidth = document.createElement('select'); - for (var idx in widthOptions) { - selectedWidth.options[selectedWidth.options.length] = new Option(widthOptions[idx].desc, idx); - } - - selectedWidth.onchange = function() { - if (this.value == 'custom') { - inputWidthWrapper.style.display = ''; - inputWidth.focus(); - } - else { - inputWidthWrapper.style.display = 'none'; - editImageSubmit(); - } - }; - - var div = document.createElement('div'); - div.style.textAlign="left"; - var ico = new Image(); - ico.src = this.config.iconPath + 'image_resize.png'; - ico.className = 'cheditor-ico'; - div.appendChild(ico); - div.appendChild(selectedWidth); - - var inputWidthWrapper = document.createElement('span'); - var inputWidth = document.createElement('input'); - inputWidth.setAttribute('type', 'text'); - inputWidth.setAttribute('name', 'inputWidth'); - inputWidth.className = 'user-input-width'; - - inputWidthWrapper.appendChild(inputWidth); - inputWidthWrapper.appendChild(document.createTextNode(' 픽셀')); - div.appendChild(inputWidthWrapper); - - selectedWidth.value = 'custom'; - - alignIco = new Image(); - alignIco.src = this.config.iconPath + 'image_align_left.png'; - alignIco.className = 'cheditor-ico'; - alignIco.style.marginLeft = '20px'; - div.appendChild(alignIco); - - var selectedAlign = document.createElement('select'); - selectedAlign.style.marginRight = '5px'; - - div.appendChild(selectedAlign); - - for (var idx in imageAlign) { - selectedAlign.options[selectedAlign.options.length] = new Option(imageAlign[idx], idx); - } - - selectedAlign.onchange = function() { - alignIco.src = self.config.iconPath + 'image_align_' + this.value + '.png'; - - if (this.value == 'center') { - wrapspan.style.display = 'none'; - } - else { - wrapspan.style.display = ''; - wrapIcon.src = self.config.iconPath + 'image_align_' + selectedAlign.value + '_wt.png'; - } - wrapcheck.checked = false; - }; - - var wrapspan = document.createElement('span'); - var wrapcheck = document.createElement('input'); - wrapcheck.setAttribute('type', 'checkbox'); - wrapcheck.setAttribute('name', 'wrapText'); - wrapcheck.setAttribute('value', '1'); - wrapcheck.className = 'wrap-checked'; - - wrapcheck.onclick = function() { - alignIco.src = self.config.iconPath + 'image_align_' + selectedAlign.value + (this.checked ? '_wt.png' : '.png'); - }; - - var cssFloat = GB.browser.msie ? img.style.styleFloat : img.style.cssFloat; - if (cssFloat) { - wrapcheck.checked = true; - selectedAlign.value = cssFloat.toLowerCase(); - } - else { - wrapcheck.checked = false; - var wrapper = img.parentNode; - if ((wrapper.nodeName == 'DIV' || wrapper.nodeName == 'P') && wrapper.style.textAlign) { - selectedAlign.value = wrapper.style.textAlign.toLowerCase(); - } - } - - wrapspan.className = 'wrap-text-desc'; - wrapspan.style.display = (selectedAlign.value != 'center') ? '' : 'none'; - wrapspan.appendChild(wrapcheck); - - var wrapIcon = new Image(); - wrapIcon.className = 'cheditor-ico'; - wrapIcon.src = this.config.iconPath + 'image_align_' + selectedAlign.value + '_wt.png'; - wrapspan.appendChild(wrapIcon); - div.appendChild(wrapspan); - - var submit = new Image(); - submit.src = this.config.iconPath + 'button/edit_image.gif'; - submit.className = 'input-submit'; - submit.onclick = function() { editImageSubmit(); }; - div.appendChild(submit); - - var deleteSubmit = new Image(); - deleteSubmit.src = this.config.iconPath + 'button/delete_cross.gif'; - deleteSubmit.className = 'delete-submit'; - deleteSubmit.onclick = function() { - var wrapper = img.parentNode; - if (wrapper.firstChild == wrapper.lastChild && wrapper.nodeName != 'BODY') - wrapper.parentNode.removeChild(wrapper); - else { - wrapper.removeChild(img); - } - self.doEditorEvent(); - }; - div.appendChild(deleteSubmit); - - if (typeof self.editImages[img.src] == 'undefined') { - self.editImages[img.src] = { width: img.width, height: img.height }; - } - - var editImageSubmit = function() { - if (inputAlt.value != '' && inputAlt.value != null) - img.setAttribute('alt', inputAlt.value); - else - img.setAttribute('alt', ''); - - var setFloat = function(value) { - if (GB.browser.msie) img.style.styleFloat = value; - else img.style.cssFloat = value; - }; - var setWrapper = function(value) { - var pNode = img.parentNode; - if (pNode.nodeName != 'DIV' && pNode.nodeName != 'P') { - var newNode = document.createElement('div'); - img.parentNode.insertBefore(newNode, img); - newNode.appendChild(img); - } - - pNode.style.textAlign = value; - pNode.removeAttribute('align'); - }; - - if (wrapcheck.checked && selectedAlign.value != 'center') { - setWrapper('left'); - setFloat(selectedAlign.value); - - if (selectedAlign.value == 'left') { - img.style.marginRight = '1em'; - img.style.marginLeft = ''; - } - else if (selectedAlign.value == 'right') { - img.style.marginLeft = '1em'; - img.style.marginRight = ''; - } - } - else { - setWrapper(selectedAlign.value); - setFloat(''); - img.style.margin = ''; - } - - img.removeAttribute('width'); - img.removeAttribute('height'); - var width = null; - var height = null; - - if (self.editImages[img.src] && self.editImages[img.src].width != null) { - width = self.editImages[img.src].width; - if (self.editImages[img.src] && self.editImages[img.src].height != null) { - height = self.editImages[img.src].height; - } - else { - height = img.height; - } - } - else if (img.width) { - width = img.width; - } - else { - return; - } - - switch (selectedWidth.value) { - case 'default' : - width = width + 'px'; - height = (height ? height : img.height) + 'px'; - break; - case 'fitpage' : - width = '100%'; - height = 'auto'; - break; - case 'custom' : - width = self.trimSpace(inputWidth.value); - if (width == '') return; - - width = parseInt(inputWidth.value); - if (isNaN(width) && img.height) { - width = width + 'px'; - height = height + 'px'; - } - else { - height = Math.round((img.height * width) / img.width) + 'px'; - width += 'px'; - } - break; - default: - width = widthOptions[selectedWidth.value].size; - if (img.height) { - height = Math.round((img.height * width) / img.width) + 'px'; - - } - width += 'px'; - } - - if (width) img.style.width = width; - if (height) img.style.height = height; - self.editArea.focus(); - self.doEditorEvent(); - }; - - div.appendChild(document.createElement('br')); - div.appendChild(document.createTextNode('대체 텍스트(Alt):')); - var inputAlt = document.createElement('input'); - inputAlt.setAttribute('type', 'text'); - inputAlt.setAttribute('name', 'inputAlt'); - inputAlt.setAttribute('value', ''); - inputAlt.className = 'user-input-alt'; - div.appendChild(inputAlt); - - if (img.getAttribute('alt') != '' && img.getAttribute('alt') != null) - inputAlt.value = img.getAttribute('alt'); - - self.cheditor.editBlock.innerHTML = ''; - self.cheditor.editBlock.appendChild(div); -}, - -modifyCell : function (ctd) { - var self = this; - var ctb = ctd; - var ctr = ctb; - //var editorPath = self.config.editorPath; - - while (ctb != null && ctb.tagName.toLowerCase() != "table") ctb = ctb.parentNode; - while (ctr != null && ctr.tagName.toLowerCase() != "tr") ctr = ctr.parentNode; - - var getCellMatrix = function () { - var tm = new Array(); - var rows = (ctb.rows && ctb.rows.length > 0) ? ctb.rows : ctb.getElementsByTagName("TR"); - - for (var i=0; i < rows.length; i++) { - tm[i] = new Array(); - } - - for (var i=0; i < rows.length; i++) { - var jr = 0; - for (var j=0; j < rows[i].cells.length; j++) { - while (typeof tm[i][jr] != 'undefined') - jr++; - - for (var jh=jr; jh < jr + (rows[i].cells[j].colSpan ? rows[i].cells[j].colSpan : 1); jh++) { - for (var jv=i; jv < i + (rows[i].cells[j].rowSpan ? rows[i].cells[j].rowSpan : 1); jv++) { - tm[jv][jh] = (jv == i) ? rows[i].cells[j].cellIndex : -1; - } - } - } - } - return tm; - }; - - var insertColumn = function() { - var tm = getCellMatrix(); - var rows = (ctb.rows && ctb.rows.length > 0) ? ctb.rows : ctb.getElementsByTagName("TR"); - var rowIndex = 0, realIndex = 0; - - if (ctr.rowIndex >= 0) { - rowIndex = ctr.rowIndex; - } - else { - for(var i=0; i < rows.length; i++) { - if (rows[i] == ctr) { - rowIndex = i; - break; - } - } - } - - for (var j=0; j < tm[rowIndex].length; j++) { - if (tm[rowIndex][j] == ctd.cellIndex) { - realIndex = j; - break; - } - } - - for (var i=0; i < rows.length; i++) { - if (tm[i][realIndex] != -1) { - if (rows[i].cells[tm[i][realIndex]].colSpan > 1) { - rows[i].cells[tm[i][realIndex]].colSpan++; - } - else { - var newc = rows[i].insertCell(tm[i][realIndex]+1); - var nc = rows[i].cells[tm[i][realIndex]].cloneNode(false); - nc.innerHTML = ' '; - rows[i].replaceChild(nc, newc); - } - } - } - }; - - var insertRow = function(idx) { - var newr = ctb.insertRow(ctr.rowIndex + 1); - for (var i=0; i < ctr.cells.length; i++) { - if (ctr.cells[i].rowSpan > 1) { - ctr.cells[i].rowSpan++; - } - else { - var newc = ctr.cells[i].cloneNode(false); - newc.innerHTML = ' '; - newr.appendChild(newc); - } - } - - for (var i=0; i < ctr.rowIndex; i++) { - var tempr; - if (ctb.rows && ctb.rows.length > 0) { - tempr = ctb.rows[i]; - } - else { - tempr = ctb.getElementsByTagName("tr")[i]; - } - for (var j=0; j < tempr.cells.length; j++) { - if (tempr.cells[j].rowSpan > (ctr.rowIndex - i)) - tempr.cells[j].rowSpan++; - } - } - }; - - var deleteColumn = function () { - var tm = getCellMatrix(ctb); - var rows = (ctb.rows && ctb.rows.length>0) ? ctb.rows : ctb.getElementsByTagName("TR"); - var rowIndex = 0, realIndex = 0; - - if (ctr.rowIndex >= 0) { - rowIndex = ctr.rowIndex; - } - else { - for(var i=0; i < rows.length; i++) { - if (rows[i] == ctr) { - rowIndex = i; - break; - } - } - } - - if (tm[0].length <= 1) { - ctb.parentNode.removeChild(ctb); - } - else { - for (var j=0; j < tm[rowIndex].length; j++) { - if (tm[rowIndex][j] == ctd.cellIndex) { - realIndex = j; - break; - } - } - - for (var i=0; i < rows.length; i++) { - if (tm[i][realIndex] != -1) { - if (rows[i].cells[tm[i][realIndex]].colSpan > 1) { - rows[i].cells[tm[i][realIndex]].colSpan--; - } - else { - rows[i].deleteCell(tm[i][realIndex]); - } - } - } - } - }; - - var deleteRow = function () { - var tm = getCellMatrix(ctb); - var rows = (ctb.rows && ctb.rows.length>0) ? ctb.rows : ctb.getElementsByTagName("TR"); - var rowIndex = 0; - - if (ctr.rowIndex >= 0) { - rowIndex = ctr.rowIndex; - } - else { - for(var i=0; i < rows.length; i++) { - if (rows[i] == ctr) { - rowIndex = i; - break; - } - } - } - - if (rows.length <= 1) { - ctb.parentNode.removeChild(ctb); - } - else { - for (var i=0; i < rowIndex; i++) { - var tempr = rows[i]; - for (var j=0; j < tempr.cells.length; j++) { - if (tempr.cells[j].rowSpan > (rowIndex - i)) - tempr.cells[j].rowSpan--; - } - } - - var curCI = -1; - for (var i=0; i < tm[rowIndex].length; i++) { - var prevCI = curCI; - curCI = tm[rowIndex][i]; - - if (curCI != -1 && curCI != prevCI && ctr.cells[curCI].rowSpan>1 && (rowIndex+1) < rows.length) { - var ni = i; - var nrCI = tm[rowIndex+1][ni]; - while (nrCI == -1) { - ni++; - nrCI = (ni < rows[rowIndex+1].cells.length) ? tm[rowIndex+1][ni] : rows[rowIndex+1].cells.length; - } - - var newc = rows[rowIndex+1].insertCell(nrCI); - rows[rowIndex].cells[curCI].rowSpan--; - var nc = rows[rowIndex].cells[curCI].cloneNode(false); - rows[rowIndex+1].replaceChild(nc, newc); - - var cs = (ctr.cells[curCI].colSpan>1) ? ctr.cells[curCI].colSpan : 1; - var nj = 0; - - for (var j=i; j < (i+cs); j++) { - tm[rowIndex+1][j] = nrCI; - nj = j; - } - for (var j=nj; j < tm[rowIndex+1].length; j++) { - if (tm[rowIndex+1][j] != -1) - tm[rowIndex+1][j]++; - } - } - } - - if (ctb.rows && ctb.rows.length > 0) { - ctb.deleteRow(rowIndex); - } - else { - ctb.removeChild(rows[rowIndex]); - } - } - }; - - var mergeCellRight = function () { - var tm = getCellMatrix(ctb); - var rows = (ctb.rows && ctb.rows.length>0) ? ctb.rows : ctb.getElementsByTagName("TR"); - var rowIndex = 0, realIndex = 0; - - if (ctr.rowIndex >= 0) { - rowIndex = ctr.rowIndex; - } - else { - for(var i=0; i < rows.length; i++) { - if (rows[i] == ctr) { - rowIndex = i; - break; - } - } - } - - for (var j=0; j < tm[rowIndex].length; j++) { - if (tm[rowIndex][j] == ctd.cellIndex) { - realIndex = j; - break; - } - } - - if (ctd.cellIndex + 1 < ctr.cells.length) { - var ccrs = ctd.rowSpan ? ctd.rowSpan : 1; - var cccs = ctd.colSpan ? ctd.colSpan : 1; - var ncrs = ctr.cells[ctd.cellIndex+1].rowSpan ? ctr.cells[ctd.cellIndex+1].rowSpan : 1; - var nccs = ctr.cells[ctd.cellIndex+1].colSpan ? ctr.cells[ctd.cellIndex+1].colSpan : 1; - var j = realIndex; - - while (tm[rowIndex][j] == ctd.cellIndex) - j++; - - if (tm[rowIndex][j] == ctd.cellIndex + 1) { - if (ccrs == ncrs) { - if (rows.length > 1) ctd.colSpan = cccs + nccs; - var html = self.trimSpace(ctr.cells[ctd.cellIndex + 1].innerHTML); - html = html.replace(/^ /, ''); - ctd.innerHTML += html; - ctr.deleteCell(ctd.cellIndex + 1); - } - } - } - }; - - var mergeCellDown = function () { - var tm = getCellMatrix(ctb); - var rows = (ctb.rows && ctb.rows.length > 0) ? ctb.rows : ctb.getElementsByTagName("TR"); - var rowIndex = 0, crealIndex = 0; - - if (ctr.rowIndex >=0 ) { - rowIndex = ctr.rowIndex; - } - else { - for(var i=0; i < rows.length; i++) { - if (rows[i] == ctr) { - rowIndex = i; - break; - } - } - } - - for (var i=0; i < tm[rowIndex].length; i++) { - if (tm[rowIndex][i] == ctd.cellIndex) { - crealIndex = i; - break; - } - } - - var ccrs = ctd.rowSpan ? ctd.rowSpan : 1; - var cccs = ctd.colSpan ? ctd.colSpan : 1; - - if (rowIndex + ccrs < rows.length) { - var ncellIndex = tm[rowIndex + ccrs][crealIndex]; - if (ncellIndex != -1 && - (crealIndex == 0 || (crealIndex > 0 && (tm[rowIndex + ccrs][crealIndex-1] != tm[rowIndex + ccrs][crealIndex])))) - { - - var ncrs = rows[rowIndex + ccrs].cells[ncellIndex].rowSpan ? rows[rowIndex + ccrs].cells[ncellIndex].rowSpan : 1; - var nccs = rows[rowIndex + ccrs].cells[ncellIndex].colSpan ? rows[rowIndex + ccrs].cells[ncellIndex].colSpan : 1; - - if (cccs == nccs) { - var html = self.trimSpace(rows[rowIndex + ccrs].cells[ncellIndex].innerHTML); - html = html.replace(/^ /, ''); - ctd.innerHTML += html; - rows[rowIndex + ccrs].deleteCell(ncellIndex); - ctd.rowSpan = ccrs + ncrs; - } - } - } - }; - - var splitCellVertical = function () { - var tm = getCellMatrix(); - var rowIndex = 0, realIndex = 0; - - rows = (ctb.rows && ctb.rows.length > 0) ? ctb.rows : ctb.getElementsByTagName("TR"); - - if (ctr.rowIndex >= 0) { - rowIndex = ctr.rowIndex; - } - else { - for(var ri = 0; ri < rows.length; ri++) { - if (rows[ri] == ctr) { - rowIndex = ri; - break; - } - } - } - - for (var j=0; j < tm[rowIndex].length; j++) { - if (tm[rowIndex][j] == ctd.cellIndex) { - realIndex = j; - break; - } - } - - if (ctd.colSpan > 1) { - var newc = rows[rowIndex].insertCell(ctd.cellIndex + 1); - ctd.colSpan--; - var nc = ctd.cloneNode(false); - nc.innerHTML = ' '; - rows[rowIndex].replaceChild(nc, newc); - ctd.colSpan = 1; - ctd.removeAttribute('colSpan'); - } - else { - var newc = rows[rowIndex].insertCell(ctd.cellIndex + 1); - var nc = ctd.cloneNode(false); - nc.innerHTML = ' '; - rows[rowIndex].replaceChild(nc, newc); - - for (var i=0; i < tm.length; i++) { - if (i != rowIndex && tm[i][realIndex] != -1) { - var cs = (rows[i].cells[tm[i][realIndex]].colSpan > 1) ? rows[i].cells[tm[i][realIndex]].colSpan : 1; - rows[i].cells[tm[i][realIndex]].colSpan = cs + 1; - } - } - } - }; - - var splitCellHorizontal = function () { - var tm = getCellMatrix(); - var rowIndex = 0, realIndex = 0; - var rows = (ctb.rows && ctb.rows.length > 0) ? ctb.rows : ctb.getElementsByTagName("TR"); - - if (ctr.rowIndex >= 0) { - rowIndex = ctr.rowIndex; - } - else { - for(var i=0; i < rows.length; i++) { - if (rows[i] == ctr) { - rowIndex = i; - break; - } - } - } - - for (var j=0; j < tm[rowIndex].length; j++) { - if (tm[rowIndex][j] == ctd.cellIndex) { - realIndex = j; - break; - } - } - - if (ctd.rowSpan > 1) { - var i = realIndex; - var ni; - - while (tm[rowIndex + 1][i] == -1) { - i++; - } - - ni = (i == tm[rowIndex + 1].length) ? rows[rowIndex + 1].cells.length : tm[rowIndex + 1][i]; - - var newc = rows[rowIndex + 1].insertCell(ni); - ctd.rowSpan--; - - var nc = ctd.cloneNode(false); - nc.innerHTML = ' '; - rows[rowIndex + 1].replaceChild(nc, newc); - ctd.rowSpan = 1; - } - else { - if (ctb.rows && ctb.rows.length > 0) { - ctb.insertRow(rowIndex+1); - } - else { - if (rowIndex<(rows.length - 1)) { - ctb.insertBefore(document.createElement("TR"), rows[rowIndex + 1]); - } - else { - ctb.appendChild(document.createElement("TR")); - } - } - - var rs; - for (var i=0; i < ctr.cells.length; i++) { - if (i != ctd.cellIndex) { - rs = ctr.cells[i].rowSpan > 1 ? ctr.cells[i].rowSpan : 1; - ctr.cells[i].rowSpan = rs + 1; - } - } - - for (var i=0; i < rowIndex; i++) { - var tempr = rows[i]; - for (var j=0; j < tempr.cells.length; j++) { - if (tempr.cells[j].rowSpan > (rowIndex - i)) { - tempr.cells[j].rowSpan++; - } - } - } - - var newc = rows[rowIndex+1].insertCell(0); - var nc = ctd.cloneNode(false); - nc.innerHTML = ' '; - rows[rowIndex+1].replaceChild(nc, newc); - } - }; - - var tblReflash = function() { self.editArea.focus(); self.doEditorEvent(); }; - var funcs = { - 'add_cols_after' : { 'icon' : 'table_insert_column.png', 'title' : '열 삽입', - 'func' : function() { insertColumn(ctd.cellIndex); tblReflash(); }}, - 'add_rows_after': { 'icon' : 'table_insert_row.png', 'title' : '행 삽입', - 'func' : function() { insertRow(ctr.rowIndex); tblReflash(); }}, - 'remove_cols': { 'icon' : 'table_delete_column.png', 'title' : '열 삭제', - 'func' : function() { deleteColumn(ctd.cellIndex); tblReflash(); }}, - 'remove_rows': { 'icon' : 'table_delete_row.png', 'title' : '행 삭제', - 'func' : function() { deleteRow(); tblReflash(); }}, - 'sp1' : { 'icon' : 'dot.gif' }, - 'merge_cell_right': { 'icon' : 'table_join_row.png', 'title' : '오른쪽 셀과 병합', - 'func' : function() { mergeCellRight(); tblReflash(); }}, - 'merge_cell_down': { 'icon' : 'table_join_column.png', 'title' : '아래 셀과 병합', - 'func' : function() { mergeCellDown(); tblReflash(); }}, - 'split_cell_v': { 'icon' : 'table_split_row.png', 'title' : '셀 열로 나누기', - 'func' : function() { splitCellVertical(); tblReflash(); }}, - 'split_cell_h': { 'icon' : 'table_split_column.png', 'title' : '셀 행으로 나누기', - 'func' : function() { splitCellHorizontal(); tblReflash(); }} - }; - - self.cheditor.editBlock.innerHTML = ''; - var div = document.createElement('div'); - div.style.padding = '6px'; - - for (var i in funcs) { - var span = document.createElement('span'); - var icon = document.createElement('img'); - icon.src = self.config.iconPath + funcs[i].icon; - if (i == 'sp1' || i == 'sp2') { - icon.className = 'edit-table-ico'; - } - else { - icon.setAttribute('title', funcs[i].title); - icon.className = 'edit-table-ico'; - icon.setAttribute('alt', ''); - icon.onclick = funcs[i].func; - } - div.appendChild(span.appendChild(icon)); - } - - /*var deleteTable = function() { - ctb.parentNode.removeChild(ctb); - self.doEditorEvent(); - };*/ - - var deleteSubmit = new Image(); - deleteSubmit.src = this.config.iconPath + 'delete_table.png'; - deleteSubmit.style.marginLeft = "22px"; - deleteSubmit.className = 'edit-table-ico'; - deleteSubmit.setAttribute('title', '테이블 삭제'); - deleteSubmit.onclick = function() { - ctb.parentNode.removeChild(ctb); - self.doEditorEvent(); - }; - - div.appendChild(deleteSubmit); - - var attrFuncs = { - 'setWidth' : { - 'txt': '가로폭', - 'id' : 'fm_cell_width', - 'marginRight' : '10px', - 'value' : ctd.getAttribute('width') - }, - 'setHeight' : { - 'txt': '세로폭', - 'id' : 'fm_cell_height', - 'marginRight' : '10px', - 'value' : ctd.getAttribute('height') - }, - 'setBgcolor' : { - 'txt': '배경색', - 'id' : 'fm_cell_bgcolor', - 'marginRight' : '2px', - 'value' : ctd.getAttribute('bgcolor') - } - }; - - var spliter = document.createElement('div'); - spliter.style.padding = '10px 0px 0px 0px'; - spliter.style.marginTop = '5px'; - spliter.style.borderTop = '1px solid #ccc'; - spliter.style.textAlign = 'center'; - - for (var i in attrFuncs) { - var txt = document.createTextNode(attrFuncs[i].txt + ' '); - spliter.appendChild(txt); - var input = document.createElement('input'); - input.style.marginRight = attrFuncs[i].marginRight; - input.setAttribute('type', 'text'); - input.setAttribute('name', i); - input.setAttribute('id', attrFuncs[i].id); - input.setAttribute('size', 7); - input.setAttribute('value', attrFuncs[i].value ? attrFuncs[i].value : ''); - spliter.appendChild(input); - } - - var colorPicker = new Image(); - colorPicker.src = this.config.iconPath + 'button/color_picker.gif'; - colorPicker.className = 'color-picker'; - colorPicker.onclick = function() { - GB.popupWindow.ColorPicker.argv = { func : - function(color) { - ctd.setAttribute('bgColor', color); - self.$('fm_cell_bgcolor').value = color; - }, - selectedCell : ctd - }; - self.windowOpen('ColorPicker'); - }; - spliter.appendChild(colorPicker); - - var editSubmit = new Image(); - editSubmit.src = this.config.iconPath + 'button/edit_cell.gif'; - editSubmit.className = 'input-submit'; - editSubmit.style.verticalAlign = 'top'; - editSubmit.onclick = function() { - ctd.setAttribute('width', self.$('fm_cell_width').value); - ctd.setAttribute('height', self.$('fm_cell_height').value); - ctd.setAttribute('bgcolor', self.$('fm_cell_bgcolor').value); - }; - - spliter.appendChild(editSubmit); - div.appendChild(spliter); - self.cheditor.editBlock.appendChild(div); -}, - -doEditorEvent : function () { - var self = this; - var statusBar = self.cheditor.tagPath; - var modifyBlock = self.cheditor.editBlock; - var oEditor = self.editArea; - var cmd = null, el, pNode, ancestors = new Array(); - var rng = self.getRange(); - var nodeType = self.getSelectionType(rng); - - if (GB.browser.msie) { - switch (nodeType) { - case GB.selection.SELECTION_NONE : - case GB.selection.SELECTION_TEXT : - pNode = rng.parentElement(); - break; - case GB.selection.SELECTION_ELEMENT : - pNode = rng.item(0); - break; - default : - pNode = oEditor.document.body; - } - } - else { - try { - pNode = rng.commonAncestorContainer; - if (!rng.collapsed && - rng.startContainer == rng.endContainer && - rng.startOffset - rng.endOffset < 2 && - rng.startContainer.hasChildNodes()) - { - pNode = rng.startContainer.childNodes[rng.startOffset]; - } - - while (pNode.nodeType == GB.node.TEXT_NODE) { - pNode = pNode.parentNode; - } - } - catch (e) { pNode= null; } - } - - while (pNode && (pNode.nodeType == GB.node.ELEMENT_NODE) && (pNode.tagName.toLowerCase() != 'body')) { - ancestors.push(pNode); - if (pNode.tagName.toLowerCase() == 'img') { - cmd = 'img'; - break; - } - else if (pNode.tagName.toLowerCase() == 'td') { - cmd = 'td'; - break; - } - pNode = pNode.parentNode; - } - - ancestors.push(oEditor.document.body); - - if (cmd == null) { - modifyBlock.style.display = "none"; - modifyBlock.innerHTML = ''; - } - else { - switch (cmd) { - case "td" : - modifyBlock.style.display = "block"; - self.modifyCell(pNode); - break; - default : break; - } - } - - if (self.config.showTagPath) { - statusBar.innerHTML = ''; - statusBar.appendChild(document.createTextNode(' ')); - - while (el = ancestors.pop()) { - if (!el || el.tagName.toLowerCase() == 'html' || el.tagName.toLowerCase() == 'body') - continue; - - var tag = el.tagName.toUpperCase(); - var a = document.createElement("a"); - a.el = el; - a.href = "javascript:void%200"; - a.className = 'cheditor-tag-path-elem'; - a.title = el.style.cssText; - a.onclick = function () { self.$('removeSelected').style.display = 'inline'; self.tagSelector(this.el); }; - a.appendChild(document.createTextNode(tag.toLowerCase())); - statusBar.appendChild(document.createTextNode('<')); - statusBar.appendChild(a); - statusBar.appendChild(document.createTextNode('> ')); - } - - var remove = document.createElement("a"); - remove.href = "javascript:void%200"; - remove.id = "removeSelected"; - remove.style.display = 'none'; - remove.className = 'cheditor-tag-path-elem'; - remove.style.color = '#cc3300'; - remove.appendChild(document.createTextNode('remove')); - remove.onclick = function () { oEditor.document.execCommand("Cut", false, null); - remove.style.display = 'none'; - oEditor.focus(); - self.doEditorEvent(); }; - - var span = document.createElement('span'); - span.style.marginTop = '2px'; - span.appendChild(remove); - self.cheditor.tagPath.appendChild(span); - } - - if (self.tempTimer) - clearTimeout(self.tempTimer); - - var interval = 50; - if (GB.browser.msie && rng.text != '' && nodeType != GB.selection.SELECTION_ELEMENT) { - interval = 300; - } - self.tempTimer = setTimeout(function() { - self.toolbarUpdate(); - self.tempTimer = null; - }, interval); -}, - -tagSelector : function (node) { - this.editArea.focus(); - var rng; - - if (GB.browser.msie) { - rng = this.doc.body.createTextRange(); - if (rng) { - rng.moveToElementText(node); - rng.select(); - } - } - else { - var sel = this.editArea.getSelection(); - if (typeof sel == 'undefined') - return; - try { - rng = sel.getRangeAt(0); - } - catch(e) { return; } - - rng.selectNodeContents(node); - sel.removeAllRanges(); - sel.addRange(rng); - } -}, - -getBrowser : function () { return GB.browser; }, - -$ : function (id) { return document.getElementById(id); } -}; - -var DragWindow = { - obj : null, - init : function (o, oRoot, minX, maxX, minY, maxY) { - o.onmousedown = DragWindow.start; - o.onmouseover = function () { this.style.cursor = 'move'; }; - o.hmode = true ; - o.vmode = true ; - o.root = oRoot && oRoot != null ? oRoot : o; - o.transId = oRoot.id + '_Trans'; - - if (o.hmode && isNaN(parseInt(o.root.style.left ))) o.root.style.left = "0px"; - if (o.vmode && isNaN(parseInt(o.root.style.top ))) o.root.style.top = "0px"; - if (!o.hmode && isNaN(parseInt(o.root.style.right ))) o.root.style.right = "0px"; - if (!o.vmode && isNaN(parseInt(o.root.style.bottom))) o.root.style.bottom = "0px"; - - o.minX = typeof minX != 'undefined' ? minX : null; - o.minY = typeof minY != 'undefined' ? minY : null; - o.maxX = typeof maxX != 'undefined' ? maxX : null; - o.maxY = typeof maxY != 'undefined' ? maxY : null; - - o.root.onDragStart = new Function(); - o.root.onDragEnd = new Function(); - o.root.onDrag = new Function(); - }, - - start : function (e) { - var o = DragWindow.obj = this; - e = DragWindow.fixE(e); - var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom); - var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right ); - o.root.onDragStart(x, y); - - o.lastMouseX = e.clientX; - o.lastMouseY = e.clientY; - - document.onmousemove = DragWindow.drag; - document.onmouseup = DragWindow.end; - - if (o.root.lastChild.id == o.transId) return false; - - var dragTransBg = document.createElement('div'); - dragTransBg.className = 'cheditor-dragWindowTransparent'; - - if (GB.browser.msie) dragTransBg.style.filter = 'alpha(opacity=0)'; - else dragTransBg.style.opacity = 0; - - dragTransBg.id = o.transId; - dragTransBg.style.width = o.root.lastChild.firstChild.style.width; - dragTransBg.style.height = o.root.lastChild.firstChild.style.height; - o.root.appendChild(dragTransBg); - - return false; - }, - - drag : function (e) { - e = DragWindow.fixE(e); - var o = DragWindow.obj; - var ey = e.clientY; - var ex = e.clientX; - var y = parseInt(o.vmode ? o.root.style.top : o.root.style.bottom); - var x = parseInt(o.hmode ? o.root.style.left : o.root.style.right ); - var nx, ny; - - nx = x + ((ex - o.lastMouseX) * (o.hmode ? 1 : -1)); - ny = y + ((ey - o.lastMouseY) * (o.vmode ? 1 : -1)); - - DragWindow.obj.root.style.left = nx + "px"; - DragWindow.obj.root.style.top = ny + "px"; - DragWindow.obj.lastMouseX = ex; - DragWindow.obj.lastMouseY = ey; - DragWindow.obj.root.onDrag(nx, ny); - - return false; - }, - - end : function () { - document.onmousemove = null; - document.onmouseup = null; - DragWindow.obj.root.onDragEnd(parseInt(DragWindow.obj.root.style[DragWindow.obj.hmode ? "left" : "right"]), - parseInt(DragWindow.obj.root.style[DragWindow.obj.vmode ? "top" : "bottom"])); - - if (DragWindow.obj.root.lastChild.id == DragWindow.obj.transId) - DragWindow.obj.root.removeChild(DragWindow.obj.root.lastChild); - DragWindow.obj = null; - }, - - fixE : function (e) { - if (typeof e == 'undefined') e = window.event; - if (typeof e.layerX == 'undefined') e.layerX = e.offsetX; - if (typeof e.layerY == 'undefined') e.layerY = e.offsetY; - return e; - } -}; diff --git a/cheditor5/css/CHXImage.css b/cheditor5/css/CHXImage.css deleted file mode 100644 index 7332065a7..000000000 --- a/cheditor5/css/CHXImage.css +++ /dev/null @@ -1,5 +0,0 @@ -/* CSS file */ - -Application -{ -} diff --git a/cheditor5/css/default.css b/cheditor5/css/default.css deleted file mode 100644 index 620519750..000000000 --- a/cheditor5/css/default.css +++ /dev/null @@ -1,429 +0,0 @@ -a.cheditor-tag-path-elem { - text-decoration:none; - color:#0033cc; - font-size: 8pt; - font-family: dotum,tahoma,helvetica; - cursor:pointer; -} -a.cheditor-tag-path-elem:hover { - color:#0033cc; - text-decoration:underline; - cursor:pointer; -} -.cheditor-container { - border-top: 1px #ccc solid; - position: relative; - text-align: left; -} -.cheditor-tb-wrapper { - border-right:1px #ccc solid; - border-left:1px #ccc solid; - position: relative; - display: block; - background: #f5f5f5 url(../icons/toolbar-wrapper-bg.png) repeat-x left bottom; -} -.cheditor-editarea-wrapper { - border-right: 1px #ccc solid; - border-bottom: 1px #ccc solid; - border-left: 1px #ccc solid; - vertical-align: top; -} -.cheditor-editarea { - width:100%; - overflow:auto; - background-color: #fff; -} -.cheditor-modify-block .cheditor-ico { - width: 16px; - height: 16px; - vertical-align: middle; - margin-right: 5px; -} -.cheditor-modify-block select { - font-size: 9pt; - color: #000; -} -.cheditor-modify-block div { - padding: 5px 10px 5px 10px; - color: #000; - display: block; -} -.cheditor-modify-block div .wrap-text-desc { - line-height: 1em; - color: #000; -} -.cheditor-modify-block div .user-input-width { - width: 30px; - margin-left: 5px; - font-size: 9pt; - color: #000; -} -.cheditor-modify-block div .user-input-alt { - width: 150px; - margin: 3px 10px 0px 5px; - font-size: 9pt; - color: #000; -} -.cheditor-modify-block div .wrap-checked { - vertical-align: middle; - padding: 0px; - margin-right: 2px; -} -.cheditor-modify-block div .input-submit { - cursor: pointer; - vertical-align: middle; - margin-left: 20px; - height:20px; - width:64px; -} -.cheditor-modify-block div .color-picker { - cursor: pointer; - vertical-align: middle; - height:20px; - width:20px; -} -.cheditor-modify-block div .delete-submit { - cursor: pointer; - vertical-align: middle; - margin-left: 3px; - height:20px; - width:64px; -} -.cheditor-modify-block div .edit-table-ico { - cursor: pointer; - vertical-align: middle; - width: 16px; - height: 16px; - margin: 0px 3px; -} -.cheditor-modify-block { - display:none; - border-right: 1px #ccc solid; - border-bottom: 1px #ccc solid; - border-left: 1px #ccc solid; - padding:2px; - background-color:#eee; - font-size:9pt; - font-family: gulim,tahoma,helvetica; - text-align:center; -} -.cheditor-status-bar { - font-size:8pt; - font-family: dotum,tahoma,helvetica; - color:#333; -} -.cheditor-tag-path { - border-right: 1px #ccc solid; - border-bottom: 1px #ccc solid; - border-left: 1px #ccc solid; - padding: 0px 2px 0px 2px; - display: none; - height: 18px; - line-height:18px; - overflow: hidden; -} -.cheditor-fullscreen { - float: right; - background: transparent url(../icons/fullscreen.png) no-repeat 0 0; -} -.cheditor-viewmode { - padding: 0px 4px 0px 4px; - height: 16px; - background: transparent url(../icons/statusbar_bgline.gif) repeat-x 0 0; -} -.cheditor-viewmode div { - width: 24px; - height: 16px; - cursor: pointer; -} -.cheditor-tab-rich { - background: transparent url(../icons/edit_mode_rich_a.png) no-repeat 0 0; - float: left; -} -.cheditor-tab-rich-off { - background: transparent url(../icons/edit_mode_rich_b.png) no-repeat 0 0; - float: left; -} -.cheditor-tab-code { - background: transparent url(../icons/edit_mode_code_a.png) no-repeat 0 0; - float: left; -} -.cheditor-tab-code-off { - background: transparent url(../icons/edit_mode_code_b.png) no-repeat 0 0; - float: left; -} -.cheditor-tab-preview { - background: transparent url(../icons/edit_mode_view_a.png) no-repeat 0 0; - float: left; -} -.cheditor-tab-preview-off { - background: transparent url(../icons/edit_mode_view_b.png) no-repeat 0 0; - float: left; -} - -.cheditor-popup-window { - border:1px solid #8db3e5; - display:none; - position:absolute; - background-color:#ebe9ed; - left:0px; - top:0px; -} -.cheditor-popup-drag-handle { - border-bottom:1px solid #8db3e5; - height:24px; - background: #6b90c0 url(../icons/title_bar_bg.gif) repeat-x 0 0; -} -.cheditor-popup-titlebar { - padding: 4px 0px 0px 0px !important; - line-height: 1em; -} -.cheditor-resizebar { - height: 11px; - overflow:hidden; - border-left: 1px #ccc solid; - border-right: 1px #ccc solid; - cursor:s-resize; - background: #eee url(../icons/splitter.gif) no-repeat center top; -} -.cheditor_mode_icon { width: 24px; height: 16px; cursor: pointer; vertical-align:top } -.cheditor-popup-title { font-size: 9pt; font-family:gulim,tahoma,helvetica; font-weight:bold; color:#003366; } -.cheditor-popup-cframe { - background-color: #ebe9ed; -} -.cheditor-pulldown-container { - border:#8db3e5 1px solid; - background-color:#fff; - padding:1px; - position: relative; -} -.cheditor-pulldown-container div { - padding: 2px 2px 2px 15px; - line-height: 1.1; - margin: 1px; - font-size: 9pt; - font-family: gulim,tahoma,helvetica; - color: #000; - position: relative; -} -.cheditor-pulldown-color-container { - border:#8db3e5 1px solid; - background-color:#fff; - padding:2px; - height: 160px; -} -.cheditor-pulldown-container div label, .cheditor-pulldown-textblock-container div label { - position: relative; - overflow: hidden; -} -.cheditor-pulldown-textblock-container div div { - text-align: center; - padding: 2px; - font-size: 9pt; - color: #000; - line-height: 1; -} -.cheditor-pulldown-textblock-container div { - padding: 1px; -} -.cheditor-pulldown-textblock-out { - border: #fff 1px solid; -} -.cheditor-pulldown-textblock-over { - border: #316ac5 1px solid; -} -.cheditor-pulldown-textblock-container { - border:#8db3e5 1px solid; - background-color:#fff; - padding:2px; -} -.cheditor-pulldown-mouseout { - border: #fff 1px solid; -} -.cheditor-pulldown-mouseover { - background-color: #f0f0f0; - border: #e0e0e0 1px solid; -} - -.cheditor-pulldown-frame { - position:absolute; - visibility:hidden; - z-index: -1; - width:1px; - height:1px; - line-height:12px; -} -.cheditor-pulldown-color-over { - float: left; - border: 1px solid #c00000; - width: 15px; - height: 15px; - margin: 1px; - font-size: 7px; - cursor: pointer; -} -.cheditor-pulldown-color-cell { - float: left; - border: 1px #000 solid; - width: 15px; - height: 15px; - margin: 1px; - font-size: 7px; - cursor: pointer; -} -.cheditor-pulldown-color-selected { - border: 1px solid #000; - text-align: center; - margin: 1px; - height: 15px; - line-height: 1.1; -} -.cheditor-pulldown-color-selected label { - font-family: verdana; - font-size: 8pt; - color: #000; -} -.cheditor-pulldown-color-spacer { - clear: both; - height: 4px; - overflow: hidden; -} -.cheditor-pulldown-color-wrapper { - line-height: 1; - height: 340px; -} -.cheditor-container-fullscreen { - border-top: 1px #ccc solid; - position: fixed; - left: 0px; - top: 0px; - _position: absolute; - _left: expression((0 + (ignoreMe2 = - document.documentElement.scrollLeft ? - document.documentElement.scrollLeft : - document.body.scrollLeft)) + 'px'); - _top: expression((270 + (ignoreMe = - document.documentElement.scrollTop ? - document.documentElement.scrollTop : - document.body.scrollTop)) + 'px'); - z-index: 1000; - text-align: left; - background-color: #fff; -} -.cheditor-modalPopupTransparent { - background-color: #f0f0f0; - position: fixed; - display: none; - top: 0px; - left: 0px; - width: 100%; - height: 100%; - _position: absolute; - _left: expression((0 + (ignoreMe2 = - document.documentElement.scrollLeft ? - document.documentElement.scrollLeft : - document.body.scrollLeft)) + 'px'); - _top: expression((270 + (ignoreMe = - document.documentElement.scrollTop ? - document.documentElement.scrollTop : - document.body.scrollTop)) + 'px'); -} -.cheditor-dragWindowTransparent { background-color: #fff; position: absolute; display: block; left:0px; top: 24px; } -.cheditor-pulldown-wrapper {line-height: 1; } -.cheditor-toolbar-icon-wrapper { - margin: 0px 2px 0px 0px; - float: left; - height: 24px; - overflow: hidden; -} -.cheditor-tb-icon { - height: 22px; - width: 16px; - margin-left: 3px; - overflow: hidden; -} -.cheditor-tb-text { - height: 22px; - margin-left: 5px; - color: #555; - font-family: gulim,tahoma,helvetica; - font-size: 9pt; - overflow: hidden; - margin-right: 13px; - line-height: 24px; - position: relative; -} -.cheditor-tb-bg55 { - float: left; - overflow: hidden; - background: transparent url(../icons/toolbar-background.png) no-repeat left -414px; - position: relative; -} -.cheditor-tb-bg40 { - float: left; - overflow: hidden; - background: transparent url(../icons/toolbar-background.png) no-repeat left -483px; - position: relative; -} -.cheditor-tb-icon23 { - height: 22px; - width: 23px; - margin-left: 3px; - overflow: hidden; -} -.cheditor-tb-bg30 { - float: left; - overflow: hidden; - background: transparent url(../icons/toolbar-background.png) no-repeat left -276px; - position: relative; -} -.cheditor-tb-bg30-last { - float: left; - overflow: hidden; - background: transparent url(../icons/toolbar-background.png) no-repeat left -345px; - position: relative; -} -.cheditor-tb-bg { - float: left; - overflow: hidden; - background: transparent url(../icons/toolbar-background.png) no-repeat left -69px; - position: relative; -} -.cheditor-tb-bg-first { - float: left; - overflow: hidden; - background: transparent url(../icons/toolbar-background.png) no-repeat left top; - position: relative; -} -.cheditor-tb-bg-last { - float: left; - overflow: hidden; - background: transparent url(../icons/toolbar-background.png) no-repeat left -138px; - position: relative; -} -.cheditor-tb-bg-single { - float: left; - overflow: hidden; - background: transparent url(../icons/toolbar-background.png) no-repeat left -207px; - position: relative; -} -.cheditor-tb-color-btn { - width: 16px; - height: 3px; - overflow: hidden; - position: absolute; - top: 16px; - left: 3px; -} -.cheditor-tb-button-spacer { - overflow: hidden; - width: 4px; - height: 4px; - float: left; -} -.cheditor-tb-split { - overflow: hidden; - height: 2px; - width: 3px; - clear: both; -} diff --git a/cheditor5/css/dialog.css b/cheditor5/css/dialog.css deleted file mode 100644 index bd4a78c25..000000000 --- a/cheditor5/css/dialog.css +++ /dev/null @@ -1,133 +0,0 @@ -body { - background-color: #ebe9ed; - margin: 0px; - border: 0px; - padding: 10px; - font-size: 9pt; - font-family: gulim,tahoma,helvetica; -} - -td, input, select { - font-size: 9pt; - vertical-align: middle; - margin:0px; -} - -.handCursor { - cursor: pointer; -} - -td.hover -{ - background-color : Fuchsia; -} - -table.dlg { - border: 0px; -} - -fieldset { - border: 1px solid #c5c5cc; - padding: 2px; - margin: 0px; -} - -.dlg td { - text-align: left; - height: 20px; -} - -form { - display: inline; -} - -.dlg input { - border: 2px; -} - -.img { - border: 0px; - vertical-align: middle; -} - -.font-normal { - font-size: 9pt; -} - -.button { - width: 64px; - height: 22px; - margin: 0px 2px 0px 2px; - cursor: pointer; - vertical-align: middle; -} - -.button8em { - font-size: 9pt; - padding-top:2px !important; padding-top:2px; - height: 21px; - width: 8em; -} - -.button10em { - font-size: 9pt; - padding-top:1px !important;padding-top:2px; - height: 21px; - width: 10em; -} - -.emIcon { - width: 19px; - height: 19px; - cursor: pointer; -} - -.emImgBlock { - padding: 5px; - text-align: center; -} - -.emImgRow { - margin: 3px; - text-align: center; -} - -.schar { - border:1px solid #ccc; - background-color:#fff; - width: 18px; - height: 17px; - text-align:center; - cursor: pointer; - font-size: 9pt; - line-height: 17px; -} - -.spacer { - margin: 10px 0px 0px 0px; -} -.spacer5 { - margin: 5px 0px 0px 0px; - clear: both; -} -.wrapper { - text-align: center; -} - -.clear { clear: both } -.flash-player-wrapper { - width:480px; - height:385px; - margin-top:5px; - border:1px #c5c5cc solid; - text-align:center; - overflow-x:auto; - overflow-y:hidden; -} -.media-player-wrapper { - height:200px; - margin-top:5px; - text-align:center; - overflow-x:auto; - overflow-y:hidden; -} diff --git a/cheditor5/css/imageUpload.css b/cheditor5/css/imageUpload.css deleted file mode 100644 index b18a164a9..000000000 --- a/cheditor5/css/imageUpload.css +++ /dev/null @@ -1,99 +0,0 @@ -#uploadWindow { - position:absolute; - display: none; - background-color: #ebe9ed; -} - -.clear { clear: both; } - -#container { - padding: 8px; - font-family: gulim,tahoma,helvetica; -} - -#imageListWrapper { - background-color: #fff; - border:1px #c5c5cc solid; - position: absolute; -} -#imageInfoBox { - padding: 7px; - background-color: #fff; - border:1px #c5c5cc solid; - float: right; -} -.button { - width: 77px; - height: 22px; - cursor: pointer; - vertical-align: middle; -} -.imageBox, .imageBoxHighlighted { - width: 124px; - height: 94px; - margin: 3px; - float:left; -} -.imageBox_theImage,.imageBox_theImage_over { - width:100%; - height:100%; -} -.imageBox .imageBox_theImage{ - border: 1px solid #ddd; - background-image: url('../icons/dot.gif'); - background-position: center center; - background-repeat: no-repeat; -} -.imageBox .imageBox_theImage_over { - border: 1px solid #000; - background-image: url('../icons/dot.gif'); - background-position: center center; - background-repeat: no-repeat; -} -.imageBoxHighlighted .imageBox_theImage { - border: 1px solid #ff6600; -} -.imageBoxHighlighted .imageBox_theImage_over { - border: 1px solid #ff6600; - background-image: url('../icons/dot.gif'); - background-position: center center; - background-repeat: no-repeat; -} - -#removeImage { - display: none; - width: 28px; - height: 16px; - position:absolute; - cursor: pointer; - z-index: 100; -} - -#insertionMarker { - height:102px; - width:6px; - position:absolute; - display:none; -} - -#insertionMarkerLine { - width:6px; - height:100px; -} -#insertionMarker img { - float:left; -} - -#dragDropContent{ - position:absolute; - z-index:10; - display:none; -} - -body { - background-color: #ebe9ed; - margin: 0px; - border: none; - padding: 0px; - overflow: hidden; -} diff --git a/cheditor5/css/imageUtil.css b/cheditor5/css/imageUtil.css deleted file mode 100644 index a45cdfc60..000000000 --- a/cheditor5/css/imageUtil.css +++ /dev/null @@ -1,95 +0,0 @@ -/************************************************ - - CHEditor Image Caption Util - -************************************************/ -img.chimg_photo -{ - border: 1px darkgray solid; - padding:10px; -} -div.imgblock -{ -} -div.leftjust -{ -} -div.rightjust -{ -} -div.caption -{ - margin-top: 5px; - margin-left: 0.2em; - color: darkgray; - font-size: 9pt; -} -div.caption-marker -{ - float: left; - margin-right: 0.2em; -} -div.caption-text -{ - float: left; - clear: right; - text-align: left; -} -.imageUtil { - cursor: url(icons/imageutil/zoomin.cur), pointer; - outline: none; -} -.imageUtil img { - border: 2px solid gray; -} -.imageUtil:hover img { - border: 2px solid silver; -} - -.imageUtil-image { - border-bottom: 1px solid white; -} -.imageUtil-image-blur { -} -.imageUtil-caption { - display: none; - border-bottom: 1px solid white; - font-family: gulim, Verdana, Helvetica; - font-size: 9pt; - padding: 5px; - background-color: #fff; -} -.imageUtil-loading { - display: block; - color: white; - font-size: 9px; - font-weight: normal; - text-decoration: none; - padding: 3px; - border-top: 1px solid white; - border-bottom: 1px solid white; - background-color: black; - padding-left: 22px; - background-image: url(icons/imageutil/loader.gif); - background-repeat: no-repeat; - background-position: 3px 1px; -} - -a.imageUtil-credits, -a.imageUtil-credits i { - padding: 2px; - color: silver; - text-decoration: none; - font-size: 10px; -} -a.imageUtil-credits:hover, -a.imageUtil-credits:hover i { - color: white; - background-color: gray; -} -.imageUtil-display-block { - display: block; -} -.imageUtil-display-none { - display: none; -} diff --git a/cheditor5/css/p.css b/cheditor5/css/p.css deleted file mode 100644 index 74295fa94..000000000 --- a/cheditor5/css/p.css +++ /dev/null @@ -1 +0,0 @@ -p { margin: 0px } diff --git a/cheditor5/icons/add_col_after.png b/cheditor5/icons/add_col_after.png deleted file mode 100644 index 8a3931455..000000000 Binary files a/cheditor5/icons/add_col_after.png and /dev/null differ diff --git a/cheditor5/icons/add_col_before.png b/cheditor5/icons/add_col_before.png deleted file mode 100644 index d8f3a56cc..000000000 Binary files a/cheditor5/icons/add_col_before.png and /dev/null differ diff --git a/cheditor5/icons/add_cols_after.png b/cheditor5/icons/add_cols_after.png deleted file mode 100644 index d177a0418..000000000 Binary files a/cheditor5/icons/add_cols_after.png and /dev/null differ diff --git a/cheditor5/icons/add_cols_before.png b/cheditor5/icons/add_cols_before.png deleted file mode 100644 index b03cbda4f..000000000 Binary files a/cheditor5/icons/add_cols_before.png and /dev/null differ diff --git a/cheditor5/icons/add_row_after.png b/cheditor5/icons/add_row_after.png deleted file mode 100644 index 80c449098..000000000 Binary files a/cheditor5/icons/add_row_after.png and /dev/null differ diff --git a/cheditor5/icons/add_row_before.png b/cheditor5/icons/add_row_before.png deleted file mode 100644 index 9cff358ae..000000000 Binary files a/cheditor5/icons/add_row_before.png and /dev/null differ diff --git a/cheditor5/icons/add_rows_after.png b/cheditor5/icons/add_rows_after.png deleted file mode 100644 index 579a2db0a..000000000 Binary files a/cheditor5/icons/add_rows_after.png and /dev/null differ diff --git a/cheditor5/icons/add_rows_before.png b/cheditor5/icons/add_rows_before.png deleted file mode 100644 index 45d46b4b0..000000000 Binary files a/cheditor5/icons/add_rows_before.png and /dev/null differ diff --git a/cheditor5/icons/button/cancel.gif b/cheditor5/icons/button/cancel.gif deleted file mode 100644 index 9cadfb96c..000000000 Binary files a/cheditor5/icons/button/cancel.gif and /dev/null differ diff --git a/cheditor5/icons/button/color_picker.gif b/cheditor5/icons/button/color_picker.gif deleted file mode 100644 index 16826bfb7..000000000 Binary files a/cheditor5/icons/button/color_picker.gif and /dev/null differ diff --git a/cheditor5/icons/button/delete.gif b/cheditor5/icons/button/delete.gif deleted file mode 100644 index d29ca77f7..000000000 Binary files a/cheditor5/icons/button/delete.gif and /dev/null differ diff --git a/cheditor5/icons/button/delete_cross.gif b/cheditor5/icons/button/delete_cross.gif deleted file mode 100644 index 449d63a27..000000000 Binary files a/cheditor5/icons/button/delete_cross.gif and /dev/null differ diff --git a/cheditor5/icons/button/edit_cell.gif b/cheditor5/icons/button/edit_cell.gif deleted file mode 100644 index 3c6b08575..000000000 Binary files a/cheditor5/icons/button/edit_cell.gif and /dev/null differ diff --git a/cheditor5/icons/button/edit_image.gif b/cheditor5/icons/button/edit_image.gif deleted file mode 100644 index 3c6b08575..000000000 Binary files a/cheditor5/icons/button/edit_image.gif and /dev/null differ diff --git a/cheditor5/icons/button/imageUpload/cancel.gif b/cheditor5/icons/button/imageUpload/cancel.gif deleted file mode 100644 index 3fe023df0..000000000 Binary files a/cheditor5/icons/button/imageUpload/cancel.gif and /dev/null differ diff --git a/cheditor5/icons/button/imageUpload/submit.gif b/cheditor5/icons/button/imageUpload/submit.gif deleted file mode 100644 index e42241fe3..000000000 Binary files a/cheditor5/icons/button/imageUpload/submit.gif and /dev/null differ diff --git a/cheditor5/icons/button/input.gif b/cheditor5/icons/button/input.gif deleted file mode 100644 index bbb5e0b07..000000000 Binary files a/cheditor5/icons/button/input.gif and /dev/null differ diff --git a/cheditor5/icons/button/map_address.gif b/cheditor5/icons/button/map_address.gif deleted file mode 100644 index 6ce3a4240..000000000 Binary files a/cheditor5/icons/button/map_address.gif and /dev/null differ diff --git a/cheditor5/icons/button/paste.gif b/cheditor5/icons/button/paste.gif deleted file mode 100644 index 746662874..000000000 Binary files a/cheditor5/icons/button/paste.gif and /dev/null differ diff --git a/cheditor5/icons/button/play.gif b/cheditor5/icons/button/play.gif deleted file mode 100644 index 726a7f441..000000000 Binary files a/cheditor5/icons/button/play.gif and /dev/null differ diff --git a/cheditor5/icons/button/preview.gif b/cheditor5/icons/button/preview.gif deleted file mode 100644 index c6f831969..000000000 Binary files a/cheditor5/icons/button/preview.gif and /dev/null differ diff --git a/cheditor5/icons/button/process.gif b/cheditor5/icons/button/process.gif deleted file mode 100644 index 52b026e19..000000000 Binary files a/cheditor5/icons/button/process.gif and /dev/null differ diff --git a/cheditor5/icons/button/reset.gif b/cheditor5/icons/button/reset.gif deleted file mode 100644 index c4412eb36..000000000 Binary files a/cheditor5/icons/button/reset.gif and /dev/null differ diff --git a/cheditor5/icons/button/submit.gif b/cheditor5/icons/button/submit.gif deleted file mode 100644 index 422df570c..000000000 Binary files a/cheditor5/icons/button/submit.gif and /dev/null differ diff --git a/cheditor5/icons/button/upload.gif b/cheditor5/icons/button/upload.gif deleted file mode 100644 index 1afae2393..000000000 Binary files a/cheditor5/icons/button/upload.gif and /dev/null differ diff --git a/cheditor5/icons/checked.png b/cheditor5/icons/checked.png deleted file mode 100644 index 3a4a5a789..000000000 Binary files a/cheditor5/icons/checked.png and /dev/null differ diff --git a/cheditor5/icons/delete_element.png b/cheditor5/icons/delete_element.png deleted file mode 100644 index 80e1db21f..000000000 Binary files a/cheditor5/icons/delete_element.png and /dev/null differ diff --git a/cheditor5/icons/delete_table.png b/cheditor5/icons/delete_table.png deleted file mode 100644 index 87805c966..000000000 Binary files a/cheditor5/icons/delete_table.png and /dev/null differ diff --git a/cheditor5/icons/dot.gif b/cheditor5/icons/dot.gif deleted file mode 100644 index 1d11fa9ad..000000000 Binary files a/cheditor5/icons/dot.gif and /dev/null differ diff --git a/cheditor5/icons/edit_mode_code_a.png b/cheditor5/icons/edit_mode_code_a.png deleted file mode 100644 index 31f00d9db..000000000 Binary files a/cheditor5/icons/edit_mode_code_a.png and /dev/null differ diff --git a/cheditor5/icons/edit_mode_code_b.png b/cheditor5/icons/edit_mode_code_b.png deleted file mode 100644 index 2ced606d5..000000000 Binary files a/cheditor5/icons/edit_mode_code_b.png and /dev/null differ diff --git a/cheditor5/icons/edit_mode_rich_a.png b/cheditor5/icons/edit_mode_rich_a.png deleted file mode 100644 index 497b4e859..000000000 Binary files a/cheditor5/icons/edit_mode_rich_a.png and /dev/null differ diff --git a/cheditor5/icons/edit_mode_rich_b.png b/cheditor5/icons/edit_mode_rich_b.png deleted file mode 100644 index 732f8253d..000000000 Binary files a/cheditor5/icons/edit_mode_rich_b.png and /dev/null differ diff --git a/cheditor5/icons/edit_mode_view_a.png b/cheditor5/icons/edit_mode_view_a.png deleted file mode 100644 index e14add229..000000000 Binary files a/cheditor5/icons/edit_mode_view_a.png and /dev/null differ diff --git a/cheditor5/icons/edit_mode_view_b.png b/cheditor5/icons/edit_mode_view_b.png deleted file mode 100644 index 29fe9077a..000000000 Binary files a/cheditor5/icons/edit_mode_view_b.png and /dev/null differ diff --git a/cheditor5/icons/em/1.gif b/cheditor5/icons/em/1.gif deleted file mode 100644 index 192f26f6a..000000000 Binary files a/cheditor5/icons/em/1.gif and /dev/null differ diff --git a/cheditor5/icons/em/10.gif b/cheditor5/icons/em/10.gif deleted file mode 100644 index 67dabd59f..000000000 Binary files a/cheditor5/icons/em/10.gif and /dev/null differ diff --git a/cheditor5/icons/em/11.gif b/cheditor5/icons/em/11.gif deleted file mode 100644 index aab89b103..000000000 Binary files a/cheditor5/icons/em/11.gif and /dev/null differ diff --git a/cheditor5/icons/em/12.gif b/cheditor5/icons/em/12.gif deleted file mode 100644 index dcc1c8f64..000000000 Binary files a/cheditor5/icons/em/12.gif and /dev/null differ diff --git a/cheditor5/icons/em/13.gif b/cheditor5/icons/em/13.gif deleted file mode 100644 index 221e0f2e2..000000000 Binary files a/cheditor5/icons/em/13.gif and /dev/null differ diff --git a/cheditor5/icons/em/14.gif b/cheditor5/icons/em/14.gif deleted file mode 100644 index c2184a3d7..000000000 Binary files a/cheditor5/icons/em/14.gif and /dev/null differ diff --git a/cheditor5/icons/em/15.gif b/cheditor5/icons/em/15.gif deleted file mode 100644 index adb78d17a..000000000 Binary files a/cheditor5/icons/em/15.gif and /dev/null differ diff --git a/cheditor5/icons/em/16.gif b/cheditor5/icons/em/16.gif deleted file mode 100644 index 164bcce0f..000000000 Binary files a/cheditor5/icons/em/16.gif and /dev/null differ diff --git a/cheditor5/icons/em/17.gif b/cheditor5/icons/em/17.gif deleted file mode 100644 index 79382ce8a..000000000 Binary files a/cheditor5/icons/em/17.gif and /dev/null differ diff --git a/cheditor5/icons/em/18.gif b/cheditor5/icons/em/18.gif deleted file mode 100644 index ff0eb9652..000000000 Binary files a/cheditor5/icons/em/18.gif and /dev/null differ diff --git a/cheditor5/icons/em/19.gif b/cheditor5/icons/em/19.gif deleted file mode 100644 index 1097e0087..000000000 Binary files a/cheditor5/icons/em/19.gif and /dev/null differ diff --git a/cheditor5/icons/em/2.gif b/cheditor5/icons/em/2.gif deleted file mode 100644 index 9c83e50cc..000000000 Binary files a/cheditor5/icons/em/2.gif and /dev/null differ diff --git a/cheditor5/icons/em/20.gif b/cheditor5/icons/em/20.gif deleted file mode 100644 index e55ec3081..000000000 Binary files a/cheditor5/icons/em/20.gif and /dev/null differ diff --git a/cheditor5/icons/em/21.gif b/cheditor5/icons/em/21.gif deleted file mode 100644 index 0186a11a7..000000000 Binary files a/cheditor5/icons/em/21.gif and /dev/null differ diff --git a/cheditor5/icons/em/22.gif b/cheditor5/icons/em/22.gif deleted file mode 100644 index c46dec6cc..000000000 Binary files a/cheditor5/icons/em/22.gif and /dev/null differ diff --git a/cheditor5/icons/em/23.gif b/cheditor5/icons/em/23.gif deleted file mode 100644 index aacda1a15..000000000 Binary files a/cheditor5/icons/em/23.gif and /dev/null differ diff --git a/cheditor5/icons/em/24.gif b/cheditor5/icons/em/24.gif deleted file mode 100644 index 3afc89869..000000000 Binary files a/cheditor5/icons/em/24.gif and /dev/null differ diff --git a/cheditor5/icons/em/25.gif b/cheditor5/icons/em/25.gif deleted file mode 100644 index 0e26fe05c..000000000 Binary files a/cheditor5/icons/em/25.gif and /dev/null differ diff --git a/cheditor5/icons/em/26.gif b/cheditor5/icons/em/26.gif deleted file mode 100644 index 4dfcdab22..000000000 Binary files a/cheditor5/icons/em/26.gif and /dev/null differ diff --git a/cheditor5/icons/em/27.gif b/cheditor5/icons/em/27.gif deleted file mode 100644 index 8aae5c516..000000000 Binary files a/cheditor5/icons/em/27.gif and /dev/null differ diff --git a/cheditor5/icons/em/28.gif b/cheditor5/icons/em/28.gif deleted file mode 100644 index c3aee8660..000000000 Binary files a/cheditor5/icons/em/28.gif and /dev/null differ diff --git a/cheditor5/icons/em/29.gif b/cheditor5/icons/em/29.gif deleted file mode 100644 index 39cc0c286..000000000 Binary files a/cheditor5/icons/em/29.gif and /dev/null differ diff --git a/cheditor5/icons/em/3.gif b/cheditor5/icons/em/3.gif deleted file mode 100644 index b68cfb128..000000000 Binary files a/cheditor5/icons/em/3.gif and /dev/null differ diff --git a/cheditor5/icons/em/30.gif b/cheditor5/icons/em/30.gif deleted file mode 100644 index 51054ede6..000000000 Binary files a/cheditor5/icons/em/30.gif and /dev/null differ diff --git a/cheditor5/icons/em/31.gif b/cheditor5/icons/em/31.gif deleted file mode 100644 index 51e9ab344..000000000 Binary files a/cheditor5/icons/em/31.gif and /dev/null differ diff --git a/cheditor5/icons/em/32.gif b/cheditor5/icons/em/32.gif deleted file mode 100644 index 3d084cc8b..000000000 Binary files a/cheditor5/icons/em/32.gif and /dev/null differ diff --git a/cheditor5/icons/em/33.gif b/cheditor5/icons/em/33.gif deleted file mode 100644 index 465a86764..000000000 Binary files a/cheditor5/icons/em/33.gif and /dev/null differ diff --git a/cheditor5/icons/em/34.gif b/cheditor5/icons/em/34.gif deleted file mode 100644 index b7c2bb619..000000000 Binary files a/cheditor5/icons/em/34.gif and /dev/null differ diff --git a/cheditor5/icons/em/35.gif b/cheditor5/icons/em/35.gif deleted file mode 100644 index 9e006337c..000000000 Binary files a/cheditor5/icons/em/35.gif and /dev/null differ diff --git a/cheditor5/icons/em/36.gif b/cheditor5/icons/em/36.gif deleted file mode 100644 index 779454291..000000000 Binary files a/cheditor5/icons/em/36.gif and /dev/null differ diff --git a/cheditor5/icons/em/37.gif b/cheditor5/icons/em/37.gif deleted file mode 100644 index e21691762..000000000 Binary files a/cheditor5/icons/em/37.gif and /dev/null differ diff --git a/cheditor5/icons/em/38.gif b/cheditor5/icons/em/38.gif deleted file mode 100644 index 76a9e13b2..000000000 Binary files a/cheditor5/icons/em/38.gif and /dev/null differ diff --git a/cheditor5/icons/em/39.gif b/cheditor5/icons/em/39.gif deleted file mode 100644 index f3fd4e7b4..000000000 Binary files a/cheditor5/icons/em/39.gif and /dev/null differ diff --git a/cheditor5/icons/em/4.gif b/cheditor5/icons/em/4.gif deleted file mode 100644 index 99851b3f5..000000000 Binary files a/cheditor5/icons/em/4.gif and /dev/null differ diff --git a/cheditor5/icons/em/40.gif b/cheditor5/icons/em/40.gif deleted file mode 100644 index 40f2ac17b..000000000 Binary files a/cheditor5/icons/em/40.gif and /dev/null differ diff --git a/cheditor5/icons/em/41.gif b/cheditor5/icons/em/41.gif deleted file mode 100644 index 5af0bb1f4..000000000 Binary files a/cheditor5/icons/em/41.gif and /dev/null differ diff --git a/cheditor5/icons/em/42.gif b/cheditor5/icons/em/42.gif deleted file mode 100644 index e5dfb8dc7..000000000 Binary files a/cheditor5/icons/em/42.gif and /dev/null differ diff --git a/cheditor5/icons/em/43.gif b/cheditor5/icons/em/43.gif deleted file mode 100644 index c54a84c50..000000000 Binary files a/cheditor5/icons/em/43.gif and /dev/null differ diff --git a/cheditor5/icons/em/44.gif b/cheditor5/icons/em/44.gif deleted file mode 100644 index ca4abf9e2..000000000 Binary files a/cheditor5/icons/em/44.gif and /dev/null differ diff --git a/cheditor5/icons/em/45.gif b/cheditor5/icons/em/45.gif deleted file mode 100644 index 9efbf4752..000000000 Binary files a/cheditor5/icons/em/45.gif and /dev/null differ diff --git a/cheditor5/icons/em/46.gif b/cheditor5/icons/em/46.gif deleted file mode 100644 index 687b4f41f..000000000 Binary files a/cheditor5/icons/em/46.gif and /dev/null differ diff --git a/cheditor5/icons/em/47.gif b/cheditor5/icons/em/47.gif deleted file mode 100644 index 8fc0b3563..000000000 Binary files a/cheditor5/icons/em/47.gif and /dev/null differ diff --git a/cheditor5/icons/em/48.gif b/cheditor5/icons/em/48.gif deleted file mode 100644 index 7467a5a12..000000000 Binary files a/cheditor5/icons/em/48.gif and /dev/null differ diff --git a/cheditor5/icons/em/49.gif b/cheditor5/icons/em/49.gif deleted file mode 100644 index 3baf57d92..000000000 Binary files a/cheditor5/icons/em/49.gif and /dev/null differ diff --git a/cheditor5/icons/em/5.gif b/cheditor5/icons/em/5.gif deleted file mode 100644 index 50e09671f..000000000 Binary files a/cheditor5/icons/em/5.gif and /dev/null differ diff --git a/cheditor5/icons/em/50.gif b/cheditor5/icons/em/50.gif deleted file mode 100644 index f9e49d644..000000000 Binary files a/cheditor5/icons/em/50.gif and /dev/null differ diff --git a/cheditor5/icons/em/51.gif b/cheditor5/icons/em/51.gif deleted file mode 100644 index 2bcbccde9..000000000 Binary files a/cheditor5/icons/em/51.gif and /dev/null differ diff --git a/cheditor5/icons/em/52.gif b/cheditor5/icons/em/52.gif deleted file mode 100644 index 72e7ecdfc..000000000 Binary files a/cheditor5/icons/em/52.gif and /dev/null differ diff --git a/cheditor5/icons/em/53.gif b/cheditor5/icons/em/53.gif deleted file mode 100644 index 91f1e96bf..000000000 Binary files a/cheditor5/icons/em/53.gif and /dev/null differ diff --git a/cheditor5/icons/em/54.gif b/cheditor5/icons/em/54.gif deleted file mode 100644 index 3b0b8d3d2..000000000 Binary files a/cheditor5/icons/em/54.gif and /dev/null differ diff --git a/cheditor5/icons/em/55.gif b/cheditor5/icons/em/55.gif deleted file mode 100644 index 28679aae5..000000000 Binary files a/cheditor5/icons/em/55.gif and /dev/null differ diff --git a/cheditor5/icons/em/56.gif b/cheditor5/icons/em/56.gif deleted file mode 100644 index 9d46e2964..000000000 Binary files a/cheditor5/icons/em/56.gif and /dev/null differ diff --git a/cheditor5/icons/em/57.gif b/cheditor5/icons/em/57.gif deleted file mode 100644 index 94540e86b..000000000 Binary files a/cheditor5/icons/em/57.gif and /dev/null differ diff --git a/cheditor5/icons/em/58.gif b/cheditor5/icons/em/58.gif deleted file mode 100644 index 4f7cefdad..000000000 Binary files a/cheditor5/icons/em/58.gif and /dev/null differ diff --git a/cheditor5/icons/em/59.gif b/cheditor5/icons/em/59.gif deleted file mode 100644 index 6324cf14d..000000000 Binary files a/cheditor5/icons/em/59.gif and /dev/null differ diff --git a/cheditor5/icons/em/6.gif b/cheditor5/icons/em/6.gif deleted file mode 100644 index e39f4cf22..000000000 Binary files a/cheditor5/icons/em/6.gif and /dev/null differ diff --git a/cheditor5/icons/em/60.gif b/cheditor5/icons/em/60.gif deleted file mode 100644 index 83f401007..000000000 Binary files a/cheditor5/icons/em/60.gif and /dev/null differ diff --git a/cheditor5/icons/em/61.gif b/cheditor5/icons/em/61.gif deleted file mode 100644 index 5c297e388..000000000 Binary files a/cheditor5/icons/em/61.gif and /dev/null differ diff --git a/cheditor5/icons/em/62.gif b/cheditor5/icons/em/62.gif deleted file mode 100644 index 71c0c8979..000000000 Binary files a/cheditor5/icons/em/62.gif and /dev/null differ diff --git a/cheditor5/icons/em/63.gif b/cheditor5/icons/em/63.gif deleted file mode 100644 index a66a51b03..000000000 Binary files a/cheditor5/icons/em/63.gif and /dev/null differ diff --git a/cheditor5/icons/em/64.gif b/cheditor5/icons/em/64.gif deleted file mode 100644 index e5cb6ca06..000000000 Binary files a/cheditor5/icons/em/64.gif and /dev/null differ diff --git a/cheditor5/icons/em/65.gif b/cheditor5/icons/em/65.gif deleted file mode 100644 index 027f28edf..000000000 Binary files a/cheditor5/icons/em/65.gif and /dev/null differ diff --git a/cheditor5/icons/em/66.gif b/cheditor5/icons/em/66.gif deleted file mode 100644 index faca98013..000000000 Binary files a/cheditor5/icons/em/66.gif and /dev/null differ diff --git a/cheditor5/icons/em/67.gif b/cheditor5/icons/em/67.gif deleted file mode 100644 index 42bd45300..000000000 Binary files a/cheditor5/icons/em/67.gif and /dev/null differ diff --git a/cheditor5/icons/em/68.gif b/cheditor5/icons/em/68.gif deleted file mode 100644 index 214345180..000000000 Binary files a/cheditor5/icons/em/68.gif and /dev/null differ diff --git a/cheditor5/icons/em/69.gif b/cheditor5/icons/em/69.gif deleted file mode 100644 index 0f9a4de5c..000000000 Binary files a/cheditor5/icons/em/69.gif and /dev/null differ diff --git a/cheditor5/icons/em/7.gif b/cheditor5/icons/em/7.gif deleted file mode 100644 index 330fc953c..000000000 Binary files a/cheditor5/icons/em/7.gif and /dev/null differ diff --git a/cheditor5/icons/em/70.gif b/cheditor5/icons/em/70.gif deleted file mode 100644 index c107a14af..000000000 Binary files a/cheditor5/icons/em/70.gif and /dev/null differ diff --git a/cheditor5/icons/em/71.gif b/cheditor5/icons/em/71.gif deleted file mode 100644 index 62618d659..000000000 Binary files a/cheditor5/icons/em/71.gif and /dev/null differ diff --git a/cheditor5/icons/em/72.gif b/cheditor5/icons/em/72.gif deleted file mode 100644 index 6764e3228..000000000 Binary files a/cheditor5/icons/em/72.gif and /dev/null differ diff --git a/cheditor5/icons/em/73.gif b/cheditor5/icons/em/73.gif deleted file mode 100644 index 29ecc580e..000000000 Binary files a/cheditor5/icons/em/73.gif and /dev/null differ diff --git a/cheditor5/icons/em/74.gif b/cheditor5/icons/em/74.gif deleted file mode 100644 index 18d684e76..000000000 Binary files a/cheditor5/icons/em/74.gif and /dev/null differ diff --git a/cheditor5/icons/em/75.gif b/cheditor5/icons/em/75.gif deleted file mode 100644 index 18a7b9220..000000000 Binary files a/cheditor5/icons/em/75.gif and /dev/null differ diff --git a/cheditor5/icons/em/76.gif b/cheditor5/icons/em/76.gif deleted file mode 100644 index ebdb2c942..000000000 Binary files a/cheditor5/icons/em/76.gif and /dev/null differ diff --git a/cheditor5/icons/em/77.gif b/cheditor5/icons/em/77.gif deleted file mode 100644 index 0a996d59e..000000000 Binary files a/cheditor5/icons/em/77.gif and /dev/null differ diff --git a/cheditor5/icons/em/78.gif b/cheditor5/icons/em/78.gif deleted file mode 100644 index 972a21d83..000000000 Binary files a/cheditor5/icons/em/78.gif and /dev/null differ diff --git a/cheditor5/icons/em/79.gif b/cheditor5/icons/em/79.gif deleted file mode 100644 index 3fa89d82e..000000000 Binary files a/cheditor5/icons/em/79.gif and /dev/null differ diff --git a/cheditor5/icons/em/8.gif b/cheditor5/icons/em/8.gif deleted file mode 100644 index b573e9b3e..000000000 Binary files a/cheditor5/icons/em/8.gif and /dev/null differ diff --git a/cheditor5/icons/em/80.gif b/cheditor5/icons/em/80.gif deleted file mode 100644 index 84e3ca417..000000000 Binary files a/cheditor5/icons/em/80.gif and /dev/null differ diff --git a/cheditor5/icons/em/9.gif b/cheditor5/icons/em/9.gif deleted file mode 100644 index 1521dd484..000000000 Binary files a/cheditor5/icons/em/9.gif and /dev/null differ diff --git a/cheditor5/icons/fullscreen.png b/cheditor5/icons/fullscreen.png deleted file mode 100644 index 184aee6c4..000000000 Binary files a/cheditor5/icons/fullscreen.png and /dev/null differ diff --git a/cheditor5/icons/imageUpload/add_image_button.gif b/cheditor5/icons/imageUpload/add_image_button.gif deleted file mode 100644 index 8533618ed..000000000 Binary files a/cheditor5/icons/imageUpload/add_image_button.gif and /dev/null differ diff --git a/cheditor5/icons/imageUpload/delete.png b/cheditor5/icons/imageUpload/delete.png deleted file mode 100644 index 93cadf81b..000000000 Binary files a/cheditor5/icons/imageUpload/delete.png and /dev/null differ diff --git a/cheditor5/icons/imageUpload/marker_bottom.gif b/cheditor5/icons/imageUpload/marker_bottom.gif deleted file mode 100644 index daa101c00..000000000 Binary files a/cheditor5/icons/imageUpload/marker_bottom.gif and /dev/null differ diff --git a/cheditor5/icons/imageUpload/marker_middle.gif b/cheditor5/icons/imageUpload/marker_middle.gif deleted file mode 100644 index a854393c4..000000000 Binary files a/cheditor5/icons/imageUpload/marker_middle.gif and /dev/null differ diff --git a/cheditor5/icons/imageUpload/marker_top.gif b/cheditor5/icons/imageUpload/marker_top.gif deleted file mode 100644 index daa101c00..000000000 Binary files a/cheditor5/icons/imageUpload/marker_top.gif and /dev/null differ diff --git a/cheditor5/icons/imageUpload/mouse_drag_img.gif b/cheditor5/icons/imageUpload/mouse_drag_img.gif deleted file mode 100644 index 4cd7fe127..000000000 Binary files a/cheditor5/icons/imageUpload/mouse_drag_img.gif and /dev/null differ diff --git a/cheditor5/icons/imageUpload/remove_all.gif b/cheditor5/icons/imageUpload/remove_all.gif deleted file mode 100644 index fcfabf47a..000000000 Binary files a/cheditor5/icons/imageUpload/remove_all.gif and /dev/null differ diff --git a/cheditor5/icons/imageUpload/wait.gif b/cheditor5/icons/imageUpload/wait.gif deleted file mode 100644 index 471c1a4f9..000000000 Binary files a/cheditor5/icons/imageUpload/wait.gif and /dev/null differ diff --git a/cheditor5/icons/image_align_center.png b/cheditor5/icons/image_align_center.png deleted file mode 100644 index d2ee3baad..000000000 Binary files a/cheditor5/icons/image_align_center.png and /dev/null differ diff --git a/cheditor5/icons/image_align_center_wt.png b/cheditor5/icons/image_align_center_wt.png deleted file mode 100644 index d2ee3baad..000000000 Binary files a/cheditor5/icons/image_align_center_wt.png and /dev/null differ diff --git a/cheditor5/icons/image_align_left.png b/cheditor5/icons/image_align_left.png deleted file mode 100644 index 7195ef77b..000000000 Binary files a/cheditor5/icons/image_align_left.png and /dev/null differ diff --git a/cheditor5/icons/image_align_left_wt.png b/cheditor5/icons/image_align_left_wt.png deleted file mode 100644 index 7cc2f5a4b..000000000 Binary files a/cheditor5/icons/image_align_left_wt.png and /dev/null differ diff --git a/cheditor5/icons/image_align_right.png b/cheditor5/icons/image_align_right.png deleted file mode 100644 index 2705dcb82..000000000 Binary files a/cheditor5/icons/image_align_right.png and /dev/null differ diff --git a/cheditor5/icons/image_align_right_wt.png b/cheditor5/icons/image_align_right_wt.png deleted file mode 100644 index 16b0cf6d2..000000000 Binary files a/cheditor5/icons/image_align_right_wt.png and /dev/null differ diff --git a/cheditor5/icons/image_resize.png b/cheditor5/icons/image_resize.png deleted file mode 100644 index a1eb71979..000000000 Binary files a/cheditor5/icons/image_resize.png and /dev/null differ diff --git a/cheditor5/icons/image_wrap_text.png b/cheditor5/icons/image_wrap_text.png deleted file mode 100644 index 7cc2f5a4b..000000000 Binary files a/cheditor5/icons/image_wrap_text.png and /dev/null differ diff --git a/cheditor5/icons/remove_col.png b/cheditor5/icons/remove_col.png deleted file mode 100644 index 2193adef8..000000000 Binary files a/cheditor5/icons/remove_col.png and /dev/null differ diff --git a/cheditor5/icons/remove_cols.png b/cheditor5/icons/remove_cols.png deleted file mode 100644 index fdbfcd914..000000000 Binary files a/cheditor5/icons/remove_cols.png and /dev/null differ diff --git a/cheditor5/icons/remove_row.png b/cheditor5/icons/remove_row.png deleted file mode 100644 index 8a82c6b33..000000000 Binary files a/cheditor5/icons/remove_row.png and /dev/null differ diff --git a/cheditor5/icons/remove_rows.png b/cheditor5/icons/remove_rows.png deleted file mode 100644 index e2d9588f2..000000000 Binary files a/cheditor5/icons/remove_rows.png and /dev/null differ diff --git a/cheditor5/icons/splitter.gif b/cheditor5/icons/splitter.gif deleted file mode 100644 index 660bb40df..000000000 Binary files a/cheditor5/icons/splitter.gif and /dev/null differ diff --git a/cheditor5/icons/statusbar_bgline.gif b/cheditor5/icons/statusbar_bgline.gif deleted file mode 100644 index 850fdecf5..000000000 Binary files a/cheditor5/icons/statusbar_bgline.gif and /dev/null differ diff --git a/cheditor5/icons/table_delete_cell.png b/cheditor5/icons/table_delete_cell.png deleted file mode 100644 index 38dfcec15..000000000 Binary files a/cheditor5/icons/table_delete_cell.png and /dev/null differ diff --git a/cheditor5/icons/table_delete_column.png b/cheditor5/icons/table_delete_column.png deleted file mode 100644 index ea515ca89..000000000 Binary files a/cheditor5/icons/table_delete_column.png and /dev/null differ diff --git a/cheditor5/icons/table_delete_row.png b/cheditor5/icons/table_delete_row.png deleted file mode 100644 index cb4083c66..000000000 Binary files a/cheditor5/icons/table_delete_row.png and /dev/null differ diff --git a/cheditor5/icons/table_insert_cell.png b/cheditor5/icons/table_insert_cell.png deleted file mode 100644 index bc70ca07d..000000000 Binary files a/cheditor5/icons/table_insert_cell.png and /dev/null differ diff --git a/cheditor5/icons/table_insert_column.png b/cheditor5/icons/table_insert_column.png deleted file mode 100644 index a2f7f5a85..000000000 Binary files a/cheditor5/icons/table_insert_column.png and /dev/null differ diff --git a/cheditor5/icons/table_insert_row.png b/cheditor5/icons/table_insert_row.png deleted file mode 100644 index dda90a344..000000000 Binary files a/cheditor5/icons/table_insert_row.png and /dev/null differ diff --git a/cheditor5/icons/table_join_column.png b/cheditor5/icons/table_join_column.png deleted file mode 100644 index 830afd95e..000000000 Binary files a/cheditor5/icons/table_join_column.png and /dev/null differ diff --git a/cheditor5/icons/table_join_row.png b/cheditor5/icons/table_join_row.png deleted file mode 100644 index c77e75c10..000000000 Binary files a/cheditor5/icons/table_join_row.png and /dev/null differ diff --git a/cheditor5/icons/table_split_column.png b/cheditor5/icons/table_split_column.png deleted file mode 100644 index 2e24005e4..000000000 Binary files a/cheditor5/icons/table_split_column.png and /dev/null differ diff --git a/cheditor5/icons/table_split_row.png b/cheditor5/icons/table_split_row.png deleted file mode 100644 index ddada19ab..000000000 Binary files a/cheditor5/icons/table_split_row.png and /dev/null differ diff --git a/cheditor5/icons/title_bar_bg.gif b/cheditor5/icons/title_bar_bg.gif deleted file mode 100644 index 13e78660f..000000000 Binary files a/cheditor5/icons/title_bar_bg.gif and /dev/null differ diff --git a/cheditor5/icons/toolbar-background.png b/cheditor5/icons/toolbar-background.png deleted file mode 100644 index 7c25988f4..000000000 Binary files a/cheditor5/icons/toolbar-background.png and /dev/null differ diff --git a/cheditor5/icons/toolbar-disable.png b/cheditor5/icons/toolbar-disable.png deleted file mode 100644 index c7ef22579..000000000 Binary files a/cheditor5/icons/toolbar-disable.png and /dev/null differ diff --git a/cheditor5/icons/toolbar-wrapper-bg.png b/cheditor5/icons/toolbar-wrapper-bg.png deleted file mode 100644 index a87fb876c..000000000 Binary files a/cheditor5/icons/toolbar-wrapper-bg.png and /dev/null differ diff --git a/cheditor5/icons/toolbar.png b/cheditor5/icons/toolbar.png deleted file mode 100644 index 6791aff52..000000000 Binary files a/cheditor5/icons/toolbar.png and /dev/null differ diff --git a/cheditor5/imageUpload/_common.php b/cheditor5/imageUpload/_common.php deleted file mode 100644 index 6b7c1fbaa..000000000 --- a/cheditor5/imageUpload/_common.php +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/cheditor5/imageUpload/_config.php b/cheditor5/imageUpload/_config.php deleted file mode 100644 index a14e41c26..000000000 --- a/cheditor5/imageUpload/_config.php +++ /dev/null @@ -1,27 +0,0 @@ - diff --git a/cheditor5/imageUpload/delete.php b/cheditor5/imageUpload/delete.php deleted file mode 100644 index 4fd27f31d..000000000 --- a/cheditor5/imageUpload/delete.php +++ /dev/null @@ -1,21 +0,0 @@ - \ No newline at end of file diff --git a/cheditor5/imageUpload/upload.php b/cheditor5/imageUpload/upload.php deleted file mode 100644 index 6add3cf57..000000000 --- a/cheditor5/imageUpload/upload.php +++ /dev/null @@ -1,101 +0,0 @@ - diff --git a/cheditor5/popup/color_picker.html b/cheditor5/popup/color_picker.html deleted file mode 100644 index 4188033b0..000000000 --- a/cheditor5/popup/color_picker.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - -컬러 선택 - - -
-
선택 색상:
-
- -
-
- - diff --git a/cheditor5/popup/flash.html b/cheditor5/popup/flash.html deleted file mode 100644 index 243c954d7..000000000 --- a/cheditor5/popup/flash.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - -플래쉬 동영상 - - -
-
- <플래쉬 임베디드 코드> - -
-
-
-
-
- - diff --git a/cheditor5/popup/flash/CHXImage.swf b/cheditor5/popup/flash/CHXImage.swf deleted file mode 100644 index df6df0e5a..000000000 Binary files a/cheditor5/popup/flash/CHXImage.swf and /dev/null differ diff --git a/cheditor5/popup/flash/ImagePreview.swf b/cheditor5/popup/flash/ImagePreview.swf deleted file mode 100644 index 87e4f7558..000000000 Binary files a/cheditor5/popup/flash/ImagePreview.swf and /dev/null differ diff --git a/cheditor5/popup/google_map.html b/cheditor5/popup/google_map.html deleted file mode 100644 index 82e1a121d..000000000 --- a/cheditor5/popup/google_map.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - Google Maps - - - -
- 찾을 주소: - - -
외국 주소는 해당 국가 언어로 입력하세요.
-
-
-
-
- - diff --git a/cheditor5/popup/icon.html b/cheditor5/popup/icon.html deleted file mode 100644 index f0985eb36..000000000 --- a/cheditor5/popup/icon.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - CHEditor - - -
-
-
-
-
- - \ No newline at end of file diff --git a/cheditor5/popup/image.html b/cheditor5/popup/image.html deleted file mode 100644 index 138e30b94..000000000 --- a/cheditor5/popup/image.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - -
-
-
- - 마우스로 드래그하여 순서를 바꾸세요.   (0장 / 12장 사진) -
-
- - - - - -
-
-
-
-
-
-
- 사진 해상도 -
-
- 가로: 0 픽셀
- 세로: 0 픽셀 -
-
-
-
- 레이아웃 -
-
- - - - - - -
-
- -
-
- -
-
- -
-
-
- (전체 사진에 적용됨) -
-
-
-
-
-
-
-
-
-
- - diff --git a/cheditor5/popup/image_url.html b/cheditor5/popup/image_url.html deleted file mode 100644 index 7102ab386..000000000 --- a/cheditor5/popup/image_url.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - CHEditor - - -
-
0 X 0
-
-
사진 URL -
- -
-
-
-
레이아웃 -
-
- - - -
-
-
-
-
- - diff --git a/cheditor5/popup/js/AC_OETags.js b/cheditor5/popup/js/AC_OETags.js deleted file mode 100644 index 00d0e4405..000000000 --- a/cheditor5/popup/js/AC_OETags.js +++ /dev/null @@ -1,247 +0,0 @@ -// Flash Player Version Detection - Rev 1.5 -// Detect Client Browser type -// Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved. -// Modified: chna@chcode.com - -var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false; -var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false; -var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false; - -function errMaxFileSize (MaxFileSize) { - alert("선택하신 파일 크기가 너무 큽니다. 최대 전송 크기는 "+MaxFileSize+" MB 입니다."); -} - -function ControlVersion() -{ - var version = 0; - var axo; -// var e; - try { - axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); - version = axo.GetVariable("$version"); - } catch (e) {} - - if (!version) - { - try { - axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); - version = "WIN 6,0,21,0"; - axo.AllowScriptAccess = "always"; - version = axo.GetVariable("$version"); - - } catch (e) {} - } - - if (!version) - { - try { - axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"); - version = axo.GetVariable("$version"); - } catch (e) {} - } - - if (!version) - { - try { - axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"); - version = "WIN 3,0,18,0"; - } catch (e) {} - } - - if (!version) - { - try { - axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); - version = "WIN 2,0,0,11"; - } catch (e) { - version = -1; - } - } - - return version; -} - -function GetSwfVer(){ - var flashVer = -1; - if (navigator.plugins != null && navigator.plugins.length > 0) { - if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) { - var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : ""; - var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description; - var descArray = flashDescription.split(" "); - var tempArrayMajor = descArray[2].split("."); - var versionMajor = tempArrayMajor[0]; - var versionMinor = tempArrayMajor[1]; - if ( descArray[3] != "" ) { - tempArrayMinor = descArray[3].split("r"); - } else { - tempArrayMinor = descArray[4].split("r"); - } - var versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0; - flashVer = versionMajor + "." + versionMinor + "." + versionRevision; - } - } - else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4; - else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3; - else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2; - else if ( isIE && isWin && !isOpera ) { - flashVer = ControlVersion(); - } - return flashVer; -} - -function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) -{ - versionStr = GetSwfVer(); - if (versionStr == -1 ) { - return false; - } else if (versionStr != 0) { - if(isIE && isWin && !isOpera) { - tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"] - tempString = tempArray[1]; // "2,0,0,11" - versionArray = tempString.split(","); // ['2', '0', '0', '11'] - } else { - versionArray = versionStr.split("."); - } - var versionMajor = versionArray[0]; - var versionMinor = versionArray[1]; - var versionRevision = versionArray[2]; - - if (versionMajor > parseFloat(reqMajorVer)) { - return true; - } - else if (versionMajor == parseFloat(reqMajorVer)) { - if (versionMinor > parseFloat(reqMinorVer)) - return true; - else if (versionMinor == parseFloat(reqMinorVer)) { - if (versionRevision >= parseFloat(reqRevision)) - return true; - } - } - return false; - } -} - -function AC_AddExtension(src, ext) -{ - if (src.indexOf('?') != -1) - return src.replace(/\?/, ext+'?'); - else - return src + ext; -} - -function AC_Generateobj(objAttrs, params, embedAttrs) -{ - var str = ''; - if (isIE && isWin && !isOpera) - { - str += ''; - breakpoint = false; - } - str += ''; - } else { - str += '"); - div.innerHTML = "<" + str.substr(0, pos) + ">"; - embed = div.firstChild; - } - else { - div.innerHTML = elem; - var object = div.getElementsByTagName('OBJECT')[0]; - if (object && object.hasChildNodes()) { - var child = object.firstChild; - var movieHeight, movieWidth; - movieWidth = (isNaN(object.width) != true) ? object.width : 320; - movieHeight = (isNaN(object.height)!= true) ? object.height: 240; - var params = new Array(); - - do { - if ((child.nodeName == 'PARAM') && (typeof child.name != 'undefined') && (typeof child.value != 'undefined')) - { - params.push({key: (child.name == 'movie') ? 'src' : child.name, val: child.value}); - } - child = child.nextSibling; - } - while (child); - - if (params.length > 0) { - embed = document.createElement('embed'); - embed.setAttribute("width", movieWidth); - embed.setAttribute("height", movieHeight); - - for (var i=0; i 40 && (i % 10) == 0) { - var br = document.createElement('br'); - block.appendChild(br); - } - - var img = new Image(); - img.src = path + (i+1) + ".gif"; - img.style.width = '16px'; - img.style.height = '16px'; - img.style.margin = '5px 4px'; - img.style.verticalAlign = 'middle'; - img.setAttribute('alt', ''); - img.setAttribute('border', 0); - img.className = 'handCursor'; - img.onclick = insertIcon; - block.appendChild(img); - } -} diff --git a/cheditor5/popup/js/image.js b/cheditor5/popup/js/image.js deleted file mode 100644 index 8bf888dc9..000000000 --- a/cheditor5/popup/js/image.js +++ /dev/null @@ -1,838 +0,0 @@ -// ================================================================ -// CHEditor 5 -// ---------------------------------------------------------------- -// Homepage: http://www.chcode.com -// Copyright (c) 1997-2011 CHSOFT -// ================================================================ -var operaBrowser = false; -if (navigator.userAgent.indexOf('Opera') >= 0) - operaBrowser = 1; - -var MSIE = navigator.userAgent.indexOf('MSIE') >= 0; -var navigatorVersion = navigator.appVersion.replace(/.*?MSIE (\d\.\d).*/g,'$1')/1; -var UploadScript = ""; -var DeleteScript = ""; -var AppID = "CHXImage"; -var AppSRC = ""; -var activeImage = false; -var readyToMove = false; -var moveTimer = -1; -var dragDropDiv; -var insertionMarker; -var hideTimer = null; -var offsetX_marker = 4; -var offsetY_marker = -3; -var firefoxOffsetX_marker = 4; -var firefoxOffsetY_marker = -2; - -if (navigatorVersion == 8 && MSIE) { - offsetX_marker = 3; - offsetY_marker = -4; -} - -var destinationObject = false; -var divXPositions = []; -var divYPositions = []; -var divWidth = []; -var divHeight = []; -var tmpLeft = 0; -var tmpTop = 0; -var eventDiff_x = 0; -var eventDiff_y = 0; -var modifyImages = []; -var uploadMaxNumber = 12; -var imageCompleted = 0; -var imageCompletedList = []; -var UploadButton = ""; -var UploadImagePath = ""; -var oEditor = null; -var button = [ { alt : "", img : 'imageUpload/submit.gif', cmd : doSubmit, hspace : 2 }, - { alt : "", img : 'imageUpload/cancel.gif', cmd : closeWindow, hspace : 2 } ]; - -var allowedMaxImgSize = 0; - -function init(dialog) { - oEditor = this; - oEditor.dialog = dialog; - var dlg = new Dialog(oEditor); - - UploadImagePath = oEditor.config.iconPath + 'imageUpload'; - UploadButton = oEditor.config.iconPath + 'imageUpload/add_image_button.gif'; - AppSRC = oEditor.config.popupPath + 'flash/CHXImage'; - - UploadScript = oEditor.config.editorPath + 'imageUpload/upload.php'; - DeleteScript = oEditor.config.editorPath + 'imageUpload/delete.php'; - - allowedMaxImgSize = oEditor.config.allowedMaxImgSize; - - dlg.setDialogHeight(397); - dlg.showButton(button); - showContents(); - initGallery(); - showUploadWindow(); - initEvent(); - createInsertionMaker(); -} - -function createInsertionMaker() { - var wrapper = document.getElementById('insertionMarker'); - var topIco = new Image(); - topIco.src = UploadImagePath + '/marker_top.gif'; - topIco.style.width = '6px'; - topIco.style.height = '1px'; - wrapper.appendChild(topIco); - - var middleIco = new Image(); - middleIco.src = UploadImagePath + '/marker_middle.gif'; - middleIco.style.height = '100px'; - middleIco.style.width = '6px'; - wrapper.appendChild(middleIco); - - var bottomIco = new Image(); - bottomIco.src = UploadImagePath + '/marker_bottom.gif'; - bottomIco.style.width = '6px'; - bottomIco.style.height = '1px'; - wrapper.appendChild(bottomIco); -} - -function popupClose() { -// ---------------------------------------------------------------------------------- - oEditor.popupWinClose(); -} - -function showContents() { - var spacer = function(id) { - var clear = document.createElement('DIV'); - clear.style.height = '0px'; - clear.style.width = '0px'; - clear.className = 'clear'; - clear.id = 'spacer' + id; - if (MSIE && navigatorVersion < 7) clear.style.display = 'inline'; - return clear; - }; - - var spacerNo = 1; - for (var i=0; i 0 && ((i % 4) == 0)) { - document.getElementById('imageListWrapper').appendChild(spacer(spacerNo++)); - } - var imgBox = document.createElement('DIV'); - imgBox.id = 'imgBox' + i; - imgBox.className = 'imageBox'; - var theImg = document.createElement('DIV'); - theImg.id = 'img_' + i; - theImg.className = 'imageBox_theImage'; - imgBox.appendChild(theImg); - - document.getElementById('imageListWrapper').appendChild(imgBox); - if (i == 11) { - document.getElementById('imageListWrapper').appendChild(spacer(spacerNo)); - } - } - - if (MSIE && navigatorVersion < 7) { - document.getElementById('imageListWrapper').style.padding = '5px 2px 5px 2px'; - document.getElementById('imageInfoBox').style.height = '302px'; - document.getElementById('imageInfoBox').style.width = '124px'; - } - else { - document.getElementById('imageListWrapper').style.padding = '5px 7px 7px 5px'; - document.getElementById('imageInfoBox').style.height = '298px'; - document.getElementById('imageInfoBox').style.width = '130px'; - } -} - -function openFiles() { -// ---------------------------------------------------------------------------------- - var elem = MSIE ? document.getElementById(AppID) : document[AppID]; - elem.AddFiles(); -} - -function setImageCount() { - imageCompleted++; - document.getElementById('imageCount').innerHTML = imageCompleted; -} - -function getImageCount() { - return imageCompleted; -} - -function resetImageCount(num) { - imageCompleted = num; - document.getElementById('imageCount').innerHTML = num; -} - -function showDelete(event) { -// ---------------------------------------------------------------------------------- - getDivCoordinates(); - - var self = this; - var button = document.getElementById('removeImage'); - var L = divXPositions[self.parentNode.id]; - var T = divYPositions[self.parentNode.id]; - - self.className = 'imageBox_theImage_over'; - button.style.left = (L + 126) + 'px'; - button.style.top = (T - 7) + 'px'; - button.style.display = 'block'; - button.onmouseover = function() { - self.className = 'imageBox_theImage_over'; - document.getElementById('selectedImageWidth').innerHTML = imageCompletedList[self.id]['width']; - document.getElementById('selectedImageHeight').innerHTML = imageCompletedList[self.id]['height']; - }; - - document.getElementById('selectedImageWidth').innerHTML = imageCompletedList[self.id]['width']; - document.getElementById('selectedImageHeight').innerHTML = imageCompletedList[self.id]['height']; - - button.onclick = function() { - create_request_object(DeleteScript + '?img=' + self.firstChild.src); - self.removeChild(self.firstChild); - self.onmouseover = null; - self.className = 'imageBox_theImage'; - document.getElementById('removeImage').style.display = 'none'; - - if (self.parentNode.nextSibling && self.parentNode.nextSibling.id) - { - var wrapper = document.getElementById('imageListWrapper'); - var moveobj = self.parentNode.nextSibling; - var target = self.parentNode; - - while (moveobj != null) { - wrapper.insertBefore(moveobj, target); - moveobj = target.nextSibling; - } - } - - resetSelectedImageSize(); - reOrder(); - }; - - if (hideTimer) clearTimeout(hideTimer); - hideTimer = setTimeout('hideDelete()', 3000); -} - -function hideDelete(event) { -// ---------------------------------------------------------------------------------- - document.getElementById('removeImage').style.display = 'none'; -} - -function resetSelectedImageSize() { - document.getElementById('selectedImageWidth').innerHTML = 0; - document.getElementById('selectedImageHeight').innerHTML = 0; -} - -function startUpload(count) { -// ---------------------------------------------------------------------------------- - var el = document.getElementById('imageListWrapper').getElementsByTagName('DIV'); - - for (var i=0; i < el.length; i++) { - var imgBox = el[i]; - if (imgBox.className != 'imageBox_theImage') - continue; - - if (count == 0) break; - - if (imgBox.firstChild == null || typeof(imgBox.firstChild.src) == 'undefined') { - imgBox.style.backgroundImage = "url('"+UploadImagePath+"/wait.gif')"; - count--; - } - } -} - -function fileFilterError(file) { - alert("선택하신 '" + file + "' 파일은 전송할 수 없습니다.\n" + - "gif, png, jpg, 그림 파일만 전송할 수 있습니다."); -} - -function uploadComplete(fileData) { -// ---------------------------------------------------------------------------------- - fileData = fileData.replace(/^\s+/g, '').replace(/\s+$/g, ''); - if (/^-ERR/.test(fileData)) { - alert(fileData); - popupClose(); - } - - if (imageCompleted >= uploadMaxNumber) - return; - - var tmpData = eval('('+fileData+')'); - - if (typeof tmpData == 'undefined') - return; - - var el = document.getElementById('imageListWrapper').getElementsByTagName('DIV'); - - for (var i=0; i < el.length; i++) { - var imgBox = el[i]; - if (imgBox.className != 'imageBox_theImage') - continue; - - if (tmpData['fileSize'] == 0) { - imgBox.style.backgroundImage = ''; - alert(tmpData['origName'] + ' 파일은 잘못된 파일입니다.'); - break; - } - - if (imgBox.firstChild == null || typeof(imgBox.firstChild.src) == 'undefined') { - var tmpImg = new Image(); - tmpImg.src = tmpData.fileUrl; - - imgBox.appendChild(tmpImg); - if (MSIE) tmpImg.style.display = "none"; - else tmpImg.style.visibility = 'hidden'; - imgComplete(tmpImg, imgBox.id, tmpData); - break; - } - } -} - -function imgComplete(img, boxId, dataObj) { - if (img.complete != true) { - var R = function() { imgComplete(img, boxId, dataObj);img=null;}; - setTimeout(R, 100); - } - else { - img.border = 0; - img.alt = ''; - var fixWidth = 120; - var fixHeight = 90; - var resizeW, resizeH; - imageCompletedList[boxId] = { width: img.width, height: img.height, info: dataObj }; - - if (img.width > fixWidth || img.height > fixHeight) { - if (img.width > img.height) { - resizeW = (img.width > fixWidth) ? fixWidth : img.width; - resizeH = Math.round((img.height * resizeW) / img.width); - } - else { - resizeH = (img.height > fixHeight) ? fixHeight : img.height; - resizeW = Math.round((img.width * resizeH) / img.height); - } - - if (resizeH > fixHeight) { - resizeH = (img.height > fixHeight) ? fixHeight : img.height; - resizeW = Math.round((img.width * resizeH) / img.height); - } - - } - else { - resizeW = img.width; - resizeH = img.height; - } - - img.style.width = resizeW + 'px'; - img.style.height = resizeH + 'px'; - img.hspace = 2; - img.vspace = 2; - - if (resizeW < fixWidth) { - var M = fixWidth - resizeW; - img.style.marginLeft = Math.round(M/2) + 'px'; - } - - if (resizeH < fixHeight) { - var M = fixHeight - resizeH; - img.style.marginTop = Math.round(M/2) + 'px'; - } - - var elem = document.getElementById(boxId); - elem.style.backgroundImage = "url('"+oEditor.config.iconPath+"dot.gif')"; - elem.onmouseover = showDelete; - elem.onmouseout = function() { - this.className = 'imageBox_theImage'; - resetSelectedImageSize(); - }; - - if (MSIE) img.style.display = "block"; - else img.style.visibility = 'visible'; - setImageCount(); - } -} - -function errMaxFileSize (errFileName) { - alert("선택하신 '"+errFileName+"' 파일의 크기가 너무 큽니다.\n선택 가능한 파일의 최대 크기는 " + - allowedMaxImgSize+" 바이트입니다."); -} - -function initEvent() { -//---------------------------------------------------------------------------------- - CHXImageRUN ( - "src", AppSRC, - "width", "93", - "FlashVars", "ServerURL="+UploadScript+"&UploadButton="+UploadButton+"&MaxFileSize="+allowedMaxImgSize, - "height", "22", - "align", "middle", - "id", AppID, - "quality", "high", - "bgcolor", "#ffffff", - "name", AppID, - "allowScriptAccess","Always", - "type", "application/x-shockwave-flash", - "pluginspage", "http://www.adobe.com/go/getflashplayer" - ); -} - -function showUploadWindow() { -// ---------------------------------------------------------------------------------- - var uploadWindow = document.getElementById("uploadWindow"); - var uploadWindowWidth = 700; - var winWidth = 0; - - if (typeof(window.innerWidth) != 'undefined') { - winHeight = window.innerHeight; - winWidth = window.innerWidth; - } - else if (document.documentElement && typeof document.documentElement.clientWidth!='undefined' - && document.documentElement.clientWidth != 0 ) - { - winWidth = document.documentElement.clientWidth; - winHeight = document.documentElement.clientHeight; - } - else if (document.body && typeof document.body.clientWidth!='undefined') { - winWidth = document.body.clientWidth; - winHeight = document.body.clientHeight; - } - else { - alert('현재 브라우저를 지원하지 않습니다.'); - return; - } - - var left = winWidth / 2 - (uploadWindowWidth / 2) + 'px'; - - uploadWindow.style.left = left; - uploadWindow.style.display = "block"; - uploadWindow.style.width = uploadWindowWidth + 'px'; - - if (modifyImages.length > 0) { - var el = document.getElementById('imageListWrapper').getElementsByTagName('DIV'); - - for (var i=0; i < modifyImages.length; i++) { - if (i > 7) break; - - for (var j=0; j < el.length; j++) { - var imgBox = el[j]; - if (imgBox.className != 'imageBox_theImage') - continue; - - if (imgBox.firstChild && (imgBox.firstChild.src == modifyImages[i])) { - break; - } - - if (imgBox.firstChild == null) { - var img = new Image(); - img.src = modifyImages[i]; - img.border = 0; - img.alt = ''; - img.style.width = '120px'; - img.style.height = '90px'; - imgBox.appendChild(img); - imgBox.onmouseover = showDelete; - break; - } - } - } - } - -} - -function closeWindow() { -// ---------------------------------------------------------------------------------- - if (removeImage()) - popupClose(); -} - -function removeImage() { -// ---------------------------------------------------------------------------------- - var images = []; - - for (var i=0; i < uploadMaxNumber; i++) { - var theImage = document.getElementById('img_'+i); - if (theImage.hasChildNodes() && (typeof theImage.firstChild.src != 'undefined')) - images.push(theImage); - } - - if (images.length > 0) { - if (!confirm('추가하신 사진이 있습니다. 사진 넣기를 취소하시겠습니까?')) { - return false; - } - - for (var i=0; i= 0 && moveTimer < 10) { - moveTimer++; - setTimeout('startMoveTimer()', 8); - } - - if (moveTimer == 5) { - getDivCoordinates(); - var subElements = dragDropDiv.getElementsByTagName('DIV'); - if (subElements.length > 0) { - dragDropDiv.removeChild(subElements[0]); - } - - dragDropDiv.style.display = 'block'; - var newDiv = activeImage.cloneNode(true); - newDiv.className = 'imageBox'; - newDiv.id = ''; - newDiv.style.padding = '2px'; - dragDropDiv.appendChild(newDiv); - - dragDropDiv.style.top = tmpTop + 'px'; - dragDropDiv.style.left = tmpLeft + 'px'; - } - - return false; -} - -function reOrder() { -// ---------------------------------------------------------------------------------- - var wrapper = document.getElementById('imageListWrapper'); - var imgBox = wrapper.getElementsByTagName('DIV'); - var imgNum = 0; - var breakLine = []; - var uploadImg = 0; - - for (var i=0; i < imgBox.length; i++) { - if (imgBox[i].id.indexOf('imgBox') == -1) continue; - imgBox[i].className = 'imageBox'; - imgBox[i].firstChild.className = 'imageBox_theImage'; - - if (imgBox[i].firstChild.firstChild != null) { - uploadImg++; - } - - switch (imgNum) { - case 4 : - case 8 : - case 11 : - breakLine.push(imgBox[i].id); - break; - } - imgNum++; - } - - for (var i=0; i leftPos / 1 && - divYPositions[prop] / 1 < topPos / 1 && - (divYPositions[prop] / 1 + divWidth[prop]) > topPos / 1) - { - if (MSIE) { - offsetX = offsetX_marker; - offsetY = offsetY_marker; - } - else { - offsetX = firefoxOffsetX_marker; - offsetY = firefoxOffsetY_marker; - } - - insertionMarker.style.top = divYPositions[prop] + offsetY + 'px'; - insertionMarker.style.left = divXPositions[prop] + offsetX + 'px'; - insertionMarker.style.display = 'block'; - destinationObject = document.getElementById(prop); - elementFound = true; - break; - } - } - - if (!elementFound) { - insertionMarker.style.display = 'none'; - destinationObject = false; - } - - return false; -} - -function getDivCoordinates() { -// ---------------------------------------------------------------------------------- - var imgBox = document.getElementById('imageListWrapper').getElementsByTagName('DIV'); - - for (var i=0; i < imgBox.length; i++) { - if (imgBox[i].className == 'imageBox' || - imgBox[i].className == 'imageBoxHighlighted' && imgBox[i].id) - { - divXPositions[imgBox[i].id] = getLeftPos(imgBox[i]); - divYPositions[imgBox[i].id] = getTopPos(imgBox[i]); - divWidth[imgBox[i].id] = imgBox[i].offsetWidth; - divHeight[imgBox[i].id] = imgBox[i].offsetHeight; - } - } -} - -function saveImageOrder() { -// ---------------------------------------------------------------------------------- - var rData = []; - var objects = document.getElementById('imageListWrapper').getElementsByTagName('DIV'); - - for (var i=0; i < objects.length; i++) { - if (objects[i].className == 'imageBox' || - objects[i].className == 'imageBoxHighlighted') - { - rData.push(objects[i].id); - } - } - - return rData; -} - -function initGallery() { -// ---------------------------------------------------------------------------------- - var imgBox = document.getElementById('imageListWrapper').getElementsByTagName('DIV'); - for (var i=0; i < imgBox.length; i++) { - if (imgBox[i].className == 'imageBox_theImage') { - imgBox[i].onmousedown = selectImage; - } - } - - document.body.onselectstart = cancelEvent; - document.body.ondragstart = cancelEvent; - document.body.onmouseup = dragDropEnd; - document.body.onmousemove = dragDropMove; - - dragDropDiv = document.getElementById('dragDropContent'); - insertionMarker = document.getElementById('insertionMarker'); - getDivCoordinates(); -} - -function create_request_object(params) { -// ---------------------------------------------------------------------------------- - var http_request = false; - if (window.XMLHttpRequest) { - http_request = new XMLHttpRequest(); - if (http_request.overrideMimeType) { - http_request.overrideMimeType('text/xml'); - } - } - else if (window.ActiveXObject) { - try { - http_request = new ActiveXObject("Msxml2.XMLHTTP"); - } - catch (e) { - try { - http_request = new ActiveXObject("Microsoft.XMLHTTP"); - } - catch (e) {} - } - } - - if (!http_request) { - return false; - } - - http_request.onreadystatechange = function() { handle_response(http_request); }; - http_request.open("GET", params, true); - http_request.send(null); -} - -function handle_response (http_request) { -// ---------------------------------------------------------------------------------- - if(http_request.readyState == 4){ - if (http_request.status == 200) { - var response = http_request.responseText; - if (response) { - return true; - } - } - } -} - -function doSubmit() { -// ---------------------------------------------------------------------------------- - var el = document.getElementById('imageListWrapper').getElementsByTagName('DIV'); - var imageArray = []; - var num = 0; - var fm_align = document.getElementById('fm_alignment').alignment; - var img_align = 'top'; - - for (var i=0; i < fm_align.length; i++) { - if (fm_align[i].checked) { - img_align = fm_align[i].value; - break; - } - } - - for (var i=0; i < el.length; i++) { - var imgBox = el[i]; - if (imgBox.className != 'imageBox_theImage') - continue; - -//---------------------------------------------------------------------------- -// - if (imgBox.firstChild != null) { - imageArray[num] = new Object(); - imageArray[num]['width'] = imageCompletedList[imgBox.id].width; - imageArray[num]['height'] = imageCompletedList[imgBox.id].height; - imageArray[num]['src'] = imgBox.firstChild.src; - imageArray[num]['info'] = imageCompletedList[imgBox.id].info; - - if (img_align == 'break' ) { - imageArray[num]['alt'] = "break"; - } - else { - imageArray[num]['alt'] = ""; - imageArray[num]['align'] = img_align; - } - - num++; - } - } - - if (imageArray.length > 0) - oEditor.doInsertImage(imageArray); - - popupClose(); -} diff --git a/cheditor5/popup/js/image_upload_flash.js b/cheditor5/popup/js/image_upload_flash.js deleted file mode 100644 index fb70ba021..000000000 --- a/cheditor5/popup/js/image_upload_flash.js +++ /dev/null @@ -1,279 +0,0 @@ -// Flash Player Version Detection - Rev 1.6 -// Detect Client Browser type -// Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved. -var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false; -var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false; -var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false; - -function ControlVersion() -{ - var version = 0; - var axo; -// var e; - - // NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry - - try { - // version will be set for 7.X or greater players - axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); - version = axo.GetVariable("$version"); - } catch (e) { - } - - if (!version) - { - try { - // version will be set for 6.X players only - axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); - - // installed player is some revision of 6.0 - // GetVariable("$version") crashes for versions 6.0.22 through 6.0.29, - // so we have to be careful. - - // default to the first public version - version = "WIN 6,0,21,0"; - - // throws if AllowScripAccess does not exist (introduced in 6.0r47) - axo.AllowScriptAccess = "always"; - - // safe to call for 6.0r47 or greater - version = axo.GetVariable("$version"); - - } catch (e) { - } - } - - if (!version) - { - try { - // version will be set for 4.X or 5.X player - axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"); - version = axo.GetVariable("$version"); - } catch (e) { - } - } - - if (!version) - { - try { - // version will be set for 3.X player - axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"); - version = "WIN 3,0,18,0"; - } catch (e) { - } - } - - if (!version) - { - try { - // version will be set for 2.X player - axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); - version = "WIN 2,0,0,11"; - } catch (e) { - version = -1; - } - } - - return version; -} - -// JavaScript helper required to detect Flash Player PlugIn version information -function GetSwfVer(){ - // NS/Opera version >= 3 check for Flash plugin in plugin array - var flashVer = -1; - - if (navigator.plugins != null && navigator.plugins.length > 0) { - if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) { - var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : ""; - var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description; - var descArray = flashDescription.split(" "); - var tempArrayMajor = descArray[2].split("."); - var versionMajor = tempArrayMajor[0]; - var versionMinor = tempArrayMajor[1]; - var versionRevision = descArray[3]; - if (versionRevision == "") { - versionRevision = descArray[4]; - } - if (versionRevision[0] == "d") { - versionRevision = versionRevision.substring(1); - } else if (versionRevision[0] == "r") { - versionRevision = versionRevision.substring(1); - if (versionRevision.indexOf("d") > 0) { - versionRevision = versionRevision.substring(0, versionRevision.indexOf("d")); - } - } else if (versionRevision[0] == "b") { - versionRevision = versionRevision.substring(1); - } - flashVer = versionMajor + "." + versionMinor + "." + versionRevision; - } - } - // MSN/WebTV 2.6 supports Flash 4 - else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4; - // WebTV 2.5 supports Flash 3 - else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3; - // older WebTV supports Flash 2 - else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2; - else if ( isIE && isWin && !isOpera ) { - flashVer = ControlVersion(); - } - return flashVer; -} - -// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available -function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) -{ - versionStr = GetSwfVer(); - if (versionStr == -1 ) { - return false; - } else if (versionStr != 0) { - if(isIE && isWin && !isOpera) { - // Given "WIN 2,0,0,11" - tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"] - tempString = tempArray[1]; // "2,0,0,11" - versionArray = tempString.split(","); // ['2', '0', '0', '11'] - } else { - versionArray = versionStr.split("."); - } - var versionMajor = versionArray[0]; - var versionMinor = versionArray[1]; - var versionRevision = versionArray[2]; - - // is the major.revision >= requested major.revision AND the minor version >= requested minor - if (versionMajor > parseFloat(reqMajorVer)) { - return true; - } else if (versionMajor == parseFloat(reqMajorVer)) { - if (versionMinor > parseFloat(reqMinorVer)) - return true; - else if (versionMinor == parseFloat(reqMinorVer)) { - if (versionRevision >= parseFloat(reqRevision)) - return true; - } - } - return false; - } -} - -function AC_AddExtension(src, ext) -{ - if (src.indexOf('?') != -1) - return src.replace(/\?/, ext+'?'); - else - return src + ext; -} - -function AC_Generateobj(objAttrs, params, embedAttrs) -{ - if (isIE && isWin && !isOpera) - { - var str = ' '; - str += ''; - document.getElementById("oFlash").innerHTML = str; - } - else { - var oFlash = document.getElementById("oFlash"); - var embed = document.createElement('embed'); - for (var i in embedAttrs) { - embed.setAttribute(i, embedAttrs[i]); - } - oFlash.appendChild(embed); - } -} - -function CHXImageRUN(){ - var ret = - AC_GetArgs - ( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" - , "application/x-shockwave-flash" - ); - AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs); -} - -function AC_GetArgs(args, ext, srcParamName, classid, mimeType){ - var ret = new Object(); - ret.embedAttrs = new Object(); - ret.params = new Object(); - ret.objAttrs = new Object(); - for (var i=0; i < args.length; i=i+2){ - var currArg = args[i].toLowerCase(); - - switch (currArg){ - case "classid": - break; - case "pluginspage": - ret.embedAttrs[args[i]] = args[i+1]; - break; - case "src": - case "movie": - args[i+1] = AC_AddExtension(args[i+1], ext); - ret.embedAttrs["src"] = args[i+1]; - ret.params[srcParamName] = args[i+1]; - break; - case "onafterupdate": - case "onbeforeupdate": - case "onblur": - case "oncellchange": - case "onclick": - case "ondblClick": - case "ondrag": - case "ondragend": - case "ondragenter": - case "ondragleave": - case "ondragover": - case "ondrop": - case "onfinish": - case "onfocus": - case "onhelp": - case "onmousedown": - case "onmouseup": - case "onmouseover": - case "onmousemove": - case "onmouseout": - case "onkeypress": - case "onkeydown": - case "onkeyup": - case "onload": - case "onlosecapture": - case "onpropertychange": - case "onreadystatechange": - case "onrowsdelete": - case "onrowenter": - case "onrowexit": - case "onrowsinserted": - case "onstart": - case "onscroll": - case "onbeforeeditfocus": - case "onactivate": - case "onbeforedeactivate": - case "ondeactivate": - case "type": - case "codebase": - ret.objAttrs[args[i]] = args[i+1]; - break; - case "id": - case "width": - case "height": - case "align": - case "vspace": - case "hspace": - case "class": - case "title": - case "accesskey": - case "name": - case "tabindex": - ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1]; - break; - default: - ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1]; - } - } - ret.objAttrs["classid"] = classid; - if (mimeType) ret.embedAttrs["type"] = mimeType; - return ret; -} - - diff --git a/cheditor5/popup/js/image_url.js b/cheditor5/popup/js/image_url.js deleted file mode 100644 index 9b67b2fcb..000000000 --- a/cheditor5/popup/js/image_url.js +++ /dev/null @@ -1,188 +0,0 @@ -// ================================================================ -// CHEditor 5 -// ---------------------------------------------------------------- -// Homepage: http://www.chcode.com -// Copyright (c) 1997-2011 CHSOFT -// ================================================================ -var AppWidth = "250"; -var AppHeight = "175"; -var AppID = "cheditorPreview"; -var oEditor = null; -var button = [ { alt : "", img : 'submit.gif', cmd : doSubmit }, - { alt : "", img : 'cancel.gif', cmd : popupClose } ]; -var imageArray = null; - -function init(dialog) { - oEditor = this; - oEditor.dialog = dialog; - - imageArray = new Array(); - - var dlg = new Dialog(oEditor); - dlg.showButton(button); - - CHXUploadRUN(oEditor.config.popupPath + 'flash/ImagePreview'); - setWrapper(); - showPreviewButton(); - dlg.setDialogHeight(); -} - -function showPreviewButton() { - var img = new Image(); - img.src = oEditor.config.iconPath + 'button/preview.gif'; - img.style.verticalAlign = 'middle'; - img.className = 'button'; - img.alt = ""; - img.onclick = doPreview; - document.getElementById("inputOutline").appendChild(img); -} - -function CHEditorImagePreview () { -// ---------------------------------------------------------------------------------- -// callBack function - - document.getElementById(AppID).CHEditorImagePreview("1", "1"); -} - -function CHXUploadRUN(src) { -// ---------------------------------------------------------------------------------- -// Preview -// - chxupload_RUN("src", src, - "width", AppWidth, - "height", AppHeight, - "align", "middle", - "id", AppID, - "classid", AppID, - "quality", "high", - "bgcolor", "#ebe9ed", - "name", AppID, - "allowScriptAccess","Always", - "type", "application/x-shockwave-flash", - "pluginspage", "http://www.adobe.com/go/getflashplayer"); -} - - - -function popupClose() -{ - oEditor.popupWinClose(); -} - -function doSubmit () -{ - if (navigator.userAgent.toLowerCase().indexOf("msie") != -1) - document.getElementById(AppID).style.display = 'none'; - - var fm_align = document.getElementById('fm_align').alignment; - var align = ''; - var i = 0; - - for (; i 0) - datum = ""; - else { - datum = protocol[0]; - datum = protocol[0].replace(/^\/\/\//, "//"); - } - } - - document.getElementById("fm_link_value").value = selectedItemValue + datum; - document.getElementById("fm_link_value").focus(); -} - -function returnSelected() -{ - var text; - var target = ''; - var title = ''; - - if (document.getElementById("fm_link_value").value != "") { - text = document.getElementById("fm_link_value").value; - } - else { - alert("링크 URL을 입력하여 주십시오."); - return false; - } - - if (document.getElementById("fm_target").value != "") { - target = document.getElementById("fm_target").value; - } - - if (document.getElementById("fm_title").value != "") { - title = document.getElementById("fm_title").value; - } - - oEditor.hyperLink(text, target, title); - popupClose(); -} - -function getSelected() { - var rng = oEditor.range; - var link = null; - - if (window.getSelection) { - link = oEditor.getElement(rng.startContainer, "A"); - } - else { - link = rng.parentElement ? oEditor.getElement(rng.parentElement(), "A") : oEditor.getElement(rng.item(0), "A"); - } - - if (link == null || link.nodeName.toLowerCase() != 'a') - return; - - var protocol = link.href.split(":"); - - if (protocol[0]) { - var protocolSel = document.getElementById("fm_protocol"); - - for (var i=0; i"; - var obj = document.getElementById("play"); - obj.innerHTML = mediaobj; -} - -function doSubmit() -{ - var file = document.getElementById("fm_linkurl"); - var media = ""; - oEditor.insertHtmlPopup(media); - popupClose(); -} - -function popupClose() { - oEditor.popupWinClose(); -} \ No newline at end of file diff --git a/cheditor5/popup/js/symbol.js b/cheditor5/popup/js/symbol.js deleted file mode 100644 index 77a0519eb..000000000 --- a/cheditor5/popup/js/symbol.js +++ /dev/null @@ -1,158 +0,0 @@ -// ================================================================ -// CHEditor 5 -// ---------------------------------------------------------------- -// Homepage: http://www.chcode.com 한국어 -// Copyright (c) 1997-2011 CHSOFT -// ================================================================ -var c = null; -var curView = null; -var S1 = '" ( ) [ ] { } ‘ ’ “ ” 〔 〕 〈 〉 《 》 「 」 『 』 【 】 § ※ ☆ ★ ○ ● ■ △ ▲ ▽ ▼ → 〓 ◁ ◀ ▷ ▶ ♤ ♣ ⊙ ◈ ▣ ◐ ◑ ▧ ▦ ▩ ♨ ☏ ☎ ‡ ㉿ ↕ ↗ ↙ ↖ ↘ ㈜ № ㏇ ™ ㏂ + - < = > ± × ÷ ≠ ≤ ≥ ∞ ∴ ♂ ♀ ∠ ⊥ ⌒ ∂ ∇ ≡ ≒ ≪ ≫ √ ∽ ∝ ∵ ∫ ∬ ∈ ∋ ⊆ ⊇ ⊂ ⊃ ∮ ∪ ∩ ∑ ∏ ∧ ∨ ¬ ⇒ ⇔ ∀ ∃'; -var S2 = '─ │ ┌ ┐ ┘ └ ├ ┬ ┤ ┴ ┼ ━ ┃ ┏ ┓ ┛ ┗ ┣ ┳ ┫ ┻ ╋ ┠ ┯ ┨ ┷ ┿ ┝ ┰ ┥ ┸ ╂ ┒ ┑ ┚ ┙ ┖ ┕ ┎ ┍ ┞ ┟ ┡ ┢ ┦ ┧ ┩ ┪ ┭ ┮ ┱ ┲ ┵ ┶ ┹ ┺ ┽ ┾ ╀ ╁ ╃ ╄ ╅ ╆ ╇ ╈ ╉ ╊'; -var S3 = '½ ⅓ ⅔ ¼ ¾ ⅛ ⅜ ⅝ ⅞ ¹ ² ³ ⁴ ⁿ ₁ ₂ ₃ ₄ 0 1 2 3 4 5 6 7 8 9 ⅰ ⅱ ⅲ ⅳ ⅴ ⅵ ⅶ ⅷ ⅸ ⅹ Ⅰ Ⅱ Ⅲ Ⅳ Ⅴ Ⅵ Ⅶ Ⅷ Ⅸ Ⅹ $ % ₩ ° ′ ″ ℃ Å ¢ £ ¥ ¤ ℉ ‰ ㎕ ㎖ ㎗ ℓ ㎘ ㏄ ㎣ ㎤ ㎥ ㎦ ㎙ ㎚ ㎛ ㎜ ㎝ ㎞ ㎟ ㎠ ㎡ ㎢ ㏊ ㎍ ㎎ ㎏ ㏏ ㎈ ㎉ ㏈ ㎧ ㎨ ㎰ ㎱ ㎲ ㎳ ㎴ ㎵ ㎶ ㎷ ㎸ ㎹ ㎀ ㎁ ㎂ ㎃ ㎄ ㎺ ㎻ ㎼ ㎽ ㎾ ㎿ ㎐ ㎑ ㎒ ㎓ ㎔ Ω ㏀ ㏁ ㎊ ㎋ ㎌ ㏖ ㏅ ㎭ ㎮ ㎯ ㏛ ㎩ ㎪ ㎫ ㎬ ㏝ ㏐ ㏓ ㏉ ㏜ ㏆'; -var S4 = 'ㅥ ㅦ ㅧ ㅨ ㅩ ㅪ ㅫ ㅬ ㅭ ㅮ ㅰ ㅯ ㅱ ㅲ ㅳ ㅴ ㅵ ㅶ ㅷ ㅸ ㅹ ㅺ ㅻ ㅼ ㅽ ㅾ ㅿ ㆀ ㆁ ㆂ ㆃ ㆄ ㆅ ㆆ ㆇ ㆈ ㆉ ㆊ ㆋ ㆌ ㆍ ㆎ'; -var S5 = '㉠ ㉡ ㉢ ㉣ ㉤ ㉥ ㉦ ㉧ ㉨ ㉩ ㉪ ㉫ ㉬ ㉭ ㉮ ㉯ ㉰ ㉱ ㉲ ㉳ ㉴ ㉶ ㉶ ㉷ ㉸ ㉹ ㉺ ㉻ ㈀ ㈁ ㈂ ㈃ ㈄ ㈅ ㈆ ㈇ ㈈ ㈉ ㈊ ㈋ ㈌ ㈍ ㈎ ㈏ ㈐ ㈑ ㈒ ㈓ ㈔ ㈕ ㈖ ㈗ ㈘ ㈙ ㈚ ㈛ ⓐ ⓑ ⓒ ⓓ ⓔ ⓕ ⓖ ⓗ ⓘ ⓙ ⓚ ⓛ ⓜ ⓝ ⓞ ⓟ ⓠ ⓡ ⓢ ⓣ ⓤ ⓥ ⓦ ⓧ ⓨ ⓩ ① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩ ⑪ ⑫ ⑬ ⑭ ⑮ ⒜ ⒝ ⒞ ⒟ ⒠ ⒡ ⒢ ⒣ ⒤ ⒥ ⒦ ⒧ ⒨ ⒩ ⒪ ⒫ ⒬ ⒭ ⒮ ⒯ ⒰ ⒱ ⒲ ⒳ ⒴ ⒵ ⑴ ⑵ ⑶ ⑷ ⑸ ⑹ ⑺ ⑻ ⑼ ⑽ ⑾ ⑿ ⒀ ⒁ ⒂'; -var japan1 = 'ぁ か さ た ど び ぽ ょ ゑ あ が ざ だ な ぴ ま よ を ぃ き し ち に ふ み ら ん い ぎ じ ぢ ぬ ぶ む り ぅ く す っ ね ぷ め る う ぐ ず つ の へ も れ ぇ け せ づ は べ ゃ ろ え げ ぜ て ば ぺ や ゎ ぉ こ そ で ぱ ほ ゅ わ お ご ぞ と ひ ぼ ゆ ゐ'; -var japan2 = 'ァ カ サ タ ド ビ ポ ョ ヱ ア ガ ザ ダ ナ ピ マ ヨ ヲ ィ キ シ チ ニ フ ミ ラ ン イ ギ ジ ヂ ヌ ブ ム リ ヴ ゥ ク ス ッ ネ プ メ ル ヵ ウ グ ズ ツ ノ ヘ モ レ ヶ ェ ケ セ ヅ ハ ベ ャ ロ エ ゲ ゼ テ バ ペ ヤ ヮ ォ コ ソ デ パ ホ ュ ワ オ ゴ ゾ ト ヒ ボ ユ ヰ'; - -c = S1.split(' '); -var button = [ { alt : "", img : 'input.gif', cmd : inputChar }, - { alt : "", img : 'cancel.gif', cmd : popupClose } ]; - -var oEditor = null; - -function init(dialog) { - oEditor = this; - oEditor.dialog = dialog; - - var dlg = new Dialog(oEditor); - dlg.showButton(button); - - setupEvent(); - dlg.setDialogHeight(); -} - -function showTable() { - var k = 0; - var len = c.length; - var w = 9; - var h = 20; - - var table = document.createElement('table'); - table.border = 0; - table.cellSpacing = 1; - table.cellPadding = 0; - table.align = 'center'; - - for (var i=0; i < w; i++) { - var tr = table.insertRow(i); - for (var j = 0; j < h; j++) { - var td = tr.insertCell(j); - td.className = 'schar'; - - if ( len < k+1) { - td.appendChild(document.createTextNode('\u00a0')); - } - else { - td.style.cursor = 'pointer'; - td.id = k; - td.onclick = function() { getchar(this.id); }; - td.onmouseover = function() { hover(this, true); }; - td.onmouseout = function() { hover(this, false); }; - td.appendChild(document.createTextNode(c[k])); - } - k++; - } - } - - var output = document.getElementById('output'); - if (output.hasChildNodes()) { - for (var i=0; i 0 && cols > 0) { - var table = document.createElement("table"); - - if (border) table.setAttribute("border", border); - if (width) table.setAttribute("width", width); - if (height) table.setAttribute("height", height); - if (align) table.setAttribute("align", align); - - table.style.borderStyle = 'solid'; - table.setAttribute("cellpadding", cellpd); - table.setAttribute("cellspacing", cellsp); - table.style.borderCollapse = "collapse"; - - if (bgcolor) table.setAttribute("bgcolor", bgcolor); - if (bordercolor) table.setAttribute("bordercolor", bordercolor); - - //var ie = navigator.userAgent.toLowerCase().indexOf("msie") != -1; - //var tdWidth = (cols > 1) ? parseInt(100 / cols) : null; - - for (var i=0; i < rows; i++) { - var tr = table.insertRow(i); - for (var j=0; j < cols; j++) { - var td = tr.insertCell(j); - /*if (tdWidth) - td.setAttribute("width", tdWidth + "%");*/ - td.innerHTML = ' '; - tr.appendChild(td); - } - } - - oEditor.insertHtmlPopup(table.cloneNode(true)); - } - - popupClose(); -} \ No newline at end of file diff --git a/cheditor5/popup/js/table_modify.js b/cheditor5/popup/js/table_modify.js deleted file mode 100644 index 4996e81c4..000000000 --- a/cheditor5/popup/js/table_modify.js +++ /dev/null @@ -1,236 +0,0 @@ -// ================================================================ -// CHEditor 5 -// ---------------------------------------------------------------- -// Homepage: http://www.chcode.com -// Copyright (c) 1997-2011 CHSOFT -// ================================================================ -var oEditor = null; -var button = [ { alt : "", img : 'submit.gif', cmd : doSubmit }, - { alt : "", img : 'cancel.gif', cmd : popupClose } ]; -var colour = ["ffffcc","ffcc66","ff9900","ffcc99","ff6633","ffcccc","cc9999","ff6699","ff99cc","ff66cc","ffccff","cc99cc","cc66ff","cc99ff","9966cc","ccccff","9999cc","3333ff","6699ff","0066ff","99ccff","66ccff","99cccc","ccffff","99ffcc","66cc99","66ff99","99ff99","ccffcc","33ff33","66ff00","ccff99","99ff00","ccff66","cccc66","ffffff", - "ffff99","ffcc00","ff9933","ff9966","cc3300","ff9999","cc6666","ff3366","ff3399","ff00cc","ff99ff","cc66cc","cc33ff","9933cc","9966ff","9999ff","6666ff","3300ff","3366ff","0066cc","3399ff","33ccff","66cccc","99ffff","66ffcc","33cc99","33ff99","66ff66","99cc99","00ff33","66ff33","99ff66","99ff33","ccff00","cccc33","cccccc", - "ffff66","ffcc33","cc9966","ff6600","ff3300","ff6666","cc3333","ff0066","ff0099","ff33cc","ff66ff","cc00cc","cc00ff","9933ff","6600cc","6633ff","6666cc","3300cc","0000ff","3366cc","0099ff","00ccff","339999","66ffff","33ffcc","00cc99","00ff99","33ff66","66cc66","00ff00","33ff00","66cc00","99cc66","ccff33","999966","999999", - "ffff33","cc9900","cc6600","cc6633","ff0000","ff3333","993333","cc3366","cc0066","cc6699","ff33ff","cc33cc","9900cc","9900ff","6633cc","6600ff","666699","3333cc","0000cc","0033ff","6699cc","3399cc","669999","33ffff","00ffcc","339966","33cc66","00ff66","669966","00cc00","33cc00","66cc33","99cc00","cccc99","999933","666666", - "ffff00","cc9933","996633","993300","cc0000","ff0033","990033","996666","993366","cc0099","ff00ff","990099","996699","660099","663399","330099","333399","000099","0033cc","003399","336699","0099cc","006666","00ffff","33cccc","009966","00cc66","339933","336633","33cc33","339900","669933","99cc33","666633","999900","333333", - "cccc00","996600","663300","660000","990000","cc0033","330000","663333","660033","990066","cc3399","993399","660066","663366","330033","330066","333366","000066","000033","003366","006699","003333","336666","00cccc","009999","006633","009933","006600","003300","00cc33","009900","336600","669900","333300","666600","000000"]; - -var modifyTable = null; - -function init(dialog) { - oEditor = this; - oEditor.dialog = dialog; - - var dlg = new Dialog(oEditor); - dlg.showButton(button); - dlg.setDialogHeight(); - - var rng = oEditor.range; - var selectionType = oEditor.getSelectionType(rng); - - if (!oEditor.getBrowser().msie) { - var table = rng.startContainer; - if (selectionType == 3 && table.nodeName != 'TABLE' && table.nodeName != 'TD') { - isError(); - return; - } - } - else { - if (rng.item) { - table = rng.item(0); - if (table.nodeName != 'TABLE') { - isError(); - return; - } - } - else - table = rng.parentElement(); - } - - while (table && table.nodeName != 'TABLE') - table = table.parentNode; - - if (table.nodeName != 'TABLE') { - isError(); - return; - } - - modifyTable = table; - - var border = table.getAttribute('border'); - if (isNaN(border)) border = 0; - document.getElementById("bordersize").value = border ? border : 0; - - var el_size = table.getAttribute('width'); - var fm_size = document.getElementById("width"); - var el_type = 'none'; - var fm_type = document.getElementById("widthtype"); - - if (el_size != null) { - el_type = (/\%$/.test(el_size)) ? '%' : 'px'; - el_size = parseInt(el_size); - if (isNaN(el_size)) el_size = 0; - } - else { - el_size = 0; - } - - fm_size.value = el_size; - fm_type.value = el_type; - - el_size = table.getAttribute('height'); - fm_size = document.getElementById("height"); - el_type = 'none'; - fm_type = document.getElementById("heighttype"); - - if (el_size != null) { - el_type = (/\%$/.test(el_size)) ? '%' : 'px'; - el_size = parseInt(el_size); - if (isNaN(el_size)) el_size = 0; - } - else { - el_size = 0; - } - - fm_size.value = el_size; - fm_type.value = el_type; - - fm_type = table.getAttribute('align'); - if (fm_type == null) fm_type = 'none'; - document.getElementById("talign").value = fm_type; - - - var cellpd = table.getAttribute('cellpadding'); - if (isNaN(cellpd)) cellpd = 0; - document.getElementById("cellpd").value = cellpd ? cellpd : 0; - - var cellsp = table.getAttribute('cellspacing'); - if (isNaN(cellsp)) cellsp = 0; - document.getElementById("cellsp").value = cellsp ? cellsp : 0; - - var bgcolor = table.getAttribute('bgcolor'); - var idbgcolor = document.getElementById("idbgcolor"); - if (bgcolor) { - idbgcolor.value = bgcolor.toUpperCase(); - idbgcolor.style.backgroundColor = idbgcolor.value; - } - else { - idbgcolor.value = '--'; - } - - - var bordercolor = table.getAttribute('bordercolor'); - var idbordercolor = document.getElementById("idbordercolor"); - if (bordercolor) { - idbordercolor.value = bordercolor.toUpperCase(); - idbordercolor.style.backgroundColor = idbordercolor.value; - } - else { - idbordercolor.value = '--'; - } -} - -function isError() { - alert('수정하실 테이블을 선택하십시오.'); - popupClose(); -} - -function popupClose() { - oEditor.popupWinClose(); -} - -function drawColor(el) -{ - var table = document.createElement('table'); - table.cellPadding = 0; - table.cellSpacing = 0; - table.border = 0; - var tr = table.insertRow(0); - var td = tr.insertCell(0); - td.style.backgroundColor = '#000'; - - var insideTable = document.createElement('table'); - insideTable.border = 0; - insideTable.cellSpacing = 1; - insideTable.cellPadding = 0; - insideTable.align = 'center'; - - var k = 0; - - for (var i = 0; i < 6; i++) { - var tr2 = insideTable.insertRow(i); - for (var j = 0; j < 36; j++) { - var td2 = tr2.insertCell(j); - td2.setAttribute('bgColor', '#' + colour[k]); - td2.className = el; - td2.style.width = '9px'; - td2.style.height = '9px'; - td2.onclick = getColor; - k++; - } - } - - td.appendChild(insideTable); - document.getElementById(el + '_wrapper').appendChild(table); -} - -function getColor() -{ - var color = this.bgColor; - var input = document.getElementById("id"+this.className); - input.style.backgroundColor = input.value = color.toUpperCase(); -} - -function doSubmit() -{ - var border = parseInt(document.getElementById("bordersize").value); - if (isNaN(border)) border = 0; - modifyTable.removeAttribute('border'); - if (border) modifyTable.setAttribute('border', border); - - var width = document.getElementById("width").value; - if (document.getElementById("widthtype").value == 'none') - width = null; - else { - width = isNaN(width) ? null : parseInt(width) + document.getElementById("widthtype").value; - } - - modifyTable.removeAttribute('width'); - if (width) modifyTable.setAttribute('width', width); - - var height = document.getElementById("height").value; - if (document.getElementById("heighttype").value == 'none') - height = null; - else { - height = isNaN(height) ? null : height + document.getElementById("heighttype").value; - } - - modifyTable.removeAttribute('height'); - if (height) modifyTable.setAttribute('height', height); - - var cellpd = parseInt(document.getElementById("cellpd").value); - if (isNaN(cellpd)) cellpd = 0; - modifyTable.setAttribute('cellpadding', cellpd); - - var cellsp = parseInt(document.getElementById("cellsp").value); - if (isNaN(cellsp)) cellsp = 0; - modifyTable.setAttribute('cellspacing', cellsp); - - var bgcolor = document.getElementById("idbgcolor").value; - bgcolor = oEditor.trimSpace(bgcolor); - if (bgcolor == '' || bgcolor == '--') bgcolor = null; - modifyTable.removeAttribute('bgcolor'); - if (bgcolor) modifyTable.setAttribute('bgcolor', bgcolor); - - var align = document.getElementById("talign").value; - if (align == 'none') align = null; - modifyTable.removeAttribute('align'); - if (align) modifyTable.setAttribute('align', align); - - var bordercolor = document.getElementById("idbordercolor").value; - bordercolor = oEditor.trimSpace(bordercolor); - if (bordercolor == ''|| bordercolor == '--') bordercolor = null; - modifyTable.removeAttribute('bordercolor'); - if (bordercolor) modifyTable.setAttribute('bordercolor', bordercolor); - - popupClose(); -} \ No newline at end of file diff --git a/cheditor5/popup/link.html b/cheditor5/popup/link.html deleted file mode 100644 index afff2c6df..000000000 --- a/cheditor5/popup/link.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - -CHEditor - - -
- - - - - -
-
- - - - - - - - - - - - - - - -
유형: - - - 타겟: - - -
URL: - - -
타이틀: - - -
-
-
-
-
-
- - diff --git a/cheditor5/popup/media.html b/cheditor5/popup/media.html deleted file mode 100644 index bef72f185..000000000 --- a/cheditor5/popup/media.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - CHEditor - - -
-
미디어 재생 - - - - -
-
-
-
-
-
미디어 파일 URL - - - - - - - -
- URL 입력: -
- -
-
-
-
-
- - diff --git a/cheditor5/popup/symbol.html b/cheditor5/popup/symbol.html deleted file mode 100644 index f42fe67f9..000000000 --- a/cheditor5/popup/symbol.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - CHEditor - - - | - | - | - | - | - -
- -
-
- 선택한 문자: -
-
-
- - diff --git a/cheditor5/popup/table.html b/cheditor5/popup/table.html deleted file mode 100644 index 1f0d42c83..000000000 --- a/cheditor5/popup/table.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - CHEditor - - -
행/열 개수 -
- - - - - - - -
열: - - 행: - -
-
-
-
-
레이아웃 속성 -
- - - - - - - - - - - - - - - - - - - -
가로: - - - - 높이: - - - -
셀 패딩: - - 셀 간격: - -
테두리 두께: - - 정렬: - -
-
-
-
-
색상 -
- - - - - - - - - - - - - - - -
테두리 색상: - - -
- -
바탕 색상: - - -
- -
-
-
-
-
- - \ No newline at end of file diff --git a/cheditor5/popup/table_modify.html b/cheditor5/popup/table_modify.html deleted file mode 100644 index 461e7a289..000000000 --- a/cheditor5/popup/table_modify.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - CHEditor - - -
레이아웃 속성 -
- - - - - - - - - - - - - - - - - - - -
가로: - - - - 높이: - - - -
셀 패딩: - - 셀 간격: - -
테두리 두께: - - 정렬: - -
-
-
-
-
색상 -
- - - - - - - - - - - - - - - -
테두리 색상: - - -
- -
바탕 색상: - - -
- -
-
-
-
-
- - \ No newline at end of file diff --git a/cheditor5/template.xml b/cheditor5/template.xml deleted file mode 100644 index d151f38fa..000000000 --- a/cheditor5/template.xml +++ /dev/null @@ -1,357 +0,0 @@ - - - diff --git a/config.php b/config.php index 793d36221..cad60347a 100644 --- a/config.php +++ b/config.php @@ -16,17 +16,6 @@ $g4['bbs_img_path'] = $g4['path'] . '/' . $g4['bbs'] . '/' . $g4['bbs_img']; $g4['admin'] = 'adm'; $g4['admin_path'] = $g4['path'] . '/' . $g4['admin']; -$g4['editor'] = 'cheditor'; -$g4['editor_path'] = $g4['path'] . '/' . $g4['editor']; - -$g4['cheditor4'] = 'cheditor4'; -$g4['cheditor4_path'] = $g4['path'] . '/' . $g4['cheditor4']; - -$g4['is_cheditor5'] = true; - -$g4['geditor'] = 'geditor'; -$g4['geditor_path'] = $g4['path'] . '/' . $g4['geditor']; - // 자주 사용하는 값 // 서버의 시간과 실제 사용하는 시간이 틀린 경우 수정하세요. // 하루는 86400 초입니다. 1시간은 3600초 diff --git a/lib/cheditor4.lib.php b/lib/cheditor4.lib.php deleted file mode 100644 index 7ec5af8bc..000000000 --- a/lib/cheditor4.lib.php +++ /dev/null @@ -1,56 +0,0 @@ - - var ed_{$id} = new cheditor('ed_{$id}'); - ed_{$id}.config.editorHeight = '{$height}'; - ed_{$id}.config.editorWidth = '{$width}'; - ed_{$id}.inputForm = 'tx_{$id}'; - "; - } -} -else -{ - function cheditor1($id, $width='100%', $height='250') - { - global $g4; - - return " - "; - } -} - -function cheditor2($id, $content='') -{ - global $g4; - - return " - - "; -} - -function cheditor3($id) -{ - return "document.getElementById('tx_{$id}').value = ed_{$id}.outputBodyHTML();"; -} -?> diff --git a/lib/common.lib.php b/lib/common.lib.php index 05a53c849..76441150f 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -1540,4 +1540,24 @@ function is_utf8($str) } return true; } + + +/* +----------------------------------------------------------- + Charset 을 변환하는 함수 +----------------------------------------------------------- +iconv 함수가 있으면 iconv 로 변환하고 +없으면 mb_convert_encoding 함수를 사용한다. +둘다 없으면 사용할 수 없다. +*/ +function convert_charset($from_charset, $to_charset, $str) +{ + + if( function_exists('iconv') ) + return iconv($from_charset, $to_charset, $str); + elseif( function_exists('mb_convert_encoding') ) + return mb_convert_encoding($str, $to_charset, $from_charset); + else + die("Not found 'iconv' or 'mbstring' library in server."); +} ?> \ No newline at end of file diff --git a/plugin/ckeditor/ckeditor.lib.php b/plugin/ckeditor/ckeditor.lib.php index c863d4a06..b13103801 100644 --- a/plugin/ckeditor/ckeditor.lib.php +++ b/plugin/ckeditor/ckeditor.lib.php @@ -9,4 +9,12 @@ function editor_textarea($id, $content="", $class="") //$str .= "\n"; return $str; } + +function chk_editor($id, $textarea_name="내용") +{ + $str = "var {$id}_data = CKEDITOR.instances.{$id}.getData();\n"; + $str .= " "; + $str .= "if (!{$id}_data) { alert(\"$textarea_name 입력해 주십시오.\"); return false; }\n"; + return $str; +} ?> \ No newline at end of file diff --git a/plugin/tcaptcha/tcaptcha.js b/plugin/tcaptcha/tcaptcha.js index 7958d696e..8a0245d8b 100644 --- a/plugin/tcaptcha/tcaptcha.js +++ b/plugin/tcaptcha/tcaptcha.js @@ -22,7 +22,6 @@ function chk_tcaptcha(user_answer, user_token) }); if (error) { - //alert('답이 틀렸거나 입력 횟수가 넘었습니다.\n\n문제를 클릭하신후 답을 다시 입력해 주십시오.'); alert(error); user_answer.select(); return false; diff --git a/skin/board/neo/ajax.filter.php b/skin/board/neo/ajax.filter.php deleted file mode 100644 index 0cbcedcf2..000000000 --- a/skin/board/neo/ajax.filter.php +++ /dev/null @@ -1,72 +0,0 @@ - \ No newline at end of file diff --git a/skin/board/neo/view_comment.skin.php b/skin/board/neo/view_comment.skin.php index bf1b9c9a8..d96f1825f 100644 --- a/skin/board/neo/view_comment.skin.php +++ b/skin/board/neo/view_comment.skin.php @@ -118,7 +118,7 @@ var char_max = parseInt(); // 최대 var subject = ""; var content = ""; $.ajax({ - url: "/ajax.filter.php", + url: bbs_path+"/filter.ajax.php", type: "POST", data: { "subject": "", diff --git a/skin/board/neo/write.skin.php b/skin/board/neo/write.skin.php index d2b3fc3fe..83419b3ee 100644 --- a/skin/board/neo/write.skin.php +++ b/skin/board/neo/write.skin.php @@ -8,7 +8,7 @@ var char_min = parseInt(); // 최소 var char_max = parseInt(); // 최대 -
+ @@ -278,18 +278,14 @@ function fwrite_submit(f) } */ - if (document.getElementById('tx_wr_content')) { - if (!ed_wr_content.outputBodyText()) { - alert('내용을 입력하십시오.'); - ed_wr_content.returnFalse(); - return false; - } - } + var subject = ""; var content = ""; $.ajax({ - url: "/ajax.filter.php", + url: bbs_path+"/filter.ajax.php", type: "POST", data: { "subject": f.wr_subject.value,