mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-08 19:42:15 +09:00
Add option to select different editors for PC and mobile
This commit is contained in:
parent
ee6c62a91e
commit
e0f5678aba
13 changed files with 412 additions and 232 deletions
|
|
@ -33,41 +33,61 @@
|
|||
<input type="hidden" name="xe_validator_id" value="modules/editor/tpl/admin_index/1" />
|
||||
|
||||
<h1>{$lang->main_editor}</h1>
|
||||
|
||||
|
||||
<div class="x_control-group">
|
||||
<label for="change_lang_type" class="x_control-label">{$lang->guide_choose_main_editor}</label>
|
||||
<label for="change_lang_type" class="x_control-label">{$lang->pc}</label>
|
||||
<div class="x_controls">
|
||||
<!--@foreach($editor_skin_list as $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">
|
||||
<select name="sel_editor_colorset" style="display:none"|cond="$editor!=$editor_config->editor_skin">
|
||||
<option value="{$val->name}" selected="selected"|cond="$editor_config->sel_editor_colorset == $val->name" cond="$editor==$editor_config->editor_skin" loop="$editor_colorset_list=>$key,$val">{$val->title}</option>
|
||||
<p>
|
||||
<select name="editor_skin" class="editor_skin_selector">
|
||||
<!--@foreach($editor_skin_list as $skin_name => $skin_info)-->
|
||||
<option value="{$skin_name}" data-colorsets="{json_encode($skin_info->colorset)|escape}" selected="selected"|cond="$skin_name === $editor_config->editor_skin">{$skin_info->title}</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
</label>
|
||||
<br />
|
||||
<!--@end-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="editor_height" class="x_control-label">{$lang->guide_set_height_main_editor}</label>
|
||||
<div class="x_controls">
|
||||
<p><span class="editor_type">{$lang->pc}</span> <input type="number" name="editor_height" id="editor_height" value="{$editor_config->editor_height}" /> px</p>
|
||||
<p><span class="editor_type">{$lang->mobile}</span> <input type="number" name="mobile_editor_height" id="mobile_editor_height" value="{$editor_config->mobile_editor_height}" /> px</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="editor_height" class="x_control-label">{$lang->guide_set_main_editor_toolbar}</label>
|
||||
<div class="x_controls">
|
||||
<p><span class="editor_type">{$lang->pc}</span>
|
||||
<label class="x_inline"><input type="radio" name="editor_toolbar" value="default" checked="checked"|cond="!$editor_config->editor_toolbar || $editor_config->editor_toolbar === 'default'"> {$lang->editor_toolbar_default}</label>
|
||||
<label class="x_inline"><input type="radio" name="editor_toolbar" value="simple" checked="checked"|cond="$editor_config->editor_toolbar === 'simple'"> {$lang->editor_toolbar_simple}</label>
|
||||
<select name="editor_colorset" class="editor_colorset_selector">
|
||||
<!--@foreach($editor_skin_list[$editor_config->editor_skin]->colorset ?: [] as $colorset)-->
|
||||
<option value="{$colorset->name}" selected="selected"|cond="$colorset->name === $editor_config->editor_colorset">{$colorset->title}</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<span class="editor_type">{$lang->guide_editor_height}</span>
|
||||
<input type="number" name="editor_height" value="{$editor_config->editor_height}" /> px
|
||||
</p>
|
||||
<p>
|
||||
<span class="editor_type">{$lang->guide_editor_toolbar}</span>
|
||||
<select name="editor_toolbar" style="min-width:104px">
|
||||
<option value="default" selected="selected"|cond="!$editor_config->editor_toolbar || $editor_config->editor_toolbar === 'default'">{$lang->editor_toolbar_default}</option>
|
||||
<option value="default" selected="selected"|cond="$editor_config->editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
</select>
|
||||
<label class="x_inline"><input type="checkbox" name="editor_toolbar_hide" value="Y" checked="checked"|cond="$editor_config->editor_toolbar_hide === 'Y'"> {$lang->editor_toolbar_hide}</label>
|
||||
</p>
|
||||
<p><span class="editor_type">{$lang->mobile}</span>
|
||||
<label class="x_inline"><input type="radio" name="mobile_editor_toolbar" value="default" checked="checked"|cond="!$editor_config->mobile_editor_toolbar || $editor_config->mobile_editor_toolbar === 'default'"> {$lang->editor_toolbar_default}</label>
|
||||
<label class="x_inline"><input type="radio" name="mobile_editor_toolbar" value="simple" checked="checked"|cond="$editor_config->mobile_editor_toolbar === 'simple'"> {$lang->editor_toolbar_simple}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="editor_height" class="x_control-label">{$lang->mobile}</label>
|
||||
<div class="x_controls">
|
||||
<p>
|
||||
<select name="mobile_editor_skin" class="editor_skin_selector">
|
||||
<!--@foreach($editor_skin_list as $skin_name => $skin_info)-->
|
||||
<option value="{$skin_name}" data-colorsets="{json_encode($skin_info->colorset)|escape}" selected="selected"|cond="$skin_name === $editor_config->mobile_editor_skin">{$skin_info->title}</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
<select name="mobile_editor_colorset" class="editor_colorset_selector">
|
||||
<!--@foreach($editor_skin_list[$editor_config->mobile_editor_skin]->colorset ?: [] as $colorset)-->
|
||||
<option value="{$colorset->name}" selected="selected"|cond="$colorset->name === $editor_config->mobile_editor_colorset">{$colorset->title}</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<span class="editor_type">{$lang->guide_editor_height}</span>
|
||||
<input type="number" name="mobile_editor_height" value="{$editor_config->mobile_editor_height}" /> px</p>
|
||||
</p>
|
||||
<p>
|
||||
<span class="editor_type">{$lang->guide_editor_toolbar}</span>
|
||||
<select name="mobile_editor_toolbar" style="min-width:104px">
|
||||
<option value="default" selected="selected"|cond="!$editor_config->mobile_editor_toolbar || $editor_config->mobile_editor_toolbar === 'default'">{$lang->editor_toolbar_default}</option>
|
||||
<option value="default" selected="selected"|cond="$editor_config->mobile_editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
</select>
|
||||
<label class="x_inline"><input type="checkbox" name="mobile_editor_toolbar_hide" value="Y" checked="checked"|cond="$editor_config->mobile_editor_toolbar_hide === 'Y'"> {$lang->editor_toolbar_hide}</label>
|
||||
</p>
|
||||
</div>
|
||||
|
|
@ -76,40 +96,59 @@
|
|||
<h1>{$lang->comment_editor}</h1>
|
||||
|
||||
<div class="x_control-group">
|
||||
<label for="sel_comment_editor_colorset" class="x_control-label">{$lang->guide_choose_comment_editor}</label>
|
||||
<label for="change_lang_type" class="x_control-label">{$lang->pc}</label>
|
||||
<div class="x_controls">
|
||||
<!--@foreach($editor_skin_list as $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">
|
||||
<select name="sel_comment_editor_colorset" style="display:none"|cond="$editor!=$editor_config->comment_editor_skin">
|
||||
<option value="{$val->name}" selected="selected"|cond="$editor_config->sel_comment_editor_colorset == $val->name" cond="$editor==$editor_config->comment_editor_skin" loop="$comment_editor_colorset_list=>$key,$val">{$val->title}</option>
|
||||
<p>
|
||||
<select name="comment_editor_skin" class="editor_skin_selector">
|
||||
<!--@foreach($editor_skin_list as $skin_name => $skin_info)-->
|
||||
<option value="{$skin_name}" data-colorsets="{json_encode($skin_info->colorset)|escape}" selected="selected"|cond="$skin_name === $editor_config->comment_editor_skin">{$skin_info->title}</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
</label>
|
||||
<br />
|
||||
<!--@end-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="x_control-group">
|
||||
<label for="comment_editor_height" class="x_control-label">{$lang->guide_set_height_comment_editor}</label>
|
||||
<div class="x_controls">
|
||||
<p><span class="editor_type">{$lang->pc}</span> <input type="number" name="comment_editor_height" id="comment_editor_height" value="{$editor_config->comment_editor_height}" /> px</p>
|
||||
<p><span class="editor_type">{$lang->mobile}</span> <input type="number" name="mobile_comment_editor_height" id="mobile_comment_editor_height" value="{$editor_config->mobile_comment_editor_height}" /> px </p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="editor_height" class="x_control-label">{$lang->guide_set_comment_editor_toolbar}</label>
|
||||
<div class="x_controls">
|
||||
<p><span class="editor_type">{$lang->pc}</span>
|
||||
<label class="x_inline"><input type="radio" name="comment_editor_toolbar" value="default" checked="checked"|cond="!$editor_config->comment_editor_toolbar || $editor_config->comment_editor_toolbar === 'default'"> {$lang->editor_toolbar_default}</label>
|
||||
<label class="x_inline"><input type="radio" name="comment_editor_toolbar" value="simple" checked="checked"|cond="$editor_config->comment_editor_toolbar === 'simple'"> {$lang->editor_toolbar_simple}</label>
|
||||
<select name="comment_editor_colorset" class="editor_colorset_selector">
|
||||
<!--@foreach($editor_skin_list[$editor_config->editor_skin]->colorset ?: [] as $colorset)-->
|
||||
<option value="{$colorset->name}" selected="selected"|cond="$colorset->name === $editor_config->comment_editor_colorset">{$colorset->title}</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<span class="editor_type">{$lang->guide_editor_height}</span>
|
||||
<input type="number" name="comment_editor_height" value="{$editor_config->comment_editor_height}" /> px
|
||||
</p>
|
||||
<p>
|
||||
<span class="editor_type">{$lang->guide_editor_toolbar}</span>
|
||||
<select name="editor_toolbar" style="min-width:104px">
|
||||
<option value="default" selected="selected"|cond="!$editor_config->comment_editor_toolbar || $editor_config->comment_editor_toolbar === 'default'">{$lang->editor_toolbar_default}</option>
|
||||
<option value="default" selected="selected"|cond="$editor_config->comment_editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
</select>
|
||||
<label class="x_inline"><input type="checkbox" name="comment_editor_toolbar_hide" value="Y" checked="checked"|cond="$editor_config->comment_editor_toolbar_hide === 'Y'"> {$lang->editor_toolbar_hide}</label>
|
||||
</p>
|
||||
<p><span class="editor_type">{$lang->mobile}</span>
|
||||
<label class="x_inline"><input type="radio" name="mobile_comment_editor_toolbar" value="default" checked="checked"|cond="!$editor_config->mobile_comment_editor_toolbar || $editor_config->mobile_comment_editor_toolbar === 'default'"> {$lang->editor_toolbar_default}</label>
|
||||
<label class="x_inline"><input type="radio" name="mobile_comment_editor_toolbar" value="simple" checked="checked"|cond="$editor_config->mobile_comment_editor_toolbar === 'simple'"> {$lang->editor_toolbar_simple}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="editor_height" class="x_control-label">{$lang->mobile}</label>
|
||||
<div class="x_controls">
|
||||
<p>
|
||||
<select name="mobile_comment_editor_skin" class="editor_skin_selector">
|
||||
<!--@foreach($editor_skin_list as $skin_name => $skin_info)-->
|
||||
<option value="{$skin_name}" data-colorsets="{json_encode($skin_info->colorset)|escape}" selected="selected"|cond="$skin_name === $editor_config->mobile_comment_editor_skin">{$skin_info->title}</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
<select name="mobile_comment_editor_colorset" class="editor_colorset_selector">
|
||||
<!--@foreach($editor_skin_list[$editor_config->mobile_editor_skin]->colorset ?: [] as $colorset)-->
|
||||
<option value="{$colorset->name}" selected="selected"|cond="$colorset->name === $editor_config->mobile_comment_editor_colorset">{$colorset->title}</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<span class="editor_type">{$lang->guide_editor_height}</span>
|
||||
<input type="number" name="mobile_comment_editor_height" value="{$editor_config->mobile_comment_editor_height}" /> px</p>
|
||||
</p>
|
||||
<p>
|
||||
<span class="editor_type">{$lang->guide_editor_toolbar}</span>
|
||||
<select name="mobile_comment_editor_toolbar" style="min-width:104px">
|
||||
<option value="default" selected="selected"|cond="!$editor_config->mobile_comment_editor_toolbar || $editor_config->mobile_comment_editor_toolbar === 'default'">{$lang->editor_toolbar_default}</option>
|
||||
<option value="default" selected="selected"|cond="$editor_config->mobile_comment_editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
</select>
|
||||
<label class="x_inline"><input type="checkbox" name="mobile_comment_editor_toolbar_hide" value="Y" checked="checked"|cond="$editor_config->mobile_comment_editor_toolbar_hide === 'Y'"> {$lang->editor_toolbar_hide}</label>
|
||||
</p>
|
||||
</div>
|
||||
|
|
@ -120,10 +159,10 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->guide_choose_font_body}</label>
|
||||
<div class="x_controls">
|
||||
<label style="font-family:''" class="fontSelector">
|
||||
<label class="x_inline fontSelector">
|
||||
<input type="radio" name="content_font" id="font_noFont" value="" checked="checked"|cond="!$editor_config->content_font && $editor_config->font_defined != 'Y'" /> none (inherit)
|
||||
</label>
|
||||
<label style="display:inline-block;margin-right:16px;font-family:{$detail}" class="fontSelector" loop="$lang->edit->fontlist=>$name,$detail">
|
||||
<label style="font-family:{$detail}" class="x_inline fontSelector" loop="$lang->edit->fontlist=>$name,$detail">
|
||||
{@ $fontname_simplified = trim(array_first(explode(',', $detail)), "'\" ")}
|
||||
<input type="radio" name="content_font" id="font_{$name}" value="{$detail}" checked="checked"|cond="$editor_config->content_font == $detail && $editor_config->font_defined != 'Y'" /> {$fontname_simplified}
|
||||
</label>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
tr.editor_skin td p {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.editor_type {
|
||||
display: inline-block;
|
||||
min-width: 60px;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<!--%import("filter/insert_editor_module_config.xml")-->
|
||||
|
||||
<load target="css/editor_module_config.css" />
|
||||
<load target="js/editor_module_config.js" />
|
||||
|
||||
<form action="./" method="post" class="section">
|
||||
<input type="hidden" name="act" value="procEditorInsertModuleConfig" />
|
||||
<input type="hidden" name="module" value="editor" />
|
||||
|
|
@ -27,45 +27,137 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr class="editor_skin">
|
||||
<th scope="row" style="text-align:right">{$lang->editor_skin}</th>
|
||||
<th scope="row" style="text-align:right">{$lang->pc}</th>
|
||||
<td>
|
||||
<select name="editor_skin" onchange="getEditorSkinColorList(this.value, null, 'document')">
|
||||
<option loop="$editor_skin_list => $editor" value="{$editor}" selected="selected"|cond="$editor==$editor_config->editor_skin">{$editor}</option>
|
||||
</select>
|
||||
<br/>
|
||||
<select name="sel_editor_colorset" id="sel_editor_colorset" data-display="none"|cond="!count($editor_colorset_list)">
|
||||
<option loop="$editor_colorset_list => $key, $val" value="{$val->name}" selected="selected"|cond="$editor_config->sel_editor_colorset == $val->name">{$val->title}</option>
|
||||
</select>
|
||||
<p>
|
||||
<select name="editor_skin" class="editor_skin_selector">
|
||||
<!--@foreach($editor_skin_list as $skin_name => $skin_info)-->
|
||||
<option value="{$skin_name}" data-colorsets="{json_encode($skin_info->colorset)|escape}" selected="selected"|cond="$skin_name === $editor_config->editor_skin">{$skin_info->title}</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
<select name="editor_colorset" class="editor_colorset_selector">
|
||||
<!--@foreach($editor_skin_list[$editor_config->editor_skin]->colorset ?: [] as $colorset)-->
|
||||
<option value="{$colorset->name}" selected="selected"|cond="$colorset->name === $editor_config->editor_colorset">{$colorset->title}</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<span class="editor_type">{$lang->guide_editor_height}</span>
|
||||
<input type="number" name="editor_height" value="{$editor_config->editor_height}" /> px
|
||||
</p>
|
||||
<p>
|
||||
<span class="editor_type">{$lang->guide_editor_toolbar}</span>
|
||||
<select name="editor_toolbar" style="min-width:104px">
|
||||
<option value="default" selected="selected"|cond="!$editor_config->editor_toolbar || $editor_config->editor_toolbar === 'default'">{$lang->editor_toolbar_default}</option>
|
||||
<option value="default" selected="selected"|cond="$editor_config->editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
</select>
|
||||
<label class="x_inline"><input type="checkbox" name="editor_toolbar_hide" value="Y" checked="checked"|cond="$editor_config->editor_toolbar_hide === 'Y'"> {$lang->editor_toolbar_hide}</label>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<select name="comment_editor_skin" onchange="getEditorSkinColorList(this.value, null, 'comment')">
|
||||
<option loop="$editor_skin_list => $editor" value="{$editor}" selected="selected"|cond="$editor==$editor_config->comment_editor_skin">{$editor}</option>
|
||||
</select>
|
||||
<br/>
|
||||
<select name="sel_comment_editor_colorset" id="sel_comment_editor_colorset" data-display="none"|cond="!count($editor_comment_colorset_list)">
|
||||
<option loop="$editor_comment_colorset_list => $key, $val" value="{$val->name}" selected="selected"|cond="$editor_config->sel_comment_editor_colorset == $val->name">{$val->title}</option>
|
||||
</select>
|
||||
<p>
|
||||
<select name="comment_editor_skin" class="editor_skin_selector">
|
||||
<!--@foreach($editor_skin_list as $skin_name => $skin_info)-->
|
||||
<option value="{$skin_name}" data-colorsets="{json_encode($skin_info->colorset)|escape}" selected="selected"|cond="$skin_name === $editor_config->comment_editor_skin">{$skin_info->title}</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
<select name="comment_editor_colorset" class="editor_colorset_selector">
|
||||
<!--@foreach($editor_skin_list[$editor_config->editor_skin]->colorset ?: [] as $colorset)-->
|
||||
<option value="{$colorset->name}" selected="selected"|cond="$colorset->name === $editor_config->comment_editor_colorset">{$colorset->title}</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<span class="editor_type">{$lang->guide_editor_height}</span>
|
||||
<input type="number" name="comment_editor_height" value="{$editor_config->comment_editor_height}" /> px
|
||||
</p>
|
||||
<p>
|
||||
<span class="editor_type">{$lang->guide_editor_toolbar}</span>
|
||||
<select name="editor_toolbar" style="min-width:104px">
|
||||
<option value="default" selected="selected"|cond="!$editor_config->comment_editor_toolbar || $editor_config->comment_editor_toolbar === 'default'">{$lang->editor_toolbar_default}</option>
|
||||
<option value="default" selected="selected"|cond="$editor_config->comment_editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
</select>
|
||||
<label class="x_inline"><input type="checkbox" name="comment_editor_toolbar_hide" value="Y" checked="checked"|cond="$editor_config->comment_editor_toolbar_hide === 'Y'"> {$lang->editor_toolbar_hide}</label>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="editor_skin">
|
||||
<th scope="row" style="text-align:right">{$lang->editor_height}</th>
|
||||
<th scope="row" style="text-align:right">{$lang->mobile}</th>
|
||||
<td>
|
||||
<input type="number" min="0" name="editor_height" value="{$editor_config->editor_height}" /> px
|
||||
<p>
|
||||
<select name="mobile_editor_skin" class="editor_skin_selector">
|
||||
<!--@foreach($editor_skin_list as $skin_name => $skin_info)-->
|
||||
<option value="{$skin_name}" data-colorsets="{json_encode($skin_info->colorset)|escape}" selected="selected"|cond="$skin_name === $editor_config->mobile_editor_skin">{$skin_info->title}</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
<select name="mobile_editor_colorset" class="editor_colorset_selector">
|
||||
<!--@foreach($editor_skin_list[$editor_config->mobile_editor_skin]->colorset ?: [] as $colorset)-->
|
||||
<option value="{$colorset->name}" selected="selected"|cond="$colorset->name === $editor_config->mobile_editor_colorset">{$colorset->title}</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<span class="editor_type">{$lang->guide_editor_height}</span>
|
||||
<input type="number" name="mobile_editor_height" value="{$editor_config->mobile_editor_height}" /> px</p>
|
||||
</p>
|
||||
<p>
|
||||
<span class="editor_type">{$lang->guide_editor_toolbar}</span>
|
||||
<select name="mobile_editor_toolbar" style="min-width:104px">
|
||||
<option value="default" selected="selected"|cond="!$editor_config->mobile_editor_toolbar || $editor_config->mobile_editor_toolbar === 'default'">{$lang->editor_toolbar_default}</option>
|
||||
<option value="default" selected="selected"|cond="$editor_config->mobile_editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
</select>
|
||||
<label class="x_inline"><input type="checkbox" name="mobile_editor_toolbar_hide" value="Y" checked="checked"|cond="$editor_config->mobile_editor_toolbar_hide === 'Y'"> {$lang->editor_toolbar_hide}</label>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<input type="number" min="0" name="comment_editor_height" value="{$editor_config->comment_editor_height}" /> px
|
||||
<p>
|
||||
<select name="mobile_comment_editor_skin" class="editor_skin_selector">
|
||||
<!--@foreach($editor_skin_list as $skin_name => $skin_info)-->
|
||||
<option value="{$skin_name}" data-colorsets="{json_encode($skin_info->colorset)|escape}" selected="selected"|cond="$skin_name === $editor_config->mobile_comment_editor_skin">{$skin_info->title}</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
<select name="mobile_comment_editor_colorset" class="editor_colorset_selector">
|
||||
<!--@foreach($editor_skin_list[$editor_config->mobile_editor_skin]->colorset ?: [] as $colorset)-->
|
||||
<option value="{$colorset->name}" selected="selected"|cond="$colorset->name === $editor_config->mobile_comment_editor_colorset">{$colorset->title}</option>
|
||||
<!--@endforeach-->
|
||||
</select>
|
||||
</p>
|
||||
<p>
|
||||
<span class="editor_type">{$lang->guide_editor_height}</span>
|
||||
<input type="number" name="mobile_comment_editor_height" value="{$editor_config->mobile_comment_editor_height}" /> px</p>
|
||||
</p>
|
||||
<p>
|
||||
<span class="editor_type">{$lang->guide_editor_toolbar}</span>
|
||||
<select name="mobile_comment_editor_toolbar" style="min-width:104px">
|
||||
<option value="default" selected="selected"|cond="!$editor_config->mobile_comment_editor_toolbar || $editor_config->mobile_comment_editor_toolbar === 'default'">{$lang->editor_toolbar_default}</option>
|
||||
<option value="default" selected="selected"|cond="$editor_config->mobile_comment_editor_toolbar === 'simple'">{$lang->editor_toolbar_simple}</option>
|
||||
</select>
|
||||
<label class="x_inline"><input type="checkbox" name="mobile_comment_editor_toolbar_hide" value="Y" checked="checked"|cond="$editor_config->mobile_comment_editor_toolbar_hide === 'Y'"> {$lang->editor_toolbar_hide}</label>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="editor_skin">
|
||||
<th scope="row" style="text-align:right"><label for="content_font">{$lang->content_font}</label></th>
|
||||
<td colspan="2">
|
||||
<input type="text" name="content_font" id="content_font" value="{str_replace(array('"','\''),'',$editor_config->content_font)}" placeholder="Ex) Tahoma, Geneva, sans-serif" />
|
||||
{$lang->about_content_font}
|
||||
<label class="x_inline fontSelector">
|
||||
<input type="radio" name="content_font" id="font_noFont" value="" checked="checked"|cond="!$editor_config->content_font && $editor_config->font_defined != 'Y'" /> none (inherit)
|
||||
</label>
|
||||
<label style="font-family:{$detail}" class="x_inline fontSelector" loop="$lang->edit->fontlist=>$name,$detail">
|
||||
{@ $fontname_simplified = trim(array_first(explode(',', $detail)), "'\" ")}
|
||||
<input type="radio" name="content_font" id="font_{$name}" value="{$detail}" checked="checked"|cond="$editor_config->content_font == $detail && $editor_config->font_defined != 'Y'" /> {$fontname_simplified}
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" class="fontSelector" name="font_defined" id="font_defined" value="Y" checked="checked"|cond="$editor_config->font_defined== 'Y'" /> {$lang->by_you} :
|
||||
<input type="text" name="content_font_defined" value="{$editor_config->content_font}"|cond="$editor_config->font_defined == 'Y'" />
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="editor_skin">
|
||||
<th scope="row" style="text-align:right"><label for="content_font_size">{$lang->content_font_size}</label></th>
|
||||
<td colspan="2"><input type="text" name="content_font_size" id="content_font_size" value="{$editor_config->content_font_size}" style="width:50px" /> {$lang->about_content_font_size}</td>
|
||||
<td colspan="2">
|
||||
<input type="text" id="font_size" name="content_font_size" value="{$editor_config->content_font_size ?: 13}" />
|
||||
<p class="x_help-inline">{$lang->about_unit_default_px}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="editor_skin">
|
||||
<th scope="row" style="text-align:right">{$lang->enable_autosave}</th>
|
||||
|
|
|
|||
|
|
@ -1,55 +1,21 @@
|
|||
function getEditorSkinColorList(skin_name,selected_colorset,type,testid){
|
||||
if(skin_name.length>0){
|
||||
type = type || 'document';
|
||||
var response_tags = new Array('error','message','colorset');
|
||||
exec_xml('editor','dispEditorSkinColorset',{skin:skin_name},resultGetEditorSkinColorList,response_tags,{'selected_colorset':selected_colorset,'type':type,'testid':testid});
|
||||
}
|
||||
}
|
||||
"use strict";
|
||||
|
||||
function resultGetEditorSkinColorList(ret_obj,response_tags, params) {
|
||||
var selectbox = null;
|
||||
jQuery(function($){
|
||||
if(params.testid){
|
||||
selectbox = $("#"+params.testid).next('label').children('select');
|
||||
} else {
|
||||
selectbox = (params.type == 'document') ? $('select[name=sel_editor_colorset]') : $('select[name=sel_comment_editor_colorset]');
|
||||
}
|
||||
selectbox.html('');
|
||||
|
||||
if(params.type == 'document'){
|
||||
$("select[name=sel_editor_colorset]").hide()
|
||||
.removeAttr('name');
|
||||
selectbox.attr('name','sel_editor_colorset');
|
||||
} else {
|
||||
$("select[name=sel_comment_editor_colorset]").hide()
|
||||
.removeAttr('name');
|
||||
selectbox.attr('name','sel_comment_editor_colorset');
|
||||
}
|
||||
|
||||
/* jshint -W041 */
|
||||
if(ret_obj.error == 0 && ret_obj.colorset){
|
||||
var it = [];
|
||||
var items = ret_obj.colorset.item;
|
||||
if(typeof(items[0]) == 'undefined'){
|
||||
it[0] = items;
|
||||
} else {
|
||||
it = items;
|
||||
(function($) {
|
||||
$(function() {
|
||||
$('.editor_skin_selector').on('change', function() {
|
||||
var colorset_selector = $(this).siblings('.editor_colorset_selector').empty();
|
||||
var colorset_list = $(this).find('option:selected').data('colorsets');
|
||||
if (colorset_list && colorset_list.length) {
|
||||
$.each(colorset_list, function(i, colorset) {
|
||||
var option = $('<option></option>');
|
||||
option.attr('value', colorset.name);
|
||||
option.text(colorset.title);
|
||||
option.appendTo(colorset_selector);
|
||||
if (colorset.title.indexOf('L') > -1) {
|
||||
option.attr('selected', 'selected');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var selectAttr = "";
|
||||
for(var i=0;i<it.length;i++){
|
||||
var $options = $('<option value="'+it[i].name+'" >'+it[i].title+'</option>');
|
||||
|
||||
if(params.selected_colorset == it[i].name){
|
||||
$options.attr('selected', 'selected');
|
||||
}
|
||||
|
||||
selectbox.append($options);
|
||||
}
|
||||
selectbox.show();
|
||||
} else {
|
||||
selectbox.hide();
|
||||
selectbox.html('');
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
})(jQuery);
|
||||
Loading…
Add table
Add a link
Reference in a new issue