mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-03 17:22:20 +09:00
tree javascript change : 메뉴, 게시판분류, 홈페이지
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5055 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
987c7fbfbd
commit
19859b1615
65 changed files with 1591 additions and 875 deletions
|
|
@ -316,7 +316,7 @@
|
|||
* @brief 카테고리 삭제
|
||||
**/
|
||||
function procBoardAdminDeleteCategory() {
|
||||
// 변수 정리
|
||||
// 변수 정리
|
||||
$args = Context::gets('module_srl','category_srl');
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
|
|
@ -324,7 +324,7 @@
|
|||
|
||||
$oDocumentModel = &getModel('document');
|
||||
|
||||
// 원정보를 가져옴
|
||||
// 원정보를 가져옴
|
||||
$category_info = $oDocumentModel->getCategory($args->category_srl);
|
||||
if($category_info->parent_srl) $parent_srl = $category_info->parent_srl;
|
||||
|
||||
|
|
@ -352,6 +352,7 @@
|
|||
/**
|
||||
* @brief 카테고리 이동
|
||||
**/
|
||||
/*
|
||||
function procBoardAdminMoveCategory() {
|
||||
$source_category_srl = Context::get('source_category_srl');
|
||||
$target_category_srl = Context::get('target_category_srl');
|
||||
|
|
@ -373,13 +374,78 @@
|
|||
$output = $oDocumentController->updateCategory($source_args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// xml파일 재생성
|
||||
// xml파일 재생성
|
||||
$xml_file = $oDocumentController->makeCategoryFile($source_category->module_srl);
|
||||
|
||||
// return 변수 설정
|
||||
$this->add('xml_file', $xml_file);
|
||||
$this->add('source_category_srl', $source_category_srl);
|
||||
}
|
||||
*/
|
||||
|
||||
function procBoardAdminMoveCategory() {
|
||||
$source_category_srl = Context::get('source_srl');
|
||||
|
||||
// parent_srl 이 있으면 첫 자식으로 들어간다
|
||||
$parent_category_srl = Context::get('parent_srl');
|
||||
|
||||
// target_srl 이 있으면 target_srl 아래로 형제로 들어간다
|
||||
$target_category_srl = Context::get('target_srl');
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocumentController = &getController('document');
|
||||
$source_category = $oDocumentModel->getCategory($source_category_srl);
|
||||
|
||||
|
||||
//parent_category_srl 의 첫 자식으로 넣자
|
||||
if($parent_category_srl > 0 || ($parent_category_srl == 0 && $target_category_srl == 0)){
|
||||
$parent_category = $oDocumentModel->getCategory($parent_category_srl);
|
||||
|
||||
$args->module_srl = $source_category->module_srl;
|
||||
$args->parent_srl = $parent_category_srl;
|
||||
$output = executeQuery('document.getChildCategoryMinListOrder', $args);
|
||||
|
||||
if(!$output->toBool()) return $output;
|
||||
$args->list_order = (int)$output->data->list_order;
|
||||
if(!$args->list_order) $args->list_order = 0;
|
||||
$args->list_order--;
|
||||
|
||||
|
||||
$source_args->category_srl = $source_category_srl;
|
||||
$source_args->parent_srl = $parent_category_srl;
|
||||
$source_args->list_order = $args->list_order;
|
||||
$output = $oDocumentController->updateCategory($source_args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
|
||||
// $target_category_srl의 아래동생으로
|
||||
}else if($target_category_srl > 0){
|
||||
$target_category = $oDocumentModel->getCategory($target_category_srl);
|
||||
|
||||
//$target_category의 아래 동생을 모두 내린다
|
||||
$output = $oDocumentController->updateCategoryListOrder($target_category->module_srl, $target_category->list_order+1);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
|
||||
$source_args->category_srl = $source_category_srl;
|
||||
$source_args->parent_srl = $target_category->parent_srl;
|
||||
$source_args->list_order = $target_category->list_order+1;
|
||||
$output = $oDocumentController->updateCategory($source_args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// xml파일 재생성
|
||||
$xml_file = $oDocumentController->makeCategoryFile($source_category->module_srl);
|
||||
|
||||
// return 변수 설정
|
||||
$this->add('xml_file', $xml_file);
|
||||
$this->add('source_category_srl', $source_category_srl);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief xml 파일을 갱신
|
||||
|
|
@ -388,14 +454,14 @@
|
|||
* 개발 중간의 문제인 것 같고 현재는 문제가 생기지 않으나 굳이 없앨 필요 없는 기능
|
||||
**/
|
||||
function procBoardAdminMakeXmlFile() {
|
||||
// 입력값을 체크
|
||||
// 입력값을 체크
|
||||
$module_srl = Context::get('module_srl');
|
||||
|
||||
// xml파일 재생성
|
||||
// xml파일 재생성
|
||||
$oDocumentController = &getController('document');
|
||||
$xml_file = $oDocumentController->makeCategoryFile($module_srl);
|
||||
|
||||
// return 값 설정
|
||||
// return 값 설정
|
||||
$this->add('xml_file',$xml_file);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
// template 파일을 직접 컴파일한후 tpl변수에 담아서 return한다.
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
$tpl = $oTemplate->compile($this->module_path.'tpl', 'category_info');
|
||||
|
||||
$tpl = str_replace("\n",'',$tpl);
|
||||
// return 할 변수 설정
|
||||
$this->add('tpl', $tpl);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@
|
|||
Context::set('category_xml_file', $category_xml_file);
|
||||
Context::addJsFile('./common/js/tree_menu.js');
|
||||
|
||||
Context::set('layout','none');
|
||||
// Context::set('layout','none');
|
||||
$this->setTemplateFile('category_list');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<!--%import("filter/insert.xml")-->
|
||||
<!--#include("header.html")-->
|
||||
|
||||
<form action="./" method="post" onsubmit="return procFilter(this, window.insert)" id="fo_write">
|
||||
<form action="./" method="post" onsubmit="return procFilter(this, insert)" id="fo_write">
|
||||
<input type="hidden" name="mid" value="{$mid}" />
|
||||
<input type="hidden" name="content" value="{$oDocument->getContentText()}" />
|
||||
<input type="hidden" name="document_srl" value="{$document_srl}" />
|
||||
|
|
|
|||
|
|
@ -15,15 +15,8 @@
|
|||
<p>{$lang->about_category_title}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<th scope="row"><div>{$lang->expand}</div></th>
|
||||
<td>
|
||||
<input type="checkbox" name="expand" value="Y" <!--@if($category_info->expand=="Y")-->checked="checked"<!--@end--> class="checkbox" />
|
||||
{$lang->about_expand}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->category_group_srls} <input type="checkbox" onclick="XE.checkboxToggleAll('group_srls'); return false;" /></div></th>
|
||||
<tr >
|
||||
<th scope="row2"><div>{$lang->category_group_srls} <input type="checkbox" onclick="XE.checkboxToggleAll('group_srls'); return false;" /></div></th>
|
||||
<td>
|
||||
<!--@foreach($group_list as $key=>$val)-->
|
||||
<div><input type="checkbox" name="group_srls" value="{$key}" id="group_{$key}" <!--@if(is_array($category_info->group_srls)&&in_array($key, $category_info->group_srls))-->checked="checked"<!--@end--> class="checkbox" /> <label for="group_{$key}">{$val->title}</label></div>
|
||||
|
|
@ -33,14 +26,8 @@
|
|||
</tr>
|
||||
<tr class="row2">
|
||||
<td scope="row" colspan="2" class="right">
|
||||
<!--@if($category_info->title)-->
|
||||
<a href="#" onclick="doDeleteCategory('{$category_srl->category_srl}');return false" class="button"><span>{$lang->cmd_delete}</span></a>
|
||||
<!--@end-->
|
||||
<a href="#" onclick="hideCategoryInfo();return false" class="button"><span>{$lang->cmd_close}</span></a>
|
||||
<span class="button"><input type="submit" value="{$lang->cmd_save}" /></span>
|
||||
<!--@if($category_info->title)-->
|
||||
<a href="#" onclick="doInsertCategory('{$category_info->category_srl}');return false" class="button"><span>{$lang->cmd_make_child}</span></a>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -1,46 +1,39 @@
|
|||
<!--#include("./header.html")-->
|
||||
<!--%import("filter/insert_category.xml")-->
|
||||
<!--%import("filter/delete_category.xml")-->
|
||||
<!--%import("filter/move_category.xml")-->
|
||||
<!--%import("css/board.css")-->
|
||||
<!--%import("js/board_admin.js")-->
|
||||
|
||||
<!--%import("../../common/js/jquery.simple.tree.js",optimized=false)-->
|
||||
<!--%import("../../common/css/jquery.simple.tree.css",optimized=false)-->
|
||||
<!--%import("js/board_admin.js")-->
|
||||
<script type="text/javascript">
|
||||
var category_title = "{$lang->category}";
|
||||
</script>
|
||||
|
||||
<h3>{$lang->board} <span class="gray">{$lang->cmd_management}</span></h3>
|
||||
<div class="infoText">{nl2br($lang->about_board_category)}</div>
|
||||
|
||||
<div class="gap">
|
||||
<a href="#" onclick="doInsertCategory(0);return false;" class="button"><span>{$lang->cmd_insert}</span></a>
|
||||
<a href="#" onclick="doReloadTreeCategory('{$module_info->module_srl}');return false;" class="button"><span>{$lang->cmd_remake_cache}</span></a>
|
||||
<a href="#" onclick="openAllTreeMenu('category');return false;" class="button"><span>{$lang->cmd_open_all}</span></a>
|
||||
<a href="#" onclick="closeAllTreeMenu('category');return false;" class="button"><span>{$lang->cmd_close_all}</span></a>
|
||||
<a href="#" onclick="window.close();return false;" class="button"><span>{$lang->cmd_close}</span></a>
|
||||
<div class="infoText">{nl2br($lang->about_board_category)}
|
||||
</div>
|
||||
|
||||
<p class="gap1"><input type="checkbox" class="checkbox" id="category_enable_move" onclick="hideCategoryInfo()" /> <label for="category_enable_move">{$lang->cmd_enable_move_category}</label></p>
|
||||
|
||||
|
||||
<!-- 카테고리의 위/아래, 삭제와 관련된 form -->
|
||||
<form id="fo_move_category" action="./" method="get">
|
||||
<input type="hidden" name="module_srl" />
|
||||
<input type="hidden" name="source_category_srl" />
|
||||
<input type="hidden" name="target_category_srl" />
|
||||
</form>
|
||||
<span style="float:right"><a href="#" onclick="doReloadTreeCategory('{$module_info->module_srl}');return false;" class="button"><span>{$lang->cmd_remake_cache}</span></a></span>
|
||||
|
||||
<div class="gap1">
|
||||
<form id="fo_category" action="./" method="get" onsubmit="return procFilter(this, insert_category)">
|
||||
<input type="hidden" name="module_srl" value="{$module_info->module_srl}" />
|
||||
<input type="hidden" name="xml_file" value="{$category_xml_file}" />
|
||||
|
||||
<div id="category_list">
|
||||
<div id="zone_category"></div>
|
||||
</div>
|
||||
<div id="category_info"></div>
|
||||
<div id="menu">
|
||||
<ul class="simpleTree">
|
||||
<li class="root" id='tree_0'><span>{$lang->category}</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="category_info" style="position:absolute;top:300px; width:70%; right:20px"></div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
loadTreeMenu("{$category_xml_file}", "category", "zone_category", category_title, '', doGetCategoryInfo, 0, doMoveTree);
|
||||
var simpleTreeCollection;
|
||||
var max_menu_depth = 999;
|
||||
var lang_confirm_delete = "{$lang->confirm_delete}";
|
||||
var xml_url = "{$category_xml_file}";
|
||||
Tree(xml_url);
|
||||
</script>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
<!--@end-->
|
||||
<li <!--@if($act=='dispBoardAdminBoardInfo'||$act=='dispBoardAdminInsertBoard')-->class="on"<!--@end-->><a href="{getUrl('act','dispBoardAdminBoardInfo')}">{$lang->cmd_view_info}</a></li>
|
||||
<li <!--@if($act=='dispBoardAdminBoardAdditionSetup')-->class="on"<!--@end-->><a href="{getUrl('act','dispBoardAdminBoardAdditionSetup')}">{$lang->cmd_addition_setup}</a></li>
|
||||
<li <!--@if($act=='dispBoardAdminCategoryInfo')-->class="on"<!--@end-->><a href="{getUrl('act','dispBoardAdminCategoryInfo')}" onclick="winopen(this.href,'BoardMenu','width=850,height=800,resizable=yes,scrollbars=yes,toolbars=no');return false;">{$lang->cmd_manage_category}</a></li>
|
||||
<li <!--@if($act=='dispBoardAdminCategoryInfo')-->class="on"<!--@end-->><a href="{getUrl('act','dispBoardAdminCategoryInfo')}">{$lang->cmd_manage_category}</a></li>
|
||||
<li <!--@if($act=='dispBoardAdminGrantInfo')-->class="on"<!--@end-->><a href="{getUrl('act','dispBoardAdminGrantInfo')}">{$lang->cmd_manage_grant}</a></li>
|
||||
<li <!--@if($act=='dispBoardAdminSkinInfo')-->class="on"<!--@end-->><a href="{getUrl('act','dispBoardAdminSkinInfo')}">{$lang->cmd_manage_skin}</a></li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,169 @@
|
|||
* @brief board 모듈의 관리자용 javascript
|
||||
**/
|
||||
|
||||
|
||||
function Tree(url){
|
||||
// clear tree;
|
||||
jQuery('#menu > ul > li > ul').remove();
|
||||
if(jQuery("ul.simpleTree > li > a").size() ==0)jQuery('<a href="#" class="add"><img src="./common/tpl/images/tree/iconAdd.gif" /></a>').bind("click",function(e){addNode(0,e);}).appendTo("ul.simpleTree > li");
|
||||
|
||||
//ajax get data and transeform ul il
|
||||
jQuery.get(url,function(data){
|
||||
jQuery(data).find("node").each(function(i){
|
||||
var text = jQuery(this).attr("text");
|
||||
var node_srl = jQuery(this).attr("node_srl");
|
||||
var parent_srl = jQuery(this).attr("parent_srl");
|
||||
var url = jQuery(this).attr("url");
|
||||
|
||||
// node
|
||||
var node = jQuery('<li id="tree_'+node_srl+'"><span>'+text+'</span></li>');
|
||||
|
||||
// button
|
||||
jQuery('<a href="#" class="add"><img src="./common/tpl/images/tree/iconAdd.gif" /></a>').bind("click",function(e){addNode(node_srl,e);}).appendTo(node);
|
||||
|
||||
jQuery('<a href="#" class="modify"><img src="./common/tpl/images/tree/iconModify.gif" /></a>').bind("click",function(e){
|
||||
modifyNode(node_srl,e);
|
||||
}).appendTo(node);
|
||||
|
||||
jQuery('<a href="#" class="delete"><img src="./common/tpl/images/tree/iconDel.gif" /></a>').bind("click",function(e){
|
||||
deleteNode(node_srl);
|
||||
}).appendTo(node);
|
||||
|
||||
// insert parent child
|
||||
if(parent_srl>0){
|
||||
if(jQuery('#tree_'+parent_srl+'>ul').length==0) jQuery('#tree_'+parent_srl).append(jQuery('<ul>'));
|
||||
jQuery('#tree_'+parent_srl+'> ul').append(node);
|
||||
}else{
|
||||
if(jQuery('#menu ul.simpleTree > li > ul').length==0) jQuery("<ul>").appendTo('#menu ul.simpleTree > li');
|
||||
jQuery('#menu ul.simpleTree > li > ul').append(node);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//button show hide
|
||||
jQuery("#menu li").each(function(){
|
||||
if(jQuery(this).parents('ul').size() > max_menu_depth) jQuery("a.add",this).hide();
|
||||
if(jQuery(">ul",this).size()>0) jQuery(">a.delete",this).hide();
|
||||
});
|
||||
|
||||
|
||||
// draw tree
|
||||
simpleTreeCollection = jQuery('.simpleTree').simpleTree({
|
||||
autoclose: false,
|
||||
afterClick:function(node){
|
||||
//alert("text-"+jQuery('span:first',node).text());
|
||||
},
|
||||
afterDblClick:function(node){
|
||||
//alert("text-"+jQuery('span:first',node).text());
|
||||
},
|
||||
afterMove:function(destination, source, pos){
|
||||
var module_srl = jQuery("#fo_category input[name=module_srl]").val();
|
||||
var parent_srl = destination.attr('id').replace(/.*_/g,'');
|
||||
var source_srl = source.attr('id').replace(/.*_/g,'');
|
||||
|
||||
var target = source.prevAll("li:not([class^=line])");
|
||||
var target_srl = 0;
|
||||
if(target.length >0){
|
||||
target_srl = source.prevAll("li:not([class^=line])").get(0).id.replace(/.*_/g,'');
|
||||
parent_srl = 0;
|
||||
}
|
||||
|
||||
jQuery.exec_json("board.procBoardAdminMoveCategory",{ "module_srl":module_srl,"parent_srl":parent_srl,"target_srl":target_srl,"source_srl":source_srl},
|
||||
function(data){
|
||||
if(data.error > 0) Tree(xml_url);
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
// i want you !! made by sol
|
||||
beforeMovedToLine : function(destination, source, pos){
|
||||
return (jQuery(destination).parents('ul').size() + jQuery('ul',source).size() <= max_menu_depth);
|
||||
},
|
||||
|
||||
// i want you !! made by sol
|
||||
beforeMovedToFolder : function(destination, source, pos){
|
||||
return (jQuery(destination).parents('ul').size() + jQuery('ul',source).size() <= max_menu_depth-1);
|
||||
},
|
||||
afterAjax:function()
|
||||
{
|
||||
//alert('Loaded');
|
||||
},
|
||||
animate:true
|
||||
,docToFolderConvert:true
|
||||
});
|
||||
|
||||
|
||||
|
||||
// open all node
|
||||
nodeToggleAll();
|
||||
},"xml");
|
||||
}
|
||||
function addNode(node,e){
|
||||
var params ={
|
||||
"category_srl":0
|
||||
,"parent_srl":node
|
||||
,"module_srl":jQuery("#fo_category [name=module_srl]").val()
|
||||
};
|
||||
|
||||
jQuery.exec_json('board.getBoardAdminCategoryTplInfo', params, function(data){
|
||||
jQuery('#category_info').html(data.tpl);
|
||||
});
|
||||
}
|
||||
|
||||
function modifyNode(node,e){
|
||||
var params ={
|
||||
"category_srl":node
|
||||
,"parent_srl":0
|
||||
,"module_srl":jQuery("#fo_category [name=module_srl]").val()
|
||||
};
|
||||
|
||||
jQuery.exec_json('board.getBoardAdminCategoryTplInfo', params, function(data){
|
||||
jQuery('#category_info').html(data.tpl);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function nodeToggleAll(){
|
||||
jQuery("[class*=close]", simpleTreeCollection[0]).each(function(){
|
||||
simpleTreeCollection[0].nodeToggle(this);
|
||||
});
|
||||
}
|
||||
|
||||
function deleteNode(node){
|
||||
if(confirm(lang_confirm_delete){
|
||||
var params ={
|
||||
"category_srl":node
|
||||
,"parent_srl":0
|
||||
,"module_srl":jQuery("#fo_category [name=module_srl]").val()
|
||||
};
|
||||
|
||||
jQuery.exec_json('board.procBoardAdminDeleteCategory', params, function(data){
|
||||
if(data.error==0) Tree(xml_url);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/* 카테고리 아이템 입력후 */
|
||||
function completeInsertCategory(ret_obj) {
|
||||
jQuery('#category_info').html("");
|
||||
Tree(xml_url);
|
||||
}
|
||||
|
||||
function hideCategoryInfo() {
|
||||
jQuery('#category_info').html("");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* 모듈 생성 후 */
|
||||
function completeInsertBoard(ret_obj) {
|
||||
var error = ret_obj['error'];
|
||||
|
|
@ -96,42 +259,11 @@ function doCartSetup(act_type) {
|
|||
|
||||
/**
|
||||
* 카테고리 관리
|
||||
**/
|
||||
**/
|
||||
|
||||
/* 빈 카테고리 아이템 추가 */
|
||||
function doInsertCategory(parent_srl) {
|
||||
if(typeof(parent_srl)=='undefined') parent_srl = 0;
|
||||
var params = {node_srl:0, parent_srl:parent_srl}
|
||||
doGetCategoryInfo(null, params);
|
||||
deSelectNode();
|
||||
}
|
||||
|
||||
/* 카테고리 클릭시 적용할 함수 */
|
||||
function doGetCategoryInfo(category_id, obj) {
|
||||
// category, category_id, node_srl을 추출
|
||||
var fo_obj = xGetElementById("fo_category");
|
||||
var module_srl = fo_obj.module_srl.value;
|
||||
var node_srl = 0;
|
||||
var parent_srl = 0;
|
||||
|
||||
if(typeof(obj)!="undefined") {
|
||||
if(typeof(obj.getAttribute)!="undefined") {
|
||||
node_srl = obj.getAttribute("node_srl");
|
||||
} else {
|
||||
node_srl = obj.node_srl;
|
||||
parent_srl = obj.parent_srl;
|
||||
}
|
||||
}
|
||||
|
||||
var params = new Array();
|
||||
params["category_srl"] = node_srl;
|
||||
params["parent_srl"] = parent_srl;
|
||||
params["module_srl"] = module_srl;
|
||||
|
||||
// 서버에 요청하여 해당 노드의 정보를 수정할 수 있도록 한다.
|
||||
var response_tags = new Array('error','message','tpl');
|
||||
exec_xml('board', 'getBoardAdminCategoryTplInfo', params, completeGetCategoryTplInfo, response_tags, params);
|
||||
}
|
||||
|
||||
/* 서버로부터 받아온 카테고리 정보를 출력 */
|
||||
xAddEventListener(document,'mousedown',checkMousePosition);
|
||||
|
|
@ -143,10 +275,7 @@ function checkMousePosition(e) {
|
|||
_yPos = evt.pageY;
|
||||
}
|
||||
|
||||
function hideCategoryInfo() {
|
||||
var obj = xGetElementById('category_info');
|
||||
obj.style.display = "none";
|
||||
}
|
||||
|
||||
|
||||
function completeGetCategoryTplInfo(ret_obj, response_tags) {
|
||||
var obj = xGetElementById('category_info');
|
||||
|
|
@ -164,26 +293,7 @@ function completeGetCategoryTplInfo(ret_obj, response_tags) {
|
|||
fo_obj.category_title.focus();
|
||||
}
|
||||
|
||||
/* 카테고리 아이템 입력후 */
|
||||
function completeInsertCategory(ret_obj) {
|
||||
var xml_file = ret_obj['xml_file'];
|
||||
var category_srl = ret_obj['category_srl'];
|
||||
var module_srl = ret_obj['module_srl'];
|
||||
var parent_srl = ret_obj['parent_srl'];
|
||||
|
||||
if(!xml_file) return;
|
||||
|
||||
loadTreeMenu(xml_file, 'category', 'zone_category', category_title, '',doGetCategoryInfo, category_srl, doMoveTree);
|
||||
|
||||
if(!category_srl) {
|
||||
xInnerHtml("category_info", "");
|
||||
} else {
|
||||
var params = {node_srl:category_srl, parent_srl:parent_srl}
|
||||
doGetCategoryInfo(null, params)
|
||||
}
|
||||
|
||||
if(typeof('fixAdminLayoutFooter')=="function") fixAdminLayoutFooter();
|
||||
}
|
||||
|
||||
|
||||
/* 카테고리를 드래그하여 이동한 후 실행할 함수 , 이동하는 category_srl과 대상 category_srl을 받음 */
|
||||
|
|
@ -218,7 +328,7 @@ function doReloadTreeCategory(module_srl) {
|
|||
var params = new Array();
|
||||
params["module_srl"] = module_srl;
|
||||
|
||||
// 서버에 요청하여 해당 노드의 정보를 수정할 수 있도록 한다.
|
||||
// 서버에 요청하여 해당 노드의 정보를 수정할 수 있도록 한다.
|
||||
var response_tags = new Array('error','message', 'xml_file');
|
||||
exec_xml('board', 'procBoardAdminMakeXmlFile', params, completeInsertCategory, response_tags, params);
|
||||
}
|
||||
|
|
@ -231,7 +341,7 @@ function doDeleteCategory(category_srl) {
|
|||
procFilter(fo_obj, delete_category);
|
||||
}
|
||||
|
||||
/* 카테고리 아이템 삭제 후 */
|
||||
/* 카테고리 아이템 삭제 후 */
|
||||
function completeDeleteCategory(ret_obj) {
|
||||
var module_srl = ret_obj['module_srl'];
|
||||
var category_srl = ret_obj['category_srl'];
|
||||
|
|
@ -243,5 +353,5 @@ function completeDeleteCategory(ret_obj) {
|
|||
var obj = xGetElementById('category_info');
|
||||
xInnerHtml(obj, "");
|
||||
obj.style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue