diff --git a/modules/editor/components/emoticon/tpl/popup.js b/modules/editor/components/emoticon/tpl/popup.js
index b13328cdd..bd4e73cdf 100644
--- a/modules/editor/components/emoticon/tpl/popup.js
+++ b/modules/editor/components/emoticon/tpl/popup.js
@@ -1,4 +1,4 @@
-var is_popup = window._isPoped;
+var is_popup = null;
/**
* @brief Get emoticon list by name
@@ -18,7 +18,7 @@ function completeGetEmoticons(ret_obj) {
var emoticons = ret_obj.emoticons.item;
var html = [];
for(var i=0;i';
+ html[html.length] = '
';
}
$('#emoticons').html(html.join(''));
}
@@ -27,12 +27,12 @@ function completeGetEmoticons(ret_obj) {
* @brief Insert a selected emoticon into the document
* @params Event jQuery event
*/
-function insertEmoticon() {
+function insertEmoticon(obj) {
var url, html, iframe, win = is_popup?opener:window;
if(!win) return;
- html = '
';
+ html = '
';
win.editorFocus(win.editorPrevSrl);
win.editorRelKeys[win.editorPrevSrl].pasteHTML(html);
@@ -43,6 +43,7 @@ function insertEmoticon() {
}
$(function(){
+ is_popup = window._isPoped;
// load default emoticon set
getEmoticons('msn');
$('#selectEmoticonList').change(function(){ getEmoticons(this.value) });