게시글의 카테고리를 다중 depth를 지원하게 하고 게시판 모듈에서 이 다중 depth를 적용하도록 기본 스킨 수정. 게시글 분류 위젯 추가

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3549 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-01-21 08:11:13 +00:00
parent e539a5e8a2
commit 3a12a24a1f
38 changed files with 475 additions and 112 deletions

View file

@ -0,0 +1,58 @@
<!--%import("css/category.css")-->
<!--%import("js/category.js")-->
<div class="categoryWidget">
<div class="top <!--@if($mid == $widget_info->mid && !$category)-->selected<!--@end-->"><a href="{getUrl('','mid',$widget_info->mid)}">{$widget_info->module_info->browser_title}</a> <strong>[{$widget_info->total_document_count}]</strong></div>
{@ $prev_depth = 0}
{@ $prev_last = false}
{@ $prev_srl = 0}
{@ $prev_expand = false}
<!--@foreach($widget_info->category_list as $key => $val)-->
<!--@if($val->last)-->
<!--@if($val->child_count)-->
<!--@if(!$val->expand)-->{@ $class = "plusBottom" }<!--@else-->{@ $class = "minusBottom" }<!--@end-->
<!--@else-->
{@ $class = "joinBottom" }
<!--@end-->
<!--@elseif($val->first)-->
<!--@if($val->child_count)-->
<!--@if(!$val->expand)-->{@ $class = "plus" }<!--@else-->{@ $class = "minus" }<!--@end-->
<!--@else-->
{@ $class = "join" }
<!--@end-->
<!--@else-->
<!--@if($val->child_count)-->
<!--@if(!$val->expand)-->{@ $class = "plus" }<!--@else-->{@ $class = "minus" }<!--@end-->
<!--@else-->
{@ $class = "join" }
<!--@end-->
<!--@end-->
<!--@if($prev_depth < $val->depth)-->
{@ $prev_depth = $val->depth }
<div class="<!--@if(!$prev_last)-->child<!--@else-->childBottom<!--@end-->" id="category_{$prev_srl}" <!--@if(!$prev_expand)-->style="display:none;"<!--@end-->>
<!--@elseif($prev_depth > $val->depth)-->
<!--@for($i=$val->depth;$i<$prev_depth;$i++)--></div><!--@end-->
{@ $prev_depth = $val->depth }
<!--@end-->
<div class="{$class}" id="category_parent_{$val->category_srl}">
<div class="item <!--@if($val->selected)-->selected<!--@end-->">
<a href="{getUrl('','mid',$widget_info->mid, 'category',$val->category_srl)}">{$val->text}</a>
<!--@if($val->document_count)--><strong>[{$val->document_count}]</strong><!--@end-->
</div>
</div>
{@ $prev_last = $val->last}
{@ $prev_srl = $val->category_srl}
{@ $prev_expand = $val->expand}
<!--@end-->
<!--@for($i=0;$i<$prev_depth;$i++)--></div><!--@end-->
</div>

View file

@ -0,0 +1,80 @@
@charset "utf-8";
.categoryWidget .top {
background:url("../images/top.gif") no-repeat left -1px;
padding-left:14px;
height:18px;
}
.categoryWidget a {
text-decoration:none;
color:#555555;
padding:0 2px 0 2px;
}
.categoryWidget a:hover {
text-decoration:underline;
}
.categoryWidget strong {
font-weight:normal;
color:#DF7901;
font-size:7pt;
font-family:tahoma;
}
.categoryWidget .selected a {
background-color:#0A246A;
color:#FFFFFF;
}
.categoryWidget .item {
background:url("../images/page.gif") no-repeat left 2px;
padding-left:13px;
height:18px;
}
.categoryWidget .child {
background:url("../images/line.gif") repeat-y left top;
padding-left:16px;
}
.categoryWidget .childBottom {
background:none;
padding-left:16px;
}
.categoryWidget .plus {
background:url("../images/plus.gif") no-repeat left top;
padding-left:16px;
cursor:pointer;
}
.categoryWidget .plusBottom {
background:url("../images/plusbottom.gif") no-repeat left top;
padding-left:16px;
cursor:pointer;
}
.categoryWidget .minus {
background:url("../images/minus.gif") no-repeat left top;
padding-left:16px;
cursor:pointer;
}
.categoryWidget .minusBottom {
background:url("../images/minusbottom.gif") no-repeat left top;
padding-left:16px;
cursor:pointer;
}
.categoryWidget .joinBottom {
background:url("../images/joinbottom.gif") no-repeat left top;
padding-left:16px;
}
.categoryWidget .join{
background:url("../images/join.gif") no-repeat left top;
padding-left:16px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 B

View file

@ -0,0 +1,32 @@
function toggleCategory(evt) {
var e = new xEvent(evt);
var obj = e.target;
var srl = null;
if(obj.nodeName != 'DIV') return;
if(obj.id && /^category_parent_/.test(obj.id)) {
srl = obj.id.replace(/^category_parent_/,'');
} else if(obj.id && /^category_/.test(obj.id)) {
srl = obj.id.replace(/^category_parent_/,'');
} else if(obj.className && /item/.test(obj.className)) {
var pObj = obj.parentNode;
srl = pObj.id.replace(/^category_parent_/,'');
}
if(!srl) return;
var obj = xGetElementById("category_"+srl);
if(!obj) return;
var selObj = xGetElementById("category_parent_"+srl);
if(!selObj) return;
if(!obj.style.display || obj.style.display == 'block') {
obj.style.display = 'none';
selObj.className = selObj.className.replace('minus','plus');
} else {
obj.style.display = 'block';
selObj.className = selObj.className.replace('plus','minus');
}
}
xAddEventListener(document, 'click', toggleCategory);

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<skin>
<title xml:lang="ko">분류 출력 기본 스킨</title>
<maker email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
<name xml:lang="ko">제로</name>
<description xml:lang="ko">게시글 분류를 출력하는 기본 스킨입니다</description>
</maker>
<colorset>
<color name="normal">
<title xml:lang="ko">기본 컬러</title>
</color>
</colorset>
</skin>