mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1062 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
8833885ea0
commit
bf19a8cf2a
15 changed files with 187 additions and 32 deletions
|
|
@ -234,17 +234,41 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 세션에 담긴 선택글의 이동
|
||||
* @brief 세션에 담긴 선택글의 이동/ 삭제
|
||||
**/
|
||||
function procBoardAdminMoveCheckedDocument() {
|
||||
$this->setMessage('success_moved');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 세션에 담긴 선택글의 삭제
|
||||
**/
|
||||
function procBoardAdminDeleteCheckedDocument() {
|
||||
$this->setMessage('success_deleted');
|
||||
function procBoardAdminManageCheckedDocument() {
|
||||
$type = Context::get('type');
|
||||
$module_srl = Context::get('target_board');
|
||||
$flag_list = $_SESSION['document_management'][$this->module_srl];
|
||||
|
||||
$document_srl_list = array_keys($flag_list);
|
||||
|
||||
$oDocumentController = &getController('document');
|
||||
$document_srl_count = count($document_srl_list);
|
||||
|
||||
if($type == 'move') {
|
||||
if(!$module_srl) return new Object(-1, 'fail_to_move');
|
||||
else {
|
||||
$output = $oDocumentController->moveDocumentModule($document_srl_list, $module_srl, $this->module_srl);
|
||||
if(!$output->toBool()) return new Object(-1, 'fail_to_move');
|
||||
$msg_code = 'success_moved';
|
||||
$_SESSION['document_management'][$this->module_srl] = null;
|
||||
}
|
||||
|
||||
} elseif($type =='delete') {
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
for($i=0;$i<$document_srl_count;$i++) {
|
||||
$document_srl = $document_srl_list[$i];
|
||||
$output = $oDocumentController->deleteDocument($document_srl, true);
|
||||
if(!$output->toBool()) return new Object(-1, 'fail_to_delete');
|
||||
}
|
||||
$oDB->commit();
|
||||
$msg_code = 'success_deleted';
|
||||
$_SESSION['document_management'][$this->module_srl] = null;
|
||||
}
|
||||
|
||||
$this->setMessage($msg_code);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@
|
|||
<action name="procBoardAdminInsertCategory" type="controller" standalone="true" />
|
||||
<action name="procBoardAdminUpdateCategory" type="controller" standalone="true" />
|
||||
<action name="procBoardAdminInsertConfig" type="controller" standalone="true" />
|
||||
<action name="procBoardAdminDeleteCheckedDocument" type="controller" standalone="true" />
|
||||
<action name="procBoardAdminMoveCheckedDocument" type="controller" standalone="true" />
|
||||
<action name="procBoardAdminManageCheckedDocument" type="controller" standalone="true" />
|
||||
</actions>
|
||||
</module>
|
||||
|
|
|
|||
|
|
@ -49,4 +49,5 @@
|
|||
$lang->msg_category_is_null = '등록된 분류가 없습니다';
|
||||
$lang->msg_grant_is_null = '등록된 권한 대상이 없습니다';
|
||||
$lang->msg_no_checked_document = '선택된 게시물이 없습니다';
|
||||
$lang->msg_move_failed = '이동 실패하였습니다';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
<!--%import("filter/delete_checked_document.xml")-->
|
||||
<!--%import("filter/move_checked_document.xml")-->
|
||||
<!--%import("filter/manage_checked_document.xml")-->
|
||||
<!--%import("js/board_admin.js")-->
|
||||
|
||||
<div style="width:400px">
|
||||
|
|
@ -8,19 +7,21 @@
|
|||
|
||||
<!--@if(count($document_list))-->
|
||||
|
||||
<form action="./" method="get">
|
||||
<form action="./" method="get" id="fo_management">
|
||||
<input type="hidden" name="mid" value="{$mid}" />
|
||||
<input type="hidden" name="type" value="" />
|
||||
<div>{$lang->checked_count} : {count($document_list)}</div>
|
||||
|
||||
<div><a href="#" onclick="delete_checked_document(); return false;">{$lang->cmd_delete}</a></div>
|
||||
<div><a href="#" onclick="doManageDocument('delete');return false;">{$lang->cmd_delete}</a></div>
|
||||
<div>
|
||||
<select name="board_list">
|
||||
<select name="target_board">
|
||||
<!--@foreach($board_list as $key => $val)-->
|
||||
<!--@if($module_srl != $val->module_srl)-->
|
||||
<option value="{$val->module_srl}">{$val->browser_title} ({$val->mid})</option>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
</select>
|
||||
<a href="#" onclick="move_checked_document(); return false;">{$lang->cmd_move}</a>
|
||||
<a href="#" onclick="doManageDocument('move');return false;">{$lang->cmd_move}</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
<filter name="delete_checked_document" module="board" act="procBoardAdminDeleteCheckedDocument" confirm_msg_code="confirm_delete">
|
||||
<form />
|
||||
<response callback_func="completeManageDocument">
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<filter name="move_checked_document" module="board" act="procBoardAdminMoveCheckedDocument" confirm_msg_code="confirm_move">
|
||||
<filter name="manage_checked_document" module="board" act="procBoardAdminManageCheckedDocument">
|
||||
<form />
|
||||
<response callback_func="completeManageDocument">
|
||||
<tag name="error" />
|
||||
|
|
@ -100,8 +100,17 @@ function doChangeCategory(sel_obj, url) {
|
|||
else location.href=url+'&module_category_srl='+module_category_srl;
|
||||
}
|
||||
|
||||
/* 선택된 글의 삭제 또는 이동 */
|
||||
function doManageDocument(type, mid) {
|
||||
var fo_obj = xGetElementById("fo_management");
|
||||
fo_obj.type.value = type;
|
||||
|
||||
procFilter(fo_obj, manage_checked_document);
|
||||
}
|
||||
|
||||
/* 선택된 글의 삭제 또는 이동 후 */
|
||||
function completeManageDocument(ret_obj) {
|
||||
if(opener) opener.location.href = opener.location.href;
|
||||
alert(ret_obj['message']);
|
||||
window.close();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue