mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-27 23:29:57 +09:00
게시글의 카테고리를 다중 depth를 지원하게 하고 게시판 모듈에서 이 다중 depth를 적용하도록 기본 스킨 수정. 게시글 분류 위젯 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3549 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
e539a5e8a2
commit
3a12a24a1f
38 changed files with 475 additions and 112 deletions
32
widgets/category/skins/default/js/category.js
Normal file
32
widgets/category/skins/default/js/category.js
Normal 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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue