mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
에디터 미리보기 개선
This commit is contained in:
parent
9204353a15
commit
c72e2ad49f
3 changed files with 19 additions and 65 deletions
|
|
@ -408,19 +408,22 @@ class editorModel extends editor
|
|||
}
|
||||
|
||||
// Permission check for file upload
|
||||
if ($logged_info->is_admin === 'Y' || !count($option->upload_file_grant))
|
||||
if($module_srl)
|
||||
{
|
||||
$option->allow_fileupload = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$option->allow_fileupload = false;
|
||||
foreach($group_list as $group_srl => $group_info)
|
||||
if ($logged_info->is_admin === 'Y' || !count($option->upload_file_grant))
|
||||
{
|
||||
if(in_array($group_srl, $option->upload_file_grant))
|
||||
$option->allow_fileupload = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$option->allow_fileupload = false;
|
||||
foreach($group_list as $group_srl => $group_info)
|
||||
{
|
||||
$option->allow_fileupload = true;
|
||||
break;
|
||||
if(in_array($group_srl, $option->upload_file_grant))
|
||||
{
|
||||
$option->allow_fileupload = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,57 +149,8 @@ class editorView extends editor
|
|||
|
||||
function dispEditorConfigPreview()
|
||||
{
|
||||
$oEditorModel = getModel('editor');
|
||||
$config = $oEditorModel->getEditorConfig();
|
||||
|
||||
$mode = Context::get('mode');
|
||||
|
||||
if($mode != 'main')
|
||||
{
|
||||
$option_com = new stdClass();
|
||||
$option_com->allow_fileupload = false;
|
||||
$option_com->content_style = $config->content_style;
|
||||
$option_com->content_font = $config->content_font;
|
||||
$option_com->content_font_size = $config->content_font_size;
|
||||
$option_com->content_line_height = $config->content_line_height;
|
||||
$option_com->content_paragraph_spacing = $config->content_paragraph_spacing;
|
||||
$option_com->content_word_break = $config->content_word_break;
|
||||
$option_com->enable_autosave = false;
|
||||
$option_com->enable_default_component = true;
|
||||
$option_com->enable_component = true;
|
||||
$option_com->disable_html = false;
|
||||
$option_com->height = $config->comment_editor_height;
|
||||
$option_com->skin = $config->comment_editor_skin;
|
||||
$option_com->content_key_name = 'dummy_content';
|
||||
$option_com->primary_key_name = 'dummy_key';
|
||||
$option_com->content_style = $config->comment_content_style;
|
||||
$option_com->colorset = $config->sel_comment_editor_colorset;
|
||||
$editor = $oEditorModel->getEditor(0, $option_com);
|
||||
}
|
||||
else
|
||||
{
|
||||
$option = new stdClass();
|
||||
$option->allow_fileupload = false;
|
||||
$option->content_style = $config->content_style;
|
||||
$option->content_font = $config->content_font;
|
||||
$option->content_font_size = $config->content_font_size;
|
||||
$option->content_line_height = $config->content_line_height;
|
||||
$option->content_paragraph_spacing = $config->content_paragraph_spacing;
|
||||
$option->content_word_break = $config->content_word_break;
|
||||
$option->enable_autosave = false;
|
||||
$option->enable_default_component = true;
|
||||
$option->enable_component = true;
|
||||
$option->disable_html = false;
|
||||
$option->height = $config->editor_height;
|
||||
$option->skin = $config->editor_skin;
|
||||
$option->content_key_name = 'dummy_content';
|
||||
$option->primary_key_name = 'dummy_key';
|
||||
$option->colorset = $config->sel_editor_colorset;
|
||||
$editor = $oEditorModel->getEditor(0, $option);
|
||||
}
|
||||
|
||||
Context::set('editor', $editor);
|
||||
|
||||
Context::set('editor', getModel('editor')->getModuleEditor(Context::get('type'), 0, 0, 'dummy_key', 'dummy_content'));
|
||||
|
||||
$this->setLayoutFile('popup_layout');
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('config_preview');
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<!-- Editor Preview -->
|
||||
<section class="section">
|
||||
<section class="section collapsed">
|
||||
<h1>{$lang->editor_now}</h1>
|
||||
<div class="x_tabbable _preview">
|
||||
<ul class="x_nav x_nav-tabs" style="margin-bottom:0;border-bottom:0">
|
||||
|
|
@ -16,10 +16,10 @@
|
|||
</ul>
|
||||
<div class="x_tab-content x_thumbnail">
|
||||
<div class="x_tab-pane x_active" id="pre_document">
|
||||
<iframe src="{getUrl('','act', 'dispEditorConfigPreview','mode','main')}" id="pre_document_frame" frameborder="0" style="border:0"></iframe>
|
||||
<iframe src="{getUrl('','act', 'dispEditorConfigPreview', 'type', 'document')}" id="pre_document_frame" frameborder="0" style="border:0"></iframe>
|
||||
</div>
|
||||
<div class="x_tab-pane" id="pre_comment">
|
||||
<iframe src="{getUrl('','act', 'dispEditorConfigPreview','mode','comment')}" id="pre_comment_frame" frameborder="0" style="border:0"></iframe>
|
||||
<iframe src="{getUrl('','act', 'dispEditorConfigPreview', 'type', 'comment')}" id="pre_comment_frame" frameborder="0" style="border:0"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -308,7 +308,7 @@ jQuery(function($){
|
|||
function preview(){
|
||||
$('._preview iframe').css({
|
||||
width : "100%",
|
||||
height : "450px"
|
||||
height : "500px"
|
||||
});
|
||||
}
|
||||
preview();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue