git-svn-id: http://xe-core.googlecode.com/svn/trunk@1060 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-04-10 01:18:27 +00:00
parent e5cc1d7eb0
commit 99021b62fa
6 changed files with 40 additions and 1 deletions

View file

@ -41,6 +41,8 @@ function xml_response_filter(oXml, callback_func, response_tags, callback_func_a
return null;
}
if(!callback_func) return null;
callback_func(ret_obj, response_tags, callback_func_arg, fo_obj);
return null;

View file

@ -4,6 +4,18 @@
* @brief board 모듈의 javascript
**/
/* 관리자가 카트 선택시 세션에 넣음 */
function doAddCart(obj) {
var document_srl = obj.value;
var check_flag = obj.checked?'add':'remove';
var params = new Array();
params["document_srl"] = document_srl;
params["check_flag"] = check_flag;
exec_xml("document","procDocumentAddCart", params, null);
}
/* 글쓰기 작성후 */
function completeDocumentInserted(ret_obj) {
var error = ret_obj['error'];

View file

@ -41,7 +41,7 @@
]
<!--@end-->
<!--@if($logged_info->is_admin=='Y')-->
<!--@if($logged_info->manager =='Y')-->
<a href="{getUrl('act','dispBoardAdminBoardInfo')}">[{$lang->cmd_management}]</a>
<!--@end-->
</div>
@ -86,6 +86,9 @@
<!--@end-->
<td>
<!--@if($grant->manager)-->
<input type="checkbox" value="{$val->document_srl}" onclick="doAddCart(this)" <!--@if($val->checked)-->checked="true"<!--@end--> />
<!--@end-->
<!--@if($grant->view)-->
<a href="{getUrl('document_srl',$val->document_srl)}">{$val->title}</a>
<!--@else-->

View file

@ -3,6 +3,8 @@
<grants />
<actions>
<action name="dispDocumentAdminList" type="view" admin_index="true" standalone="true" />
<action name="procDocumentAddCart" type="controller" standalone="true" />
<action name="procDocumentAdminDeleteChecked" type="controller" standalone="true" />
</actions>
</module>

View file

@ -13,6 +13,21 @@
function init() {
}
/**
* @brief 관리자가 선택시 세션에 담음
**/
function procDocumentAddCart() {
$document_srl = Context::get('document_srl');
$check_flag = Context::get('check_flag');
$flag_list = $_SESSION['document_management'];
if($check_flag == 'remove') unset($flag_list[$document_srl]);
else $flag_list[$document_srl] = true;
$_SESSION['document_management'] = $flag_list;
}
/**
* @brief 관리자 페이지에서 선택된 문서들 삭제
**/

View file

@ -221,6 +221,9 @@
$oMemberModel = &getModel('member');
$member_srl = $oMemberModel->getLoggedMemberSrl();
// 체크 플래그
$flag_list = $_SESSION['document_management'];
foreach($output->data as $key => $document) {
$is_granted = false;
@ -228,6 +231,8 @@
elseif($member_srl && $member_srl == $document->member_srl) $is_granted = true;
$output->data[$key]->is_granted = $is_granted;
if($flag_list[$document->document_srl]) $output->data[$key]->checked = true;
}
return $output;
}