Issue 2455:[Admin UI Refactoring] Content >WYSIWYG Editor

git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11608 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
chschy 2012-10-08 05:18:54 +00:00
parent 6250019914
commit 729fd12891
4 changed files with 210 additions and 190 deletions

View file

@ -335,7 +335,7 @@ html[lang="mn"] .x .g11n.active>[disabled],
.x .uDrag .dragActive{background:#FFD} .x .uDrag .dragActive{background:#FFD}
.x .uDrag .dragActive th, .x .uDrag .dragActive th,
.x .uDrag .dragActive td{background:none !important} .x .uDrag .dragActive td{background:none !important}
.x .uDrag .dragBtn{position:absolute;width:8px;height:100%;padding:0;overflow:hidden;background:url(../img/bgDragable.gif);top:1px;left:0;text-indent:12px;border:0;cursor:n-resize;white-space:nowrap} .x .uDrag .dragBtn{position:absolute;width:8px;height:100%;padding:0;overflow:hidden;background:url(../img/bgDragable.gif);top:1px;left:0;text-indent:12px;border:0;cursor:n-resize;white-space:nowrap;font-size:0px}
/* Section & Heading */ /* Section & Heading */
.x .h2, .x .h2,
.x .h3, .x .h3,

View file

@ -51,74 +51,74 @@
<value xml:lang="vi"><![CDATA[Editor Option]]></value> <value xml:lang="vi"><![CDATA[Editor Option]]></value>
</item> </item>
<item name="guide_choose_main_editor"> <item name="guide_choose_main_editor">
<value xml:lang="ko"><![CDATA[본문 에디터를 선택하세요.]]></value> <value xml:lang="ko"><![CDATA[본문 에디터]]></value>
<value xml:lang="en"><![CDATA[Choose the main editor.]]></value> <value xml:lang="en"><![CDATA[Main editor.]]></value>
<value xml:lang="jp"><![CDATA[本文エディターを選択してください。]]></value> <value xml:lang="jp"><![CDATA[本文エディター]]></value>
<value xml:lang="zh-CN"><![CDATA[Choose the main editor.]]></value> <value xml:lang="zh-CN"><![CDATA[Main editor.]]></value>
<value xml:lang="zh-TW"><![CDATA[Choose the main editor.]]></value> <value xml:lang="zh-TW"><![CDATA[Main editor.]]></value>
<value xml:lang="ru"><![CDATA[Choose the main editor.]]></value> <value xml:lang="ru"><![CDATA[Main editor.]]></value>
<value xml:lang="tr"><![CDATA[Choose the main editor.]]></value> <value xml:lang="tr"><![CDATA[Main editor.]]></value>
<value xml:lang="vi"><![CDATA[Choose the main editor.]]></value> <value xml:lang="vi"><![CDATA[Main editor.]]></value>
</item> </item>
<item name="guide_set_height_main_editor"> <item name="guide_set_height_main_editor">
<value xml:lang="ko"><![CDATA[본문 에디터 높이를 설정하세요.]]></value> <value xml:lang="ko"><![CDATA[본문 에디터 높이]]></value>
<value xml:lang="en"><![CDATA[Set height of the main editor.]]></value> <value xml:lang="en"><![CDATA[Height of the main editor.]]></value>
<value xml:lang="jp"><![CDATA[本文エディターの高さを設定してください。]]></value> <value xml:lang="jp"><![CDATA[本文エディターの高さ]]></value>
<value xml:lang="zh-CN"><![CDATA[Set height of the main editor.]]></value> <value xml:lang="zh-CN"><![CDATA[Height of the main editor.]]></value>
<value xml:lang="zh-TW"><![CDATA[Set height of the main editor.]]></value> <value xml:lang="zh-TW"><![CDATA[Height of the main editor.]]></value>
<value xml:lang="ru"><![CDATA[Set height of the main editor.]]></value> <value xml:lang="ru"><![CDATA[Height of the main editor.]]></value>
<value xml:lang="tr"><![CDATA[Set height of the main editor.]]></value> <value xml:lang="tr"><![CDATA[Height of the main editor.]]></value>
<value xml:lang="vi"><![CDATA[Set height of the main editor.]]></value> <value xml:lang="vi"><![CDATA[Height of the main editor.]]></value>
</item> </item>
<item name="guide_choose_comment_editor"> <item name="guide_choose_comment_editor">
<value xml:lang="ko"><![CDATA[댓글 에디터를 선택하세요.]]></value> <value xml:lang="ko"><![CDATA[댓글 에디터]]></value>
<value xml:lang="en"><![CDATA[Choose the comment editor.]]></value> <value xml:lang="en"><![CDATA[Comment editor.]]></value>
<value xml:lang="jp"><![CDATA[コメントエディターを選択してください。]]></value> <value xml:lang="jp"><![CDATA[コメントエディター]]></value>
<value xml:lang="zh-CN"><![CDATA[Choose the comment editor.]]></value> <value xml:lang="zh-CN"><![CDATA[Comment editor.]]></value>
<value xml:lang="zh-TW"><![CDATA[Choose the comment editor.]]></value> <value xml:lang="zh-TW"><![CDATA[Comment editor.]]></value>
<value xml:lang="ru"><![CDATA[Choose the comment editor.]]></value> <value xml:lang="ru"><![CDATA[Comment editor.]]></value>
<value xml:lang="tr"><![CDATA[Choose the comment editor.]]></value> <value xml:lang="tr"><![CDATA[Comment editor.]]></value>
<value xml:lang="vi"><![CDATA[Choose the comment editor.]]></value> <value xml:lang="vi"><![CDATA[Comment editor.]]></value>
</item> </item>
<item name="guide_set_height_comment_editor"> <item name="guide_set_height_comment_editor">
<value xml:lang="ko"><![CDATA[댓글 에디터 높이를 설정하세요.]]></value> <value xml:lang="ko"><![CDATA[댓글 에디터 높이]]></value>
<value xml:lang="en"><![CDATA[Set height of the comment editor.]]></value> <value xml:lang="en"><![CDATA[Height of the comment editor.]]></value>
<value xml:lang="jp"><![CDATA[コメントエディターの高さを設定してください。]]></value> <value xml:lang="jp"><![CDATA[コメントエディターの高さ]]></value>
<value xml:lang="zh-CN"><![CDATA[Set height of the comment editor.]]></value> <value xml:lang="zh-CN"><![CDATA[Height of the comment editor.]]></value>
<value xml:lang="zh-TW"><![CDATA[Set height of the comment editor.]]></value> <value xml:lang="zh-TW"><![CDATA[Height of the comment editor.]]></value>
<value xml:lang="ru"><![CDATA[Set height of the comment editor.]]></value> <value xml:lang="ru"><![CDATA[Height of the comment editor.]]></value>
<value xml:lang="tr"><![CDATA[Set height of the comment editor.]]></value> <value xml:lang="tr"><![CDATA[Height of the comment editor.]]></value>
<value xml:lang="vi"><![CDATA[Set height of the comment editor.]]></value> <value xml:lang="vi"><![CDATA[Height of the comment editor.]]></value>
</item> </item>
<item name="guide_choose_text_formatting"> <item name="guide_choose_text_formatting">
<value xml:lang="ko"><![CDATA[본문 서식을 선택하세요.]]></value> <value xml:lang="ko"><![CDATA[본문 서식]]></value>
<value xml:lang="en"><![CDATA[Choose the body format.]]></value> <value xml:lang="en"><![CDATA[Text formatting]]></value>
<value xml:lang="jp"><![CDATA[本文のスタイルを選択してください。]]></value> <value xml:lang="jp"><![CDATA[本文のスタイル]]></value>
<value xml:lang="zh-CN"><![CDATA[Choose the text formatting.]]></value> <value xml:lang="zh-CN"><![CDATA[Text formatting.]]></value>
<value xml:lang="zh-TW"><![CDATA[Choose the text formatting.]]></value> <value xml:lang="zh-TW"><![CDATA[Text formatting.]]></value>
<value xml:lang="ru"><![CDATA[Choose the text formatting.]]></value> <value xml:lang="ru"><![CDATA[Text formatting.]]></value>
<value xml:lang="tr"><![CDATA[Choose the text formatting.]]></value> <value xml:lang="tr"><![CDATA[Text formatting.]]></value>
<value xml:lang="vi"><![CDATA[Choose the text formatting.]]></value> <value xml:lang="vi"><![CDATA[Text formatting.]]></value>
</item> </item>
<item name="guide_choose_font_body"> <item name="guide_choose_font_body">
<value xml:lang="ko"><![CDATA[본문 글꼴을 선택하세요.]]></value> <value xml:lang="ko"><![CDATA[본문 글꼴]]></value>
<value xml:lang="en"><![CDATA[Choose the body font.]]></value> <value xml:lang="en"><![CDATA[Font body]]></value>
<value xml:lang="jp"><![CDATA[本文のフォントを選択してください。]]></value> <value xml:lang="jp"><![CDATA[本文のフォント]]></value>
<value xml:lang="zh-CN"><![CDATA[Choose the font body.]]></value> <value xml:lang="zh-CN"><![CDATA[Font body.]]></value>
<value xml:lang="zh-TW"><![CDATA[Choose the font body.]]></value> <value xml:lang="zh-TW"><![CDATA[Font body.]]></value>
<value xml:lang="ru"><![CDATA[Choose the font body.]]></value> <value xml:lang="ru"><![CDATA[Font body.]]></value>
<value xml:lang="tr"><![CDATA[Choose the font body.]]></value> <value xml:lang="tr"><![CDATA[Font body.]]></value>
<value xml:lang="vi"><![CDATA[Choose the font body.]]></value> <value xml:lang="vi"><![CDATA[Font body.]]></value>
</item> </item>
<item name="guide_choose_font_size_body"> <item name="guide_choose_font_size_body">
<value xml:lang="ko"><![CDATA[본문 글꼴크기를 선택하세요.]]></value> <value xml:lang="ko"><![CDATA[본문 글꼴크기]]></value>
<value xml:lang="en"><![CDATA[Choose the font size of body.]]></value> <value xml:lang="en"><![CDATA[Size body]]></value>
<value xml:lang="jp"><![CDATA[本文の文字サイズを選択してください。]]></value> <value xml:lang="jp"><![CDATA[本文の文字サイズ]]></value>
<value xml:lang="zh-CN"><![CDATA[Choose the font size body.]]></value> <value xml:lang="zh-CN"><![CDATA[Font size body.]]></value>
<value xml:lang="zh-TW"><![CDATA[Choose the font size body.]]></value> <value xml:lang="zh-TW"><![CDATA[Font size body.]]></value>
<value xml:lang="ru"><![CDATA[Choose the font size body.]]></value> <value xml:lang="ru"><![CDATA[Font size body.]]></value>
<value xml:lang="tr"><![CDATA[Choose the font size body.]]></value> <value xml:lang="tr"><![CDATA[Font size body.]]></value>
<value xml:lang="vi"><![CDATA[Choose the font size body.]]></value> <value xml:lang="vi"><![CDATA[Font size body.]]></value>
</item> </item>
<item name="font_preview"> <item name="font_preview">

View file

@ -1,139 +1,133 @@
<load target="js/editor_module_config.js" usecdn="true" /> <load target="js/editor_module_config.js" usecdn="true" />
<script> <div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
jQuery(function($){ <p>{$XE_VALIDATOR_MESSAGE}</p>
var fontPreview = $('.fontPreview'); </div>
var fontRadio = $('.fontSelector>:radio'); <div class="x_page-header">
var checkedFont = fontRadio.filter(':checked').next('label').css('fontFamily'); <h1>{$lang->editor}</h1>
fontPreview.css('fontFamily',checkedFont); </div>
fontRadio.change(function(){
var myFont = $(this).next('label').css('fontFamily');
fontPreview.css('fontFamily',myFont);
});
var changedSize = $('#fontSize').val();
fontPreview.css('fontSize',changedSize+'px');
$('#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>
<h1 class="h1">{$lang->editor}</h1>
<h2 class="h2">{$lang->editor_preview}</h2>
<!-- Editor Preview --> <!-- Editor Preview -->
<a href="{getUrl('module', 'admin', 'act', 'dispEditorConfigPreview')}" target="_blank">{$lang->cmd_preview}</a> <section class="section">
<!-- /Editor Preview --> <h1>{$lang->editor_preview}</h1>
<form action="./" method="post" class="form" ruleset="generalConfig"> <a href="{getUrl('module', 'admin', 'act', 'dispEditorConfigPreview')}" target="_blank">{$lang->cmd_preview}</a>
<input type="hidden" name="module" value="editor" /> </section>
<input type="hidden" name="act" value="procEditorAdminGeneralConfig " />
<fieldset class="section"> <!-- Editor Option -->
<h2 class="h2">{$lang->editor_option}</h2> <section class="section">
<ul> <h1>{$lang->editor_option}</h1>
<li> <form action="./" method="post" ruleset="generalConfig" class="x_form-horizontal">
<p class="q">{$lang->guide_choose_main_editor}</p> <input type="hidden" name="module" value="editor" />
<p class="a"> <input type="hidden" name="act" value="procEditorAdminGeneralConfig" />
<!--@foreach($editor_skin_list as $editor)-->
<input type="radio" name="editor_skin" value="{$editor}" id="doc_{$editor}" onClick="getEditorSkinColorList(this.value, null, 'document','doc_{$editor}')" <!--@if($editor==$editor_config->editor_skin)-->checked="checked" <!--@end-->/> <div class="x_control-group">
<label for="doc_{$editor}" value='sdf'>{$editor}</label> <label for="change_lang_type" class="x_control-label">{$lang->guide_choose_main_editor}</label>
<select name="sel_editor_colorset" <!--@if($editor==$editor_config->editor_skin)--> > <div class="x_controls">
<!--@foreach($editor_colorset_list as $key => $val)--> <!--@foreach($editor_skin_list as $editor)-->
<option value="{$val->name}" <!--@if($editor_config->sel_editor_colorset == $val->name)-->selected="selected"<!--@end-->>{$val->title}</option> <label for="doc_{$editor}" class="x_inline" id="label_doc_{$editor}">
<!--@end--> <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}
<!--@else-->style="display:none"> <!--@end--> </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> </select>
<br /> </label>
<!--@end--> <br />
</p> <!--@end-->
</li> </div>
<li>
<p class="q"><label for="editor_height">{$lang->guide_set_height_main_editor}</label></p>
<p class="a"><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</p>
</li>
<li>
<p class="q">{$lang->guide_choose_comment_editor}</p>
<p class="a">
<!--@foreach($editor_skin_list as $editor)-->
<input type="radio" name="comment_editor_skin" value="{$editor}" id="com_{$editor}" onclick="getEditorSkinColorList(this.value, null, 'reply','com_{$editor}')" <!--@if($editor == $editor_config->comment_editor_skin)-->checked="checked" <!--@end-->/>
<label for="com_{$editor}">{$editor}</label>
<select name="sel_comment_editor_colorset" <!--@if($editor==$editor_config->comment_editor_skin)--> >
<!--@foreach($editor_colorset_list as $key => $val)-->
<option value="{$val->name}" <!--@if($editor_config->sel_comment_editor_colorset == $val->name)-->selected="selected"<!--@end-->>{$val->title}</option>
<!--@end-->
<!--@else-->style="display:none"> <!--@end-->
</select>
<br />
<!--@end-->
</p>
</li>
<li>
<p class="q"><label for="comment_editor_height">{$lang->guide_set_height_comment_editor}</label></p>
<p class="a"><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</p>
</li>
<li>
<p class="q">{$lang->guide_choose_text_formatting}</p>
<p class="a">
<!--@foreach($content_style_list as $key => $val)-->
<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'"> <label for="style_{$key}">{$key}</label>
<!--@end-->
</p>
</li>
<li>
<p class="q">{$lang->guide_choose_font_body}</p>
<textarea rows="8" cols="42" class="fontPreview" title="Font Preview">{$lang->font_preview}</textarea>
<p class="answer fontSelector">
<input type="radio" name="content_font" id="font_noFont" value="" <!--@if(!$editor_config->content_font)-->checked="checked" <!--@end-->/> <label for="font_noFont" style="font-family:''">none(inherit)</label><br />
<!--@foreach($lang->edit->fontlist as $name => $detail)-->
<input type="radio" name="content_font" id="font_{$name}" value="{$name}" <!--@if($editor_config->content_font==$name)-->checked="checked" <!--@end-->/> <label for="font_{$name}" style="font-family:{$detail}">{$detail}</label><br />
<!--@end-->
</p>
</li>
<li>
<p class="q"><label for="fontSize">{$lang->guide_choose_font_size_body}</label></p>
<textarea rows="8" cols="42" class="fontPreview" title="Font Preview">{$lang->font_preview}</textarea>
<p class="a"><input type="text" id="fontSize" name="content_font_size" value="<!--@if($editor_config->content_font_size)-->{str_replace('px','',$editor_config->content_font_size)}<!--@else-->{str_replace('px','',$editor_config_default['content_font_size'])}<!--@end-->" style="width:30px" /> px</p>
</li>
</ul>
<div class="btnArea">
<span class="btn"><input type="submit" value="{$lang->cmd_save}" /></span>
</div> </div>
</fieldset> <div class="x_control-group">
</form> <label for="editor_height" class="x_control-label">{$lang->guide_set_height_main_editor}</label>
<form action="./" method="post" class="form" ruleset="componentOrderAndUse"> <div class="x_controls">
<input type="hidden" name="module" value="editor" /> <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
<input type="hidden" name="act" value="procEditorAdminCheckUseListOrder" /> </div>
<fieldset class="section"> </div>
<h2 class="h2">{$lang->editor_component}</h2> <div class="x_control-group">
<div class="table even easyList"> <label for="sel_comment_editor_colorset" class="x_control-label">{$lang->guide_choose_comment_editor}</label>
<table id="sortable_table" class="sortable"width="100%" border="1" cellspacing="0"> <div class="x_controls">
<caption> <!--@foreach($editor_skin_list as $editor)-->
{$lang->total_count}({$component_count}) <label for="com_{$editor}" class="x_inline" id="label_com_{$editor}">
</caption> <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}
<thead> </label>
<tr> <label class="x_inline">
<th scope="col">{$lang->cmd_move}</th> <select name="sel_comment_editor_colorset" style="display:none"|cond="$editor!=$editor_config->comment_editor_skin">
<th scope="col" class="title">{$lang->component_name} {$lang->user_name}</th> <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>
<th scope="col">{$lang->version}</th> </select>
<th scope="col">{$lang->author}</th> </label>
<th scope="col">{$lang->path}</th> <br />
<th scope="col">{$lang->use}</th> <!--@end-->
<th scope="col">{$lang->cmd_setup}</th> </div>
<th scope="col">{$lang->cmd_delete}</th> </div>
</tr>
</thead> <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 for="style_{$key}" 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-->
</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 for="font_noFont" 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">
<input type="radio" name="content_font" id="font_{$name}" value="{$name}" <!--@if($editor_config->content_font==$name)-->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 style="width:30px">{$lang->cmd_move}</th>
<th>{$lang->component_name}</th>
<th style="width:30px">{$lang->version}</th>
<th>{$lang->author}</th>
<th>{$lang->path}</th>
<th style="width:30px">{$lang->use}</th>
<th style="width:30px">{$lang->cmd_delete}</th>
</tr>
</thead>
<tbody class="uDrag"> <tbody class="uDrag">
<!--@foreach($component_list as $component_name => $xml_info)--> <!--@foreach($component_list as $component_name => $xml_info)-->
<tr> <tr>
<td><div class="wrap" style="height:80px"><button type="button" class="dragBtn">Move to</button></div></td> <td><div class="wrap" style="height:70px"><button type="button" class="dragBtn">Move to</button></div></td>
<td class="title"> <td class="title">
<input type="hidden" name="component_names[]" value="{$xml_info->component_name}" /> <input type="hidden" name="component_names[]" value="{$xml_info->component_name}" />
<p><b>{$xml_info->title}</b></p> <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> <p>{nl2br($xml_info->description)}</p>
<!--@if($xml_info->version && $xml_info->need_update == 'Y')--> <!--@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> <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>
@ -147,7 +141,6 @@
</td> </td>
<td>{$xml_info->path}</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><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><a href="{getUrl('', 'module', 'admin', 'act', 'dispEditorAdminSetupComponent', 'component_name', $xml_info->component_name)}">{$lang->cmd_setup}</a>
<td> <td>
<!--@if($xml_info->version && $xml_info->delete_url)--> <!--@if($xml_info->version && $xml_info->delete_url)-->
<a href="{$xml_info->delete_url}">{$lang->cmd_delete}</a> <a href="{$xml_info->delete_url}">{$lang->cmd_delete}</a>
@ -157,9 +150,36 @@
<!--@end--> <!--@end-->
</tbody> </tbody>
</table> </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> </div>
<div class="btnArea"> </form>
<span class="btn"><input type="submit" value="{$lang->cmd_save}" /></span> </section>
</div> <script>
</fieldset> jQuery(function($){
</form> //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>

View file

@ -10,7 +10,7 @@ function resultGetEditorSkinColorList(ret_obj,response_tags, params) {
var selectbox = null; var selectbox = null;
jQuery(function($){ jQuery(function($){
if(params.testid){ if(params.testid){
selectbox = $("#"+params.testid).next('label').next('select'); selectbox = $("#"+params.testid).next('label').children('select');
}else{ }else{
selectbox = (params.type == 'document') ? $('select[name=sel_editor_colorset]') : $('select[name=sel_comment_editor_colorset]'); selectbox = (params.type == 'document') ? $('select[name=sel_editor_colorset]') : $('select[name=sel_comment_editor_colorset]');
} }