게시글의 카테고리를 다중 depth를 지원하게 하고 게시판 모듈에서 이 다중 depth를 적용하도록 기본 스킨 수정. 게시글 분류 위젯 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3549 201d5d3c-b55e-5fd7-737f-ddc643e51545
|
|
@ -168,9 +168,10 @@ function move_url(url, open_wnidow) {
|
||||||
**/
|
**/
|
||||||
function toggleDisplay(obj, opt) {
|
function toggleDisplay(obj, opt) {
|
||||||
obj = xGetElementById(obj);
|
obj = xGetElementById(obj);
|
||||||
|
if(!obj) return;
|
||||||
if(typeof(opt)=="undefined") opt = "inline";
|
if(typeof(opt)=="undefined") opt = "inline";
|
||||||
if(obj.style.display == "none") obj.style.display = opt;
|
if(!obj.style.display || obj.style.display == "block") obj.style.display = 'none';
|
||||||
else obj.style.display = "none";
|
else obj.style.display = opt;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -236,12 +236,7 @@
|
||||||
if($category->group_srls) {
|
if($category->group_srls) {
|
||||||
$category_group_srls = explode(',',$category->group_srls);
|
$category_group_srls = explode(',',$category->group_srls);
|
||||||
$is_granted = false;
|
$is_granted = false;
|
||||||
for($i=0;$i<$group_srls_count;$i++) {
|
if(count(array_intersect($group_srls, $category_group_srls))) $is_granted = true;
|
||||||
if(in_array($group_srls[$i],$category_group_srls)) {
|
|
||||||
$is_granted = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if($is_granted) $category_list[$category_srl] = $category;
|
if($is_granted) $category_list[$category_srl] = $category;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
<select name="category" id="board_category">
|
<select name="category" id="board_category">
|
||||||
<option value="">{$lang->category}</option>
|
<option value="">{$lang->category}</option>
|
||||||
<!--@foreach($category_list as $val)-->
|
<!--@foreach($category_list as $val)-->
|
||||||
<option value="{$val->category_srl}" <!--@if($category==$val->category_srl)-->selected="selected"<!--@end-->>{$val->title} <!--@if($val->document_count)-->({$val->document_count})<!--@end--></option>
|
<option value="{$val->category_srl}" <!--@if($category==$val->category_srl)-->selected="selected"<!--@end-->>{str_repeat(" ",$val->depth)} {$val->title} <!--@if($val->document_count)-->({$val->document_count})<!--@end--></option>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</select>
|
</select>
|
||||||
<input type="button" name="go_button" id="go_button" value="GO" onclick="doChangeCategory(); return false;" class="buttonTypeGo" />
|
<input type="button" name="go_button" id="go_button" value="GO" onclick="doChangeCategory(); return false;" class="buttonTypeGo" />
|
||||||
|
|
|
||||||
|
|
@ -19,12 +19,14 @@
|
||||||
<!--@if($module_info->display_number!='N')--><th scope="col" > </th><!--@end-->
|
<!--@if($module_info->display_number!='N')--><th scope="col" > </th><!--@end-->
|
||||||
<!--@if($grant->is_admin)--><th scope="col"><input type="checkbox" onclick="clickCheckBoxAll(this.form, 'cart'); return false;" /></th><!--@end-->
|
<!--@if($grant->is_admin)--><th scope="col"><input type="checkbox" onclick="clickCheckBoxAll(this.form, 'cart'); return false;" /></th><!--@end-->
|
||||||
<!--@if($module_info->use_category == "Y")-->
|
<!--@if($module_info->use_category == "Y")-->
|
||||||
<th class="category"><select name="select" id="board_category" class="w100">
|
<th class="category">
|
||||||
|
<select name="category" id="board_category" class="w100">
|
||||||
<option value="">{$lang->category}</option>
|
<option value="">{$lang->category}</option>
|
||||||
<!--@foreach($category_list as $val)-->
|
<!--@foreach($category_list as $val)-->
|
||||||
<option value="{$val->category_srl}" <!--@if($category==$val->category_srl)-->selected="selected"<!--@end-->>{$val->title} <!--@if($val->document_count)-->({$val->document_count})<!--@end--></option>
|
<option value="{$val->category_srl}" <!--@if($category==$val->category_srl)-->selected="selected"<!--@end-->>{str_repeat(" ",$val->depth)} {$val->title} <!--@if($val->document_count)-->({$val->document_count})<!--@end--></option>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</select><input type="button" name="go_button" id= "go_button" value="GO" onclick="doChangeCategory(); return false;" class="buttonTypeGo" /></th>
|
</select>
|
||||||
|
<input type="button" name="go_button" id= "go_button" value="GO" onclick="doChangeCategory(); return false;" class="buttonTypeGo" /></th>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
<th scope="col" class="title"><img src="./images/common/txt_title.gif" alt="{$lang->title}" /></th>
|
<th scope="col" class="title"><img src="./images/common/txt_title.gif" alt="{$lang->title}" /></th>
|
||||||
<!--@if($module_info->display_author!='N')--><th scope="col" class="author"><img src="./images/common/txt_name.gif" alt="{$lang->nick_name}" /></th><!--@end-->
|
<!--@if($module_info->display_author!='N')--><th scope="col" class="author"><img src="./images/common/txt_name.gif" alt="{$lang->nick_name}" /></th><!--@end-->
|
||||||
|
|
|
||||||
|
|
@ -19,12 +19,14 @@
|
||||||
<!--@if($module_info->display_number!='N')--><th> </th><!--@end-->
|
<!--@if($module_info->display_number!='N')--><th> </th><!--@end-->
|
||||||
<!--@if($grant->is_admin)--><th scope="col" ><input type="checkbox" onclick="clickCheckBoxAll(this.form, 'cart'); return false;" /></th><!--@end-->
|
<!--@if($grant->is_admin)--><th scope="col" ><input type="checkbox" onclick="clickCheckBoxAll(this.form, 'cart'); return false;" /></th><!--@end-->
|
||||||
<!--@if($module_info->use_category == "Y")-->
|
<!--@if($module_info->use_category == "Y")-->
|
||||||
<th><select name="select" id="board_category">
|
<th>
|
||||||
<option value="">{$lang->category}</option>
|
<select name="category" id="board_category" class="w100">
|
||||||
|
<option value="">{$lang->category}</option>
|
||||||
<!--@foreach($category_list as $val)-->
|
<!--@foreach($category_list as $val)-->
|
||||||
<option value="{$val->category_srl}" <!--@if($category==$val->category_srl)-->selected="selected"<!--@end-->>{$val->title} <!--@if($val->document_count)-->({$val->document_count})<!--@end--></option>
|
<option value="{$val->category_srl}" <!--@if($category==$val->category_srl)-->selected="selected"<!--@end-->>{str_repeat(" ",$val->depth)} {$val->title} <!--@if($val->document_count)-->({$val->document_count})<!--@end--></option>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</select><input type="button" name="go_button" id= "go_button" value="GO" onclick="doChangeCategory(); return false;" class="buttonTypeGo" /></th>
|
</select>
|
||||||
|
<input type="button" name="go_button" id= "go_button" value="GO" onclick="doChangeCategory(); return false;" class="buttonTypeGo" /></th>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
<th scope="col" colspan="2" class="title"><img src="./images/common/txt_title.gif" alt="{$lang->title}" /></th>
|
<th scope="col" colspan="2" class="title"><img src="./images/common/txt_title.gif" alt="{$lang->title}" /></th>
|
||||||
<!--@if($module_info->display_author!='N')--><th scope="col" class="author"><img src="./images/common/txt_name.gif" alt="{$lang->nick_name}" /></th><!--@end-->
|
<!--@if($module_info->display_author!='N')--><th scope="col" class="author"><img src="./images/common/txt_name.gif" alt="{$lang->nick_name}" /></th><!--@end-->
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,9 @@
|
||||||
<select name="category_srl" >
|
<select name="category_srl" >
|
||||||
<option value="">{$lang->category}</option>
|
<option value="">{$lang->category}</option>
|
||||||
<!--@foreach($category_list as $val)-->
|
<!--@foreach($category_list as $val)-->
|
||||||
<option value="{$val->category_srl}" <!--@if($category==$val->category_srl||$val->category_srl==$oDocument->get('category_srl'))-->selected="selected"<!--@end-->>{$val->title} <!--@if($val->document_count)-->({$val->document_count})<!--@end--></option>
|
<option <!--@if(!$val->grant)-->disabled="disabled"<!--@end--> value="{$val->category_srl}" <!--@if($val->grant&&$val->selected||$val->category_srl==$oDocument->get('category_srl'))-->selected="selected"<!--@end-->>
|
||||||
|
{str_repeat(" ",$val->depth)} {$val->title} ({$val->document_count})
|
||||||
|
</option>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</select>
|
</select>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
|
||||||
|
|
@ -257,20 +257,22 @@ Jeong, Chan Myeong 070601~070630
|
||||||
.boardWrite .userNameAndPw .emailAddress {width:80px; margin-right:10px; }
|
.boardWrite .userNameAndPw .emailAddress {width:80px; margin-right:10px; }
|
||||||
.boardWrite .userNameAndPw .homePage {width:80px; margin-right:10px; }
|
.boardWrite .userNameAndPw .homePage {width:80px; margin-right:10px; }
|
||||||
|
|
||||||
.boardWrite .title { margin-left:10px; margin-top:5px; }
|
.boardWrite .title { margin-top:5px; }
|
||||||
|
.boardWrite .title .category { margin-left:10px; }
|
||||||
|
.boardWrite .title label.title { margin:0 10px 0 10px; }
|
||||||
.boardWrite .title input.title { width:60%;}
|
.boardWrite .title input.title { width:60%;}
|
||||||
|
|
||||||
.boardWrite dl.option { margin:3px 0 3px 10px; padding:0;}
|
.boardWrite dl.option { margin:10px 0 3px 10px; padding:0;}
|
||||||
.boardWrite dl.option dd { display:inline; margin-right:11px; }
|
.boardWrite dl.option dd { display:inline; margin-right:5px; }
|
||||||
.boardWrite dl.option dd * { vertical-align:middle;}
|
.boardWrite dl.option dd * { vertical-align:middle;}
|
||||||
.boardWrite dl.option dd select { width:8em; font-size:.95em; }
|
.boardWrite dl.option dd select { width:8em; font-size:.95em; }
|
||||||
|
|
||||||
.boardWrite .editor { border-top:1px solid #e0e1db; margin-top:10px;}
|
.boardWrite .editor { border-top:1px solid #e0e1db; margin-top:10px;}
|
||||||
|
|
||||||
.boardWrite .tag { margin-left:10px; }
|
.boardWrite .tag { margin-top:10px; margin-left:10px; }
|
||||||
.boardWrite .tag .inputTypeText { width:90%; background:#FFFFFF url(../images/common/iconTag.gif) no-repeat 5px 5px; padding-left:30px;}
|
.boardWrite .tag .inputTypeText { width:90%; background:#FFFFFF url(../images/common/iconTag.gif) no-repeat 5px 5px; padding-left:30px;}
|
||||||
.boardWrite .tag .help { vertical-align:middle;}
|
.boardWrite .tag .help { vertical-align:middle;}
|
||||||
.boardWrite .tag .info { font-size:.9em; color:#999999; background:url(../images/common/iconArrowD8.gif) no-repeat left center;}
|
.boardWrite .tag .info { font-size:.9em; color:#999999; background:url(../images/common/iconArrowD8.gif) no-repeat left center; margin-top:5px;}
|
||||||
|
|
||||||
.boardWrite .extraVarsList { width:100%; border-top:1px solid #e0e1db; border-bottom:none; margin:10px 0 10px 0; table-layout:fixed;}
|
.boardWrite .extraVarsList { width:100%; border-top:1px solid #e0e1db; border-bottom:none; margin:10px 0 10px 0; table-layout:fixed;}
|
||||||
.boardWrite .extraVarsList th { font-weight:normal; color:#555555; text-align:left; padding:4px 0 4px 10px; border-bottom:1px solid #e0e1db; border-right:1px solid #e0e1db;}
|
.boardWrite .extraVarsList th { font-weight:normal; color:#555555; text-align:left; padding:4px 0 4px 10px; border-bottom:1px solid #e0e1db; border-right:1px solid #e0e1db;}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
<select name="category" id="board_category">
|
<select name="category" id="board_category">
|
||||||
<option value="">{$lang->category}</option>
|
<option value="">{$lang->category}</option>
|
||||||
<!--@foreach($category_list as $val)-->
|
<!--@foreach($category_list as $val)-->
|
||||||
<option value="{$val->category_srl}" <!--@if($category==$val->category_srl)-->selected="selected"<!--@end-->>{$val->title} <!--@if($val->document_count)-->({$val->document_count})<!--@end--></option>
|
<option value="{$val->category_srl}" <!--@if($category==$val->category_srl)-->selected="selected"<!--@end-->>{str_repeat(" ",$val->depth)} {$val->title} <!--@if($val->document_count)-->({$val->document_count})<!--@end--></option>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
<select name="category" id="board_category">
|
<select name="category" id="board_category">
|
||||||
<option value="">{$lang->category}</option>
|
<option value="">{$lang->category}</option>
|
||||||
<!--@foreach($category_list as $val)-->
|
<!--@foreach($category_list as $val)-->
|
||||||
<option value="{$val->category_srl}" <!--@if($category==$val->category_srl)-->selected="selected"<!--@end-->>{$val->title} <!--@if($val->document_count)-->({$val->document_count})<!--@end--></option>
|
<option value="{$val->category_srl}" <!--@if($category==$val->category_srl)-->selected="selected"<!--@end-->>{str_repeat(" ",$val->depth)} {$val->title} <!--@if($val->document_count)-->({$val->document_count})<!--@end--></option>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</select>
|
</select>
|
||||||
<input type="button" name="go_button" id="go_button" value="GO" onclick="doChangeCategory(); return false;" class="buttonTypeGo" />
|
<input type="button" name="go_button" id="go_button" value="GO" onclick="doChangeCategory(); return false;" class="buttonTypeGo" />
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
<select name="category" id="board_category">
|
<select name="category" id="board_category">
|
||||||
<option value="">{$lang->category}</option>
|
<option value="">{$lang->category}</option>
|
||||||
<!--@foreach($category_list as $val)-->
|
<!--@foreach($category_list as $val)-->
|
||||||
<option value="{$val->category_srl}" <!--@if($category==$val->category_srl)-->selected="selected"<!--@end-->>{$val->title} <!--@if($val->document_count)-->({$val->document_count})<!--@end--></option>
|
<option value="{$val->category_srl}" <!--@if($category==$val->category_srl)-->selected="selected"<!--@end-->>{str_repeat(" ",$val->depth)} {$val->title} <!--@if($val->document_count)-->({$val->document_count})<!--@end--></option>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</select>
|
</select>
|
||||||
<input type="button" name="go_button" id="go_button" value="GO" onclick="doChangeCategory(); return false;" class="buttonTypeGo" />
|
<input type="button" name="go_button" id="go_button" value="GO" onclick="doChangeCategory(); return false;" class="buttonTypeGo" />
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
<select name="category" id="board_category">
|
<select name="category" id="board_category">
|
||||||
<option value="" >{$lang->category}</option>
|
<option value="" >{$lang->category}</option>
|
||||||
<!--@foreach($category_list as $val)-->
|
<!--@foreach($category_list as $val)-->
|
||||||
<option value="{$val->category_srl}" <!--@if($category==$val->category_srl)-->selected="selected"<!--@end-->>{$val->title} <!--@if($val->document_count)-->({$val->document_count})<!--@end--></option>
|
<option value="{$val->category_srl}" <!--@if($category==$val->category_srl)-->selected="selected"<!--@end-->>{str_repeat(" ",$val->depth)} {$val->title} <!--@if($val->document_count)-->({$val->document_count})<!--@end--></option>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</select>
|
</select>
|
||||||
<input type="button" name="go_button" id= "go_button" value="GO" onclick="doChangeCategory(); return false;" class="buttonTypeGo" />
|
<input type="button" name="go_button" id= "go_button" value="GO" onclick="doChangeCategory(); return false;" class="buttonTypeGo" />
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
<h4><a href="{$oDocument->getPermanentUrl()}">{$oDocument->getTitle()}</a></h4>
|
<h4><a href="{$oDocument->getPermanentUrl()}">{$oDocument->getTitle()}</a></h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!--@if($module_info->display_author!='N')-->
|
||||||
<div class="userInfo">
|
<div class="userInfo">
|
||||||
<!--@if(!$oDocument->getMemberSrl())-->
|
<!--@if(!$oDocument->getMemberSrl())-->
|
||||||
<div class="author">
|
<div class="author">
|
||||||
|
|
@ -21,6 +22,7 @@
|
||||||
<div class="author"><span class="member_{$oDocument->get('member_srl')}">{$oDocument->getNickName()}</span></div>
|
<div class="author"><span class="member_{$oDocument->get('member_srl')}">{$oDocument->getNickName()}</span></div>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</div>
|
</div>
|
||||||
|
<!--@end-->
|
||||||
|
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,12 +25,16 @@
|
||||||
|
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<!--@if($module_info->use_category=="Y")-->
|
<!--@if($module_info->use_category=="Y")-->
|
||||||
<select name="category_srl" >
|
<select name="category_srl" class="category">
|
||||||
<option value="">{$lang->category}</option>
|
<option value="">{$lang->category}</option>
|
||||||
<!--@foreach($category_list as $val)-->
|
<!--@foreach($category_list as $val)-->
|
||||||
<option value="{$val->category_srl}" <!--@if($category==$val->category_srl||$val->category_srl==$oDocument->get('category_srl'))-->selected="selected"<!--@end-->>{$val->title} <!--@if($val->document_count)-->({$val->document_count})<!--@end--></option>
|
<option <!--@if(!$val->grant)-->disabled="disabled"<!--@end--> value="{$val->category_srl}" <!--@if($val->grant&&$val->selected||$val->category_srl==$oDocument->get('category_srl'))-->selected="selected"<!--@end-->>
|
||||||
|
{str_repeat(" ",$val->depth)} {$val->title} ({$val->document_count})
|
||||||
|
</option>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</select>
|
</select>
|
||||||
|
<!--@else-->
|
||||||
|
<label class="title">{$lang->title}</label>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
<input type="text" name="title" class="title inputTypeText" value="{htmlspecialchars($oDocument->getTitleText())}" />
|
<input type="text" name="title" class="title inputTypeText" value="{htmlspecialchars($oDocument->getTitleText())}" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -730,7 +730,7 @@
|
||||||
**/
|
**/
|
||||||
function makeCategoryFile($module_srl) {
|
function makeCategoryFile($module_srl) {
|
||||||
// 캐시 파일 생성시 필요한 정보가 없으면 그냥 return
|
// 캐시 파일 생성시 필요한 정보가 없으면 그냥 return
|
||||||
if(!$module_srl) return;
|
if(!$module_srl) return false;
|
||||||
|
|
||||||
// 모듈 정보를 가져옴 (mid를 구하기 위해)
|
// 모듈 정보를 가져옴 (mid를 구하기 위해)
|
||||||
$oModuleModel = &getModel('module');
|
$oModuleModel = &getModel('module');
|
||||||
|
|
@ -743,9 +743,22 @@
|
||||||
$xml_file = sprintf("./files/cache/document_category/%s.xml.php", $module_srl);
|
$xml_file = sprintf("./files/cache/document_category/%s.xml.php", $module_srl);
|
||||||
$php_file = sprintf("./files/cache/document_category/%s.php", $module_srl);
|
$php_file = sprintf("./files/cache/document_category/%s.php", $module_srl);
|
||||||
|
|
||||||
// DB에서 module_srl 에 해당하는 카테고리 목록을 listorder순으로 구해옴
|
// 카테고리 목록을 구함
|
||||||
$oDocumentModel = &getModel('document');
|
$args->module_srl = $module_srl;
|
||||||
$list = $oDocumentModel->getCategoryList($module_srl);
|
$args->sort_index = 'list_order';
|
||||||
|
$output = executeQuery('document.getCategoryList', $args);
|
||||||
|
|
||||||
|
$category_list = $output->data;
|
||||||
|
|
||||||
|
if(!$category_list) return false;
|
||||||
|
if(!is_array($category_list)) $category_list = array($category_list);
|
||||||
|
|
||||||
|
$category_count = count($category_list);
|
||||||
|
for($i=0;$i<$category_count;$i++) {
|
||||||
|
$category_srl = $category_list[$i]->category_srl;
|
||||||
|
if(!preg_match('/^[0-9,]+$/', $category_list[$i]->group_srls)) $category_list[$i]->group_srls = '';
|
||||||
|
$list[$category_srl] = $category_list[$i];
|
||||||
|
}
|
||||||
|
|
||||||
// 구해온 데이터가 없다면 노드데이터가 없는 xml 파일만 생성
|
// 구해온 데이터가 없다면 노드데이터가 없는 xml 파일만 생성
|
||||||
if(!$list) {
|
if(!$list) {
|
||||||
|
|
@ -780,7 +793,7 @@
|
||||||
$xml_buff = sprintf('<?php %s header("Content-Type: text/xml; charset=UTF-8"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); @session_start(); ?><root>%s</root>', $php_script, $this->getXmlTree($tree[0], $tree));
|
$xml_buff = sprintf('<?php %s header("Content-Type: text/xml; charset=UTF-8"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); @session_start(); ?><root>%s</root>', $php_script, $this->getXmlTree($tree[0], $tree));
|
||||||
|
|
||||||
// php 캐시 파일 생성
|
// php 캐시 파일 생성
|
||||||
$php_output = $this->getPhpCacheCode($tree[0], $tree);
|
$php_output = $this->getPhpCacheCode($tree[0], $tree, 0);
|
||||||
$php_buff = sprintf('<?php if(!defined("__ZBXE__")) exit(); %s; $menu->list = array(%s); ?>', $php_output['category_title_str'], $php_output['buff']);
|
$php_buff = sprintf('<?php if(!defined("__ZBXE__")) exit(); %s; $menu->list = array(%s); ?>', $php_output['category_title_str'], $php_output['buff']);
|
||||||
|
|
||||||
// 파일 저장
|
// 파일 저장
|
||||||
|
|
@ -807,13 +820,18 @@
|
||||||
$title = str_replace(array('&','"','<','>'),array('&','"','<','>'),$node->title);
|
$title = str_replace(array('&','"','<','>'),array('&','"','<','>'),$node->title);
|
||||||
$expand = $node->expand;
|
$expand = $node->expand;
|
||||||
$group_srls = $node->group_srls;
|
$group_srls = $node->group_srls;
|
||||||
|
$mid = $node->mid;
|
||||||
|
$module_srl = $node->module_srl;
|
||||||
|
|
||||||
// node->group_srls값이 있으면
|
// node->group_srls값이 있으면
|
||||||
if($group_srls) $group_check_code = sprintf('($_SESSION["is_admin"]==true||(is_array($_SESSION["group_srls"])&&count(array_intersect($_SESSION["group_srls"], array(%s)))))',$group_srls);
|
if($group_srls) $group_check_code = sprintf('($_SESSION["is_admin"]==true||(is_array($_SESSION["group_srls"])&&count(array_intersect($_SESSION["group_srls"], array(%s)))))',$group_srls);
|
||||||
else $group_check_code = "true";
|
else $group_check_code = "true";
|
||||||
|
|
||||||
$attribute = sprintf(
|
$attribute = sprintf(
|
||||||
'node_srl="%s" text="<?php echo (%s?"%s":"")?>" url="%s" expand="%s" document_count="%d" ',
|
'mid="%s" module_srl="%d" node_srl="%d" category_srl = "%d" text="<?php echo (%s?"%s":"")?>" url="%s" expand="%s" document_count="%d" ',
|
||||||
|
$mid,
|
||||||
|
$module_srl,
|
||||||
|
$category_srl,
|
||||||
$category_srl,
|
$category_srl,
|
||||||
$group_check_code,
|
$group_check_code,
|
||||||
$title,
|
$title,
|
||||||
|
|
@ -838,7 +856,9 @@
|
||||||
$output = array("buff"=>"", "category_srl_list"=>array());
|
$output = array("buff"=>"", "category_srl_list"=>array());
|
||||||
if(!$source_node) return $output;
|
if(!$source_node) return $output;
|
||||||
|
|
||||||
|
// 루프를 돌면서 1차 배열로 정리하고 include할 수 있는 php script 코드를 생성
|
||||||
foreach($source_node as $category_srl => $node) {
|
foreach($source_node as $category_srl => $node) {
|
||||||
|
|
||||||
// 자식 노드가 있으면 자식 노드의 데이터를 먼저 얻어옴
|
// 자식 노드가 있으면 자식 노드의 데이터를 먼저 얻어옴
|
||||||
if($category_srl&&$tree[$category_srl]) $child_output = $this->getPhpCacheCode($tree[$category_srl], $tree);
|
if($category_srl&&$tree[$category_srl]) $child_output = $this->getPhpCacheCode($tree[$category_srl], $tree);
|
||||||
else $child_output = array("buff"=>"", "category_srl_list"=>array());
|
else $child_output = array("buff"=>"", "category_srl_list"=>array());
|
||||||
|
|
@ -861,15 +881,18 @@
|
||||||
|
|
||||||
// 속성을 생성한다 ( category_srl_list를 이용해서 선택된 메뉴의 노드에 속하는지를 검사한다. 꽁수지만 빠르고 강력하다고 생각;;)
|
// 속성을 생성한다 ( category_srl_list를 이용해서 선택된 메뉴의 노드에 속하는지를 검사한다. 꽁수지만 빠르고 강력하다고 생각;;)
|
||||||
$attribute = sprintf(
|
$attribute = sprintf(
|
||||||
'"node_srl"=>"%s","category_srl"=>"%s","parent_srl"=>"%s","text"=>%s?$_category_title[%d]:"","selected"=>(in_array(Context::get("category"),array(%s))?1:0),"expand"=>"%s", "list"=>array(%s)',
|
'"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',
|
||||||
|
$node->mid,
|
||||||
|
$node->module_srl,
|
||||||
$node->category_srl,
|
$node->category_srl,
|
||||||
$node->category_srl,
|
$node->category_srl,
|
||||||
$node->parent_srl,
|
$node->parent_srl,
|
||||||
$group_check_code,
|
|
||||||
$node->category_srl,
|
$node->category_srl,
|
||||||
$selected,
|
$selected,
|
||||||
$expand,
|
$expand,
|
||||||
$child_buff
|
$child_buff,
|
||||||
|
$node->document_count,
|
||||||
|
$group_check_code
|
||||||
);
|
);
|
||||||
|
|
||||||
// buff 데이터를 생성한다
|
// buff 데이터를 생성한다
|
||||||
|
|
|
||||||
|
|
@ -565,8 +565,11 @@
|
||||||
* @brief 에디터 html을 구해서 return
|
* @brief 에디터 html을 구해서 return
|
||||||
**/
|
**/
|
||||||
function getEditor() {
|
function getEditor() {
|
||||||
|
$module_srl = $this->get('module_srl');
|
||||||
|
if(!$module_srl) $module_srl = Context::get('module_srl');
|
||||||
|
|
||||||
$oEditorModel = &getModel('editor');
|
$oEditorModel = &getModel('editor');
|
||||||
return $oEditorModel->getModuleEditor('document', $this->get('module_srl'), $this->document_srl, 'document_srl', 'content');
|
return $oEditorModel->getModuleEditor('document', $module_srl, $this->document_srl, 'document_srl', 'content');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -406,23 +406,86 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 특정 모듈의 카테고리 목록을 가져옴
|
* @brief 특정 모듈의 카테고리 목록을 가져옴
|
||||||
|
* 속도나 여러가지 상황을 고려해서 카테고리 목록은 php로 생성된 script를 include하여 사용하는 것을 원칙으로 함
|
||||||
**/
|
**/
|
||||||
function getCategoryList($module_srl) {
|
function getCategoryList($module_srl) {
|
||||||
|
// 한 페이지에서 여러번 호출될 경우를 대비해서 static var로 보관 (php4때문에 다른 방법으로 구현)
|
||||||
|
if(isset($this->category_list[$module_srl])) return $this->category_list[$module_srl];
|
||||||
|
|
||||||
|
// php 캐싱된 파일의 유무를 체크하여 처리
|
||||||
$args->module_srl = $module_srl;
|
$args->module_srl = $module_srl;
|
||||||
$args->sort_index = 'list_order';
|
$args->sort_index = 'list_order';
|
||||||
$output = executeQuery('document.getCategoryList', $args);
|
$output = executeQuery('document.getCategoryList', $args);
|
||||||
|
|
||||||
$category_list = $output->data;
|
// 대상 모듈의 카테고리 파일을 불러옴
|
||||||
|
$filename = sprintf("./files/cache/document_category/%s.php", $module_srl);
|
||||||
|
|
||||||
if(!$category_list) return NULL;
|
// 대상 파일이 없으면 카테고리 캐시 파일을 재생성
|
||||||
if(!is_array($category_list)) $category_list = array($category_list);
|
if(!file_exists($filename)) {
|
||||||
|
$oDocumentController = &getController('document');
|
||||||
$category_count = count($category_list);
|
if(!$oDocumentController->makeCategoryFile($module_srl)) return array();
|
||||||
for($i=0;$i<$category_count;$i++) {
|
|
||||||
$category_srl = $category_list[$i]->category_srl;
|
|
||||||
$list[$category_srl] = $category_list[$i];
|
|
||||||
}
|
}
|
||||||
return $list;
|
|
||||||
|
@include($filename);
|
||||||
|
|
||||||
|
// 카테고리의 정리
|
||||||
|
$document_category = array();
|
||||||
|
$this->_arrangeCategory($document_category, $menu->list, 0);
|
||||||
|
|
||||||
|
return $document_category;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 카테고리를 1차 배열 형식으로 변경하는 내부 method
|
||||||
|
**/
|
||||||
|
function _arrangeCategory(&$document_category, $list, $depth) {
|
||||||
|
$idx = 0;
|
||||||
|
$list_order = array();
|
||||||
|
foreach($list as $key => $val) {
|
||||||
|
$obj = null;
|
||||||
|
$obj->mid = $val['mid'];
|
||||||
|
$obj->module_srl = $val['module_srl'];
|
||||||
|
$obj->category_srl = $val['category_srl'];
|
||||||
|
$obj->parent_srl = $val['parent_srl'];
|
||||||
|
$obj->title = $obj->text = $val['text'];
|
||||||
|
$obj->expand = $val['expand']=='Y'?true:false;
|
||||||
|
$obj->document_count = $val['document_count'];
|
||||||
|
$obj->depth = $depth;
|
||||||
|
$obj->child_count = 0;
|
||||||
|
$obj->childs = array();
|
||||||
|
$obj->grant = $val['grant'];
|
||||||
|
|
||||||
|
if(Context::get('mid') == $obj->mid && Context::get('category') == $obj->category_srl) $selected = true;
|
||||||
|
else $selected = false;
|
||||||
|
|
||||||
|
$obj->selected = $selected;
|
||||||
|
|
||||||
|
$list_order[$idx++] = $obj->category_srl;
|
||||||
|
|
||||||
|
// 부모 카테고리가 있으면 자식노드들의 데이터를 적용
|
||||||
|
if($obj->parent_srl) {
|
||||||
|
|
||||||
|
$parent_srl = $obj->parent_srl;
|
||||||
|
$document_count = $obj->document_count;
|
||||||
|
$expand = $obj->expand;
|
||||||
|
if($selected) $expand = true;
|
||||||
|
|
||||||
|
while($parent_srl) {
|
||||||
|
$document_category[$parent_srl]->document_count += $document_count;
|
||||||
|
$document_category[$parent_srl]->childs[] = $obj->category_srl;
|
||||||
|
$document_category[$parent_srl]->child_count = count($document_category[$parent_srl]->childs);
|
||||||
|
if($expand) $document_category[$parent_srl]->expand = $expand;
|
||||||
|
|
||||||
|
$parent_srl = $document_category[$parent_srl]->parent_srl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$document_category[$key] = $obj;
|
||||||
|
|
||||||
|
if(count($val['list'])) $this->_arrangeCategory($document_category, $val['list'], $depth+1);
|
||||||
|
}
|
||||||
|
$document_category[$list_order[0]]->first = true;
|
||||||
|
$document_category[$list_order[count($list_order)-1]]->last = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -513,7 +576,7 @@
|
||||||
|
|
||||||
$output = '';
|
$output = '';
|
||||||
foreach($categories as $category_srl => $category) {
|
foreach($categories as $category_srl => $category) {
|
||||||
$output .= sprintf("%d,%s\n",$category_srl, $category->title);
|
$output .= sprintf("%d,%d,%s\n",$category_srl, $category->depth,$category->title);
|
||||||
}
|
}
|
||||||
$this->add('categories', $output);
|
$this->add('categories', $output);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,12 +60,19 @@ function completeGetCategoryFromModules(ret_obj, response_tags) {
|
||||||
var category_list = categories.split("\n");
|
var category_list = categories.split("\n");
|
||||||
for(var i=0;i<category_list.length;i++) {
|
for(var i=0;i<category_list.length;i++) {
|
||||||
var item = category_list[i];
|
var item = category_list[i];
|
||||||
|
|
||||||
var pos = item.indexOf(',');
|
var pos = item.indexOf(',');
|
||||||
var category_srl = item.substr(0,pos);
|
var category_srl = item.substr(0,pos);
|
||||||
|
|
||||||
|
var item = item.substr(pos+1, item.length);
|
||||||
|
var pos = item.indexOf(',');
|
||||||
|
var depth = item.substr(0,pos);
|
||||||
|
|
||||||
var category_title = item.substr(pos+1,item.length);
|
var category_title = item.substr(pos+1,item.length);
|
||||||
if(!category_srl || !category_title) continue;
|
if(!category_srl || !category_title) continue;
|
||||||
|
|
||||||
var opt = new Option(category_title, category_srl, false, false);
|
var opt = new Option(category_title, category_srl, false, false);
|
||||||
|
if(depth>0) opt.style.paddingLeft = (depth*15)+'px';
|
||||||
obj.options[obj.options.length] = opt;
|
obj.options[obj.options.length] = opt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,21 +38,21 @@
|
||||||
.xeEditor .editor_info .editor_option { float:left; color:#888888; }
|
.xeEditor .editor_info .editor_option { float:left; color:#888888; }
|
||||||
.xeEditor .editor_info .editor_autosaved_message { color:#888888; float:right; display:none;}
|
.xeEditor .editor_info .editor_autosaved_message { color:#888888; float:right; display:none;}
|
||||||
|
|
||||||
.xeEditor .inputTypeTextArea { background:#fbfbfb; padding:1em; width:94%;}
|
|
||||||
.xeEditor #textAreaDrag {}
|
.xeEditor .fileAttach { border:none; table-layout:fixed; margin:10px 10px 0 10px; }
|
||||||
.xeEditor .fileAttach { padding:0 1em .5em 1em;}
|
|
||||||
.xeEditor .fileAttach .preview { padding:5px; width:110px; height:110px; border:1px solid #e1e1dd; background:#fbfbfb; float:left; margin-right:.5em;}
|
.xeEditor .fileAttach .preview { padding:5px; border:1px solid #e1e1dd; width:100px; height:100px; margin-right:10px;}
|
||||||
.xeEditor .fileAttach .preview img { width:110px; height:110px; float:left; display:block;}
|
.xeEditor .fileAttach .preview img { width:100px; height:100px; }
|
||||||
.xeEditor .fileAttach .fileListArea { float:left; width:50%; margin-right:.7em; padding-bottom:.5em; margin-bottom:1em}
|
|
||||||
.xeEditor .fileAttach .fileListArea .fileList { background:url(../images/select_dot.gif); overflow:auto; width:100%; height:auto; border:1px solid; border-color:#a6a6a6 #d8d8d8 #d8d8d8 #a6a6a6; margin-bottom:.3em; font-size:11px;}
|
.xeEditor .fileAttach .fileListArea .fileList { background:url(../images/select_dot.gif); overflow:auto; width:100%; height:auto; border:1px solid; border-color:#a6a6a6 #d8d8d8 #d8d8d8 #a6a6a6; margin-bottom:10px; font-size:11px;}
|
||||||
.xeEditor .fileAttach .fileListArea .fileList option { line-height:100%; padding-left:.5em;}
|
.xeEditor .fileAttach .fileListArea .fileList option { line-height:100%; padding-left:.5em;}
|
||||||
.xeEditor .fileAttach .fileListArea span.file_attach_info { color:#3f4040; font-size:11px; text-align:left;}
|
.xeEditor .fileAttach .fileUploadControl { float:left; }
|
||||||
.xeEditor .fileAttach .fileListArea span.file_attach_info strong { color:#ff6600; font-size:11px; font-weight:bold; }
|
.xeEditor .fileAttach .file_attach_info { color:#AAAAAA; font-size:.9em; _font-size:7pt; text-align:right;}
|
||||||
.xeEditor .fileAttach .fileUploadControl { margin-bottom:5px; }
|
*:first-child+html .xeEditor .fileAttach .file_attach_info { font-size:7pt; }
|
||||||
|
|
||||||
.xeEditor .fileAttach .fileUploadControl .uploaderButton { display:block; cursor:pointer; background:url(../images/buttonTypeBCenter.gif) repeat-x left center; line-height:100%; overflow:visible; color:#3f4040; margin:0 1px; font-size:.9em; white-space:nowrap;}
|
.xeEditor .fileAttach .fileUploadControl .uploaderButton { display:block; cursor:pointer; background:url(../images/buttonTypeBCenter.gif) repeat-x left center; line-height:100%; overflow:visible; color:#3f4040; margin:0 1px; font-size:.9em; white-space:nowrap;}
|
||||||
.xeEditor .fileAttach .fileUploadControl .uploaderButton:hover { text-decoration:none;}
|
.xeEditor .fileAttach .fileUploadControl .uploaderButton:hover { text-decoration:none;}
|
||||||
.xeEditor .fileAttach .fileUploadControl .uploaderButton img { vertical-align:middle;}
|
.xeEditor .fileAttach .fileUploadControl .uploaderButton img { vertical-align:middle;}
|
||||||
.xeEditor .fileAttach .fileUploadControl .uploaderButton .leftCap { width:2px; height:22px; background:url(../images/buttonTypeBLeft.gif) no-repeat; margin:0 .3em 0 0; position:relative; left:-1px;}
|
.xeEditor .fileAttach .fileUploadControl .uploaderButton .leftCap { width:2px; height:21px; background:url(../images/buttonTypeBLeft.gif) no-repeat; margin:0 .3em 0 0; position:relative; left:-1px;}
|
||||||
.xeEditor .fileAttach .fileUploadControl .uploaderButton .rightCap { width:2px; height:22px; background:url(../images/buttonTypeBRight.gif) no-repeat; margin:0 -1px 0 .4em;}
|
.xeEditor .fileAttach .fileUploadControl .uploaderButton .rightCap { width:2px; height:21px; background:url(../images/buttonTypeBRight.gif) no-repeat; margin:0 -1px 0 .4em;}
|
||||||
.xeEditor .fileAttach .fileUploadControl .uploaderButton .icon { margin:0 .2em;}
|
.xeEditor .fileAttach .fileUploadControl .uploaderButton .icon { margin:0 .2em;}
|
||||||
|
|
|
||||||
|
|
@ -152,22 +152,24 @@
|
||||||
editor_upload_init("{$editor_sequence}");
|
editor_upload_init("{$editor_sequence}");
|
||||||
//]]></script>
|
//]]></script>
|
||||||
|
|
||||||
<div class="fileAttach">
|
<table cellspacing="0" class="fileAttach">
|
||||||
<div class="preview iePngFix" id="preview_uploaded_{$editor_sequence}">
|
<col width="120" />
|
||||||
<img src="./images/blank.gif" alt="preview" width="100" height="100" />
|
<col width="100%" />
|
||||||
</div>
|
<tr valign="top">
|
||||||
|
<td width="120"><div class="preview" id="preview_uploaded_{$editor_sequence}"><img src="./images/blank.gif" alt="preview" width="100" height="100" /></div></td>
|
||||||
<!-- 파일 업로드 영역 -->
|
<td>
|
||||||
<div class="fileListArea">
|
<!-- 파일 업로드 영역 -->
|
||||||
<select id="uploaded_file_list_{$editor_sequence}" multiple="multiple" size="7" class="fileList" onclick="editor_preview(this, '{$editor_sequence}');"></select>
|
<div class="fileListArea">
|
||||||
<span class="file_attach_info" id="uploader_status_{$editor_sequence}">{$upload_status}</span>
|
<select id="uploaded_file_list_{$editor_sequence}" multiple="multiple" size="5" class="fileList" onclick="editor_preview(this, '{$editor_sequence}');"></select>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="fileUploadControl">
|
||||||
<div class="fileUploadControl"><a href="#" onclick="editor_upload_file('{$editor_sequence}');return false;" class="button"><span>{$lang->edit->upload_file}</span></a></div>
|
<a href="#" onclick="editor_upload_file('{$editor_sequence}');return false;" class="button"><span>{$lang->edit->upload_file}</span></a>
|
||||||
<div class="fileUploadControl"><a href="#" onclick="editor_remove_file('{$editor_sequence}');return false;" class="button"><span>{$lang->edit->delete_selected}</span></a></div>
|
<a href="#" onclick="editor_remove_file('{$editor_sequence}');return false;" class="button"><span>{$lang->edit->delete_selected}</span></a>
|
||||||
<div class="fileUploadControl"><a href="#" onclick="editor_insert_file('{$editor_sequence}');return false;" class="button"><span>{$lang->edit->link_file}</span></a></div>
|
<a href="#" onclick="editor_insert_file('{$editor_sequence}');return false;" class="button"><span>{$lang->edit->link_file}</span></a>
|
||||||
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="file_attach_info" id="uploader_status_{$editor_sequence}">{$upload_status}</div>
|
||||||
</div>
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,28 @@
|
||||||
@charset "utf-8";
|
@charset "utf-8";
|
||||||
|
.xeEditor { padding:0 10px 0 10px; }
|
||||||
.xeEditor .editor_info .editor_autosaved_message { display:none; color:#888888; text-align:right; }
|
.xeEditor .editor_info .editor_autosaved_message { display:none; color:#888888; text-align:right; }
|
||||||
.xeEditor .optionDE { width:100%; clear:both; overflow:hidden; background:#f8f8f8; height:29px;}
|
.xeEditor .optionDE { width:100%; clear:both; overflow:hidden; background:#f8f8f8; height:29px;}
|
||||||
.xeEditor .optionDE .buttonGroup { white-space:nowrap; position:relative; display:block; float:left; height:21px; overflow:hidden; padding-left:2px;}
|
.xeEditor .optionDE .buttonGroup { white-space:nowrap; display:block; float:left; height:21px; overflow:hidden; padding-left:2px;}
|
||||||
.xeEditor .optionDE img { float:left; display:block; margin-right:.5em; cursor:pointer;}
|
.xeEditor .optionDE img { float:left; display:block; margin-right:.5em; cursor:pointer;}
|
||||||
.xeEditor .optionD { padding:.5em 0 .5em .8em; overflow:hidden; float:left; border-right:1px solid #e0e0e0;}
|
.xeEditor .optionD { overflow:hidden; float:left; border-right:1px solid #e0e0e0;}
|
||||||
.xeEditor .optionE { padding:4px 0 0 8px; overflow:hidden; border-left:1px solid #ffffff; float:left;}
|
.xeEditor .optionE { overflow:hidden; border-left:1px solid #ffffff; float:left;}
|
||||||
.xeEditor .textAreaDragIndicator { text-align:center; background:url(../images/lineTextAreaDrag.gif) repeat-x left center; padding:5px 0 5px 0; }
|
.xeEditor .textAreaDragIndicator { text-align:center; background:url(../images/lineTextAreaDrag.gif) repeat-x left center; padding:5px 0 5px 0; }
|
||||||
.xeEditor .textAreaDragIndicatorBar { background:url(../images/buttonTextAreaDrag.gif) no-repeat center; cursor:move;height:14px;}
|
.xeEditor .textAreaDragIndicatorBar { background:url(../images/buttonTextAreaDrag.gif) no-repeat center; cursor:move;height:14px;}
|
||||||
|
|
||||||
.xeEditor .fileAttach { position:relative; top:20px; padding:0 1em .5em 1em;}
|
.xeEditor .fileAttach { border:none; table-layout:fixed; margin-top:10px; }
|
||||||
.xeEditor .fileAttach .preview { padding:5px; width:110px; height:110px; border:1px solid #e1e1dd; background:#fbfbfb; float:left; margin-right:.5em;}
|
|
||||||
.xeEditor .fileAttach .preview img { width:110px; height:110px; float:left; display:block;}
|
.xeEditor .fileAttach .preview { padding:5px; border:1px solid #e1e1dd; width:100px; height:100px; margin-right:10px;}
|
||||||
.xeEditor .fileAttach .fileListArea { float:left; width:50%; margin-right:.7em; padding-bottom:.5em; margin-bottom:1em}
|
.xeEditor .fileAttach .preview img { width:100px; height:100px; }
|
||||||
.xeEditor .fileAttach .fileListArea .fileList { overflow:auto; width:100%; height:auto; border:1px solid; border-color:#a6a6a6 #d8d8d8 #d8d8d8 #a6a6a6; margin-bottom:.3em; font-size:11px;}
|
|
||||||
|
.xeEditor .fileAttach .fileListArea .fileList { overflow:auto; width:100%; height:auto; border:1px solid; border-color:#a6a6a6 #d8d8d8 #d8d8d8 #a6a6a6; margin-bottom:10px; font-size:11px;}
|
||||||
.xeEditor .fileAttach .fileListArea .fileList option { line-height:100%; padding-left:.5em;}
|
.xeEditor .fileAttach .fileListArea .fileList option { line-height:100%; padding-left:.5em;}
|
||||||
.xeEditor .fileAttach .fileListArea span.file_attach_info { color:#3f4040; font-size:11px; text-align:left;}
|
.xeEditor .fileAttach .fileUploadControl { float:left; }
|
||||||
.xeEditor .fileAttach .fileListArea span.file_attach_info strong { color:#ff6600; font-size:11px; font-weight:bold; }
|
.xeEditor .fileAttach .file_attach_info { color:#AAAAAA; font-size:.9em; _font-size:7pt; text-align:right;}
|
||||||
.xeEditor .fileAttach .fileUploadControl { margin-bottom:5px; }
|
*:first-child+html .xeEditor .fileAttach .file_attach_info { font-size:7pt; }
|
||||||
|
|
||||||
.xeEditor .fileAttach .fileUploadControl .uploaderButton { display:block; cursor:pointer; background:url(../images/buttonTypeBCenter.gif) repeat-x left center; line-height:100%; overflow:visible; color:#3f4040; margin:0 1px; font-size:.9em; white-space:nowrap;}
|
.xeEditor .fileAttach .fileUploadControl .uploaderButton { display:block; cursor:pointer; background:url(../images/buttonTypeBCenter.gif) repeat-x left center; line-height:100%; overflow:visible; color:#3f4040; margin:0 1px; font-size:.9em; white-space:nowrap;}
|
||||||
.xeEditor .fileAttach .fileUploadControl .uploaderButton:hover { text-decoration:none;}
|
.xeEditor .fileAttach .fileUploadControl .uploaderButton:hover { text-decoration:none;}
|
||||||
.xeEditor .fileAttach .fileUploadControl .uploaderButton img { vertical-align:middle;}
|
.xeEditor .fileAttach .fileUploadControl .uploaderButton img { vertical-align:middle;}
|
||||||
.xeEditor .fileAttach .fileUploadControl .uploaderButton .leftCap { width:2px; height:21px; background:url(../images/buttonTypeBLeft.gif) no-repeat; margin:0 .3em 0 0; position:relative; left:-1px;}
|
.xeEditor .fileAttach .fileUploadControl .uploaderButton .leftCap { width:2px; height:21px; background:url(../images/buttonTypeBLeft.gif) no-repeat; margin:0 .3em 0 0; left:-1px;}
|
||||||
.xeEditor .fileAttach .fileUploadControl .uploaderButton .rightCap { width:2px; height:21px; background:url(../images/buttonTypeBRight.gif) no-repeat; margin:0 -1px 0 .4em;}
|
.xeEditor .fileAttach .fileUploadControl .uploaderButton .rightCap { width:2px; height:21px; background:url(../images/buttonTypeBRight.gif) no-repeat; margin:0 -1px 0 .4em;}
|
||||||
.xeEditor .fileAttach .fileUploadControl .uploaderButton .icon { margin:0 .2em;}
|
.xeEditor .fileAttach .fileUploadControl .uploaderButton .icon { margin:0 .2em;}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 에디터 출력 -->
|
<!-- 에디터 출력 -->
|
||||||
<div id = "xqEditor_{$editor_sequence}"></div>
|
<div id="xqEditor_{$editor_sequence}"></div>
|
||||||
<textarea id="editor_textarea_{$editor_sequence}" class="editor_iframe_textarea" style="display:none; height:{$editor_height}" rows="10" cols="10"></textarea>
|
<textarea id="editor_textarea_{$editor_sequence}" class="editor_iframe_textarea" style="display:none; height:{$editor_height}" rows="10" cols="10"></textarea>
|
||||||
|
|
||||||
<!-- 에디터 크기 조절 bar -->
|
<!-- 에디터 크기 조절 bar -->
|
||||||
|
|
@ -69,21 +69,25 @@
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
//]]></script>
|
//]]></script>
|
||||||
|
|
||||||
<div class="fileAttach">
|
<table cellspacing="0" class="fileAttach">
|
||||||
<div class="preview" id="preview_uploaded_{$editor_sequence}"><img src="./images/blank.gif" alt="preview" width="100" height="100" /></div>
|
<col width="120" />
|
||||||
|
<col width="100%" />
|
||||||
<!-- 파일 업로드 영역 -->
|
<tr valign="top">
|
||||||
<div class="fileListArea">
|
<td width="120"><div class="preview" id="preview_uploaded_{$editor_sequence}"><img src="./images/blank.gif" alt="preview" width="100" height="100" /></div></td>
|
||||||
<select id="uploaded_file_list_{$editor_sequence}" multiple="multiple" size="5" class="fileList" onclick="editor_preview(this, '{$editor_sequence}');"></select>
|
<td>
|
||||||
<span class="file_attach_info" id="uploader_status_{$editor_sequence}">{$upload_status}</span>
|
<!-- 파일 업로드 영역 -->
|
||||||
</div>
|
<div class="fileListArea">
|
||||||
|
<select id="uploaded_file_list_{$editor_sequence}" multiple="multiple" size="5" class="fileList" onclick="editor_preview(this, '{$editor_sequence}');"></select>
|
||||||
<div class="fileUploadControl"><a href="#" onclick="editor_upload_file('{$editor_sequence}');return false;" class="button"><span>{$lang->edit->upload_file}</span></a></div>
|
</div>
|
||||||
<div class="fileUploadControl"><a href="#" onclick="editor_remove_file('{$editor_sequence}');return false;" class="button"><span>{$lang->edit->delete_selected}</span></a></div>
|
<div class="fileUploadControl">
|
||||||
<div class="fileUploadControl"><a href="#" onclick="editor_insert_file_xq('{$editor_sequence}');return false;" class="button"><span>{$lang->edit->link_file}</span></a></div>
|
<a href="#" onclick="editor_upload_file('{$editor_sequence}');return false;" class="button"><span>{$lang->edit->upload_file}</span></a>
|
||||||
|
<a href="#" onclick="editor_remove_file('{$editor_sequence}');return false;" class="button"><span>{$lang->edit->delete_selected}</span></a>
|
||||||
<div class="clear"></div>
|
<a href="#" onclick="editor_insert_file('{$editor_sequence}');return false;" class="button"><span>{$lang->edit->link_file}</span></a>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="file_attach_info" id="uploader_status_{$editor_sequence}">{$upload_status}</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -619,19 +619,14 @@
|
||||||
function isModuleAdmin($module_info, $member_info) {
|
function isModuleAdmin($module_info, $member_info) {
|
||||||
$user_id = $member_info->user_id;
|
$user_id = $member_info->user_id;
|
||||||
$group_list = $member_info->group_list;
|
$group_list = $member_info->group_list;
|
||||||
|
if(!$group_list || !is_array($group_list) || !count($group_list)) return false;
|
||||||
|
|
||||||
// 직접 관리자로 선택하였을 경우 확인
|
// 직접 관리자로 선택하였을 경우 확인
|
||||||
if(is_array($module_info->admin_id) && in_array($user_id, $module_info->admin_id)) return true;
|
if(is_array($module_info->admin_id) && in_array($user_id, $module_info->admin_id)) return true;
|
||||||
|
|
||||||
// 관리자 그룹으로 등록되어 있을 경우 확인
|
// 관리자 그룹으로 등록되어 있을 경우 확인
|
||||||
$manager_group = $module_info->grants['manager'];
|
$manager_group = $module_info->grants['manager'];
|
||||||
if(count($group_list) && count($manager_group)) {
|
return count(array_intersect(array_keys($group_list), $manager_group));
|
||||||
foreach($group_list as $group_srl => $group_info) {
|
|
||||||
if(in_array($group_srl, $manager_group)) return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
56
widgets/category/category.class.php
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @class category
|
||||||
|
* @author zero (zero@nzeo.com)
|
||||||
|
* @brief 분류 출력기
|
||||||
|
* @version 0.1
|
||||||
|
**/
|
||||||
|
|
||||||
|
class category extends WidgetHandler {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 위젯의 실행 부분
|
||||||
|
*
|
||||||
|
* ./widgets/위젯/conf/info.xml 에 선언한 extra_vars를 args로 받는다
|
||||||
|
* 결과를 만든후 print가 아니라 return 해주어야 한다
|
||||||
|
**/
|
||||||
|
function proc($args) {
|
||||||
|
// 위젯 자체적으로 설정한 변수들을 체크
|
||||||
|
$pos = strpos($args->mid_list, ',');
|
||||||
|
if($pos === false) $mid = $args->mid_list;
|
||||||
|
else $mid = substr($args->mid_list, 0, $pos);
|
||||||
|
if(!$mid) return;
|
||||||
|
|
||||||
|
// 대상 mid의 module_srl 을 구함
|
||||||
|
$oModuleModel = &getModel('module');
|
||||||
|
$module_info = $oModuleModel->getModuleInfoByMid($mid);
|
||||||
|
|
||||||
|
$module_srl = $module_info->module_srl;
|
||||||
|
|
||||||
|
// 대상 모듈의 카테고리 파일을 불러옴
|
||||||
|
$oDocumentModel = &getModel('document');
|
||||||
|
$category_list = $oDocumentModel->getCategoryList($module_srl);
|
||||||
|
|
||||||
|
// 모듈의 정보를 구함
|
||||||
|
$widget_info->module_info = $module_info;
|
||||||
|
|
||||||
|
$widget_info->mid = $mid;
|
||||||
|
$widget_info->document_category = $document_category;
|
||||||
|
$widget_info->module_info = $module_info;
|
||||||
|
$widget_info->category_list = $category_list;
|
||||||
|
|
||||||
|
// 전체 개수를 구함
|
||||||
|
$total_count = $oDocumentModel->getDocumentCount($module_srl);
|
||||||
|
$widget_info->total_document_count = $total_count;
|
||||||
|
|
||||||
|
Context::set('widget_info', $widget_info);
|
||||||
|
|
||||||
|
// 템플릿 컴파일
|
||||||
|
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
|
||||||
|
$tpl_file = 'category';
|
||||||
|
|
||||||
|
$oTemplate = &TemplateHandler::getInstance();
|
||||||
|
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
15
widgets/category/conf/info.xml
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<widget version="0.1">
|
||||||
|
<title xml:lang="ko">게시글 분류 출력기</title>
|
||||||
|
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
|
||||||
|
<name xml:lang="ko">제로</name>
|
||||||
|
<description xml:lang="ko">게시판등 문서모듈의 분류를 사용하는 모듈에서 분류를 추출하여 블로그 카테고리와 같이 출력하는 기능입니다.</description>
|
||||||
|
</author>
|
||||||
|
<extra_vars>
|
||||||
|
<var id="mid_list">
|
||||||
|
<name xml:lang="ko">대상 모듈</name>
|
||||||
|
<type>mid_list</type>
|
||||||
|
<description xml:lang="ko">선택하신 모듈을 대상으로 합니다. 꼭 한개의 모듈만 선택해 주세요.</description>
|
||||||
|
</var>
|
||||||
|
</extra_vars>
|
||||||
|
</widget>
|
||||||
58
widgets/category/skins/default/category.html
Normal 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>
|
||||||
80
widgets/category/skins/default/css/category.css
Normal 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;
|
||||||
|
}
|
||||||
BIN
widgets/category/skins/default/images/join.gif
Normal file
|
After Width: | Height: | Size: 69 B |
BIN
widgets/category/skins/default/images/joinbottom.gif
Normal file
|
After Width: | Height: | Size: 66 B |
BIN
widgets/category/skins/default/images/line.gif
Normal file
|
After Width: | Height: | Size: 66 B |
BIN
widgets/category/skins/default/images/minus.gif
Normal file
|
After Width: | Height: | Size: 86 B |
BIN
widgets/category/skins/default/images/minusbottom.gif
Normal file
|
After Width: | Height: | Size: 85 B |
BIN
widgets/category/skins/default/images/page.gif
Normal file
|
After Width: | Height: | Size: 301 B |
BIN
widgets/category/skins/default/images/plus.gif
Normal file
|
After Width: | Height: | Size: 89 B |
BIN
widgets/category/skins/default/images/plusbottom.gif
Normal file
|
After Width: | Height: | Size: 88 B |
BIN
widgets/category/skins/default/images/plustop.gif
Normal file
|
After Width: | Height: | Size: 481 B |
BIN
widgets/category/skins/default/images/top.gif
Normal file
|
After Width: | Height: | Size: 88 B |
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);
|
||||||
13
widgets/category/skins/default/skin.xml
Normal 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>
|
||||||