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@1574 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c4e6004d80
commit
da7e33354a
9 changed files with 184 additions and 93 deletions
|
|
@ -25,7 +25,13 @@
|
||||||
|
|
||||||
// 에디터 모듈의 getEditor를 호출하여 세팅
|
// 에디터 모듈의 getEditor를 호출하여 세팅
|
||||||
$oEditorModel = &getModel('editor');
|
$oEditorModel = &getModel('editor');
|
||||||
$comment_editor = $oEditorModel->getEditor($upload_target_srl, false);
|
$option->allow_fileupload = $this->grant->comment_fileupload;
|
||||||
|
$option->enable_autosave = false;
|
||||||
|
$option->enable_default_component = true;
|
||||||
|
$option->enable_component = true;
|
||||||
|
$option->resizable = true;
|
||||||
|
$option->height = 100;
|
||||||
|
$comment_editor = $oEditorModel->getEditor($upload_target_srl, $option);
|
||||||
|
|
||||||
// 변수 설정
|
// 변수 설정
|
||||||
Context::set('comment_editor', $comment_editor);
|
Context::set('comment_editor', $comment_editor);
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,13 @@
|
||||||
|
|
||||||
// 에디터 모듈의 getEditor를 호출하여 세팅
|
// 에디터 모듈의 getEditor를 호출하여 세팅
|
||||||
$oEditorModel = &getModel('editor');
|
$oEditorModel = &getModel('editor');
|
||||||
$editor = $oEditorModel->getEditor($document_srl, $this->grant->fileupload, true);
|
$option->allow_fileupload = $this->grant->fileupload;
|
||||||
|
$option->enable_autosave = true;
|
||||||
|
$option->enable_default_component = true;
|
||||||
|
$option->enable_component = true;
|
||||||
|
$option->resizable = true;
|
||||||
|
$option->height = 400;
|
||||||
|
$editor = $oEditorModel->getEditor($document_srl, $option);
|
||||||
Context::set('editor', $editor);
|
Context::set('editor', $editor);
|
||||||
|
|
||||||
$this->setTemplateFile('write_form');
|
$this->setTemplateFile('write_form');
|
||||||
|
|
@ -359,10 +365,14 @@
|
||||||
$comment_srl = getNextSequence();
|
$comment_srl = getNextSequence();
|
||||||
Context::set('comment_srl', $comment_srl);
|
Context::set('comment_srl', $comment_srl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 에디터 모듈의 getEditor를 호출하여 세팅
|
|
||||||
$oEditorModel = &getModel('editor');
|
$oEditorModel = &getModel('editor');
|
||||||
$comment_editor = $oEditorModel->getEditor($comment_srl, $this->grant->fileupload);
|
$option->allow_fileupload = $this->grant->comment_fileupload;
|
||||||
|
$option->enable_autosave = false;
|
||||||
|
$option->enable_default_component = true;
|
||||||
|
$option->enable_component = true;
|
||||||
|
$option->resizable = true;
|
||||||
|
$option->height = 400;
|
||||||
|
$comment_editor = $oEditorModel->getEditor($comment_srl, $option);
|
||||||
Context::set('comment_editor', $comment_editor);
|
Context::set('comment_editor', $comment_editor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -153,7 +153,13 @@
|
||||||
|
|
||||||
// 에디터 모듈의 getEditor를 호출하여 세팅
|
// 에디터 모듈의 getEditor를 호출하여 세팅
|
||||||
$oEditorModel = &getModel('editor');
|
$oEditorModel = &getModel('editor');
|
||||||
$editor = $oEditorModel->getEditor($document_srl, $this->grant->fileupload, true);
|
$option->allow_fileupload = $this->grant->fileupload;
|
||||||
|
$option->enable_autosave = true;
|
||||||
|
$option->enable_default_component = true;
|
||||||
|
$option->enable_component = true;
|
||||||
|
$option->resizable = true;
|
||||||
|
$option->height = 400;
|
||||||
|
$editor = $oEditorModel->getEditor($document_srl, $option);
|
||||||
Context::set('editor', $editor);
|
Context::set('editor', $editor);
|
||||||
|
|
||||||
$this->setTemplateFile('write_form');
|
$this->setTemplateFile('write_form');
|
||||||
|
|
@ -323,7 +329,13 @@
|
||||||
}
|
}
|
||||||
// 에디터 모듈의 getEditor를 호출하여 세팅
|
// 에디터 모듈의 getEditor를 호출하여 세팅
|
||||||
$oEditorModel = &getModel('editor');
|
$oEditorModel = &getModel('editor');
|
||||||
$comment_editor = $oEditorModel->getEditor($comment_srl, $this->grant->comment_fileupload);
|
$option->allow_fileupload = $this->grant->comment_fileupload;
|
||||||
|
$option->enable_autosave = false;
|
||||||
|
$option->enable_default_component = true;
|
||||||
|
$option->enable_component = true;
|
||||||
|
$option->resizable = true;
|
||||||
|
$option->height = 100;
|
||||||
|
$comment_editor = $oEditorModel->getEditor($comment_srl, $option);
|
||||||
Context::set('comment_editor', $comment_editor);
|
Context::set('comment_editor', $comment_editor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,37 +10,69 @@
|
||||||
/**
|
/**
|
||||||
* @brief 에디터를 return
|
* @brief 에디터를 return
|
||||||
**/
|
**/
|
||||||
function getEditor($upload_target_srl, $allow_fileupload = false, $enable_autosave = false) {
|
function getEditor($upload_target_srl, $option = null) {
|
||||||
// 저장된 임시본이 있는지 검사
|
// 옵션 설정
|
||||||
|
if(!$option->allow_fileupload) $allow_fileupload = false;
|
||||||
|
else $allow_fileupload = true;
|
||||||
|
|
||||||
|
if(!$option->enable_autosave) $enable_autosave = false;
|
||||||
|
else $enable_autosave = true;
|
||||||
|
|
||||||
|
if(!$option->enable_default_component) $enable_default_component = false;
|
||||||
|
else $enable_default_component = true;
|
||||||
|
|
||||||
|
if(!$option->enable_component) $enable_component = false;
|
||||||
|
else $enable_component = true;
|
||||||
|
|
||||||
|
if(!$option->resizable) $resizable = 'false';
|
||||||
|
else $resizable = 'true';
|
||||||
|
|
||||||
|
if(!$option->height) $editor_height = 400;
|
||||||
|
else $editor_height = $option->height;
|
||||||
|
|
||||||
|
// 대상 문서 번호 설정
|
||||||
|
Context::set('upload_target_srl', $upload_target_srl);
|
||||||
|
|
||||||
|
// 업로드 가능 변수 설정
|
||||||
|
if($allow_fileupload) {
|
||||||
|
// 첨부파일 모듈의 정보를 구함
|
||||||
|
$logged_info = Context::get('logged_info');
|
||||||
|
if($logged_info->member_srl && $logged_info->is_admin == 'Y') {
|
||||||
|
$file_config->allowed_filesize = 1024*1024*1024;
|
||||||
|
$file_config->allowed_attach_size = 1024*1024*1024;
|
||||||
|
$file_config->allowed_filetypes = '*.*';
|
||||||
|
} else {
|
||||||
|
$oModuleModel = &getModel('module');
|
||||||
|
$file_config = $oModuleModel->getModuleConfig('file');
|
||||||
|
$file_config->allowed_filesize = $file_config->allowed_filesize * 1024;
|
||||||
|
$file_config->allowed_attach_size = $file_config->allowed_attach_size * 1024;
|
||||||
|
}
|
||||||
|
Context::set('file_config',$file_config);
|
||||||
|
}
|
||||||
|
Context::set('allow_fileupload', $allow_fileupload);
|
||||||
|
|
||||||
|
// 자동백업 기능 체크
|
||||||
if($enable_autosave) {
|
if($enable_autosave) {
|
||||||
$saved_doc = $this->getSavedDoc($upload_target_srl);
|
$saved_doc = $this->getSavedDoc($upload_target_srl);
|
||||||
Context::set('saved_doc', $saved_doc);
|
Context::set('saved_doc', $saved_doc);
|
||||||
}
|
}
|
||||||
Context::set('enable_autosave', $enable_autosave);
|
Context::set('enable_autosave', $enable_autosave);
|
||||||
|
|
||||||
// 업로드를 위한 변수 설정
|
// 에디터 컴포넌트 체크
|
||||||
Context::set('upload_target_srl', $upload_target_srl);
|
if($enable_component) {
|
||||||
Context::set('allow_fileupload', $allow_fileupload);
|
if(!Context::get('component_list')) {
|
||||||
|
$component_list = $this->getComponentList();
|
||||||
// 에디터 컴포넌트를 구함
|
Context::set('component_list', $component_list);
|
||||||
if(!Context::get('component_list')) {
|
}
|
||||||
$component_list = $this->getComponentList();
|
|
||||||
Context::set('component_list', $component_list);
|
|
||||||
}
|
}
|
||||||
|
Context::set('enable_component', $enable_component);
|
||||||
|
Context::set('enable_default_component', $enable_default_component);
|
||||||
|
|
||||||
// 첨부파일 모듈의 정보를 구함
|
// resizable 가능한지 변수 설정
|
||||||
$logged_info = Context::get('logged_info');
|
Context::set('enable_resizable', $resizable);
|
||||||
if($logged_info->member_srl && $logged_info->is_admin == 'Y') {
|
|
||||||
$file_config->allowed_filesize = 1024*1024*1024;
|
// 에디터 크기 설정
|
||||||
$file_config->allowed_attach_size = 1024*1024*1024;
|
Context::set('editor_height', $editor_height);
|
||||||
$file_config->allowed_filetypes = '*.*';
|
|
||||||
} else {
|
|
||||||
$oModuleModel = &getModel('module');
|
|
||||||
$file_config = $oModuleModel->getModuleConfig('file');
|
|
||||||
$file_config->allowed_filesize = $file_config->allowed_filesize * 1024;
|
|
||||||
$file_config->allowed_attach_size = $file_config->allowed_attach_size * 1024;
|
|
||||||
}
|
|
||||||
Context::set('file_config',$file_config);
|
|
||||||
|
|
||||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||||
$tpl_path = $this->module_path.'tpl';
|
$tpl_path = $this->module_path.'tpl';
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<!-- 에디터 활성화 -->
|
<!-- 에디터 활성화 -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var editor_path = "{$editor_path}";
|
var editor_path = "{$editor_path}";
|
||||||
editorInit("{$upload_target_srl}");
|
editorInit("{$upload_target_srl}", {$enable_resizable}, {$editor_height});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- 자동저장용 폼 -->
|
<!-- 자동저장용 폼 -->
|
||||||
|
|
@ -16,60 +16,64 @@
|
||||||
|
|
||||||
<!-- 에디터 -->
|
<!-- 에디터 -->
|
||||||
<div class="editor_content">
|
<div class="editor_content">
|
||||||
|
|
||||||
|
<!--@if($enable_default_component)-->
|
||||||
<div class="editor_area_1">
|
<div class="editor_area_1">
|
||||||
|
|
||||||
<!-- 폰트 종류와 크기 -->
|
<!-- 폰트 종류와 크기 -->
|
||||||
<div class="editor_fontbox">
|
<div class="editor_fontbox">
|
||||||
<select onchange="editorChangeFontName(this,'{$upload_target_srl}')" id="editor_font_{$upload_target_srl}">
|
<select onchange="editorChangeFontName(this,'{$upload_target_srl}')" id="editor_font_{$upload_target_srl}">
|
||||||
<option value="">{$lang->edit->fontname}</option>
|
<option value="">{$lang->edit->fontname}</option>
|
||||||
<!--@foreach($lang->edit->fontlist as $key=>$obj)-->
|
<!--@foreach($lang->edit->fontlist as $key=>$obj)-->
|
||||||
<option style="font-family:{$obj}" value="{$obj}">{$obj}</option>
|
<option style="font-family:{$obj}" value="{$obj}">{$obj}</option>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select onchange="editorChangeFontSize(this,'{$upload_target_srl}')" id="editor_fontsize_{$upload_target_srl}">
|
<select onchange="editorChangeFontSize(this,'{$upload_target_srl}')" id="editor_fontsize_{$upload_target_srl}">
|
||||||
<option value="" selected="selected">{$lang->edit->fontsize}</option>
|
<option value="" selected="selected">{$lang->edit->fontsize}</option>
|
||||||
<option value="1">8pt</option>
|
<option value="1">8pt</option>
|
||||||
<option value="2">10pt</option>
|
<option value="2">10pt</option>
|
||||||
<option value="3">12pt</option>
|
<option value="3">12pt</option>
|
||||||
<option value="4">14pt</option>
|
<option value="4">14pt</option>
|
||||||
<option value="5">18pt</option>
|
<option value="5">18pt</option>
|
||||||
<option value="6">24pt</option>
|
<option value="6">24pt</option>
|
||||||
<option value="7">36pt</option>
|
<option value="7">36pt</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select onchange="editorChangeHeader(this,'{$upload_target_srl}')" id="editor_header_{$upload_target_srl}">
|
<select onchange="editorChangeHeader(this,'{$upload_target_srl}')" id="editor_header_{$upload_target_srl}">
|
||||||
<option value="">{$lang->edit->header}</option>
|
<option value="">{$lang->edit->header}</option>
|
||||||
<!--@foreach($lang->edit->header_list as $key=>$obj)-->
|
<!--@foreach($lang->edit->header_list as $key=>$obj)-->
|
||||||
<option value="{$key}">{$obj}</option>
|
<option value="{$key}">{$obj}</option>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 에디팅 관련 아이콘 -->
|
<!-- 에디팅 관련 아이콘 -->
|
||||||
<div class="editor_iconbox">
|
<div class="editor_iconbox">
|
||||||
<img src="../components/colorpicker_text/icon.gif" title="{$lang->edit->help_fontcolor}" alt="{$lang->edit->help_fontcolor}" class="editor_icon" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_colorpicker_text" />
|
<img src="../components/colorpicker_text/icon.gif" title="{$lang->edit->help_fontcolor}" alt="{$lang->edit->help_fontcolor}" class="editor_icon" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_colorpicker_text" />
|
||||||
<img src="../components/colorpicker_bg/icon.gif" title="{$lang->edit->help_fontbgcolor}" alt="{$lang->edit->help_fontbgcolor}" class="editor_icon" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_colorpicker_bg" />
|
<img src="../components/colorpicker_bg/icon.gif" title="{$lang->edit->help_fontbgcolor}" alt="{$lang->edit->help_fontbgcolor}" class="editor_icon" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_colorpicker_bg" />
|
||||||
<img src="./images/bold.gif" title="{$lang->edit->help_bold}" alt="{$lang->edit->help_bold}" class="editor_icon" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_Bold" />
|
<img src="./images/bold.gif" title="{$lang->edit->help_bold}" alt="{$lang->edit->help_bold}" class="editor_icon" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_Bold" />
|
||||||
<img src="./images/italic.gif" title="{$lang->edit->help_italic}" alt="{$lang->edit->help_italic}" class="editor_icon" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_Italic" />
|
<img src="./images/italic.gif" title="{$lang->edit->help_italic}" alt="{$lang->edit->help_italic}" class="editor_icon" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_Italic" />
|
||||||
<img src="./images/underline.gif" title="{$lang->edit->help_underline}" alt="{$lang->edit->help_underline}" class="editor_icon" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_Underline" />
|
<img src="./images/underline.gif" title="{$lang->edit->help_underline}" alt="{$lang->edit->help_underline}" class="editor_icon" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_Underline" />
|
||||||
<img src="./images/strike.gif" title="{$lang->edit->help_strike}" alt="{$lang->edit->help_strike}" class="editor_icon" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_StrikeThrough" />
|
<img src="./images/strike.gif" title="{$lang->edit->help_strike}" alt="{$lang->edit->help_strike}" class="editor_icon" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_StrikeThrough" />
|
||||||
<img src="./images/undo.gif" title="{$lang->edit->help_undo}" alt="{$lang->edit->help_undo}" class="editor_icon" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_undo" />
|
<img src="./images/undo.gif" title="{$lang->edit->help_undo}" alt="{$lang->edit->help_undo}" class="editor_icon" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_undo" />
|
||||||
<img src="./images/redo.gif" title="{$lang->edit->help_redo}" alt="{$lang->edit->help_redo}" class="editor_icon" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_redo" />
|
<img src="./images/redo.gif" title="{$lang->edit->help_redo}" alt="{$lang->edit->help_redo}" class="editor_icon" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_redo" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="editor_paragraph_{$upload_target_srl}" class="editor_iconbox">
|
<div id="editor_paragraph_{$upload_target_srl}" class="editor_iconbox">
|
||||||
<img src="./images/align_left.gif" title="{$lang->edit->help_align_left}" alt="{$lang->edit->help_align_left}" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_justifyleft" class="editor_icon" />
|
<img src="./images/align_left.gif" title="{$lang->edit->help_align_left}" alt="{$lang->edit->help_align_left}" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_justifyleft" class="editor_icon" />
|
||||||
<img src="./images/align_center.gif" title="{$lang->edit->help_align_center}" alt="{$lang->edit->help_align_center}" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_justifycenter" class="editor_icon" />
|
<img src="./images/align_center.gif" title="{$lang->edit->help_align_center}" alt="{$lang->edit->help_align_center}" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_justifycenter" class="editor_icon" />
|
||||||
<img src="./images/align_right.gif" title="{$lang->edit->help_align_right}" alt="{$lang->edit->help_align_right}" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_justifyright" class="editor_icon" />
|
<img src="./images/align_right.gif" title="{$lang->edit->help_align_right}" alt="{$lang->edit->help_align_right}" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_justifyright" class="editor_icon" />
|
||||||
<img src="./images/remove_indent.gif" title="{$lang->edit->help_remove_indent}" alt="{$lang->edit->help_remove_indent}" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_outdent" class="editor_icon" />
|
<img src="./images/remove_indent.gif" title="{$lang->edit->help_remove_indent}" alt="{$lang->edit->help_remove_indent}" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_outdent" class="editor_icon" />
|
||||||
<img src="./images/add_indent.gif" title="{$lang->edit->help_add_indent}" alt="{$lang->edit->help_add_indent}" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_indent" class="editor_icon" />
|
<img src="./images/add_indent.gif" title="{$lang->edit->help_add_indent}" alt="{$lang->edit->help_add_indent}" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_indent" class="editor_icon" />
|
||||||
<img src="./images/list_number.gif" title="{$lang->edit->help_list_number}" alt="{$lang->edit->help_list_number}" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_insertorderedlist" class="editor_icon" />
|
<img src="./images/list_number.gif" title="{$lang->edit->help_list_number}" alt="{$lang->edit->help_list_number}" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_insertorderedlist" class="editor_icon" />
|
||||||
<img src="./images/list_bullet.gif" title="{$lang->edit->help_list_bullet}" alt="{$lang->edit->help_list_bullet}" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_insertunorderedlist" class="editor_icon" />
|
<img src="./images/list_bullet.gif" title="{$lang->edit->help_list_bullet}" alt="{$lang->edit->help_list_bullet}" onmouseover="this.className='editor_icon_over'" onmouseout="this.className='editor_icon'" id="component_{$upload_target_srl}_insertunorderedlist" class="editor_icon" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<!--@end-->
|
||||||
|
|
||||||
|
<!--@if($enable_component)-->
|
||||||
<div class="editor_area_2">
|
<div class="editor_area_2">
|
||||||
<!-- 컴포넌트 -->
|
<!-- 컴포넌트 -->
|
||||||
<div id="editor_component_{$upload_target_srl}" class="editor_iconbox">
|
<div id="editor_component_{$upload_target_srl}" class="editor_iconbox">
|
||||||
|
|
@ -80,6 +84,7 @@
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!--@end-->
|
||||||
|
|
||||||
<div class="editor_area_about_dbl">
|
<div class="editor_area_about_dbl">
|
||||||
{$lang->about_dblclick_in_editor}
|
{$lang->about_dblclick_in_editor}
|
||||||
|
|
|
||||||
|
|
@ -17,17 +17,19 @@ function editorGetIFrame(upload_target_srl) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// editor 초기화를 onload이벤트 후에 시작시킴
|
// editor 초기화를 onload이벤트 후에 시작시킴
|
||||||
function editorInit(upload_target_srl) {
|
function editorInit(upload_target_srl, resizable, height) {
|
||||||
var start_func = function() { editorStart(upload_target_srl); }
|
xAddEventListener(window, 'load', function() { editorStart(upload_target_srl, resizable, height); });
|
||||||
xAddEventListener(window, 'load', start_func);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// editor 시작 (upload_target_srl로 iframe객체를 얻어서 쓰기 모드로 전환)
|
// editor 시작 (upload_target_srl로 iframe객체를 얻어서 쓰기 모드로 전환)
|
||||||
function editorStart(upload_target_srl) {
|
function editorStart(upload_target_srl, resizable, height) {
|
||||||
|
if(typeof(height)=="undefined"||!height) height = 350;
|
||||||
|
if(typeof(resizable)=="undefined"||!resizable) resizable = false;
|
||||||
|
else resizable = true;
|
||||||
|
|
||||||
// iframe_area를 찾음
|
// iframe_area를 찾음
|
||||||
var iframe_area = xGetElementById("editor_iframe_area_"+upload_target_srl);
|
var iframe_area = xGetElementById("editor_iframe_area_"+upload_target_srl);
|
||||||
xInnerHtml(iframe_area, "<iframe id='editor_iframe_"+upload_target_srl+"' frameBorder='0' style='border:0px;width:99%;height:300px;margin:0px;'></iframe>");
|
xInnerHtml(iframe_area, "<iframe id='editor_iframe_"+upload_target_srl+"' frameBorder='0' style='border:0px;width:99%;height:"+height+"px;margin:0px;'></iframe>");
|
||||||
|
|
||||||
// iframe obj를 찾음
|
// iframe obj를 찾음
|
||||||
var iframe_obj = editorGetIFrame(upload_target_srl);
|
var iframe_obj = editorGetIFrame(upload_target_srl);
|
||||||
|
|
@ -54,9 +56,6 @@ function editorStart(upload_target_srl) {
|
||||||
// 대상 form의 content object에서 데이터를 구함
|
// 대상 form의 content object에서 데이터를 구함
|
||||||
var content = fo_obj.content.value;
|
var content = fo_obj.content.value;
|
||||||
|
|
||||||
// 기본 폰트를 가져옴
|
|
||||||
var default_font = xGetElementById('editor_font_'+upload_target_srl).options[1].value;
|
|
||||||
|
|
||||||
// iframe내의 document object
|
// iframe내의 document object
|
||||||
var contentDocument = iframe_obj.contentWindow.document;
|
var contentDocument = iframe_obj.contentWindow.document;
|
||||||
|
|
||||||
|
|
@ -104,10 +103,7 @@ function editorStart(upload_target_srl) {
|
||||||
if(typeof(fo_obj._saved_doc_title)!="undefined" ) editorEnableAutoSave(fo_obj, upload_target_srl);
|
if(typeof(fo_obj._saved_doc_title)!="undefined" ) editorEnableAutoSave(fo_obj, upload_target_srl);
|
||||||
|
|
||||||
// 팝업 윈도우일 경우 드래그바 숨김
|
// 팝업 윈도우일 경우 드래그바 숨김
|
||||||
if(typeof(_isPoped)!="undefined" && _isPoped) {
|
if(resizable == false) xGetElementById("editor_drag_bar_"+upload_target_srl).style.display = "none";
|
||||||
xGetElementById("editor_drag_bar_"+upload_target_srl).style.display = "none";
|
|
||||||
setFixedPopupSize();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 여러개의 편집기를 예상하여 전역 배열 변수에 form, iframe의 정보를 넣음
|
// 여러개의 편집기를 예상하여 전역 배열 변수에 form, iframe의 정보를 넣음
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,13 @@
|
||||||
|
|
||||||
// 에디터를 받음
|
// 에디터를 받음
|
||||||
$oEditorModel = &getModel('editor');
|
$oEditorModel = &getModel('editor');
|
||||||
$editor = $oEditorModel->getEditor(0, false, false);
|
$option->allow_fileupload = false;
|
||||||
|
$option->enable_autosave = false;
|
||||||
|
$option->enable_default_component = true;
|
||||||
|
$option->enable_component = true;
|
||||||
|
$option->resizable = true;
|
||||||
|
$option->height = 300;
|
||||||
|
$editor = $oEditorModel->getEditor(0, $option);
|
||||||
Context::set('editor', $editor);
|
Context::set('editor', $editor);
|
||||||
|
|
||||||
// 템플릿 파일 지정
|
// 템플릿 파일 지정
|
||||||
|
|
@ -105,7 +111,13 @@
|
||||||
// 에디터 모듈의 getEditor를 호출하여 서명용으로 세팅
|
// 에디터 모듈의 getEditor를 호출하여 서명용으로 세팅
|
||||||
if($this->member_info->member_srl) {
|
if($this->member_info->member_srl) {
|
||||||
$oEditorModel = &getModel('editor');
|
$oEditorModel = &getModel('editor');
|
||||||
$editor = $oEditorModel->getEditor($this->member_info->member_srl, false, false);
|
$option->allow_fileupload = false;
|
||||||
|
$option->enable_autosave = false;
|
||||||
|
$option->enable_default_component = true;
|
||||||
|
$option->enable_component = true;
|
||||||
|
$option->resizable = false;
|
||||||
|
$option->height = 200;
|
||||||
|
$editor = $oEditorModel->getEditor($this->member_info->member_srl, $option);
|
||||||
Context::set('editor', $editor);
|
Context::set('editor', $editor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,13 @@
|
||||||
// 에디터 모듈의 getEditor를 호출하여 서명용으로 세팅
|
// 에디터 모듈의 getEditor를 호출하여 서명용으로 세팅
|
||||||
if($member_info->member_srl) {
|
if($member_info->member_srl) {
|
||||||
$oEditorModel = &getModel('editor');
|
$oEditorModel = &getModel('editor');
|
||||||
$editor = $oEditorModel->getEditor($member_info->member_srl, false, false);
|
$option->allow_fileupload = false;
|
||||||
|
$option->enable_autosave = false;
|
||||||
|
$option->enable_default_component = true;
|
||||||
|
$option->enable_component = true;
|
||||||
|
$option->resizable = false;
|
||||||
|
$option->height = 200;
|
||||||
|
$editor = $oEditorModel->getEditor($member_info->member_srl, $option);
|
||||||
Context::set('editor', $editor);
|
Context::set('editor', $editor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -220,7 +226,13 @@
|
||||||
|
|
||||||
// 에디터 모듈의 getEditor를 호출하여 서명용으로 세팅
|
// 에디터 모듈의 getEditor를 호출하여 서명용으로 세팅
|
||||||
$oEditorModel = &getModel('editor');
|
$oEditorModel = &getModel('editor');
|
||||||
$editor = $oEditorModel->getEditor($logged_info->member_srl, false, false);
|
$option->allow_fileupload = false;
|
||||||
|
$option->enable_autosave = false;
|
||||||
|
$option->enable_default_component = true;
|
||||||
|
$option->enable_component = true;
|
||||||
|
$option->resizable = false;
|
||||||
|
$option->height = 300;
|
||||||
|
$editor = $oEditorModel->getEditor($logged_info->member_srl, $option);
|
||||||
Context::set('editor', $editor);
|
Context::set('editor', $editor);
|
||||||
|
|
||||||
$this->setTemplateFile('send_message');
|
$this->setTemplateFile('send_message');
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,13 @@
|
||||||
|
|
||||||
// 에디터 모듈의 getEditor를 호출하여 세팅
|
// 에디터 모듈의 getEditor를 호출하여 세팅
|
||||||
$oEditorModel = &getModel('editor');
|
$oEditorModel = &getModel('editor');
|
||||||
$editor = $oEditorModel->getEditor($module_srl, true);
|
$option->allow_fileupload = true;
|
||||||
|
$option->enable_autosave = false;
|
||||||
|
$option->enable_default_component = true;
|
||||||
|
$option->enable_component = true;
|
||||||
|
$option->resizable = true;
|
||||||
|
$option->height = 600;
|
||||||
|
$editor = $oEditorModel->getEditor($module_srl, $option);
|
||||||
Context::set('editor', $editor);
|
Context::set('editor', $editor);
|
||||||
|
|
||||||
// 템플릿 파일 지정
|
// 템플릿 파일 지정
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue