css 및 js 호출순서 조정기능 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5785 201d5d3c-b55e-5fd7-737f-ddc643e51545
|
|
@ -1,58 +1,44 @@
|
|||
<!--%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}
|
||||
|
||||
<!--@if($colorset == "black")-->
|
||||
<!--%import("./css/black.css")-->
|
||||
<!--@elseif($colorset == "white" || $colorset == "normal")-->
|
||||
<!--%import("./css/white.css")-->
|
||||
<!--@end-->
|
||||
|
||||
<!--@for($i=0;$i<$prev_depth;$i++)--></div><!--@end-->
|
||||
{@ $_pDepth = 0;}
|
||||
|
||||
<div class="widgetContainer">
|
||||
<div class="widgetTree">
|
||||
<a href="{getSiteUrl($widget_info->domain,'','mid',$widget_info->module_info->mid)}" class="title">{$widget_info->module_info->browser_title}</a> <span>({$widget_info->total_document_count})</span>
|
||||
<ul>
|
||||
<!--@foreach($widget_info->category_list as $key => $val)-->
|
||||
<!--@if($_pDepth > $val->depth)-->
|
||||
<!--@for($i=$val->depth; $i<$_pDepth; $i++)-->
|
||||
</li>
|
||||
</ul>
|
||||
<!--@end-->
|
||||
{@ $_pDepth = $val->depth}
|
||||
<!--@end-->
|
||||
|
||||
<li class="<!--@if($val->last)-->nav_tree_last<!--@end--> <!--@if($val->expand)-->nav_tree_on<!--@else-->nav_tree_off<!--@end-->" id="category_parent_{$val->category_srl}">
|
||||
<!--@if($val->child_count)-->
|
||||
<!--@if($val->expand)-->
|
||||
<button type="button" class="category_{$val->category_srl}">+</button>
|
||||
<!--@else-->
|
||||
<button type="button" class="category_{$val->category_srl}">-</button>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
<a href="{getSiteUrl($widget_info->domain, '','mid',$widget_info->module_info->mid, 'category',$val->category_srl)}" class="nav_tree_label <!--@if($val->selected)-->selected<!--@end-->">{$val->text}</a>
|
||||
<!--@if($val->document_count)--><span>({$val->document_count})</span><!--@end-->
|
||||
|
||||
<!--@if($val->child_count)-->
|
||||
{@$_pDepth++}
|
||||
<ul>
|
||||
<!--@else-->
|
||||
</li>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
36
widgets/category/skins/default/css/black.css
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
@charset "utf-8";
|
||||
|
||||
/* Widget Tree */
|
||||
.widgetTree { margin-top:10px;}
|
||||
.widgetTree a.title { background:url(../img/black/folder.gif) no-repeat left top; padding-left:20px;}
|
||||
.widgetTree span { font-size:9px; font-family:tahoma; padding:0; margin:0; color:#333;}
|
||||
.widgetTree ul span { margin-left:15px; }
|
||||
.widgetTree *{ margin:0; padding:0; font-size:12px;}
|
||||
.widgetTree a strong{ letter-spacing:-1px; cursor:pointer; _cursor /**/:hand;}
|
||||
.widgetTree ul{ position:relative; display:block; padding:3px 0 0 0 !important; zoom:1; margin-left:8px;}
|
||||
.widgetTree ul li{ list-style:none; position:relative; padding:3px 0 2px 8px; white-space:nowrap;}
|
||||
.widgetTree ul li a,
|
||||
.widgetTree ul li span.nav_tree_label{ position:relative; left:16px; _left /**/:0; top:0;}
|
||||
.widgetTree ul li a {text-decoration:none; }
|
||||
.widgetTree ul li a.selected {font-weight:bold;}
|
||||
.widgetTree ul li button{ display:inline-block; position:relative; _left /**/:-16px; *top:-2px; width:13px; height:13px; *width:17px; *height:17px; margin:0 -13px 0 0; *margin:0 -17px -2px -2px; text-indent:-10000px; *text-indent:0; *font:0/0 Sans-serif; border:none; cursor:pointer; _cursor /**/:hand;}
|
||||
.widgetTree ul li ul{ display:none; padding:2px 0 0 0 !important; margin:0 0 -2px 6px; background-position:left top;}
|
||||
.widgetTree ul li ul li{ display:none;}
|
||||
.widgetTree ul li.nav_tree_on button{ background-position:0 -13px; *background-position:2px -11px;}
|
||||
.widgetTree ul li.nav_tree_off button{ background-position:0 0; *background-position:2px 2px;}
|
||||
.widgetTree ul li.nav_tree_on ul{ display:block;}
|
||||
.widgetTree ul li.nav_tree_on ul li{ display:block;}
|
||||
.widgetTree ul li.nav_tree_off ul{ display:none;}
|
||||
.widgetTree ul li.nav_tree_off ul li{ display:none;}
|
||||
.widgetTree .icon{ position:relative; left:16px;}
|
||||
|
||||
/* widgetTree */
|
||||
.widgetTree{ color:#999;}
|
||||
.widgetTree a { color:#999; text-decoration:none;}
|
||||
|
||||
/* Widget Tree */
|
||||
.widgetTree ul{ background:url(../img/black/lineTreeVr.gif) repeat-y 0 -1px;}
|
||||
.widgetTree ul li{ background:url(../img/black/lineTreeHr.gif) no-repeat 1px 5px !important;}
|
||||
.widgetTree ul li button{ background:url(../img/black/buttonTreeCollapse.gif) no-repeat;}
|
||||
.widgetTree ul li.nav_tree_last{ background:url(../img/black/lineTreeLastHr.gif) no-repeat 0 5px !important;}
|
||||
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
@charset "utf-8";
|
||||
|
||||
.categoryWidget .top {
|
||||
background:url("../images/top.gif") no-repeat left -1px;
|
||||
padding-left:19px;
|
||||
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 {
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
.categoryWidget .item {
|
||||
margin-left:5px;
|
||||
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;
|
||||
}
|
||||
36
widgets/category/skins/default/css/white.css
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
@charset "utf-8";
|
||||
|
||||
/* Widget Tree */
|
||||
.widgetTree { margin-top:10px;}
|
||||
.widgetTree a.title { background:url(../img/white/folder.gif) no-repeat left top; padding-left:20px;}
|
||||
.widgetTree span { font-size:9px; font-family:tahoma; padding:0; margin:0; color:#999;}
|
||||
.widgetTree ul span { margin-left:15px; }
|
||||
.widgetTree *{ margin:0; padding:0; font-size:12px;}
|
||||
.widgetTree a strong{ letter-spacing:-1px; cursor:pointer; _cursor /**/:hand;}
|
||||
.widgetTree ul{ position:relative; display:block; padding:3px 0 0 0 !important; zoom:1; margin-left:8px;}
|
||||
.widgetTree ul li{ list-style:none; position:relative; padding:3px 0 2px 8px; white-space:nowrap;}
|
||||
.widgetTree ul li a,
|
||||
.widgetTree ul li span.nav_tree_label{ position:relative; left:16px; _left /**/:0; top:0;}
|
||||
.widgetTree ul li a {text-decoration:none; }
|
||||
.widgetTree ul li a.selected {font-weight:bold;}
|
||||
.widgetTree ul li button{ display:inline-block; position:relative; _left /**/:-16px; *top:-2px; width:13px; height:13px; *width:17px; *height:17px; margin:0 -13px 0 0; *margin:0 -17px -2px -2px; text-indent:-10000px; *text-indent:0; *font:0/0 Sans-serif; border:none; cursor:pointer; _cursor /**/:hand;}
|
||||
.widgetTree ul li ul{ display:none; padding:2px 0 0 0 !important; margin:0 0 -2px 6px; background-position:left top;}
|
||||
.widgetTree ul li ul li{ display:none;}
|
||||
.widgetTree ul li.nav_tree_on button{ background-position:0 -13px; *background-position:2px -11px;}
|
||||
.widgetTree ul li.nav_tree_off button{ background-position:0 0; *background-position:2px 2px;}
|
||||
.widgetTree ul li.nav_tree_on ul{ display:block;}
|
||||
.widgetTree ul li.nav_tree_on ul li{ display:block;}
|
||||
.widgetTree ul li.nav_tree_off ul{ display:none;}
|
||||
.widgetTree ul li.nav_tree_off ul li{ display:none;}
|
||||
.widgetTree .icon{ position:relative; left:16px;}
|
||||
|
||||
/* widgetTree */
|
||||
.widgetTree{ color:#333;}
|
||||
.widgetTree a{ color:#333; text-decoration:none;}
|
||||
|
||||
/* Widget Tree */
|
||||
.widgetTree ul{ background:url(../img/white/lineTreeVr.gif) repeat-y 0 -1px;}
|
||||
.widgetTree ul li{ background:url(../img/white/lineTreeHr.gif) no-repeat 1px 5px !important;}
|
||||
.widgetTree ul li button{ background:url(../img/white/buttonTreeCollapse.gif) no-repeat;}
|
||||
.widgetTree ul li.nav_tree_last{ background:url(../img/white/lineTreeLastHr.gif) no-repeat 0 5px !important;}
|
||||
|
||||
BIN
widgets/category/skins/default/img/black/buttonTreeCollapse.gif
Executable file
|
After Width: | Height: | Size: 99 B |
BIN
widgets/category/skins/default/img/black/folder.gif
Executable file
|
After Width: | Height: | Size: 341 B |
BIN
widgets/category/skins/default/img/black/lineTreeHr.gif
Executable file
|
After Width: | Height: | Size: 57 B |
BIN
widgets/category/skins/default/img/black/lineTreeLastHr.gif
Executable file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
widgets/category/skins/default/img/black/lineTreeVr.gif
Executable file
|
After Width: | Height: | Size: 43 B |
BIN
widgets/category/skins/default/img/white/buttonTreeCollapse.gif
Executable file
|
After Width: | Height: | Size: 99 B |
BIN
widgets/category/skins/default/img/white/folder.gif
Executable file
|
After Width: | Height: | Size: 341 B |
BIN
widgets/category/skins/default/img/white/lineTreeHr.gif
Executable file
|
After Width: | Height: | Size: 57 B |
BIN
widgets/category/skins/default/img/white/lineTreeLastHr.gif
Executable file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
widgets/category/skins/default/img/white/lineTreeVr.gif
Executable file
|
After Width: | Height: | Size: 43 B |
|
|
@ -1,31 +1,21 @@
|
|||
function toggleCategory(evt) {
|
||||
var e = new xEvent(evt);
|
||||
var obj = e.target;
|
||||
var srl = null;
|
||||
if(obj.nodeName != 'DIV') return;
|
||||
if(obj.nodeName != 'BUTTON') 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_/,'');
|
||||
}
|
||||
var node_srl = obj.className.replace(/^category_/,'');
|
||||
if(!node_srl) return;
|
||||
|
||||
if(!srl) return;
|
||||
var obj = xGetElementById("category_"+srl);
|
||||
if(!obj) return;
|
||||
var li_obj = xGetElementById("category_parent_"+node_srl);
|
||||
if(!li_obj) return;
|
||||
var className = li_obj.className;
|
||||
|
||||
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');
|
||||
if(/nav_tree_off/.test(className)) {
|
||||
xInnerHtml(obj,'-');
|
||||
li_obj.className = className.replace(/nav_tree_off/,'nav_tree_on');
|
||||
} else {
|
||||
obj.style.display = 'block';
|
||||
selObj.className = selObj.className.replace('plus','minus');
|
||||
xInnerHtml(obj,'+');
|
||||
li_obj.className = className.replace(/nav_tree_on/,'nav_tree_off');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,12 +23,26 @@
|
|||
</author>
|
||||
|
||||
<colorset>
|
||||
<color name="normal">
|
||||
<title xml:lang="ko">기본 컬러</title>
|
||||
<title xml:lang="jp">デフォルトカラー</title>
|
||||
<title xml:lang="en">Default Color</title>
|
||||
<title xml:lang="zh-CN">默认颜色</title>
|
||||
<title xml:lang="zh-TW">預設顏色</title>
|
||||
<color name="layout">
|
||||
<title xml:lang="ko">레이아웃에 맞춤</title>
|
||||
<title xml:lang="jp">レイアウトに合わせる</title>
|
||||
<title xml:lang="zh-CN">随布局</title>
|
||||
<title xml:lang="en">레이아웃에 맞춤</title>
|
||||
<title xml:lang="zh-TW">隨版面</title>
|
||||
</color>
|
||||
<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="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="zh-CN">黑色</title>
|
||||
<title xml:lang="zh-TW">黑色</title>
|
||||
</color>
|
||||
</colorset>
|
||||
</skin>
|
||||
</skin>
|
||||
|
|
|
|||