diff --git a/js/autosave.js b/js/autosave.js index 7c867e1a1..ed24c9335 100644 --- a/js/autosave.js +++ b/js/autosave.js @@ -11,6 +11,8 @@ function autosave() { this.wr_content.value = CKEDITOR.instances.wr_content.getData(); } else if (g5_editor.indexOf("cheditor5") != -1 && typeof(ed_wr_content)!="undefined") { this.wr_content.value = ed_wr_content.outputBodyHTML(); + } else if (g5_editor.indexOf("smarteditor2") != -1 && typeof(oEditors.getById['wr_content'])!="undefined" ) { + this.wr_content.value = oEditors.getById['wr_content'].getIR(); } // 변수에 저장해 놓은 값과 다를 경우에만 임시 저장함 if (save_wr_subject != this.wr_subject.value || save_wr_content != this.wr_content.value) { @@ -79,6 +81,10 @@ $(function(){ CKEDITOR.instances.wr_content.setData(content); } else if (g5_editor.indexOf("cheditor5") != -1 && typeof(ed_wr_content)!="undefined") { ed_wr_content.putContents(content); + } else if (g5_editor.indexOf("smarteditor2") != -1 && typeof(oEditors.getById['wr_content'])!="undefined" ) { + oEditors.getById["wr_content"].exec("SET_CONTENTS", [""]); + //oEditors.getById["wr_content"].exec("SET_IR", [""]); + oEditors.getById["wr_content"].exec("PASTE_HTML", [content]); } else { $("#fwrite #wr_content").val(content); } diff --git a/plugin/editor/smarteditor2/SmartEditor2.html b/plugin/editor/smarteditor2/SmartEditor2.html new file mode 100644 index 000000000..58f22794e --- /dev/null +++ b/plugin/editor/smarteditor2/SmartEditor2.html @@ -0,0 +1,74 @@ + + + + +네이버 :: Smart Editor 2 ™ + + + +
+ + +

+ + + + +

+
+ + + + + \ No newline at end of file diff --git a/plugin/editor/smarteditor2/SmartEditor2Skin.html b/plugin/editor/smarteditor2/SmartEditor2Skin.html new file mode 100644 index 000000000..03c99f4eb --- /dev/null +++ b/plugin/editor/smarteditor2/SmartEditor2Skin.html @@ -0,0 +1,797 @@ + + + + + + +네이버 :: Smart Editor 2 ™ + + + + + + + + + + + + + + + + + + +
+
글쓰기영역으로 바로가기 +
+ +
+
    +
  • + +
    +
    +
      +
    • + +
    • +
    • +
    • +
    • +
    +
    +
    + +
  • + +
  • + +
    +
    +
      +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    +
    +
    + +
  • +
    +
  • + +
  • + +
  • + +
  • + +
  • + + + +
  • + +
  • + + + +
  • + +
  • + +
  • +
    +
  • + +
  • + +
  • + +
  • + +
  • + +
    +
    +
      +
    • +
    • +
    • +
    • +
    • +
    • +
    • +
    +
    +

    직접 입력

    + + + + + +
    + +
    +
    +
    +
    + +
  • +
    +
  • +
    +
      +
    • +
    • +
    • +
    • +
    +
    +
  • +
    +
  • + + + +
  • +
    + + +
  • + +
    +
    +
    +
      +
    • +
      +
        +
      • + + +
      +
      +
    • +
    • +
      +
        +
      • + + +
      +
      +
    • +
    • +
      +
        +
      • + + +
      +
      +
    • +
    • +
      +
        +
      • + + +
      +
      +
    • +
    • +
      +
        +
      • + + +
      +
      +
    • +
    • +
      +
        +
      • + + +
      +
      +
    • +
    +

    + +

    +
    +
    +
    + +
  • + +
  • + + +
    +
    +
    +
    + 칸수 지정 +
    +
    +
    + + +
    +
    +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + +
        
        
        
    +
    +
    + 속성직접입력 +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    + + + +
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +
    +
    +
    + 표스타일 +
    +
    +
    + + + +
    +
    +
    +

    + +

    + +
    + +
    +
    +
    + + +
  • + +
  • + + +
    +
    +
    + +

    찾기/바꾸기

    +
      +
    • +
    • +
    +
    +
    +
    +
    +

    + +

    +
    + + +
    +
    +
    + + +
  • +
+
    +
  • +
+
+ +
+ + + + + +
+ +
+ + + + + + + + + +
+ + +
+ + +
+ + + + +
+ + +
+ + +
+
+ + +
+ +
    +
  • +
  • +
  • +
+
+ +
+ +
+
+ + + + + \ No newline at end of file diff --git a/plugin/editor/smarteditor2/config.js b/plugin/editor/smarteditor2/config.js new file mode 100644 index 000000000..0790864a1 --- /dev/null +++ b/plugin/editor/smarteditor2/config.js @@ -0,0 +1,29 @@ +(function($){ + $(document).ready(function() { + $(".smarteditor2").each( function(index){ + var get_id = $(this).attr("id"); + + if( !get_id || $(this).prop("nodeName") != 'TEXTAREA' ) return true; + + nhn.husky.EZCreator.createInIFrame({ + oAppRef: oEditors, + elPlaceHolder: get_id, + sSkinURI: g5_editor_url+"/SmartEditor2Skin.html", + htParams : { + bUseToolbar : true, // 툴바 사용 여부 (true:사용/ false:사용하지 않음) + bUseVerticalResizer : true, // 입력창 크기 조절바 사용 여부 (true:사용/ false:사용하지 않음) + bUseModeChanger : true, // 모드 탭(Editor | HTML | TEXT) 사용 여부 (true:사용/ false:사용하지 않음) + //aAdditionalFontList : aAdditionalFontSet, // 추가 글꼴 목록 + fOnBeforeUnload : function(){ + //alert("완료!"); + } + }, //boolean + fOnAppLoad : function(){ + //예제 코드 + //oEditors.getById["ir1"].exec("PASTE_HTML", ["로딩이 완료된 후에 본문에 삽입되는 text입니다."]); + }, + fCreator: "createSEditor2" + }); + }); + }); +})(jQuery); \ No newline at end of file diff --git a/plugin/editor/smarteditor2/css/smart_editor2.css b/plugin/editor/smarteditor2/css/smart_editor2.css new file mode 100644 index 000000000..54104fb48 --- /dev/null +++ b/plugin/editor/smarteditor2/css/smart_editor2.css @@ -0,0 +1,336 @@ +@charset "UTF-8"; +/* NHN Web Standardization Team (http://html.nhndesign.com/) HHJ 090226 */ +/* COMMON */ +body, #smart_editor2, #smart_editor2 p, #smart_editor2 h1, #smart_editor2 h2, #smart_editor2 h3, #smart_editor2 h4, #smart_editor2 h5, #smart_editor2 h6, #smart_editor2 ul, #smart_editor2 ol, #smart_editor2 li, #smart_editor2 dl, #smart_editor2 dt, #smart_editor2 dd, #smart_editor2 table, #smart_editor2 th, #smart_editor2 td, #smart_editor2 form, #smart_editor2 fieldset, #smart_editor2 legend, #smart_editor2 input, #smart_editor2 textarea, #smart_editor2 button, #smart_editor2 select { margin: 0; padding: 0; } + +#smart_editor2, #smart_editor2 h1, #smart_editor2 h2, #smart_editor2 h3, #smart_editor2 h4, #smart_editor2 h5, #smart_editor2 h6, #smart_editor2 input, #smart_editor2 textarea, #smart_editor2 select, #smart_editor2 table, #smart_editor2 button { font-family: '돋움',Dotum,Helvetica,sans-serif; font-size: 12px; color: #666; } + +#smart_editor2 span, #smart_editor2 em { font-size: 12px; } + +#smart_editor2 em, #smart_editor2 address { font-style: normal; } + +#smart_editor2 img, #smart_editor2 fieldset { border: 0; } + +#smart_editor2 hr { display: none; } + +#smart_editor2 ol, #smart_editor2 ul { list-style: none; } + +#smart_editor2 button { border: 0; background: none; font-size: 11px; vertical-align: top; cursor: pointer; } + +#smart_editor2 button span, #smart_editor2 button em { visibility: hidden; overflow: hidden; position: absolute; top: 0; font-size: 0; line-height: 0; } + +#smart_editor2 legend, #smart_editor2 .blind { visibility: hidden; overflow: hidden; position: absolute; width: 0; height: 0; font-size: 0; line-height: 0; } + +#smart_editor2 .input_ty1 { height: 14px; margin: 0; padding: 4px 2px 0 4px; border: 1px solid #c7c7c7; font-size: 11px; color: #666; } + +#smart_editor2 a:link, #smart_editor2 a:visited, #smart_editor2 a:active, #smart_editor2 a:focus { color: #666; text-decoration: none; } + +#smart_editor2 a:hover { color: #666; text-decoration: underline; } + +/* LAYOUT */ +#smart_editor2 .se2_header { margin: 10px 0 29px 0; } + +#smart_editor2 .se2_bi { float: left; width: 93px; height: 20px; margin: 0; padding: 0; background: url("../img/ko_KR/btn_set.png?130306") -343px -358px no-repeat; font-size: 0; line-height: 0; text-indent: -10000px; vertical-align: middle; } + +#smart_editor2 .se2_allhelp { display: inline-block; width: 18px; height: 18px; padding: 0; background: url("../img/ko_KR/btn_set.png?130306") -437px -358px no-repeat; font-size: 0; line-height: 0; text-indent: -10000px; vertical-align: middle; } + +#smart_editor2 #smart_editor2_content { border: 1px solid #b5b5b5; } + +#smart_editor2 .se2_tool { overflow: visible; position: relative; z-index: 25; } + +/* EDITINGAREA */ +#smart_editor2 .se2_input_area { position: relative; z-index: 22; height: 400px; margin: 0; padding: 0; *zoom: 1; } + +#smart_editor2 .se2_input_wysiwyg, #smart_editor2 .se2_input_syntax { display: block; overflow: auto; width: 100%; height: 100%; margin: 0; *margin: -1px 0 0 0; border: 0; } + +/* EDITINGMODE */ +#smart_editor2 .se2_conversion_mode { position: relative; height: 15px; padding-top: 1px; border-top: 1px solid #b5b5b5; background: url("../img/icon_set.gif") 0 -896px repeat-x; } + +#smart_editor2 .se2_inputarea_controller { display: block; clear: both; position: relative; width: 100%; height: 15px; text-align: center; cursor: n-resize; } + +#smart_editor2 .se2_inputarea_controller span, #smart_editor2 .controller_on span { background: url("../img/ico_extend.png") no-repeat; } + +#smart_editor2 .se2_inputarea_controller span { position: static; display: inline-block; visibility: visible; overflow: hidden; height: 15px; padding-left: 11px; background-position: 0 2px; color: #888; font-size: 11px; letter-spacing: -1px; line-height: 16px; white-space: nowrap; } + +* + html #smart_editor2 .se2_inputarea_controller span { line-height: 14px; } + +#smart_editor2 .controller_on span { background-position: 0 -21px; color: #249c04; } + +#smart_editor2 .ly_controller { display: block; position: absolute; bottom: 2px; left: 50%; width: 287px; margin-left: -148px; padding: 8px 0 7px 9px; border: 1px solid #827f7c; background: #fffdef; } + +#smart_editor2 .ly_controller p { color: #666; font-size: 11px; letter-spacing: -1px; line-height: 11px; } + +#smart_editor2 .ly_controller .bt_clse, #smart_editor2 .ly_controller .ic_arr { position: absolute; background: url("../img/ico_extend.png") no-repeat; } + +#smart_editor2 .ly_controller .bt_clse { top: 5px; right: 4px; width: 14px; height: 15px; background-position: 1px -43px; } + +#smart_editor2 .ly_controller .ic_arr { top: 25px; left: 50%; width: 10px; height: 6px; margin-left: -5px; background-position: 0 -65px; } + +#smart_editor2 .se2_converter { float: left; position: absolute; top: -1px; right: 3px; z-index: 20; } + +#smart_editor2 .se2_converter li { float: left; } + +#smart_editor2 .se2_converter .se2_to_editor { width: 59px; height: 15px; background: url("../img/ko_KR/btn_set.png?130306") 0 -85px no-repeat; vertical-align: top; } + +#smart_editor2 .se2_converter .se2_to_html { width: 59px; height: 15px; background: url("../img/ko_KR/btn_set.png?130306") -59px -70px no-repeat; vertical-align: top; } + +#smart_editor2 .se2_converter .se2_to_text { width: 60px; height: 15px; background: url("../img/ko_KR/btn_set.png?130306") -417px -466px no-repeat; vertical-align: top; } + +#smart_editor2 .se2_converter .active .se2_to_editor { width: 59px; height: 15px; background: url("../img/ko_KR/btn_set.png?130306") 0 -70px no-repeat; vertical-align: top; } + +#smart_editor2 .se2_converter .active .se2_to_html { width: 59px; height: 15px; background: url("../img/ko_KR/btn_set.png?130306") -59px -85px no-repeat; vertical-align: top; } + +#smart_editor2 .se2_converter .active .se2_to_text { width: 60px; height: 15px; background: url("../img/ko_KR/btn_set.png?130306") -417px -481px no-repeat; vertical-align: top; } + +/* EDITINGAREA_HTMLSRC */ +#smart_editor2 .off .ico_btn, #smart_editor2 .off .se2_more, #smart_editor2 .off .se2_more2, #smart_editor2 .off .se2_font_family, #smart_editor2 .off .se2_font_size, #smart_editor2 .off .se2_bold, #smart_editor2 .off .se2_underline, #smart_editor2 .off .se2_italic, #smart_editor2 .off .se2_tdel, #smart_editor2 .off .se2_fcolor, #smart_editor2 .off .se2_fcolor_more, #smart_editor2 .off .se2_bgcolor, #smart_editor2 .off .se2_bgcolor_more, #smart_editor2 .off .se2_left, #smart_editor2 .off .se2_center, #smart_editor2 .off .se2_right, #smart_editor2 .off .se2_justify, #smart_editor2 .off .se2_ol, #smart_editor2 .off .se2_ul, #smart_editor2 .off .se2_indent, #smart_editor2 .off .se2_outdent, #smart_editor2 .off .se2_lineheight, #smart_editor2 .off .se2_del_style, #smart_editor2 .off .se2_blockquote, #smart_editor2 .off .se2_summary, #smart_editor2 .off .se2_footnote, #smart_editor2 .off .se2_url, #smart_editor2 .off .se2_emoticon, #smart_editor2 .off .se2_character, #smart_editor2 .off .se2_table, #smart_editor2 .off .se2_find, #smart_editor2 .off .se2_spelling, #smart_editor2 .off .se2_sup, #smart_editor2 .off .se2_sub, #smart_editor2 .off .se2_text_tool_more, #smart_editor2 .off .se2_new, #smart_editor2 .off .selected_color, #smart_editor2 .off .se2_lineSticker { -ms-filter: alpha(opacity=50); opacity: .5; cursor: default; filter: alpha(opacity=50); } + +/* LAYER */ +#smart_editor2 .se2_text_tool .se2_layer { display: none; float: left; position: absolute; top: 20px; left: 0; z-index: 50; margin: 0; padding: 0; border: 1px solid #bcbbbb; background: #fafafa; } + +#smart_editor2 .se2_text_tool li.active { z-index: 50; } + +#smart_editor2 .se2_text_tool .active .se2_layer { display: block; } + +#smart_editor2 .se2_text_tool .active li .se2_layer { display: none; } + +#smart_editor2 .se2_text_tool .active .active .se2_layer { display: block; } + +#smart_editor2 .se2_text_tool .se2_layer .se2_in_layer { float: left; margin: 0; padding: 0; border: 1px solid #fff; background: #fafafa; } + +/* TEXT_TOOLBAR */ +#smart_editor2 .se2_text_tool { position: relative; clear: both; z-index: 30; padding: 4px 0 4px 3px; background: #f4f4f4 url("../img/bg_text_tool.gif") 0 0 repeat-x; border-bottom: 1px solid #b5b5b5; *zoom: 1; } + +#smart_editor2 .se2_text_tool:after { content: ""; display: block; clear: both; } + +#smart_editor2 .se2_text_tool ul { float: left; display: inline; margin-right: 3px; padding-left: 1px; white-space: nowrap; } + +#smart_editor2 .se2_text_tool li { _display: inline; float: left; position: relative; z-index: 30; } + +#smart_editor2 .se2_text_tool button, #smart_editor2 .se2_multy .se2_icon { width: 21px; height: 21px; background: url("../img/ko_KR/text_tool_set.png?140317") no-repeat; vertical-align: top; } + +#smart_editor2 .se2_text_tool .se2_font_type { position: relative; } + +#smart_editor2 .se2_text_tool .se2_font_type li { margin-left: 3px; } + +#smart_editor2 .se2_text_tool .se2_font_type button { text-align: left; } + +#smart_editor2 .se2_text_tool .se2_font_type button.se2_font_family span, #smart_editor2 .se2_text_tool .se2_font_type button.se2_font_size span { display: inline-block; visibility: visible; position: static; width: 52px; height: 20px; padding: 0 0 0 6px; font-size: 12px; line-height: 20px; *line-height: 22px; color: #333; *zoom: 1; } + +#smart_editor2 .se2_text_tool .se2_multy { position: absolute; top: 0; right: 0; padding-left: 0; margin-right: 0; white-space: nowrap; border-left: 1px solid #e0dedf; } + +#smart_editor2 .se2_text_tool .se2_multy .se2_mn { float: left; white-space: nowrap; } + +#smart_editor2 .se2_text_tool .se2_multy button { background-image: none; width: 47px; } + +#smart_editor2 .se2_text_tool .se2_multy .se2_icon { display: inline-block; visibility: visible; overflow: visible; position: static; width: 16px; height: 29px; margin: -1px 2px 0 -1px; background-position: 0 -132px; line-height: 30px; vertical-align: top; } + +#smart_editor2 .se2_text_tool .se2_multy button, #smart_editor2 .se2_text_tool .se2_multy button span { height: 29px; line-height: 29px; } + +#smart_editor2 .se2_text_tool .se2_map .se2_icon { background-position: -29px -132px; } + +#smart_editor2 .se2_text_tool button span.se2_mntxt { display: inline-block; visibility: visible; overflow: visible; _overflow-y: hidden; position: relative; *margin-right: -1px; width: auto; height: 29px; font-weight: normal; font-size: 11px; line-height: 30px; *line-height: 29px; _line-height: 30px; color: #444; letter-spacing: -1px; vertical-align: top; } + +#smart_editor2 .se2_text_tool .se2_multy .se2_photo { margin-right: 1px; } + +#smart_editor2 .se2_text_tool .se2_multy .hover .ico_btn { background: #e8e8e8; } + +#smart_editor2 .se2_text_tool .se2_multy .se2_mn.hover { background: #e0dedf; } + +/* TEXT_TOOLBAR : ROUNDING */ +#smart_editor2 ul li.first_child button span.tool_bg, #smart_editor2 ul li.last_child button span.tool_bg, #smart_editor2 ul li.single_child button span.tool_bg { visibility: visible; height: 21px; } + +#smart_editor2 ul li.first_child button span.tool_bg { left: -1px; width: 3px; background: url("../img/bg_button_left.gif?20121228") no-repeat; } + +#smart_editor2 ul li.last_child button span.tool_bg { right: 0px; _right: -1px; width: 2px; background: url("../img/bg_button_right.gif") no-repeat; } + +#smart_editor2 ul li.single_child { padding-right: 1px; } + +#smart_editor2 ul li.single_child button span.tool_bg { left: 0; background: url("../img/bg_button.gif?20121228") no-repeat; width: 22px; } + +#smart_editor2 div.se2_text_tool ul li.hover button span.tool_bg { background-position: 0 -21px; } + +#smart_editor2 div.se2_text_tool ul li.active button span.tool_bg, #smart_editor2 div.se2_text_tool ul li.active li.active button span.tool_bg { background-position: 0 -42px; } + +#smart_editor2 div.se2_text_tool ul li.active li button span.tool_bg { background-position: 0 0; } + +/* TEXT_TOOLBAR : SUB_MENU */ +#smart_editor2 .se2_sub_text_tool { display: none; position: absolute; top: 20px; left: 0; z-index: 40; width: auto; height: 29px; padding: 0 4px 0 0; border: 1px solid #b5b5b5; border-top: 1px solid #9a9a9a; background: #f4f4f4; } + +#smart_editor2 .active .se2_sub_text_tool { display: block; } + +#smart_editor2 .se2_sub_text_tool ul { float: left; height: 25px; margin: 0; padding: 4px 0 0 4px; } + +/* TEXT_TOOLBAR : SUB_MENU_SIZE */ +#smart_editor2 .se2_sub_step1 { width: 88px; } + +#smart_editor2 .se2_sub_step2 { width: 199px; } + +#smart_editor2 .se2_sub_step2_1 { width: 178px; } + +/* TEXT_TOOLBAR : BUTTON */ +#smart_editor2 .se2_text_tool .se2_font_family { width: 70px; height: 21px; background-position: 0 -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_font_family { background-position: 0 -72px; } + +#smart_editor2 .se2_text_tool .active .se2_font_family { background-position: 0 -103px; } + +#smart_editor2 .se2_text_tool .se2_font_size { width: 45px; height: 21px; background-position: -70px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_font_size { background-position: -70px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_font_size { background-position: -70px -103px; } + +#smart_editor2 .se2_text_tool .se2_bold { background-position: -115px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_bold { background-position: -115px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_bold { background-position: -115px -103px; } + +#smart_editor2 .se2_text_tool .se2_underline { background-position: -136px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_underline { background-position: -136px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_underline { background-position: -136px -103px; } + +#smart_editor2 .se2_text_tool .se2_italic { background-position: -157px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_italic { background-position: -157px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_italic { background-position: -157px -103px; } + +#smart_editor2 .se2_text_tool .se2_tdel { background-position: -178px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_tdel { background-position: -178px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_tdel { background-position: -178px -103px; } + +#smart_editor2 .se2_text_tool .se2_fcolor { position: relative; background-position: -199px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_fcolor { background-position: -199px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_fcolor { background-position: -199px -103px; } + +#smart_editor2 .se2_text_tool .se2_fcolor_more { background-position: -220px -10px; width: 10px; } + +#smart_editor2 .se2_text_tool .hover .se2_fcolor_more { background-position: -220px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_fcolor_more { background-position: -220px -103px; } + +#smart_editor2 .se2_text_tool .selected_color { position: absolute; top: 14px; left: 5px; width: 11px; height: 3px; font-size: 0; } + +#smart_editor2 .se2_text_tool .se2_ol, #smart_editor2 .se2_text_tool .active .se2_sub_text_tool .se2_ol { background-position: -345px -10px; } + +#smart_editor2 .se2_text_tool .se2_ul, #smart_editor2 .se2_text_tool .active .se2_sub_text_tool .se2_ul { background-position: -366px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_ol, #smart_editor2 .se2_text_tool .active .se2_sub_text_tool .hover .se2_ol { background-position: -345px -72px; } + +#smart_editor2 .se2_text_tool .hover .se2_ul, #smart_editor2 .se2_text_tool .active .se2_sub_text_tool .hover .se2_ul { background-position: -366px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_ol, #smart_editor2 .se2_text_tool .active .active .se2_ol { background-position: -345px -103px; } + +#smart_editor2 .se2_text_tool .active .se2_ul, #smart_editor2 .se2_text_tool .active .active .se2_ul { background-position: -366px -103px; } + +#smart_editor2 .se2_text_tool .se2_indent, #smart_editor2 .se2_text_tool .active .se2_sub_text_tool .se2_indent { background-position: -408px -10px; } + +#smart_editor2 .se2_text_tool .se2_outdent, #smart_editor2 .se2_text_tool .active .se2_sub_text_tool .se2_outdent { background-position: -387px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_indent, #smart_editor2 .se2_text_tool .active .se2_sub_text_tool .hover .se2_indent { background-position: -408px -72px; } + +#smart_editor2 .se2_text_tool .hover .se2_outdent, #smart_editor2 .se2_text_tool .active .se2_sub_text_tool .hover .se2_outdent { background-position: -387px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_indent, #smart_editor2 .se2_text_tool .active .active .se2_indent { background-position: -408px -103px; } + +#smart_editor2 .se2_text_tool .active .se2_outdent, #smart_editor2 .se2_text_tool .active .active .se2_outdent { background-position: -387px -103px; } + +#smart_editor2 .se2_text_tool .se2_lineheight { background-position: -429px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_lineheight { background-position: -429px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_lineheight { background-position: -429px -103px; } + +#smart_editor2 .se2_text_tool .se2_url { background-position: -513px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_url { background-position: -513px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_url { background-position: -513px -103px; } + +#smart_editor2 .se2_text_tool .se2_bgcolor { position: relative; background-position: -230px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_bgcolor { background-position: -230px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_bgcolor { background-position: -230px -103px; } + +#smart_editor2 .se2_text_tool .se2_bgcolor_more { background-position: -251px -10px; width: 10px; } + +#smart_editor2 .se2_text_tool .hover .se2_bgcolor_more { background-position: -251px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_bgcolor_more { background-position: -251px -103px; } + +#smart_editor2 .se2_text_tool .se2_left { background-position: -261px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_left { background-position: -261px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_left { background-position: -261px -103px; } + +#smart_editor2 .se2_text_tool .se2_center { background-position: -282px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_center { background-position: -282px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_center { background-position: -282px -103px; } + +#smart_editor2 .se2_text_tool .se2_right { background-position: -303px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_right { background-position: -303px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_right { background-position: -303px -103px; } + +#smart_editor2 .se2_text_tool .se2_justify { background-position: -324px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_justify { background-position: -324px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_justify { background-position: -324px -103px; } + +#smart_editor2 .se2_text_tool .se2_blockquote { background-position: -471px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_blockquote { background-position: -471px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_blockquote { background-position: -471px -103px; } + +#smart_editor2 .se2_text_tool .se2_character { background-position: -555px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_character { background-position: -555px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_character { background-position: -555px -103px; } + +#smart_editor2 .se2_text_tool .se2_table { background-position: -576px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_table { background-position: -576px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_table { background-position: -576px -103px; } + +#smart_editor2 .se2_text_tool .se2_find { background-position: -597px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_find { background-position: -597px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_find { background-position: -597px -103px; } + +#smart_editor2 .se2_text_tool .se2_sup { background-position: -660px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_sup { background-position: -660px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_sup { background-position: -660px -103px; } + +#smart_editor2 .se2_text_tool .se2_sub { background-position: -681px -10px; } + +#smart_editor2 .se2_text_tool .hover .se2_sub { background-position: -681px -72px; } + +#smart_editor2 .se2_text_tool .active .se2_sub { background-position: -681px -103px; } + +#smart_editor2 .se2_text_tool .se2_text_tool_more { background-position: 0 -41px; width: 13px; } + +#smart_editor2 .se2_text_tool .se2_text_tool_more span.tool_bg { background: none; } + +#smart_editor2 .se2_text_tool .hover .se2_text_tool_more { background-position: -13px -41px; } + +#smart_editor2 .se2_text_tool .active .se2_text_tool_more { background-position: -26px -41px; } diff --git a/plugin/editor/smarteditor2/css/smart_editor2_in.css b/plugin/editor/smarteditor2/css/smart_editor2_in.css new file mode 100644 index 000000000..9d8fd4a43 --- /dev/null +++ b/plugin/editor/smarteditor2/css/smart_editor2_in.css @@ -0,0 +1,34 @@ +@charset "UTF-8"; +/* NHN Web Standardization Team (http://html.nhndesign.com/) HHJ 090226 */ +/* COMMON */ +body, .se2_inputarea { margin: 0; padding: 0; font-family: '돋움',Dotum,Helvetica,Sans-serif; font-size: 12px; line-height: 1.5; } + +/* body,.se2_inputarea,.se2_inputarea th,.se2_inputarea td{margin:0;padding:0;font-family:'돋움',Dotum,Helvetica,Sans-serif;font-size:12px;line-height:1.5;color:#666} */ +.se2_inputarea p, .se2_inputarea br { margin: 0; padding: 0; } + +.se2_inputarea { margin: 15px; word-wrap: break-word; *word-wrap: normal; *word-break: break-all; } + +.se2_inputarea_890 { width: 741px; margin: 20px 0 10px 64px; } + +.se2_inputarea_698 { width: 548px; margin: 20px 0 10px 64px; } + +/* TEXT_TOOLBAR : QUOTE */ +.se2_quote1 { margin: 0 0 30px 20px; padding: 0 8px; border-left: 2px solid #ccc; color: #888; } + +.se2_quote2 { margin: 0 0 30px 13px; padding: 0 8px 0 16px; background: url("../img/bg_quote2.gif") 0 3px no-repeat; color: #888; } + +.se2_quote3 { margin: 0 0 30px; padding: 12px 10px 11px; border: 1px dashed #ccc; color: #888; } + +.se2_quote4 { margin: 0 0 30px; padding: 12px 10px 11px; border: 1px dashed #66b246; color: #888; } + +.se2_quote5 { margin: 0 0 30px; padding: 12px 10px 11px; border: 1px dashed #ccc; background: #fafafa; color: #888; } + +.se2_quote6 { margin: 0 0 30px; padding: 12px 10px 11px; border: 1px solid #e5e5e5; color: #888; } + +.se2_quote7 { margin: 0 0 30px; padding: 12px 10px 11px; border: 1px solid #66b246; color: #888; } + +.se2_quote8 { margin: 0 0 30px; padding: 12px 10px 11px; border: 1px solid #e5e5e5; background: #fafafa; color: #888; } + +.se2_quote9 { margin: 0 0 30px; padding: 12px 10px 11px; border: 2px solid #e5e5e5; color: #888; } + +.se2_quote10 { margin: 0 0 30px; padding: 12px 10px 11px; border: 2px solid #e5e5e5; background: #fafafa; color: #888; } diff --git a/plugin/editor/smarteditor2/css/smart_editor2_items.css b/plugin/editor/smarteditor2/css/smart_editor2_items.css new file mode 100644 index 000000000..320bbb244 --- /dev/null +++ b/plugin/editor/smarteditor2/css/smart_editor2_items.css @@ -0,0 +1,894 @@ +@charset "UTF-8"; +/* NHN Web Standardization Team (http://html.nhndesign.com/) HHJ 090226 */ +/* TEXT_TOOLBAR : FONTNAME */ +#smart_editor2 .se2_tool .se2_l_font_fam { width: 202px; margin: 0; padding: 0; } + +#smart_editor2 .se2_tool .se2_l_font_fam li { display: block; width: 202px; height: 21px; margin: 0; padding: 0; color: #333; cursor: pointer; } + +#smart_editor2 .se2_l_font_fam .hover, #smart_editor2 .se2_l_font_fam .active { background: #ebebeb; } + +#smart_editor2 .se2_l_font_fam button { width: 200px; height: 21px; margin: 0; padding: 2px 0 2px 0px; background: none; text-align: left; } + +#smart_editor2 .se2_l_font_fam button span { display: block; visibility: visible; overflow: visible; position: relative; top: auto; left: auto; width: auto; height: auto; margin: 0 0 0 4px; padding: 0; font-size: 12px; line-height: normal; color: #333; } + +#smart_editor2 .se2_l_font_fam button span span { display: inline; visibility: visible; overflow: visible; width: auto; height: auto; margin: 0 0 0 4px; font-family: Verdana; font-size: 12px; line-height: 14px; color: #888; } + +#smart_editor2 .se2_l_font_fam button span em { visibility: visible; overflow: auto; position: static; width: auto; height: auto; margin-right: -4px; font-size: 12px; color: #888; } + +#smart_editor2 .se2_l_font_fam .se2_division { width: 162px; height: 2px !important; margin: 1px 0 1px 0px; border: 0; background: url("../img/bg_line1.gif") 0 0 repeat-x; font-size: 0; cursor: default; } + +/* TEXT_TOOLBAR : FONTSIZE */ +#smart_editor2 .se2_tool .se2_l_font_size { width: 302px; margin: 0; padding: 0; } + +#smart_editor2 .se2_tool .se2_l_font_size li { width: 302px; margin: 0; padding: 0; color: #333; cursor: pointer; } + +#smart_editor2 .se2_l_font_size .hover, #smart_editor2 .se2_l_font_size .active { background: #ebebeb; } + +#smart_editor2 .se2_l_font_size button { width: 300px; margin: 0; padding: 2px 0 1px 0px; *padding: 4px 0 1px 0px; background: none; text-align: left; } + +#smart_editor2 .se2_l_font_size button span { display: block; visibility: visible; overflow: visible; position: relative; top: auto; left: auto; width: auto; height: auto; margin: 0 0 0 4px; padding: 0; line-height: normal; color: #373737; letter-spacing: 0px; } + +#smart_editor2 .se2_l_font_size button span span { display: inline; margin: 0 0 0 5px; padding: 0; } + +#smart_editor2 .se2_l_font_size span em { visibility: visible; overflow: auto; position: static; width: auto; height: auto; color: #888; } + +/* TEXT_TOOLBAR : FONTCOLOR */ +#smart_editor2 .se2_palette { float: left; position: relative; width: 225px; margin: 0; padding: 11px 0 10px 0; } + +#smart_editor2 .se2_palette .se2_pick_color { _display: inline; float: left; clear: both; width: 205px; margin: 0 0 0 11px; padding: 0; } + +#smart_editor2 .se2_palette .se2_pick_color li { float: left; width: 12px; height: 12px; margin: 0; padding: 0; } + +#smart_editor2 .se2_palette .se2_pick_color li button { width: 11px; height: 11px; border: 0; } + +#smart_editor2 .se2_palette .se2_pick_color li button span { display: block; visibility: visible; overflow: visible; position: absolute; top: 1px; left: 1px; width: 11px; height: 11px; } + +#smart_editor2 .se2_palette .se2_pick_color li button span span { visibility: hidden; overflow: hidden; position: absolute; top: 0; left: 0; width: 0; height: 0; } + +#smart_editor2 .se2_palette .se2_pick_color .hover button, #smart_editor2 .se2_palette .se2_pick_color .active button { width: 11px; height: 11px; border: 1px solid #666; } + +#smart_editor2 .se2_palette .se2_pick_color .hover span, #smart_editor2 .se2_palette .se2_pick_color .active span { width: 7px; height: 7px; border: 1px solid #fff; } + +#smart_editor2 .se2_palette .se2_view_more { _display: inline; float: left; width: 46px; height: 23px; margin: 1px 0 0 1px; background: url("../img/ko_KR/btn_set.png?130306") 0 -47px no-repeat; } + +#smart_editor2 .se2_palette .se2_view_more2 { _display: inline; float: left; width: 46px; height: 23px; margin: 1px 0 0 1px; background: url("../img/ko_KR/btn_set.png?130306") 0 -24px no-repeat; } + +#smart_editor2 .se2_palette h4 { _display: inline; float: left; width: 203px; margin: 9px 0 0 11px; padding: 10px 0 4px 0; background: url("../img/bg_line1.gif") repeat-x; font-weight: normal; font-size: 12px; line-height: 14px; color: #333; letter-spacing: -1px; } + +#smart_editor2 .se2_palette2 { float: left; _float: none; width: 214px; margin: 9px 0 0 0; padding: 11px 0 0 11px; background: url("../img/bg_line1.gif") repeat-x; } + +#smart_editor2 .se2_palette2 .se2_color_set { float: left; } + +#smart_editor2 .se2_palette2 .se2_selected_color { _display: inline; float: left; width: 83px; height: 18px; margin: 0; border: 1px solid #c7c7c7; background: #fff; } + +#smart_editor2 .se2_palette2 .se2_selected_color span { _display: inline; float: left; width: 79px; height: 14px; margin: 2px; } + +#smart_editor2 .se2_palette2 .input_ty1 { _display: inline; float: left; width: 67px; height: 16px; margin: 0 3px 0 3px; padding: 2px 2px 0 4px; font-family: tahoma; font-size: 11px; } + +#smart_editor2 .se2_palette2 button.se2_btn_insert { float: left; width: 35px; height: 21px; margin-left: 2px; padding: 0; background: url("../img/ko_KR/btn_set.png?130306") -80px 0 no-repeat; } + +#smart_editor2 .se2_gradation1 { float: left; _float: none; width: 201px; height: 128px; margin: 4px 0 0 0; border: 1px solid #c7c7c7; cursor: crosshair; } + +#smart_editor2 .se2_gradation2 { float: left; _float: none; width: 201px; height: 10px; margin: 4px 0 1px 0; border: 1px solid #c7c7c7; cursor: crosshair; } + +/* TEXT_TOOLBAR : BGCOLOR */ +#smart_editor2 .se2_palette_bgcolor { width: 225px; margin: 11px 0 0; padding: 0; } + +#smart_editor2 .se2_palette_bgcolor .se2_background { width: 205px; margin: 0 11px 0 11px; } + +#smart_editor2 .se2_palette_bgcolor .se2_background li { width: 68px; height: 20px; } + +#smart_editor2 .se2_palette_bgcolor .se2_background button { width: 67px; height: 19px; border: 0; } + +#smart_editor2 .se2_palette_bgcolor .se2_background span { left: 0; display: block; visibility: visible; overflow: visible; width: 65px; height: 17px; padding: 0; } + +#smart_editor2 .se2_palette_bgcolor .se2_background span span { display: block; visibility: visible; overflow: visible; width: 64px; height: 16px; padding: 3px 0 0 3px; font-size: 11px; line-height: 14px; text-align: left; } + +#smart_editor2 .se2_palette_bgcolor .se2_background .hover span { width: 65px; height: 17px; border: 1px solid #666; } + +#smart_editor2 .se2_palette_bgcolor .se2_background .hover span span { width: 62px; height: 14px; padding: 1px 0 0 1px; border: 1px solid #fff; } + +/* TEXT_TOOLBAR : LINEHEIGHT */ +#smart_editor2 .se2_l_line_height { width: 107px; margin: 0; padding: 0; } + +#smart_editor2 .se2_l_line_height li { width: 107px; margin: 0; padding: 0; border-top: 0; border-bottom: 0; color: #333; cursor: pointer; } + +#smart_editor2 .se2_l_line_height .hover { background: #ebebeb; } + +#smart_editor2 .se2_l_line_height button { width: 105px; height: 19px; margin: 0; padding: 3px 0 2px 0px; background: none; text-align: left; } + +#smart_editor2 .se2_l_line_height button span { visibility: visible; overflow: visible; position: relative; width: auto; height: auto; margin: 0; padding: 0 0 0 15px; font-size: 12px; line-height: normal; color: #373737; } + +#smart_editor2 .se2_l_line_height li button.active span { background: url("../img/icon_set.gif") 5px -30px no-repeat; } + +#smart_editor2 .se2_l_line_height_user { clear: both; width: 83px; margin: 5px 0 0 12px; padding: 10px 0 0 0; _padding: 11px 0 0 0; background: url("../img/bg_line1.gif") repeat-x; } + +#smart_editor2 .se2_l_line_height_user h3 { margin: 0 0 4px 0; _margin: 0 0 2px -1px; padding: 0; line-height: 14px; color: #000; letter-spacing: -1px; } + +#smart_editor2 .se2_l_line_height_user .bx_input { display: block; position: relative; width: 83px; } + +#smart_editor2 .se2_l_line_height_user .btn_up { position: absolute; top: 2px; *top: 3px; left: 68px; width: 13px; height: 8px; background: url("../img/ko_KR/btn_set.png?130306") -86px -54px no-repeat; } + +#smart_editor2 .se2_l_line_height_user .btn_down { position: absolute; top: 10px; *top: 11px; left: 68px; width: 13px; height: 8px; background: url("../img/ko_KR/btn_set.png?130306") -86px -62px no-repeat; } + +#smart_editor2 .se2_l_line_height_user .btn_area { margin: 5px 0 10px 0; } + +#smart_editor2 .se2_tool .btn_area .se2_btn_apply3 { width: 41px; height: 24px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat; } + +#smart_editor2 .se2_tool .btn_area .se2_btn_cancel3 { width: 39px; height: 24px; margin-left: 3px; background: url("../img/ko_KR/btn_set.png?130306") -41px 0 no-repeat; } + +/* TEXT_TOOLBAR : QUOTE */ +#smart_editor2 .se2_quote { width: 425px; height: 56px; } + +#smart_editor2 .se2_quote ul { _display: inline; float: left; margin: 11px 0 0 9px; padding: 0; } + +#smart_editor2 .se2_quote li { _display: inline; float: left; margin: 0 0 0 2px; padding: 0; } + +#smart_editor2 .se2_quote button { width: 34px; height: 34px; margin: 0; padding: 0; background: url("../img/ko_KR/btn_set.png?130306") no-repeat; cursor: pointer; } + +#smart_editor2 .se2_quote button span { left: 0; display: block; visibility: visible; overflow: visible; width: 32px; height: 32px; margin: 0; padding: 0; border: 1px solid #c7c7c7; } + +#smart_editor2 .se2_quote button span span { visibility: hidden; overflow: hidden; position: absolute; top: 0; left: 0; width: 0; height: 0; margin: 0; padding: 0; } + +#smart_editor2 .se2_quote .se2_quote1 { background-position: 1px -375px; } + +#smart_editor2 .se2_quote .se2_quote2 { background-position: -32px -375px; } + +#smart_editor2 .se2_quote .se2_quote3 { background-position: -65px -375px; } + +#smart_editor2 .se2_quote .se2_quote4 { background-position: -98px -375px; } + +#smart_editor2 .se2_quote .se2_quote5 { background-position: -131px -375px; } + +#smart_editor2 .se2_quote .se2_quote6 { background-position: -164px -375px; } + +#smart_editor2 .se2_quote .se2_quote7 { background-position: -197px -375px; } + +#smart_editor2 .se2_quote .se2_quote8 { background-position: -230px -375px; } + +#smart_editor2 .se2_quote .se2_quote9 { background-position: -263px -375px; } + +#smart_editor2 .se2_quote .se2_quote10 { background-position: -296px -375px; } + +#smart_editor2 .se2_quote .hover button span, #smart_editor2 .se2_quote .active button span { width: 30px; height: 30px; margin: 0; padding: 0; border: 2px solid #44b525; } + +#smart_editor2 .se2_quote .hover button span span, #smart_editor2 .se2_quote .active button span span { visibility: hidden; overflow: hidden; position: absolute; top: 0; left: 0; width: 0; height: 0; margin: 0; padding: 0; } + +#smart_editor2 .se2_quote .se2_cancel2 { float: left; width: 40px; height: 35px; margin: 11px 0 0 5px; background: url("../img/ko_KR/btn_set.png?130306") -46px -24px no-repeat; } + +#smart_editor2 .se2_quote .se2_cancel2 span { visibility: hidden; overflow: hidden; position: absolute; top: 0; left: 0; width: 0; height: 0; margin: 0; padding: 0; } + +/* TEXT_TOOLBAR : HYPERLINK */ +#smart_editor2 .se2_url2 { width: 281px; padding: 11px 11px 6px 11px; color: #666; } + +#smart_editor2 .se2_url2 .input_ty1 { display: block; width: 185px; height: 16px; margin: 0 5px 5px 0; *margin: -1px 5px 5px 0; padding: 5px 2px 0 4px; } + +#smart_editor2 .se2_url2 .se2_url_new { width: 15px; height: 15px; margin: -1px 3px 1px -1px; *margin: -2px 3px 2px -1px; vertical-align: middle; } + +#smart_editor2 .se2_url2 label { font-size: 11px; line-height: 14px; vertical-align: middle; } + +#smart_editor2 .se2_url2 .se2_apply { position: absolute; top: 13px; right: 51px; width: 41px; height: 24px; margin: -1px 3px 1px 0; background: url("../img/ko_KR/btn_set.png?130306") no-repeat; } + +#smart_editor2 .se2_url2 .se2_cancel { position: absolute; top: 13px; right: 9px; width: 39px; height: 24px; margin: -1px 3px 1px 0; background: url("../img/ko_KR/btn_set.png?130306") -41px 0 no-repeat; } + +/* TEXT_TOOLBAR : SCHARACTER */ +#smart_editor2 .se2_bx_character { width: 469px; height: 272px; margin: 0; padding: 0; background: url("../img/ko_KR/bx_set_110302.gif") 9px -1230px no-repeat; } + +#smart_editor2 .se2_bx_character .se2_char_tab { _display: inline; float: left; position: relative; width: 443px; margin: 11px 10px 200px 11px; padding: 0 0 0 1px; } + +#smart_editor2 .se2_bx_character .se2_char_tab li { position: static; margin: 0 0 0 -1px; padding: 0; } + +#smart_editor2 .se2_bx_character .se2_char1 { width: 76px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") 0 -204px no-repeat; } + +#smart_editor2 .se2_bx_character .se2_char2 { width: 86px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -75px -204px no-repeat; } + +#smart_editor2 .se2_bx_character .se2_char3 { width: 68px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -160px -204px no-repeat; } + +#smart_editor2 .se2_bx_character .se2_char4 { width: 55px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -227px -204px no-repeat; } + +#smart_editor2 .se2_bx_character .se2_char5 { width: 97px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -281px -204px no-repeat; } + +#smart_editor2 .se2_bx_character .se2_char6 { width: 66px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -377px -204px no-repeat; } + +#smart_editor2 .se2_bx_character .active .se2_char1 { width: 76px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") 0 -230px no-repeat; } + +#smart_editor2 .se2_bx_character .active .se2_char2 { width: 86px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -75px -230px no-repeat; } + +#smart_editor2 .se2_bx_character .active .se2_char3 { width: 68px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -160px -230px no-repeat; } + +#smart_editor2 .se2_bx_character .active .se2_char4 { width: 55px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -227px -230px no-repeat; } + +#smart_editor2 .se2_bx_character .active .se2_char5 { width: 97px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -281px -230px no-repeat; } + +#smart_editor2 .se2_bx_character .active .se2_char6 { width: 66px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -377px -230px no-repeat; } + +#smart_editor2 .se2_bx_character .se2_s_character { display: none; position: absolute; top: 26px; left: 0; width: 448px; height: 194px; margin: 0; padding: 0; } + +#smart_editor2 .se2_bx_character .active .se2_s_character { display: block; } + +#smart_editor2 .se2_bx_character .se2_s_character ul { float: left; width: 422px; height: 172px; margin: 0; padding: 9px 0 0 11px; } + +#smart_editor2 .se2_bx_character .se2_s_character li { _display: inline; float: left; position: relative; width: 20px; height: 18px; margin: 0 0 1px 1px; background: #fff; } + +#smart_editor2 .se2_bx_character .se2_s_character button { width: 20px; height: 18px; margin: 0; padding: 2px; background: none; } + +#smart_editor2 .se2_bx_character .se2_s_character .hover, #smart_editor2 .se2_bx_character .se2_s_character .active { background: url("../img/ko_KR/btn_set.png?130306") -446px -274px no-repeat; } + +#smart_editor2 .se2_bx_character .se2_s_character button span { left: 0; display: block; visibility: visible; overflow: visible; width: 14px; height: 16px; margin: 3px 0 0 3px; border: 0; background: none; font-size: 12px; line-height: normal; } + +#smart_editor2 .se2_apply_character { clear: both; position: relative; padding: 0 0 0 11px; } + +#smart_editor2 .se2_apply_character label { margin: 0 3px 0 0; font-size: 12px; color: #666; letter-spacing: -1px; } + +#smart_editor2 .se2_apply_character .input_ty1 { width: 283px; height: 17px; margin: -1px 5px 1px 0; padding: 4px 0 0 5px; font-size: 12px; color: #666; letter-spacing: 0; vertical-align: middle; } + +#smart_editor2 .se2_apply_character .se2_confirm { width: 41px; height: 24px; margin-right: 3px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat; vertical-align: middle; } + +#smart_editor2 .se2_apply_character .se2_cancel { width: 39px; height: 24px; background: url("../img/ko_KR/btn_set.png?130306") -41px 0 no-repeat; vertical-align: middle; } + +/* TEXT_TOOLBAR : TABLECREATOR */ +#smart_editor2 .se2_table_set { position: relative; width: 166px; margin: 3px 11px 0 11px; padding: 8px 0 0 0; } + +#smart_editor2 .se2_table_set .se2_cell_num { float: left; width: 73px; } + +#smart_editor2 .se2_table_set .se2_cell_num dt { float: left; clear: both; width: 17px; height: 23px; margin: 0; padding: 0; } + +#smart_editor2 .se2_table_set .se2_cell_num dt label { display: block; margin: 5px 0 0 0; font-size: 11px; color: #666; } + +#smart_editor2 .se2_table_set .se2_cell_num dd { float: left; position: relative; width: 54px; height: 23px; margin: 0; padding: 0; } + +#smart_editor2 .se2_table_set .se2_cell_num .input_ty2 { display: block; width: 32px; height: 16px; *margin: -1px 0 0 0; padding: 2px 19px 0 0px; border: 1px solid #c7c7c7; font-family: tahoma,verdana,times New Roman; font-size: 11px; color: #666; text-align: right; } + +#smart_editor2 .se2_table_set .se2_cell_num .input_ty2::-ms-clear { display: none; } + +#smart_editor2 .se2_table_set .se2_pre_table { float: right; width: 91px; height: 43px; background: #c7c7c7; border-spacing: 1px; } + +#smart_editor2 .se2_table_set .se2_pre_table tr { background: #fff; } + +#smart_editor2 .se2_table_set .se2_pre_table td { font-size: 0; line-height: 0; } + +#smart_editor2 .se2_table_set .se2_add { position: absolute; top: 2px; right: 3px; width: 13px; height: 8px; background: url("../img/ko_KR/btn_set.png?130306") -86px -54px no-repeat; } + +#smart_editor2 .se2_table_set .se2_del { position: absolute; top: 10px; right: 3px; width: 13px; height: 8px; background: url("../img/ko_KR/btn_set.png?130306") -86px -62px no-repeat; } + +/* TEXT_TOOLBAR : TABLEEDITOR */ +#smart_editor2 .se2_table_set .se2_t_proper1 { float: left; width: 166px; margin: 7px 0 0 0; padding: 10px 0 5px; background: url("../img/bg_line1.gif") repeat-x; } + +#smart_editor2 .se2_table_set .se2_t_proper1 dt { width: 166px; margin: 0 0 6px 0; } + +#smart_editor2 .se2_table_set .se2_t_proper1 dd { width: 166px; } + +#smart_editor2 .se2_table_set .se2_t_proper1 dt input { width: 15px; height: 15px; margin: -1px 3px 1px 0; _margin: -2px 3px 2px 0; vertical-align: middle; } + +#smart_editor2 .se2_table_set .se2_t_proper1 dt label { font-weight: bold; font-size: 11px; color: #666; letter-spacing: -1px; vertical-align: middle; } + +#smart_editor2 .se2_table_set .se2_t_proper1_1 { float: left; position: relative; z-index: 59; width: 166px; margin: 1px 0 0 0; } + +#smart_editor2 .se2_table_set .se2_t_proper1_2 { z-index: 54; margin: 0; } + +#smart_editor2 .se2_table_set .se2_t_proper1_3 { z-index: 53; margin: 0; } + +#smart_editor2 .se2_table_set .se2_t_proper1_4 { z-index: 52; margin: 0; } + +#smart_editor2 .se2_table_set .se2_t_proper1_1 dt { _display: inline; float: left; clear: both; width: 66px; height: 22px; margin: 1px 0 0 18px; } + +#smart_editor2 .se2_table_set .se2_t_proper1_1 dt label { display: block; margin: 4px 0 0 0; font-weight: normal; font-size: 11px; color: #666; letter-spacing: -1px; } + +#smart_editor2 .se2_table_set .se2_t_proper1_1 dd { float: left; position: relative; width: 82px; height: 23px; } + +#smart_editor2 .se2_table_set .se2_t_proper1_1 .input_ty1 { width: 72px; height: 16px; *margin: -1px 0 0 0; padding: 2px 2px 0 6px; font-family: tahoma,verdana,times New Roman; font-size: 11px; color: #666; } + +#smart_editor2 .se2_table_set .se2_t_proper1_1 .input_ty3 { float: left; width: 49px; height: 16px; margin: 0 3px 0 0; padding: 2px 4px 0 4px; border: 1px solid #c7c7c7; font-family: tahoma,verdana,times New Roman; font-size: 11px; color: #666; } + +#smart_editor2 .se2_table_set .se2_t_proper1_1 .se2_add { top: 2px; right: 2px; } + +#smart_editor2 .se2_table_set .se2_t_proper1_1 .se2_del { top: 10px; right: 2px; } + +#smart_editor2 .se2_table_set .se2_t_proper1_1 .se2_color_set .input_ty1 { _display: inline; float: left; width: 67px; height: 16px; margin: 0 3px 0 3px; padding: 2px 2px 0 4px; font-family: tahoma,verdana,times New Roman; font-size: 11px; } + +#smart_editor2 .se2_select_ty1 { position: relative; width: 80px; height: 18px; border: 1px solid #c7c7c7; background: #fff; font-size: 11px; line-height: 14px; text-align: left; } + +#smart_editor2 .se2_select_ty1 span { float: left; width: 54px; height: 18px; margin: 0 0 0 5px; font-size: 11px; line-height: 14px; color: #666; } + +#smart_editor2 .se2_select_ty1 .se2_b_style0 { position: relative; top: 3px; left: -3px; white-space: nowrap; } + +#smart_editor2 .se2_select_ty1 .se2_b_style1 { height: 15px; margin: 3px 0 0 4px; font-size: 11px; line-height: 14px; color: #666; letter-spacing: -1px; } + +#smart_editor2 .se2_select_ty1 .se2_b_style2 { background: url("../img/bg_set.gif") 0 -50px repeat-x; } + +#smart_editor2 .se2_select_ty1 .se2_b_style3 { background: url("../img/bg_set.gif") 0 -68px repeat-x; } + +#smart_editor2 .se2_select_ty1 .se2_b_style4 { background: url("../img/bg_set.gif") 0 -85px repeat-x; } + +#smart_editor2 .se2_select_ty1 .se2_b_style5 { background: url("../img/bg_set.gif") 0 -103px repeat-x; } + +#smart_editor2 .se2_select_ty1 .se2_b_style6 { background: url("../img/bg_set.gif") 0 -121px repeat-x; } + +#smart_editor2 .se2_select_ty1 .se2_b_style7 { background: url("../img/bg_set.gif") 0 -139px repeat-x; } + +#smart_editor2 .se2_select_ty1 .se2_view_more { position: absolute; top: 1px; right: 1px; width: 13px; height: 16px; background: url("../img/ko_KR/btn_set.png?130306") -112px -54px no-repeat; } + +#smart_editor2 .se2_select_ty1 .se2_view_more2 { position: absolute; top: 1px; right: 1px; width: 13px; height: 16px; background: url("../img/ko_KR/btn_set.png?130306") -99px -54px no-repeat; } + +/* TEXT_TOOLBAR : TABLEEDITOR > BORDER */ +#smart_editor2 .se2_table_set .se2_b_t_b1 { border-top: 1px solid #b1b1b1; } + +#smart_editor2 .se2_layer_b_style { position: absolute; top: 20px; right: 0px; width: 80px; padding-bottom: 1px; border: 1px solid #c7c7c7; border-top: 1px solid #a8a8a8; background: #fff; } + +#smart_editor2 .se2_layer_b_style ul { width: 80px; margin: 0; padding: 1px 0 0 0; } + +#smart_editor2 .se2_layer_b_style li { width: 80px; height: 18px; margin: 0; padding: 0; } + +#smart_editor2 .se2_layer_b_style .hover, #smart_editor2 .se2_layer_b_style .active { background: #ebebeb; } + +#smart_editor2 .se2_layer_b_style button { width: 80px; height: 18px; background: none; } + +#smart_editor2 .se2_layer_b_style button span { left: 0; display: block; visibility: visible; overflow: visible; width: 71px; height: 18px; margin: 0 0 0 5px; font-size: 11px; line-height: 15px; text-align: left; } + +#smart_editor2 .se2_layer_b_style button span span { visibility: hidden; overflow: hidden; position: absolute; top: 0; left: 0; width: 0; height: 0; } + +#smart_editor2 .se2_layer_b_style .se2_b_style1 span { margin: 3px 0 0 4px; font-size: 11px; line-height: 14px; color: #666; letter-spacing: -1px; } + +#smart_editor2 .se2_layer_b_style .se2_b_style2 span { background: url("../img/bg_set.gif") 0 -50px repeat-x; } + +#smart_editor2 .se2_layer_b_style .se2_b_style3 span { background: url("../img/bg_set.gif") 0 -68px repeat-x; } + +#smart_editor2 .se2_layer_b_style .se2_b_style4 span { background: url("../img/bg_set.gif") 0 -86px repeat-x; } + +#smart_editor2 .se2_layer_b_style .se2_b_style5 span { background: url("../img/bg_set.gif") 0 -103px repeat-x; } + +#smart_editor2 .se2_layer_b_style .se2_b_style6 span { background: url("../img/bg_set.gif") 0 -121px repeat-x; } + +#smart_editor2 .se2_layer_b_style .se2_b_style7 span { background: url("../img/bg_set.gif") 0 -139px repeat-x; } + +/* TEXT_TOOLBAR : TABLEEDITOR > COLOR */ +#smart_editor2 .se2_pre_color { float: left; width: 18px; height: 18px; border: 1px solid #c7c7c7; } + +#smart_editor2 .se2_pre_color button { float: left; width: 14px; height: 14px; margin: 2px 0 0 2px; padding: 0; } + +#smart_editor2 .se2_pre_color button span { overflow: hidden; position: absolute; top: -10000px; left: -10000px; z-index: -100; width: 0; height: 0; } + +/* TEXT_TOOLBAR : TABLEEDITOR > DIMMED */ +#smart_editor2 .se2_table_set .se2_t_dim1 { clear: both; position: absolute; top: 71px; left: 16px; z-index: 60; width: 157px; height: 118px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_table_set .se2_t_dim2 { position: absolute; top: 116px; left: 16px; z-index: 55; width: 157px; height: 45px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_table_set .se2_t_dim3 { clear: both; position: absolute; top: 192px; left: 16px; z-index: 51; width: 157px; height: 39px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +/* TEXT_TOOLBAR : TABLEEDITOR > STYLE PREVIEW */ +#smart_editor2 .se2_table_set .se2_t_proper2 { float: left; position: relative; z-index: 50; width: 166px; margin: 2px 0 0 0; } + +#smart_editor2 .se2_table_set .se2_t_proper2 dt { float: left; width: 84px; height: 33px; margin: 4px 0 0 0; } + +#smart_editor2 .se2_table_set .se2_t_proper2 dt input { width: 15px; height: 15px; margin: -1px 3px 1px 0; _margin: -2px 3px 2px 0; vertical-align: middle; } + +#smart_editor2 .se2_table_set .se2_t_proper2 dt label { font-weight: bold; font-size: 11px; color: #666; letter-spacing: -1px; vertical-align: middle; } + +#smart_editor2 .se2_table_set .se2_t_proper2 dd { float: left; width: 66px; height: 33px; } + +#smart_editor2 .se2_select_ty2 { position: relative; width: 65px; height: 31px; border: 1px solid #c7c7c7; background: #fff; font-size: 11px; line-height: 14px; text-align: left; } + +#smart_editor2 .se2_select_ty2 span { float: left; width: 45px; height: 25px; margin: 3px 0 0 3px; background: url("../img/ko_KR/btn_set.png?130306") repeat-x; } + +#smart_editor2 .se2_select_ty2 .se2_t_style1 { background-position: 0 -410px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style2 { background-position: -46px -410px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style3 { background-position: -92px -410px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style4 { background-position: -138px -410px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style5 { background-position: -184px -410px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style6 { background-position: -230px -410px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style7 { background-position: -276px -410px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style8 { background-position: -322px -410px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style9 { background-position: 0 -436px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style10 { background-position: -46px -436px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style11 { background-position: -92px -436px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style12 { background-position: -138px -436px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style13 { background-position: -184px -436px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style14 { background-position: -230px -436px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style15 { background-position: -276px -436px; } + +#smart_editor2 .se2_select_ty2 .se2_t_style16 { background-position: -322px -436px; } + +#smart_editor2 .se2_select_ty2 .se2_view_more { position: absolute; top: 1px; right: 1px; _right: 0px; width: 13px !important; height: 29px !important; background: url("../img/ko_KR/btn_set.png?130306") -353px -48px no-repeat !important; } + +#smart_editor2 .se2_select_ty2 .se2_view_more2 { position: absolute; top: 1px; right: 1px; _right: 0px; width: 13px !important; height: 29px !important; background: url("../img/ko_KR/btn_set.png?130306") -340px -48px no-repeat !important; } + +#smart_editor2 .se2_select_ty2 .se2_view_more span { display: none; } + +/* TEXT_TOOLBAR : TABLEEDITOR > STYLE */ +#smart_editor2 .se2_layer_t_style { position: absolute; top: 33px; right: 15px; width: 208px; border: 1px solid #c7c7c7; border-top: 1px solid #a8a8a8; background: #fff; } + +#smart_editor2 .se2_layer_t_style ul { width: 204px; height: 126px; margin: 1px 2px; padding: 1px 0 0 0; background: #fff; } + +#smart_editor2 .se2_layer_t_style li { _display: inline; float: left; width: 45px; height: 25px; margin: 1px; padding: 1px; border: 1px solid #fff; } + +#smart_editor2 .se2_layer_t_style .hover, #smart_editor2 .se2_layer_t_style .active { border: 1px solid #666; background: #fff; } + +#smart_editor2 .se2_layer_t_style button { width: 45px; height: 25px; background: url("../img/ko_KR/btn_set.png?130306") repeat-x !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style1 { background-position: 0 -410px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style2 { background-position: -46px -410px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style3 { background-position: -92px -410px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style4 { background-position: -138px -410px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style5 { background-position: -184px -410px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style6 { background-position: -230px -410px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style7 { background-position: -276px -410px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style8 { background-position: -322px -410px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style9 { background-position: 0 -436px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style10 { background-position: -46px -436px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style11 { background-position: -92px -436px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style12 { background-position: -138px -436px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style13 { background-position: -184px -436px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style14 { background-position: -230px -436px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style15 { background-position: -276px -436px !important; } + +#smart_editor2 .se2_layer_t_style .se2_t_style16 { background-position: -322px -436px !important; } + +#smart_editor2 .se2_table_set .se2_btn_area { float: left; width: 166px; margin: 6px 0 0 0; padding: 12px 0 8px 0; background: url("../img/bg_line1.gif") repeat-x; text-align: center; } + +#smart_editor2 .se2_table_set button.se2_apply { width: 41px; height: 24px; margin-right: 3px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat; } + +#smart_editor2 .se2_table_set button.se2_cancel { width: 39px; height: 24px; background: url("../img/ko_KR/btn_set.png?130306") -41px 0 no-repeat; } + +#smart_editor2 .se2_table_set .se2_rd { width: 14px; height: 14px; vertical-align: middle; } + +#smart_editor2 .se2_table_set .se2_celltit { font-size: 11px; font-size: 11px; color: #666; letter-spacing: -1px; } + +#smart_editor2 .se2_table_set dt label.se2_celltit { display: inline; } + +/* TEXT_TOOLBAR : FINDREPLACE */ +#smart_editor2 .se2_bx_find_revise { position: relative; width: 255px; margin: 0; padding: 0; } + +#smart_editor2 .se2_bx_find_revise .se2_close { position: absolute; top: 5px; right: 8px; width: 20px; height: 20px; background: url("../img/ko_KR/btn_set.png?130306") -151px -1px no-repeat; } + +#smart_editor2 .se2_bx_find_revise h3 { margin: 0; padding: 10px 0 13px 10px; background: url("../img/bg_find_h3.gif") 0 -1px repeat-x; font-size: 12px; line-height: 14px; letter-spacing: -1px; } + +#smart_editor2 .se2_bx_find_revise ul { position: relative; margin: 8px 0 0 0; padding: 0 0 0 12px; } + +#smart_editor2 .se2_bx_find_revise ul li { _display: inline; float: left; position: static; margin: 0 0 0 -1px; padding: 0; } + +#smart_editor2 .se2_bx_find_revise .se2_tabfind { width: 117px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") 0 -100px no-repeat; } + +#smart_editor2 .se2_bx_find_revise .se2_tabrevise { width: 117px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -116px -100px no-repeat; } + +#smart_editor2 .se2_bx_find_revise .active .se2_tabfind { width: 117px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") 0 -126px no-repeat; } + +#smart_editor2 .se2_bx_find_revise .active .se2_tabrevise { width: 117px; height: 26px; background: url("../img/ko_KR/btn_set.png?130306") -116px -126px no-repeat; } + +#smart_editor2 .se2_bx_find_revise .se2_in_bx_find dl { _display: inline; float: left; width: 223px; margin: 0 0 0 9px; padding: 7px 0 13px 14px; background: url("../img/ko_KR/bx_set_110302.gif") -289px -1518px no-repeat; } + +#smart_editor2 .se2_bx_find_revise .se2_in_bx_revise dl { _display: inline; float: left; width: 223px; margin: 0 0 0 9px; padding: 7px 0 13px 14px; background: url("../img/ko_KR/bx_set_110302.gif") -289px -1619px no-repeat; } + +#smart_editor2 .se2_bx_find_revise dt { _display: inline; float: left; clear: both; width: 47px; margin: 1px 0 2px 0; } + +#smart_editor2 .se2_bx_find_revise dd { float: left; margin: 0 0 2px 0; } + +#smart_editor2 .se2_bx_find_revise label { float: left; padding: 5px 0 0 0; font-size: 11px; color: #666; letter-spacing: -2px; } + +#smart_editor2 .se2_bx_find_revise input { float: left; width: 155px; height: 12px; margin: 1px 0 0 0; padding: 3px 2px 3px 4px; font-size: 12px; color: #666; } + +#smart_editor2 .se2_bx_find_revise .se2_find_btns { float: left; clear: both; width: 255px; padding: 8px 0 10px 0; text-align: center; } + +#smart_editor2 .se2_bx_find_revise .se2_find_next { width: 65px; height: 24px; margin: 0 3px 0 0; background: url("../img/ko_KR/btn_set.png?130306") -180px -48px no-repeat; } + +#smart_editor2 .se2_bx_find_revise .se2_find_next2 { width: 61px; height: 24px; margin: 0 3px 0 0; background: url("../img/ko_KR/btn_set.png?130306") -180px -24px no-repeat; } + +#smart_editor2 .se2_bx_find_revise .se2_revise1 { width: 54px; height: 24px; margin: 0 3px 0 0; background: url("../img/ko_KR/btn_set.png?130306") -245px -48px no-repeat; } + +#smart_editor2 .se2_bx_find_revise .se2_revise2 { width: 70px; height: 24px; margin: 0 3px 0 0; background: url("../img/ko_KR/btn_set.png?130306") -245px -24px no-repeat; } + +#smart_editor2 .se2_bx_find_revise .se2_cancel { width: 39px; height: 24px; background: url("../img/ko_KR/btn_set.png?130306") -41px 0 no-repeat; } + +/* TEXT_TOOLBAR : QUICKEDITOR_TABLE */ +#smart_editor2 .se2_qmax { position: absolute; width: 18px; height: 18px; background: url("../img/ko_KR/btn_set.png?130306") -339px -169px no-repeat; } + +#smart_editor2 .se2_qeditor { position: absolute; top: 0; left: 0; width: 183px; margin: 0; padding: 0; border: 1px solid #c7c7c7; border-right: 1px solid #ababab; border-bottom: 1px solid #ababab; background: #fafafa; } + +#smart_editor2 .se2_qeditor label, #smart_editor2 .se2_qeditor span, #smart_editor2 .se2_qeditor dt { font-size: 11px; color: #666; letter-spacing: -1px; } + +#smart_editor2 .se2_qbar { position: relative; width: 183px; height: 11px; background: url("../img/ko_KR/bx_set_110302.gif") 0 -731px no-repeat; } + +#smart_editor2 .se2_qbar .se2_qmini { position: absolute; top: -1px; right: 0; *right: -1px; _right: -3px; width: 18px; height: 14px; background: url("../img/ko_KR/btn_set.png?130306") -315px -170px no-repeat; } + +#smart_editor2 .se2_qbar .se2_qmini button { width: 20px; height: 14px; margin-top: -1px; } + +#smart_editor2 .se2_qeditor .se2_qbody0 { float: left; border: 1px solid #fefefe; } + +#smart_editor2 .se2_qeditor .se2_qbody { position: relative; z-index: 90; width: 174px; padding: 4px 0 0 7px; } + +#smart_editor2 .se2_qeditor .se2_qe1 { overflow: hidden; width: 174px; } + +#smart_editor2 .se2_qeditor .se2_qe1 dt { float: left; width: 22px; height: 18px; padding: 4px 0 0 0; } + +#smart_editor2 .se2_qeditor .se2_qe1 dd { float: left; width: 65px; height: 22px; } + +#smart_editor2 .se2_qeditor .se2_addrow { width: 28px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -385px -49px; } + +#smart_editor2 .se2_qeditor .se2_addcol { width: 29px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -413px -49px; } + +#smart_editor2 .se2_qeditor .se2_seprow { width: 28px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -385px -68px; } + +#smart_editor2 .se2_qeditor .se2_sepcol { width: 29px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -413px -68px; } + +#smart_editor2 .se2_qeditor .se2_delrow { width: 28px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -385px -106px; } + +#smart_editor2 .se2_qeditor .se2_delcol { width: 29px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -413px -106px; } + +#smart_editor2 .se2_qeditor .se2_merrow { width: 57px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -385px -125px; } + +#smart_editor2 .se2_qeditor .se2_mercol { width: 57px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -413px -125px; } + +#smart_editor2 .se2_qeditor .se2_seprow_off { width: 28px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -385px -87px; } + +#smart_editor2 .se2_qeditor .se2_sepcol_off { width: 29px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -413px -87px; } + +#smart_editor2 .se2_qeditor .se2_merrow_off { width: 57px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -385px -144px; } + +#smart_editor2 .se2_qeditor .se2_mercol_off { width: 57px; height: 19px; background: url("../img/ko_KR/btn_set.png?130306") no-repeat -413px -144px; } + +/* TEXT_TOOLBAR : QUICKEDITOR_TABLE > CELL_BACKGROUND */ +#smart_editor2 .se2_qeditor .se2_qe2 { _display: inline; float: left; position: relative; z-index: 100; width: 165px; margin: 2px 0 0 1px; padding: 7px 0 0 0; background: url("../img/bg_line1.gif") repeat-x; zoom: 1; } + +#smart_editor2 .se2_qeditor .se2_qe2_1 dt { float: left; width: 62px; padding: 3px 0 0 0; } + +#smart_editor2 .se2_qeditor .se2_qe2_1 dt input { width: 15px; height: 15px; margin: -1px 1px 1px -1px; vertical-align: middle; } + +#smart_editor2 .se2_qeditor .se2_qe2_1 dd { float: left; position: relative; zoom: 1; } + +#smart_editor2 .se2_qeditor .se2_qe2_3 { padding: 7px 0 6px 0; } + +/* My글양식 없을때 */ +#smart_editor2 .se2_qeditor .se2_qe2_2 { position: relative; _position: absolute; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 dt { float: left; width: 50px; padding: 3px 0 0 13px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 dt input { width: 15px; height: 15px; margin: -1px 2px 1px -1px; vertical-align: middle; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 dd { float: left; } + +/* TEXT_TOOLBAR : QUICKEDITOR_TABLE > STYLE */ +#smart_editor2 .se2_table_set .se2_qbody .se2_t_proper2 { float: left; *float: none; position: static; width: 166px; margin: 5px 0 0 1px; } + +#smart_editor2 .se2_qeditor .se2_qe3 dt { float: left; width: 62px; padding: 0; } + +#smart_editor2 .se2_qeditor .se2_qe3 dt label { font-weight: normal; } + +#smart_editor2 .se2_qeditor .se2_qe3 dt input { width: 15px; height: 15px; margin: -1px 1px 1px -1px; vertical-align: middle; } + +#smart_editor2 .se2_qeditor .se2_qe3 dd .se2_qe3_table { position: relative; } + +/* TEXT_TOOLBAR : QUICKEDITOR_TABLE > CELL_BACKGROUND PREWVIEW */ +#smart_editor2 .se2_qeditor .se2_pre_color { float: left; width: 18px; height: 18px; border: 1px solid #c7c7c7; } + +#smart_editor2 .se2_qeditor .se2_pre_color button { float: left; width: 14px; height: 14px; margin: 2px 0 0 2px; padding: 0; } + +#smart_editor2 .se2_qeditor .se2_pre_color button span { overflow: hidden; position: absolute; top: -10000px; left: -10000px; z-index: -100; width: 0; height: 0; } + +/* TEXT_TOOLBAR : QUICKEDITOR_TABLE > CELL_BACKGROUND LAYER */ +#smart_editor2 .se2_qeditor .se2_layer { float: left; clear: both; position: absolute; top: 20px; left: 0; margin: 0; padding: 0; border: 1px solid #c7c7c7; border-top: 1px solid #9a9a9a; background: #fafafa; } + +#smart_editor2 .se2_qeditor .se2_layer .se2_in_layer { float: left; margin: 0; padding: 0; border: 1px solid #fff; background: #fafafa; } + +#smart_editor2 .se2_qeditor .se2_layer button { vertical-align: top; } + +#smart_editor2 .se2_qeditor .se2_layer .se2_pick_color li { position: relative; } + +/* TEXT_TOOLBAR : QUICKEDITOR_TABLE > CELL_BACKGROUND IMAGE */ +#smart_editor2 .se2_qeditor .se2_pre_bgimg { float: left; width: 14px; height: 14px; padding: 2px; border: 1px solid #c7c7c7; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 button { width: 16px; height: 16px; background: url("../img/ko_KR/btn_set.png?130306") 0 -261px no-repeat; } + +/* TEXT_TOOLBAR : QUICKEDITOR_TABLE > CELL_BACKGROUND IMAGE LAYER */ +#smart_editor2 .se2_cellimg_set { _display: inline; float: left; width: 136px; margin: 4px 3px 0 4px; padding-bottom: 4px; } + +#smart_editor2 .se2_cellimg_set li { _display: inline; float: left; width: 16px; height: 16px; margin: 0 1px 1px 0; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg0 { background-position: -255px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg1 { background-position: 0 -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg2 { background-position: -17px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg3 { background-position: -34px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg4 { background-position: -51px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg5 { background-position: -68px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg6 { background-position: -85px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg7 { background-position: -102px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg8 { background-position: -119px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg9 { background-position: -136px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg10 { background-position: -153px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg11 { background-position: -170px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg12 { background-position: -187px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg13 { background-position: -204px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg14 { background-position: -221px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg15 { background-position: -238px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg16 { background-position: -255px -261px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg17 { background-position: 0 -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg18 { background-position: -17px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg19 { background-position: -34px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg20 { background-position: -51px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg21 { background-position: -68px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg22 { background-position: -85px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg23 { background-position: -102px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg24 { background-position: -119px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg25 { background-position: -136px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg26 { background-position: -153px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg27 { background-position: -170px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg28 { background-position: -187px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg29 { background-position: -204px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg30 { background-position: -221px -278px; } + +#smart_editor2 .se2_qeditor .se2_qe2_2 .se2_cellimg31 { background-position: -238px -278px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg button { width: 14px; height: 14px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg1 { background-position: -1px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg2 { background-position: -18px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg3 { background-position: -35px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg4 { background-position: -52px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg5 { background-position: -69px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg6 { background-position: -86px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg7 { background-position: -103px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg8 { background-position: -120px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg9 { background-position: -137px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg10 { background-position: -154px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg11 { background-position: -171px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg12 { background-position: -188px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg13 { background-position: -205px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg14 { background-position: -222px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg15 { background-position: -239px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg16 { background-position: -256px -262px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg17 { background-position: -1px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg18 { background-position: -18px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg19 { background-position: -35px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg20 { background-position: -52px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg21 { background-position: -69px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg22 { background-position: -86px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg23 { background-position: -103px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg24 { background-position: -120px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg25 { background-position: -137px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg26 { background-position: -154px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg27 { background-position: -171px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg28 { background-position: -188px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg29 { background-position: -205px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg30 { background-position: -222px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg31 { background-position: -239px -279px; } + +#smart_editor2 .se2_qeditor .se2_pre_bgimg .se2_cellimg32 { background-position: -256px -279px; } + +/* TEXT_TOOLBAR : QUICKEDITOR_TABLE > MY REVIEW */ +#smart_editor2 .se2_btn_area { _display: inline; float: left; clear: both; width: 166px; margin: 5px 0 0 1px; padding: 7px 0 6px 0; background: url("../img/bg_line1.gif") repeat-x; text-align: center; } + +#smart_editor2 .se2_btn_area .se2_btn_save { width: 97px; height: 21px; background: url("../img/ko_KR/btn_set.png?130306") -369px -163px no-repeat; } + +/* TEXT_TOOLBAR : QUICKEDITOR_IMAGE */ +#smart_editor2 .se2_qe10 { width: 166px; margin: 0; *margin: -2px 0 0 0; } + +#smart_editor2 .se2_qe10 label { margin: 0 1px 0 0; vertical-align: middle; } + +#smart_editor2 .se2_qe10 .se2_sheight { margin-left: 4px; } + +#smart_editor2 .se2_qe10 .input_ty1 { width: 30px; height: 13px; margin: 0 0 1px 1px; padding: 3px 4px 0 1px; font-size: 11px; letter-spacing: 0; text-align: right; vertical-align: middle; } + +#smart_editor2 .se2_qe10 .se2_sreset { width: 41px; height: 19px; margin-left: 3px; background: url("../img/ko_KR/btn_set.png?130306") -401px -184px no-repeat; vertical-align: middle; } + +#smart_editor2 .se2_qe10_1 { margin-top: 4px; padding: 10px 0 3px; background: url("../img/bg_line1.gif") repeat-x; } + +#smart_editor2 .se2_qe10_1 input { width: 15px; height: 15px; margin: -1px 3px 1px -1px; vertical-align: middle; } + +#smart_editor2 .se2_qe11 { float: left; width: 166px; margin: 4px 0 0 0; padding: 7px 0 2px 0; background: url("../img/bg_line1.gif") repeat-x; } + +#smart_editor2 .se2_qe11_1 { float: left; width: 99px; } + +#smart_editor2 .se2_qe11_1 dt { float: left; width: 56px; height: 15px; padding: 5px 0 0 0; } + +#smart_editor2 .se2_qe11_1 dd { float: left; position: relative; width: 38px; height: 20px; } + +#smart_editor2 .se2_qe11_1 .input_ty1 { display: block; width: 29px; height: 15px; margin: 0; *margin: -1px 0 1px 0; padding: 3px 1px 0 5px; font-size: 11px; letter-spacing: 0; text-align: left; } + +#smart_editor2 .se2_qe11_1 .se2_add { position: absolute; top: 2px; right: 3px; width: 13px; height: 8px; background: url("../img/ko_KR/btn_set.png?130306") -86px -54px no-repeat; } + +#smart_editor2 .se2_qe11_1 .se2_del { position: absolute; top: 10px; right: 3px; width: 13px; height: 8px; background: url("../img/ko_KR/btn_set.png?130306") -86px -62px no-repeat; } + +#smart_editor2 .se2_qe11_2 { float: left; width: 67px; } + +#smart_editor2 .se2_qe11_2 dt { float: left; width: 47px; margin: 5px 0 0 0; } + +#smart_editor2 .se2_qe11_2 dd { float: left; position: relative; width: 20px; } + +#smart_editor2 .se2_qe12 { float: left; width: 166px; margin: 3px 0 0 0; padding: 7px 0 0 0; background: url("../img/bg_line1.gif") repeat-x; } + +#smart_editor2 .se2_qe12 dt { float: left; margin: 5px 4px 0 0; } + +#smart_editor2 .se2_qe12 dd { float: left; padding: 0 0 6px 0; } + +#smart_editor2 .se2_qe12 .se2_align0 { float: left; width: 19px; height: 21px; background: url("../img/ko_KR/btn_set.png?130306") -276px -121px no-repeat; } + +#smart_editor2 .se2_qe12 .se2_align1 { float: left; width: 19px; height: 21px; background: url("../img/ko_KR/btn_set.png?130306") -295px -121px no-repeat; } + +#smart_editor2 .se2_qe12 .se2_align2 { float: left; width: 20px; height: 21px; background: url("../img/ko_KR/btn_set.png?130306") -314px -121px no-repeat; } + +#smart_editor2 .se2_qe13 { position: relative; z-index: 10; zoom: 1; } + +#smart_editor2 .se2_qe13 dt { float: left; width: 62px; padding: 3px 0 0; } + +#smart_editor2 .se2_qe13 dt input { width: 15px; height: 15px; margin: -1px 1px 1px -1px; vertical-align: middle; zoom: 1; } + +#smart_editor2 .se2_qe13 dt .se2_qdim2 { width: 32px; } + +#smart_editor2 .se2_qe13 dd .se2_select_ty1 { width: 38px; } + +#smart_editor2 .se2_qe13 dd .se2_select_ty1 span { width: 15px; } + +#smart_editor2 .se2_qe13 dd .input_ty1 { width: 20px; } + +#smart_editor2 .se2_qe13 dd .se2_palette2 .input_ty1 { width: 67px; } + +#smart_editor2 .se2_qe13 .se2_add { *top: 3px; } + +#smart_editor2 .se2_qe13 .se2_del { *top: 11px; } + +#smart_editor2 .se2_qe13 .se2_layer_b_style { right: -2px; _right: 0; } + +#smart_editor2 .se2_qe13 .se2_layer_b_style li span { width: auto; margin: 0 4px 0 5px; padding-top: 2px; } + +#smart_editor2 .se2_qe13 dd { _display: inline; float: left; position: relative; width: 29px; margin-right: 5px; _margin-right: 3px; zoom: 1; } + +#smart_editor2 .se2_qe13 dd .se2_palette h4 { margin-top: 9px; font-family: dotum; font-size: 12px; } + +#smart_editor2 .se2_qe13 dd.dd_type { width: 38px; } + +#smart_editor2 .se2_qe13 dd.dd_type2 { width: 37px; margin-right: 3px; } + +#smart_editor2 .se2_qe13 dd.dd_type2 .input_ty1 { width: 29px; } + +#smart_editor2 .se2_qe13 dd.dd_type2 button { right: 2px; _right: 1px; } + +#smart_editor2 .se2_qe13 dd.dd_type3 { width: 20px; margin: 0; } + +#smart_editor2 .se2_qe13_v1 { _display: inline; float: left; margin: 2px 0 1px; } + +#smart_editor2 .se2_qe13_v1 dt { padding: 4px 0 0 1px; } + +#smart_editor2 .se2_qe13_v2 { _display: inline; float: left; position: relative; z-index: 100; width: 165px; margin: 4px 0 0 1px; zoom: 1; } + +#smart_editor2 .se2_qe13_v2 dd { width: 18px; margin: 0; } + +#smart_editor2 .se2_qeditor .se2_qdim1 { clear: both; position: absolute; top: 25px; left: 115px; width: 60px; height: 23px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_qeditor .se2_qdim2 { clear: both; position: absolute; top: 55px; left: 24px; z-index: 110; width: 70px; height: 22px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_qeditor .se2_qdim3 { clear: both; position: absolute; top: 55px; left: 118px; z-index: 110; width: 56px; height: 22px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_qeditor .se2_qdim4 { clear: both; position: absolute; top: 81px; left: 23px; z-index: 35; width: 116px; height: 35px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_qeditor .se2_qdim5 { clear: both; position: absolute; top: 31px; left: 106px; width: 68px; height: 26px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_qeditor .se2_qdim6c { clear: both; position: absolute; top: 25px; left: 28px; width: 29px; height: 23px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_qeditor .se2_qdim6r { clear: both; position: absolute; top: 25px; left: 57px; width: 29px; height: 23px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_highedit { float: right; width: 56px; height: 21px; margin: -27px 8px 0 0; background: url("../img/ko_KR/btn_set.png?130306") -329px -142px no-repeat; } + +#smart_editor2 .se2_qeditor .se2_qdim7 { clear: both; position: absolute; top: 55px; left: 24px; z-index: 110; width: 150px; height: 48px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_qeditor .se2_qdim8 { clear: both; position: absolute; top: 105px; left: 24px; z-index: 110; width: 150px; height: 37px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_qeditor .se2_qdim9 { clear: both; position: absolute; top: 55px; left: 111px; z-index: 110; width: 65px; height: 24px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_qeditor .se2_qdim10 { clear: both; position: absolute; top: 55px; left: 100px; z-index: 110; width: 77px; height: 24px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +#smart_editor2 .se2_qeditor .se2_qdim11 { clear: both; position: absolute; top: 55px; left: 65px; z-index: 110; width: 115px; height: 24px; background: #fafafa; opacity: 0.5; filter: alpha(opacity=50); } + +/* HELP : ACCESSIBILITY */ +#smart_editor2 .se2_accessibility { z-index: 90; } + +#smart_editor2 .se2_accessibility .se2_in_layer { width: 568px; padding: 0 10px; background: #fafafa; border: 1px solid #bcbbbb; } + +#smart_editor2 .se2_accessibility h3 { margin: 0 -10px; padding: 6px 0 12px 0; background: url("../img/bg_find_h3.gif") repeat-x; font-size: 12px; line-height: 14px; letter-spacing: -1px; } + +#smart_editor2 .se2_accessibility h3 strong { display: inline-block; padding: 4px 0 3px 11px; color: #333; letter-spacing: 0; } + +#smart_editor2 .se2_accessibility .se2_close { position: absolute; top: 10px; right: 12px; width: 13px; height: 12px; background: url("../img/ko_KR/btn_set.png?130306") -155px -5px no-repeat; } + +#smart_editor2 .se2_accessibility .box_help { padding: 0 2px; margin-top: 8px; background: url("../img/bg_help.gif") 0 100% no-repeat; } + +#smart_editor2 .se2_accessibility .box_help div { overflow: hidden; padding: 20px 21px 24px; border-top: 1px solid #d0d0d0; color: #333; } + +#smart_editor2 .se2_accessibility .box_help strong { display: block; margin-bottom: 2px; } + +#smart_editor2 .se2_accessibility .box_help p { margin-bottom: 28px; line-height: 1.5; } + +#smart_editor2 .se2_accessibility .box_help ul { width: 150%; margin-top: 10px; } + +#smart_editor2 .se2_accessibility .box_help li { position: relative; float: left; width: 252px; padding: 5px 0 5px 9px; margin-right: 40px; background: url("../img/ko_KR/btn_set.png?130306") -475px -51px no-repeat; border-right: 1px solid #f0f0f0; *zoom: 1; line-height: 1; } + +#smart_editor2 .se2_accessibility .box_help li span { position: absolute; top: 4px; left: 138px; line-height: 1.2; } + +#smart_editor2 .se2_accessibility .se2_btns { padding: 9px 0 10px; text-align: center; } + +#smart_editor2 .se2_accessibility .se2_btns .se2_close2 { width: 39px; height: 24px; background: url("../img/ko_KR/btn_set.png?130306") -235px -120px no-repeat; } diff --git a/plugin/editor/smarteditor2/css/smart_editor2_out.css b/plugin/editor/smarteditor2/css/smart_editor2_out.css new file mode 100644 index 000000000..fb7412470 --- /dev/null +++ b/plugin/editor/smarteditor2/css/smart_editor2_out.css @@ -0,0 +1,20 @@ +@charset "UTF-8"; +/* NHN Web Standardization Team (http://html.nhndesign.com/) HHJ 090226 */ +/* COMMON */ +.se2_outputarea, .se2_outputarea th, .se2_outputarea td { margin: 0; padding: 0; color: #666; font-size: 12px; font-family: '돋움',Dotum,'굴림',Gulim,Helvetica,Sans-serif; line-height: 1.5; } + +.se2_outputarea p { margin: 0; padding: 0; } + +.se2_outputarea a:hover { text-decoration: underline; } + +.se2_outputarea a:link { color: #0000ff; } + +.se2_outputarea ul { margin: 0 0 0 40px; padding: 0; } + +.se2_outputarea ul li { margin: 0; list-style-type: disc; padding: 0; } + +.se2_outputarea ul ul li { list-style-type: circle; } + +.se2_outputarea ul ul ul li { list-style-type: square; } + +.se2_outputarea img, .se2_outputarea fieldset { border: 0; } diff --git a/plugin/editor/smarteditor2/editor.lib.php b/plugin/editor/smarteditor2/editor.lib.php new file mode 100644 index 000000000..94ffc30f8 --- /dev/null +++ b/plugin/editor/smarteditor2/editor.lib.php @@ -0,0 +1,67 @@ +웹에디터 시작"; + if ($is_dhtml_editor) + $html .= ''; + + if ($is_dhtml_editor && $js) { + $html .= "\n".''; + $html .= "\n".''; + $html .= "\n".''; + $html .= "\n"; + $js = false; + } + + $smarteditor_class = $is_dhtml_editor ? "smarteditor2" : ""; + $html .= "\n"; + $html .= "\n웹 에디터 끝"; + return $html; +} + + +// textarea 로 값을 넘긴다. javascript 반드시 필요 +function get_editor_js($id, $is_dhtml_editor=true) +{ + if ($is_dhtml_editor) { + return "var {$id}_editor_data = oEditors.getById['{$id}'].getIR();\noEditors.getById['{$id}'].exec('UPDATE_CONTENTS_FIELD', []);\n"; + } else { + return "var {$id}_editor = document.getElementById('{$id}');\n"; + } +} + + +// textarea 의 값이 비어 있는지 검사 +function chk_editor_js($id, $is_dhtml_editor=true) +{ + if ($is_dhtml_editor) { + return "if (!{$id}_editor_data || {$id}_editor_data == ' ' || {$id}_editor_data == '

 

' || {$id}_editor_data == '


' || {$id}_editor_data == '

') { alert(\"내용을 입력해 주십시오.\"); oEditors.getById['{$id}'].exec('FOCUS'); return false; }\n"; + } else { + return "if (!{$id}_editor.value) { alert(\"내용을 입력해 주십시오.\"); {$id}_editor.focus(); return false; }\n"; + } +} +?> \ No newline at end of file diff --git a/plugin/editor/smarteditor2/img/bg_b1.png b/plugin/editor/smarteditor2/img/bg_b1.png new file mode 100644 index 000000000..8bd0c06fb Binary files /dev/null and b/plugin/editor/smarteditor2/img/bg_b1.png differ diff --git a/plugin/editor/smarteditor2/img/bg_button.gif b/plugin/editor/smarteditor2/img/bg_button.gif new file mode 100644 index 000000000..1619320b9 Binary files /dev/null and b/plugin/editor/smarteditor2/img/bg_button.gif differ diff --git a/plugin/editor/smarteditor2/img/bg_button_left.gif b/plugin/editor/smarteditor2/img/bg_button_left.gif new file mode 100644 index 000000000..7b86ffdd0 Binary files /dev/null and b/plugin/editor/smarteditor2/img/bg_button_left.gif differ diff --git a/plugin/editor/smarteditor2/img/bg_button_right.gif b/plugin/editor/smarteditor2/img/bg_button_right.gif new file mode 100644 index 000000000..0ac699c61 Binary files /dev/null and b/plugin/editor/smarteditor2/img/bg_button_right.gif differ diff --git a/plugin/editor/smarteditor2/img/bg_find_h3.gif b/plugin/editor/smarteditor2/img/bg_find_h3.gif new file mode 100644 index 000000000..06627d982 Binary files /dev/null and b/plugin/editor/smarteditor2/img/bg_find_h3.gif differ diff --git a/plugin/editor/smarteditor2/img/bg_help.gif b/plugin/editor/smarteditor2/img/bg_help.gif new file mode 100644 index 000000000..f2aae94ba Binary files /dev/null and b/plugin/editor/smarteditor2/img/bg_help.gif differ diff --git a/plugin/editor/smarteditor2/img/bg_icon_tool.gif b/plugin/editor/smarteditor2/img/bg_icon_tool.gif new file mode 100644 index 000000000..ef680ebee Binary files /dev/null and b/plugin/editor/smarteditor2/img/bg_icon_tool.gif differ diff --git a/plugin/editor/smarteditor2/img/bg_line1.gif b/plugin/editor/smarteditor2/img/bg_line1.gif new file mode 100644 index 000000000..8c506a4a1 Binary files /dev/null and b/plugin/editor/smarteditor2/img/bg_line1.gif differ diff --git a/plugin/editor/smarteditor2/img/bg_quote2.gif b/plugin/editor/smarteditor2/img/bg_quote2.gif new file mode 100644 index 000000000..eb8cd04a7 Binary files /dev/null and b/plugin/editor/smarteditor2/img/bg_quote2.gif differ diff --git a/plugin/editor/smarteditor2/img/bg_set.gif b/plugin/editor/smarteditor2/img/bg_set.gif new file mode 100644 index 000000000..14d09739d Binary files /dev/null and b/plugin/editor/smarteditor2/img/bg_set.gif differ diff --git a/plugin/editor/smarteditor2/img/bg_text_tool.gif b/plugin/editor/smarteditor2/img/bg_text_tool.gif new file mode 100644 index 000000000..60d61def8 Binary files /dev/null and b/plugin/editor/smarteditor2/img/bg_text_tool.gif differ diff --git a/plugin/editor/smarteditor2/img/bg_tool2.gif b/plugin/editor/smarteditor2/img/bg_tool2.gif new file mode 100644 index 000000000..f96aafb5b Binary files /dev/null and b/plugin/editor/smarteditor2/img/bg_tool2.gif differ diff --git a/plugin/editor/smarteditor2/img/editor_guideline_698.gif b/plugin/editor/smarteditor2/img/editor_guideline_698.gif new file mode 100644 index 000000000..96350892c Binary files /dev/null and b/plugin/editor/smarteditor2/img/editor_guideline_698.gif differ diff --git a/plugin/editor/smarteditor2/img/editor_guideline_890.gif b/plugin/editor/smarteditor2/img/editor_guideline_890.gif new file mode 100644 index 000000000..5a241e1e4 Binary files /dev/null and b/plugin/editor/smarteditor2/img/editor_guideline_890.gif differ diff --git a/plugin/editor/smarteditor2/img/ico_extend.png b/plugin/editor/smarteditor2/img/ico_extend.png new file mode 100644 index 000000000..1aa88ff68 Binary files /dev/null and b/plugin/editor/smarteditor2/img/ico_extend.png differ diff --git a/plugin/editor/smarteditor2/img/icon_set.gif b/plugin/editor/smarteditor2/img/icon_set.gif new file mode 100644 index 000000000..842d3944b Binary files /dev/null and b/plugin/editor/smarteditor2/img/icon_set.gif differ diff --git a/plugin/editor/smarteditor2/img/ko_KR/btn_set.png b/plugin/editor/smarteditor2/img/ko_KR/btn_set.png new file mode 100644 index 000000000..f8935d191 Binary files /dev/null and b/plugin/editor/smarteditor2/img/ko_KR/btn_set.png differ diff --git a/plugin/editor/smarteditor2/img/ko_KR/bx_set_110302.gif b/plugin/editor/smarteditor2/img/ko_KR/bx_set_110302.gif new file mode 100644 index 000000000..86662e9d0 Binary files /dev/null and b/plugin/editor/smarteditor2/img/ko_KR/bx_set_110302.gif differ diff --git a/plugin/editor/smarteditor2/img/ko_KR/text_tool_set.png b/plugin/editor/smarteditor2/img/ko_KR/text_tool_set.png new file mode 100644 index 000000000..c1e5be374 Binary files /dev/null and b/plugin/editor/smarteditor2/img/ko_KR/text_tool_set.png differ diff --git a/plugin/editor/smarteditor2/img/photoQuickPopup/bg_drag_image.png b/plugin/editor/smarteditor2/img/photoQuickPopup/bg_drag_image.png new file mode 100644 index 000000000..0a680132b Binary files /dev/null and b/plugin/editor/smarteditor2/img/photoQuickPopup/bg_drag_image.png differ diff --git a/plugin/editor/smarteditor2/img/photoQuickPopup/btn_cancel.png b/plugin/editor/smarteditor2/img/photoQuickPopup/btn_cancel.png new file mode 100644 index 000000000..a39adf821 Binary files /dev/null and b/plugin/editor/smarteditor2/img/photoQuickPopup/btn_cancel.png differ diff --git a/plugin/editor/smarteditor2/img/photoQuickPopup/btn_confirm.png b/plugin/editor/smarteditor2/img/photoQuickPopup/btn_confirm.png new file mode 100644 index 000000000..4b7ed66f0 Binary files /dev/null and b/plugin/editor/smarteditor2/img/photoQuickPopup/btn_confirm.png differ diff --git a/plugin/editor/smarteditor2/img/photoQuickPopup/btn_confirm2.png b/plugin/editor/smarteditor2/img/photoQuickPopup/btn_confirm2.png new file mode 100644 index 000000000..7d1accfb2 Binary files /dev/null and b/plugin/editor/smarteditor2/img/photoQuickPopup/btn_confirm2.png differ diff --git a/plugin/editor/smarteditor2/img/photoQuickPopup/btn_del.png b/plugin/editor/smarteditor2/img/photoQuickPopup/btn_del.png new file mode 100644 index 000000000..9bbf5957e Binary files /dev/null and b/plugin/editor/smarteditor2/img/photoQuickPopup/btn_del.png differ diff --git a/plugin/editor/smarteditor2/img/photoQuickPopup/btn_find.png b/plugin/editor/smarteditor2/img/photoQuickPopup/btn_find.png new file mode 100644 index 000000000..054a411b0 Binary files /dev/null and b/plugin/editor/smarteditor2/img/photoQuickPopup/btn_find.png differ diff --git a/plugin/editor/smarteditor2/img/text_tool_set2.png b/plugin/editor/smarteditor2/img/text_tool_set2.png new file mode 100644 index 000000000..889a3334f Binary files /dev/null and b/plugin/editor/smarteditor2/img/text_tool_set2.png differ diff --git a/plugin/editor/smarteditor2/js/HuskyEZCreator.js b/plugin/editor/smarteditor2/js/HuskyEZCreator.js new file mode 100644 index 000000000..dc54ca278 --- /dev/null +++ b/plugin/editor/smarteditor2/js/HuskyEZCreator.js @@ -0,0 +1,134 @@ +if(typeof window.nhn=='undefined') window.nhn = {}; +if (!nhn.husky) nhn.husky = {}; + +/** + * @fileOverview This file contains application creation helper function, which would load up an HTML(Skin) file and then execute a specified create function. + * @name HuskyEZCreator.js + */ +nhn.husky.EZCreator = new (function(){ + this.nBlockerCount = 0; + + this.createInIFrame = function(htOptions){ + if(arguments.length == 1){ + var oAppRef = htOptions.oAppRef; + var elPlaceHolder = htOptions.elPlaceHolder; + var sSkinURI = htOptions.sSkinURI; + var fCreator = htOptions.fCreator; + var fOnAppLoad = htOptions.fOnAppLoad; + var bUseBlocker = htOptions.bUseBlocker; + var htParams = htOptions.htParams || null; + }else{ + // for backward compatibility only + var oAppRef = arguments[0]; + var elPlaceHolder = arguments[1]; + var sSkinURI = arguments[2]; + var fCreator = arguments[3]; + var fOnAppLoad = arguments[4]; + var bUseBlocker = arguments[5]; + var htParams = arguments[6]; + } + + if(bUseBlocker) nhn.husky.EZCreator.showBlocker(); + + var attachEvent = function(elNode, sEvent, fHandler){ + if(elNode.addEventListener){ + elNode.addEventListener(sEvent, fHandler, false); + }else{ + elNode.attachEvent("on"+sEvent, fHandler); + } + } + + if(!elPlaceHolder){ + alert("Placeholder is required!"); + return; + } + + if(typeof(elPlaceHolder) != "object") + elPlaceHolder = document.getElementById(elPlaceHolder); + + var elIFrame, nEditorWidth, nEditorHeight; + + + try{ + elIFrame = document.createElement("' + ).bind('load', function () { + var fileInputClones, + paramNames = $.isArray(options.paramName) ? + options.paramName : [options.paramName]; + iframe + .unbind('load') + .bind('load', function () { + var response; + // Wrap in a try/catch block to catch exceptions thrown + // when trying to access cross-domain iframe contents: + try { + response = iframe.contents(); + // Google Chrome and Firefox do not throw an + // exception when calling iframe.contents() on + // cross-domain requests, so we unify the response: + if (!response.length || !response[0].firstChild) { + throw new Error(); + } + } catch (e) { + response = undefined; + } + // The complete callback returns the + // iframe content document as response object: + completeCallback( + 200, + 'success', + {'iframe': response} + ); + // Fix for IE endless progress bar activity bug + // (happens on form submits to iframe targets): + $('') + .appendTo(form); + window.setTimeout(function () { + // Removing the form in a setTimeout call + // allows Chrome's developer tools to display + // the response result + form.remove(); + }, 0); + }); + form + .prop('target', iframe.prop('name')) + .prop('action', options.url) + .prop('method', options.type); + if (options.formData) { + $.each(options.formData, function (index, field) { + $('') + .prop('name', field.name) + .val(field.value) + .appendTo(form); + }); + } + if (options.fileInput && options.fileInput.length && + options.type === 'POST') { + fileInputClones = options.fileInput.clone(); + // Insert a clone for each file input field: + options.fileInput.after(function (index) { + return fileInputClones[index]; + }); + if (options.paramName) { + options.fileInput.each(function (index) { + $(this).prop( + 'name', + paramNames[index] || options.paramName + ); + }); + } + // Appending the file input fields to the hidden form + // removes them from their original location: + form + .append(options.fileInput) + .prop('enctype', 'multipart/form-data') + // enctype must be set as encoding for IE: + .prop('encoding', 'multipart/form-data'); + // Remove the HTML5 form attribute from the input(s): + options.fileInput.removeAttr('form'); + } + form.submit(); + // Insert the file input fields at their original location + // by replacing the clones with the originals: + if (fileInputClones && fileInputClones.length) { + options.fileInput.each(function (index, input) { + var clone = $(fileInputClones[index]); + // Restore the original name and form properties: + $(input) + .prop('name', clone.prop('name')) + .attr('form', clone.attr('form')); + clone.replaceWith(input); + }); + } + }); + form.append(iframe).appendTo(document.body); + }, + abort: function () { + if (iframe) { + // javascript:false as iframe src aborts the request + // and prevents warning popups on HTTPS in IE6. + // concat is used to avoid the "Script URL" JSLint error: + iframe + .unbind('load') + .prop('src', initialIframeSrc); + } + if (form) { + form.remove(); + } + } + }; + } + }); + + // The iframe transport returns the iframe content document as response. + // The following adds converters from iframe to text, json, html, xml + // and script. + // Please note that the Content-Type for JSON responses has to be text/plain + // or text/html, if the browser doesn't include application/json in the + // Accept header, else IE will show a download dialog. + // The Content-Type for XML responses on the other hand has to be always + // application/xml or text/xml, so IE properly parses the XML response. + // See also + // https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#content-type-negotiation + $.ajaxSetup({ + converters: { + 'iframe text': function (iframe) { + return iframe && $(iframe[0].body).text(); + }, + 'iframe json': function (iframe) { + return iframe && $.parseJSON($(iframe[0].body).text()); + }, + 'iframe html': function (iframe) { + return iframe && $(iframe[0].body).html(); + }, + 'iframe xml': function (iframe) { + var xmlDoc = iframe && iframe[0]; + return xmlDoc && $.isXMLDoc(xmlDoc) ? xmlDoc : + $.parseXML((xmlDoc.XMLDocument && xmlDoc.XMLDocument.xml) || + $(xmlDoc.body).html()); + }, + 'iframe script': function (iframe) { + return iframe && $.globalEval($(iframe[0].body).text()); + } + } + }); + +})); diff --git a/plugin/editor/smarteditor2/photo_uploader/popup/js/jquery.ui.widget.js b/plugin/editor/smarteditor2/photo_uploader/popup/js/jquery.ui.widget.js new file mode 100644 index 000000000..c43041997 --- /dev/null +++ b/plugin/editor/smarteditor2/photo_uploader/popup/js/jquery.ui.widget.js @@ -0,0 +1,530 @@ +/*! + * jQuery UI Widget 1.10.4+amd + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/jQuery.widget/ + */ + +(function (factory) { + if (typeof define === "function" && define.amd) { + // Register as an anonymous AMD module: + define(["jquery"], factory); + } else { + // Browser globals: + factory(jQuery); + } +}(function( $, undefined ) { + +var uuid = 0, + slice = Array.prototype.slice, + _cleanData = $.cleanData; +$.cleanData = function( elems ) { + for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { + try { + $( elem ).triggerHandler( "remove" ); + // http://bugs.jquery.com/ticket/8235 + } catch( e ) {} + } + _cleanData( elems ); +}; + +$.widget = function( name, base, prototype ) { + var fullName, existingConstructor, constructor, basePrototype, + // proxiedPrototype allows the provided prototype to remain unmodified + // so that it can be used as a mixin for multiple widgets (#8876) + proxiedPrototype = {}, + namespace = name.split( "." )[ 0 ]; + + name = name.split( "." )[ 1 ]; + fullName = namespace + "-" + name; + + if ( !prototype ) { + prototype = base; + base = $.Widget; + } + + // create selector for plugin + $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { + return !!$.data( elem, fullName ); + }; + + $[ namespace ] = $[ namespace ] || {}; + existingConstructor = $[ namespace ][ name ]; + constructor = $[ namespace ][ name ] = function( options, element ) { + // allow instantiation without "new" keyword + if ( !this._createWidget ) { + return new constructor( options, element ); + } + + // allow instantiation without initializing for simple inheritance + // must use "new" keyword (the code above always passes args) + if ( arguments.length ) { + this._createWidget( options, element ); + } + }; + // extend with the existing constructor to carry over any static properties + $.extend( constructor, existingConstructor, { + version: prototype.version, + // copy the object used to create the prototype in case we need to + // redefine the widget later + _proto: $.extend( {}, prototype ), + // track widgets that inherit from this widget in case this widget is + // redefined after a widget inherits from it + _childConstructors: [] + }); + + basePrototype = new base(); + // we need to make the options hash a property directly on the new instance + // otherwise we'll modify the options hash on the prototype that we're + // inheriting from + basePrototype.options = $.widget.extend( {}, basePrototype.options ); + $.each( prototype, function( prop, value ) { + if ( !$.isFunction( value ) ) { + proxiedPrototype[ prop ] = value; + return; + } + proxiedPrototype[ prop ] = (function() { + var _super = function() { + return base.prototype[ prop ].apply( this, arguments ); + }, + _superApply = function( args ) { + return base.prototype[ prop ].apply( this, args ); + }; + return function() { + var __super = this._super, + __superApply = this._superApply, + returnValue; + + this._super = _super; + this._superApply = _superApply; + + returnValue = value.apply( this, arguments ); + + this._super = __super; + this._superApply = __superApply; + + return returnValue; + }; + })(); + }); + constructor.prototype = $.widget.extend( basePrototype, { + // TODO: remove support for widgetEventPrefix + // always use the name + a colon as the prefix, e.g., draggable:start + // don't prefix for widgets that aren't DOM-based + widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name + }, proxiedPrototype, { + constructor: constructor, + namespace: namespace, + widgetName: name, + widgetFullName: fullName + }); + + // If this widget is being redefined then we need to find all widgets that + // are inheriting from it and redefine all of them so that they inherit from + // the new version of this widget. We're essentially trying to replace one + // level in the prototype chain. + if ( existingConstructor ) { + $.each( existingConstructor._childConstructors, function( i, child ) { + var childPrototype = child.prototype; + + // redefine the child widget using the same prototype that was + // originally used, but inherit from the new version of the base + $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); + }); + // remove the list of existing child constructors from the old constructor + // so the old child constructors can be garbage collected + delete existingConstructor._childConstructors; + } else { + base._childConstructors.push( constructor ); + } + + $.widget.bridge( name, constructor ); +}; + +$.widget.extend = function( target ) { + var input = slice.call( arguments, 1 ), + inputIndex = 0, + inputLength = input.length, + key, + value; + for ( ; inputIndex < inputLength; inputIndex++ ) { + for ( key in input[ inputIndex ] ) { + value = input[ inputIndex ][ key ]; + if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { + // Clone objects + if ( $.isPlainObject( value ) ) { + target[ key ] = $.isPlainObject( target[ key ] ) ? + $.widget.extend( {}, target[ key ], value ) : + // Don't extend strings, arrays, etc. with objects + $.widget.extend( {}, value ); + // Copy everything else by reference + } else { + target[ key ] = value; + } + } + } + } + return target; +}; + +$.widget.bridge = function( name, object ) { + var fullName = object.prototype.widgetFullName || name; + $.fn[ name ] = function( options ) { + var isMethodCall = typeof options === "string", + args = slice.call( arguments, 1 ), + returnValue = this; + + // allow multiple hashes to be passed on init + options = !isMethodCall && args.length ? + $.widget.extend.apply( null, [ options ].concat(args) ) : + options; + + if ( isMethodCall ) { + this.each(function() { + var methodValue, + instance = $.data( this, fullName ); + if ( !instance ) { + return $.error( "cannot call methods on " + name + " prior to initialization; " + + "attempted to call method '" + options + "'" ); + } + if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { + return $.error( "no such method '" + options + "' for " + name + " widget instance" ); + } + methodValue = instance[ options ].apply( instance, args ); + if ( methodValue !== instance && methodValue !== undefined ) { + returnValue = methodValue && methodValue.jquery ? + returnValue.pushStack( methodValue.get() ) : + methodValue; + return false; + } + }); + } else { + this.each(function() { + var instance = $.data( this, fullName ); + if ( instance ) { + instance.option( options || {} )._init(); + } else { + $.data( this, fullName, new object( options, this ) ); + } + }); + } + + return returnValue; + }; +}; + +$.Widget = function( /* options, element */ ) {}; +$.Widget._childConstructors = []; + +$.Widget.prototype = { + widgetName: "widget", + widgetEventPrefix: "", + defaultElement: "
", + options: { + disabled: false, + + // callbacks + create: null + }, + _createWidget: function( options, element ) { + element = $( element || this.defaultElement || this )[ 0 ]; + this.element = $( element ); + this.uuid = uuid++; + this.eventNamespace = "." + this.widgetName + this.uuid; + this.options = $.widget.extend( {}, + this.options, + this._getCreateOptions(), + options ); + + this.bindings = $(); + this.hoverable = $(); + this.focusable = $(); + + if ( element !== this ) { + $.data( element, this.widgetFullName, this ); + this._on( true, this.element, { + remove: function( event ) { + if ( event.target === element ) { + this.destroy(); + } + } + }); + this.document = $( element.style ? + // element within the document + element.ownerDocument : + // element is window or document + element.document || element ); + this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); + } + + this._create(); + this._trigger( "create", null, this._getCreateEventData() ); + this._init(); + }, + _getCreateOptions: $.noop, + _getCreateEventData: $.noop, + _create: $.noop, + _init: $.noop, + + destroy: function() { + this._destroy(); + // we can probably remove the unbind calls in 2.0 + // all event bindings should go through this._on() + this.element + .unbind( this.eventNamespace ) + // 1.9 BC for #7810 + // TODO remove dual storage + .removeData( this.widgetName ) + .removeData( this.widgetFullName ) + // support: jquery <1.6.3 + // http://bugs.jquery.com/ticket/9413 + .removeData( $.camelCase( this.widgetFullName ) ); + this.widget() + .unbind( this.eventNamespace ) + .removeAttr( "aria-disabled" ) + .removeClass( + this.widgetFullName + "-disabled " + + "ui-state-disabled" ); + + // clean up events and states + this.bindings.unbind( this.eventNamespace ); + this.hoverable.removeClass( "ui-state-hover" ); + this.focusable.removeClass( "ui-state-focus" ); + }, + _destroy: $.noop, + + widget: function() { + return this.element; + }, + + option: function( key, value ) { + var options = key, + parts, + curOption, + i; + + if ( arguments.length === 0 ) { + // don't return a reference to the internal hash + return $.widget.extend( {}, this.options ); + } + + if ( typeof key === "string" ) { + // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } + options = {}; + parts = key.split( "." ); + key = parts.shift(); + if ( parts.length ) { + curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); + for ( i = 0; i < parts.length - 1; i++ ) { + curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; + curOption = curOption[ parts[ i ] ]; + } + key = parts.pop(); + if ( arguments.length === 1 ) { + return curOption[ key ] === undefined ? null : curOption[ key ]; + } + curOption[ key ] = value; + } else { + if ( arguments.length === 1 ) { + return this.options[ key ] === undefined ? null : this.options[ key ]; + } + options[ key ] = value; + } + } + + this._setOptions( options ); + + return this; + }, + _setOptions: function( options ) { + var key; + + for ( key in options ) { + this._setOption( key, options[ key ] ); + } + + return this; + }, + _setOption: function( key, value ) { + this.options[ key ] = value; + + if ( key === "disabled" ) { + this.widget() + .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value ) + .attr( "aria-disabled", value ); + this.hoverable.removeClass( "ui-state-hover" ); + this.focusable.removeClass( "ui-state-focus" ); + } + + return this; + }, + + enable: function() { + return this._setOption( "disabled", false ); + }, + disable: function() { + return this._setOption( "disabled", true ); + }, + + _on: function( suppressDisabledCheck, element, handlers ) { + var delegateElement, + instance = this; + + // no suppressDisabledCheck flag, shuffle arguments + if ( typeof suppressDisabledCheck !== "boolean" ) { + handlers = element; + element = suppressDisabledCheck; + suppressDisabledCheck = false; + } + + // no element argument, shuffle and use this.element + if ( !handlers ) { + handlers = element; + element = this.element; + delegateElement = this.widget(); + } else { + // accept selectors, DOM elements + element = delegateElement = $( element ); + this.bindings = this.bindings.add( element ); + } + + $.each( handlers, function( event, handler ) { + function handlerProxy() { + // allow widgets to customize the disabled handling + // - disabled as an array instead of boolean + // - disabled class as method for disabling individual parts + if ( !suppressDisabledCheck && + ( instance.options.disabled === true || + $( this ).hasClass( "ui-state-disabled" ) ) ) { + return; + } + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + + // copy the guid so direct unbinding works + if ( typeof handler !== "string" ) { + handlerProxy.guid = handler.guid = + handler.guid || handlerProxy.guid || $.guid++; + } + + var match = event.match( /^(\w+)\s*(.*)$/ ), + eventName = match[1] + instance.eventNamespace, + selector = match[2]; + if ( selector ) { + delegateElement.delegate( selector, eventName, handlerProxy ); + } else { + element.bind( eventName, handlerProxy ); + } + }); + }, + + _off: function( element, eventName ) { + eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; + element.unbind( eventName ).undelegate( eventName ); + }, + + _delay: function( handler, delay ) { + function handlerProxy() { + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + var instance = this; + return setTimeout( handlerProxy, delay || 0 ); + }, + + _hoverable: function( element ) { + this.hoverable = this.hoverable.add( element ); + this._on( element, { + mouseenter: function( event ) { + $( event.currentTarget ).addClass( "ui-state-hover" ); + }, + mouseleave: function( event ) { + $( event.currentTarget ).removeClass( "ui-state-hover" ); + } + }); + }, + + _focusable: function( element ) { + this.focusable = this.focusable.add( element ); + this._on( element, { + focusin: function( event ) { + $( event.currentTarget ).addClass( "ui-state-focus" ); + }, + focusout: function( event ) { + $( event.currentTarget ).removeClass( "ui-state-focus" ); + } + }); + }, + + _trigger: function( type, event, data ) { + var prop, orig, + callback = this.options[ type ]; + + data = data || {}; + event = $.Event( event ); + event.type = ( type === this.widgetEventPrefix ? + type : + this.widgetEventPrefix + type ).toLowerCase(); + // the original event may come from any element + // so we need to reset the target on the new event + event.target = this.element[ 0 ]; + + // copy original event properties over to the new event + orig = event.originalEvent; + if ( orig ) { + for ( prop in orig ) { + if ( !( prop in event ) ) { + event[ prop ] = orig[ prop ]; + } + } + } + + this.element.trigger( event, data ); + return !( $.isFunction( callback ) && + callback.apply( this.element[0], [ event ].concat( data ) ) === false || + event.isDefaultPrevented() ); + } +}; + +$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { + $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { + if ( typeof options === "string" ) { + options = { effect: options }; + } + var hasOptions, + effectName = !options ? + method : + options === true || typeof options === "number" ? + defaultEffect : + options.effect || defaultEffect; + options = options || {}; + if ( typeof options === "number" ) { + options = { duration: options }; + } + hasOptions = !$.isEmptyObject( options ); + options.complete = callback; + if ( options.delay ) { + element.delay( options.delay ); + } + if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { + element[ method ]( options ); + } else if ( effectName !== method && element[ effectName ] ) { + element[ effectName ]( options.duration, options.easing, callback ); + } else { + element.queue(function( next ) { + $( this )[ method ](); + if ( callback ) { + callback.call( element[ 0 ] ); + } + next(); + }); + } + }; +}); + +})); diff --git a/plugin/editor/smarteditor2/photo_uploader/popup/photo_uploader.html b/plugin/editor/smarteditor2/photo_uploader/popup/photo_uploader.html new file mode 100644 index 000000000..b2a884399 --- /dev/null +++ b/plugin/editor/smarteditor2/photo_uploader/popup/photo_uploader.html @@ -0,0 +1,100 @@ + + + + + + +사진 첨부하기 :: SmartEditor2 + + + +
+ +
+

사진 첨부하기

+
+ + + + +
+ +
+
+ +

10MB이하의 이미지 파일만 등록할 수 있습니다.
(JPG, GIF, PNG, BMP)

+
+
+ +
+ + + + + + +
+ + + + + + \ No newline at end of file diff --git a/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php b/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php new file mode 100644 index 000000000..08420426e --- /dev/null +++ b/plugin/editor/smarteditor2/photo_uploader/popup/php/UploadHandler.php @@ -0,0 +1,1392 @@ + 'The uploaded file exceeds the upload_max_filesize directive in php.ini', + 2 => 'The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form', + 3 => 'The uploaded file was only partially uploaded', + 4 => 'No file was uploaded', + 6 => 'Missing a temporary folder', + 7 => 'Failed to write file to disk', + 8 => 'A PHP extension stopped the file upload', + 'post_max_size' => 'The uploaded file exceeds the post_max_size directive in php.ini', + 'max_file_size' => 'File is too big', + 'min_file_size' => 'File is too small', + 'accept_file_types' => 'Filetype not allowed', + 'max_number_of_files' => 'Maximum number of files exceeded', + 'max_width' => 'Image exceeds maximum width', + 'min_width' => 'Image requires a minimum width', + 'max_height' => 'Image exceeds maximum height', + 'min_height' => 'Image requires a minimum height', + 'abort' => 'File upload aborted', + 'image_resize' => 'Failed to resize image' + ); + + protected $image_objects = array(); + + function __construct($options = null, $initialize = true, $error_messages = null) { + $this->options = array( + 'script_url' => $this->get_full_url().'/', + 'upload_dir' => dirname($this->get_server_var('SCRIPT_FILENAME')).'/files/', + 'upload_url' => $this->get_full_url().'/files/', + 'user_dirs' => false, + 'mkdir_mode' => 0755, + 'param_name' => 'files', + // Set the following option to 'POST', if your server does not support + // DELETE requests. This is a parameter sent to the client: + 'delete_type' => 'DELETE', + 'access_control_allow_origin' => '*', + 'access_control_allow_credentials' => false, + 'access_control_allow_methods' => array( + 'OPTIONS', + 'HEAD', + 'GET', + 'POST', + 'PUT', + 'PATCH', + 'DELETE' + ), + 'access_control_allow_headers' => array( + 'Content-Type', + 'Content-Range', + 'Content-Disposition' + ), + // Enable to provide file downloads via GET requests to the PHP script: + // 1. Set to 1 to download files via readfile method through PHP + // 2. Set to 2 to send a X-Sendfile header for lighttpd/Apache + // 3. Set to 3 to send a X-Accel-Redirect header for nginx + // If set to 2 or 3, adjust the upload_url option to the base path of + // the redirect parameter, e.g. '/files/'. + 'download_via_php' => false, + // Read files in chunks to avoid memory limits when download_via_php + // is enabled, set to 0 to disable chunked reading of files: + 'readfile_chunk_size' => 10 * 1024 * 1024, // 10 MiB + // Defines which files can be displayed inline when downloaded: + 'inline_file_types' => '/\.(gif|jpe?g|bmp|png)$/i', + // Defines which files (based on their names) are accepted for upload: + //'accept_file_types' => '/.+$/i', + 'accept_file_types' => '/\.(gif|jpe?g|bmp|png)$/i', + // The php.ini settings upload_max_filesize and post_max_size + // take precedence over the following max_file_size setting: + 'max_file_size' => null, + 'min_file_size' => 1, + // The maximum number of files for the upload directory: + 'max_number_of_files' => null, + // Defines which files are handled as image files: + 'image_file_types' => '/\.(gif|jpe?g|bmp|png)$/i', + // Image resolution restrictions: + 'max_width' => null, + 'max_height' => null, + 'min_width' => 1, + 'min_height' => 1, + // Set the following option to false to enable resumable uploads: + 'discard_aborted_uploads' => true, + // Set to 0 to use the GD library to scale and orient images, + // set to 1 to use imagick (if installed, falls back to GD), + // set to 2 to use the ImageMagick convert binary directly: + 'image_library' => 1, + // Uncomment the following to define an array of resource limits + // for imagick: + /* + 'imagick_resource_limits' => array( + imagick::RESOURCETYPE_MAP => 32, + imagick::RESOURCETYPE_MEMORY => 32 + ), + */ + // Command or path for to the ImageMagick convert binary: + 'convert_bin' => 'convert', + // Uncomment the following to add parameters in front of each + // ImageMagick convert call (the limit constraints seem only + // to have an effect if put in front): + /* + 'convert_params' => '-limit memory 32MiB -limit map 32MiB', + */ + // Command or path for to the ImageMagick identify binary: + 'identify_bin' => 'identify', + 'image_versions' => array( + // The empty image version key defines options for the original image: + '' => array( + // Automatically rotate images based on EXIF meta data: + 'auto_orient' => true + ), + // Uncomment the following to create medium sized images: + /* + 'medium' => array( + 'max_width' => 800, + 'max_height' => 600 + ), + */ + 'thumbnail' => array( + // Uncomment the following to use a defined directory for the thumbnails + // instead of a subdirectory based on the version identifier. + // Make sure that this directory doesn't allow execution of files if you + // don't pose any restrictions on the type of uploaded files, e.g. by + // copying the .htaccess file from the files directory for Apache: + //'upload_dir' => dirname($this->get_server_var('SCRIPT_FILENAME')).'/thumb/', + //'upload_url' => $this->get_full_url().'/thumb/', + // Uncomment the following to force the max + // dimensions and e.g. create square thumbnails: + //'crop' => true, + 'max_width' => 80, + 'max_height' => 80 + ) + ) + ); + if ($options) { + $this->options = $options + $this->options; + } + if ($error_messages) { + $this->error_messages = $error_messages + $this->error_messages; + } + if ($initialize) { + $this->initialize(); + } + } + + protected function initialize() { + switch ($this->get_server_var('REQUEST_METHOD')) { + case 'OPTIONS': + case 'HEAD': + $this->head(); + break; + case 'GET': + if( $_GET['del'] ){ + $this->delete(); + } else { + $this->get(); + } + break; + case 'PATCH': + case 'PUT': + case 'POST': + $this->post(); + break; + case 'DELETE': + $this->delete(); + break; + default: + $this->header('HTTP/1.1 405 Method Not Allowed'); + } + } + + protected function get_full_url() { + $https = !empty($_SERVER['HTTPS']) && strcasecmp($_SERVER['HTTPS'], 'on') === 0; + return + ($https ? 'https://' : 'http://'). + (!empty($_SERVER['REMOTE_USER']) ? $_SERVER['REMOTE_USER'].'@' : ''). + (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ($_SERVER['SERVER_NAME']. + ($https && $_SERVER['SERVER_PORT'] === 443 || + $_SERVER['SERVER_PORT'] === 80 ? '' : ':'.$_SERVER['SERVER_PORT']))). + substr($_SERVER['SCRIPT_NAME'],0, strrpos($_SERVER['SCRIPT_NAME'], '/')); + } + + protected function get_user_id() { + @session_start(); + return session_id(); + } + + protected function get_user_path() { + if ($this->options['user_dirs']) { + return $this->get_user_id().'/'; + } + return ''; + } + + protected function get_upload_path($file_name = null, $version = null) { + $file_name = $file_name ? $file_name : ''; + if (empty($version)) { + $version_path = ''; + } else { + $version_dir = @$this->options['image_versions'][$version]['upload_dir']; + if ($version_dir) { + return $version_dir.$this->get_user_path().$file_name; + } + $version_path = $version.'/'; + } + return $this->options['upload_dir'].$this->get_user_path() + .$version_path.$file_name; + } + + protected function get_query_separator($url) { + return strpos($url, '?') === false ? '?' : '&'; + } + + protected function get_download_url($file_name, $version = null, $direct = false) { + if (!$direct && $this->options['download_via_php']) { + $url = $this->options['script_url'] + .$this->get_query_separator($this->options['script_url']) + .$this->get_singular_param_name() + .'='.rawurlencode($file_name); + if ($version) { + $url .= '&version='.rawurlencode($version); + } + return $url.'&download=1'; + } + if (empty($version)) { + $version_path = ''; + } else { + $version_url = @$this->options['image_versions'][$version]['upload_url']; + if ($version_url) { + return $version_url.$this->get_user_path().rawurlencode($file_name); + } + $version_path = rawurlencode($version).'/'; + } + return $this->options['upload_url'].$this->get_user_path() + .$version_path.rawurlencode($file_name); + } + + protected function set_additional_file_properties($file) { + $file->deleteUrl = $this->options['script_url'] + .$this->get_query_separator($this->options['script_url']) + .$this->get_singular_param_name() + .'='.rawurlencode($file->name); + $file->deleteType = $this->options['delete_type']; + if ($file->deleteType !== 'DELETE') { + $file->deleteUrl .= '&_method=DELETE'; + } + if ($this->options['access_control_allow_credentials']) { + $file->deleteWithCredentials = true; + } + } + + // Fix for overflowing signed 32 bit integers, + // works for sizes up to 2^32-1 bytes (4 GiB - 1): + protected function fix_integer_overflow($size) { + if ($size < 0) { + $size += 2.0 * (PHP_INT_MAX + 1); + } + return $size; + } + + protected function get_file_size($file_path, $clear_stat_cache = false) { + if ($clear_stat_cache) { + if (version_compare(PHP_VERSION, '5.3.0') >= 0) { + clearstatcache(true, $file_path); + } else { + clearstatcache(); + } + } + return $this->fix_integer_overflow(filesize($file_path)); + } + + protected function is_valid_file_object($file_name) { + $file_path = $this->get_upload_path($file_name); + if (is_file($file_path) && $file_name[0] !== '.') { + return true; + } + return false; + } + + protected function get_file_object($file_name) { + if ($this->is_valid_file_object($file_name)) { + $file = new \stdClass(); + $file->name = iconv('UTF-8', 'UTF-8//IGNORE', $file_name); + $file->size = $this->get_file_size( + $this->get_upload_path($file_name) + ); + $img_width_height = $this->get_image_size($this->get_upload_path($file_name)); + $file->width = $img_width_height[0]; + $file->height = $img_width_height[1]; + $file->url = $this->get_download_url($file->name); + foreach($this->options['image_versions'] as $version => $options) { + if (!empty($version)) { + if (is_file($this->get_upload_path($file_name, $version))) { + $file->{$version.'Url'} = $this->get_download_url( + $file->name, + $version + ); + } + } + } + $this->set_additional_file_properties($file); + return $file; + } + return null; + } + + protected function get_file_objects($iteration_method = 'get_file_object') { + $upload_dir = $this->get_upload_path(); + if (!is_dir($upload_dir)) { + return array(); + } + return array_values(array_filter(array_map( + array($this, $iteration_method), + scandir($upload_dir) + ))); + } + + protected function count_file_objects() { + return count($this->get_file_objects('is_valid_file_object')); + } + + protected function get_error_message($error) { + return array_key_exists($error, $this->error_messages) ? + $this->error_messages[$error] : $error; + } + + function get_config_bytes($val) { + $val = trim($val); + $last = strtolower($val[strlen($val)-1]); + switch($last) { + case 'g': + $val *= 1024; + case 'm': + $val *= 1024; + case 'k': + $val *= 1024; + } + return $this->fix_integer_overflow($val); + } + + protected function validate($uploaded_file, $file, $error, $index) { + if ($error) { + $file->error = $this->get_error_message($error); + return false; + } + $content_length = $this->fix_integer_overflow(intval( + $this->get_server_var('CONTENT_LENGTH') + )); + $post_max_size = $this->get_config_bytes(ini_get('post_max_size')); + if ($post_max_size && ($content_length > $post_max_size)) { + $file->error = $this->get_error_message('post_max_size'); + return false; + } + if (!preg_match($this->options['accept_file_types'], $file->name)) { + $file->error = $this->get_error_message('accept_file_types'); + return false; + } + if ($uploaded_file && is_uploaded_file($uploaded_file)) { + $file_size = $this->get_file_size($uploaded_file); + } else { + $file_size = $content_length; + } + if ($this->options['max_file_size'] && ( + $file_size > $this->options['max_file_size'] || + $file->size > $this->options['max_file_size']) + ) { + $file->error = $this->get_error_message('max_file_size'); + return false; + } + if ($this->options['min_file_size'] && + $file_size < $this->options['min_file_size']) { + $file->error = $this->get_error_message('min_file_size'); + return false; + } + if (is_int($this->options['max_number_of_files']) && + ($this->count_file_objects() >= $this->options['max_number_of_files']) && + // Ignore additional chunks of existing files: + !is_file($this->get_upload_path($file->name))) { + $file->error = $this->get_error_message('max_number_of_files'); + return false; + } + $max_width = @$this->options['max_width']; + $max_height = @$this->options['max_height']; + $min_width = @$this->options['min_width']; + $min_height = @$this->options['min_height']; + if (($max_width || $max_height || $min_width || $min_height) + && preg_match($this->options['image_file_types'], $file->name)) { + list($img_width, $img_height) = $this->get_image_size($uploaded_file); + } + + if (!empty($img_width)) { + if ($max_width && $img_width > $max_width) { + $file->error = $this->get_error_message('max_width'); + return false; + } + if ($max_height && $img_height > $max_height) { + $file->error = $this->get_error_message('max_height'); + return false; + } + if ($min_width && $img_width < $min_width) { + $file->error = $this->get_error_message('min_width'); + return false; + } + if ($min_height && $img_height < $min_height) { + $file->error = $this->get_error_message('min_height'); + return false; + } + } + return true; + } + + protected function upcount_name_callback($matches) { + $index = isset($matches[1]) ? intval($matches[1]) + 1 : 1; + $ext = isset($matches[2]) ? $matches[2] : ''; + return ' ('.$index.')'.$ext; + } + + protected function upcount_name($name) { + return preg_replace_callback( + '/(?:(?: \(([\d]+)\))?(\.[^.]+))?$/', + array($this, 'upcount_name_callback'), + $name, + 1 + ); + } + + protected function get_unique_filename($file_path, $name, $size, $type, $error, + $index, $content_range) { + while(is_dir($this->get_upload_path($name))) { + $name = $this->upcount_name($name); + } + // Keep an existing filename if this is part of a chunked upload: + $uploaded_bytes = $this->fix_integer_overflow(intval($content_range[1])); + while(is_file($this->get_upload_path($name))) { + if ($uploaded_bytes === $this->get_file_size( + $this->get_upload_path($name))) { + break; + } + $name = $this->upcount_name($name); + } + return $name; + } + + protected function trim_file_name($file_path, $name, $size, $type, $error, + $index, $content_range) { + // Remove path information and dots around the filename, to prevent uploading + // into different directories or replacing hidden system files. + // Also remove control characters and spaces (\x00..\x20) around the filename: + $name = trim(basename(stripslashes($name)), ".\x00..\x20"); + // Use a timestamp for empty filenames: + if (!$name) { + $name = str_replace('.', '-', microtime(true)); + } + // Add missing file extension for known image types: + if (strpos($name, '.') === false && + preg_match('/^image\/(gif|jpe?g|png)/', $type, $matches)) { + $name .= '.'.$matches[1]; + } + if (function_exists('exif_imagetype')) { + switch(@exif_imagetype($file_path)){ + case IMAGETYPE_JPEG: + $extensions = array('jpg', 'jpeg'); + break; + case IMAGETYPE_PNG: + $extensions = array('png'); + break; + case IMAGETYPE_GIF: + $extensions = array('gif'); + break; + } + // Adjust incorrect image file extensions: + if (!empty($extensions)) { + $parts = explode('.', $name); + $extIndex = count($parts) - 1; + $ext = strtolower(@$parts[$extIndex]); + if (!in_array($ext, $extensions)) { + $parts[$extIndex] = $extensions[0]; + $name = implode('.', $parts); + } + } + } + return $name; + } + + protected function get_file_name($file_path, $name, $size, $type, $error, + $index, $content_range) { + return $this->get_unique_filename( + $file_path, + $this->trim_file_name($file_path, $name, $size, $type, $error, + $index, $content_range), + $size, + $type, + $error, + $index, + $content_range + ); + } + + protected function handle_form_data($file, $index) { + // Handle form data, e.g. $_REQUEST['description'][$index] + } + + protected function get_scaled_image_file_paths($file_name, $version) { + $file_path = $this->get_upload_path($file_name); + if (!empty($version)) { + $version_dir = $this->get_upload_path(null, $version); + if (!is_dir($version_dir)) { + mkdir($version_dir, $this->options['mkdir_mode'], true); + } + $new_file_path = $version_dir.'/'.$file_name; + } else { + $new_file_path = $file_path; + } + return array($file_path, $new_file_path); + } + + protected function gd_get_image_object($file_path, $func, $no_cache = false) { + if (empty($this->image_objects[$file_path]) || $no_cache) { + $this->gd_destroy_image_object($file_path); + $this->image_objects[$file_path] = $func($file_path); + } + return $this->image_objects[$file_path]; + } + + protected function gd_set_image_object($file_path, $image) { + $this->gd_destroy_image_object($file_path); + $this->image_objects[$file_path] = $image; + } + + protected function gd_destroy_image_object($file_path) { + $image = @$this->image_objects[$file_path]; + return $image && imagedestroy($image); + } + + protected function gd_imageflip($image, $mode) { + if (function_exists('imageflip')) { + return imageflip($image, $mode); + } + $new_width = $src_width = imagesx($image); + $new_height = $src_height = imagesy($image); + $new_img = imagecreatetruecolor($new_width, $new_height); + $src_x = 0; + $src_y = 0; + switch ($mode) { + case '1': // flip on the horizontal axis + $src_y = $new_height - 1; + $src_height = -$new_height; + break; + case '2': // flip on the vertical axis + $src_x = $new_width - 1; + $src_width = -$new_width; + break; + case '3': // flip on both axes + $src_y = $new_height - 1; + $src_height = -$new_height; + $src_x = $new_width - 1; + $src_width = -$new_width; + break; + default: + return $image; + } + imagecopyresampled( + $new_img, + $image, + 0, + 0, + $src_x, + $src_y, + $new_width, + $new_height, + $src_width, + $src_height + ); + return $new_img; + } + + protected function gd_orient_image($file_path, $src_img) { + if (!function_exists('exif_read_data')) { + return false; + } + $exif = @exif_read_data($file_path); + if ($exif === false) { + return false; + } + $orientation = intval(@$exif['Orientation']); + if ($orientation < 2 || $orientation > 8) { + return false; + } + switch ($orientation) { + case 2: + $new_img = $this->gd_imageflip( + $src_img, + defined('IMG_FLIP_VERTICAL') ? IMG_FLIP_VERTICAL : 2 + ); + break; + case 3: + $new_img = imagerotate($src_img, 180, 0); + break; + case 4: + $new_img = $this->gd_imageflip( + $src_img, + defined('IMG_FLIP_HORIZONTAL') ? IMG_FLIP_HORIZONTAL : 1 + ); + break; + case 5: + $tmp_img = $this->gd_imageflip( + $src_img, + defined('IMG_FLIP_HORIZONTAL') ? IMG_FLIP_HORIZONTAL : 1 + ); + $new_img = imagerotate($tmp_img, 270, 0); + imagedestroy($tmp_img); + break; + case 6: + $new_img = imagerotate($src_img, 270, 0); + break; + case 7: + $tmp_img = $this->gd_imageflip( + $src_img, + defined('IMG_FLIP_VERTICAL') ? IMG_FLIP_VERTICAL : 2 + ); + $new_img = imagerotate($tmp_img, 270, 0); + imagedestroy($tmp_img); + break; + case 8: + $new_img = imagerotate($src_img, 90, 0); + break; + default: + return false; + } + $this->gd_set_image_object($file_path, $new_img); + return true; + } + + protected function gd_create_scaled_image($file_name, $version, $options) { + if (!function_exists('imagecreatetruecolor')) { + error_log('Function not found: imagecreatetruecolor'); + return false; + } + list($file_path, $new_file_path) = + $this->get_scaled_image_file_paths($file_name, $version); + $type = strtolower(substr(strrchr($file_name, '.'), 1)); + switch ($type) { + case 'jpg': + case 'jpeg': + $src_func = 'imagecreatefromjpeg'; + $write_func = 'imagejpeg'; + $image_quality = isset($options['jpeg_quality']) ? + $options['jpeg_quality'] : 75; + break; + case 'gif': + $src_func = 'imagecreatefromgif'; + $write_func = 'imagegif'; + $image_quality = null; + break; + case 'png': + $src_func = 'imagecreatefrompng'; + $write_func = 'imagepng'; + $image_quality = isset($options['png_quality']) ? + $options['png_quality'] : 9; + break; + default: + return false; + } + $src_img = $this->gd_get_image_object( + $file_path, + $src_func, + !empty($options['no_cache']) + ); + $image_oriented = false; + if (!empty($options['auto_orient']) && $this->gd_orient_image( + $file_path, + $src_img + )) { + $image_oriented = true; + $src_img = $this->gd_get_image_object( + $file_path, + $src_func + ); + } + $max_width = $img_width = imagesx($src_img); + $max_height = $img_height = imagesy($src_img); + if (!empty($options['max_width'])) { + $max_width = $options['max_width']; + } + if (!empty($options['max_height'])) { + $max_height = $options['max_height']; + } + $scale = min( + $max_width / $img_width, + $max_height / $img_height + ); + if ($scale >= 1) { + if ($image_oriented) { + return $write_func($src_img, $new_file_path, $image_quality); + } + if ($file_path !== $new_file_path) { + return copy($file_path, $new_file_path); + } + return true; + } + if (empty($options['crop'])) { + $new_width = $img_width * $scale; + $new_height = $img_height * $scale; + $dst_x = 0; + $dst_y = 0; + $new_img = imagecreatetruecolor($new_width, $new_height); + } else { + if (($img_width / $img_height) >= ($max_width / $max_height)) { + $new_width = $img_width / ($img_height / $max_height); + $new_height = $max_height; + } else { + $new_width = $max_width; + $new_height = $img_height / ($img_width / $max_width); + } + $dst_x = 0 - ($new_width - $max_width) / 2; + $dst_y = 0 - ($new_height - $max_height) / 2; + $new_img = imagecreatetruecolor($max_width, $max_height); + } + // Handle transparency in GIF and PNG images: + switch ($type) { + case 'gif': + case 'png': + imagecolortransparent($new_img, imagecolorallocate($new_img, 0, 0, 0)); + case 'png': + imagealphablending($new_img, false); + imagesavealpha($new_img, true); + break; + } + $success = imagecopyresampled( + $new_img, + $src_img, + $dst_x, + $dst_y, + 0, + 0, + $new_width, + $new_height, + $img_width, + $img_height + ) && $write_func($new_img, $new_file_path, $image_quality); + $this->gd_set_image_object($file_path, $new_img); + return $success; + } + + protected function imagick_get_image_object($file_path, $no_cache = false) { + if (empty($this->image_objects[$file_path]) || $no_cache) { + $this->imagick_destroy_image_object($file_path); + $image = new \Imagick(); + if (!empty($this->options['imagick_resource_limits'])) { + foreach ($this->options['imagick_resource_limits'] as $type => $limit) { + $image->setResourceLimit($type, $limit); + } + } + $image->readImage($file_path); + $this->image_objects[$file_path] = $image; + } + return $this->image_objects[$file_path]; + } + + protected function imagick_set_image_object($file_path, $image) { + $this->imagick_destroy_image_object($file_path); + $this->image_objects[$file_path] = $image; + } + + protected function imagick_destroy_image_object($file_path) { + $image = @$this->image_objects[$file_path]; + return $image && $image->destroy(); + } + + protected function imagick_orient_image($image) { + $orientation = $image->getImageOrientation(); + $background = new \ImagickPixel('none'); + switch ($orientation) { + case \imagick::ORIENTATION_TOPRIGHT: // 2 + $image->flopImage(); // horizontal flop around y-axis + break; + case \imagick::ORIENTATION_BOTTOMRIGHT: // 3 + $image->rotateImage($background, 180); + break; + case \imagick::ORIENTATION_BOTTOMLEFT: // 4 + $image->flipImage(); // vertical flip around x-axis + break; + case \imagick::ORIENTATION_LEFTTOP: // 5 + $image->flopImage(); // horizontal flop around y-axis + $image->rotateImage($background, 270); + break; + case \imagick::ORIENTATION_RIGHTTOP: // 6 + $image->rotateImage($background, 90); + break; + case \imagick::ORIENTATION_RIGHTBOTTOM: // 7 + $image->flipImage(); // vertical flip around x-axis + $image->rotateImage($background, 270); + break; + case \imagick::ORIENTATION_LEFTBOTTOM: // 8 + $image->rotateImage($background, 270); + break; + default: + return false; + } + $image->setImageOrientation(\imagick::ORIENTATION_TOPLEFT); // 1 + return true; + } + + protected function imagick_create_scaled_image($file_name, $version, $options) { + list($file_path, $new_file_path) = + $this->get_scaled_image_file_paths($file_name, $version); + $image = $this->imagick_get_image_object( + $file_path, + !empty($options['no_cache']) + ); + if ($image->getImageFormat() === 'GIF') { + // Handle animated GIFs: + $images = $image->coalesceImages(); + foreach ($images as $frame) { + $image = $frame; + $this->imagick_set_image_object($file_name, $image); + break; + } + } + $image_oriented = false; + if (!empty($options['auto_orient'])) { + $image_oriented = $this->imagick_orient_image($image); + } + $new_width = $max_width = $img_width = $image->getImageWidth(); + $new_height = $max_height = $img_height = $image->getImageHeight(); + if (!empty($options['max_width'])) { + $new_width = $max_width = $options['max_width']; + } + if (!empty($options['max_height'])) { + $new_height = $max_height = $options['max_height']; + } + if (!($image_oriented || $max_width < $img_width || $max_height < $img_height)) { + if ($file_path !== $new_file_path) { + return copy($file_path, $new_file_path); + } + return true; + } + $crop = !empty($options['crop']); + if ($crop) { + $x = 0; + $y = 0; + if (($img_width / $img_height) >= ($max_width / $max_height)) { + $new_width = 0; // Enables proportional scaling based on max_height + $x = ($img_width / ($img_height / $max_height) - $max_width) / 2; + } else { + $new_height = 0; // Enables proportional scaling based on max_width + $y = ($img_height / ($img_width / $max_width) - $max_height) / 2; + } + } + $success = $image->resizeImage( + $new_width, + $new_height, + isset($options['filter']) ? $options['filter'] : \imagick::FILTER_LANCZOS, + isset($options['blur']) ? $options['blur'] : 1, + $new_width && $new_height // fit image into constraints if not to be cropped + ); + if ($success && $crop) { + $success = $image->cropImage( + $max_width, + $max_height, + $x, + $y + ); + if ($success) { + $success = $image->setImagePage($max_width, $max_height, 0, 0); + } + } + $type = strtolower(substr(strrchr($file_name, '.'), 1)); + switch ($type) { + case 'jpg': + case 'jpeg': + if (!empty($options['jpeg_quality'])) { + $image->setImageCompression(\imagick::COMPRESSION_JPEG); + $image->setImageCompressionQuality($options['jpeg_quality']); + } + break; + } + if (!empty($options['strip'])) { + $image->stripImage(); + } + return $success && $image->writeImage($new_file_path); + } + + protected function imagemagick_create_scaled_image($file_name, $version, $options) { + list($file_path, $new_file_path) = + $this->get_scaled_image_file_paths($file_name, $version); + $resize = @$options['max_width'] + .(empty($options['max_height']) ? '' : 'X'.$options['max_height']); + if (!$resize && empty($options['auto_orient'])) { + if ($file_path !== $new_file_path) { + return copy($file_path, $new_file_path); + } + return true; + } + $cmd = $this->options['convert_bin']; + if (!empty($this->options['convert_params'])) { + $cmd .= ' '.$this->options['convert_params']; + } + $cmd .= ' '.escapeshellarg($file_path); + if (!empty($options['auto_orient'])) { + $cmd .= ' -auto-orient'; + } + if ($resize) { + // Handle animated GIFs: + $cmd .= ' -coalesce'; + if (empty($options['crop'])) { + $cmd .= ' -resize '.escapeshellarg($resize.'>'); + } else { + $cmd .= ' -resize '.escapeshellarg($resize.'^'); + $cmd .= ' -gravity center'; + $cmd .= ' -crop '.escapeshellarg($resize.'+0+0'); + } + // Make sure the page dimensions are correct (fixes offsets of animated GIFs): + $cmd .= ' +repage'; + } + if (!empty($options['convert_params'])) { + $cmd .= ' '.$options['convert_params']; + } + $cmd .= ' '.escapeshellarg($new_file_path); + exec($cmd, $output, $error); + if ($error) { + error_log(implode('\n', $output)); + return false; + } + return true; + } + + protected function get_image_size($file_path) { + if ($this->options['image_library']) { + if (extension_loaded('imagick')) { + $image = new \Imagick(); + try { + if (@$image->pingImage($file_path)) { + $dimensions = array($image->getImageWidth(), $image->getImageHeight()); + $image->destroy(); + return $dimensions; + } + return false; + } catch (Exception $e) { + error_log($e->getMessage()); + } + } + if ($this->options['image_library'] === 2) { + $cmd = $this->options['identify_bin']; + $cmd .= ' -ping '.escapeshellarg($file_path); + exec($cmd, $output, $error); + if (!$error && !empty($output)) { + // image.jpg JPEG 1920x1080 1920x1080+0+0 8-bit sRGB 465KB 0.000u 0:00.000 + $infos = preg_split('/\s+/', $output[0]); + $dimensions = preg_split('/x/', $infos[2]); + return $dimensions; + } + return false; + } + } + if (!function_exists('getimagesize')) { + error_log('Function not found: getimagesize'); + return false; + } + return @getimagesize($file_path); + } + + protected function create_scaled_image($file_name, $version, $options) { + if ($this->options['image_library'] === 2) { + return $this->imagemagick_create_scaled_image($file_name, $version, $options); + } + if ($this->options['image_library'] && extension_loaded('imagick')) { + return $this->imagick_create_scaled_image($file_name, $version, $options); + } + return $this->gd_create_scaled_image($file_name, $version, $options); + } + + protected function destroy_image_object($file_path) { + if ($this->options['image_library'] && extension_loaded('imagick')) { + return $this->imagick_destroy_image_object($file_path); + } + } + + protected function is_valid_image_file($file_path) { + if (!preg_match($this->options['image_file_types'], $file_path)) { + return false; + } + if (function_exists('exif_imagetype')) { + return @exif_imagetype($file_path); + } + $image_info = $this->get_image_size($file_path); + return $image_info && $image_info[0] && $image_info[1]; + } + + protected function handle_image_file($file_path, $file) { + $failed_versions = array(); + foreach($this->options['image_versions'] as $version => $options) { + if ($this->create_scaled_image($file->name, $version, $options)) { + if (!empty($version)) { + $file->{$version.'Url'} = $this->get_download_url( + $file->name, + $version + ); + } else { + $file->size = $this->get_file_size($file_path, true); + } + } else { + $failed_versions[] = $version ? $version : 'original'; + } + } + if (count($failed_versions)) { + $file->error = $this->get_error_message('image_resize') + .' ('.implode($failed_versions,', ').')'; + } + // Free memory: + $this->destroy_image_object($file_path); + } + + protected function get_microtime(){ + list($usec, $sec) = explode(" ",microtime()); + return ((float)$usec + (float)$sec); + } + + protected function get_file_passname(){ + $tmp_name = $this->get_user_id().$_SERVER['REMOTE_ADDR']; + $tmp_name = md5(sha1($tmp_name)); + return $tmp_name; + } + + protected function handle_file_upload($uploaded_file, $name, $size, $type, $error, + $index = null, $content_range = null) { + $file = new \stdClass(); + $file->oriname = $this->get_file_name($uploaded_file, $name, $size, $type, $error, + $index, $content_range); + + $filename_ext = pathinfo($name, PATHINFO_EXTENSION); + $file->name = $this->get_file_passname().'_'.str_replace(".", "_", $this->get_microtime()).".".$filename_ext; + + //$file->name = iconv('UTF-8', 'UTF-8//IGNORE', utf8_encode($file->name)); + $file->size = $this->fix_integer_overflow(intval($size)); + $file->type = $type; + if ($this->validate($uploaded_file, $file, $error, $index)) { + $this->handle_form_data($file, $index); + $upload_dir = $this->get_upload_path(); + if (!is_dir($upload_dir)) { + mkdir($upload_dir, $this->options['mkdir_mode'], true); + } + $file_path = $this->get_upload_path($file->name); + $append_file = $content_range && is_file($file_path) && + $file->size > $this->get_file_size($file_path); + if ($uploaded_file && is_uploaded_file($uploaded_file)) { + // multipart/formdata uploads (POST method uploads) + if ($append_file) { + file_put_contents( + $file_path, + fopen($uploaded_file, 'r'), + FILE_APPEND + ); + } else { + move_uploaded_file($uploaded_file, $file_path); + } + } else { + // Non-multipart uploads (PUT method support) + file_put_contents( + $file_path, + fopen('php://input', 'r'), + $append_file ? FILE_APPEND : 0 + ); + } + $file_size = $this->get_file_size($file_path, $append_file); + if ($file_size === $file->size) { + $file->url = $this->get_download_url($file->name); + if ($this->is_valid_image_file($file_path)) { + $this->handle_image_file($file_path, $file); + $image_width_height = $this->get_image_size($file_path); + $file->width = $image_width_height[0]; + $file->height = $image_width_height[1]; + } + } else { + $file->size = $file_size; + if (!$content_range && $this->options['discard_aborted_uploads']) { + unlink($file_path); + $file->error = $this->get_error_message('abort'); + } + } + $this->set_additional_file_properties($file); + } + return $file; + } + + protected function readfile($file_path) { + $file_size = $this->get_file_size($file_path); + $chunk_size = $this->options['readfile_chunk_size']; + if ($chunk_size && $file_size > $chunk_size) { + $handle = fopen($file_path, 'rb'); + while (!feof($handle)) { + echo fread($handle, $chunk_size); + ob_flush(); + flush(); + } + fclose($handle); + return $file_size; + } + return readfile($file_path); + } + + protected function body($str) { + echo $str; + } + + protected function header($str) { + header($str); + } + + protected function get_server_var($id) { + return isset($_SERVER[$id]) ? $_SERVER[$id] : ''; + } + + protected function generate_response($content, $print_response = true) { + if ($print_response) { + $json = json_encode($content); + + if ( json_last_error() ){ + switch (json_last_error()) { + case JSON_ERROR_NONE: + echo ' - No errors'; + break; + case JSON_ERROR_DEPTH: + echo ' - Maximum stack depth exceeded'; + break; + case JSON_ERROR_STATE_MISMATCH: + echo ' - Underflow or the modes mismatch'; + break; + case JSON_ERROR_CTRL_CHAR: + echo ' - Unexpected control character found'; + break; + case JSON_ERROR_SYNTAX: + echo ' - Syntax error, malformed JSON'; + break; + case JSON_ERROR_UTF8: + echo ' - Malformed UTF-8 characters, possibly incorrectly encoded'; + break; + default: + echo ' - Unknown error'; + break; + } + + echo PHP_EOL; + } + $redirect = isset($_REQUEST['redirect']) ? + stripslashes($_REQUEST['redirect']) : null; + if ($redirect) { + $this->header('Location: '.sprintf($redirect, rawurlencode($json))); + return; + } + $this->head(); + if ($this->get_server_var('HTTP_CONTENT_RANGE')) { + $files = isset($content[$this->options['param_name']]) ? + $content[$this->options['param_name']] : null; + if ($files && is_array($files) && is_object($files[0]) && $files[0]->size) { + $this->header('Range: 0-'.( + $this->fix_integer_overflow(intval($files[0]->size)) - 1 + )); + } + } + $this->body($json); + } + return $content; + } + + protected function get_version_param() { + return isset($_GET['version']) ? basename(stripslashes($_GET['version'])) : null; + } + + protected function get_singular_param_name() { + return substr($this->options['param_name'], 0, -1); + } + + protected function get_file_name_param() { + $name = $this->get_singular_param_name(); + return isset($_GET[$name]) ? basename(stripslashes($_GET[$name])) : null; + } + + protected function get_file_names_params() { + $params = isset($_GET[$this->options['param_name']]) ? + $_GET[$this->options['param_name']] : array(); + foreach ($params as $key => $value) { + $params[$key] = basename(stripslashes($value)); + } + return $params; + } + + protected function get_file_type($file_path) { + switch (strtolower(pathinfo($file_path, PATHINFO_EXTENSION))) { + case 'jpeg': + case 'jpg': + return 'image/jpeg'; + case 'png': + return 'image/png'; + case 'gif': + return 'image/gif'; + default: + return ''; + } + } + + protected function download() { + switch ($this->options['download_via_php']) { + case 1: + $redirect_header = null; + break; + case 2: + $redirect_header = 'X-Sendfile'; + break; + case 3: + $redirect_header = 'X-Accel-Redirect'; + break; + default: + return $this->header('HTTP/1.1 403 Forbidden'); + } + $file_name = $this->get_file_name_param(); + if (!$this->is_valid_file_object($file_name)) { + return $this->header('HTTP/1.1 404 Not Found'); + } + if ($redirect_header) { + return $this->header( + $redirect_header.': '.$this->get_download_url( + $file_name, + $this->get_version_param(), + true + ) + ); + } + $file_path = $this->get_upload_path($file_name, $this->get_version_param()); + // Prevent browsers from MIME-sniffing the content-type: + $this->header('X-Content-Type-Options: nosniff'); + if (!preg_match($this->options['inline_file_types'], $file_name)) { + $this->header('Content-Type: application/octet-stream'); + $this->header('Content-Disposition: attachment; filename="'.$file_name.'"'); + } else { + $this->header('Content-Type: '.$this->get_file_type($file_path)); + $this->header('Content-Disposition: inline; filename="'.$file_name.'"'); + } + $this->header('Content-Length: '.$this->get_file_size($file_path)); + $this->header('Last-Modified: '.gmdate('D, d M Y H:i:s T', filemtime($file_path))); + $this->readfile($file_path); + } + + protected function send_content_type_header() { + $this->header('Vary: Accept'); + if (strpos($this->get_server_var('HTTP_ACCEPT'), 'application/json') !== false) { + $this->header('Content-type: application/json'); + } else { + $this->header('Content-type: text/plain'); + } + } + + protected function send_access_control_headers() { + $this->header('Access-Control-Allow-Origin: '.$this->options['access_control_allow_origin']); + $this->header('Access-Control-Allow-Credentials: ' + .($this->options['access_control_allow_credentials'] ? 'true' : 'false')); + $this->header('Access-Control-Allow-Methods: ' + .implode(', ', $this->options['access_control_allow_methods'])); + $this->header('Access-Control-Allow-Headers: ' + .implode(', ', $this->options['access_control_allow_headers'])); + } + + public function head() { + $this->header('Pragma: no-cache'); + $this->header('Cache-Control: no-store, no-cache, must-revalidate'); + $this->header('Content-Disposition: inline; filename="files.json"'); + // Prevent Internet Explorer from MIME-sniffing the content-type: + $this->header('X-Content-Type-Options: nosniff'); + if ($this->options['access_control_allow_origin']) { + $this->send_access_control_headers(); + } + $this->send_content_type_header(); + } + + public function get($print_response = true) { + //보안 이슈로 인해 사용하지 않습니다. + /* + if ($print_response && isset($_GET['download'])) { + return $this->download(); + } + $file_name = $this->get_file_name_param(); + if ($file_name) { + $response = array( + $this->get_singular_param_name() => $this->get_file_object($file_name) + ); + } else { + $response = array( + $this->options['param_name'] => $this->get_file_objects() + ); + } + return $this->generate_response($response, $print_response); + */ + } + + public function post($print_response = true) { + if (isset($_REQUEST['_method']) && $_REQUEST['_method'] === 'DELETE') { + return $this->delete($print_response); + } + $upload = isset($_FILES[$this->options['param_name']]) ? + $_FILES[$this->options['param_name']] : null; + // Parse the Content-Disposition header, if available: + $file_name = $this->get_server_var('HTTP_CONTENT_DISPOSITION') ? + rawurldecode(preg_replace( + '/(^[^"]+")|("$)/', + '', + $this->get_server_var('HTTP_CONTENT_DISPOSITION') + )) : null; + // Parse the Content-Range header, which has the following form: + // Content-Range: bytes 0-524287/2000000 + $content_range = $this->get_server_var('HTTP_CONTENT_RANGE') ? + preg_split('/[^0-9]+/', $this->get_server_var('HTTP_CONTENT_RANGE')) : null; + $size = $content_range ? $content_range[3] : null; + $files = array(); + if ($upload && is_array($upload['tmp_name'])) { + // param_name is an array identifier like "files[]", + // $_FILES is a multi-dimensional array: + foreach ($upload['tmp_name'] as $index => $value) { + $files[] = $this->handle_file_upload( + $upload['tmp_name'][$index], + $file_name ? $file_name : $upload['name'][$index], + $size ? $size : $upload['size'][$index], + $upload['type'][$index], + $upload['error'][$index], + $index, + $content_range + ); + } + } else { + // param_name is a single object identifier like "file", + // $_FILES is a one-dimensional array: + $files[] = $this->handle_file_upload( + isset($upload['tmp_name']) ? $upload['tmp_name'] : null, + $file_name ? $file_name : (isset($upload['name']) ? + $upload['name'] : null), + $size ? $size : (isset($upload['size']) ? + $upload['size'] : $this->get_server_var('CONTENT_LENGTH')), + isset($upload['type']) ? + $upload['type'] : $this->get_server_var('CONTENT_TYPE'), + isset($upload['error']) ? $upload['error'] : null, + null, + $content_range + ); + } + return $this->generate_response( + array($this->options['param_name'] => $files), + $print_response + ); + } + + public function delete($print_response = true) { + /* 보안 이슈 url을 참고 https://github.com/blueimp/jQuery-File-Upload/issues/2426 */ + $file_names = $this->get_file_names_params(); + if (empty($file_names)) { + $file_names = array($this->get_file_name_param()); + } + $response = array(); + foreach($file_names as $file_name) { + if( substr($file_name, 0 , 32) != $this->get_file_passname() ) continue; //session_id() 와 비교하여 틀리면 지우지 않음 + $file_path = $this->get_upload_path($file_name); + $success = is_file($file_path) && $file_name[0] !== '.' && unlink($file_path); + if ($success) { + foreach($this->options['image_versions'] as $version => $options) { + if (!empty($version)) { + $file = $this->get_upload_path($file_name, $version); + if (is_file($file)) { + unlink($file); + } + } + } + } + $response[$file_name] = $success; + } + return $this->generate_response($response, $print_response); + } + +} diff --git a/plugin/editor/smarteditor2/photo_uploader/popup/php/index.php b/plugin/editor/smarteditor2/photo_uploader/popup/php/index.php new file mode 100644 index 000000000..7afd9da51 --- /dev/null +++ b/plugin/editor/smarteditor2/photo_uploader/popup/php/index.php @@ -0,0 +1,32 @@ + $data_dir, + 'upload_url' => $data_url, + // This option will disable creating thumbnail images and will not create that extra folder. + // However, due to this, the images preview will not be displayed after upload + 'image_versions' => array() +); + +$upload_handler = new UploadHandler($options); \ No newline at end of file diff --git a/plugin/editor/smarteditor2/photo_uploader/popup/swfupload/XPButtonUploadText_61x22.png b/plugin/editor/smarteditor2/photo_uploader/popup/swfupload/XPButtonUploadText_61x22.png new file mode 100644 index 000000000..df7aa6eab Binary files /dev/null and b/plugin/editor/smarteditor2/photo_uploader/popup/swfupload/XPButtonUploadText_61x22.png differ diff --git a/plugin/editor/smarteditor2/photo_uploader/popup/swfupload/fileprogress.js b/plugin/editor/smarteditor2/photo_uploader/popup/swfupload/fileprogress.js new file mode 100644 index 000000000..ffe6aee94 --- /dev/null +++ b/plugin/editor/smarteditor2/photo_uploader/popup/swfupload/fileprogress.js @@ -0,0 +1,203 @@ +/* + A simple class for displaying file information and progress + Note: This is a demonstration only and not part of SWFUpload. + Note: Some have had problems adapting this class in IE7. It may not be suitable for your application. +*/ + +// Constructor +// file is a SWFUpload file object +// targetID is the HTML element id attribute that the FileProgress HTML structure will be added to. +// Instantiating a new FileProgress object with an existing file will reuse/update the existing DOM elements +function FileProgress(file, targetID) { + this.fileProgressID = file.id; + + this.opacity = 100; + this.height = 0; + + + this.fileProgressWrapper = document.getElementById(this.fileProgressID); + if (!this.fileProgressWrapper) { + this.fileProgressWrapper = document.createElement("div"); + this.fileProgressWrapper.className = "progressWrapper"; + this.fileProgressWrapper.id = this.fileProgressID; + + this.fileProgressElement = document.createElement("div"); + this.fileProgressElement.className = "progressContainer"; + + var progressCancel = document.createElement("a"); + progressCancel.className = "progressCancel"; + progressCancel.href = "#"; + progressCancel.style.visibility = "hidden"; + progressCancel.appendChild(document.createTextNode(" ")); + + var progressText = document.createElement("div"); + progressText.className = "progressName"; + progressText.appendChild(document.createTextNode(file.name)); + + var progressBar = document.createElement("div"); + progressBar.className = "progressBarInProgress"; + + var progressStatus = document.createElement("div"); + progressStatus.className = "progressBarStatus"; + progressStatus.innerHTML = " "; + + this.fileProgressElement.appendChild(progressCancel); + this.fileProgressElement.appendChild(progressText); + this.fileProgressElement.appendChild(progressStatus); + this.fileProgressElement.appendChild(progressBar); + + this.fileProgressWrapper.appendChild(this.fileProgressElement); + + document.getElementById(targetID).appendChild(this.fileProgressWrapper); + } else { + this.fileProgressElement = this.fileProgressWrapper.firstChild; + this.reset(); + } + + this.height = this.fileProgressWrapper.offsetHeight; + this.setTimer(null); + + +} + +FileProgress.prototype.setTimer = function (timer) { + this.fileProgressElement["FP_TIMER"] = timer; +}; +FileProgress.prototype.getTimer = function (timer) { + return this.fileProgressElement["FP_TIMER"] || null; +}; + +FileProgress.prototype.reset = function () { + this.fileProgressElement.className = "progressContainer"; + + this.fileProgressElement.childNodes[2].innerHTML = " "; + this.fileProgressElement.childNodes[2].className = "progressBarStatus"; + + this.fileProgressElement.childNodes[3].className = "progressBarInProgress"; + this.fileProgressElement.childNodes[3].style.width = "0%"; + + this.appear(); +}; + +FileProgress.prototype.setProgress = function (percentage) { + this.fileProgressElement.className = "progressContainer green"; + this.fileProgressElement.childNodes[3].className = "progressBarInProgress"; + this.fileProgressElement.childNodes[3].style.width = percentage + "%"; + + this.appear(); +}; +FileProgress.prototype.setComplete = function () { + this.fileProgressElement.className = "progressContainer blue"; + this.fileProgressElement.childNodes[3].className = "progressBarComplete"; + this.fileProgressElement.childNodes[3].style.width = ""; + + var oSelf = this; + this.setTimer(setTimeout(function () { + oSelf.disappear(); + }, 10000)); +}; +FileProgress.prototype.setError = function () { + this.fileProgressElement.className = "progressContainer red"; + this.fileProgressElement.childNodes[3].className = "progressBarError"; + this.fileProgressElement.childNodes[3].style.width = ""; + + var oSelf = this; + this.setTimer(setTimeout(function () { + oSelf.disappear(); + }, 5000)); +}; +FileProgress.prototype.setCancelled = function () { + this.fileProgressElement.className = "progressContainer"; + this.fileProgressElement.childNodes[3].className = "progressBarError"; + this.fileProgressElement.childNodes[3].style.width = ""; + + var oSelf = this; + this.setTimer(setTimeout(function () { + oSelf.disappear(); + }, 2000)); +}; +FileProgress.prototype.setStatus = function (status) { + this.fileProgressElement.childNodes[2].innerHTML = status; +}; + +// Show/Hide the cancel button +FileProgress.prototype.toggleCancel = function (show, swfUploadInstance) { + this.fileProgressElement.childNodes[0].style.visibility = show ? "visible" : "hidden"; + if (swfUploadInstance) { + var fileID = this.fileProgressID; + this.fileProgressElement.childNodes[0].onclick = function () { + swfUploadInstance.cancelUpload(fileID); + return false; + }; + } +}; + +FileProgress.prototype.appear = function () { + if (this.getTimer() !== null) { + clearTimeout(this.getTimer()); + this.setTimer(null); + } + + if (this.fileProgressWrapper.filters) { + try { + this.fileProgressWrapper.filters.item("DXImageTransform.Microsoft.Alpha").opacity = 100; + } catch (e) { + // If it is not set initially, the browser will throw an error. This will set it if it is not set yet. + this.fileProgressWrapper.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=100)"; + } + } else { + this.fileProgressWrapper.style.opacity = 1; + } + + this.fileProgressWrapper.style.height = ""; + + this.height = this.fileProgressWrapper.offsetHeight; + this.opacity = 100; + this.fileProgressWrapper.style.display = ""; + +}; + +// Fades out and clips away the FileProgress box. +FileProgress.prototype.disappear = function () { + + var reduceOpacityBy = 15; + var reduceHeightBy = 4; + var rate = 30; // 15 fps + + if (this.opacity > 0) { + this.opacity -= reduceOpacityBy; + if (this.opacity < 0) { + this.opacity = 0; + } + + if (this.fileProgressWrapper.filters) { + try { + this.fileProgressWrapper.filters.item("DXImageTransform.Microsoft.Alpha").opacity = this.opacity; + } catch (e) { + // If it is not set initially, the browser will throw an error. This will set it if it is not set yet. + this.fileProgressWrapper.style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + this.opacity + ")"; + } + } else { + this.fileProgressWrapper.style.opacity = this.opacity / 100; + } + } + + if (this.height > 0) { + this.height -= reduceHeightBy; + if (this.height < 0) { + this.height = 0; + } + + this.fileProgressWrapper.style.height = this.height + "px"; + } + + if (this.height > 0 || this.opacity > 0) { + var oSelf = this; + this.setTimer(setTimeout(function () { + oSelf.disappear(); + }, rate)); + } else { + this.fileProgressWrapper.style.display = "none"; + this.setTimer(null); + } +}; \ No newline at end of file diff --git a/plugin/editor/smarteditor2/photo_uploader/popup/swfupload/handlers.js b/plugin/editor/smarteditor2/photo_uploader/popup/swfupload/handlers.js new file mode 100644 index 000000000..01d7786d8 --- /dev/null +++ b/plugin/editor/smarteditor2/photo_uploader/popup/swfupload/handlers.js @@ -0,0 +1,378 @@ +/* +@author romeojks (romeojks@gmail.com) +@version 0.1 +@brief 파일 업로드 관련 +*/ + +function swfUploadPreLoad() { + var self = this; + var loading = function () { + document.getElementById("divLoadingContent").style.display = ""; + + var longLoad = function () { + document.getElementById("divLoadingContent").style.display = "none"; + document.getElementById("divLongLoading").style.display = ""; + }; + this.customSettings.loadingTimeout = setTimeout(function () { + longLoad.call(self) + }, + 15 * 1000 + ); + }; + + this.customSettings.loadingTimeout = setTimeout(function () { + loading.call(self); + }, + 1*1000 + ); +} + +function swfUploadLoaded() { + var self = this; + clearTimeout(this.customSettings.loadingTimeout); + document.getElementById("divLoadingContent").style.display = "none"; + document.getElementById("divLongLoading").style.display = "none"; + document.getElementById("divAlternateContent").style.display = "none"; +} + +function swfUploadLoadFailed() { + clearTimeout(this.customSettings.loadingTimeout); + document.getElementById("divLoadingContent").style.display = "none"; + document.getElementById("divLongLoading").style.display = "none"; + document.getElementById("divAlternateContent").style.display = ""; +} + +function fileQueued(file) { + try { + var obj = document.getElementById(this.customSettings.fileListAreaID); + var filename = file.name; + + if (filename.length > 20) { + filename = filename.substr(0,20) + "..."; + }; + + var text = filename + " (대기중...)"; + var value = last_bf_no + file.index; + var opt_obj = new Option(text, value, true, true); + obj.options[obj.options.length] = opt_obj; + } catch (ex) { + this.debug(ex); + } +} + +function fileQueueError(file, errorCode, message) { + try { + switch (errorCode) { + case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED : + alert(message == 0 ? "더이상 업로드 할 수 없습니다." : (message == file_upload_limit ? file_upload_limit + "개 까지만 업로드 할 수 있습니다." : file_upload_limit + "개 까지만 업로드 할 수 있습니다.\n\n" + "현재 " + message + "개 남았습니다.")); + break; + case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT : + alert("업로드 가능한 파일 용량(" + file_size_limit + ")을 초과했습니다.\n\n" + "File name: " + file.name + ", File size: " + getfilesize(file.size)); + break; + case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE : + alert("파일 사이즈가 '0' 입니다.\n\n" + "File name: " + file.name + ", File size: " + getfilesize(file.size)); + break; + case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE : + alert("파일 타입이 올바르지 않습니다.\n\n" + "File name: " + file.name + ", File size: " + getfilesize(file.size)); + break; + default : + alert("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + getfilesize(file.size) + ", Message: " + message); + break; + }; + } catch (ex) { + this.debug(ex); + }; +} + +function fileDialogComplete(numFilesSelected, numFilesQueued) { + try { + this.startUpload(); + } catch (ex) { + this.debug(ex); + }; +} + +function uploadStart(file) { + try { + if ((sum_filesize + file.size) > getfilesize1(file_allsize_limit)) { + return false; + } else { + return true; + }; + } catch (ex) { + this.debug(ex); + }; +} + +function uploadProgress(file, bytesLoaded, bytesTotal) { + try { + var obj = document.getElementById(this.customSettings.fileListAreaID); + var percent = Math.ceil((bytesLoaded / bytesTotal) * 100); + var filename = file.name; + + if (filename.length > 20) { + filename = filename.substr(0,20) + "..."; + }; + + var text = filename + " (" + percent + " %)"; + var bf_position = last_bf_no + file.index; + + obj.options[bf_position].text = text; + } catch (ex) { + this.debug(ex); + }; +} + +function uploadSuccess(file, serverData) { + try { + var obj = document.getElementById(this.customSettings.fileListAreaID); + var bf_position = last_bf_no + file.index; + var params = { + "bo_table" : bo_table, + "wr_id" : wr_id, + "w" : w, + "bf_position" : bf_position+1 + }; + + var url = swfupload_path + "/get_file_info.php"; + $.ajax({ + type: 'post', + url: url, + data: params, + success : after_upload_success = function(req) { + var file = eval('('+req+')'); + var file_size = (file.bf_filesize / 1024).toFixed(1); + var text = file.bf_source + " (" + getfilesize(file.bf_filesize) + ")"; + var value = file.bf_no + "|" + file.bf_source + "|" + file.bf_file + "|" + file.bf_filesize + "|" + file.bf_width + "|" + file.bf_type; + obj.options[bf_position].text = text; + obj.options[bf_position].value = value; + eval("preview(file.bf_file)"); + } + }); + + sum_filesize = sum_filesize + file.size; + document.getElementById("uploader_status").innerHTML = "문서첨부제한 : " + getfilesize(sum_filesize) + " / " + file_allsize_limit + "
파일제한크기 : " + file_size_limit + " (허용확장자 : " + file_types_description + ")"; + } catch (ex) { + this.debug(ex); + }; +} + +function uploadError(file, errorCode, message) { + try { + switch (errorCode) { + case SWFUpload.UPLOAD_ERROR.HTTP_ERROR : + alert("네트워크 에러가 발생하였습니다. 관리자에게 문의하세요.\n\n" + "File name: " + file.name); + break; + case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED : + alert("파일 업로드가 실패하였습니다.\n\n" + "File name: " + file.name + ", File size: " + getfilesize(file.size)); + break; + case SWFUpload.UPLOAD_ERROR.IO_ERROR : + alert("입출력 에러가 발생하였습니다.\n\n" + "다른 프로그램에서 이 파일(" + file.name + ")을 사용중인지 확인하세요."); + break; + case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR : + alert("보안 에러가 발생하였습니다. 관리자에게 문의하세요.\n\n" + "File name: " + file.name); + break; + case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED : + alert("업로드 가능한 파일 용량(" + file_size_limit + ")을 초과했습니다.\n\n" + "File name: " + file.name + ", File size: " + getfilesize(file.size)); + break; + case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED : + alert("업로드 가능한 총파일 용량(" + file_allsize_limit + ")을 초과했습니다.\n\n" + "File name: " + file.name + ", File size: " + getfilesize(file.size)); + break; + case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED : + // If there aren't any files left (they were all cancelled) disable the cancel button + if (this.getStats().files_queued === 0) { + document.getElementById(this.customSettings.cancelButtonId).disabled = true; + }; + break; + case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED : + break; + default : + alert("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + getfilesize(file.size) + ", Message: " + message); + break; + } + } catch (ex) { + this.debug(ex); + }; +} + +function uploadComplete(file) { + /*if (this.getStats().files_queued === 0) { + document.getElementById(this.customSettings.cancelButtonId).disabled = true; + }*/ +} + +function getfilesize(size) { + if (!size) { + return "0 Byte"; + }; + if (size < 1024) { + return (size + " Byte"); + } else if (size > 1024 && size < 1024 *1024) { + return (size / 1024).toFixed(1) + " KB"; + } else { + return (size / (1024*1024)).toFixed(2) + " MB"; + }; +} + +function getfilesize1(size) { + var file_size = size.split(" "); + if (!file_size[0]) { + return 0; + }; + if (file_size[1] == "MB") { + return (file_size[0] * (1024*1024)); + } else if (file_size[1] == "KB") { + return (file_size[0] * 1024); + } else { + return (file_size[0]); + }; +} + +function delete_file() { + try { + var obj = document.getElementById("uploaded_file_list"); + var url = swfupload_path + "/file_delete.php"; + for (var i=0; i파일제한크기 : " + file_size_limit + " (허용확장자 : " + file_types_description + ")"; + }; + }; + } catch (ex) { + this.debug(ex); + }; +} + +function delete_file_complete() { + try { + var obj = document.getElementById("uploaded_file_list"); + for (var i=0; i"; + } else if (thumb && thumb_kind == "etc") { + document.getElementById("image_preview").innerHTML = ""; + } else { + document.getElementById("image_preview").innerHTML = "미리보기"; + }; + } catch (ex) { + this.debug(ex); + }; +} + +function file_to_editor() { + try { + var files_list = document.getElementById("uploaded_file_list"); + var html = ''; + + if (!files_list.value) { + alert('파일을 선택해주세요.'); + return false; + }; + + for (var i=0; i"; + } else { + alert("이미지만 삽입 할 수 있습니다."); + //path = "download.php?bo_table=" + bo_table + "&filename=" + file.bf_file + "&filesource=" + file.bf_source + ""; + //html += "" + file.bf_source + "
\n"; + } + }; + }; + insert_editor(html2); + } catch (ex) { + this.debug(ex); + }; +} + +function insert_editor(html) { + try { + ed_wr_content.insertContents(html); + /* + if (typeof(ed_wr_content) != "undefined") + if (geditor_wr_content.get_mode() == "WYSIWYG") { + document.getElementById("geditor_wr_content_frame").contentWindow.document.body.focus(); + geditor_wr_content.get_range(); + html = html + "
"; + } else if (geditor_wr_content.get_mode() == "TEXT") { + html = html + "\n"; + } else { + html = html + "
"; + } + geditor_wr_content.insert_editor(html); + } else { + document.getElementById("wr_content").value += html + "\n"; + } + */ + } catch (ex) { + this.debug(ex); + }; + +} + +function get_file_info(val) { + try { + var arr = val.split('|'); + var ret = {"bf_no":arr[0], "bf_source":arr[1], "bf_file":arr[2], "bf_filesize":arr[3], "bf_width":arr[4], "bf_type":arr[5]}; + return ret; + } catch (ex) { + this.debug(ex); + }; +} diff --git a/plugin/editor/smarteditor2/photo_uploader/popup/swfupload/jquery.swfupload.js b/plugin/editor/smarteditor2/photo_uploader/popup/swfupload/jquery.swfupload.js new file mode 100644 index 000000000..e8f4d5fd1 --- /dev/null +++ b/plugin/editor/smarteditor2/photo_uploader/popup/swfupload/jquery.swfupload.js @@ -0,0 +1,82 @@ +/* + * SWFUpload jQuery Plugin v1.0.0 + * + * Copyright (c) 2009 Adam Royle + * Licensed under the MIT license. + * + */ + +(function($){ + + var defaultHandlers = [ + 'swfupload_preload_handler', + 'swfupload_load_failed_handler', + 'swfupload_loaded_handler', + 'file_dialog_start_handler', + 'file_queued_handler', + 'file_queue_error_handler', + 'file_dialog_complete_handler', + 'upload_resize_start_handler', + 'upload_start_handler', + 'upload_progress_handler', + 'upload_error_handler', + 'upload_success_handler', + 'upload_complete_handler', + 'mouse_click_handler', + 'mouse_out_handler', + 'mouse_over_handler', + 'queue_complete_handler' + ]; + var additionalHandlers = []; + + $.fn.swfupload = function(){ + var args = $.makeArray(arguments); + return this.each(function(){ + var swfu; + if (args.length == 1 && typeof(args[0]) == 'object') { + swfu = $(this).data('__swfu'); + if (!swfu) { + var settings = args[0]; + var $magicUploadControl = $(this); + var handlers = []; + $.merge(handlers, defaultHandlers); + $.merge(handlers, additionalHandlers); + $.each(handlers, function(i, v){ + var eventName = v.replace(/_handler$/, '').replace(/_([a-z])/g, function(){ return arguments[1].toUpperCase(); }); + settings[v] = function() { + var event = $.Event(eventName); + $magicUploadControl.trigger(event, $.makeArray(arguments)); + return !event.isDefaultPrevented(); + }; + }); + $(this).data('__swfu', new SWFUpload(settings)); + } + } else if (args.length > 0 && typeof(args[0]) == 'string') { + var methodName = args.shift(); + swfu = $(this).data('__swfu'); + if (swfu && swfu[methodName]) { + swfu[methodName].apply(swfu, args); + } + } + }); + }; + + $.swfupload = { + additionalHandlers: function() { + if (arguments.length === 0) { + return additionalHandlers.slice(); + } else { + $(arguments).each(function(i, v){ + $.merge(additionalHandlers, $.makeArray(v)); + }); + } + }, + defaultHandlers: function() { + return defaultHandlers.slice(); + }, + getInstance: function(el) { + return $(el).data('__swfu'); + } + }; + +})(jQuery); \ No newline at end of file diff --git a/plugin/editor/smarteditor2/photo_uploader/popup/swfupload/swfupload.js b/plugin/editor/smarteditor2/photo_uploader/popup/swfupload/swfupload.js new file mode 100644 index 000000000..67bee4c49 --- /dev/null +++ b/plugin/editor/smarteditor2/photo_uploader/popup/swfupload/swfupload.js @@ -0,0 +1,1002 @@ +/** + * SWFUpload: http://www.swfupload.org, http://swfupload.googlecode.com + * + * mmSWFUpload 1.0: Flash upload dialog - http://profandesign.se/swfupload/, http://www.vinterwebb.se/ + * + * SWFUpload is (c) 2006-2007 Lars Huring, Olov Nilz? and Mammon Media and is released under the MIT License: + * http://www.opensource.org/licenses/mit-license.php + * + * SWFUpload 2 is (c) 2007-2008 Jake Roberts and is released under the MIT License: + * http://www.opensource.org/licenses/mit-license.php + * + */ + + +/* ******************* */ +/* Constructor & Init */ +/* ******************* */ +var SWFUpload; + +if (SWFUpload == undefined) { + SWFUpload = function (settings) { + this.initSWFUpload(settings); + }; +} + +SWFUpload.prototype.initSWFUpload = function (settings) { + try { + this.customSettings = {}; // A container where developers can place their own settings associated with this instance. + this.settings = settings; + this.eventQueue = []; + this.movieName = "SWFUpload_" + SWFUpload.movieCount++; + this.movieElement = null; + + + // Setup global control tracking + SWFUpload.instances[this.movieName] = this; + + // Load the settings. Load the Flash movie. + this.initSettings(); + this.loadFlash(); + this.displayDebugInfo(); + } catch (ex) { + delete SWFUpload.instances[this.movieName]; + throw ex; + } +}; + +/* *************** */ +/* Static Members */ +/* *************** */ +SWFUpload.instances = {}; +SWFUpload.movieCount = 0; +SWFUpload.version = "2.2.0 2009-03-25"; +SWFUpload.QUEUE_ERROR = { + QUEUE_LIMIT_EXCEEDED : -100, + FILE_EXCEEDS_SIZE_LIMIT : -110, + ZERO_BYTE_FILE : -120, + INVALID_FILETYPE : -130 +}; +SWFUpload.UPLOAD_ERROR = { + HTTP_ERROR : -200, + MISSING_UPLOAD_URL : -210, + IO_ERROR : -220, + SECURITY_ERROR : -230, + UPLOAD_LIMIT_EXCEEDED : -240, + UPLOAD_FAILED : -250, + SPECIFIED_FILE_ID_NOT_FOUND : -260, + FILE_VALIDATION_FAILED : -270, + FILE_CANCELLED : -280, + UPLOAD_STOPPED : -290 +}; +SWFUpload.FILE_STATUS = { + QUEUED : -1, + IN_PROGRESS : -2, + ERROR : -3, + COMPLETE : -4, + CANCELLED : -5 +}; +SWFUpload.BUTTON_ACTION = { + SELECT_FILE : -100, + SELECT_FILES : -110, + START_UPLOAD : -120 +}; +SWFUpload.CURSOR = { + ARROW : -1, + HAND : -2 +}; +SWFUpload.WINDOW_MODE = { + WINDOW : "window", + TRANSPARENT : "transparent", + OPAQUE : "opaque" +}; + +// Private: takes a URL, determines if it is relative and converts to an absolute URL +// using the current site. Only processes the URL if it can, otherwise returns the URL untouched +SWFUpload.completeURL = function(url) { + if (typeof(url) !== "string" || url.match(/^https?:\/\//i) || url.match(/^\//)) { + return url; + } + + var currentURL = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + window.location.port : ""); + + var indexSlash = window.location.pathname.lastIndexOf("/"); + if (indexSlash <= 0) { + path = "/"; + } else { + path = window.location.pathname.substr(0, indexSlash) + "/"; + } + + return /*currentURL +*/ path + url; + +}; + + +/* ******************** */ +/* Instance Members */ +/* ******************** */ + +// Private: initSettings ensures that all the +// settings are set, getting a default value if one was not assigned. +SWFUpload.prototype.initSettings = function () { + this.ensureDefault = function (settingName, defaultValue) { + this.settings[settingName] = (this.settings[settingName] == undefined) ? defaultValue : this.settings[settingName]; + }; + + // Upload backend settings + this.ensureDefault("upload_url", ""); + this.ensureDefault("preserve_relative_urls", false); + this.ensureDefault("file_post_name", "Filedata"); + this.ensureDefault("post_params", {}); + this.ensureDefault("use_query_string", false); + this.ensureDefault("requeue_on_error", false); + this.ensureDefault("http_success", []); + this.ensureDefault("assume_success_timeout", 0); + + // File Settings + this.ensureDefault("file_types", "*.*"); + this.ensureDefault("file_types_description", "All Files"); + this.ensureDefault("file_size_limit", 0); // Default zero means "unlimited" + this.ensureDefault("file_upload_limit", 0); + this.ensureDefault("file_queue_limit", 0); + + // Flash Settings + this.ensureDefault("flash_url", "swfupload.swf"); + this.ensureDefault("prevent_swf_caching", true); + + // Button Settings + this.ensureDefault("button_image_url", ""); + this.ensureDefault("button_width", 1); + this.ensureDefault("button_height", 1); + this.ensureDefault("button_text", ""); + this.ensureDefault("button_text_style", "color: #000000; font-size: 16pt;"); + this.ensureDefault("button_text_top_padding", 0); + this.ensureDefault("button_text_left_padding", 0); + this.ensureDefault("button_action", SWFUpload.BUTTON_ACTION.SELECT_FILES); + this.ensureDefault("button_disabled", false); + this.ensureDefault("button_placeholder_id", ""); + this.ensureDefault("button_placeholder", null); + this.ensureDefault("button_cursor", SWFUpload.CURSOR.ARROW); + this.ensureDefault("button_window_mode", SWFUpload.WINDOW_MODE.WINDOW); + + // Debug Settings + this.ensureDefault("debug", false); + this.settings.debug_enabled = this.settings.debug; // Here to maintain v2 API + + // Event Handlers + this.settings.return_upload_start_handler = this.returnUploadStart; + this.ensureDefault("swfupload_loaded_handler", null); + this.ensureDefault("file_dialog_start_handler", null); + this.ensureDefault("file_queued_handler", null); + this.ensureDefault("file_queue_error_handler", null); + this.ensureDefault("file_dialog_complete_handler", null); + + this.ensureDefault("upload_start_handler", null); + this.ensureDefault("upload_progress_handler", null); + this.ensureDefault("upload_error_handler", null); + this.ensureDefault("upload_success_handler", null); + this.ensureDefault("upload_complete_handler", null); + + this.ensureDefault("debug_handler", this.debugMessage); + + this.ensureDefault("custom_settings", {}); + + // Other settings + this.customSettings = this.settings.custom_settings; + + // Update the flash url if needed + if (!!this.settings.prevent_swf_caching) { + this.settings.flash_url = this.settings.flash_url + (this.settings.flash_url.indexOf("?") < 0 ? "?" : "&") + "preventswfcaching=" + new Date().getTime(); + } + + if (!this.settings.preserve_relative_urls) { + //this.settings.flash_url = SWFUpload.completeURL(this.settings.flash_url); // Don't need to do this one since flash doesn't look at it + this.settings.upload_url = SWFUpload.completeURL(this.settings.upload_url); + this.settings.button_image_url = SWFUpload.completeURL(this.settings.button_image_url); + } + + delete this.ensureDefault; +}; + +// Private: loadFlash replaces the button_placeholder element with the flash movie. +SWFUpload.prototype.loadFlash = function () { + var targetElement, tempParent, container; + + // Make sure an element with the ID we are going to use doesn't already exist + if (document.getElementById(this.movieName) !== null) { + throw "ID " + this.movieName + " is already in use. The Flash Object could not be added"; + } + + // Get the element where we will be placing the flash movie + targetElement = document.getElementById(this.settings.button_placeholder_id) || this.settings.button_placeholder; + + if (targetElement == undefined) { + throw "Could not find the placeholder element: " + this.settings.button_placeholder_id; + } + + // Append the container and load the flash + tempParent = document.createElement("div"); + tempParent.innerHTML = this.getFlashHTML(); // Using innerHTML is non-standard but the only sensible way to dynamically add Flash in IE (and maybe other browsers) + //targetElement.parentNode.replaceChild(tempParent.firstChild, targetElement); + container = targetElement.parentNode; + + var containerStyle = tempParent.style; + + containerStyle.position = "absolute"; + + containerStyle.top = containerStyle.left = "0"; + containerStyle.width = targetElement.parentNode.offsetWidth+"px"; + containerStyle.height = targetElement.parentNode.offsetHeight+"px"; + containerStyle.overflow = "hidden"; + + if (this.getStyle(container, 'position') === 'static') { //ڵ߰ + container.style.position = 'relative'; + } + targetElement.parentNode.replaceChild(tempParent, targetElement); //ڵ߰ + // Fix IE Flash/Form bug + if (window[this.movieName] == undefined) { + window[this.movieName] = this.getMovieElement(); + } + +}; + +// Private: getFlashHTML generates the object tag needed to embed the flash in to the document +SWFUpload.prototype.getFlashHTML = function () { + // Flash Satay object syntax: http://www.alistapart.com/articles/flashsatay + return ['', + '', + '', + '', + '', + '', + '', + ''].join(""); +}; + +// Private: getFlashVars builds the parameter string that will be passed +// to flash in the flashvars param. +SWFUpload.prototype.getFlashVars = function () { + // Build a string from the post param object + var paramString = this.buildParamString(); + var httpSuccessString = this.settings.http_success.join(","); + + // Build the parameter string + return ["movieName=", encodeURIComponent(this.movieName), + "&uploadURL=", encodeURIComponent(this.settings.upload_url), + "&useQueryString=", encodeURIComponent(this.settings.use_query_string), + "&requeueOnError=", encodeURIComponent(this.settings.requeue_on_error), + "&httpSuccess=", encodeURIComponent(httpSuccessString), + "&assumeSuccessTimeout=", encodeURIComponent(this.settings.assume_success_timeout), + "&params=", encodeURIComponent(paramString), + "&filePostName=", encodeURIComponent(this.settings.file_post_name), + "&fileTypes=", encodeURIComponent(this.settings.file_types), + "&fileTypesDescription=", encodeURIComponent(this.settings.file_types_description), + "&fileSizeLimit=", encodeURIComponent(this.settings.file_size_limit), + "&fileUploadLimit=", encodeURIComponent(this.settings.file_upload_limit), + "&fileQueueLimit=", encodeURIComponent(this.settings.file_queue_limit), + "&debugEnabled=", encodeURIComponent(this.settings.debug_enabled), + "&buttonImageURL=", encodeURIComponent(this.settings.button_image_url), + "&buttonWidth=", encodeURIComponent(this.settings.button_width), + "&buttonHeight=", encodeURIComponent(this.settings.button_height), + "&buttonText=", encodeURIComponent(this.settings.button_text), + "&buttonTextTopPadding=", encodeURIComponent(this.settings.button_text_top_padding), + "&buttonTextLeftPadding=", encodeURIComponent(this.settings.button_text_left_padding), + "&buttonTextStyle=", encodeURIComponent(this.settings.button_text_style), + "&buttonAction=", encodeURIComponent(this.settings.button_action), + "&buttonDisabled=", encodeURIComponent(this.settings.button_disabled), + "&buttonCursor=", encodeURIComponent(this.settings.button_cursor) + ].join(""); +}; + +// Public: getMovieElement retrieves the DOM reference to the Flash element added by SWFUpload +// The element is cached after the first lookup +SWFUpload.prototype.getMovieElement = function () { + if (this.movieElement == undefined) { + this.movieElement = document.getElementById(this.movieName); + } + + if (this.movieElement === null) { + throw "Could not find Flash element"; + } + + return this.movieElement; +}; + +// Private: buildParamString takes the name/value pairs in the post_params setting object +// and joins them up in to a string formatted "name=value&name=value" +SWFUpload.prototype.buildParamString = function () { + var postParams = this.settings.post_params; + var paramStringPairs = []; + + if (typeof(postParams) === "object") { + for (var name in postParams) { + if (postParams.hasOwnProperty(name)) { + paramStringPairs.push(encodeURIComponent(name.toString()) + "=" + encodeURIComponent(postParams[name].toString())); + } + } + } + + return paramStringPairs.join("&"); +}; + +// Public: Used to remove a SWFUpload instance from the page. This method strives to remove +// all references to the SWF, and other objects so memory is properly freed. +// Returns true if everything was destroyed. Returns a false if a failure occurs leaving SWFUpload in an inconsistant state. +// Credits: Major improvements provided by steffen +SWFUpload.prototype.destroy = function () { + try { + // Make sure Flash is done before we try to remove it + this.cancelUpload(null, false); + + + // Remove the SWFUpload DOM nodes + var movieElement = null; + movieElement = this.getMovieElement(); + + if (movieElement && typeof(movieElement.CallFunction) === "unknown") { // We only want to do this in IE + // Loop through all the movie's properties and remove all function references (DOM/JS IE 6/7 memory leak workaround) + for (var i in movieElement) { + try { + if (typeof(movieElement[i]) === "function") { + movieElement[i] = null; + } + } catch (ex1) {} + } + + // Remove the Movie Element from the page + try { + movieElement.parentNode.removeChild(movieElement); + } catch (ex) {} + } + + // Remove IE form fix reference + window[this.movieName] = null; + + // Destroy other references + SWFUpload.instances[this.movieName] = null; + delete SWFUpload.instances[this.movieName]; + + this.movieElement = null; + this.settings = null; + this.customSettings = null; + this.eventQueue = null; + this.movieName = null; + + + return true; + } catch (ex2) { + return false; + } +}; + + +// Public: displayDebugInfo prints out settings and configuration +// information about this SWFUpload instance. +// This function (and any references to it) can be deleted when placing +// SWFUpload in production. +SWFUpload.prototype.displayDebugInfo = function () { + this.debug( + [ + "---SWFUpload Instance Info---\n", + "Version: ", SWFUpload.version, "\n", + "Movie Name: ", this.movieName, "\n", + "Settings:\n", + "\t", "upload_url: ", this.settings.upload_url, "\n", + "\t", "flash_url: ", this.settings.flash_url, "\n", + "\t", "use_query_string: ", this.settings.use_query_string.toString(), "\n", + "\t", "requeue_on_error: ", this.settings.requeue_on_error.toString(), "\n", + "\t", "http_success: ", this.settings.http_success.join(", "), "\n", + "\t", "assume_success_timeout: ", this.settings.assume_success_timeout, "\n", + "\t", "file_post_name: ", this.settings.file_post_name, "\n", + "\t", "post_params: ", this.settings.post_params.toString(), "\n", + "\t", "file_types: ", this.settings.file_types, "\n", + "\t", "file_types_description: ", this.settings.file_types_description, "\n", + "\t", "file_size_limit: ", this.settings.file_size_limit, "\n", + "\t", "file_upload_limit: ", this.settings.file_upload_limit, "\n", + "\t", "file_queue_limit: ", this.settings.file_queue_limit, "\n", + "\t", "debug: ", this.settings.debug.toString(), "\n", + + "\t", "prevent_swf_caching: ", this.settings.prevent_swf_caching.toString(), "\n", + + "\t", "button_placeholder_id: ", this.settings.button_placeholder_id.toString(), "\n", + "\t", "button_placeholder: ", (this.settings.button_placeholder ? "Set" : "Not Set"), "\n", + "\t", "button_image_url: ", this.settings.button_image_url.toString(), "\n", + "\t", "button_width: ", this.settings.button_width.toString(), "\n", + "\t", "button_height: ", this.settings.button_height.toString(), "\n", + "\t", "button_text: ", this.settings.button_text.toString(), "\n", + "\t", "button_text_style: ", this.settings.button_text_style.toString(), "\n", + "\t", "button_text_top_padding: ", this.settings.button_text_top_padding.toString(), "\n", + "\t", "button_text_left_padding: ", this.settings.button_text_left_padding.toString(), "\n", + "\t", "button_action: ", this.settings.button_action.toString(), "\n", + "\t", "button_disabled: ", this.settings.button_disabled.toString(), "\n", + + "\t", "custom_settings: ", this.settings.custom_settings.toString(), "\n", + "Event Handlers:\n", + "\t", "swfupload_loaded_handler assigned: ", (typeof this.settings.swfupload_loaded_handler === "function").toString(), "\n", + "\t", "file_dialog_start_handler assigned: ", (typeof this.settings.file_dialog_start_handler === "function").toString(), "\n", + "\t", "file_queued_handler assigned: ", (typeof this.settings.file_queued_handler === "function").toString(), "\n", + "\t", "file_queue_error_handler assigned: ", (typeof this.settings.file_queue_error_handler === "function").toString(), "\n", + "\t", "upload_start_handler assigned: ", (typeof this.settings.upload_start_handler === "function").toString(), "\n", + "\t", "upload_progress_handler assigned: ", (typeof this.settings.upload_progress_handler === "function").toString(), "\n", + "\t", "upload_error_handler assigned: ", (typeof this.settings.upload_error_handler === "function").toString(), "\n", + "\t", "upload_success_handler assigned: ", (typeof this.settings.upload_success_handler === "function").toString(), "\n", + "\t", "upload_complete_handler assigned: ", (typeof this.settings.upload_complete_handler === "function").toString(), "\n", + "\t", "debug_handler assigned: ", (typeof this.settings.debug_handler === "function").toString(), "\n" + ].join("") + ); +}; + +/* Note: addSetting and getSetting are no longer used by SWFUpload but are included + the maintain v2 API compatibility +*/ +// Public: (Deprecated) addSetting adds a setting value. If the value given is undefined or null then the default_value is used. +SWFUpload.prototype.addSetting = function (name, value, default_value) { + if (value == undefined) { + return (this.settings[name] = default_value); + } else { + return (this.settings[name] = value); + } +}; + +// Public: (Deprecated) getSetting gets a setting. Returns an empty string if the setting was not found. +SWFUpload.prototype.getSetting = function (name) { + if (this.settings[name] != undefined) { + return this.settings[name]; + } + + return ""; +}; + + + +// Private: callFlash handles function calls made to the Flash element. +// Calls are made with a setTimeout for some functions to work around +// bugs in the ExternalInterface library. +SWFUpload.prototype.callFlash = function (functionName, argumentArray) { + argumentArray = argumentArray || []; + + var movieElement = this.getMovieElement(); + var returnValue, returnString; + + // Flash's method if calling ExternalInterface methods (code adapted from MooTools). + try { + returnString = movieElement.CallFunction('' + __flash__argumentsToXML(argumentArray, 0) + ''); + returnValue = eval(returnString); + } catch (ex) { + throw "Call to " + functionName + " failed"; + } + + // Unescape file post param values + if (returnValue != undefined && typeof returnValue.post === "object") { + returnValue = this.unescapeFilePostParams(returnValue); + } + + return returnValue; +}; + +/* ***************************** + -- Flash control methods -- + Your UI should use these + to operate SWFUpload + ***************************** */ + +// WARNING: this function does not work in Flash Player 10 +// Public: selectFile causes a File Selection Dialog window to appear. This +// dialog only allows 1 file to be selected. +SWFUpload.prototype.selectFile = function () { + this.callFlash("SelectFile"); +}; + +// WARNING: this function does not work in Flash Player 10 +// Public: selectFiles causes a File Selection Dialog window to appear/ This +// dialog allows the user to select any number of files +// Flash Bug Warning: Flash limits the number of selectable files based on the combined length of the file names. +// If the selection name length is too long the dialog will fail in an unpredictable manner. There is no work-around +// for this bug. +SWFUpload.prototype.selectFiles = function () { + this.callFlash("SelectFiles"); +}; + + +// Public: startUpload starts uploading the first file in the queue unless +// the optional parameter 'fileID' specifies the ID +SWFUpload.prototype.startUpload = function (fileID) { + this.callFlash("StartUpload", [fileID]); +}; + +// Public: cancelUpload cancels any queued file. The fileID parameter may be the file ID or index. +// If you do not specify a fileID the current uploading file or first file in the queue is cancelled. +// If you do not want the uploadError event to trigger you can specify false for the triggerErrorEvent parameter. +SWFUpload.prototype.cancelUpload = function (fileID, triggerErrorEvent) { + if (triggerErrorEvent !== false) { + triggerErrorEvent = true; + } + this.callFlash("CancelUpload", [fileID, triggerErrorEvent]); +}; + +// Public: stopUpload stops the current upload and requeues the file at the beginning of the queue. +// If nothing is currently uploading then nothing happens. +SWFUpload.prototype.stopUpload = function () { + this.callFlash("StopUpload"); +}; + +/* ************************ + * Settings methods + * These methods change the SWFUpload settings. + * SWFUpload settings should not be changed directly on the settings object + * since many of the settings need to be passed to Flash in order to take + * effect. + * *********************** */ + +// Public: getStats gets the file statistics object. +SWFUpload.prototype.getStats = function () { + return this.callFlash("GetStats"); +}; + +// Public: setStats changes the SWFUpload statistics. You shouldn't need to +// change the statistics but you can. Changing the statistics does not +// affect SWFUpload accept for the successful_uploads count which is used +// by the upload_limit setting to determine how many files the user may upload. +SWFUpload.prototype.setStats = function (statsObject) { + this.callFlash("SetStats", [statsObject]); +}; + +// Public: getFile retrieves a File object by ID or Index. If the file is +// not found then 'null' is returned. +SWFUpload.prototype.getFile = function (fileID) { + if (typeof(fileID) === "number") { + return this.callFlash("GetFileByIndex", [fileID]); + } else { + return this.callFlash("GetFile", [fileID]); + } +}; + +// Public: addFileParam sets a name/value pair that will be posted with the +// file specified by the Files ID. If the name already exists then the +// exiting value will be overwritten. +SWFUpload.prototype.addFileParam = function (fileID, name, value) { + return this.callFlash("AddFileParam", [fileID, name, value]); +}; + +// Public: removeFileParam removes a previously set (by addFileParam) name/value +// pair from the specified file. +SWFUpload.prototype.removeFileParam = function (fileID, name) { + this.callFlash("RemoveFileParam", [fileID, name]); +}; + +// Public: setUploadUrl changes the upload_url setting. +SWFUpload.prototype.setUploadURL = function (url) { + this.settings.upload_url = url.toString(); + this.callFlash("SetUploadURL", [url]); +}; + +// Public: setPostParams changes the post_params setting +SWFUpload.prototype.setPostParams = function (paramsObject) { + this.settings.post_params = paramsObject; + this.callFlash("SetPostParams", [paramsObject]); +}; + +// Public: addPostParam adds post name/value pair. Each name can have only one value. +SWFUpload.prototype.addPostParam = function (name, value) { + this.settings.post_params[name] = value; + this.callFlash("SetPostParams", [this.settings.post_params]); +}; + +// Public: removePostParam deletes post name/value pair. +SWFUpload.prototype.removePostParam = function (name) { + delete this.settings.post_params[name]; + this.callFlash("SetPostParams", [this.settings.post_params]); +}; + +// Public: setFileTypes changes the file_types setting and the file_types_description setting +SWFUpload.prototype.setFileTypes = function (types, description) { + this.settings.file_types = types; + this.settings.file_types_description = description; + this.callFlash("SetFileTypes", [types, description]); +}; + +// Public: setFileSizeLimit changes the file_size_limit setting +SWFUpload.prototype.setFileSizeLimit = function (fileSizeLimit) { + this.settings.file_size_limit = fileSizeLimit; + this.callFlash("SetFileSizeLimit", [fileSizeLimit]); +}; + +// Public: setFileUploadLimit changes the file_upload_limit setting +SWFUpload.prototype.setFileUploadLimit = function (fileUploadLimit) { + this.settings.file_upload_limit = fileUploadLimit; + this.callFlash("SetFileUploadLimit", [fileUploadLimit]); +}; + +// Public: setFileQueueLimit changes the file_queue_limit setting +SWFUpload.prototype.setFileQueueLimit = function (fileQueueLimit) { + this.settings.file_queue_limit = fileQueueLimit; + this.callFlash("SetFileQueueLimit", [fileQueueLimit]); +}; + +// Public: setFilePostName changes the file_post_name setting +SWFUpload.prototype.setFilePostName = function (filePostName) { + this.settings.file_post_name = filePostName; + this.callFlash("SetFilePostName", [filePostName]); +}; + +// Public: setUseQueryString changes the use_query_string setting +SWFUpload.prototype.setUseQueryString = function (useQueryString) { + this.settings.use_query_string = useQueryString; + this.callFlash("SetUseQueryString", [useQueryString]); +}; + +// Public: setRequeueOnError changes the requeue_on_error setting +SWFUpload.prototype.setRequeueOnError = function (requeueOnError) { + this.settings.requeue_on_error = requeueOnError; + this.callFlash("SetRequeueOnError", [requeueOnError]); +}; + +// Public: setHTTPSuccess changes the http_success setting +SWFUpload.prototype.setHTTPSuccess = function (http_status_codes) { + if (typeof http_status_codes === "string") { + http_status_codes = http_status_codes.replace(" ", "").split(","); + } + + this.settings.http_success = http_status_codes; + this.callFlash("SetHTTPSuccess", [http_status_codes]); +}; + +// Public: setHTTPSuccess changes the http_success setting +SWFUpload.prototype.setAssumeSuccessTimeout = function (timeout_seconds) { + this.settings.assume_success_timeout = timeout_seconds; + this.callFlash("SetAssumeSuccessTimeout", [timeout_seconds]); +}; + +// Public: setDebugEnabled changes the debug_enabled setting +SWFUpload.prototype.setDebugEnabled = function (debugEnabled) { + this.settings.debug_enabled = debugEnabled; + this.callFlash("SetDebugEnabled", [debugEnabled]); +}; + +// Public: setButtonImageURL loads a button image sprite +SWFUpload.prototype.setButtonImageURL = function (buttonImageURL) { + if (buttonImageURL == undefined) { + buttonImageURL = ""; + } + + this.settings.button_image_url = buttonImageURL; + this.callFlash("SetButtonImageURL", [buttonImageURL]); +}; + +// Public: setButtonDimensions resizes the Flash Movie and button +SWFUpload.prototype.setButtonDimensions = function (width, height) { + this.settings.button_width = width; + this.settings.button_height = height; + + var movie = this.getMovieElement(); + if (movie != undefined) { + movie.style.width = width + "px"; + movie.style.height = height + "px"; + } + + this.callFlash("SetButtonDimensions", [width, height]); +}; +// Public: setButtonText Changes the text overlaid on the button +SWFUpload.prototype.setButtonText = function (html) { + this.settings.button_text = html; + this.callFlash("SetButtonText", [html]); +}; +// Public: setButtonTextPadding changes the top and left padding of the text overlay +SWFUpload.prototype.setButtonTextPadding = function (left, top) { + this.settings.button_text_top_padding = top; + this.settings.button_text_left_padding = left; + this.callFlash("SetButtonTextPadding", [left, top]); +}; + +// Public: setButtonTextStyle changes the CSS used to style the HTML/Text overlaid on the button +SWFUpload.prototype.setButtonTextStyle = function (css) { + this.settings.button_text_style = css; + this.callFlash("SetButtonTextStyle", [css]); +}; +// Public: setButtonDisabled disables/enables the button +SWFUpload.prototype.setButtonDisabled = function (isDisabled) { + this.settings.button_disabled = isDisabled; + this.callFlash("SetButtonDisabled", [isDisabled]); +}; +// Public: setButtonAction sets the action that occurs when the button is clicked +SWFUpload.prototype.setButtonAction = function (buttonAction) { + this.settings.button_action = buttonAction; + this.callFlash("SetButtonAction", [buttonAction]); +}; + +// Public: setButtonCursor changes the mouse cursor displayed when hovering over the button +SWFUpload.prototype.setButtonCursor = function (cursor) { + this.settings.button_cursor = cursor; + this.callFlash("SetButtonCursor", [cursor]); +}; + +/* ******************************* + Flash Event Interfaces + These functions are used by Flash to trigger the various + events. + + All these functions a Private. + + Because the ExternalInterface library is buggy the event calls + are added to a queue and the queue then executed by a setTimeout. + This ensures that events are executed in a determinate order and that + the ExternalInterface bugs are avoided. +******************************* */ + +SWFUpload.prototype.queueEvent = function (handlerName, argumentArray) { + // Warning: Don't call this.debug inside here or you'll create an infinite loop + + if (argumentArray == undefined) { + argumentArray = []; + } else if (!(argumentArray instanceof Array)) { + argumentArray = [argumentArray]; + } + + var self = this; + if (typeof this.settings[handlerName] === "function") { + // Queue the event + this.eventQueue.push(function () { + this.settings[handlerName].apply(this, argumentArray); + }); + + // Execute the next queued event + setTimeout(function () { + self.executeNextEvent(); + }, 0); + + } else if (this.settings[handlerName] !== null) { + throw "Event handler " + handlerName + " is unknown or is not a function"; + } +}; + +// Private: Causes the next event in the queue to be executed. Since events are queued using a setTimeout +// we must queue them in order to garentee that they are executed in order. +SWFUpload.prototype.executeNextEvent = function () { + // Warning: Don't call this.debug inside here or you'll create an infinite loop + + var f = this.eventQueue ? this.eventQueue.shift() : null; + if (typeof(f) === "function") { + f.apply(this); + } +}; + +// Private: unescapeFileParams is part of a workaround for a flash bug where objects passed through ExternalInterface cannot have +// properties that contain characters that are not valid for JavaScript identifiers. To work around this +// the Flash Component escapes the parameter names and we must unescape again before passing them along. +SWFUpload.prototype.unescapeFilePostParams = function (file) { + var reg = /[$]([0-9a-f]{4})/i; + var unescapedPost = {}; + var uk; + + if (file != undefined) { + for (var k in file.post) { + if (file.post.hasOwnProperty(k)) { + uk = k; + var match; + while ((match = reg.exec(uk)) !== null) { + uk = uk.replace(match[0], String.fromCharCode(parseInt("0x" + match[1], 16))); + } + unescapedPost[uk] = file.post[k]; + } + } + + file.post = unescapedPost; + } + + return file; +}; + +// Private: Called by Flash to see if JS can call in to Flash (test if External Interface is working) +SWFUpload.prototype.testExternalInterface = function () { + try { + return this.callFlash("TestExternalInterface"); + } catch (ex) { + return false; + } +}; + +// Private: This event is called by Flash when it has finished loading. Don't modify this. +// Use the swfupload_loaded_handler event setting to execute custom code when SWFUpload has loaded. +SWFUpload.prototype.flashReady = function () { + // Check that the movie element is loaded correctly with its ExternalInterface methods defined + var movieElement = this.getMovieElement(); + + if (!movieElement) { + this.debug("Flash called back ready but the flash movie can't be found."); + return; + } + + this.cleanUp(movieElement); + + this.queueEvent("swfupload_loaded_handler"); +}; + +// Private: removes Flash added fuctions to the DOM node to prevent memory leaks in IE. +// This function is called by Flash each time the ExternalInterface functions are created. +SWFUpload.prototype.cleanUp = function (movieElement) { + // Pro-actively unhook all the Flash functions + try { + if (this.movieElement && typeof(movieElement.CallFunction) === "unknown") { // We only want to do this in IE + this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)"); + for (var key in movieElement) { + try { + if (typeof(movieElement[key]) === "function") { + movieElement[key] = null; + } + } catch (ex) { + } + } + } + } catch (ex1) { + + } + + // Fix Flashes own cleanup code so if the SWFMovie was removed from the page + // it doesn't display errors. + window["__flash__removeCallback"] = function (instance, name) { + try { + if (instance) { + instance[name] = null; + } + } catch (flashEx) { + + } + }; + +}; + + +/* This is a chance to do something before the browse window opens */ +SWFUpload.prototype.fileDialogStart = function () { + this.queueEvent("file_dialog_start_handler"); +}; + + +/* Called when a file is successfully added to the queue. */ +SWFUpload.prototype.fileQueued = function (file) { + file = this.unescapeFilePostParams(file); + this.queueEvent("file_queued_handler", file); +}; + + +/* Handle errors that occur when an attempt to queue a file fails. */ +SWFUpload.prototype.fileQueueError = function (file, errorCode, message) { + file = this.unescapeFilePostParams(file); + this.queueEvent("file_queue_error_handler", [file, errorCode, message]); +}; + +/* Called after the file dialog has closed and the selected files have been queued. + You could call startUpload here if you want the queued files to begin uploading immediately. */ +SWFUpload.prototype.fileDialogComplete = function (numFilesSelected, numFilesQueued, numFilesInQueue) { + this.queueEvent("file_dialog_complete_handler", [numFilesSelected, numFilesQueued, numFilesInQueue]); +}; + +SWFUpload.prototype.uploadStart = function (file) { + file = this.unescapeFilePostParams(file); + this.queueEvent("return_upload_start_handler", file); +}; + +SWFUpload.prototype.returnUploadStart = function (file) { + var returnValue; + if (typeof this.settings.upload_start_handler === "function") { + file = this.unescapeFilePostParams(file); + returnValue = this.settings.upload_start_handler.call(this, file); + } else if (this.settings.upload_start_handler != undefined) { + throw "upload_start_handler must be a function"; + } + + // Convert undefined to true so if nothing is returned from the upload_start_handler it is + // interpretted as 'true'. + if (returnValue === undefined) { + returnValue = true; + } + + returnValue = !!returnValue; + + this.callFlash("ReturnUploadStart", [returnValue]); +}; + + + +SWFUpload.prototype.uploadProgress = function (file, bytesComplete, bytesTotal) { + file = this.unescapeFilePostParams(file); + this.queueEvent("upload_progress_handler", [file, bytesComplete, bytesTotal]); +}; + +SWFUpload.prototype.uploadError = function (file, errorCode, message) { + file = this.unescapeFilePostParams(file); + this.queueEvent("upload_error_handler", [file, errorCode, message]); +}; + +SWFUpload.prototype.uploadSuccess = function (file, serverData, responseReceived) { + file = this.unescapeFilePostParams(file); + this.queueEvent("upload_success_handler", [file, serverData, responseReceived]); +}; + +SWFUpload.prototype.uploadComplete = function (file) { + file = this.unescapeFilePostParams(file); + this.queueEvent("upload_complete_handler", file); +}; + +/* Called by SWFUpload JavaScript and Flash functions when debug is enabled. By default it writes messages to the + internal debug console. You can override this event and have messages written where you want. */ +SWFUpload.prototype.debug = function (message) { + this.queueEvent("debug_handler", message); +}; + + +/* ********************************** + Debug Console + The debug console is a self contained, in page location + for debug message to be sent. The Debug Console adds + itself to the body if necessary. + + The console is automatically scrolled as messages appear. + + If you are using your own debug handler or when you deploy to production and + have debug disabled you can remove these functions to reduce the file size + and complexity. +********************************** */ + +// Private: debugMessage is the default debug_handler. If you want to print debug messages +// call the debug() function. When overriding the function your own function should +// check to see if the debug setting is true before outputting debug information. +SWFUpload.prototype.debugMessage = function (message) { + if (this.settings.debug) { + var exceptionMessage, exceptionValues = []; + + // Check for an exception object and print it nicely + if (typeof message === "object" && typeof message.name === "string" && typeof message.message === "string") { + for (var key in message) { + if (message.hasOwnProperty(key)) { + exceptionValues.push(key + ": " + message[key]); + } + } + exceptionMessage = exceptionValues.join("\n") || ""; + exceptionValues = exceptionMessage.split("\n"); + exceptionMessage = "EXCEPTION: " + exceptionValues.join("\nEXCEPTION: "); + SWFUpload.Console.writeLine(exceptionMessage); + } else { + SWFUpload.Console.writeLine(message); + } + } +}; + +SWFUpload.Console = {}; +SWFUpload.Console.writeLine = function (message) { + var console, documentForm; + + try { + console = document.getElementById("SWFUpload_Console"); + + if (!console) { + documentForm = document.createElement("form"); + document.getElementsByTagName("body")[0].appendChild(documentForm); + + console = document.createElement("textarea"); + console.id = "SWFUpload_Console"; + console.style.fontFamily = "monospace"; + console.setAttribute("wrap", "off"); + console.wrap = "off"; + console.style.overflow = "auto"; + console.style.width = "700px"; + console.style.height = "350px"; + console.style.margin = "5px"; + documentForm.appendChild(console); + } + + console.value += message + "\n"; + + console.scrollTop = console.scrollHeight - console.clientHeight; + } catch (ex) { + alert("Exception: " + ex.name + " Message: " + ex.message); + } +}; + +SWFUpload.prototype.getStyle = function (obj, name) { //߰ + if (obj.currentStyle) { + return obj.currentStyle[name]; + } else if (window.getComputedStyle) { + return window.getComputedStyle(obj, null)[name]; + } +} \ No newline at end of file diff --git a/plugin/editor/smarteditor2/photo_uploader/popup/swfupload/swfupload.queue.js b/plugin/editor/smarteditor2/photo_uploader/popup/swfupload/swfupload.queue.js new file mode 100644 index 000000000..5d65c30d4 --- /dev/null +++ b/plugin/editor/smarteditor2/photo_uploader/popup/swfupload/swfupload.queue.js @@ -0,0 +1,99 @@ +/* + Queue Plug-in + + Features: + *Adds a cancelQueue() method for cancelling the entire queue. + *All queued files are uploaded when startUpload() is called. + *If false is returned from uploadComplete then the queue upload is stopped. + If false is not returned (strict comparison) then the queue upload is continued. + *Adds a QueueComplete event that is fired when all the queued files have finished uploading. + Set the event handler with the queue_complete_handler setting. + + */ + +var SWFUpload; +if (typeof(SWFUpload) === "function") { + SWFUpload.queue = {}; + + SWFUpload.prototype.initSettings = (function (oldInitSettings) { + return function () { + if (typeof(oldInitSettings) === "function") { + oldInitSettings.call(this); + } + + this.queueSettings = {}; + + this.queueSettings.queue_cancelled_flag = false; + this.queueSettings.queue_upload_count = 0; + + this.queueSettings.user_upload_complete_handler = this.settings.upload_complete_handler; + this.queueSettings.user_upload_start_handler = this.settings.upload_start_handler; + this.settings.upload_complete_handler = SWFUpload.queue.uploadCompleteHandler; + this.settings.upload_start_handler = SWFUpload.queue.uploadStartHandler; + + this.settings.queue_complete_handler = this.settings.queue_complete_handler || null; + }; + })(SWFUpload.prototype.initSettings); + + SWFUpload.prototype.startUpload = function (fileID) { + this.queueSettings.queue_cancelled_flag = false; + this.callFlash("StartUpload", [fileID]); + }; + + SWFUpload.prototype.cancelQueue = function () { + this.queueSettings.queue_cancelled_flag = true; + this.stopUpload(); + + var stats = this.getStats(); + while (stats.files_queued > 0) { + this.cancelUpload(); + stats = this.getStats(); + } + }; + + SWFUpload.queue.uploadStartHandler = function (file) { + var returnValue; + if (typeof(this.queueSettings.user_upload_start_handler) === "function") { + returnValue = this.queueSettings.user_upload_start_handler.call(this, file); + } + + // To prevent upload a real "FALSE" value must be returned, otherwise default to a real "TRUE" value. + returnValue = (returnValue === false) ? false : true; + + this.queueSettings.queue_cancelled_flag = !returnValue; + + return returnValue; + }; + + SWFUpload.queue.uploadCompleteHandler = function (file) { + var user_upload_complete_handler = this.queueSettings.user_upload_complete_handler; + var continueUpload; + + if (file.filestatus === SWFUpload.FILE_STATUS.COMPLETE) { + this.queueSettings.queue_upload_count++; + } + + if (typeof(user_upload_complete_handler) === "function") { + continueUpload = (user_upload_complete_handler.call(this, file) === false) ? false : true; + } else if (file.filestatus === SWFUpload.FILE_STATUS.QUEUED) { + // If the file was stopped and re-queued don't restart the upload + continueUpload = false; + } else { + continueUpload = true; + } + + if (continueUpload) { + var stats = this.getStats(); + if (stats.files_queued > 0 && this.queueSettings.queue_cancelled_flag === false) { + this.startUpload(); + } else if (this.queueSettings.queue_cancelled_flag === false) { + console.debug('ydfsdfgsdfgsdfg'); + this.queueEvent("queue_complete_handler", [this.queueSettings.queue_upload_count]); + this.queueSettings.queue_upload_count = 0; + } else { + this.queueSettings.queue_cancelled_flag = false; + this.queueSettings.queue_upload_count = 0; + } + } + }; +} \ No newline at end of file diff --git a/plugin/editor/smarteditor2/photo_uploader/popup/swfupload/swfupload.swf b/plugin/editor/smarteditor2/photo_uploader/popup/swfupload/swfupload.swf new file mode 100644 index 000000000..e3f767031 Binary files /dev/null and b/plugin/editor/smarteditor2/photo_uploader/popup/swfupload/swfupload.swf differ diff --git a/plugin/editor/smarteditor2/readme.txt b/plugin/editor/smarteditor2/readme.txt new file mode 100644 index 000000000..d76a1567a --- /dev/null +++ b/plugin/editor/smarteditor2/readme.txt @@ -0,0 +1,40 @@ +SmartEditor Basic 2.0 릴리즈 패키지 + +SmartEdtitor™는 Javascript로 구현된 웹 기반의 WYSIWYG 에디터입니다. SmartEdtitor™는 WYSIWYG 모드 및 HTML 편집 모드와 TEXT 모드를 제공하고, 자유로운 폰트 크기 설정 기능, 줄 간격 설정 기능, 단어 찾기/바꾸기 기능 등 편집에 필요한 다양한 기능을 제공하므로 사용자들은 SmartEdtitor™를 사용하여 쉽고 편리하게 원하는 형태의 글을 작성할 수 있습니다. +또한, SmartEdtitor™의 구조는 기능을 쉽게 추가할 수 있는 플러그인 구조로 되어 있어 정해진 규칙에 따라 플러그인을 만들기만 하면 됩니다. + +현재 SmartEdtitor™는 네이버, 한게임 등 NHN의 주요 서비스에 적용되어 있습니다. +지원하는 브라우저 환경은 아래와 같으며 지속적으로 지원 대상 브라우저를 확장할 예정입니다. + +* 지원하는 브라우저 +Internet Explorer 7.0+ / 10.0- +FireFox 3.5+ +Safari 4.0+ +Chrome 4.0+ + +또한 지속적인 기능 추가를 통해 편리하고 강력한 에디터로 거듭날 것입니다. + +라이센스 : LGPL v2 +홈페이지 : http://dev.naver.com/projects/smarteditor + +=================================================================================== + +릴리즈 패키지에 포함된 파일은 아래와 같습니다. +/css : 에디터에서 사용하는 css 파일 +/img : 에디터에서 사용하는 이미지 파일 +/js : 에디터를 적용할 때 사용하는 JS 파일 +/photo_uploader : 사진 퀵 업로더 팝업 UI를 구성하는 파일 +readme.txt : 간략한 설명 +release_notes.txt : 릴리즈 노트 +sample.php : SmartEditor2.html을 이용해 편집한 내용을 서버에서 받는 php 예제 +smart_editor2_inputarea.html : 에디터의 편집 영역을 나타내는 HTML로 에디터를 적용할 때 반드시 필요 +smart_editor2_inputarea_ie8.html : smart_editor2_inputarea.html와 동일한 기능이나 사용자의 브라우저 Internet Explorer 8.x 이상인 경우에 사용 +SmartEditor2.html : 에디터 데모 페이지. 에디터 적용 시에도 참고 할 수 있다. +SmartEditor2Skin.html : 에디터를 적용한 페이지에서 로드하는 에디터의 스킨 HTML 파일로 에디터에서 사용하는 JS 파일과 css 파일을 링크하며 에디터의 마크업을 가지고 있다. SmartEditor2.html 에서도 확인할 수 있다. +src_include.txt : 자바스크립트 플러그인 소스를 직접 수정하고자 할 경우 참고할 수 있는 파일 + +=================================================================================== + +사용 중 불편한 점이 있거나 버그를 발견하는 경우 SmartEdtitor™ 프로젝트의 이슈에 올려 주세요~~~ +http://dev.naver.com/projects/smarteditor/issue +여기입니다! :) \ No newline at end of file diff --git a/plugin/editor/smarteditor2/release_notes.txt b/plugin/editor/smarteditor2/release_notes.txt new file mode 100644 index 000000000..0e663806c --- /dev/null +++ b/plugin/editor/smarteditor2/release_notes.txt @@ -0,0 +1,255 @@ +============================================================================================== +2.3.10_임시 +---------------------------------------------------------------------------------------------- +1. 버그 수정 + - 크롬 > 밑줄 선택 글작성하다 취소선 선택하고 밑줄 선택을 취소한 경우 툴바에 반영되지 않는 문제 + - 굵게/밑줄/기울림/취소선이 있는 상태에서 엔터치고 폰트크기 수정하면 이전 폰트크기로 줄간격이 유지되는 문제 + - 외부프로그램 테이블 복사 붙여넣기 관련 오류 수정 + - IE8이하 > 글자크기 지정 후 엔터를 치면 커서위치가 위로 올라감 + - IE9이상 > 글꼴 효과를 미리 지정 한 후에 텍스트 입력 시, 색상 변경은 적용되나 굵게 기울임 밑줄 취소선 등의 효과는 적용안됨 + - [FF]밑줄 선택> 내용입력 후 엔터>밑줄 취소 후 내용 입력>마우스로 커서 클릭 후 내용 계속 입력 시 밑줄이 있는 글로 노출됨 + - [FF] 메모장에서 작성한 내용을 붙여넣기 후 엔터 > 내용입력 > 엔터 했을 때 줄바꿈이 되지 않는 현상 + - HTML5 > 글자를 선택하여 폰트크기 지정시 굵게/밑줄/기울림/취소선이 있으면 이전에 적용한 폰트크기 기준으로 줄간격이 유지되는 문제 + +2. 기능 개선 + - IE에서 자동으로 공백이 삽입되는 문제 + - MacOS > 사파리 > 외부프로그램 테이블 붙여넣기 개선 + +3. 보안 패치 + - 사진첨부 샘플의 null byte injection 취약점 보완 + +============================================================================================== +2.3.10 +---------------------------------------------------------------------------------------------- +1. 버그 수정 + - 크롬 > 브라우저 확대축소시 폰트크기가 잘못 나오는 이슈 + - IE > 표삽입>임의로 두개 칸 선택하여 셀 병합>행삽입 클릭 시 JS 오류 발생 + - IE11 > 호환성 보기를 설정하지 않을 경우 글꼴목록이 선택되지 않는 문제 수정 + +2. 기능 개선 + - 외부프로그램 테이블 복사 붙여넣기 개선 + - 입력창 조절 안내 레이어를 주석처리하면 스크립트 오류 발생 + +============================================================================================== +2.3.9 +---------------------------------------------------------------------------------------------- +1. 버그 수정 + - 파이어폭스에서 에디팅시 스타일깨짐 등 오작동 + - Chrome > 찾기/바꾸기 > 모두바꾸기 버튼 클릭시 찾을단어가 지워지지 않고 남아있음 + +2. 기능 개선 + - 링크 > 자동링크 설정/해제 옵션 추가 + - [IE11] WYSIWYG 모드와 HTML 모드를 오갈 때마다 문서의 마지막에 비정상적인
이 첨가됩니다. + - [웹접근성] 빠져나가기 단축키 기능 개선 + +============================================================================================== +2.3.8 +---------------------------------------------------------------------------------------------- +1. 버그 수정 + - 테이블 내부 영역을 Shift + 클릭으로 선택 후 정렬하고 HTML 로 전환하면 더미 P 태그가 생성되는 문제 수정 + - 테이블 내부 영역 선택 혹은 에디터 내용 전체 선택 후 정렬 시 동작안함 + - [IE10, IE11] 표의 셀을 드래그했을 때 블럭 지정이 되지 않는 현상 + - HTML 모드 변환시 태그 자동 정렬에 의한 버그 + +2. 기능 개선 + - [MacOS 대응] 폰트변경이슈 + +============================================================================================== +2.3.7 +---------------------------------------------------------------------------------------------- +1. 버그 수정 + - 에디터에 표 생성 후 일부 셀 선택하여 배경색 설정> 배경색 설정된 셀 선택 후 셀 삽입 시 색상이 삽입되지 않습니다. + - [IE9특정] 글 작성 중 번호매기기 또는 글머리 적용 후 정렬방식을 변경하면 엔터키 누를 시 커서가 한줄 떨어져서 노출됩니다. + - [IE10] 표 생성 후 표 드래그 시 셀의 너비/높이가 늘어나는 현상 + +2. 기능 개선 + - IE11 대응 + - 특수기호 삽입시 커서 위치가 뒤쪽으로 나오도록 개선 + - 커서에 활성화된 글꼴 확인 로직 개선 + +============================================================================================== +2.3.6 +---------------------------------------------------------------------------------------------- +1. 버그 수정 + - 글 작성 후 번호매기기 적용하고 엔터키 수행하는 경우 JS 오류가 발생하는 현상 수정 + +============================================================================================== +2.3.5 +---------------------------------------------------------------------------------------------- +1. 기능 개선 + - 줄간격 설정 시 값을 직접 입력하는 경우 줄간격의 최소값 적용 + +============================================================================================== +2.3.4 +---------------------------------------------------------------------------------------------- +1. 버그 수정 + - [IE9/10] pre 태그의 바로 다음에 \n이 존재하는 경우 개행이 되지 않는 이슈 해결 + - 입력창 크기 조절바 사용 여부 오류 해결 + - 사진 퀵 업로더 모듈 오타 수정 ($newPath -> $new_path) + +2. 기능 개선 + - 글꼴 목록에 글꼴 종류 추가하기 기능 (SmartEditor2.html 참조) + - 사진 퀵 업로더 모듈에 이미지 파일 확장자 체크 추가 + +============================================================================================== +2.3.3 +---------------------------------------------------------------------------------------------- +1. 버그 수정 + - IE9 에서 템플릿을 적용한 표 생성 후 일부의 셀을 드래그하는 경우 셀의 높이가 늘어나는 현상 수정 + +2. 기능 개선 + - MAC OS의 CMD 키로 Ctrl 단축키 기능 적용 확장 + - 기본 글꼴 종류 추가 (Courier New, 나눔고딕 코딩) + +============================================================================================== +2.3.1 +---------------------------------------------------------------------------------------------- +1. 기능 개선 + - [웹접근성] 글쓰기 영역의 iframe의 title속성에 단축키 설명 제공 + - [웹접근성] 제목 input영역에서 제목 입력 후 TAB하면 스마트에디터 편집 영역으로 포커스 이동하는 기능 추가 + - [웹접근성] 툴바 영역의 이전/다음 아이템 이동을 TAB, SHIFT+TAB으로 이동할 수 있도록 추가 + +============================================================================================== +2.3.0 +---------------------------------------------------------------------------------------------- +1. 기능 개선 + - [웹접근성] 키보드로만 메뉴를 이동할 수 있도록 단축키 적용 + - [웹접근성] 웹접근성 도움말 제공 + - 편집모드와 사이즈 조절바 사용 옵션 추가 + - 사진 첨부 팝업 데모 파일 구조 개선 + +============================================================================================== +2.2.1 +---------------------------------------------------------------------------------------------- +1. 버그 수정 + - 사진 퀵 업로더 추가 시, 가이드 대로 수행했을 때 사진 첨부가 2번 실행되는 문제 해결 + : loader-min.js 파일 내에 사진 퀵 업로더 소스가 포함되어 있던 부분 제거하여 소스 분리 + +2. 기능 개선 + - 툴바의 기능 제거/순서 변경이 쉽도록 마크업 구조 개선 + ※ 툴바의 기능 제거/순서 변경은 가이드 문서를 참고하세요. + + +3. 폴더/파일 변경 + - /js_src 폴더 제거 + - /js/smarteditor2.js 추가 + : /js_src 폴더를 /js/smarteditor2.js 로 대체했습니다. + : /js_src 폴더 구조에서 사용자가 소스를 검색하여 수정하기 어렵던 부분을 보완하기 위하여 + : /js_src 폴더 내의 플러그인 소스를 통합한 /js/smarteditor2.js 를 추가했습니다. + - /js/loader-min.js 제거 + - /js/smarteditor2.min.js 추가 + : /js/loader-min.js 파일을 /js/smarteditor2.min.js로 대체했습니다. + - /quick_photo_uploader 폴더 추가 + - /popup 폴더 이동 + : /popup 폴더 - 사진 퀵 업로더의 팝업과 관련된 소스 + : /plugin 폴더 - 사진 퀵 업로더의 사진첨부를 처리하는 플러그인 js 소스 + - /img/ko_KR 폴더 추가 + : 이후의 다국어 버전 지원을 위하여 이미지 폴더 내 디렉토리가 추가되었습니다. + : 언어 별 구분이 필요없는 이미지는 /img 바로 하위에 두었고, + : 언어 별로 구분되어야 하는 이미지는 /img/ko_KR 과 같이 언어 별 디렉토리로 구분했습니다. + : 버전 업그레이드를 하는 경우 이미지 경로가 변경된 점에 주의하시기 바랍니다. + - /js/SE2B_Configuration.js 제거 + - /js/SE2B_Configuration_Service.js 추가 + - /js/SE2B_Configuration_General.js 추가 + : /js/SE2B_Configuration_Service.js 와 /js/SE2B_Configuration_General.js로 파일 분리했습니다. + : /js/SE2B_Configuration_Service.js 는 적용을 할 때 사용자가 변경할 가능성이 높은 플러그인 설정을 갖고, + : /js/SE2B_Configuration_General.js 는 서비스에 적용할 때 변경할 가능성이 거의 없는 설정입니다. + +============================================================================================== +2.1.3 +---------------------------------------------------------------------------------------------- +1. 버그 수정 + - [Chrome] 보기 페이지에 글자색이 설정되어 있는 경우 글 작성 시 내용에 적용한 글자색으로 노출되지 않는 문제 해결 + - 엔터 처리가
로 설정된 경우에도 텍스트 모드에서 모드변경 혹은 글 저장할 때 개행이

로 표시되는 문제 해결 + - [IE9] 각주 삽입 시, 하단으로 떨어지는 이슈 해결 + - [Chrome] 인용구 밖에 글머리기호/번호매기기가 있을 때 인용구 안에서 글머리기호/번호매기기 시 내용이 인용구 밖으로 나가는 문제 해결 + - [IE] IE에서 특정 블로그 글을 복사하여 붙여넣기 했을 때 개행이 제거되는 문제 해결 + - 사진을 드래그해서 사이즈를 변경한 후 저장 혹은 HTML모드로 변경하면, 사진 사이즈가 원복되는 현상 해결 + - [Chrome/FF/Safari] 스크롤바가 생성되도록 문자입력 후 엔터 클릭하지 않은 상태에서 이미지 하나 삽입 시 이미지에 포커싱이 놓이지 않는 문제 해결 + - [IE9 표준] 사진을 스크롤로 일부 가린 상태에서 재편집하여 적용했을 때 계속 가려진 상태인 문제 해결 + - FF에서 사진을 여러장 첨부 시 스크롤이 가장 마지막 추가한 사진으로 내려가지 않음 해결 + - 호환 모드를 제거하고 사진 첨부 시 에디팅 영역의 커서 주위에 태그가 붙어서 글자가 매우 작게 되는 현상 해결 + - [IE9] 에디터에 각주 연속으로 입력 시 커서가 각주사이로 이동되는 현상 해결 + - 글꼴색/글꼴배경색 더보기에서 글꼴색 선택>다시 다른 색상 선택 후 처음 선택되었던 색상 선택 시 처음 선택색상이 원래 자리에서 삭제되지 않는 현상 해결 + - 제공하지 않는 기능인 이모티콘 플러그인 소스 제거 + - 플러그인 태그 코드 추가 시

  • 태그와 diff --git a/plugin/editor/smarteditor2/smart_editor2_inputarea.html b/plugin/editor/smarteditor2/smart_editor2_inputarea.html new file mode 100644 index 000000000..eede17a95 --- /dev/null +++ b/plugin/editor/smarteditor2/smart_editor2_inputarea.html @@ -0,0 +1,8 @@ + + + + +Smart Editor™ WYSIWYG Mode + + + \ No newline at end of file diff --git a/plugin/editor/smarteditor2/smart_editor2_inputarea_ie8.html b/plugin/editor/smarteditor2/smart_editor2_inputarea_ie8.html new file mode 100644 index 000000000..1c35a9945 --- /dev/null +++ b/plugin/editor/smarteditor2/smart_editor2_inputarea_ie8.html @@ -0,0 +1,9 @@ + + + + + +Smart Editor™ WYSIWYG Mode + + + \ No newline at end of file diff --git a/plugin/editor/smarteditor2/src_include.txt b/plugin/editor/smarteditor2/src_include.txt new file mode 100644 index 000000000..10ec6cf1b --- /dev/null +++ b/plugin/editor/smarteditor2/src_include.txt @@ -0,0 +1,7 @@ +자바스크립트 소스를 직접 수정하고자 할 경우는 SmartEditor2Skin.html 소스를 아래의 과정으로 수정한 후 자바스크립트 소스를 수정합니다. + +1) SmartEditor2Skin.html 소스에서 아래의 부분을 삭제합니다. + + +2) 다음의 라인을 복사하여 붙여넣습니다. + \ No newline at end of file