mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-27 14:22:54 +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
|
|
@ -236,12 +236,7 @@
|
|||
if($category->group_srls) {
|
||||
$category_group_srls = explode(',',$category->group_srls);
|
||||
$is_granted = false;
|
||||
for($i=0;$i<$group_srls_count;$i++) {
|
||||
if(in_array($group_srls[$i],$category_group_srls)) {
|
||||
$is_granted = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(count(array_intersect($group_srls, $category_group_srls))) $is_granted = true;
|
||||
|
||||
}
|
||||
if($is_granted) $category_list[$category_srl] = $category;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<select name="category" id="board_category">
|
||||
<option value="">{$lang->category}</option>
|
||||
<!--@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-->
|
||||
</select>
|
||||
<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($grant->is_admin)--><th scope="col"><input type="checkbox" onclick="clickCheckBoxAll(this.form, 'cart'); return false;" /></th><!--@end-->
|
||||
<!--@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>
|
||||
<!--@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-->
|
||||
</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-->
|
||||
<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-->
|
||||
|
|
|
|||
|
|
@ -19,12 +19,14 @@
|
|||
<!--@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($module_info->use_category == "Y")-->
|
||||
<th><select name="select" id="board_category">
|
||||
<option value="">{$lang->category}</option>
|
||||
<th>
|
||||
<select name="category" id="board_category" class="w100">
|
||||
<option value="">{$lang->category}</option>
|
||||
<!--@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-->
|
||||
</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-->
|
||||
<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-->
|
||||
|
|
|
|||
|
|
@ -31,7 +31,9 @@
|
|||
<select name="category_srl" >
|
||||
<option value="">{$lang->category}</option>
|
||||
<!--@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-->
|
||||
</select>
|
||||
<!--@end-->
|
||||
|
|
|
|||
|
|
@ -257,20 +257,22 @@ Jeong, Chan Myeong 070601~070630
|
|||
.boardWrite .userNameAndPw .emailAddress {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 dl.option { margin:3px 0 3px 10px; padding:0;}
|
||||
.boardWrite dl.option dd { display:inline; margin-right:11px; }
|
||||
.boardWrite dl.option { margin:10px 0 3px 10px; padding:0;}
|
||||
.boardWrite dl.option dd { display:inline; margin-right:5px; }
|
||||
.boardWrite dl.option dd * { vertical-align:middle;}
|
||||
.boardWrite dl.option dd select { width:8em; font-size:.95em; }
|
||||
|
||||
.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 .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 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">
|
||||
<option value="">{$lang->category}</option>
|
||||
<!--@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-->
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<select name="category" id="board_category">
|
||||
<option value="">{$lang->category}</option>
|
||||
<!--@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-->
|
||||
</select>
|
||||
<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">
|
||||
<option value="">{$lang->category}</option>
|
||||
<!--@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-->
|
||||
</select>
|
||||
<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">
|
||||
<option value="" >{$lang->category}</option>
|
||||
<!--@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-->
|
||||
</select>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<!--@if($module_info->display_author!='N')-->
|
||||
<div class="userInfo">
|
||||
<!--@if(!$oDocument->getMemberSrl())-->
|
||||
<div class="author">
|
||||
|
|
@ -21,6 +22,7 @@
|
|||
<div class="author"><span class="member_{$oDocument->get('member_srl')}">{$oDocument->getNickName()}</span></div>
|
||||
<!--@end-->
|
||||
</div>
|
||||
<!--@end-->
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
|
|
|
|||
|
|
@ -25,12 +25,16 @@
|
|||
|
||||
<div class="title">
|
||||
<!--@if($module_info->use_category=="Y")-->
|
||||
<select name="category_srl" >
|
||||
<select name="category_srl" class="category">
|
||||
<option value="">{$lang->category}</option>
|
||||
<!--@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-->
|
||||
</select>
|
||||
<!--@else-->
|
||||
<label class="title">{$lang->title}</label>
|
||||
<!--@end-->
|
||||
<input type="text" name="title" class="title inputTypeText" value="{htmlspecialchars($oDocument->getTitleText())}" />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -730,7 +730,7 @@
|
|||
**/
|
||||
function makeCategoryFile($module_srl) {
|
||||
// 캐시 파일 생성시 필요한 정보가 없으면 그냥 return
|
||||
if(!$module_srl) return;
|
||||
if(!$module_srl) return false;
|
||||
|
||||
// 모듈 정보를 가져옴 (mid를 구하기 위해)
|
||||
$oModuleModel = &getModel('module');
|
||||
|
|
@ -743,9 +743,22 @@
|
|||
$xml_file = sprintf("./files/cache/document_category/%s.xml.php", $module_srl);
|
||||
$php_file = sprintf("./files/cache/document_category/%s.php", $module_srl);
|
||||
|
||||
// DB에서 module_srl 에 해당하는 카테고리 목록을 listorder순으로 구해옴
|
||||
$oDocumentModel = &getModel('document');
|
||||
$list = $oDocumentModel->getCategoryList($module_srl);
|
||||
// 카테고리 목록을 구함
|
||||
$args->module_srl = $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 파일만 생성
|
||||
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));
|
||||
|
||||
// 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']);
|
||||
|
||||
// 파일 저장
|
||||
|
|
@ -807,13 +820,18 @@
|
|||
$title = str_replace(array('&','"','<','>'),array('&','"','<','>'),$node->title);
|
||||
$expand = $node->expand;
|
||||
$group_srls = $node->group_srls;
|
||||
$mid = $node->mid;
|
||||
$module_srl = $node->module_srl;
|
||||
|
||||
// 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);
|
||||
else $group_check_code = "true";
|
||||
|
||||
$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,
|
||||
$group_check_code,
|
||||
$title,
|
||||
|
|
@ -838,7 +856,9 @@
|
|||
$output = array("buff"=>"", "category_srl_list"=>array());
|
||||
if(!$source_node) return $output;
|
||||
|
||||
// 루프를 돌면서 1차 배열로 정리하고 include할 수 있는 php script 코드를 생성
|
||||
foreach($source_node as $category_srl => $node) {
|
||||
|
||||
// 자식 노드가 있으면 자식 노드의 데이터를 먼저 얻어옴
|
||||
if($category_srl&&$tree[$category_srl]) $child_output = $this->getPhpCacheCode($tree[$category_srl], $tree);
|
||||
else $child_output = array("buff"=>"", "category_srl_list"=>array());
|
||||
|
|
@ -861,15 +881,18 @@
|
|||
|
||||
// 속성을 생성한다 ( category_srl_list를 이용해서 선택된 메뉴의 노드에 속하는지를 검사한다. 꽁수지만 빠르고 강력하다고 생각;;)
|
||||
$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->parent_srl,
|
||||
$group_check_code,
|
||||
$node->category_srl,
|
||||
$selected,
|
||||
$expand,
|
||||
$child_buff
|
||||
$child_buff,
|
||||
$node->document_count,
|
||||
$group_check_code
|
||||
);
|
||||
|
||||
// buff 데이터를 생성한다
|
||||
|
|
|
|||
|
|
@ -565,8 +565,11 @@
|
|||
* @brief 에디터 html을 구해서 return
|
||||
**/
|
||||
function getEditor() {
|
||||
$module_srl = $this->get('module_srl');
|
||||
if(!$module_srl) $module_srl = Context::get('module_srl');
|
||||
|
||||
$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 특정 모듈의 카테고리 목록을 가져옴
|
||||
* 속도나 여러가지 상황을 고려해서 카테고리 목록은 php로 생성된 script를 include하여 사용하는 것을 원칙으로 함
|
||||
**/
|
||||
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->sort_index = 'list_order';
|
||||
$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);
|
||||
|
||||
$category_count = count($category_list);
|
||||
for($i=0;$i<$category_count;$i++) {
|
||||
$category_srl = $category_list[$i]->category_srl;
|
||||
$list[$category_srl] = $category_list[$i];
|
||||
// 대상 파일이 없으면 카테고리 캐시 파일을 재생성
|
||||
if(!file_exists($filename)) {
|
||||
$oDocumentController = &getController('document');
|
||||
if(!$oDocumentController->makeCategoryFile($module_srl)) return array();
|
||||
}
|
||||
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 = '';
|
||||
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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,12 +60,19 @@ function completeGetCategoryFromModules(ret_obj, response_tags) {
|
|||
var category_list = categories.split("\n");
|
||||
for(var i=0;i<category_list.length;i++) {
|
||||
var item = category_list[i];
|
||||
|
||||
var pos = item.indexOf(',');
|
||||
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);
|
||||
if(!category_srl || !category_title) continue;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,21 +38,21 @@
|
|||
.xeEditor .editor_info .editor_option { float:left; color:#888888; }
|
||||
.xeEditor .editor_info .editor_autosaved_message { color:#888888; float:right; display:none;}
|
||||
|
||||
.xeEditor .inputTypeTextArea { background:#fbfbfb; padding:1em; width:94%;}
|
||||
.xeEditor #textAreaDrag {}
|
||||
.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 img { width:110px; height:110px; float:left; display:block;}
|
||||
.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 { border:none; table-layout:fixed; margin:10px 10px 0 10px; }
|
||||
|
||||
.xeEditor .fileAttach .preview { padding:5px; border:1px solid #e1e1dd; width:100px; height:100px; margin-right:10px;}
|
||||
.xeEditor .fileAttach .preview img { width:100px; height:100px; }
|
||||
|
||||
.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 span.file_attach_info { color:#3f4040; font-size:11px; text-align:left;}
|
||||
.xeEditor .fileAttach .fileListArea span.file_attach_info strong { color:#ff6600; font-size:11px; font-weight:bold; }
|
||||
.xeEditor .fileAttach .fileUploadControl { margin-bottom:5px; }
|
||||
.xeEditor .fileAttach .fileUploadControl { float:left; }
|
||||
.xeEditor .fileAttach .file_attach_info { color:#AAAAAA; font-size:.9em; _font-size:7pt; text-align:right;}
|
||||
*: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:hover { text-decoration:none;}
|
||||
.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 .rightCap { width:2px; height:22px; background:url(../images/buttonTypeBRight.gif) no-repeat; margin:0 -1px 0 .4em;}
|
||||
.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:21px; background:url(../images/buttonTypeBRight.gif) no-repeat; margin:0 -1px 0 .4em;}
|
||||
.xeEditor .fileAttach .fileUploadControl .uploaderButton .icon { margin:0 .2em;}
|
||||
|
|
|
|||
|
|
@ -152,22 +152,24 @@
|
|||
editor_upload_init("{$editor_sequence}");
|
||||
//]]></script>
|
||||
|
||||
<div class="fileAttach">
|
||||
<div class="preview iePngFix" id="preview_uploaded_{$editor_sequence}">
|
||||
<img src="./images/blank.gif" alt="preview" width="100" height="100" />
|
||||
</div>
|
||||
|
||||
<!-- 파일 업로드 영역 -->
|
||||
<div class="fileListArea">
|
||||
<select id="uploaded_file_list_{$editor_sequence}" multiple="multiple" size="7" class="fileList" onclick="editor_preview(this, '{$editor_sequence}');"></select>
|
||||
<span class="file_attach_info" id="uploader_status_{$editor_sequence}">{$upload_status}</span>
|
||||
</div>
|
||||
|
||||
<div class="fileUploadControl"><a href="#" onclick="editor_upload_file('{$editor_sequence}');return false;" class="button"><span>{$lang->edit->upload_file}</span></a></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"><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>
|
||||
<table cellspacing="0" class="fileAttach">
|
||||
<col width="120" />
|
||||
<col width="100%" />
|
||||
<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="5" class="fileList" onclick="editor_preview(this, '{$editor_sequence}');"></select>
|
||||
</div>
|
||||
<div class="fileUploadControl">
|
||||
<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>
|
||||
<a href="#" onclick="editor_insert_file('{$editor_sequence}');return false;" class="button"><span>{$lang->edit->link_file}</span></a>
|
||||
</div>
|
||||
<div class="file_attach_info" id="uploader_status_{$editor_sequence}">{$upload_status}</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--@end-->
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,26 +1,28 @@
|
|||
@charset "utf-8";
|
||||
.xeEditor { padding:0 10px 0 10px; }
|
||||
.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 .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 .optionD { padding:.5em 0 .5em .8em; 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 .optionD { overflow:hidden; float:left; border-right:1px solid #e0e0e0;}
|
||||
.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 .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 .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 .fileListArea { float:left; width:50%; margin-right:.7em; padding-bottom:.5em; margin-bottom:1em}
|
||||
.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 { border:none; table-layout:fixed; margin-top:10px; }
|
||||
|
||||
.xeEditor .fileAttach .preview { padding:5px; border:1px solid #e1e1dd; width:100px; height:100px; margin-right:10px;}
|
||||
.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:10px; font-size:11px;}
|
||||
.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 .fileListArea span.file_attach_info strong { color:#ff6600; font-size:11px; font-weight:bold; }
|
||||
.xeEditor .fileAttach .fileUploadControl { margin-bottom:5px; }
|
||||
.xeEditor .fileAttach .fileUploadControl { float:left; }
|
||||
.xeEditor .fileAttach .file_attach_info { color:#AAAAAA; font-size:.9em; _font-size:7pt; text-align:right;}
|
||||
*: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:hover { text-decoration:none;}
|
||||
.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 .icon { margin:0 .2em;}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
</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>
|
||||
|
||||
<!-- 에디터 크기 조절 bar -->
|
||||
|
|
@ -69,21 +69,25 @@
|
|||
<!--@end-->
|
||||
//]]></script>
|
||||
|
||||
<div class="fileAttach">
|
||||
<div class="preview" id="preview_uploaded_{$editor_sequence}"><img src="./images/blank.gif" alt="preview" width="100" height="100" /></div>
|
||||
|
||||
<!-- 파일 업로드 영역 -->
|
||||
<div class="fileListArea">
|
||||
<select id="uploaded_file_list_{$editor_sequence}" multiple="multiple" size="5" class="fileList" onclick="editor_preview(this, '{$editor_sequence}');"></select>
|
||||
<span class="file_attach_info" id="uploader_status_{$editor_sequence}">{$upload_status}</span>
|
||||
</div>
|
||||
|
||||
<div class="fileUploadControl"><a href="#" onclick="editor_upload_file('{$editor_sequence}');return false;" class="button"><span>{$lang->edit->upload_file}</span></a></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"><a href="#" onclick="editor_insert_file_xq('{$editor_sequence}');return false;" class="button"><span>{$lang->edit->link_file}</span></a></div>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<table cellspacing="0" class="fileAttach">
|
||||
<col width="120" />
|
||||
<col width="100%" />
|
||||
<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="5" class="fileList" onclick="editor_preview(this, '{$editor_sequence}');"></select>
|
||||
</div>
|
||||
<div class="fileUploadControl">
|
||||
<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>
|
||||
<a href="#" onclick="editor_insert_file('{$editor_sequence}');return false;" class="button"><span>{$lang->edit->link_file}</span></a>
|
||||
</div>
|
||||
<div class="file_attach_info" id="uploader_status_{$editor_sequence}">{$upload_status}</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--@end-->
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -619,19 +619,14 @@
|
|||
function isModuleAdmin($module_info, $member_info) {
|
||||
$user_id = $member_info->user_id;
|
||||
$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;
|
||||
|
||||
// 관리자 그룹으로 등록되어 있을 경우 확인
|
||||
$manager_group = $module_info->grants['manager'];
|
||||
if(count($group_list) && count($manager_group)) {
|
||||
foreach($group_list as $group_srl => $group_info) {
|
||||
if(in_array($group_srl, $manager_group)) return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return count(array_intersect(array_keys($group_list), $manager_group));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue