mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@458 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
437a8b1395
commit
3ff59ad225
3 changed files with 101 additions and 101 deletions
|
|
@ -4,19 +4,19 @@
|
|||
<!-- 에디터 활성화 -->
|
||||
<script type="text/javascript">
|
||||
var editor_path = "{$editor_path}";
|
||||
editorInit("{$document_srl}");
|
||||
editorInit("{$parent_srl}");
|
||||
</script>
|
||||
|
||||
<!-- 에디터 -->
|
||||
<div class="editor_content">
|
||||
<div class="editor_fontbox">
|
||||
<select onChange="editorChangeFontName(this,'{$document_srl}')" id="editor_font_{$document_srl}">
|
||||
<select onChange="editorChangeFontName(this,'{$parent_srl}')" id="editor_font_{$parent_srl}">
|
||||
<option value="">{$lang->edit->fontname}</option>
|
||||
<!--@foreach($lang->edit->fontlist as $key=>$obj)-->
|
||||
<option style="font-family:{$obj}" value="{$obj}">{$obj}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<select onChange="editorChangeFontSize(this,'{$document_srl}')" id="editor_fontsize_{$document_srl}">
|
||||
<select onChange="editorChangeFontSize(this,'{$parent_srl}')" id="editor_fontsize_{$parent_srl}">
|
||||
<option value="" selected>{$lang->edit->fontsize}</option>
|
||||
<option value="1">8pt</option>
|
||||
<option value="2">10pt</option>
|
||||
|
|
@ -28,32 +28,32 @@
|
|||
</select>
|
||||
</div>
|
||||
<div class="editor_iconbox">
|
||||
<img src="./images/font_color.gif" alt="{$lang->edit->help_fontcolor}" class="editor_icon" id="editor_ForeColor_{$document_srl}" />
|
||||
<img src="./images/font_bg_color.gif" alt="{$lang->edit->help_fontbgcolor}" class="editor_icon" id="editor_BackColor_{$document_srl}" />
|
||||
<img src="./images/bold.gif" alt="{$lang->edit->help_bold}" class="editor_icon" id="editor_Bold_{$document_srl}" />
|
||||
<img src="./images/italic.gif" alt="{$lang->edit->help_italic}" class="editor_icon" id="editor_Italic_{$document_srl}" />
|
||||
<img src="./images/underline.gif" alt="{$lang->edit->help_underline}" class="editor_icon" id="editor_Underline_{$document_srl}" />
|
||||
<img src="./images/strike.gif" alt="{$lang->edit->help_strike}" class="editor_icon" id="editor_StrikeThrough_{$document_srl}" />
|
||||
<img src="./images/add_url.gif" alt="{$lang->edit->help_add_url}" class="editor_icon" id="editor_addurl_{$document_srl}" />
|
||||
<img src="./images/add_image.gif" alt="{$lang->edit->help_add_image}" class="editor_icon" id="editor_addimage_{$document_srl}" />
|
||||
<img src="./images/add_multi.gif" alt="{$lang->edit->help_add_multimedia}" class="editor_icon" id="editor_addmultimedia_{$document_srl}" />
|
||||
<img src="./images/emoticon.gif" alt="{$lang->edit->help_add_emoticon}" class="editor_icon" id="editor_addemoticon_{$document_srl}" />
|
||||
<img src="./images/quotation.gif" alt="{$lang->edit->help_add_quotation}" class="editor_icon" id="editor_quotation_{$document_srl}" />
|
||||
<img src="./images/html_add.gif" alt="{$lang->edit->help_add_html}" class="editor_icon" id="editor_addhtml_{$document_srl}" />
|
||||
<img src="./images/font_color.gif" alt="{$lang->edit->help_fontcolor}" class="editor_icon" id="editor_ForeColor_{$parent_srl}" />
|
||||
<img src="./images/font_bg_color.gif" alt="{$lang->edit->help_fontbgcolor}" class="editor_icon" id="editor_BackColor_{$parent_srl}" />
|
||||
<img src="./images/bold.gif" alt="{$lang->edit->help_bold}" class="editor_icon" id="editor_Bold_{$parent_srl}" />
|
||||
<img src="./images/italic.gif" alt="{$lang->edit->help_italic}" class="editor_icon" id="editor_Italic_{$parent_srl}" />
|
||||
<img src="./images/underline.gif" alt="{$lang->edit->help_underline}" class="editor_icon" id="editor_Underline_{$parent_srl}" />
|
||||
<img src="./images/strike.gif" alt="{$lang->edit->help_strike}" class="editor_icon" id="editor_StrikeThrough_{$parent_srl}" />
|
||||
<img src="./images/add_url.gif" alt="{$lang->edit->help_add_url}" class="editor_icon" id="editor_addurl_{$parent_srl}" />
|
||||
<img src="./images/add_image.gif" alt="{$lang->edit->help_add_image}" class="editor_icon" id="editor_addimage_{$parent_srl}" />
|
||||
<img src="./images/add_multi.gif" alt="{$lang->edit->help_add_multimedia}" class="editor_icon" id="editor_addmultimedia_{$parent_srl}" />
|
||||
<img src="./images/emoticon.gif" alt="{$lang->edit->help_add_emoticon}" class="editor_icon" id="editor_addemoticon_{$parent_srl}" />
|
||||
<img src="./images/quotation.gif" alt="{$lang->edit->help_add_quotation}" class="editor_icon" id="editor_quotation_{$parent_srl}" />
|
||||
<img src="./images/html_add.gif" alt="{$lang->edit->help_add_html}" class="editor_icon" id="editor_addhtml_{$parent_srl}" />
|
||||
</div>
|
||||
<div id="editor_paragraph_{$document_srl}" class="editor_iconbox" style="display:none">
|
||||
<img src="./images/align_left.gif" alt="{$lang->edit->help_align_left}" id="editor_justifyleft_{$document_srl}" />
|
||||
<img src="./images/align_center.gif" alt="{$lang->edit->help_align_center}" id="editor_justifycenter_{$document_srl}" />
|
||||
<img src="./images/align_right.gif" alt="{$lang->edit->help_align_right}" id="editor_justifyright_{$document_srl}" />
|
||||
<img src="./images/remove_indent.gif" alt="{$lang->edit->help_remove_indent}" id="editor_outdent_{$document_srl}" />
|
||||
<img src="./images/add_indent.gif" alt="{$lang->edit->help_add_indent}" id="editor_indent_{$document_srl}" />
|
||||
<img src="./images/list_number.gif" alt="list number" id="editor_insertorderedlist_{$document_srl}" />
|
||||
<img src="./images/list_bullet.gif" alt="list bullet" id="editor_insertunorderedlist_{$document_srl}" />
|
||||
<div id="editor_paragraph_{$parent_srl}" class="editor_iconbox" style="display:none">
|
||||
<img src="./images/align_left.gif" alt="{$lang->edit->help_align_left}" id="editor_justifyleft_{$parent_srl}" />
|
||||
<img src="./images/align_center.gif" alt="{$lang->edit->help_align_center}" id="editor_justifycenter_{$parent_srl}" />
|
||||
<img src="./images/align_right.gif" alt="{$lang->edit->help_align_right}" id="editor_justifyright_{$parent_srl}" />
|
||||
<img src="./images/remove_indent.gif" alt="{$lang->edit->help_remove_indent}" id="editor_outdent_{$parent_srl}" />
|
||||
<img src="./images/add_indent.gif" alt="{$lang->edit->help_add_indent}" id="editor_indent_{$parent_srl}" />
|
||||
<img src="./images/list_number.gif" alt="list number" id="editor_insertorderedlist_{$parent_srl}" />
|
||||
<img src="./images/list_bullet.gif" alt="list bullet" id="editor_insertunorderedlist_{$parent_srl}" />
|
||||
</div>
|
||||
<div class="editor_parabox" id="editor_use_paragraph_box_{$document_srl}">
|
||||
<input type="checkbox" name="use_paragraph" id="editor_use_paragraph_{$document_srl}" onclick="editorUseParagraph(this,'{$document_srl}');" />
|
||||
<label for="editor_use_paragraph_{$document_srl}">{$lang->edit->use_paragraph}</label>
|
||||
<div class="editor_parabox" id="editor_use_paragraph_box_{$parent_srl}">
|
||||
<input type="checkbox" name="use_paragraph" id="editor_use_paragraph_{$parent_srl}" onclick="editorUseParagraph(this,'{$parent_srl}');" />
|
||||
<label for="editor_use_paragraph_{$parent_srl}">{$lang->edit->use_paragraph}</label>
|
||||
</div>
|
||||
|
||||
<div class="editor_iframe_box"><iframe id="editor_iframe_{$document_srl}" frameBorder="0" style="border:0px;width:99%;height:300px;margin:0px;"></iframe><div class="editor_drag_down_area" id="editor_drag_bar_{$document_srl}"></div></div>
|
||||
<div class="editor_iframe_box"><iframe id="editor_iframe_{$parent_srl}" frameBorder="0" style="border:0px;width:99%;height:300px;margin:0px;"></iframe><div class="editor_drag_down_area" id="editor_drag_bar_{$parent_srl}"></div></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,22 +5,22 @@
|
|||
var iframe_id = 'editor_iframe_';
|
||||
|
||||
// srl값에 해당하는 iframe의 object를 return
|
||||
function editorGetIFrame(document_srl) {
|
||||
var obj_id = iframe_id+document_srl;
|
||||
function editorGetIFrame(parent_srl) {
|
||||
var obj_id = iframe_id+parent_srl;
|
||||
return xGetElementById(obj_id);
|
||||
}
|
||||
|
||||
// editor 초기화를 onload이벤트 후에 시작시킴
|
||||
function editorInit(document_srl) {
|
||||
var start_func = function() { editorStart(document_srl); }
|
||||
function editorInit(parent_srl) {
|
||||
var start_func = function() { editorStart(parent_srl); }
|
||||
var init_func = function() { setTimeout(start_func, 300); }
|
||||
xAddEventListener(window, 'load', init_func);
|
||||
}
|
||||
|
||||
// editor 초기화 (document_srl로 iframe객체를 얻어서 쓰기 모드로 전환)
|
||||
function editorStart(document_srl) {
|
||||
// editor 초기화 (parent_srl로 iframe객체를 얻어서 쓰기 모드로 전환)
|
||||
function editorStart(parent_srl) {
|
||||
// iframe obj를 찾음
|
||||
var iframe_obj = editorGetIFrame(document_srl);
|
||||
var iframe_obj = editorGetIFrame(parent_srl);
|
||||
if(!iframe_obj) return;
|
||||
|
||||
// 현 에디터를 감싸고 있는 form문을 찾아서 content object를 찾아서 내용 sync
|
||||
|
|
@ -30,7 +30,7 @@ function editorStart(document_srl) {
|
|||
var content = fo_obj.content.value;
|
||||
|
||||
// 기본 폰트를 가져옴
|
||||
var default_font = xGetElementById('editor_font_'+document_srl).options[1].value;
|
||||
var default_font = xGetElementById('editor_font_'+parent_srl).options[1].value;
|
||||
|
||||
// iframe내의 document object
|
||||
var contentDocument = iframe_obj.contentWindow.document;
|
||||
|
|
@ -73,27 +73,27 @@ function editorStart(document_srl) {
|
|||
|
||||
// 문단작성기능 on/off
|
||||
if(xIE4Up) {
|
||||
xDisplay('editor_paragraph_'+document_srl, 'none');
|
||||
xDisplay('editor_use_paragraph_box_'+document_srl, 'inline');
|
||||
xDisplay('editor_paragraph_'+parent_srl, 'none');
|
||||
xDisplay('editor_use_paragraph_box_'+parent_srl, 'inline');
|
||||
} else {
|
||||
xDisplay('editor_paragraph_'+document_srl, 'block');
|
||||
xDisplay('editor_use_paragraph_box_'+document_srl, 'none');
|
||||
xDisplay('editor_paragraph_'+parent_srl, 'block');
|
||||
xDisplay('editor_use_paragraph_box_'+parent_srl, 'none');
|
||||
}
|
||||
|
||||
// 에디터의 내용을 지속적으로 fo_obj.content.value에 입력
|
||||
editorSyncContent(fo_obj.content, document_srl);
|
||||
editorSyncContent(fo_obj.content, parent_srl);
|
||||
}
|
||||
|
||||
var _editorSyncList = new Array();
|
||||
function editorSyncContent(obj, document_srl) {
|
||||
_editorSyncList[_editorSyncList.length] = {field:obj, document_srl:document_srl}
|
||||
function editorSyncContent(obj, parent_srl) {
|
||||
_editorSyncList[_editorSyncList.length] = {field:obj, parent_srl:parent_srl}
|
||||
}
|
||||
|
||||
function _editorSync() {
|
||||
for(var i=0;i<_editorSyncList.length;i++) {
|
||||
var field = _editorSyncList[i].field;
|
||||
var document_srl = _editorSyncList[i].document_srl;
|
||||
var content = editorGetContent(document_srl);
|
||||
var parent_srl = _editorSyncList[i].parent_srl;
|
||||
var content = editorGetContent(parent_srl);
|
||||
if(typeof(content)=='undefined'||!content) continue;
|
||||
field.value = content;
|
||||
}
|
||||
|
|
@ -102,13 +102,13 @@ function _editorSync() {
|
|||
xAddEventListener(window, 'load', _editorSync);
|
||||
|
||||
// 문단기능 toggle
|
||||
function editorUseParagraph(obj, document_srl) {
|
||||
toggleDisplay('editor_paragraph_'+document_srl);
|
||||
function editorUseParagraph(obj, parent_srl) {
|
||||
toggleDisplay('editor_paragraph_'+parent_srl);
|
||||
}
|
||||
|
||||
// 에디터의 내용 return
|
||||
function editorGetContent(document_srl) {
|
||||
var iframe_obj = editorGetIFrame(document_srl);
|
||||
function editorGetContent(parent_srl) {
|
||||
var iframe_obj = editorGetIFrame(parent_srl);
|
||||
if(!iframe_obj) return;
|
||||
var html = '';
|
||||
html = xInnerHtml(iframe_obj.contentWindow.document.body);
|
||||
|
|
@ -117,8 +117,8 @@ function editorGetContent(document_srl) {
|
|||
}
|
||||
|
||||
// 에디터 내의 선택된 부분의 html 코드를 return
|
||||
function editorGetSelectedHtml(document_srl) {
|
||||
var iframe_obj = editorGetIFrame(document_srl);
|
||||
function editorGetSelectedHtml(parent_srl) {
|
||||
var iframe_obj = editorGetIFrame(parent_srl);
|
||||
if(xIE4Up) {
|
||||
var range = iframe_obj.contentWindow.document.selection.createRange();
|
||||
var html = range.htmlText;
|
||||
|
|
@ -197,7 +197,7 @@ function editorEventCheck(evt) {
|
|||
if(target_id.indexOf('editor_')!=-1) {
|
||||
var tmp_str = target_id.split('_');
|
||||
var method_name = tmp_str[1];
|
||||
var document_srl = tmp_str[2];
|
||||
var parent_srl = tmp_str[2];
|
||||
switch(method_name) {
|
||||
case 'Bold' :
|
||||
case 'Italic' :
|
||||
|
|
@ -210,10 +210,10 @@ function editorEventCheck(evt) {
|
|||
case 'outdent' :
|
||||
case 'insertorderedlist' :
|
||||
case 'insertunorderedlist' :
|
||||
editorDo(method_name, '', document_srl);
|
||||
editorDo(method_name, '', parent_srl);
|
||||
break;
|
||||
default :
|
||||
editorPrevSrl = document_srl;
|
||||
editorPrevSrl = parent_srl;
|
||||
switch(method_name) {
|
||||
case "addemoticon" :
|
||||
var x = (screen.availWidth - 225)/2;
|
||||
|
|
@ -272,8 +272,8 @@ function editorEventCheck(evt) {
|
|||
}
|
||||
|
||||
// focus
|
||||
function editorFocus(document_srl) {
|
||||
var iframe_obj = editorGetIFrame(document_srl);
|
||||
function editorFocus(parent_srl) {
|
||||
var iframe_obj = editorGetIFrame(parent_srl);
|
||||
iframe_obj.contentWindow.focus();
|
||||
}
|
||||
|
||||
|
|
@ -284,12 +284,12 @@ function editorDo(name, value, target) {
|
|||
else _editorDoSrl(name, value, target);
|
||||
}
|
||||
|
||||
function _editorDoSrl(name, value, document_srl) {
|
||||
var iframe_obj = editorGetIFrame(document_srl);
|
||||
editorFocus(document_srl);
|
||||
function _editorDoSrl(name, value, parent_srl) {
|
||||
var iframe_obj = editorGetIFrame(parent_srl);
|
||||
editorFocus(parent_srl);
|
||||
if(xIE4Up) iframe_obj.contentWindow.document.execCommand(name, false, value);
|
||||
else iframe_obj.contentWindow.document.execCommand(name, false, value);
|
||||
editorFocus(document_srl);
|
||||
editorFocus(parent_srl);
|
||||
}
|
||||
|
||||
function _editorDoObject(name, value, obj) {
|
||||
|
|
@ -347,8 +347,8 @@ function editorInsertEmoticon(obj) {
|
|||
editorFocus(editorPrevSrl);
|
||||
}
|
||||
|
||||
function editorDoInsertUrl(link, document_srl) {
|
||||
editorFocus(document_srl);
|
||||
function editorDoInsertUrl(link, parent_srl) {
|
||||
editorFocus(parent_srl);
|
||||
var iframe_obj = editorGetIFrame(srl);
|
||||
editorReplaceHTML(iframe_obj, link);
|
||||
}
|
||||
|
|
@ -493,12 +493,12 @@ var uploading_file = false;
|
|||
var uploaded_files = new Array();
|
||||
|
||||
// 업로드를 하기 위한 준비 시작
|
||||
function editor_upload_init(document_srl) {
|
||||
xAddEventListener(window,'load',function() {editor_upload_form_set(document_srl);} );
|
||||
function editor_upload_init(parent_srl) {
|
||||
xAddEventListener(window,'load',function() {editor_upload_form_set(parent_srl);} );
|
||||
}
|
||||
|
||||
// document_srl에 해당하는 form의 action을 iframe으로 변경
|
||||
function editor_upload_form_set(document_srl) {
|
||||
// parent_srl에 해당하는 form의 action을 iframe으로 변경
|
||||
function editor_upload_form_set(parent_srl) {
|
||||
// 업로드용 iframe을 생성
|
||||
if(!xGetElementById('tmp_upload_iframe')) {
|
||||
if(xIE4Up) {
|
||||
|
|
@ -517,20 +517,20 @@ function editor_upload_form_set(document_srl) {
|
|||
}
|
||||
|
||||
// form의 action 을 변경
|
||||
var field_obj = xGetElementById("uploaded_file_list_"+document_srl);
|
||||
var field_obj = xGetElementById("uploaded_file_list_"+parent_srl);
|
||||
if(!field_obj) return;
|
||||
var fo_obj = field_obj.parentNode;
|
||||
while(fo_obj.nodeName != 'FORM') { fo_obj = fo_obj.parentNode; }
|
||||
fo_obj.target = 'tmp_upload_iframe';
|
||||
|
||||
// document_srl에 해당하는 첨부파일 목록을 로드
|
||||
// parent_srl에 해당하는 첨부파일 목록을 로드
|
||||
var module = "";
|
||||
if(fo_obj["module"]) module = fo_obj.module.value;
|
||||
var mid = "";
|
||||
if(fo_obj["mid"]) mid = fo_obj.mid.value;
|
||||
var document_srl = fo_obj.document_srl.value;
|
||||
var parent_srl = fo_obj.parent_srl.value;
|
||||
|
||||
var url = "./?act=procDeleteFile&document_srl="+document_srl;
|
||||
var url = "./?act=procDeleteFile&parent_srl="+parent_srl;
|
||||
if(module) url+="&module="+module;
|
||||
if(mid) url+="&mid="+mid;
|
||||
|
||||
|
|
@ -542,7 +542,7 @@ function editor_upload_form_set(document_srl) {
|
|||
}
|
||||
|
||||
// 파일 업로드
|
||||
function editor_file_upload(field_obj, document_srl) {
|
||||
function editor_file_upload(field_obj, parent_srl) {
|
||||
if(uploading_file) return;
|
||||
|
||||
var fo_obj = field_obj.parentNode;
|
||||
|
|
@ -552,25 +552,25 @@ function editor_file_upload(field_obj, document_srl) {
|
|||
fo_obj.submit();
|
||||
uploading_file = false;
|
||||
|
||||
var sel_obj = xGetElementById('uploaded_file_list_'+document_srl);
|
||||
var sel_obj = xGetElementById('uploaded_file_list_'+parent_srl);
|
||||
var string = 'wait for uploading...';
|
||||
var opt_obj = new Option(string, '', true, true);
|
||||
sel_obj.options[sel_obj.options.length] = opt_obj;
|
||||
}
|
||||
|
||||
// 업로드된 파일 목록을 삭제
|
||||
function editor_upload_clear_list(document_srl) {
|
||||
var obj = xGetElementById('uploaded_file_list_'+document_srl);
|
||||
function editor_upload_clear_list(parent_srl) {
|
||||
var obj = xGetElementById('uploaded_file_list_'+parent_srl);
|
||||
while(obj.options.length) {
|
||||
obj.remove(0);
|
||||
}
|
||||
var preview_obj = xGetElementById('uploaded_file_preview_box_'+document_srl);
|
||||
var preview_obj = xGetElementById('uploaded_file_preview_box_'+parent_srl);
|
||||
xInnerHtml(preview_obj,'')
|
||||
}
|
||||
|
||||
// 업로드된 파일 정보를 목록에 추가
|
||||
function editor_insert_uploaded_file(document_srl, file_srl, filename, file_size, disp_file_size, uploaded_filename, sid) {
|
||||
var obj = xGetElementById('uploaded_file_list_'+document_srl);
|
||||
function editor_insert_uploaded_file(parent_srl, file_srl, filename, file_size, disp_file_size, uploaded_filename, sid) {
|
||||
var obj = xGetElementById('uploaded_file_list_'+parent_srl);
|
||||
var string = filename+' ('+disp_file_size+')';
|
||||
var opt_obj = new Option(string, file_srl, true, true);
|
||||
obj.options[obj.options.length] = opt_obj;
|
||||
|
|
@ -578,17 +578,17 @@ function editor_insert_uploaded_file(document_srl, file_srl, filename, file_size
|
|||
var file_obj = {file_srl:file_srl, filename:filename, file_size:file_size, uploaded_filename:uploaded_filename, sid:sid}
|
||||
uploaded_files[file_srl] = file_obj;
|
||||
|
||||
editor_preview(obj, document_srl);
|
||||
editor_preview(obj, parent_srl);
|
||||
}
|
||||
|
||||
// 파일 목록창에서 클릭 되었을 경우 미리 보기
|
||||
function editor_preview(sel_obj, document_srl) {
|
||||
function editor_preview(sel_obj, parent_srl) {
|
||||
if(sel_obj.options.length<1) return;
|
||||
var file_srl = sel_obj.options[sel_obj.selectedIndex].value;
|
||||
var obj = uploaded_files[file_srl];
|
||||
if(typeof(obj)=='undefined'||!obj) return;
|
||||
var uploaded_filename = obj.uploaded_filename;
|
||||
var preview_obj = xGetElementById('uploaded_file_preview_box_'+document_srl);
|
||||
var preview_obj = xGetElementById('uploaded_file_preview_box_'+parent_srl);
|
||||
|
||||
if(!uploaded_filename) {
|
||||
xInnerHtml(preview_obj, '');
|
||||
|
|
@ -614,8 +614,8 @@ function editor_preview(sel_obj, document_srl) {
|
|||
}
|
||||
|
||||
// 업로드된 파일 삭제
|
||||
function editor_remove_file(document_srl) {
|
||||
var obj = xGetElementById('uploaded_file_list_'+document_srl);
|
||||
function editor_remove_file(parent_srl) {
|
||||
var obj = xGetElementById('uploaded_file_list_'+parent_srl);
|
||||
if(obj.options.length<1) return;
|
||||
var file_srl = obj.options[obj.selectedIndex].value;
|
||||
if(!file_srl) return;
|
||||
|
|
@ -624,8 +624,8 @@ function editor_remove_file(document_srl) {
|
|||
var fo_obj = obj;
|
||||
while(fo_obj.nodeName != 'FORM') { fo_obj = fo_obj.parentNode; }
|
||||
var mid = fo_obj.mid.value;
|
||||
var document_srl = fo_obj.document_srl.value;
|
||||
var url = "./?mid="+mid+"&act=procDeleteFile&document_srl="+document_srl+"&file_srl="+file_srl;
|
||||
var parent_srl = fo_obj.parent_srl.value;
|
||||
var url = "./?mid="+mid+"&act=procDeleteFile&parent_srl="+parent_srl+"&file_srl="+file_srl;
|
||||
|
||||
// iframe에 url을 보내버림
|
||||
var iframe_obj = xGetElementById('tmp_upload_iframe');
|
||||
|
|
@ -635,8 +635,8 @@ function editor_remove_file(document_srl) {
|
|||
}
|
||||
|
||||
// 업로드 목록의 선택된 파일을 내용에 추가
|
||||
function editor_insert_file(document_srl, align) {
|
||||
var obj = xGetElementById('uploaded_file_list_'+document_srl);
|
||||
function editor_insert_file(parent_srl, align) {
|
||||
var obj = xGetElementById('uploaded_file_list_'+parent_srl);
|
||||
if(obj.options.length<1) return;
|
||||
var file_srl = obj.options[obj.selectedIndex].value;
|
||||
if(!file_srl) return;
|
||||
|
|
@ -644,7 +644,7 @@ function editor_insert_file(document_srl, align) {
|
|||
var filename = file_obj.filename;
|
||||
var sid = file_obj.sid;
|
||||
var uploaded_filename = file_obj.uploaded_filename;
|
||||
editorPrevSrl = document_srl;
|
||||
editorPrevSrl = parent_srl;
|
||||
|
||||
// 바로 링크 가능한 파일의 경우 (이미지, 플래쉬, 동영상 등..)
|
||||
if(uploaded_filename && typeof(align)!='undefined') {
|
||||
|
|
@ -688,8 +688,8 @@ function editor_insert_file(document_srl, align) {
|
|||
var fo_obj = obj;
|
||||
while(fo_obj.nodeName != 'FORM') { fo_obj = fo_obj.parentNode; }
|
||||
var mid = fo_obj.mid.value;
|
||||
var document_srl = fo_obj.document_srl.value;
|
||||
var url = "./?mid="+mid+"&act=procDownload&document_srl="+document_srl+"&file_srl="+file_srl+"&sid="+sid;
|
||||
var parent_srl = fo_obj.parent_srl.value;
|
||||
var url = "./?mid="+mid+"&act=procDownload&parent_srl="+parent_srl+"&file_srl="+file_srl+"&sid="+sid;
|
||||
|
||||
var x = (screen.availWidth - 400)/2;
|
||||
var y = (screen.availHeight - 220)/2;
|
||||
|
|
@ -702,11 +702,11 @@ function editor_insert_file(document_srl, align) {
|
|||
/**
|
||||
* 글을 쓰다가 페이지 이동시 첨부파일에 대한 정리
|
||||
**/
|
||||
function editorRemoveAttachFiles(mid, document_srl) {
|
||||
var obj = xGetElementById('uploaded_file_list_'+document_srl);
|
||||
function editorRemoveAttachFiles(mid, parent_srl) {
|
||||
var obj = xGetElementById('uploaded_file_list_'+parent_srl);
|
||||
if(obj.options.length<1) return;
|
||||
|
||||
var params = new Array();
|
||||
params['document_srl'] = document_srl;
|
||||
params['parent_srl'] = parent_srl;
|
||||
exec_xml(mid, 'procClearFile', params, null, null, null);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,41 +1,41 @@
|
|||
<!--@if($grant->fileupload)-->
|
||||
<script type="text/javascript">
|
||||
editor_upload_init("{$document_srl}");
|
||||
editor_upload_init("{$parent_srl}");
|
||||
</script>
|
||||
|
||||
<div class="editor_uploader_box">
|
||||
<table>
|
||||
<tr valign="top">
|
||||
<td width="125"><div id="uploaded_file_preview_box_{$document_srl}" class="uploaded_file_preview_box"></div></td>
|
||||
<td width="125"><div id="uploaded_file_preview_box_{$parent_srl}" class="uploaded_file_preview_box"></div></td>
|
||||
<td width="150">
|
||||
<div class="editor_align_icon">
|
||||
<img src="./images/icon_align_article.gif" border="0" onclick="editor_insert_file('{$document_srl}', '');" alt="{$lang->edit->icon_align_article}"/>
|
||||
<img src="./images/icon_align_article.gif" border="0" onclick="editor_insert_file('{$parent_srl}', '');" alt="{$lang->edit->icon_align_article}"/>
|
||||
{$lang->edit->icon_align_article}
|
||||
</div>
|
||||
<div class="editor_align_icon">
|
||||
<img src="./images/icon_align_left.gif" border="0" onclick="editor_insert_file('{$document_srl}', 'left');" alt="{$lang->edit->icon_align_left}"/>
|
||||
<img src="./images/icon_align_left.gif" border="0" onclick="editor_insert_file('{$parent_srl}', 'left');" alt="{$lang->edit->icon_align_left}"/>
|
||||
{$lang->edit->icon_align_left}
|
||||
</div>
|
||||
<div class="editor_align_icon">
|
||||
<img src="./images/icon_align_middle.gif" border="0" onclick="editor_insert_file('{$document_srl}', 'middle');" alt="{$lang->edit->icon_align_middle}"/>
|
||||
<img src="./images/icon_align_middle.gif" border="0" onclick="editor_insert_file('{$parent_srl}', 'middle');" alt="{$lang->edit->icon_align_middle}"/>
|
||||
{$lang->edit->icon_align_middle}
|
||||
</div>
|
||||
<div class="editor_align_icon">
|
||||
<img src="./images/icon_align_right.gif" border="0" onclick="editor_insert_file('{$document_srl}', 'right');" alt="{$lang->edit->icon_align_right}"/>
|
||||
<img src="./images/icon_align_right.gif" border="0" onclick="editor_insert_file('{$parent_srl}', 'right');" alt="{$lang->edit->icon_align_right}"/>
|
||||
{$lang->edit->icon_align_right}
|
||||
</div>
|
||||
</td>
|
||||
<td><select id='uploaded_file_list_{$document_srl}' size='9' class="uploaded_file_list" onclick="editor_preview(this, '{$document_srl}')"></select></td>
|
||||
<td><select id='uploaded_file_list_{$parent_srl}' size='9' class="uploaded_file_list" onclick="editor_preview(this, '{$parent_srl}')"></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="button" value="{$lang->edit->delete_selected}" onclick="editor_remove_file('{$document_srl}');return false;" style="width:100%;"/>
|
||||
<input type="button" value="{$lang->edit->delete_selected}" onclick="editor_remove_file('{$parent_srl}');return false;" style="width:100%;"/>
|
||||
</td>
|
||||
<td>
|
||||
<input type="button" value="{$lang->edit->link_selected}" onclick="editor_insert_file('{$document_srl}');return false;" style="width:100%;"/>
|
||||
<input type="button" value="{$lang->edit->link_selected}" onclick="editor_insert_file('{$parent_srl}');return false;" style="width:100%;"/>
|
||||
</td>
|
||||
<td align="right">
|
||||
<input type="file" name="file" onchange="editor_file_upload(this, '{$document_srl}')" value="{$lang->edit->upload}" style="width:100%;" />
|
||||
<input type="file" name="file" onchange="editor_file_upload(this, '{$parent_srl}')" value="{$lang->edit->upload}" style="width:100%;" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue