rhymix/modules/editor/components/emoticon/tpl/popup.js
zero 99e1e0d97b 1. 에디터컴포넌트의 구현 방식을 변경하여 내용에 상관없이 잘 출력되도록 변경
(code highlighter 문제 해결)
2. 이모티콘 에디터컴포넌트의 팝업 내용이 IE에서 사라지는 문제 수정


git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6297 201d5d3c-b55e-5fd7-737f-ddc643e51545
2009-05-07 07:31:13 +00:00

39 lines
1.2 KiB
JavaScript

function insertEmoticon(obj) {
if(typeof(opener)=='undefined') return;
var url = obj.src.replace(request_uri,'');
var text = "<img src=\""+url+"\" alt=\"emoticon\">";
opener.editorFocus(opener.editorPrevSrl);
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
opener.editorReplaceHTML(iframe_obj, text);
self.focus();
}
/* 선택된 이모티콘 목록을 가져옴 */
function getEmoticons(emoticon) {
var params = new Array();
params['component'] = "emoticon";
params['emoticon'] = emoticon;
params['method'] = "getEmoticonList";
var response_tags = new Array('error','message','emoticons');
exec_xml('editor', 'procEditorCall', params, completeGetEmoticons, response_tags);
}
function completeGetEmoticons(ret_obj) {
var emoticons = ret_obj['emoticons'].split("\n");
var zone = xGetElementById("popBody");
var html = "";
for(var i=0;i<emoticons.length;i++) {
html += '<img src="./modules/editor/components/emoticon/tpl/images/'+emoticons[i]+'" onclick="insertEmoticon(this);return false;" class="emoticon" />';
}
xInnerHtml(zone, html);
setFixedPopupSize();
setTimeout(setFixedPopupSize,1000);
}
jQuery(window).load(function() { getEmoticons('msn'); });