issue 70 change list check all, because session not use.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8847 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2011-08-23 11:36:03 +00:00
parent 569e972e07
commit 85f921f9e9
15 changed files with 66 additions and 107 deletions

View file

@ -679,14 +679,8 @@
function procCommentGetList()
{
if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');
// Taken from a list of selected sessions
$flagList = $_SESSION['comment_management'];
if(count($flagList)) {
foreach($flagList as $key => $val) {
if(!is_bool($val)) continue;
$commentSrlList[] = $key;
}
}
$commentSrls = Context::get('comment_srls');
if($commentSrls) $commentSrlList = explode(',', $commentSrls);
if(count($commentSrlList) > 0) {
$oCommentModel = &getModel('comment');

View file

@ -11,7 +11,7 @@
| <a href="{getUrl('search_target','is_secret','search_keyword', $value->is_secret)}">{$secret_name_list[$value->is_secret]}({$value->count})</a>
<!--@end-->
</div>
<table width="100%" border="1" cellspacing="0">
<table width="100%" border="1" cellspacing="0" id="commentListTable">
<caption>
All({number_format($total_count)})
<div class="side">
@ -26,7 +26,7 @@
<th scope="col">{$lang->date}</th>
<th scope="col">{$lang->ipaddress}</th>
<th scope="col">{$lang->status}</th>
<th scope="col"><input type="checkbox" title="Check All" /></th>
<th scope="col"><input type="checkbox" data-name="cart" title="Check All" /></th>
</tr>
</thead>
<tfoot>
@ -37,7 +37,7 @@
<th scope="col">{$lang->date}</th>
<th scope="col">{$lang->ipaddress}</th>
<th scope="col">{$lang->status}</th>
<th scope="col"><input type="checkbox" title="Check All" /></th>
<th scope="col"><input type="checkbox" data-name="cart" title="Check All" /></th>
</tr>
</tfoot>
<tbody>
@ -50,7 +50,7 @@
<td>{(zdate($val->regdate,"Y-m-d\nH:i:s"))}</td>
<td><a href="{getUrl('search_target','ipaddress','search_keyword',$val->ipaddress)}">{$val->ipaddress}</a></td>
<td><!--@if($val->isSecret())-->{$secret_name_list['Y']}<!--@else-->{$secret_name_list['N']}<!--@end--></td>
<td><input type="checkbox" name="cart" value="{$val->comment_srl}" onclick="addCart({$val->comment_srl})" <!--@if($val->isCarted())-->checked="checked"<!--@end--> /></td>
<td><input type="checkbox" name="cart" value="{$val->comment_srl}" /></td>
</tr>
<!--@end-->
</tbody>

View file

@ -17,22 +17,21 @@ function insertSelectedModule(id, module_srl, mid, browser_title) {
location.href = current_url.setQuery('module_srl',module_srl);
}
function addCart(comment_srl) {
var params = new Array();
var response_tags = ['error','message'];
params['comment_srl'] = comment_srl;
exec_xml('comment','procCommentAdminAddCart',params, completeAddCart, response_tags);
}
function completeAddCart(ret_obj, response_tags)
{
}
function getCommentList()
{
var commentListTable = jQuery('#commentListTable');
var cartList = [];
commentListTable.find(':checkbox[name=cart]').each(function(){
if(this.checked) cartList.push(this.value);
});
var params = new Array();
var response_tags = ['error','message', 'comment_list'];
params["comment_srls"] = cartList.join(",");
exec_xml('comment','procCommentGetList',params, completeGetCommentList, response_tags);
}