From 90e51e141eea78ae21d8c853410ddd324c9a3319 Mon Sep 17 00:00:00 2001 From: zero Date: Fri, 16 Mar 2007 12:29:28 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@515 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- .../colorpicker_bg.class.php | 53 ++++++++++++++++++ .../emoticon/emoticon.class.php/icon.gif | Bin 0 -> 595 bytes .../emoticon/emoticon.class.php/tpl/blank.gif | Bin 0 -> 43 bytes .../emoticon/emoticon.class.php/tpl/popup.css | 12 ++++ .../emoticon.class.php/tpl/popup.html | 6 ++ .../emoticon/emoticon.class.php/tpl/popup.js | 16 ++++++ 6 files changed, 87 insertions(+) create mode 100644 modules/editor/components/emoticon/emoticon.class.php/colorpicker_bg.class.php create mode 100644 modules/editor/components/emoticon/emoticon.class.php/icon.gif create mode 100644 modules/editor/components/emoticon/emoticon.class.php/tpl/blank.gif create mode 100644 modules/editor/components/emoticon/emoticon.class.php/tpl/popup.css create mode 100644 modules/editor/components/emoticon/emoticon.class.php/tpl/popup.html create mode 100644 modules/editor/components/emoticon/emoticon.class.php/tpl/popup.js diff --git a/modules/editor/components/emoticon/emoticon.class.php/colorpicker_bg.class.php b/modules/editor/components/emoticon/emoticon.class.php/colorpicker_bg.class.php new file mode 100644 index 000000000..cf581c76d --- /dev/null +++ b/modules/editor/components/emoticon/emoticon.class.php/colorpicker_bg.class.php @@ -0,0 +1,53 @@ +upload_target_srl = $upload_target_srl; + $this->component_path = $component_path; + } + + /** + * @brief 에디터에서 처음 요청을 받을 경우 실행이 되는 부분이다. + * execute의 경우 2가지 경우가 생긴다. + * 직접 에디터 아래의 component area로 삽입할 html 코드를 만드는 것과 popup 윈도우를 띄우는 것인데 + * popup윈도우를 띄울 경우는 getPopupContent() 이라는 method가 실행이 되니 구현하여 놓아야 한다 + **/ + function execute() { + + $url = sprintf('./?module=editor&act=dispPopup&target_srl=%s&component=colorpicker_bg', $this->upload_target_srl); + + $this->add('tpl', ''); + $this->add('open_window', 'Y'); + $this->add('popup_url', $url); + } + + /** + * @brief popup window요청시 다시 call이 될 method. popup window에 출력할 내용을 추가하면 된다 + **/ + function getPopupContent() { + // 템플릿을 미리 컴파일해서 컴파일된 소스를 return + $tpl_path = $this->component_path.'tpl'; + $tpl_file = 'popup.html'; + + Context::set("tpl_path", $tpl_path); + + require_once("./classes/template/TemplateHandler.class.php"); + $oTemplate = new TemplateHandler(); + return $oTemplate->compile($tpl_path, $tpl_file); + } + + } +?> diff --git a/modules/editor/components/emoticon/emoticon.class.php/icon.gif b/modules/editor/components/emoticon/emoticon.class.php/icon.gif new file mode 100644 index 0000000000000000000000000000000000000000..e1f4a8fe9ac6a857eced37eb20b88f6f0d29f865 GIT binary patch literal 595 zcmV-Z0<8T<+1c6a>+Adb z`_a+S(9qD3kdWKk+uGXN)6>)C<>lVq-qh68#nj*X{Qh;J!#i!QCs(0Nhr@G%kMZ{T ziK@cG!^8CV`>d?2UX#46yU3)y(x0E7+TP)`w6vOM*PN=rxXPC6D*x1<8($YV7xAF1u@bK^~U8R1e(nf&3N`=F}zrU)u&b++5?d|Q=+vIYk%2<%Q zz`(%i>FKq_(!a*g%Gv76%geU5wl{6Cx3{;cw#>1yvAMaqf0w)6-QCU2&48=Y^!WSK z)z?&xx@@M=JZ`V|`uv!su))#gsmA1AhrjOb?lfbm&d$z#m%aA+`sC!~Oo6@n{Qae~ z$lB=g|Ns900000000000000000000000000000000000000000A^8LW0049VEC2ui z01yBW000NDfOLX_XcW3QWS290|5kWQ!;N%W;8D%F=ceM1P^jtSrGzBIvgr2H?>0r2n7iO1p!-F8Z#Cf z5)e@mT?7dT6AM-i2Q6bgbQ4uXYCb?g3{W`+03c6ug1mG{;a~v_1||*wpd-dfA{0An hKzP7|pCB8NmS~Ca!Qv@8B}Oz*@Np0ul9&Pk06WppJs1E0 literal 0 HcmV?d00001 diff --git a/modules/editor/components/emoticon/emoticon.class.php/tpl/blank.gif b/modules/editor/components/emoticon/emoticon.class.php/tpl/blank.gif new file mode 100644 index 0000000000000000000000000000000000000000..35d42e808f0a8017b8d52a06be2f8fec0b466a66 GIT binary patch literal 43 scmZ?wbhEHbWMp7uXkcLY|NlP&1B2pE7Dgb&paUX6G7L;iE{qJ;0LZEa`2YX_ literal 0 HcmV?d00001 diff --git a/modules/editor/components/emoticon/emoticon.class.php/tpl/popup.css b/modules/editor/components/emoticon/emoticon.class.php/tpl/popup.css new file mode 100644 index 000000000..92bcb5494 --- /dev/null +++ b/modules/editor/components/emoticon/emoticon.class.php/tpl/popup.css @@ -0,0 +1,12 @@ +img.color_icon { + width:15px; + height:15px; + border:1px solid #FFFFFF; +} + +img.color_icon_over { + width:15px; + height:15px; + border:1px solid #000000; + cursor:pointer; +} diff --git a/modules/editor/components/emoticon/emoticon.class.php/tpl/popup.html b/modules/editor/components/emoticon/emoticon.class.php/tpl/popup.html new file mode 100644 index 000000000..1513b92ba --- /dev/null +++ b/modules/editor/components/emoticon/emoticon.class.php/tpl/popup.html @@ -0,0 +1,6 @@ + + + diff --git a/modules/editor/components/emoticon/emoticon.class.php/tpl/popup.js b/modules/editor/components/emoticon/emoticon.class.php/tpl/popup.js new file mode 100644 index 000000000..8276aa06b --- /dev/null +++ b/modules/editor/components/emoticon/emoticon.class.php/tpl/popup.js @@ -0,0 +1,16 @@ +var color_list = new Array('000000','993300','333300','003300','003366','000080','333399','333333','800000','FF6600','808000','008000','008080','0000FF','666699','808080','FF0000','FF9900','99CC00','339966','33CCCC','3366FF','800080','969696','FF00FF','FFCC00','FFFF00','00FF00','00FFFF','00CCFF','993366','c0c0c0','FF99CC','FFCC99','FFFF99','CCFFCC','CCFFFF','99CCFF','CC99FF','FFFFFF'); + +function setColor(color) { + opener.editorFocus(opener.editorPrevSrl); + opener.editorSetBackColor("#"+color); + opener.editorFocus(opener.editorPrevSrl); + self.close(); +} + +function printColor() { + var html = ""; + for(var i=0;i\"color\"<\/div>"; + } + document.write(html); +}