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

@ -197,14 +197,8 @@
function procPollGetList()
{
if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');
// Taken from a list of selected sessions
$flagList = $_SESSION['poll_management'];
if(count($flagList)) {
foreach($flagList as $key => $val) {
if(!is_bool($val)) continue;
$pollSrlList[] = $key;
}
}
$pollSrls = Context::get('poll_srls');
if($pollSrls) $pollSrlList = explode(',', $pollSrls);
global $lang;
if(count($pollSrlList) > 0) {

View file

@ -57,8 +57,15 @@ function completeMovePoll(ret_obj, response_tags) {
function getPollList()
{
var pollListTable = jQuery('#pollListTable');
var cartList = [];
pollListTable.find(':checkbox[name=cart]').each(function(){
if(this.checked) cartList.push(this.value);
});
var params = new Array();
var response_tags = ['error','message', 'poll_list'];
params["poll_srls"] = cartList.join(",");
exec_xml('poll','procPollGetList',params, completeGetPollList, response_tags);
}
@ -91,15 +98,3 @@ function completeGetPollList(ret_obj, response_tags)
}
jQuery('#pollManageListTable>tbody').html(htmlListBuffer);
}
function addCart(poll_index_srl) {
var params = new Array();
var response_tags = ['error','message'];
params['poll_index_srl'] = poll_index_srl;
exec_xml('poll','procPollAdminAddCart',params, completeAddCart, response_tags);
}
function completeAddCart(ret_obj, response_tags)
{
}

View file

@ -5,10 +5,10 @@
<form action="" class="form">
<h1 class="h1">{$lang->poll}</h1>
<div class="table even">
<table width="100%" border="1" cellspacing="0">
<table width="100%" border="1" cellspacing="0" id="pollListTable">
<caption>
All({number_format($total_count)})
<span class="side"><span class="btn"><a href="#listManager" class="modalAnchor" onclick="getPollList">{$lang->poll_manager}...</a></span></span>
<span class="side"><span class="btn"><a href="#listManager" class="modalAnchor" onclick="getPollList();">{$lang->poll_manager}...</a></span></span>
</caption>
<thead>
<tr>
@ -17,7 +17,7 @@
<th scope="col">{$lang->poll_join_count}</th>
<th scope="col">{$lang->author}</th>
<th scope="col">{$lang->regdate}</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>
@ -27,7 +27,7 @@
<th scope="col">{$lang->poll_join_count}</th>
<th scope="col">{$lang->author}</th>
<th scope="col">{$lang->regdate}</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>
@ -39,7 +39,7 @@
<td><a href="#popup_menu_area">{$val->nick_name}</a></td>
<td>{zdate($val->regdate,"Y-m-d H:i")}</td>
<td>
<input type="checkbox" name="cart[]" value="{$val->poll_index_srl}" <!--@if($val->isCarted)-->checked<!--@end--> onclick="addCart({$val->poll_index_srl})" />
<input type="checkbox" name="cart" value="{$val->poll_index_srl}" />
</td>
</tr>
<!--@end-->