mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
editor default skin 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4830 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
53f53f6a18
commit
e103fa10c2
9 changed files with 116 additions and 65 deletions
|
|
@ -8,6 +8,8 @@
|
||||||
<action name="dispEditorAdminIndex" type="view" standalone="true" admin_index="true" />
|
<action name="dispEditorAdminIndex" type="view" standalone="true" admin_index="true" />
|
||||||
<action name="dispEditorAdminSetupComponent" type="view" standalone="true" />
|
<action name="dispEditorAdminSetupComponent" type="view" standalone="true" />
|
||||||
<action name="dispEditorAdminSkinColorset" type="view" standalone="true" />
|
<action name="dispEditorAdminSkinColorset" type="view" standalone="true" />
|
||||||
|
<action name="dispEditorPreview" type="view" />
|
||||||
|
|
||||||
|
|
||||||
<action name="procEditorSaveDoc" type="controller" standalone="true" />
|
<action name="procEditorSaveDoc" type="controller" standalone="true" />
|
||||||
<action name="procEditorRemoveSavedDoc" type="controller" standalone="true" />
|
<action name="procEditorRemoveSavedDoc" type="controller" standalone="true" />
|
||||||
|
|
|
||||||
|
|
@ -10,4 +10,4 @@
|
||||||
$oModule->add('colorset', Context::get('colorset'));
|
$oModule->add('colorset', Context::get('colorset'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
@ -103,4 +103,4 @@
|
||||||
return executeQuery('editor.deleteSavedDoc', $args);
|
return executeQuery('editor.deleteSavedDoc', $args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
@ -100,5 +100,17 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function dispEditorPreview(){
|
||||||
|
/*
|
||||||
|
Context::setResponseMethod();
|
||||||
|
$content = Context::get('content');
|
||||||
|
$oContext = Context::getInstance();
|
||||||
|
$content = $oContext->transContent($content);
|
||||||
|
Context::setResponseMethod('XMLRPC');
|
||||||
|
Context::set('content',$content);
|
||||||
|
*/
|
||||||
|
$this->setTemplatePath($this->module_path.'tpl');
|
||||||
|
$this->setTemplateFile('preview');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
@ -40,14 +40,14 @@
|
||||||
|
|
||||||
<ul class="editorTypeSelector">
|
<ul class="editorTypeSelector">
|
||||||
<li class="active" id="use_rich_{$editor_sequence}"><a href="#xeEditor" onclick="editorChangeMode('', '{$editor_sequence}')"><span>{$lang->edit->rich_editor}</span></a></li>
|
<li class="active" id="use_rich_{$editor_sequence}"><a href="#xeEditor" onclick="editorChangeMode('', '{$editor_sequence}')"><span>{$lang->edit->rich_editor}</span></a></li>
|
||||||
|
|
||||||
<!-- HTML 모드 사용 -->
|
<!-- HTML 모드 사용 -->
|
||||||
<!--@if($html_mode)-->
|
<!--@if($html_mode)-->
|
||||||
<!--@if($html_mode)-->
|
<!--@if($html_mode)-->
|
||||||
<li id="use_html_{$editor_sequence}"><a href="#htmlEditor" onclick="editorChangeMode('html', '{$editor_sequence}')"><span>{$lang->edit->html_editor}</span></a></li>
|
<li id="use_html_{$editor_sequence}"><a href="#htmlEditor" onclick="editorChangeMode('html', '{$editor_sequence}')"><span>{$lang->edit->html_editor}</span></a></li>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
||||||
<li id="preview_html_{$editor_sequence}"><a href="#htmlEditor" onclick="editorChangeMode('preview','{$editor_sequence}');"><span>{$lang->cmd_preview}</span></a></li>
|
<li id="preview_html_{$editor_sequence}"><a href="#htmlEditor" onclick="editorChangeMode('preview','{$editor_sequence}');"><span>{$lang->cmd_preview}</span></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
@ -63,7 +63,7 @@
|
||||||
<li class="undo"><button type="button" onclick="editorUnDo(this,'{$editor_sequence}')" id="editor_undo_{$editor_sequence}" title="Ctrl+Z:Un Do"><span>Un Do</span></button></li>
|
<li class="undo"><button type="button" onclick="editorUnDo(this,'{$editor_sequence}')" id="editor_undo_{$editor_sequence}" title="Ctrl+Z:Un Do"><span>Un Do</span></button></li>
|
||||||
<li class="redo"><button type="button" onclick="editorReDo(this,'{$editor_sequence}')" id="editor_redo_{$editor_sequence}" title="Ctrl+Y:Re Do"><span>Re Do</span></button></li>
|
<li class="redo"><button type="button" onclick="editorReDo(this,'{$editor_sequence}')" id="editor_redo_{$editor_sequence}" title="Ctrl+Y:Re Do"><span>Re Do</span></button></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ul class="type item">
|
<ul class="type item">
|
||||||
<li class="hx">
|
<li class="hx">
|
||||||
<select onchange="editorChangeHeader(this,'{$editor_sequence}')" id="editor_header_{$editor_sequence}">
|
<select onchange="editorChangeHeader(this,'{$editor_sequence}')" id="editor_header_{$editor_sequence}">
|
||||||
|
|
@ -94,7 +94,7 @@
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ul class="style item">
|
<ul class="style item">
|
||||||
<li class="bold"><button type="button" title="Ctrl+B:{$lang->edit->help_bold}" id="component_{$editor_sequence}_Bold"><span>Bold</span></button></li>
|
<li class="bold"><button type="button" title="Ctrl+B:{$lang->edit->help_bold}" id="component_{$editor_sequence}_Bold"><span>Bold</span></button></li>
|
||||||
<li class="underline"><button type="button" title="Ctrl+U:{$lang->edit->help_underline}" id="component_{$editor_sequence}_Underline"><span>Underline</span></button></li>
|
<li class="underline"><button type="button" title="Ctrl+U:{$lang->edit->help_underline}" id="component_{$editor_sequence}_Underline"><span>Underline</span></button></li>
|
||||||
|
|
@ -106,7 +106,7 @@
|
||||||
<li class="bgColor"><button type="button" title="{$lang->edit->help_fontbgcolor}" id="component_{$editor_sequence}_colorpicker_bg"><span>Background Color</span></button></li>
|
<li class="bgColor"><button type="button" title="{$lang->edit->help_fontbgcolor}" id="component_{$editor_sequence}_colorpicker_bg"><span>Background Color</span></button></li>
|
||||||
<li class="styleRemover"><button type="button" title="Ctrl+D:{$lang->edit->help_remove_format}" id="component_{$editor_sequence}_RemoveFormat"><span>Style Remover</span></button></li>
|
<li class="styleRemover"><button type="button" title="Ctrl+D:{$lang->edit->help_remove_format}" id="component_{$editor_sequence}_RemoveFormat"><span>Style Remover</span></button></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ul class="paragraph item">
|
<ul class="paragraph item">
|
||||||
<li class="alignLeft"><button type="button" title="{$lang->edit->help_align_left}" id="component_{$editor_sequence}_JustifyLeft"><span>Align Left</span></button></li>
|
<li class="alignLeft"><button type="button" title="{$lang->edit->help_align_left}" id="component_{$editor_sequence}_JustifyLeft"><span>Align Left</span></button></li>
|
||||||
<li class="alignCenter"><button type="button" title="{$lang->edit->help_align_center}" id="component_{$editor_sequence}_JustifyCenter"><span>Align Center</span></button></li>
|
<li class="alignCenter"><button type="button" title="{$lang->edit->help_align_center}" id="component_{$editor_sequence}_JustifyCenter"><span>Align Center</span></button></li>
|
||||||
|
|
@ -117,7 +117,7 @@
|
||||||
<li class="outdent"><button type="button" title="{$lang->edit->help_remove_indent}" id="component_{$editor_sequence}_Outdent"><span>Outdent</span></button></li>
|
<li class="outdent"><button type="button" title="{$lang->edit->help_remove_indent}" id="component_{$editor_sequence}_Outdent"><span>Outdent</span></button></li>
|
||||||
<li class="indent"><button type="button" title="{$lang->edit->help_add_indent}" id="component_{$editor_sequence}_Indent"><span>Indent</span></button></li>
|
<li class="indent"><button type="button" title="{$lang->edit->help_add_indent}" id="component_{$editor_sequence}_Indent"><span>Indent</span></button></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ul class="extension1 item">
|
<ul class="extension1 item">
|
||||||
<li class="url"><button type="button" title="Ctrl+L:URL" id="component_1_url_link"><span>URL</span></button></li>
|
<li class="url"><button type="button" title="Ctrl+L:URL" id="component_1_url_link"><span>URL</span></button></li>
|
||||||
<li class="blockquote"><button type="button" title="Blockquote" id="component_1_quotation"><span>Blockquote</span></button></li>
|
<li class="blockquote"><button type="button" title="Blockquote" id="component_1_quotation"><span>Blockquote</span></button></li>
|
||||||
|
|
@ -127,7 +127,7 @@
|
||||||
<!--<li class="file"><button type="button" title="File" id="component_1_file"><span>Movie</span></button></li>-->
|
<!--<li class="file"><button type="button" title="File" id="component_1_file"><span>Movie</span></button></li>-->
|
||||||
<li class="emoticon"><button type="button" title="Emoticon" id="component_1_emoticon"><span>Emoticon</span></button></li>
|
<li class="emoticon"><button type="button" title="Emoticon" id="component_1_emoticon"><span>Emoticon</span></button></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
<!--@if($enable_component)-->
|
<!--@if($enable_component)-->
|
||||||
<!-- 확장 컴포넌트 출력 -->
|
<!-- 확장 컴포넌트 출력 -->
|
||||||
|
|
@ -142,7 +142,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
||||||
<div class="editorHelp" id="editorHelp_{$editor_sequence}">
|
<div class="editorHelp" id="editorHelp_{$editor_sequence}">
|
||||||
<button type="button" class="helpButton" title="{$lang->edit->help}" onclick="showEditorHelp(event,{$editor_sequence})"><span>{$lang->edit->help}</span></button>
|
<button type="button" class="helpButton" title="{$lang->edit->help}" onclick="showEditorHelp(event,{$editor_sequence})"><span>{$lang->edit->help}</span></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -165,7 +165,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!--@if($enable_autosave)-->
|
<!--@if($enable_autosave)-->
|
||||||
|
|
@ -177,7 +177,7 @@
|
||||||
<div class="editorMargin" >
|
<div class="editorMargin" >
|
||||||
<iframe id="editor_iframe_{$editor_sequence}" class="richEditor" frameborder="0" height="{$editor_height}" title="Rich Text Editor"></iframe>
|
<iframe id="editor_iframe_{$editor_sequence}" class="richEditor" frameborder="0" height="{$editor_height}" title="Rich Text Editor"></iframe>
|
||||||
<textarea id="editor_textarea_{$editor_sequence}" class="htmlEditor" style="height:{$editor_height}" rows="5" cols="20" title="HTML Editor"></textarea>
|
<textarea id="editor_textarea_{$editor_sequence}" class="htmlEditor" style="height:{$editor_height}" rows="5" cols="20" title="HTML Editor"></textarea>
|
||||||
<div id="editor_preview_{$editor_sequence}" class="previewEditor"></div>
|
<iframe id="editor_preview_{$editor_sequence}" name="editor_preview_{$editor_sequence}" frameborder="0" height="{$editor_height}" style="display:none;border:0;"></iframe>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -209,7 +209,7 @@
|
||||||
);
|
);
|
||||||
//]]></script>
|
//]]></script>
|
||||||
<!-- 파일 업로드 영역 -->
|
<!-- 파일 업로드 영역 -->
|
||||||
<div class="fileUploader">
|
<div id="fileUploader_{$editor_sequence}" class="fileUploader">
|
||||||
<div class="preview" id="preview_uploaded_{$editor_sequence}"></div>
|
<div class="preview" id="preview_uploaded_{$editor_sequence}"></div>
|
||||||
<div class="fileListArea">
|
<div class="fileListArea">
|
||||||
<select id="uploaded_file_list_{$editor_sequence}" multiple="multiple" class="fileList" title="Attached File List"><option></option></select>
|
<select id="uploaded_file_list_{$editor_sequence}" multiple="multiple" class="fileList" title="Attached File List"><option></option></select>
|
||||||
|
|
|
||||||
|
|
@ -409,16 +409,21 @@ function editorChangeMode(mode, editor_sequence) {
|
||||||
var html = null;
|
var html = null;
|
||||||
if(editorMode[editor_sequence]=='html') {
|
if(editorMode[editor_sequence]=='html') {
|
||||||
html = textarea_obj.value;
|
html = textarea_obj.value;
|
||||||
|
contentDocument.body.innerHTML = textarea_obj.value;
|
||||||
} else if (editorMode[editor_sequence]=='preview') {
|
} else if (editorMode[editor_sequence]=='preview') {
|
||||||
html = xInnerHtml(preview_obj);
|
// html = xInnerHtml(preview_obj);
|
||||||
|
html = textarea_obj.value;
|
||||||
} else {
|
} else {
|
||||||
html = contentDocument.body.innerHTML;
|
html = contentDocument.body.innerHTML;
|
||||||
|
textarea_obj.value = html
|
||||||
html = html.replace(/<br>/ig,"<br />\n");
|
html = html.replace(/<br>/ig,"<br />\n");
|
||||||
html = html.replace(/<br \/>\n\n/ig,"<br />\n");
|
html = html.replace(/<br \/>\n\n/ig,"<br />\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// html 편집 사용시
|
// html 편집 사용시
|
||||||
if(mode == 'html' && textarea_obj) {
|
if(mode == 'html' && textarea_obj) {
|
||||||
|
preview_obj.style.display='none';
|
||||||
|
xGetElementById('fileUploader_'+editor_sequence).style.display='block';
|
||||||
textarea_obj.value = html;
|
textarea_obj.value = html;
|
||||||
xWidth(textarea_obj, xWidth(iframe_obj.parentNode));
|
xWidth(textarea_obj, xWidth(iframe_obj.parentNode));
|
||||||
xHeight(textarea_obj, xHeight(iframe_obj.parentNode));
|
xHeight(textarea_obj, xHeight(iframe_obj.parentNode));
|
||||||
|
|
@ -432,7 +437,21 @@ function editorChangeMode(mode, editor_sequence) {
|
||||||
}
|
}
|
||||||
// 미리보기
|
// 미리보기
|
||||||
} else if(mode == 'preview' && preview_obj) {
|
} else if(mode == 'preview' && preview_obj) {
|
||||||
xInnerHtml(preview_obj, html);
|
preview_obj.style.display='';
|
||||||
|
xGetElementById('fileUploader_'+editor_sequence).style.display='none';
|
||||||
|
|
||||||
|
var fo_obj = xGetElementById("preview_form");
|
||||||
|
if(!fo_obj) {
|
||||||
|
fo_obj = xCreateElement('form');
|
||||||
|
fo_obj.id = "preview_form";
|
||||||
|
fo_obj.action = request_uri;
|
||||||
|
fo_obj.target = "editor_preview_"+editor_sequence;
|
||||||
|
xInnerHtml(fo_obj,'<input type="hidden" name="module" value="editor" /><input type="hidden" name="act" value="dispEditorPreview" /><input type="hidden" name="content" />');
|
||||||
|
document.body.appendChild(fo_obj);
|
||||||
|
}
|
||||||
|
fo_obj.content.value = html;
|
||||||
|
fo_obj.submit();
|
||||||
|
|
||||||
xWidth(preview_obj, xWidth(iframe_obj.parentNode));
|
xWidth(preview_obj, xWidth(iframe_obj.parentNode));
|
||||||
editorMode[editor_sequence] = 'preview';
|
editorMode[editor_sequence] = 'preview';
|
||||||
|
|
||||||
|
|
@ -444,6 +463,8 @@ function editorChangeMode(mode, editor_sequence) {
|
||||||
}
|
}
|
||||||
// 위지윅 모드 사용시
|
// 위지윅 모드 사용시
|
||||||
} else {
|
} else {
|
||||||
|
preview_obj.style.display='none';
|
||||||
|
xGetElementById('fileUploader_'+editor_sequence).style.display='block';
|
||||||
contentDocument.body.innerHTML = html;
|
contentDocument.body.innerHTML = html;
|
||||||
editorMode[editor_sequence] = null;
|
editorMode[editor_sequence] = null;
|
||||||
|
|
||||||
|
|
@ -495,3 +516,9 @@ function showEditorExtension(e,editor_sequence){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showPreviewContent(ret_obj,response_tags, params, fo_obj) {
|
||||||
|
var preview_obj = editorGetPreviewArea(params.editor_sequence);
|
||||||
|
xGetElementById('fileUploader_'+params.editor_sequence).style.display='none';
|
||||||
|
// alert(ret_obj.content);
|
||||||
|
xInnerHtml(preview_obj, ret_obj.content);
|
||||||
|
}
|
||||||
|
|
@ -146,10 +146,12 @@ function editorDragMove(evt) {
|
||||||
|
|
||||||
var iframe_obj = editorGetIFrame(editorDragObj.id);
|
var iframe_obj = editorGetIFrame(editorDragObj.id);
|
||||||
var textarea_obj = editorGetTextarea(editorDragObj.id);
|
var textarea_obj = editorGetTextarea(editorDragObj.id);
|
||||||
var height = xHeight(iframe_obj) || xHeight(textarea_obj);
|
var preview_obj = xGetElementById('editor_preview_'+editorDragObj.id);
|
||||||
|
var height = xHeight(iframe_obj) || xHeight(textarea_obj) || xHeight(preview_obj);
|
||||||
height += h;
|
height += h;
|
||||||
xHeight(iframe_obj, height);
|
xHeight(iframe_obj, height);
|
||||||
xHeight(textarea_obj, height);
|
xHeight(textarea_obj, height);
|
||||||
|
xHeight(preview_obj, height);
|
||||||
// xHeight(iframe_obj.parentNode, height+200);
|
// xHeight(iframe_obj.parentNode, height+200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ function editorUploadInit(obj) {
|
||||||
xAddEventListener(window,"load",function() { XEUploaderStart(obj) });
|
xAddEventListener(window,"load",function() { XEUploaderStart(obj) });
|
||||||
}
|
}
|
||||||
|
|
||||||
// 파일 업로드를 위한 기본 준비를 함
|
// 파일 업로드를 위한 기본 준비를 함
|
||||||
function XEUploaderStart(obj) {
|
function XEUploaderStart(obj) {
|
||||||
try { document.execCommand('BackgroundImageCache',false,true); } catch(e) { }
|
try { document.execCommand('BackgroundImageCache',false,true); } catch(e) { }
|
||||||
|
|
||||||
|
|
@ -73,7 +73,7 @@ function XEUploaderStart(obj) {
|
||||||
upload_error_handler : uploadError,
|
upload_error_handler : uploadError,
|
||||||
upload_success_handler : uploadSuccess,
|
upload_success_handler : uploadSuccess,
|
||||||
upload_complete_handler : uploadComplete,
|
upload_complete_handler : uploadComplete,
|
||||||
queue_complete_handler :queueComplete
|
queue_complete_handler :queueComplete
|
||||||
};
|
};
|
||||||
settings["post_params"][obj["sessionName"]] = xGetCookie(obj["sessionName"]);
|
settings["post_params"][obj["sessionName"]] = xGetCookie(obj["sessionName"]);
|
||||||
settings["editorSequence"] = obj["editorSequence"];
|
settings["editorSequence"] = obj["editorSequence"];
|
||||||
|
|
@ -167,39 +167,39 @@ function uploadSuccess(file, serverData) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function uploadError(file, errorCode, message) {
|
function uploadError(file, errorCode, message) {
|
||||||
try {
|
try {
|
||||||
switch (errorCode) {
|
switch (errorCode) {
|
||||||
case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:
|
case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:
|
||||||
alert("Error Code: HTTP Error, File name: " + file.name + ", Message: " + message);
|
alert("Error Code: HTTP Error, File name: " + file.name + ", Message: " + message);
|
||||||
break;
|
break;
|
||||||
case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:
|
case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:
|
||||||
alert("Error Code: Upload Failed, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
|
alert("Error Code: Upload Failed, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
|
||||||
break;
|
break;
|
||||||
case SWFUpload.UPLOAD_ERROR.IO_ERROR:
|
case SWFUpload.UPLOAD_ERROR.IO_ERROR:
|
||||||
alert("Error Code: IO Error, File name: " + file.name + ", Message: " + message);
|
alert("Error Code: IO Error, File name: " + file.name + ", Message: " + message);
|
||||||
break;
|
break;
|
||||||
case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:
|
case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:
|
||||||
alert("Error Code: Security Error, File name: " + file.name + ", Message: " + message);
|
alert("Error Code: Security Error, File name: " + file.name + ", Message: " + message);
|
||||||
break;
|
break;
|
||||||
case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:
|
case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:
|
||||||
alert("Error Code: Upload Limit Exceeded, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
|
alert("Error Code: Upload Limit Exceeded, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
|
||||||
break;
|
break;
|
||||||
case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED:
|
case SWFUpload.UPLOAD_ERROR.FILE_VALIDATION_FAILED:
|
||||||
alert("Error Code: File Validation Failed, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
|
alert("Error Code: File Validation Failed, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
|
||||||
break;
|
break;
|
||||||
case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:
|
case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:
|
||||||
// If there aren't any files left (they were all cancelled) disable the cancel button
|
// If there aren't any files left (they were all cancelled) disable the cancel button
|
||||||
if (this.getStats().files_queued === 0) {
|
if (this.getStats().files_queued === 0) {
|
||||||
document.getElementById(this.customSettings.cancelButtonId).disabled = true;
|
document.getElementById(this.customSettings.cancelButtonId).disabled = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:
|
case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
alert("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
|
alert("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
this.debug(ex);
|
this.debug(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -332,41 +332,48 @@ function removeUploadedFile(editorSequence) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function insertUploadedFile(editorSequence) {
|
function insertUploadedFile(editorSequence) {
|
||||||
|
|
||||||
var settings = uploaderSettings[editorSequence];
|
var settings = uploaderSettings[editorSequence];
|
||||||
var fileListAreaID = settings["fileListAreaID"];
|
var fileListAreaID = settings["fileListAreaID"];
|
||||||
var fileListObj = xGetElementById(fileListAreaID);
|
var fileListObj = xGetElementById(fileListAreaID);
|
||||||
if(!fileListObj) return;
|
if(!fileListObj) return;
|
||||||
|
|
||||||
if(typeof(editorMode)!='undefined' && editorMode[editorSequence]=='html') return;
|
if(editorMode[editorSequence]=='preview') return;
|
||||||
|
|
||||||
var iframe_obj = editorGetIFrame(editorSequence);
|
|
||||||
if(!iframe_obj) return;
|
|
||||||
|
|
||||||
|
var text = new Array();
|
||||||
for(var i=0;i<fileListObj.options.length;i++) {
|
for(var i=0;i<fileListObj.options.length;i++) {
|
||||||
if(!fileListObj.options[i].selected) continue;
|
if(!fileListObj.options[i].selected) continue;
|
||||||
var file_srl = fileListObj.options[i].value;
|
var file_srl = fileListObj.options[i].value;
|
||||||
if(!file_srl) continue;
|
if(!file_srl) continue;
|
||||||
|
|
||||||
var file = uploadedFiles[file_srl];
|
var file = uploadedFiles[file_srl];
|
||||||
|
|
||||||
editorFocus(editorSequence);
|
editorFocus(editorSequence);
|
||||||
|
|
||||||
var text = "";
|
|
||||||
|
|
||||||
// 바로 링크 가능한 파일의 경우 (이미지, 플래쉬, 동영상 등..)
|
// 바로 링크 가능한 파일의 경우 (이미지, 플래쉬, 동영상 등..)
|
||||||
if(file.direct_download == 'Y') {
|
if(file.direct_download == 'Y') {
|
||||||
// 이미지 파일의 경우 image_link 컴포넌트 열결
|
// 이미지 파일의 경우 image_link 컴포넌트 열결
|
||||||
if(/\.(jpg|jpeg|png|gif)$/i.test(file.download_url)) {
|
if(/\.(jpg|jpeg|png|gif)$/i.test(file.download_url)) {
|
||||||
var text = "<img editor_component=\"image_link\" src=\""+file.download_url+"\" alt=\""+file.source_filename+"\" />";
|
text.push("<img editor_component=\"image_link\" src=\""+file.download_url+"\" alt=\""+file.source_filename+"\" />");
|
||||||
// 이미지외의 경우는 multimedia_link 컴포넌트 연결
|
// 이미지외의 경우는 multimedia_link 컴포넌트 연결
|
||||||
} else {
|
} else {
|
||||||
var text = "<img src=\"./common/tpl/images/blank.gif\" editor_component=\"multimedia_link\" multimedia_src=\""+file.download_url+"\" width=\"400\" height=\"320\" style=\"display:block;width:400px;height:320px;border:2px dotted #4371B9;background:url(./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif) no-repeat center;\" auto_start=\"false\" alt=\"\" />";
|
text.push("<img src=\"./common/tpl/images/blank.gif\" editor_component=\"multimedia_link\" multimedia_src=\""+file.download_url+"\" width=\"400\" height=\"320\" style=\"display:block;width:400px;height:320px;border:2px dotted #4371B9;background:url(./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif) no-repeat center;\" auto_start=\"false\" alt=\"\" />");
|
||||||
}
|
}
|
||||||
|
|
||||||
// binary파일의 경우 url_link 컴포넌트 연결
|
// binary파일의 경우 url_link 컴포넌트 연결
|
||||||
} else {
|
} else {
|
||||||
var text = "<a href=\""+file.download_url+"\">"+file.source_filename+"</a>\n";
|
text.push("<a href=\""+file.download_url+"\">"+file.source_filename+"</a>\n");
|
||||||
}
|
}
|
||||||
if(text) editorReplaceHTML(iframe_obj, text);
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// html 모드
|
||||||
|
if(editorMode[editorSequence]=='html'){
|
||||||
|
if(text.length>0) xGetElementById('editor_textarea_'+editorSequence).value += text.join('');
|
||||||
|
|
||||||
|
// 위지윅 모드
|
||||||
|
}else{
|
||||||
|
var iframe_obj = editorGetIFrame(editorSequence);
|
||||||
|
if(!iframe_obj) return;
|
||||||
|
if(text.length>0) editorReplaceHTML(iframe_obj, text.join(''));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
1
modules/editor/tpl/preview.html
Normal file
1
modules/editor/tpl/preview.html
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{$content}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue