mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 19:51:42 +09:00
Issue 2455: [Admin UI Refactoring] Content >WYSIWYG Editor - prview ,detail
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11696 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
22aea44f77
commit
382baa1592
5 changed files with 173 additions and 124 deletions
|
|
@ -45,7 +45,7 @@
|
|||
$style = $contents[$i];
|
||||
$info = $oModuleModel->loadSkinInfo($this->module_path,$style,'styles');
|
||||
$content_style_list[$style]->title = $info->title;
|
||||
}
|
||||
}
|
||||
|
||||
// Get install info, update info, count
|
||||
$oAutoinstallModel = &getModel('autoinstall');
|
||||
|
|
@ -63,7 +63,46 @@
|
|||
if($packages[$xml_info->package_srl]) $xml_info->need_update = $packages[$xml_info->package_srl]->need_update;
|
||||
}
|
||||
$editor_config_default = array( "editor_height" => "400", "comment_editor_height" => "100","content_font_size"=>"12");
|
||||
|
||||
|
||||
//editor preview
|
||||
$config = $oEditorModel->getEditorConfig();
|
||||
|
||||
$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->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('preview_editor', $editor);
|
||||
|
||||
$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->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_content2';
|
||||
$option_com->primary_key_name = 'dummy_key2';
|
||||
$option_com->content_style = $config->comment_content_style;
|
||||
$option_com->colorset = $config->sel_comment_editor_colorset;
|
||||
|
||||
$editor_comment = $oEditorModel->getEditor(0, $option_com);
|
||||
|
||||
Context::set('preview_editor_comment', $editor_comment);
|
||||
|
||||
Context::set('editor_config', $editor_config);
|
||||
Context::set('editor_skin_list', $editor_skin_list);
|
||||
Context::set('editor_colorset_list', $skin_info->colorset);
|
||||
|
|
|
|||
|
|
@ -137,23 +137,10 @@
|
|||
$oEditorModel = &getModel('editor');
|
||||
$config = $oEditorModel->getEditorConfig();
|
||||
|
||||
$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->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);
|
||||
$mode = Context::get('mode');
|
||||
|
||||
if($mode != 'main')
|
||||
{
|
||||
$option_com->allow_fileupload = false;
|
||||
$option_com->content_style = $config->content_style;
|
||||
$option_com->content_font = $config->content_font;
|
||||
|
|
@ -164,14 +151,32 @@
|
|||
$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_content2';
|
||||
$option_com->primary_key_name = 'dummy_key2';
|
||||
$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->allow_fileupload = false;
|
||||
$option->content_style = $config->content_style;
|
||||
$option->content_font = $config->content_font;
|
||||
$option->content_font_size = $config->content_font_size;
|
||||
$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);
|
||||
}
|
||||
|
||||
$editor_comment = $oEditorModel->getEditor(0, $option_com);
|
||||
Context::set('editor', $editor);
|
||||
|
||||
Context::set('editor_comment', $editor_comment);
|
||||
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
|
|
|
|||
|
|
@ -8,7 +8,31 @@
|
|||
<!-- Editor Preview -->
|
||||
<section class="section">
|
||||
<h1>{$lang->editor_preview}</h1>
|
||||
<a href="{getUrl('module', 'admin', 'act', 'dispEditorConfigPreview')}" target="_blank">{$lang->cmd_preview}</a>
|
||||
<a class="x_btn modalAnchor" href="#editor_preview">{$lang->cmd_preview}</a>
|
||||
<div id="editor_preview" class="x_modal x">
|
||||
<div class="x_modal-header">
|
||||
<h3>{$lang->editor_preview}</h3>
|
||||
</div>
|
||||
<div class="x_modal-body">
|
||||
<div class="x_tabbable" style="height:400px">
|
||||
<ul class="x_nav x_nav-tabs">
|
||||
<li class="x_active"><a href="#pre_document">{$lang->main_editor}</a></li>
|
||||
<li><a href="#pre_comment">{$lang->comment_editor}</a></li>
|
||||
</ul>
|
||||
<div class="x_tab-content" >
|
||||
<div class="x_tab-pane x_active" id="pre_document">
|
||||
<iframe src="{getUrl('','act', 'dispEditorConfigPreview','mode','main')}" width="100%" height="100%" style="border:0;width:1024px;height:600px;filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.25,M22=0.25,SizingMethod='auto expand');-webkit-transform-origin:0 0; -webkit-transform: scale(.65);-moz-transform-origin:0 0; -moz-transform: scale(.65);position:absolute"></iframe>
|
||||
</div>
|
||||
<div class="x_tab-pane" id="pre_comment">
|
||||
<iframe src="{getUrl('','act', 'dispEditorConfigPreview','mode','comment')}" width="100%" height="100%" style="border:0;width:1024px;height:600px;filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.25,M22=0.25,SizingMethod='auto expand');-webkit-transform-origin:0 0; -webkit-transform: scale(.65);-moz-transform-origin:0 0; -moz-transform: scale(.65);position:absolute"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_modal-footer">
|
||||
<button class="x_btn x_pull-left" type="button" data-hide="#editor_preview">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Editor Option -->
|
||||
|
|
@ -22,7 +46,7 @@
|
|||
<label for="change_lang_type" class="x_control-label">{$lang->guide_choose_main_editor}</label>
|
||||
<div class="x_controls">
|
||||
<!--@foreach($editor_skin_list as $editor)-->
|
||||
<label for="doc_{$editor}" class="x_inline" id="label_doc_{$editor}">
|
||||
<label class="x_inline" id="label_doc_{$editor}">
|
||||
<input type="radio" name="editor_skin" value="{$editor}" id="doc_{$editor}" onClick="getEditorSkinColorList(this.value, null, 'document','label_doc_{$editor}')" checked="checked"|cond="$editor==$editor_config->editor_skin" />{$editor}
|
||||
</label>
|
||||
<label class="x_inline">
|
||||
|
|
@ -44,7 +68,7 @@
|
|||
<label for="sel_comment_editor_colorset" class="x_control-label">{$lang->guide_choose_comment_editor}</label>
|
||||
<div class="x_controls">
|
||||
<!--@foreach($editor_skin_list as $editor)-->
|
||||
<label for="com_{$editor}" class="x_inline" id="label_com_{$editor}">
|
||||
<label class="x_inline" id="label_com_{$editor}">
|
||||
<input type="radio" name="comment_editor_skin" value="{$editor}" id="com_{$editor}" onclick="getEditorSkinColorList(this.value, null, 'reply','label_com_{$editor}')" checked="checked"|cond="$editor == $editor_config->comment_editor_skin" />{$editor}
|
||||
</label>
|
||||
<label class="x_inline">
|
||||
|
|
@ -67,7 +91,7 @@
|
|||
<label class="x_control-label">{$lang->guide_choose_text_formatting}</label>
|
||||
<div class="x_controls">
|
||||
<!--@foreach($content_style_list as $key => $val)-->
|
||||
<label for="style_{$key}" class="x_inline">
|
||||
<label class="x_inline">
|
||||
<input type="radio" name="content_style" value="{$key}" id="style_{$key}" checked="checked"|cond="$key==$editor_config->content_style||!$editor_config->content_style && $key=='default'"> {$key}
|
||||
</label>
|
||||
<!--@end-->
|
||||
|
|
@ -81,10 +105,10 @@
|
|||
else $fontSize = str_replace('px','',$editor_config_default['content_font_size']);
|
||||
}
|
||||
<textarea rows="8" cols="42" class="fontPreview" style="font-family:{$editor_config->content_font};font-size:{$fontSize}px" title="Font Preview">{$lang->font_preview}</textarea>
|
||||
<label for="font_noFont" style="font-family:''" class="fontSelector">
|
||||
<label style="font-family:''" class="fontSelector">
|
||||
<input type="radio" name="content_font" id="font_noFont" value="" checked="checked"|cond="!$editor_config->content_font" />none(inherit)
|
||||
</label>
|
||||
<label for="font_{$name}" style="font-family:{$detail}" class="fontSelector" loop="$lang->edit->fontlist=>$name,$detail">
|
||||
<label style="font-family:{$detail}" class="fontSelector" loop="$lang->edit->fontlist=>$name,$detail">
|
||||
<input type="radio" name="content_font" id="font_{$name}" value="{$name}" <!--@if($editor_config->content_font==$name)-->checked="checked" <!--@end-->/> {$detail}
|
||||
</label>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,17 +1,5 @@
|
|||
<load target="../../admin/tpl/css/admin.css" usecdn="true" />
|
||||
<div class="x" style="padding: 10px;">
|
||||
<h2 class="h2">{$lang->editor_preview}</h2>
|
||||
<h2 class="h3">{$lang->main_editor}</h2>
|
||||
<form onSubmit="return false">
|
||||
<input type="hidden" name="dummy_content" />
|
||||
<input type="hidden" name="dummy_key" value="1" />
|
||||
|
||||
<p>{$editor}</p>
|
||||
</form><br />
|
||||
<h2 class="h3">{$lang->comment_editor}</h2>
|
||||
<form onSubmit="return false">
|
||||
<input type="hidden" name="dummy_content2" />
|
||||
<input type="hidden" name="dummy_key2" value="1" />
|
||||
<p>{$editor_comment}</p>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,90 +1,83 @@
|
|||
<load target="css/editor.css" usecdn="true" />
|
||||
<load target="css/editor_admin.css" usecdn="true" />
|
||||
<load target="js/editor_admin.js" usecdn="true" />
|
||||
<h1 class="h1">{$lang->cmd_setup}</h1>
|
||||
<div class="x_page-header">
|
||||
<h1>{$lang->editor}</h1>
|
||||
</div>
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form ruleset="setupComponent" action="./" method="post">
|
||||
<input type="hidden" name="module" value="editor" />
|
||||
<input type="hidden" name="act" value="procEditorAdminSetupComponent" />
|
||||
<input type="hidden" name="component_name" value="{$component_name}" />
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->component_name}</div></th>
|
||||
<td>{$component->title}({$component->component_name}) ver. {$component->version}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->component_author}</div></th>
|
||||
<td class="blue">
|
||||
<!--@foreach($component->author as $author)-->
|
||||
{$author->name} (<a href="{$author->homepage}" onclick="window.open(this.href);return false;">{$author->homepage}</a>, <a href="mailto:{$author->email_address}">{$author->email_address}</a>)<br />
|
||||
<!--@endforeach-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@if($component->link)-->
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->component_link}</div></th>
|
||||
<td><a href="#" onclick="winopen('{$component->link}');return false;">{$component->link}</a></td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
|
||||
<!--@foreach($component->extra_vars as $key => $val)-->
|
||||
<tr class="row{$cycle_idx}">
|
||||
<th scope="row"><div>{$val->title}</div></th>
|
||||
<td>
|
||||
<input type="text" name="{$key}" value="{$val->value}" />
|
||||
<p>{$val->description}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->grant}</div></th>
|
||||
<td>
|
||||
<!--@foreach($group_list as $key => $val)-->
|
||||
<input type="checkbox" name="target_group" value="{$key}" <!--@if(in_array($key, $component->target_group))-->checked="checked"<!--@end--> id="group_{$key}"> <label for="group_{$key}">{$val->title}</label>
|
||||
<!--@end-->
|
||||
<p>{$lang->about_component_grant}</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!--@if($mid_list)-->
|
||||
<tr>
|
||||
<th scope="row"><div>
|
||||
{$lang->module}
|
||||
<input type="checkbox" onclick="XE.checkboxToggleAll('mid_list'); return false;" />
|
||||
</div></th>
|
||||
<td>
|
||||
<p>{$lang->about_component_mid}</p>
|
||||
<!--@foreach($mid_list as $module_category_srl => $modules)-->
|
||||
<div class="module_category_title">
|
||||
<input type="checkbox" onclick="XE.checkboxToggleAll('mid_list', { wrap:'section_{$module_category_srl}' }); return false;" />
|
||||
<!--@if($modules->title)-->
|
||||
{$modules->title}
|
||||
<!--@else-->
|
||||
{$lang->none_category}
|
||||
<!--@end-->
|
||||
</div>
|
||||
|
||||
<div id="section_{$module_category_srl}">
|
||||
<!--@foreach($modules->list as $key => $val)-->
|
||||
<div class="module_list">
|
||||
<input type="checkbox" value="{$key}" name="mid_list" id="chk_mid_list_{$key}" <!--@if(in_array($key, $component->mid_list))-->checked="checked"<!--@end--> />
|
||||
<label for="chk_mid_list_{$key}">{$key} ({$val->browser_title})</label>
|
||||
</div>
|
||||
<!--@end-->
|
||||
</div>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><a href="{getUrl('', 'module', 'admin', 'act', 'dispEditorAdminIndex')}" >{$lang->cmd_back}</a></span>
|
||||
<span class="btn"><input type="submit" value="{$lang->cmd_apply}" /></span>
|
||||
</div>
|
||||
</form>
|
||||
<section class="section">
|
||||
<h1>{$lang->cmd_setup}</h1>
|
||||
<form ruleset="setupComponent" action="./" method="post" class="x_form-horizontal">
|
||||
<input type="hidden" name="module" value="editor" />
|
||||
<input type="hidden" name="act" value="procEditorAdminSetupComponent" />
|
||||
<input type="hidden" name="component_name" value="{$component_name}" />
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->component_name}</label>
|
||||
<div class="x_controls">{$component->title}({$component->component_name}) ver. {$component->version}</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->component_author}</label>
|
||||
<div class="x_controls">
|
||||
<!--@foreach($component->author as $author)-->
|
||||
{$author->name} (<a href="{$author->homepage}" onclick="window.open(this.href);return false;">{$author->homepage}</a>, <a href="mailto:{$author->email_address}">{$author->email_address}</a>)<br />
|
||||
<!--@endforeach-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group" cond="$component->link">
|
||||
<label class="x_control-label">{$lang->component_link}</label>
|
||||
<div class="x_controls">
|
||||
<a href="#" onclick="winopen('{$component->link}');return false;">{$component->link}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group" loop="$component->extra_vars=>$key,$val">
|
||||
<label class="x_control-label">{$val->title}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="{$key}" value="{$val->value}" />
|
||||
<span class="x_help-block">{$val->description}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->grant}</label>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline" loop="$group_list=>$key,$val">
|
||||
<input type="checkbox" name="target_group" value="{$key}" <!--@if(in_array($key, $component->target_group))-->checked="checked"<!--@end--> id="group_{$key}"> {$val->title}</label>
|
||||
<span class="x_help-block">{$lang->about_component_grant}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group" cond="$mid_list">
|
||||
<label class="x_control-label">
|
||||
{$lang->module}
|
||||
<input type="checkbox" onclick="XE.checkboxToggleAll('mid_list'); return false;" />
|
||||
</label>
|
||||
<div class="x_controls">
|
||||
<span class="x_help-block">{$lang->about_component_mid}</span>
|
||||
<!--@foreach($mid_list as $module_category_srl => $modules)-->
|
||||
<fieldset>
|
||||
<legend>
|
||||
<input type="checkbox" onclick="XE.checkboxToggleAll('mid_list', { wrap:'section_{$module_category_srl}' }); return false;" />
|
||||
<!--@if($modules->title)-->{$modules->title}<!--@else-->{$lang->none_category}<!--@end-->
|
||||
</legend>
|
||||
<div id="section_{$module_category_srl}">
|
||||
<!--@foreach($modules->list as $key => $val)-->
|
||||
<div class="module_list">
|
||||
<label>
|
||||
<input type="checkbox" value="{$key}" name="mid_list" id="chk_mid_list_{$key}" <!--@if(in_array($key, $component->mid_list))-->checked="checked"<!--@end--> />
|
||||
{$key} ({$val->browser_title})
|
||||
</label>
|
||||
</div>
|
||||
<!--@end-->
|
||||
</div>
|
||||
</fieldset>
|
||||
<!--@end-->
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: -12px;" class="x_clearfix">
|
||||
<div class="x_pull-right">
|
||||
<a class="x_btn" href="{getUrl('', 'module', 'admin', 'act', 'dispEditorAdminIndex')}" >{$lang->cmd_back}</a>
|
||||
<button type="submit" class="x_btn x_btn-primary">{$lang->cmd_save}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue