mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
editor colorset 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4792 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
b36a63192b
commit
fbd6020d07
13 changed files with 147 additions and 80 deletions
|
|
@ -22,26 +22,6 @@
|
|||
<name xml:lang="ko">sol</name>
|
||||
</author>
|
||||
|
||||
<colorset>
|
||||
<color name="white" src="screenshot/white.gif">
|
||||
<title xml:lang="ko">하얀색(기본)</title>
|
||||
<title xml:lang="jp">白(デフォルト)</title>
|
||||
<title xml:lang="zh-CN">白色(基本)</title>
|
||||
<title xml:lang="en">White (default)</title>
|
||||
<title xml:lang="es">Blanco (por defecto)</title>
|
||||
<title xml:lang="zh-TW">白色(預設)</title>
|
||||
</color>
|
||||
<color name="black" src="screenshot/black.gif">
|
||||
<title xml:lang="ko">검은색</title>
|
||||
<title xml:lang="jp">黒</title>
|
||||
<title xml:lang="en">Black</title>
|
||||
<title xml:lang="ru">Черного</title>
|
||||
<title xml:lang="es">Negro</title>
|
||||
<title xml:lang="zh-CN">黑色</title>
|
||||
<title xml:lang="zh-TW">黑色</title>
|
||||
</color>
|
||||
</colorset>
|
||||
|
||||
<extra_vars>
|
||||
<var name="default_style" type="select">
|
||||
<title xml:lang="ko">기본 형태</title>
|
||||
|
|
|
|||
|
|
@ -47,26 +47,7 @@
|
|||
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<caption>{$lang->extra_vars}</caption>
|
||||
<tr valign="top">
|
||||
<th scope="row"><div>{$lang->colorset}</div></th>
|
||||
<td class="wide">
|
||||
<!--@foreach($skin_info->colorset as $key => $val)-->
|
||||
<!--@if($val->screenshot)-->
|
||||
{@ $_img_info = getImageSize($val->screenshot); $_height = $_img_info[1]+40; $_width = $_img_info[0]+20; $_talign = "center"; }
|
||||
<!--@else-->
|
||||
{@ $_width = 200; $_height = 20; $_talign = "left"; }
|
||||
<!--@end-->
|
||||
<div style="float:left;text-align:{$_talign};margin-bottom:1em;width:{$_width}px;height:{$_height}px;margin-right:10px;">
|
||||
<input type="radio" name="colorset" value="{$val->name}" id="colorset_{$key}" <!--@if($module_info->colorset==$val->name)-->checked="checked"<!--@end-->/>
|
||||
<label for="colorset_{$key}">{$val->title}</label>
|
||||
<!--@if($val->screenshot)-->
|
||||
<br />
|
||||
<img src="{$val->screenshot}" alt="{$val->title}" style="border:1px solid #888888;padding:2px;margin:2px;"/>
|
||||
<!--@end-->
|
||||
</div>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!--@foreach($skin_info->extra_vars as $key => $val)-->
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
<action name="dispEditorAdminIndex" type="view" standalone="true" admin_index="true" />
|
||||
<action name="dispEditorAdminSetupComponent" type="view" standalone="true" />
|
||||
<action name="dispEditorAdminSkinColorset" type="view" standalone="true" />
|
||||
|
||||
<action name="procEditorSaveDoc" type="controller" standalone="true" />
|
||||
<action name="procEditorRemoveSavedDoc" type="controller" standalone="true" />
|
||||
|
|
|
|||
|
|
@ -113,6 +113,8 @@
|
|||
|
||||
$editor_config->editor_skin = Context::get('editor_skin');
|
||||
$editor_config->comment_editor_skin = Context::get('comment_editor_skin');
|
||||
$editor_config->sel_editor_colorset = Context::get('sel_editor_colorset');
|
||||
$editor_config->sel_comment_editor_colorset = Context::get('sel_comment_editor_colorset');
|
||||
|
||||
$enable_html_grant = trim(Context::get('enable_html_grant'));
|
||||
if($enable_html_grant) $editor_config->enable_html_grant = explode('|@|', $enable_html_grant);
|
||||
|
|
|
|||
|
|
@ -68,5 +68,12 @@
|
|||
$this->setLayoutFile("popup_layout");
|
||||
}
|
||||
|
||||
function dispEditorAdminSkinColorset(){
|
||||
$skin = Context::get('skin');
|
||||
$oModuleModel = &getModel('module');
|
||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path,$skin);
|
||||
$colorset = $skin_info->colorset;
|
||||
Context::set('colorset', $colorset);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
13
modules/editor/editor.api.php
Normal file
13
modules/editor/editor.api.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @class editorAPI
|
||||
* @author SOL군 (ngleader.com)
|
||||
* @brief
|
||||
**/
|
||||
|
||||
class editorAPI extends editor {
|
||||
function dispEditorAdminSkinColorset(&$oModule) {
|
||||
$oModule->add('colorset', Context::get('colorset'));
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -91,7 +91,9 @@
|
|||
// 스킨 설정
|
||||
$skin = $option->skin;
|
||||
if(!$skin) $skin = 'default';
|
||||
|
||||
$colorset = $option->colorset;
|
||||
Context::set('colorset', $colorset);
|
||||
Context::set('skin', $skin);
|
||||
/**
|
||||
* 자동백업 기능 체크 (글 수정일 경우는 사용하지 않음)
|
||||
**/
|
||||
|
|
@ -212,6 +214,7 @@
|
|||
// type에 따른 설정 정리
|
||||
if($type == 'document') {
|
||||
$config->editor_skin = $editor_config->editor_skin;
|
||||
$config->sel_editor_colorset = $editor_config->sel_editor_colorset;
|
||||
$config->upload_file_grant = $editor_config->upload_file_grant;
|
||||
$config->enable_default_component_grant = $editor_config->enable_default_component_grant;
|
||||
$config->enable_component_grant = $editor_config->enable_component_grant;
|
||||
|
|
@ -221,6 +224,7 @@
|
|||
$config->enable_autosave = $editor_config->enable_autosave;
|
||||
} else {
|
||||
$config->editor_skin = $editor_config->comment_editor_skin;
|
||||
$config->sel_editor_colorset = $editor_config->sel_comment_editor_colorset;
|
||||
$config->upload_file_grant = $editor_config->comment_upload_file_grant;
|
||||
$config->enable_default_component_grant = $editor_config->enable_comment_default_component_grant;
|
||||
$config->enable_component_grant = $editor_config->enable_comment_component_grant;
|
||||
|
|
@ -240,6 +244,7 @@
|
|||
|
||||
// 에디터 옵션 변수를 미리 설정
|
||||
$option->skin = $config->editor_skin;
|
||||
$option->colorset = $config->sel_editor_colorset;
|
||||
|
||||
// 파일 업로드 권한 체크
|
||||
$option->allow_fileupload = false;
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@
|
|||
// 에디터 설정을 구함
|
||||
$oEditorModel = &getModel('editor');
|
||||
$editor_config = $oEditorModel->getEditorConfig($current_module_srl);
|
||||
|
||||
Context::set('editor_config', $editor_config);
|
||||
|
||||
// 에디터 스킨 목록을 구함
|
||||
|
|
@ -97,5 +98,7 @@
|
|||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<!--// 스킨 css 로드 -->
|
||||
<!--%import("css/editor.css")-->
|
||||
|
||||
<!--@if($module_info->colorset == "black")-->
|
||||
<!--@if($colorset == "black")-->
|
||||
<!--%import("css/black.css")-->
|
||||
<!--@else-->
|
||||
<!--%import("css/white.css")-->
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
<input type="hidden" name="_saved_doc_content" value="{htmlspecialchars($saved_doc->content)}" />
|
||||
<input type="hidden" name="_saved_doc_message" value="{$lang->msg_load_saved_doc}" />
|
||||
<!--@end-->
|
||||
|
||||
<input type="hidden" name="_editor_sequence" value="{$editor_sequence}" />
|
||||
<div class="editorTemporary">
|
||||
<!--@if($is_logged)-->
|
||||
<span class="button small"><input type="button" value="{$lang->cmd_temp_save}" onclick="doDocumentSave(this); return false;" /></span>
|
||||
|
|
@ -41,10 +41,10 @@
|
|||
</ul>
|
||||
|
||||
<!-- 에디터 -->
|
||||
<div id="xeEditor_{$editor_sequence}" class="xeEditor rich">
|
||||
<div id="xeEditor_{$editor_sequence}" class="xeEditor rich" >
|
||||
<!-- class="xeEditor rich" | class="xeEditor html" -->
|
||||
|
||||
<div id="xeEditorOption_{$editor_sequence}" class="toolBox">
|
||||
<div id="xeEditorOption_{$editor_sequence}" class="toolBox" >
|
||||
|
||||
<!--@if($enable_default_component)-->
|
||||
<!-- 기본 컴포넌트 출력 -->
|
||||
|
|
@ -162,8 +162,8 @@
|
|||
<!--@end-->
|
||||
|
||||
<!-- 에디터 출력 -->
|
||||
<div class="editorBox" id="editorBox">
|
||||
<div class="editorMargin">
|
||||
<div class="editorBox" id="editorBox" >
|
||||
<div class="editorMargin" >
|
||||
<iframe id="editor_iframe_{$editor_sequence}" class="richEditor" frameborder="0" height="{$editor_height}" title="Rich Text Editor"></iframe>
|
||||
<textarea id="editor_textarea_{$editor_sequence}" class="htmlEditor" style="height:{$editor_height}" rows="5" cols="20" title="HTML Editor"></textarea>
|
||||
</div>
|
||||
|
|
@ -218,6 +218,13 @@
|
|||
var auto_saved_msg = "{$lang->msg_auto_saved}";
|
||||
|
||||
<!--@if(!$editor_manual_start)-->
|
||||
editorStart("{$editor_sequence}", "{$editor_primary_key_name}", "{$editor_content_key_name}", '{$editor_height}' , '#000000');
|
||||
|
||||
<!--@if($colorset == "black")-->
|
||||
editorStart("{$editor_sequence}", "{$editor_primary_key_name}", "{$editor_content_key_name}", '{$editor_height}' , '#FFF');
|
||||
<!--@else-->
|
||||
editorStart("{$editor_sequence}", "{$editor_primary_key_name}", "{$editor_content_key_name}", '{$editor_height}' , '#000');
|
||||
<!--@end-->
|
||||
|
||||
|
||||
<!--@end-->
|
||||
//]]></script>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,39 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<skin version="0.2">
|
||||
<title xml:lang="ko">XE 기본 에디터</title>
|
||||
<title xml:lang="zh-CN">XE编辑器默认皮肤</title>
|
||||
<title xml:lang="jp">XE基本エディター</title>
|
||||
<title xml:lang="zh-TW">XE編輯器預設面板</title>
|
||||
<description xml:lang="ko">개발 : zero (http://blog.nzeo.com)</description>
|
||||
<description xml:lang="zh-CN">程序 : zero (http://blog.nzeo.com) </description>
|
||||
<description xml:lang="jp">開発 : zero (http://blog.nzeo.com)</description>
|
||||
<description xml:lang="zh-TW">程式 : zero (http://blog.nzeo.com)</description>
|
||||
<version>0.1</version>
|
||||
<date>2007-02-28</date>
|
||||
<title xml:lang="ko">XE 기본 에디터</title>
|
||||
<title xml:lang="zh-CN">XE编辑器默认皮肤</title>
|
||||
<title xml:lang="jp">XE基本エディター</title>
|
||||
<title xml:lang="zh-TW">XE編輯器預設面板</title>
|
||||
<description xml:lang="ko">개발 : zero (http://blog.nzeo.com)</description>
|
||||
<description xml:lang="zh-CN">程序 : zero (http://blog.nzeo.com) </description>
|
||||
<description xml:lang="jp">開発 : zero (http://blog.nzeo.com)</description>
|
||||
<description xml:lang="zh-TW">程式 : zero (http://blog.nzeo.com)</description>
|
||||
<version>0.1</version>
|
||||
<date>2007-02-28</date>
|
||||
|
||||
<author email_address="zero@zeroboard.com" link="http://blog.nzeo.com">
|
||||
<name xml:lang="ko">zero</name>
|
||||
<name xml:lang="zh-CN">Zero</name>
|
||||
<name xml:lang="jp">zero</name>
|
||||
<name xml:lang="zh-TW">zero</name>
|
||||
</author>
|
||||
<author email_address="zero@zeroboard.com" link="http://blog.nzeo.com">
|
||||
<name xml:lang="ko">zero</name>
|
||||
<name xml:lang="zh-CN">Zero</name>
|
||||
<name xml:lang="jp">zero</name>
|
||||
<name xml:lang="zh-TW">zero</name>
|
||||
</author>
|
||||
<colorset>
|
||||
<color name="white">
|
||||
<title xml:lang="ko">하얀색(기본)</title>
|
||||
<title xml:lang="jp">白(デフォルト)</title>
|
||||
<title xml:lang="zh-CN">白色(基本)</title>
|
||||
<title xml:lang="en">White (default)</title>
|
||||
<title xml:lang="es">Blanco (por defecto)</title>
|
||||
<title xml:lang="zh-TW">白色(預設)</title>
|
||||
</color>
|
||||
<color name="black">
|
||||
<title xml:lang="ko">검은색</title>
|
||||
<title xml:lang="jp">黒</title>
|
||||
<title xml:lang="en">Black</title>
|
||||
<title xml:lang="ru">Черного</title>
|
||||
<title xml:lang="es">Negro</title>
|
||||
<title xml:lang="zh-CN">黑色</title>
|
||||
<title xml:lang="zh-TW">黑色</title>
|
||||
</color>
|
||||
</colorset>
|
||||
</skin>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
37
modules/editor/tpl/js/editor_module_config.js
Normal file
37
modules/editor/tpl/js/editor_module_config.js
Normal 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="";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue