게시판 분류에 color 속성 추가 (color picker는 일괄 처리 예정)

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5081 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2008-12-15 08:12:00 +00:00
parent 1b51eb6c7d
commit 64ec631bba
18 changed files with 80 additions and 23 deletions

View file

@ -265,7 +265,7 @@
**/
function procBoardAdminInsertCategory($args = null) {
// 입력할 변수 정리
if(!$args) $args = Context::gets('module_srl','category_srl','parent_srl','title','expand','group_srls');
if(!$args) $args = Context::gets('module_srl','category_srl','parent_srl','title','expand','group_srls','color');
if($args->expand !="Y") $args->expand = "N";
$args->group_srls = str_replace('|@|',',',$args->group_srls);

View file

@ -16,6 +16,7 @@
// Item
$lang->parent_category_title = 'Parent Category';
$lang->category_title = 'Category';
$lang->category_color = '분류 폰트색깔';
$lang->expand = 'Expand';
$lang->category_group_srls = 'Accessable Group';
$lang->search_result = 'Search Result';
@ -37,4 +38,6 @@
$lang->about_board = 'This module is for creating and managing boards.';
$lang->about_consultation = "Non-administrator members would see their own articles.\nNon-members would not be able to write articles when using consultation.";
$lang->about_admin_mail = 'A mail will be sent when an article or comment is submitted.<br />Multiple mails can be sent with commas(,).';
$lang->about_category_color = '분류 폰트색깔을 지정합니다.';
?>

View file

@ -18,6 +18,7 @@
// Artículos
$lang->parent_category_title = 'Categoría Superior';
$lang->category_title = 'Nombre de la categoría';
$lang->category_color = '분류 폰트색깔';
$lang->expand = 'Expandir';
$lang->category_group_srls = 'Limitar el grupo';
$lang->search_result = 'Resultado de la búsqueda';
@ -39,4 +40,7 @@
$lang->about_board = 'Este módulo es para crear y manejar los tableros.';
$lang->about_consultation = "No administrador de los miembros que consideran que su propia artocles. \ NNon miembros no serían capaces de escribir artículos al utilizar la consulta.";
$lang->about_admin_mail = '글이나 댓글이 등록될때 등록된 메일주소로 메일이 발송됩니다<br /> ,(콤마)로 연결시 다수의 메일주소로 발송할 수 있습니다.';
$lang->about_category_color = '분류 폰트색깔을 지정합니다.';
?>

View file

@ -19,6 +19,8 @@
// 項目
$lang->parent_category_title = '上位カテゴリ名';
$lang->category_title = 'カテゴリ名';
$lang->category_color = '분류 폰트색깔';
$lang->expand = '拡張表示';
$lang->category_group_srls = 'グループ制限';
$lang->search_result = '検索結果';
@ -40,4 +42,6 @@
$lang->about_board = '掲示板の生成、および管理する掲示板モジュールです。';
$lang->about_consultation = "相談機能とは、管理権限のない会員に本人の書き込みだけを表示する機能です。\n但し、相談機能を使用する際は、非会員の書き込みは自動的に禁止されます。";
$lang->about_admin_mail = '書き込みやコメントが掲載される時、登録メールアドレス宛にメールが送信されます。<br /> 複数のメールアドレスへ送信する場合は「,」(半額コンマ)区切りで登録して下さい。';
$lang->about_category_color = '분류 폰트색깔을 지정합니다.';
?>

View file

@ -16,6 +16,8 @@
// 항목
$lang->parent_category_title = '상위 카테고리명';
$lang->category_title = '분류명';
$lang->category_color = '분류 폰트색깔';
$lang->expand = '펼침';
$lang->category_group_srls = '그룹제한';
$lang->search_result = '검색결과';
@ -37,4 +39,6 @@
$lang->about_board = '게시판을 생성하고 관리할 수 있는 게시판 모듈입니다.';
$lang->about_consultation = "상담 기능은 관리권한이 없는 회원은 자신이 쓴 글만 보이도록 하는 기능입니다\n단 상담기능 사용시 비회원 글쓰기는 자동으로 금지됩니다.";
$lang->about_admin_mail = '글이나 댓글이 등록될때 등록된 메일주소로 메일이 발송됩니다<br /> ,(콤마)로 연결시 다수의 메일주소로 발송할 수 있습니다.';
$lang->about_category_color = '분류 폰트색깔을 지정합니다.';
?>

View file

@ -19,6 +19,8 @@
// Объект
$lang->parent_category_title = 'Родительская категория';
$lang->category_title = 'Категория';
$lang->category_color = '분류 폰트색깔';
$lang->expand = 'Расширить';
$lang->category_group_srls = 'Доступные группы';
$lang->search_result = 'Результат поиска';
@ -40,4 +42,7 @@
$lang->about_board = 'Этот модуль служит для создания и управления форумами.';
$lang->about_consultation = "상담 기능은 관리권한이 없는 회원은 자신이 쓴 글만 보이도록 하는 기능입니다\n단 상담기능 사용시 비회원 글쓰기는 자동으로 금지됩니다.";
$lang->about_admin_mail = '글이나 댓글이 등록될때 등록된 메일주소로 메일이 발송됩니다<br /> ,(콤마)로 연결시 다수의 메일주소로 발송할 수 있습니다.';
$lang->about_category_color = '분류 폰트색깔을 지정합니다.';
?>

View file

@ -19,6 +19,7 @@
// 项目
$lang->parent_category_title = '上级分类名';
$lang->category_title = '分类名';
$lang->category_color = '분류 폰트색깔';
$lang->expand = '展开';
$lang->category_group_srls = '用户组';
$lang->search_result = '搜索结果';
@ -41,4 +42,5 @@
$lang->about_board = "可生成及管理版面的模块。";
$lang->about_consultation = "咨询功能是指除有管理权限的会员以外,其他会员只能浏览自己发表的主题。\n使用咨询功能时系统将自动禁止非会员的发表主题权限。";
$lang->about_admin_mail = '有新的主题或评论时,将自动发电子邮件来通知管理员。<br />多数电子邮件由逗号(,)来分隔。';
$lang->about_category_color = '분류 폰트색깔을 지정합니다.';
?>

View file

@ -16,6 +16,7 @@
// 項目
$lang->parent_category_title = '主分類';
$lang->category_title = '分類名稱';
$lang->category_color = '분류 폰트색깔';
$lang->expand = '展開';
$lang->category_group_srls = '用戶組';
$lang->search_result = '搜尋結果';
@ -37,4 +38,5 @@
$lang->about_board = '可建立及管理討論板的模組。';
$lang->about_consultation = "咨詢功能是指除有管理權限的會員以外,其他會員只能瀏覽自己發表的主題。\n使用咨詢功能時系統將自動禁止非會員的發表主題權限。";
$lang->about_admin_mail = '有新的主題或評論時,將自動發電子郵件來通知管理員。<br />多數電子郵件由逗號(,)區隔。';
$lang->about_category_color = '분류 폰트색깔을 지정합니다.';
?>

View file

@ -7,7 +7,6 @@
<!--@if($module_info->display_voted_count!='N')-->{@ $_col_count++}<!--@end-->
<!--@if($module_info->display_regdate != 'N')-->{@ $_col_count++}<!--@end-->
<!--@if($module_info->display_last_update == 'Y')-->{@ $_col_count++}<!--@end-->
<form action="./" method="get">
<table cellspacing="0" summary="" class="boardList">
@ -65,7 +64,7 @@
<!--@if($grant->is_admin)--><td class="checkbox"><input type="checkbox" name="cart" value="{$document->document_srl}" onclick="doAddDocumentCart(this)" <!--@if($document->isCarted())-->checked="checked"<!--@end--> /></td><!--@end-->
<td class="title">
<!--@if($module_info->use_category == "Y" && $document->get('category_srl'))-->
<strong class="category">{$category_list[$document->get('category_srl')]->title}</strong>
<strong class="category" <!--@if($category_list[$document->get('category_srl')]->color)-->style="color:{$category_list[$document->get('category_srl')]->color};"<!--@end-->>{$category_list[$document->get('category_srl')]->title}</strong>
<!--@end-->
<a href="{getUrl('document_srl',$document->document_srl, 'listStyle', $listStyle, 'cpage','')}">{$document->getTitle($module_info->subject_cut_size)}</a>
@ -95,7 +94,7 @@
<!--@if($grant->is_admin)--><td class="checkbox"><input type="checkbox" name="cart" value="{$document->document_srl}" onclick="doAddDocumentCart(this)" <!--@if($document->isCarted())-->checked="checked"<!--@end--> /></td><!--@end-->
<td class="title">
<!--@if($module_info->use_category == "Y" && $document->get('category_srl'))-->
<strong class="category">{$category_list[$document->get('category_srl')]->title}</strong>
<strong class="category" <!--@if($category_list[$document->get('category_srl')]->color)-->style="color:{$category_list[$document->get('category_srl')]->color};"<!--@end-->>{$category_list[$document->get('category_srl')]->title}</strong>
<!--@end-->
<a href="{getUrl('document_srl',$document->document_srl, 'listStyle', $listStyle, 'cpage','')}">{$document->getTitle($module_info->subject_cut_size)}</a>

View file

@ -15,6 +15,14 @@
<p>{$lang->about_category_title}</p>
</td>
</tr>
<tr>
<th scope="row"><div>{$lang->category_color}</div></th>
<td>
<input type="text" name="category_color" value="{htmlspecialchars($category_info->color)}" class="inputTypeText" />
<p>{$lang->about_category_color}</p>
</td>
</tr>
<tr >
<th scope="row2"><div>{$lang->category_group_srls} <input type="checkbox" onclick="XE.checkboxToggleAll('group_srls'); return false;" /></div></th>
<td>
@ -33,4 +41,4 @@
</td>
</tr>
</table>
</table>

View file

@ -3,8 +3,10 @@
<!--%import("filter/delete_category.xml")-->
<!--%import("filter/move_category.xml")-->
<!--%import("../../../common/js/jquery.simple.tree.js",optimized=false)-->
<!--%import("../../../common/css/jquery.simple.tree.css",optimized=false)-->
<!--%import("js/board_admin.js")-->
<script type="text/javascript">
var category_title = "{$lang->category}";

View file

@ -9,6 +9,7 @@
<param name="category_srl" target="category_srl" />
<param name="parent_srl" target="parent_srl" />
<param name="title" target="category_title" />
<param name="color" target="category_color" />
<param name="expand" target="expand" />
<param name="group_srls" target="group_srls" />
</parameter>

View file

@ -16,10 +16,19 @@ function Tree(url){
var text = jQuery(this).attr("text");
var node_srl = jQuery(this).attr("node_srl");
var parent_srl = jQuery(this).attr("parent_srl");
var color = jQuery(this).attr("color");
var url = jQuery(this).attr("url");
// node
var node = jQuery('<li id="tree_'+node_srl+'"><span>'+text+'</span></li>');
var node = '';
if(color){
node = jQuery('<li id="tree_'+node_srl+'"><span style="color:'+color+';">'+text+'</span></li>');
}else{
node = jQuery('<li id="tree_'+node_srl+'"><span>'+text+'</span></li>');
}
// button
jQuery('<a href="#" class="add"><img src="./common/tpl/images/tree/iconAdd.gif" /></a>').bind("click",function(e){

View file

@ -1,6 +1,6 @@
<?php
/**
* @class document
* @class document
* @author zero (zero@nzeo.com)
* @brief document 모듈의 high 클래스
**/
@ -85,7 +85,7 @@
// 2007. 11. 20 게시글에 module_srl + is_notice 복합인덱스 만들기
if(!$oDB->isIndexExists("documents","idx_module_notice")) return true;
// 2008. 02. 18 게시글에 module_srl + document_srl 복합인덱스 만들기 (manian님 확인)
if(!$oDB->isIndexExists("documents","idx_module_document_srl")) return true;
@ -94,10 +94,14 @@
**/
if(!$oDB->isColumnExists("documents","extra_vars")) return true;
// 2008. 04. 23 blamed count 컬럼 추가
if(!$oDB->isColumnExists("documents", "blamed_count")) return true;
// 2008. 04. 23 blamed count 컬럼 추가
if(!$oDB->isColumnExists("documents", "blamed_count")) return true;
if(!$oDB->isIndexExists("documents","idx_module_blamed_count")) return true;
if(!$oDB->isColumnExists("document_voted_log", "point")) return true;
if(!$oDB->isColumnExists("document_voted_log", "point")) return true;
// 2008-12-15 문서 분류에 color를 추가
if(!$oDB->isColumnExists("document_categories", "color")) return true;
return false;
}
@ -149,19 +153,19 @@
/**
* 2007. 10. 11 : 관리자 페이지의 기본 설정 Action 추가, 게시글 관리 action 추가
**/
if(!$oModuleModel->getActionForward('dispDocumentAdminConfig'))
if(!$oModuleModel->getActionForward('dispDocumentAdminConfig'))
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminConfig');
if(!$oModuleModel->getActionForward('dispDocumentAdminManageDocument'))
if(!$oModuleModel->getActionForward('dispDocumentAdminManageDocument'))
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminManageDocument');
// 2007. 10. 17 모듈이 삭제될때 등록된 글도 모두 삭제하는 트리거 추가
if(!$oModuleModel->getTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after'))
if(!$oModuleModel->getTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after'))
$oModuleController->insertTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after');
/**
* 2007. 10. 18 : 관리자 페이지의 신고된 목록 보기 action 추가
**/
if(!$oModuleModel->getActionForward('dispDocumentAdminDeclared'))
if(!$oModuleModel->getActionForward('dispDocumentAdminDeclared'))
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminDeclared');
// 2007. 10. 25 문서 분류에 parent_srl, expand를 추가
@ -184,7 +188,7 @@
// 2008. 04. 23 blamed count 컬럼 추가
if(!$oDB->isColumnExists("documents", "blamed_count")) {
$oDB->addColumn('documents', 'blamed_count', 'number', 11, 0, true);
$oDB->addColumn('documents', 'blamed_count', 'number', 11, 0, true);
$oDB->addIndex('documents', 'idx_blamed_count', array('blamed_count'));
}
@ -192,10 +196,15 @@
$oDB->addIndex('documents', 'idx_module_blamed_count', array('module_srl', 'blamed_count'));
}
if(!$oDB->isColumnExists("document_voted_log", "point"))
$oDB->addColumn('document_voted_log', 'point', 'number', 11, 0, true);
return new Object(0,'success_updated');
}
if(!$oDB->isColumnExists("document_voted_log", "point"))
$oDB->addColumn('document_voted_log', 'point', 'number', 11, 0, true);
if(!$oDB->isColumnExists("document_categories","color")) $oDB->addColumn('document_categories',"color","char",7);
return new Object(0,'success_updated');
}
/**
* @brief 캐시 파일 재생성

View file

@ -880,12 +880,13 @@
$mid = $node->mid;
$module_srl = $node->module_srl;
$parent_srl = $node->parent_srl;
$color = $node->color;
// node->group_srls값이 있으면
if($group_srls) $group_check_code = sprintf('($is_admin==true||(is_array($group_srls)&&count(array_intersect($group_srls, array(%s)))))',$group_srls);
else $group_check_code = "true";
$attribute = sprintf(
'mid="%s" module_srl="%d" node_srl="%d" parent_srl="%d" category_srl="%d" text="<?php echo (%s?"%s":"")?>" url="%s" expand="%s" document_count="%d" ',
'mid="%s" module_srl="%d" node_srl="%d" parent_srl="%d" category_srl="%d" text="<?php echo (%s?"%s":"")?>" url="%s" expand="%s" color="%s" document_count="%d" ',
$mid,
$module_srl,
$category_srl,
@ -895,6 +896,7 @@
$title,
getUrl('','mid',$node->mid,'category',$category_srl),
$expand,
$color,
$node->document_count
);
@ -939,7 +941,7 @@
// 속성을 생성한다 ( category_srl_list를 이용해서 선택된 메뉴의 노드에 속하는지를 검사한다. 꽁수지만 빠르고 강력하다고 생각;;)
$attribute = sprintf(
'"mid" => "%s", "module_srl" => "%d","node_srl"=>"%s","category_srl"=>"%s","parent_srl"=>"%s","text"=>$_category_title[%d],"selected"=>(in_array(Context::get("category"),array(%s))?1:0),"expand"=>"%s", "list"=>array(%s),"document_count"=>"%d","grant"=>%s?true:false',
'"mid" => "%s", "module_srl" => "%d","node_srl"=>"%s","category_srl"=>"%s","parent_srl"=>"%s","text"=>$_category_title[%d],"selected"=>(in_array(Context::get("category"),array(%s))?1:0),"expand"=>"%s","color"=>"%s", "list"=>array(%s),"document_count"=>"%d","grant"=>%s?true:false',
$node->mid,
$node->module_srl,
$node->category_srl,
@ -948,6 +950,7 @@
$node->category_srl,
$selected,
$expand,
$node->color,
$child_buff,
$node->document_count,
$group_check_code

View file

@ -513,7 +513,6 @@
$this->_arrangeCategory($document_category, $menu->list, 0);
$this->category_list[$module_srl] = $document_category;
}
return $this->category_list[$module_srl];
}
@ -532,6 +531,7 @@
$obj->parent_srl = $val['parent_srl'];
$obj->title = $obj->text = $val['text'];
$obj->expand = $val['expand']=='Y'?true:false;
$obj->color = $val['color'];
$obj->document_count = $val['document_count'];
$obj->depth = $depth;
$obj->child_count = 0;

View file

@ -13,5 +13,6 @@
<column name="group_srls" var="group_srls" />
<column name="last_update" var="last_update" default="curdate()" />
<column name="list_order" var="list_order" default="0" />
<column name="color" var="color" />
</columns>
</query>

View file

@ -9,6 +9,7 @@
<column name="expand" var="expand" />
<column name="parent_srl" var="parent_srl" filter="number" />
<column name="group_srls" var="group_srls" />
<column name="color" var="color" />
</columns>
<conditions>
<condition operation="equal" column="category_srl" var="category_srl" filter="number" notnull="notnull" />