editor colorset 추가

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4792 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2008-11-07 10:47:24 +00:00
parent b36a63192b
commit fbd6020d07
13 changed files with 147 additions and 80 deletions

View file

@ -1,4 +1,5 @@
<!--%import("filter/insert_editor_module_config.xml")-->
<!--%import("js/editor_module_config.js")-->
<form action="./" method="post" onsubmit="return procFilter(this, insert_editor_module_config)">
<input type="hidden" name="target_module_srl" value="{$module_info->module_srl?$module_info->module_srl:$module_srls}" />
@ -13,14 +14,19 @@
</tr>
</thead>
<tbody>
<tr class="row2">
<tr class="row2">
<th rowspan="2"><div>{$lang->editor_skin}</div></th>
<td>
<select name="editor_skin">
<select name="editor_skin" onchange="getEditorSkinColorList(this.value)">
<!--@foreach($editor_skin_list as $editor)-->
<option value="{$editor}" <!--@if($editor==$editor_config->editor_skin)-->selected="selected"<!--@end-->>{$editor}</option>
<!--@end-->
</select>
<select name="sel_editor_colorset" id="sel_editor_colorset" style="display:none">
</select>
<script "text/javascript">//<![CDATA[
getEditorSkinColorList('{$editor_config->editor_skin}','{$editor_config->sel_editor_colorset}');
//]]></script>
</td>
<td>
<select name="comment_editor_skin">
@ -28,12 +34,17 @@
<option value="{$editor}" <!--@if($editor==$editor_config->comment_editor_skin)-->selected="selected"<!--@end-->>{$editor}</option>
<!--@end-->
</select>
<select name="sel_comment_editor_colorset" id="sel_comment_editor_colorset" style="display:none">
</select>
<script "text/javascript">//<![CDATA[
getEditorSkinColorList('{$editor_config->comment_editor_skin}','{$editor_config->sel_comment_editor_colorset}','comment');
//]]></script>
</td>
</tr>
<tr>
<td colspan="2"><p>{$lang->about_editor_skin}</p></td>
</tr>
<tr class="row2">
<tr class="row2">
<th rowspan="2"><div>{$lang->enable_html_grant}</div></th>
<td>
<!--@foreach($group_list as $k => $v)-->
@ -49,7 +60,7 @@
<tr>
<td colspan="2"><p>{$lang->about_enable_html_grant}</p></td>
</tr>
<tr class="row2">
<tr class="row2">
<th rowspan="2"><div>{$lang->upload_file_grant}</div></th>
<td>
<!--@foreach($group_list as $k => $v)-->
@ -65,7 +76,7 @@
<tr>
<td colspan="2"><p>{$lang->about_upload_file_grant}</p></td>
</tr>
<tr class="row2">
<tr class="row2">
<th rowspan="2"><div>{$lang->enable_default_component_grant}</div></th>
<td>
<!--@foreach($group_list as $k => $v)-->
@ -81,7 +92,7 @@
<tr>
<td colspan="2"><p>{$lang->about_default_component_grant}</p></td>
</tr>
<tr class="row2">
<tr class="row2">
<th rowspan="2"><div>{$lang->enable_component_grant}</div></th>
<td>
<!--@foreach($group_list as $k => $v)-->
@ -97,7 +108,7 @@
<tr>
<td colspan="2"><p>{$lang->about_component_grant}</p></td>
</tr>
<tr class="row2">
<tr class="row2">
<th rowspan="2"><div>{$lang->editor_height}</div></th>
<td>
<input type="text" name="editor_height" value="{$editor_config->editor_height}" class="inputTypeText w80" />px
@ -109,7 +120,7 @@
<tr>
<td colspan="2"><p>{$lang->about_editor_height}</p></td>
</tr>
<tr class="row2">
<tr class="row2">
<th rowspan="2"><div>{$lang->height_resizable}</div></th>
<td>
<input type="checkbox" value="Y" name="enable_height_resizable" <!--@if($editor_config->enable_height_resizable=='Y')-->checked="checked"<!--@end-->/>
@ -121,7 +132,7 @@
<tr>
<td colspan="2"><p>{$lang->about_editor_height_resizable}</p></td>
</tr>
<tr class="row2">
<tr class="row2">
<th rowspan="2"><div>{$lang->enable_autosave}</div></th>
<td colspan="2"><input type="checkbox" value="Y" name="enable_autosave" <!--@if($editor_config->enable_autosave=='Y')-->checked="checked"<!--@end-->/></td>
</tr>

View file

@ -64,6 +64,7 @@ function editorGetSelectedNode(editor_sequence) {
* editor 시작 (editor_sequence로 iframe객체를 얻어서 쓰기 모드로 전환)
**/
function editorStart(editor_sequence, primary_key, content_key, editor_height, font_color) {
if(typeof(font_color)=='undefined') font_color = '#000';
// iframe obj를 찾음
@ -482,12 +483,12 @@ function closeEditorInfo(editor_sequence) {
function showEditorHelp(e,editor_sequence){
var oid = 'editorHelp_'+editor_sequence;
var oid = 'helpList_'+editor_sequence;
if(xGetElementById(oid).className =='editorHelp'){
if(xGetElementById(oid).className =='helpList'){
xGetElementById(oid).className = 'editorHelp open';
/*
xGetElementById(oid).className = 'helpList open';
/*
if(e.pageX <= xWidth('helpList_'+editor_sequence)){
xGetElementById('helpList_'+editor_sequence).style.right='auto';
xGetElementById('helpList_'+editor_sequence).style.left='0';
@ -495,9 +496,9 @@ function showEditorHelp(e,editor_sequence){
xGetElementById('helpList_'+editor_sequence).style.right='0';
xGetElementById('helpList_'+editor_sequence).style.left='';
}
*/
*/
}else{
xGetElementById(oid).className = 'editorHelp';
xGetElementById(oid).className = 'helpList';
}
}
@ -505,7 +506,7 @@ function showEditorExtension(e,editor_sequence){
var oid = 'editorExtension_'+editor_sequence;
if(xGetElementById(oid).className =='extension2'){
xGetElementById(oid).className = 'extension2 open';
if(e.pageX <= xWidth('editor_component_'+editor_sequence)){
xGetElementById('editor_component_'+editor_sequence).style.right='auto';
xGetElementById('editor_component_'+editor_sequence).style.left='0';

View file

@ -0,0 +1,37 @@
function getEditorSkinColorList(skin_name,selected_colorset,type){
if(skin_name.length>0){
type = type || 'board';
var response_tags = new Array('error','message','colorset');
exec_xml('editor','dispEditorAdminSkinColorset',{skin:skin_name},resultGetEditorSkinColorList,response_tags,{'selected_colorset':selected_colorset,'type':type});
}
}
function resultGetEditorSkinColorList(ret_obj,response_tags, params) {
var selectbox = null;
if(params.type == 'board'){
selectbox = xGetElementById("sel_editor_colorset");
}else{
selectbox = xGetElementById("sel_comment_editor_colorset");
}
if(ret_obj['error'] == 0 && ret_obj.colorset){
var it = new Array();
var items = ret_obj['colorset']['item'];
if(typeof(items[0]) == 'undefined'){
it[0] = items;
}else{
it = items;
}
var sel = 0;
for(var i=0,c=it.length;i<c;i++){
selectbox.options[i]=new Option(it[i].title,it[i].name);
if(params.selected_colorset && params.selected_colorset == it[i].name) sel = i;
}
selectbox.options[sel].selected = true;
selectbox.style.display="";
}else{
selectbox.style.display="none";
selectbox.innerHTML="";
}
}