From 6da2493b77cdc19e9fd1b34f2b47241edb7508d5 Mon Sep 17 00:00:00 2001 From: MinSoo Kim Date: Tue, 14 Jul 2015 00:59:09 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B4=EB=AA=A8=ED=8B=B0=EC=BD=98=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EB=84=8C=ED=8A=B8=20=EB=A6=AC=EC=82=AC?= =?UTF-8?q?=EC=9D=B4=EC=A7=95=20=EA=B0=9C=EC=84=A0=20PR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 이모티콘에 따라 팝업 윈도우 사이즈를 바꾸면서 이모티콘을 적절하게 표시합니다. --- modules/editor/components/emoticon/tpl/popup.html | 2 +- modules/editor/components/emoticon/tpl/popup.js | 15 ++++++++++++++- .../editor/components/emoticon/tpl/popup.min.js | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 modules/editor/components/emoticon/tpl/popup.min.js diff --git a/modules/editor/components/emoticon/tpl/popup.html b/modules/editor/components/emoticon/tpl/popup.html index 3fe5aa7c7..e408bf16b 100644 --- a/modules/editor/components/emoticon/tpl/popup.html +++ b/modules/editor/components/emoticon/tpl/popup.html @@ -11,5 +11,5 @@ -
+
diff --git a/modules/editor/components/emoticon/tpl/popup.js b/modules/editor/components/emoticon/tpl/popup.js index 31417ff57..a44f31450 100644 --- a/modules/editor/components/emoticon/tpl/popup.js +++ b/modules/editor/components/emoticon/tpl/popup.js @@ -22,7 +22,20 @@ function completeGetEmoticons(ret_obj) { for(var i=0;i'; } - jQuery('#emoticons').html(html.join('')).find('img.emoticon').click(insertEmoticon); + jQuery('#emoticons').html(html.join('')).find('img.emoticon') + .click(insertEmoticon) + .load(function(){ + /* resize popup window for new emoticons loaded, 2015-07-14 by misol */ + if(jQuery('section.section').outerHeight(true) != jQuery( window ).height()) + { + // more space for y-scroll + var ww = (jQuery('section.section').outerHeight(true) > jQuery( window ).height())? jQuery('section.section').outerWidth(true) + 60 : jQuery('section.section').outerWidth(true) + 30; + // not more than screen height + var wh = (screen.height-100 < jQuery('section.section').outerHeight(true)+100)? screen.height-100 : jQuery('section.section').outerHeight(true)+100; + + window.resizeTo(ww, wh); + } + }); } /** diff --git a/modules/editor/components/emoticon/tpl/popup.min.js b/modules/editor/components/emoticon/tpl/popup.min.js new file mode 100644 index 000000000..11e57942b --- /dev/null +++ b/modules/editor/components/emoticon/tpl/popup.min.js @@ -0,0 +1 @@ +jQuery(function(e){function o(e){var o={component:"emoticon",emoticon:e,method:"getEmoticonList"},t="error message emoticons".split(" ");exec_xml("editor","procEditorCall",o,i,t)}function i(e){for(var o=e.emoticons.split("\n"),i=[],n=0;n';jQuery("#emoticons").html(i.join("")).find("img.emoticon").click(t).load(function(){if(jQuery("section.section").outerHeight(!0)!=jQuery(window).height()){var e=jQuery("section.section").outerHeight(!0)>jQuery(window).height()?jQuery("section.section").outerWidth(!0)+60:jQuery("section.section").outerWidth(!0)+30,o=screen.height-100',o.editorFocus(o.editorPrevSrl),o.editorRelKeys[o.editorPrevSrl].pasteHTML(e),n&&window.focus(),!1}var n=window._isPoped;o("msn"),e("#selectEmoticonList").change(function(){o(this.value)})}); \ No newline at end of file