rhymix/modules/editor/tpl/admin_index.html
2012-10-31 07:34:13 +00:00

209 lines
9.5 KiB
HTML

<load target="js/editor_module_config.js" usecdn="true" />
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<div class="x_page-header">
<h1>{$lang->editor}</h1>
</div>
<!-- Editor Preview -->
<section class="section">
<h1>{$lang->editor_preview}</h1>
<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;"></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;"></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 -->
<section class="section">
<h1>{$lang->editor_option}</h1>
<form action="./" method="post" ruleset="generalConfig" class="x_form-horizontal">
<input type="hidden" name="module" value="editor" />
<input type="hidden" name="act" value="procEditorAdminGeneralConfig" />
<div class="x_control-group">
<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 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>
</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">
<input type="text" name="editor_height" id="editor_height" value="<!--@if($editor_config->editor_height)-->{$editor_config->editor_height}<!--@else-->{$editor_config_default['editor_height']}<!--@end-->" style="width:30px" /> px
</div>
</div>
<div class="x_control-group">
<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 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="$editor_colorset_list=>$key,$val">{$val->title}</option>
</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">
<input type="text" name="comment_editor_height"id="comment_editor_height" value="<!--@if($editor_config->comment_editor_height)-->{$editor_config->comment_editor_height}<!--@else-->{$editor_config_default['comment_editor_height']}<!--@end-->" style="width:30px" /> px
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->guide_choose_text_formatting}</label>
<div class="x_controls">
<!--@foreach($content_style_list as $key => $val)-->
<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'"> {$val->title}
</label>
<!--@end-->
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->guide_choose_font_body}</label>
<div class="x_controls">
{@
if($editor_config->content_font_size) $fontSize = str_replace('px','',$editor_config->content_font_size);
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 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 style="font-family:{$detail}" class="fontSelector" loop="$lang->edit->fontlist=>$name,$detail">
<input type="radio" name="content_font" id="font_{$name}" value="{$detail}" <!--@if(stripcslashes($editor_config->content_font)==$detail)-->checked="checked" <!--@end-->/>{$detail}
</label>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label" for="fontSize">{$lang->guide_choose_font_size_body}</label>
<div class="x_controls">
<input type="text" id="fontSize" name="content_font_size" value="{$fontSize}" style="width:30px" /> px
</div>
</div>
<div class="x_clearfix btnArea">
<div class="x_pull-right">
<button type="submit" class="x_btn x_btn-primary">{$lang->cmd_save}</button>
</div>
</div>
</form>
</section>
<!-- Editor Preview -->
<section class="section">
<h1>{$lang->editor_component}</h1>
<form action="./" method="post" ruleset="componentOrderAndUse">
<input type="hidden" name="module" value="editor" />
<input type="hidden" name="act" value="procEditorAdminCheckUseListOrder" />
<table class="x_table x_table-striped x_table-hover sortable">
<caption><strong>{$lang->total_count}({$component_count})</strong></caption>
<thead>
<tr>
<th class="nowr">{$lang->cmd_move}</th>
<th>{$lang->component_name}</th>
<th class="nowr">{$lang->version}</th>
<th class="nowr">{$lang->author}</th>
<th class="nowr">{$lang->path}</th>
<th class="nowr">{$lang->use}</th>
<th class="nowr">{$lang->cmd_delete}</th>
</tr>
</thead>
<tbody class="uDrag">
<!--@foreach($component_list as $component_name => $xml_info)-->
<tr>
<td><div class="wrap" style="height:70px"><button type="button" class="dragBtn">Move to</button></div></td>
<td class="title">
<input type="hidden" name="component_names[]" value="{$xml_info->component_name}" />
<p><b><a href="{getUrl('', 'module', 'admin', 'act', 'dispEditorAdminSetupComponent', 'component_name', $xml_info->component_name)}">{$xml_info->title}</a></b></p>
<p>{nl2br($xml_info->description)}</p>
<!--@if($xml_info->version && $xml_info->need_update == 'Y')-->
<p class="update">{$lang->msg_avail_easy_update}<a href="{getUrl('act','dispAutoinstallAdminInstall','package_srl',$xml_info->package_srl)}">{$lang->msg_do_you_like_update}</a></p>
<!--@end-->
</td>
<td>{$xml_info->version}</td>
<td>
<!--@foreach($xml_info->author as $author)-->
<a href="{$author->homepage}" target="_blank">{$author->name}</a>
<!--@endforeach-->
</td>
<td>{$xml_info->path}</td>
<td><input type="checkbox" name="enables[]" id="enable" value="{$xml_info->component_name}" title="Use this component " <!--@if($xml_info->enabled=='Y')--> checked="checked"<!--@end--> /></td>
<td>
<!--@if($xml_info->version && $xml_info->delete_url)-->
<a href="{$xml_info->delete_url}">{$lang->cmd_delete}</a>
<!--@end-->
</td>
</tr>
<!--@end-->
</tbody>
</table>
<div class="x_clearfix" style="margin-top:-12px">
<div class="x_pull-right">
<button type="submit" class="x_btn x_btn-primary">{$lang->cmd_save}</button>
</div>
</div>
</form>
</section>
<script>
jQuery(function($){
//init
var fontPreview = $('.fontPreview');
var fontSelector = $('.fontSelector');
var checkedFont = fontSelector.filter(':checked').css('fontFamily');
var changedSize = $('#fontSize').val();
//change event
fontSelector.change(function(){
var myFont = $(this).css('fontFamily');
fontPreview.css('fontFamily',myFont);
});
$('#fontSize').keyup(function(){
var mySize = $(this).val();
fontPreview.css('fontSize',mySize+'px');
if(mySize.length==0){ fontPreview.css('fontSize','') };
if(mySize>28){
alert('{$lang->msg_font_too_big}');
$(this).val('28');
fontPreview.css('fontSize','28px');
};
});
});
</script>