issue 70 poll module's admin UI/UX modified.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8721 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2011-08-04 05:34:03 +00:00
parent f7c964226a
commit 3e70a2c10c
30 changed files with 335 additions and 92 deletions

View file

@ -54,3 +54,52 @@ function completeMovePoll(ret_obj, response_tags) {
if(comment_srl) url = url+'#comment_'+comment_srl;
winopen(url, 'pollTarget');
}
function getPollList()
{
var params = new Array();
var response_tags = ['error','message', 'poll_list'];
exec_xml('poll','procPollGetList',params, completeGetPollList, response_tags);
}
function completeGetPollList(ret_obj, response_tags)
{
var htmlListBuffer = '';
if(ret_obj['poll_list'] == null)
{
htmlListBuffer = '<tr>' +
'<td colspan="3" style="text-align:center;">'+ret_obj['message']+'</td>' +
'</tr>';
}
else
{
var poll_list = ret_obj['poll_list']['item'];
if(!jQuery.isArray(poll_list)) poll_list = [poll_list];
for(var x in poll_list)
{
var objPoll = poll_list[x];
htmlListBuffer += '<tr>' +
'<td class="title">'+objPoll.title+'</td>' +
'<td>'+objPoll.poll_count+'</td>' +
'<td>'+objPoll.nick_name+'</td>' +
'</tr>' +
'<input type="hidden" name="cart[]" value="'+objPoll.poll_index_srl+'" />';
}
jQuery('#selectedPollCount').html(poll_list.length);
}
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)
{
}