mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-22 11:52:14 +09:00
Merge pull request #86 from xefork-YJSoft/YJSoft-patch-1
설문조사 기본 스킨의 AJAX 요청 횟수를 줄임
This commit is contained in:
commit
93118602f0
6 changed files with 50 additions and 52 deletions
|
|
@ -133,9 +133,16 @@ function deleteItem(poll_srl,poll_srl_indexes,poll_item_srl) {
|
|||
return false;
|
||||
}
|
||||
|
||||
function loadPoll(poll_srl)
|
||||
function loadPoll(poll_srl,data)
|
||||
{
|
||||
jQuery.exec_json("poll.getPollinfo", {"poll_srl":poll_srl}, function(data){
|
||||
if(typeof data == 'undefined')
|
||||
{
|
||||
jQuery.exec_json("poll.getPollinfo", {"poll_srl":poll_srl}, function(data){
|
||||
loadPoll(parseInt(data.poll.poll_srl),data);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery("#stop_date_"+poll_srl).html(data.poll.stop_date);
|
||||
|
||||
initTemplete('poll');
|
||||
|
|
@ -164,7 +171,7 @@ function loadPoll(poll_srl)
|
|||
jQuery("#poll_" + poll_srl + '_result').css({
|
||||
display: "none"
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function showPollMemberNext(poll_srl,poll_item_srl)
|
||||
|
|
@ -254,17 +261,16 @@ function showPollMember(poll_srl,poll_item_srl)
|
|||
return false;
|
||||
}
|
||||
|
||||
function loadPollResult(poll_srl)
|
||||
function loadPollResult(poll_srl,data)
|
||||
{
|
||||
jQuery.exec_json("poll.getPollinfo", {"poll_srl":poll_srl}, function(data){
|
||||
/*
|
||||
<block cond="$val->poll_count">
|
||||
{@$per = (int)(( $item->poll_count / $val->poll_count)*100) }
|
||||
</block>
|
||||
<block cond="!$val->poll_count">
|
||||
{@$per = 0}
|
||||
</block>
|
||||
*/
|
||||
if(typeof data == 'undefined')
|
||||
{
|
||||
jQuery.exec_json("poll.getPollinfo", {"poll_srl":poll_srl}, function(data){
|
||||
loadPollResult(parseInt(data.poll.poll_srl),data);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery("#stop_date_result_" + poll_srl).html(data.poll.stop_date);
|
||||
jQuery("#poll_count_result_" + poll_srl).html(data.poll.poll_count);
|
||||
|
||||
|
|
@ -311,13 +317,7 @@ function loadPollResult(poll_srl)
|
|||
jQuery("#poll_" + poll_srl + '_result').css({
|
||||
display: "block"
|
||||
});
|
||||
/*
|
||||
<!--@foreach($poll->poll as $poll_srl_index => $val)-->
|
||||
<!--@foreach($val->item as $item_srl => $item)-->
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
*/
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
jQuery(function($){
|
||||
|
|
@ -401,4 +401,4 @@ jQuery(function($){
|
|||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -3,11 +3,11 @@
|
|||
var poll_alert_lang = "{$lang->msg_check_poll_item}";
|
||||
var poll_checkcount_lang = "{$lang->poll_checkcount}";
|
||||
var poll_member_lang = "{$lang->poll_item_members}";
|
||||
jQuery.exec_json("poll.getPollstatus", {/**/"poll_srl":{$poll_srl}/**/}, function(data){/**/
|
||||
if(data.is_polled==0) loadPoll({$poll_srl});
|
||||
jQuery.exec_json("poll.getPollinfo", {/**/"poll_srl":{$poll_srl}/**/}, function(data){/**/
|
||||
if(data.poll.is_polled==0) loadPoll({$poll_srl},data);
|
||||
else
|
||||
{
|
||||
loadPollResult({$poll_srl});
|
||||
loadPollResult({$poll_srl},data);
|
||||
jQuery("#poll_{$poll_srl}_result_button").css({/**/
|
||||
display: "none"
|
||||
/**/});
|
||||
|
|
@ -202,4 +202,4 @@
|
|||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -133,9 +133,16 @@ function deleteItem(poll_srl,poll_srl_indexes,poll_item_srl) {
|
|||
return false;
|
||||
}
|
||||
|
||||
function loadPoll(poll_srl)
|
||||
function loadPoll(poll_srl,data)
|
||||
{
|
||||
jQuery.exec_json("poll.getPollinfo", {"poll_srl":poll_srl}, function(data){
|
||||
if(typeof data == 'undefined')
|
||||
{
|
||||
jQuery.exec_json("poll.getPollinfo", {"poll_srl":poll_srl}, function(data){
|
||||
loadPoll(parseInt(data.poll.poll_srl),data);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery("#stop_date_"+poll_srl).html(data.poll.stop_date);
|
||||
|
||||
initTemplete('poll');
|
||||
|
|
@ -164,7 +171,7 @@ function loadPoll(poll_srl)
|
|||
jQuery("#poll_" + poll_srl + '_result').css({
|
||||
display: "none"
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function showPollMemberNext(poll_srl,poll_item_srl)
|
||||
|
|
@ -254,17 +261,16 @@ function showPollMember(poll_srl,poll_item_srl)
|
|||
return false;
|
||||
}
|
||||
|
||||
function loadPollResult(poll_srl)
|
||||
function loadPollResult(poll_srl,data)
|
||||
{
|
||||
jQuery.exec_json("poll.getPollinfo", {"poll_srl":poll_srl}, function(data){
|
||||
/*
|
||||
<block cond="$val->poll_count">
|
||||
{@$per = (int)(( $item->poll_count / $val->poll_count)*100) }
|
||||
</block>
|
||||
<block cond="!$val->poll_count">
|
||||
{@$per = 0}
|
||||
</block>
|
||||
*/
|
||||
if(typeof data == 'undefined')
|
||||
{
|
||||
jQuery.exec_json("poll.getPollinfo", {"poll_srl":poll_srl}, function(data){
|
||||
loadPollResult(parseInt(data.poll.poll_srl),data);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
jQuery("#stop_date_result_" + poll_srl).html(data.poll.stop_date);
|
||||
jQuery("#poll_count_result_" + poll_srl).html(data.poll.poll_count);
|
||||
|
||||
|
|
@ -311,13 +317,7 @@ function loadPollResult(poll_srl)
|
|||
jQuery("#poll_" + poll_srl + '_result').css({
|
||||
display: "block"
|
||||
});
|
||||
/*
|
||||
<!--@foreach($poll->poll as $poll_srl_index => $val)-->
|
||||
<!--@foreach($val->item as $item_srl => $item)-->
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
*/
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
jQuery(function($){
|
||||
|
|
@ -401,4 +401,4 @@ jQuery(function($){
|
|||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -3,11 +3,11 @@
|
|||
var poll_alert_lang = "{$lang->msg_check_poll_item}";
|
||||
var poll_checkcount_lang = "{$lang->poll_checkcount}";
|
||||
var poll_member_lang = "{$lang->poll_item_members}";
|
||||
jQuery.exec_json("poll.getPollstatus", {/**/"poll_srl":{$poll_srl}/**/}, function(data){/**/
|
||||
if(data.is_polled==0) loadPoll({$poll_srl});
|
||||
jQuery.exec_json("poll.getPollinfo", {/**/"poll_srl":{$poll_srl}/**/}, function(data){/**/
|
||||
if(data.poll.is_polled==0) loadPoll({$poll_srl},data);
|
||||
else
|
||||
{
|
||||
loadPollResult({$poll_srl});
|
||||
loadPollResult({$poll_srl},data);
|
||||
jQuery("#poll_{$poll_srl}_result_button").css({/**/
|
||||
display: "none"
|
||||
/**/});
|
||||
|
|
@ -145,4 +145,4 @@
|
|||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue