mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
default 설문조사 스킨의 스크립트 다듬음
https://github.com/rhymix/rhymix/pull/156 1. 사용하지 않는 스크립트 삭제. 2. onclick event 를 적용할 때 jQuery 를 한번 더 거치는 것은 비효율적이라 생각해서 직접 적용. 3. 스크립트 함수명이 simple 스킨과 겹쳐서 생길 수 있는 문제 회피 4. CSS display 속성을 단일화 해서 제어하도록 함수 내에 내장. ( simple 스킨과 함수명을 공유하지 않기 때문에 가능 )
This commit is contained in:
parent
afa1e71d59
commit
524cb78115
2 changed files with 44 additions and 124 deletions
|
|
@ -4,23 +4,9 @@
|
|||
var poll_checkcount_lang = "{$lang->poll_checkcount}";
|
||||
var poll_member_lang = "{$lang->poll_item_members}";
|
||||
jQuery(document).ready(function(){
|
||||
var data = {json_encode($poll_data)};
|
||||
if(data.poll.is_polled==0) loadRxDefaultPoll({$poll_srl},data);
|
||||
else
|
||||
{
|
||||
loadRxDefaultPollResult({$poll_srl},data);
|
||||
jQuery("#poll_{$poll_srl}_result_button").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
jQuery("#poll_{$poll_srl}_result_nobutton").css({
|
||||
display: "block"
|
||||
});
|
||||
|
||||
jQuery("#poll_{$poll_srl}_result_yesbutton").css({
|
||||
display: "none"
|
||||
});
|
||||
}
|
||||
var data = {json_encode($poll_data)};
|
||||
if(data.poll.is_polled==0) loadRxDefaultPoll({$poll_srl},data);
|
||||
else loadRxDefaultPollResult({$poll_srl},data);
|
||||
});
|
||||
</script>
|
||||
<div style="{$style}" class="rx_poll_default_wrap">
|
||||
|
|
@ -48,13 +34,13 @@
|
|||
{{item.title}}
|
||||
</label>
|
||||
{{#if item.my_item}}
|
||||
<input type="button" value="x" title="{$lang->delete_poll_item}" onclick="deleteItem({{question.poll_srl}},{{question.poll_index_srl}},{{item.poll_item_srl}})" class="btn poll_button poll_item_delete" />
|
||||
<input type="button" value="x" title="{$lang->delete_poll_item}" onclick="deleteRxDefaultItem({{question.poll_srl}},{{question.poll_index_srl}},{{item.poll_item_srl}}); return false;" class="btn poll_item_delete" />
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
{{#if question.additem}}
|
||||
<div class="poll_item_add">
|
||||
<input type="text" name="new_item" id="new_item_{{question.poll_index_srl}}" class="poll_item_add" placeholder="{$lang->msg_can_add_item}" /> <input type="button" value="+" title="{$lang->add_poll_item}" onclick="addItem({{question.poll_srl}},{{question.poll_index_srl}})" style="float: right;" class="btn poll_button poll_item_add" />
|
||||
<input type="text" name="new_item" id="new_item_{{question.poll_index_srl}}" class="poll_item_add" placeholder="{$lang->msg_can_add_item}" /> <input type="button" value="+" title="{$lang->add_poll_item}" onclick="addRxDefaultItem({{question.poll_srl}},{{question.poll_index_srl}}); return false;" style="float: right;" class="btn poll_item_add" />
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
@ -63,7 +49,7 @@
|
|||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'widgets/pollWidget/skins/default/form/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form ruleset="poll" action="./" method="post" onsubmit="return doPoll(this)">
|
||||
<form ruleset="poll" action="./" method="post" onsubmit="return doRxDefaultPoll(this)">
|
||||
<input type="hidden" name="module" value="poll" />
|
||||
<input type="hidden" name="act" value="procPoll" />
|
||||
<input type="hidden" name="poll_srl" value="{$poll_srl}" />
|
||||
|
|
@ -80,8 +66,8 @@
|
|||
<div id="poll_content_{$poll_srl}" class="rx_poll_content">
|
||||
</div>
|
||||
<div class="poll_button">
|
||||
<input type="button" value="{$lang->cmd_view_result}" class="btn poll_button _rx_default_poll_result _srl_{$poll_srl}" />
|
||||
<input type="submit" value="{$lang->cmd_apply_poll}" class="btn poll_button" />
|
||||
<input type="button" value="{$lang->cmd_view_result}" class="btn" onclick="loadRxDefaultPollResult({$poll_srl}); return false;" />
|
||||
<input type="submit" value="{$lang->cmd_apply_poll}" class="btn" />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
|
@ -122,7 +108,7 @@
|
|||
{{/if}}
|
||||
{{/each}}
|
||||
{{#if isPage}}
|
||||
<input type="button" id="btn_load_more_{{poll_item_srl}}" value="More..." onclick="showRxDefaultPollMemberNext({{poll_srl}},{{poll_item_srl}});return false;" style="width:100%;" class="btn poll_button" />
|
||||
<input type="button" id="btn_load_more_{{poll_item_srl}}" value="{$lang->more}" onclick="showRxDefaultPollMemberNext({{poll_srl}},{{poll_item_srl}});return false;" style="width:100%;" class="btn" />
|
||||
{{/if}}
|
||||
</script>
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/poll/skins/default/form/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
|
|
@ -141,7 +127,12 @@
|
|||
</div>
|
||||
<div id="poll_{$poll_srl}_result_button" class="rx_poll_footer" style="width:100%;display: none;">
|
||||
<div class="poll_button">
|
||||
<input type="button" value="{$lang->btn_poll_gotovote}" class="btn poll_button _rx_default_poll_screen _srl_{$poll_srl}" />
|
||||
<input type="button" value="{$lang->btn_poll_gotovote}" class="btn" onclick="loadRxDefaultPoll({$poll_srl}); return false;" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="poll_{$poll_srl}_gotoresult_button" class="rx_poll_footer" style="width:100%;display: none;">
|
||||
<div class="poll_button">
|
||||
<input type="button" value="{$lang->cmd_view_result}" class="btn" onclick="loadRxDefaultPollResult({$poll_srl}); return false;" />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue