Fix conflicted, handlebars.min.js
|
|
@ -18,8 +18,8 @@
|
|||
<description xml:lang="ru">Вы можете присоединить опрос при написании статей. Компонент опросов зависит от настроек модуля отпросов.</description>
|
||||
<description xml:lang="zh-TW">發表主題時可以附加投票調查。投票調查組件受投票調查模組設置的影響。</description>
|
||||
<description xml:lang="tr">Oylamaları yazı makalelerine ekleyebilirsiniz. Oylama bileşeni, oylama modülü ayarlarından ayarlanır.</description>
|
||||
<version>1.7</version>
|
||||
<date>2013-11-27</date>
|
||||
<version>2.0</version>
|
||||
<date>2015-06-09</date>
|
||||
|
||||
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
|
||||
<name xml:lang="vi">NAVER</name>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class poll_maker extends EditorHandler
|
|||
{
|
||||
// Wanted Skins survey
|
||||
$oModuleModel = getModel('module');
|
||||
$skin_list = $oModuleModel->getSkins(_XE_PATH_ . 'modules/poll/');
|
||||
$skin_list = $oModuleModel->getSkins(_XE_PATH_ . 'widgets/pollWidget/');
|
||||
Context::set('skin_list', $skin_list);
|
||||
// Pre-compiled source code to compile template return to
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
|
|
@ -45,17 +45,29 @@ class poll_maker extends EditorHandler
|
|||
*/
|
||||
function transHTML($xml_obj)
|
||||
{
|
||||
$poll_srl = $xml_obj->attrs->poll_srl;
|
||||
$args = new stdClass();
|
||||
|
||||
$args->poll_srl = $xml_obj->attrs->poll_srl;
|
||||
$skin = $xml_obj->attrs->skin;
|
||||
if(!$skin) $skin = 'default';
|
||||
$args->skin = $skin;
|
||||
|
||||
preg_match('/width([^[:digit:]]+)([0-9]+)/i',$xml_obj->attrs->style,$matches);
|
||||
$width = $matches[2];
|
||||
if(!$width) $width = 400;
|
||||
$style = sprintf('width:%dpx', $width);
|
||||
// poll model object creation to come get it return html
|
||||
$oPollModel = getModel('poll');
|
||||
return $oPollModel->getPollHtml($poll_srl, $style, $skin);
|
||||
$args->style = sprintf('width:%dpx', $width);
|
||||
|
||||
// Set a path of the template skin (values of skin, colorset settings)
|
||||
$tpl_path = sprintf('%sskins/%s', _XE_PATH_ . 'widgets/pollWidget/', $args->skin);
|
||||
$tpl_file = 'pollview';
|
||||
|
||||
Context::set('colorset', $args->colorset);
|
||||
Context::set('poll_srl', $args->poll_srl);
|
||||
Context::set('style', $args->style);
|
||||
|
||||
// Compile a template
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
}
|
||||
/* End of file poll_maker.class.php */
|
||||
|
|
|
|||
BIN
modules/editor/components/poll_maker/poll_maker_component.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
|
|
@ -18,8 +18,8 @@
|
|||
<div class="x_control-group">
|
||||
<label for="" class="x_control-label">{$lang->poll_stop_date}</label>
|
||||
<div class="x_controls">
|
||||
<input type="hidden" name="stop_date" id="stop_date" value="{date('Ymd',time()+60*60*24*7)}" />
|
||||
<input type="date" class="inputDate" value="{date('Y-m-d',time()+60*60*24*7)}" />
|
||||
<input type="hidden" name="stop_date" id="stop_date" value="{date('Ymd',time()+60*60*24*30)}" />
|
||||
<input type="date" class="inputDate" value="{date('Y-m-d',time()+60*60*24*30)}" />
|
||||
<script>
|
||||
(function($){
|
||||
$(function(){
|
||||
|
|
@ -31,7 +31,7 @@ $(function(){
|
|||
, onSelect:function(){
|
||||
$(this).prev('input[type="hidden"]').val(this.value.replace(/-/g,""));
|
||||
}
|
||||
,minDate: new Date("{date('Y-m-d',time())}")
|
||||
,minDate: new Date("{date('Y-m-d',time()+60*60*24*30)}")
|
||||
};
|
||||
$.extend(option,$.datepicker.regional['{$lang_type}']);
|
||||
$(".inputDate").datepicker(option);
|
||||
|
|
@ -42,15 +42,30 @@ $(function(){
|
|||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="" class="x_control-label">{$lang->skin}</label>
|
||||
<label for="skin" class="x_control-label">{$lang->skin}</label>
|
||||
<div class="x_controls">
|
||||
<select name="skin">
|
||||
<select id="skin" name="skin">
|
||||
<!--@foreach($skin_list as $skin=>$skin_info)-->
|
||||
<option value="{$skin}">{$skin_info->title} (skin by {$skin_info->maker->name})</option>
|
||||
<option value="{$skin}">{$skin_info->title} (skin by <!--@foreach($skin_info->author as $author=>$author_info)-->{@ $authorname = array(); $authorname[] = $author_info->name; }<!--@end-->{implode(",",$authorname)})</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">사용자 공개</label>
|
||||
<div class="x_controls">
|
||||
<input type="radio" name="show_vote" value="1" /> 투표한 사용자 공개
|
||||
<input type="radio" name="show_vote" value="0" checked="checked" /> 투표한 사용자 비공개
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">항목 추가</label>
|
||||
<div class="x_controls">
|
||||
<input type="radio" name="add_item" value="2" /> 항목 추가 가능
|
||||
<input type="radio" name="add_item" value="0" checked="checked" /> 항목 추가 금지
|
||||
</div>
|
||||
</div>
|
||||
<div id="poll_source" style="display:none">
|
||||
<div class="table">
|
||||
<table class="x_table x_table-striped x_table-hover">
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ function completeInsertPoll(ret_obj) {
|
|||
if(!poll_srl) return null;
|
||||
|
||||
var text = "<img src=\"../../../../common/img/blank.gif\" poll_srl=\""+poll_srl+"\" editor_component=\"poll_maker\" skin=\""+skin+"\" style=\"display:block;width:400px;height:300px;border:2px dotted #4371B9;background:url(./modules/editor/components/poll_maker/tpl/poll_maker_component.gif) no-repeat center;\" />";
|
||||
|
||||
alert(ret_obj['message']);
|
||||
|
||||
opener.editorFocus(opener.editorPrevSrl);
|
||||
|
|
|
|||
1
modules/editor/components/poll_maker/tpl/popup.min.js
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
function completeInsertPoll(e){if("undefined"==typeof opener)return null;var t=get_by_id("fo_component"),o=t.skin.options[t.skin.selectedIndex].value,n=e.poll_srl;if(!n)return null;var l='<img src="../../../../common/img/blank.gif" poll_srl="'+n+'" editor_component="poll_maker" skin="'+o+'" style="display:block;width:400px;height:300px;border:2px dotted #4371B9;background:url(./modules/editor/components/poll_maker/tpl/poll_maker_component.gif) no-repeat center;" />';alert(e.message),opener.editorFocus(opener.editorPrevSrl);var i=opener.editorGetIFrame(opener.editorPrevSrl);return opener.editorReplaceHTML(i,l),opener.editorFocus(opener.editorPrevSrl),window.close(),null}jQuery(function(e){function t(){var t=e(".poll_box");$inputs=t.find("input"),poll_idx=0,$inputs.attr("name",function(e,t){return/^checkcount_/.test(t)&&poll_idx++,t.replace(/^([a-z]+_)(?:tidx|\d+)/,"$1"+poll_idx)}),t.length>1?t.find("button._del_poll").show():t.find("button._del_poll").hide()}function o(){var o=e("#poll_source");o.before(o.clone(!0).removeAttr("id").addClass("poll_box").css("display","block")),t()}var n;return n=e(opener.editorPrevNode),n.length&&"poll_maker"==n.attr("editor_component")?(alert(msg_poll_cannot_modify),window.close()):(e("#add_poll").click(function(){o(),setFixedPopupSize()}),e("button._add_item").click(function(){var t,o,n;t=e(this).prev().children("table").find(">tbody>tr:last"),o=t.clone(),match=t.find("td>input").attr("name").match(/item_(\d+)_(\d+)$/),match&&(match[2]++,(n=o.find("th")).html(n.html().replace(/ \d+/," "+match[2])),o.find("td>input").attr("name","item_"+match[1]+"_"+match[2]),t.after(o),setFixedPopupSize())}),e("button._del_item").click(function(){var t,o;t=e(this).prevAll("div").children("table").find(">tbody>tr:last"),o=t.find("td>input").attr("name").match(/item_(\d+)_(\d+)/),o&&2!=o[2]&&(t.remove(),setFixedPopupSize())}),e("button._del_poll").click(function(){e(this).parent(".poll_box").remove(),t()}),void o())}),jQuery(window).load(setFixedPopupSize);
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
<title xml:lang="ru">Опрос</title>
|
||||
<title xml:lang="zh-TW">投票調查</title>
|
||||
<title xml:lang="tr">Oylama</title>
|
||||
<description xml:lang="ko">설문조사 관리</description>
|
||||
<description xml:lang="ko">설문조사 관리를 위한 모듈입니다.</description>
|
||||
<description xml:lang="zh-CN">管理投票调查的模块。</description>
|
||||
<description xml:lang="jp">アンケート管理モジュール</description>
|
||||
<description xml:lang="en">This module is for managering polls.</description>
|
||||
|
|
@ -18,8 +18,8 @@
|
|||
<description xml:lang="ru">Этот модуль служит для управления опросами.</description>
|
||||
<description xml:lang="zh-TW">管理投票調查的模組。</description>
|
||||
<description xml:lang="tr">Oylamaları düzenlemek için kullanılan modüldür.</description>
|
||||
<version>1.7</version>
|
||||
<date>2013-11-27</date>
|
||||
<version>2.0</version>
|
||||
<date>2015-06-09</date>
|
||||
<category>content</category>
|
||||
|
||||
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
|
||||
|
|
@ -33,4 +33,4 @@
|
|||
<name xml:lang="zh-TW">NAVER</name>
|
||||
<name xml:lang="tr">NAVER</name>
|
||||
</author>
|
||||
</module>
|
||||
</module>
|
||||
|
|
@ -9,7 +9,12 @@
|
|||
<action name="getPollGetColorsetList" type="model" />
|
||||
<action name="getPollAdminTarget" type="model" />
|
||||
|
||||
<action name="getPollstatus" type="model" />
|
||||
<action name="getPollinfo" type="model" />
|
||||
<action name="getPollitemInfo" type="model" />
|
||||
<action name="procPollInsert" type="controller" />
|
||||
<action name="procPollInsertItem" type="controller" />
|
||||
<action name="procPollDeleteItem" type="controller" />
|
||||
<action name="procPoll" type="controller" ruleset="poll" />
|
||||
<action name="procPollViewResult" type="controller" />
|
||||
<action name="procPollGetList" type="controller" />
|
||||
|
|
|
|||
|
|
@ -250,4 +250,37 @@
|
|||
<value xml:lang="jp"><![CDATA[選択したアンケート]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[已選擇的投票]]></value>
|
||||
</item>
|
||||
<item name="poll_no_poll_srl">
|
||||
<value xml:lang="ko"><![CDATA[Poll srl 값이 없습니다.]]></value>
|
||||
</item>
|
||||
<item name="poll_no_poll_or_deleted_poll">
|
||||
<value xml:lang="ko"><![CDATA[삭제되었거나 잘못된 투표입니다.]]></value>
|
||||
</item>
|
||||
<item name="poll_item_members">
|
||||
<value xml:lang="ko"><![CDATA[%s 항목을 투표한 사용자]]></value>
|
||||
</item>
|
||||
<item name="btn_poll_gotovote">
|
||||
<value xml:lang="ko"><![CDATA[투표 화면으로 가기]]></value>
|
||||
</item>
|
||||
<item name="btn_poll_gotoresult">
|
||||
<value xml:lang="ko"><![CDATA[결과 화면으로 가기]]></value>
|
||||
</item>
|
||||
<item name="msg_cannot_vote">
|
||||
<value xml:lang="ko"><![CDATA[투표할 수 없습니다.]]></value>
|
||||
</item>
|
||||
<item name="msg_exceed_max_select">
|
||||
<value xml:lang="ko"><![CDATA[최대 투표 항목수를 초과했습니다.]]></value>
|
||||
</item>
|
||||
<item name="msg_cannot_add_item">
|
||||
<value xml:lang="ko"><![CDATA[항목을 추가할 수 없습니다.]]></value>
|
||||
</item>
|
||||
<item name="msg_cannot_delete_item">
|
||||
<value xml:lang="ko"><![CDATA[항목을 삭제할 수 없습니다.]]></value>
|
||||
</item>
|
||||
<item name="msg_item_title_cannot_empty">
|
||||
<value xml:lang="ko"><![CDATA[항목의 이름은 비어 있을수 없습니다.]]></value>
|
||||
</item>
|
||||
<item name="msg_cannot_delete_item_poll_exist">
|
||||
<value xml:lang="ko"><![CDATA[항목 투표수가 0 이상이므로 삭제할 수 없습니다.]]></value>
|
||||
</item>
|
||||
</lang>
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ class poll extends ModuleObject
|
|||
function checkUpdate()
|
||||
{
|
||||
$oModuleModel = getModel('module');
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 2007.10.17 When deleting posts/comments delete the poll as well
|
||||
if(!$oModuleModel->getTrigger('document.insertDocument', 'poll', 'controller', 'triggerInsertDocumentPoll', 'after')) return true;
|
||||
if(!$oModuleModel->getTrigger('comment.insertComment', 'poll', 'controller', 'triggerInsertCommentPoll', 'after')) return true;
|
||||
|
|
@ -46,6 +48,21 @@ class poll extends ModuleObject
|
|||
if(!$oModuleModel->getTrigger('document.deleteDocument', 'poll', 'controller', 'triggerDeleteDocumentPoll', 'after')) return true;
|
||||
if(!$oModuleModel->getTrigger('comment.deleteComment', 'poll', 'controller', 'triggerDeleteCommentPoll', 'after')) return true;
|
||||
|
||||
if(!$oDB->isColumnExists('poll', 'poll_type'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if(!$oDB->isColumnExists('poll_log','poll_item'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if(!$oDB->isColumnExists('poll_item','add_user_srl'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -56,6 +73,8 @@ class poll extends ModuleObject
|
|||
{
|
||||
$oModuleModel = getModel('module');
|
||||
$oModuleController = getController('module');
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 2007.10.17 When deleting posts/comments delete the poll as well
|
||||
if(!$oModuleModel->getTrigger('document.deleteDocument', 'poll', 'controller', 'triggerDeleteDocumentPoll', 'after'))
|
||||
$oModuleController->insertTrigger('document.deleteDocument', 'poll', 'controller', 'triggerDeleteDocumentPoll', 'after');
|
||||
|
|
@ -71,6 +90,21 @@ class poll extends ModuleObject
|
|||
if(!$oModuleModel->getTrigger('comment.updateComment', 'poll', 'controller', 'triggerUpdateCommentPoll', 'after'))
|
||||
$oModuleController->insertTrigger('comment.updateComment', 'poll', 'controller', 'triggerUpdateCommentPoll', 'after');
|
||||
|
||||
if(!$oDB->isColumnExists('poll','poll_type'))
|
||||
{
|
||||
$oDB->addColumn('poll', 'poll_type', 'number', 11, 0);
|
||||
}
|
||||
|
||||
if(!$oDB->isColumnExists('poll_log','poll_item'))
|
||||
{
|
||||
$oDB->addColumn('poll_log', 'poll_item', 'varchar', 250, 0);
|
||||
}
|
||||
|
||||
if(!$oDB->isColumnExists('poll_item','add_user_srl'))
|
||||
{
|
||||
$oDB->addColumn('poll_item', 'add_user_srl', 'number', 11, 0);
|
||||
}
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
|
|
@ -80,6 +114,16 @@ class poll extends ModuleObject
|
|||
function recompileCache()
|
||||
{
|
||||
}
|
||||
|
||||
function isCangetMemberInfo($type)
|
||||
{
|
||||
return ($type==1 || $type==3);
|
||||
}
|
||||
|
||||
function isCanAddItem($type)
|
||||
{
|
||||
return ($type==2 || $type==3);
|
||||
}
|
||||
}
|
||||
/* End of file poll.class.php */
|
||||
/* Location: ./modules/poll/poll.class.php */
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ class pollController extends poll
|
|||
|
||||
$logged_info = Context::get('logged_info');
|
||||
$vars = Context::getRequestVars();
|
||||
|
||||
$args = new stdClass;
|
||||
$tmp_args = array();
|
||||
|
||||
|
|
@ -114,7 +115,10 @@ class pollController extends poll
|
|||
$poll_args->list_order = $poll_srl*-1;
|
||||
$poll_args->stop_date = $args->stop_date;
|
||||
$poll_args->poll_count = 0;
|
||||
$poll_args->poll_type = $vars->show_vote + $vars->add_item;
|
||||
|
||||
$output = executeQuery('poll.insertPoll', $poll_args);
|
||||
debugPrint($output);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
|
|
@ -132,7 +136,7 @@ class pollController extends poll
|
|||
$title_args->poll_count = 0;
|
||||
$title_args->list_order = $title_args->poll_index_srl * -1;
|
||||
$title_args->member_srl = $member_srl;
|
||||
$title_args->upload_target_srl = $upload_target_srl;
|
||||
$title_args->upload_target_srl = $vars->upload_target_srl;
|
||||
$output = executeQuery('poll.insertPollTitle', $title_args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
|
|
@ -148,7 +152,7 @@ class pollController extends poll
|
|||
$item_args->poll_index_srl = $title_args->poll_index_srl;
|
||||
$item_args->title = $v;
|
||||
$item_args->poll_count = 0;
|
||||
$item_args->upload_target_srl = $upload_target_srl;
|
||||
$item_args->upload_target_srl = $vars->upload_target_srl;
|
||||
$output = executeQuery('poll.insertPollItem', $item_args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
|
|
@ -164,14 +168,125 @@ class pollController extends poll
|
|||
$this->setMessage('success_registed');
|
||||
}
|
||||
|
||||
function procPollInsertItem()
|
||||
{
|
||||
$poll_srl = (int) Context::get('srl');
|
||||
$poll_index_srl = (int) Context::get('index_srl');
|
||||
$poll_item_title = Context::get('title');
|
||||
|
||||
if($poll_item_title=='') return new Object(-1,"msg_item_title_cannot_empty");
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
if(!$logged_info) return new Object(-1,"msg_cannot_add_item");
|
||||
|
||||
if(!$poll_srl || !$poll_index_srl) return new Object(-1,"msg_invalid_request");
|
||||
|
||||
$args = new stdClass();
|
||||
$args->poll_srl = $poll_srl;
|
||||
|
||||
// Get the information related to the survey
|
||||
$columnList = array('poll_type');
|
||||
$output = executeQuery('poll.getPoll', $args, $columnList);
|
||||
if(!$output->data) return new Object(-1,"poll_no_poll_or_deleted_poll");
|
||||
$type = $output->data->poll_type;
|
||||
|
||||
if(!$this->isCanAddItem($type)) return new Object(-1,"msg_cannot_add_item");
|
||||
|
||||
if($logged_info->is_admin != 'Y')
|
||||
{
|
||||
$poll_item_title = htmlspecialchars($poll_item_title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
||||
}
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
$item_args = new stdClass;
|
||||
$item_args->poll_srl = $poll_srl;
|
||||
$item_args->poll_index_srl = $poll_index_srl;
|
||||
$item_args->title = $poll_item_title;
|
||||
$item_args->poll_count = 0;
|
||||
$item_args->upload_target_srl = 0;
|
||||
$item_args->add_user_srl = $logged_info->member_srl;
|
||||
$output = executeQuery('poll.insertPollItem', $item_args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
function procPollDeleteItem()
|
||||
{
|
||||
$poll_srl = (int) Context::get('srl');
|
||||
$poll_index_srl = (int) Context::get('index_srl');
|
||||
$poll_item_srl = Context::get('item_srl');
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
if(!$logged_info) return new Object(-1,"msg_cannot_delete_item");
|
||||
|
||||
if(!$poll_srl || !$poll_index_srl || !$poll_item_srl) return new Object(-1,"msg_invalid_request");
|
||||
|
||||
$args = new stdClass();
|
||||
$args->poll_srl = $poll_srl;
|
||||
$args->poll_index_srl = $poll_index_srl;
|
||||
$args->poll_item_srl = $poll_item_srl;
|
||||
|
||||
// Get the information related to the survey
|
||||
$columnList = array('add_user_srl','poll_count');
|
||||
$output = executeQuery('poll.getPollItem', $args, $columnList);
|
||||
$add_user_srl = $output->data->add_user_srl;
|
||||
$poll_count = $output->data->poll_count;
|
||||
|
||||
// Get the information related to the survey
|
||||
$columnList = array('member_srl');
|
||||
$output = executeQuery('poll.getPoll', $args, $columnList);
|
||||
if(!$output->data) return new Object(-1,"poll_no_poll_or_deleted_poll");
|
||||
$poll_member_srl = $output->data->member_srl;
|
||||
|
||||
if($add_user_srl!=$logged_info->member_srl && $poll_member_srl!=$logged_info->member_srl) return new Object(-1,"msg_cannot_delete_item");
|
||||
if($poll_count>0) return new Object(-1,"msg_cannot_delete_item_poll_exist");
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
|
||||
$item_args = new stdClass;
|
||||
$item_args->poll_srl = $poll_srl;
|
||||
$item_args->poll_index_srl = $poll_index_srl;
|
||||
$item_args->poll_item_srl = $poll_item_srl;
|
||||
$output = executeQuery('poll.deletePollItem', $item_args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Accept the poll
|
||||
*/
|
||||
function procPoll()
|
||||
{
|
||||
$poll_srl = Context::get('poll_srl');
|
||||
|
||||
$args = new stdClass();
|
||||
$args->poll_srl = $poll_srl;
|
||||
// Get the information related to the survey
|
||||
$columnList = array('poll_count', 'stop_date','poll_type');
|
||||
$output = executeQuery('poll.getPoll', $args, $columnList);
|
||||
if(!$output->data) return new Object(-1,"poll_no_poll_or_deleted_poll");
|
||||
|
||||
if($output->data->stop_date < date("Ymd")) return new Object(-1,"msg_cannot_vote");
|
||||
|
||||
$columnList = array('checkcount');
|
||||
$output = executeQuery('poll.getPollTitle', $args, $columnList);
|
||||
if(!$output->data) return;
|
||||
|
||||
$poll_srl_indexes = Context::get('poll_srl_indexes');
|
||||
$tmp_item_srls = explode(',',$poll_srl_indexes);
|
||||
//if(count($tmp_item_srls)-1>(int)$output->data->checkcount) return new Object(-1,"msg_exceed_max_select");
|
||||
for($i=0;$i<count($tmp_item_srls);$i++)
|
||||
{
|
||||
$srl = (int)trim($tmp_item_srls[$i]);
|
||||
|
|
@ -206,9 +321,11 @@ class pollController extends poll
|
|||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
// Log the respondent's information
|
||||
$log_args = new stdClass;
|
||||
$log_args->poll_srl = $poll_srl;
|
||||
$log_args->poll_item = $args->poll_item_srl;
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
$member_srl = $logged_info->member_srl?$logged_info->member_srl:0;
|
||||
|
|
@ -216,6 +333,7 @@ class pollController extends poll
|
|||
$log_args->member_srl = $member_srl;
|
||||
$log_args->ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||
$output = executeQuery('poll.insertPollLog', $log_args);
|
||||
|
||||
if(!$output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
|
|
@ -224,17 +342,18 @@ class pollController extends poll
|
|||
|
||||
$oDB->commit();
|
||||
|
||||
$skin = Context::get('skin');
|
||||
if(!$skin || !is_dir(_XE_PATH_ . 'modules/poll/skins/'.$skin)) $skin = 'default';
|
||||
//$skin = Context::get('skin');
|
||||
//if(!$skin || !is_dir(_XE_PATH_ . 'modules/poll/skins/'.$skin)) $skin = 'default';
|
||||
// Get tpl
|
||||
$tpl = $oPollModel->getPollHtml($poll_srl, '', $skin);
|
||||
//$tpl = $oPollModel->getPollHtml($poll_srl, '', $skin);
|
||||
|
||||
$this->add('poll_srl', $poll_srl);
|
||||
$this->add('tpl',$tpl);
|
||||
$this->add('poll_item_srl',$item_srls);
|
||||
//$this->add('tpl',$tpl);
|
||||
$this->setMessage('success_poll');
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispPollAdminConfig');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
//$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispPollAdminConfig');
|
||||
//$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -14,6 +14,164 @@ class pollModel extends poll
|
|||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief returns poll infomation
|
||||
*/
|
||||
function getPollinfo()
|
||||
{
|
||||
$args = new stdClass;
|
||||
$poll_srl = Context::get('poll_srl');
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
if(!$poll_srl || $poll_srl=='') return new Object(-1,"poll_no_poll_srl");
|
||||
|
||||
$args->poll_srl = $poll_srl;
|
||||
// Get the information related to the survey
|
||||
$columnList = array('poll_count', 'stop_date','poll_type','member_srl');
|
||||
$output = executeQuery('poll.getPoll', $args, $columnList);
|
||||
$poll_member_srl = $output->data->member_srl;
|
||||
if(!$output->data) return new Object(-1,"poll_no_poll_or_deleted_poll");
|
||||
|
||||
$poll = new stdClass;
|
||||
$poll->is_polled = 0;
|
||||
if($output->data->stop_date < date("Ymd")) $poll->is_polled = 1;
|
||||
|
||||
$poll->poll_count = (int)$output->data->poll_count;
|
||||
$poll->poll_type = (int)$output->data->poll_type;
|
||||
$poll->stop_date = zdate($output->data->stop_date, "Y-m-d");
|
||||
$columnList = array('poll_index_srl', 'title', 'checkcount', 'poll_count');
|
||||
$output = executeQueryArray('poll.getPollTitle', $args, $columnList);
|
||||
if(!$output->data) return;
|
||||
|
||||
$poll->poll = array();
|
||||
foreach($output->data as $key => $val)
|
||||
{
|
||||
$poll->poll[$val->poll_index_srl] = new stdClass;
|
||||
$poll->poll[$val->poll_index_srl]->poll_index_srl = $val->poll_index_srl;
|
||||
$poll->poll[$val->poll_index_srl]->title = $val->title;
|
||||
$poll->poll[$val->poll_index_srl]->checkcount = $val->checkcount;
|
||||
$poll->poll[$val->poll_index_srl]->poll_count = $val->poll_count;
|
||||
}
|
||||
|
||||
$output = executeQueryArray('poll.getPollItem', $args);
|
||||
foreach($output->data as $key => $val)
|
||||
{
|
||||
unset($val->upload_target_srl);
|
||||
unset($val->poll_srl);
|
||||
$val->my_item = false;
|
||||
if(($val->add_user_srl==$logged_info->member_srl || $poll_member_srl == $logged_info->member_srl) && $val->add_user_srl!=0) $val->my_item = true;
|
||||
$poll->poll[$val->poll_index_srl]->item[] = $val;
|
||||
|
||||
}
|
||||
|
||||
$poll->poll_srl = $poll_srl;
|
||||
$caniadditem = $this->isCanAddItem($poll->poll_type) && !!$logged_info->member_srl;
|
||||
|
||||
$oPollModel = getModel('poll');
|
||||
if($oPollModel->isPolled($poll_srl)) $poll->is_polled = 1;
|
||||
|
||||
$this->add('poll', $poll);
|
||||
$this->add('caniadditem', $caniadditem);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief returns poll item infomation
|
||||
*/
|
||||
function getPollitemInfo()
|
||||
{
|
||||
$args = new stdClass;
|
||||
$poll_srl = Context::get('poll_srl');
|
||||
$poll_item = Context::get('poll_item');
|
||||
|
||||
if(!$poll_srl || $poll_srl=='') return new Object(-1,"poll_no_poll_srl");
|
||||
|
||||
$args->poll_srl = $poll_srl;
|
||||
$args->poll_item_srl = $poll_item;
|
||||
|
||||
// Get the information related to the survey
|
||||
$columnList = array('poll_type');
|
||||
$output = executeQuery('poll.getPoll', $args, $columnList);
|
||||
if(!$output->data) return new Object(-1,"poll_no_poll_or_deleted_poll");
|
||||
$type = $output->data->poll_type;
|
||||
|
||||
$poll = new stdClass();
|
||||
|
||||
if($this->isCangetMemberInfo($type))
|
||||
{
|
||||
$pollvar = new stdClass;
|
||||
$pollvar->poll_srl = $poll_srl;
|
||||
$pollvar->poll_item = $poll_item;
|
||||
$pollvar->poll_item_srl = $poll_item;
|
||||
$pollvar->page = !!Context::get('page') ? Context::get('page') : 1;
|
||||
$pollvar->list_count = !!Context::get('list_count') ? Context::get('list_count') : 5;
|
||||
|
||||
$output = executeQueryArray('poll.getMemberbyPollitem', $pollvar);
|
||||
$output_item = executeQuery('poll.getPollItem', $args);
|
||||
$poll->title = $output_item->data->title;
|
||||
|
||||
$oMemberModel = getModel('member');
|
||||
$poll->member = array();
|
||||
|
||||
$count = 0;
|
||||
|
||||
foreach($output->data as $key=>$value)
|
||||
{
|
||||
$count++;
|
||||
$vars = $oMemberModel->getMemberInfoByMemberSrl($value->member_srl);
|
||||
|
||||
if(!$value->member_srl)
|
||||
{
|
||||
if(Context::get('logged_info')->is_admin === "Y")
|
||||
{
|
||||
$ip = (int) str_replace(".","",$value->ip_address);
|
||||
$poll->member[$ip] = new stdClass();
|
||||
$poll->member[$ip]->member_srl = 0;
|
||||
$poll->member[$ip]->nick_name = $value->ip_address;
|
||||
$poll->member[$ip]->profile_image = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
$ip = md5(str_replace(".","",$value->ip_address));
|
||||
$poll->member[$ip] = new stdClass();
|
||||
$poll->member[$ip]->member_srl = 0;
|
||||
$poll->member[$ip]->nick_name = "Anonymous";
|
||||
$poll->member[$ip]->profile_image = "";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$poll->member[$vars->member_srl] = new stdClass();
|
||||
$poll->member[$vars->member_srl]->member_srl = $vars->member_srl;
|
||||
$poll->member[$vars->member_srl]->nick_name = $vars->nick_name;
|
||||
if($vars->profile_image->file!='') $poll->member[$vars->member_srl]->profile_image = $vars->profile_image->file;
|
||||
else $poll->member[$vars->member_srl]->profile_image = "";
|
||||
}
|
||||
}
|
||||
|
||||
$poll->count = $count;
|
||||
}
|
||||
|
||||
$this->add('item', $poll);
|
||||
$this->add("dummy_profile","data:image/gif;base64,R0lGODdhFgAWAPQAAMHBwcDAwPr6+t/f3/v7+9HR0fj4+MrKyvz8/PLy8uvr68/Pz+Li4ubm5vT09ODg4M3Nzdra2uzs7MjIyPDw8N3d3dTU1Pb29sLCwv39/cPDw8bGxv7+/sXFxf///8TExCwAAAAAFgAWAAAF2WDXbWRpnuT3iZ3qvjDMxqpGiyqGrbMGfL6dK+ViiTAHRiLROABaH6KxhVlcPByPx1D4RXFG4MbhyXDO28Nug4NhIlhOxpwdBDTQGKARP6MVGBo2KlN7HghZcR4KKzxTHQEVZXRYHgxPjywaBwZ9WAQLg5kqABYGfhwEERhsPI4jghMSfh4UBwGNbS6CAwJyc2YCA4GuLxgMWqhoHg2BMytvlVrTihUBbBs1BwLSyageAhDFGg9xc1nKWQy4UBoUfenAHgnG2+nKcQQQNh0aBYjLzCXLgKXAjhAAOw==");
|
||||
$this->add("page",$output->page_navigation);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief returns poll status
|
||||
* @see this function uses isPolled function below
|
||||
*/
|
||||
function getPollstatus()
|
||||
{
|
||||
$poll_srl = Context::get('poll_srl');
|
||||
if(!$poll_srl || $poll_srl=='') return new Object(-1,"poll_no_poll_srl");
|
||||
|
||||
$oPollModel = getModel('poll');
|
||||
if($oPollModel->isPolled($poll_srl)) $is_polled = 1;
|
||||
else $is_polled = 0;
|
||||
|
||||
$this->add('is_polled', $is_polled);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief The function examines if the user has already been polled
|
||||
*/
|
||||
|
|
@ -39,6 +197,7 @@ class pollModel extends poll
|
|||
/**
|
||||
* @brief Return the HTML data of the survey
|
||||
* Return the result after checking if the poll has responses
|
||||
* @deprecated this function uses poll skin, which will be removed
|
||||
*/
|
||||
function getPollHtml($poll_srl, $style = '', $skin = 'default')
|
||||
{
|
||||
|
|
@ -97,6 +256,7 @@ class pollModel extends poll
|
|||
|
||||
/**
|
||||
* @brief Return the result's HTML
|
||||
* @deprecated this function uses poll skin, which will be removed
|
||||
*/
|
||||
function getPollResultHtml($poll_srl, $skin = 'default')
|
||||
{
|
||||
|
|
@ -107,7 +267,7 @@ class pollModel extends poll
|
|||
if(!$output->data) return '';
|
||||
|
||||
$poll = new stdClass;
|
||||
$poll->style = $style;
|
||||
$poll->style = $skin;
|
||||
$poll->poll_count = (int)$output->data->poll_count;
|
||||
$poll->stop_date = $output->data->stop_date;
|
||||
|
||||
|
|
@ -144,6 +304,7 @@ class pollModel extends poll
|
|||
}
|
||||
/** [TO REVIEW]
|
||||
* @brief Selected poll - return the colorset of the skin
|
||||
* @deprecated this function uses poll skin, which will be removed
|
||||
*/
|
||||
function getPollGetColorsetList()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
</tables>
|
||||
<conditions>
|
||||
<condition operation="equal" column="poll_srl" var="poll_srl" filter="number" />
|
||||
<condition operation="equal" column="poll_index_srl" var="poll_index_srl" filter="number" />
|
||||
<condition operation="equal" column="poll_index_srl" var="poll_index_srl" filter="number" pipe="and" />
|
||||
<condition operation="equal" column="poll_item_srl" var="poll_item_srl" filter="number" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
|
|||
19
modules/poll/queries/getMemberbyPollitem.xml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<query id="getMemberbyPollitem" action="select">
|
||||
<tables>
|
||||
<table name="poll_log" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="member_srl" alias="member_srl" />
|
||||
<column name="ipaddress" alias="ip_address" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="poll_srl" var="poll_srl" />
|
||||
<condition operation="like" column="poll_item" var="poll_item" pipe="and"/>
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="regdate" order="desc" />
|
||||
<list_count var="list_count" default="5" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
@ -8,6 +8,7 @@
|
|||
<conditions>
|
||||
<condition operation="equal" column="poll_srl" var="poll_srl" />
|
||||
<condition operation="equal" column="poll_index_srl" var="poll_index_srl" pipe="and" />
|
||||
<condition operation="equal" column="poll_item_srl" var="poll_item_srl" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="poll_item_srl" order="asc" />
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
<column name="member_srl" var="member_srl" />
|
||||
<column name="ipaddress" var="ipaddress" default="ipaddress()" />
|
||||
<column name="poll_count" var="poll_count" default="0" />
|
||||
<column name="poll_type" var="poll_type" default="0" />
|
||||
<column name="upload_target_srl" default="0" />
|
||||
<column name="regdate" var="regdate" default="curdate()" />
|
||||
<column name="list_order" var="list_order" default="0" />
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
<column name="poll_index_srl" var="poll_index_srl" filter="number" notnull="notnull" />
|
||||
<column name="poll_count" var="poll_count" default="0" />
|
||||
<column name="upload_target_srl" default="0" />
|
||||
<column name="add_user_srl" filter="number" default="0" />
|
||||
<column name="title" var="title" notnull="notnull" />
|
||||
</columns>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -7,5 +7,6 @@
|
|||
<column name="member_srl" var="member_srl" filter="number" default="0" />
|
||||
<column name="ipaddress" var="ipaddress" default="ipaddress()" />
|
||||
<column name="regdate" var="regdate" default="curdate()" />
|
||||
<column name="poll_item" var="poll_item" default="0" />
|
||||
</columns>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -7,4 +7,5 @@
|
|||
<column name="ipaddress" type="varchar" size="128" notnull="notnull" index="idx_ipaddress" />
|
||||
<column name="regdate" type="date" index="idx_regdate" />
|
||||
<column name="list_order" type="number" size="11" notnull="notnull" index="idx_list_order" />
|
||||
<column name="poll_type" type="number" size="11" notnull="notnull" index="idx_poll_type" />
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -5,4 +5,5 @@
|
|||
<column name="upload_target_srl" type="number" size="11" notnull="notnull" index="idx_upload_target_srl" />
|
||||
<column name="title" type="varchar" size="250" notnull="notnull" />
|
||||
<column name="poll_count" type="number" size="11" notnull="notnull" />
|
||||
<column name="add_user_srl" type="number" size="11" notnull="notnull" />
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -3,4 +3,5 @@
|
|||
<column name="member_srl" type="number" size="11" notnull="notnull" index="idx_member_srl" />
|
||||
<column name="ipaddress" type="varchar" size="128" notnull="notnull" index="idx_ipaddress" />
|
||||
<column name="regdate" type="date" index="idx_regdate" />
|
||||
<column name="poll_item" type="varchar" size="250" default="0" />
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -8,5 +8,5 @@
|
|||
<column name="member_srl" type="number" size="11" notnull="notnull" index="idx_member_srl" />
|
||||
<column name="ipaddress" type="varchar" size="128" notnull="notnull" index="idx_ipaddress" />
|
||||
<column name="regdate" type="date" index="idx_regdate" />
|
||||
<column name="list_order" type="number" size="11" notnull="notnull" index="idx_list_order" />
|
||||
<column name="list_order" type="number" size="11" notnull="notnull" default="0" index="idx_list_order" />
|
||||
</table>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 91 B After Width: | Height: | Size: 159 B |
|
Before Width: | Height: | Size: 107 B After Width: | Height: | Size: 328 B |
|
Before Width: | Height: | Size: 138 B After Width: | Height: | Size: 216 B |
|
Before Width: | Height: | Size: 146 B After Width: | Height: | Size: 272 B |
|
Before Width: | Height: | Size: 88 B After Width: | Height: | Size: 177 B |
|
Before Width: | Height: | Size: 141 B After Width: | Height: | Size: 211 B |
|
Before Width: | Height: | Size: 156 B After Width: | Height: | Size: 262 B |
|
Before Width: | Height: | Size: 152 B After Width: | Height: | Size: 215 B |
|
Before Width: | Height: | Size: 155 B After Width: | Height: | Size: 212 B |
|
Before Width: | Height: | Size: 93 B After Width: | Height: | Size: 299 B |
|
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 523 B |
1
modules/poll/tpl/js/poll.min.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"poll.min.js","sources":["poll.js"],"names":["doPoll","fo_obj","checkcount","Array","item","i","length","obj","nodeName","name","indexOf","t","split","poll_srl_index","parseInt","value","checked","poll_srl_indexes","hasOwnProperty","count","items","alert","poll_alert_lang","join","submit","jQuery","$","click","on_complete","ret","width","$poll","srl","html","skin","cls","this","attr","match","e","exec_xml","poll_srl"],"mappings":"AACA,QAASA,QAAOC,GAKZ,IAAI,GAHAC,GAAa,GAAIC,OACjBC,EAAO,GAAID,OAEPE,EAAE,EAAEA,EAAEJ,EAAOK,OAAOD,IAAK,CAC7B,GAAIE,GAAMN,EAAOI,EACjB,IAAmB,SAAhBE,EAAIC,SAAP,CAEA,GAAIC,GAAOF,EAAIE,IACf,IAAGA,EAAKC,QAAQ,cAAc,GAAI,CAC9B,GAAIC,GAAIF,EAAKG,MAAM,KACfC,EAAiBC,SAASH,EAAE,GAAG,GACnCT,GAAWW,GAAkBN,EAAIQ,MACjCX,EAAKS,GAAkB,GAAIV,WAExB,IAAGM,EAAKC,QAAQ,SAAS,GAAI,CAChC,GAAIC,GAAIF,EAAKG,MAAM,KAEfC,GADWC,SAASH,EAAE,GAAG,IACRG,SAASH,EAAE,GAAG,IACjB,IAAfJ,EAAIS,UAAiBZ,EAAKS,GAAgBT,EAAKS,GAAgBP,QAAUC,EAAIQ,SAIxF,GAAIE,GAAmB,EACvB,KAAI,GAAIJ,KAAkBX,GAC7B,GAAIA,EAAWgB,eAAeL,GAA9B,CACO,GAAIM,GAAQjB,EAAWW,GACnBO,EAAQhB,EAAKS,EACjB,IAAGO,EAAMd,OAAS,GAAKa,EAAQC,EAAMd,OAEjC,MADAe,OAAMC,kBACC,CAGXL,IAAoBG,EAAMG,KAAK,KAAK,IAExCtB,EAAOgB,iBAAiBF,MAAQE,EAEnChB,EAAOuB,SAGRC,OAAO,SAASC,GAEfA,EAAE,iBAAiBC,MAAM,WAWxB,QAASC,GAAYC,GACpB,GAA6BC,GAAzBC,EAAQL,EAAE,SAASM,EAEvBF,GAASC,EAAMD,QACfC,EAAME,KAAKJ,EAAS,KACpBE,EAAMD,MAAMA,GAfb,GAAiCE,GAAKE,EAAlCC,EAAMT,EAAEU,MAAMC,KAAK,QAEvB,KACCL,EAAOG,EAAIG,MAAM,kBAAkB,GACnCJ,EAAOC,EAAIG,MAAM,mBAAmB,GACpC,MAAMC,IAEP,MAAIP,IACAE,IAAMA,EAAO,WAUjBM,SACC,OACA,sBACCC,SAAST,EAAKE,KAAKA,GACpBN,GACC,QAAQ,UAAU,SAGb,IAnBS"}
|
||||
1
modules/poll/tpl/js/poll_admin.min.map
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"poll_admin.min.js","sources":["poll_admin.js"],"names":["doDisplaySkinColorset","sel","colorset","skin","options","selectedIndex","value","params","Array","response_tags","exec_xml","completeGetSkinColorset","ret_obj","get_by_id","poll_colorset","length","selected_colorset","i","remove","colorset_list","split","selected_index","tmp","opt","Option","add","doMovePoll","poll_srl","upload_target_srl","completeMovePoll","document_srl","comment_srl","url","request_uri","setQuery","winopen","checkSearch","form","search_target","alert","xe","lang","msg_empty_search_target","search_keyword","msg_empty_search_keyword","jQuery","$","submit","e","cnt","stopPropagation","msg_select_poll","msg","confirm_poll_delete","replace","confirm"],"mappings":"AAOA,QAASA,uBAAsBC,EAAKC,GAChC,GAAIC,GAAOF,EAAIG,QAAQH,EAAII,eAAeC,MAEtCC,EAAS,GAAIC,MACjBD,GAAa,KAAIJ,EACjBI,EAAiB,SAAIL,CAErB,IAAIO,GAAgB,GAAID,OAAM,QAAQ,UAAU,gBAEhDE,UAAS,OAAQ,yBAA0BH,EAAQI,wBAAyBF,EAAeF,GAI/F,QAASI,yBAAwBC,EAASH,EAAeF,GAIrD,IAAI,GAHAN,GAAMY,UAAU,WAAWC,cAC3BC,EAASd,EAAIG,QAAQW,OACrBC,EAAoBT,EAAiB,SACjCU,EAAE,EAAIF,EAAFE,EAASA,IAAKhB,EAAIiB,OAAO,EAIrC,KAAI,GAFAC,GAAgBP,EAAuB,cAAEQ,MAAM,MAC/CC,EAAiB,EACbJ,EAAE,EAAEA,EAAEE,EAAcJ,OAAOE,IAAK,CACpC,GAAIK,GAAMH,EAAcF,GAAGG,MAAM,MAC9BJ,IAAqBA,GAAmBM,EAAI,KAAID,EAAiBJ,EACpE,IAAIM,GAAM,GAAIC,QAAOF,EAAI,GAAIA,EAAI,IAAI,GAAO,EAC5CrB,GAAIG,QAAQqB,IAAIF,GAGpBtB,EAAII,cAAgBgB,EAIxB,QAASK,YAAWC,EAAUC,GAE1B,GAAIrB,GAAS,GAAIC,MACjBD,GAAiB,SAAIoB,EACrBpB,EAA0B,kBAAIqB,CAE9B,IAAInB,GAAgB,GAAID,OAAM,QAAQ,UAAU,eAAe,cAC/DE,UAAS,OAAO,qBAAsBH,EAAQsB,iBAAkBpB,GAGpE,QAASoB,kBAAiBjB,GACtB,GAAIkB,GAAelB,EAAsB,aACrCmB,EAAcnB,EAAqB,YACnCoB,EAAMC,YAAYC,SAAS,eAAgBJ,EAC5CC,KAAaC,EAAMA,EAAI,YAAYD,GACtCI,QAAQH,EAAK,cAGjB,QAASI,aAAYC,GAEpB,MAA+B,IAA5BA,EAAKC,cAAchC,OAErBiC,MAAMC,GAAGC,KAAKC,0BACP,GAEwB,IAA7BL,EAAKM,eAAerC,OAEtBiC,MAAMC,GAAGC,KAAKG,2BACP,GAHR,OAODC,OAAO,SAAUC,GAChBA,EAAE,aAAaC,OAAO,SAASC,GAC9B,GAAIC,GAAMH,EAAE,4BAA4B/B,MACxC,IAAU,GAAPkC,EAIF,MAFAD,GAAEE,kBACFX,MAAMC,GAAGC,KAAKU,kBACP,CAGR,IAAIC,GAAMZ,GAAGC,KAAKY,oBAAoBC,QAAQ,KAAML,EACpD,OAAIM,SAAQH,GAAZ,QAECJ,EAAEE,mBACK"}
|
||||
26
widgets/pollWidget/conf/info.xml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<widget version="0.2">
|
||||
<title xml:lang="ko">설문조사 위젯</title>
|
||||
<description xml:lang="ko">설문조사를 표시하는 위젯입니다.</description>
|
||||
<version>2.0</version>
|
||||
<date>2015-06-09</date>
|
||||
|
||||
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
|
||||
<name xml:lang="ko">NAVER</name>
|
||||
<name xml:lang="jp">NAVER</name>
|
||||
<name xml:lang="vi">NAVER</name>
|
||||
<name xml:lang="zh-CN">NAVER</name>
|
||||
<name xml:lang="en">NAVER</name>
|
||||
<name xml:lang="es">NAVER</name>
|
||||
<name xml:lang="ru">NAVER</name>
|
||||
<name xml:lang="zh-TW">NAVER</name>
|
||||
<name xml:lang="tr">NAVER</name>
|
||||
</author>
|
||||
|
||||
<extra_vars>
|
||||
<var id="poll_srl" type="text">
|
||||
<name xml:lang="ko">설문 SRL</name>
|
||||
<description xml:lang="ko">설문 SRL은 투표 코드의 poll_srl="(숫자)"입니다.</description>
|
||||
</var>
|
||||
</extra_vars>
|
||||
</widget>
|
||||
33
widgets/pollWidget/pollWidget.class.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
/* Copyright (C) NAVER <http://www.navercorp.com> */
|
||||
/**
|
||||
* @class language_select
|
||||
* @author NAVER (developers@xpressengine.com)
|
||||
* @brief Language selector
|
||||
* @version 0.1
|
||||
*/
|
||||
class pollWidget extends WidgetHandler
|
||||
{
|
||||
/**
|
||||
* @brief Widget execution
|
||||
*
|
||||
* Get extra_vars declared in ./widgets/widget/conf/info.xml as arguments
|
||||
* After generating the result, do not print but return it.
|
||||
*/
|
||||
function proc($args)
|
||||
{
|
||||
// Set a path of the template skin (values of skin, colorset settings)
|
||||
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
|
||||
$tpl_file = 'pollview';
|
||||
|
||||
Context::set('colorset', $args->colorset);
|
||||
Context::set('poll_srl', $args->poll_srl);
|
||||
Context::set('style', $args->style);
|
||||
|
||||
// Compile a template
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
}
|
||||
/* End of file language_select.class.php */
|
||||
/* Location: ./widgets/language_select/language_select.class.php */
|
||||
12
widgets/pollWidget/skins/default/_header.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<!--%load_js_plugin("handlebars")-->
|
||||
|
||||
<!--@if(__DEBUG__)-->
|
||||
<load target="css/poll.css" />
|
||||
<load target="js/poll.js" />
|
||||
<!--@else-->
|
||||
<load target="css/poll.min.css" />
|
||||
<load target="js/poll.min.js" />
|
||||
<!--@end-->
|
||||
{@
|
||||
Context::loadLang(_XE_PATH_ . 'modules/poll/lang');
|
||||
}
|
||||
31
widgets/pollWidget/skins/default/css/poll.css
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
.pollWidget{padding:5px;}
|
||||
.poll_table{table-layout:fixed;width:100%;padding:0;border:none}
|
||||
.poll_table td{padding:0;margin:0}
|
||||
.poll_table td.h{background:url(../images/top_bg.png) repeat-x left top}
|
||||
.poll_table td.title{height:28px;background:url(../images/top_title_bg.png) repeat-x left top;padding:0 20px 0 20px;color:#C3C3C4}
|
||||
.poll_table td.title strong{color:#FFFFFF;font-weight:bold}
|
||||
.poll_table td.l{border-left:1px solid #E5E5E5}
|
||||
.poll_table td.r{border-right:1px solid #E5E5E5}
|
||||
.poll_table td.poll_content{padding:18px 13px 18px 13px}
|
||||
.poll_table td.poll_button{border:1px solid #E5E5E5;border-bottom:none;background-color:#F6F6F5}
|
||||
.poll_table td.poll_button div{padding:5px 0 2px 0;text-align:center}
|
||||
.poll_table td.b{background-color:#F6F6F5;height:7px}
|
||||
.poll_table td.b img{width:100%;height:6px;border-bottom:1px solid #E5E5E5}
|
||||
.poll_table td.bb{height:7px}
|
||||
.poll_table td.bb img{width:100%;height:6px;border-bottom:1px solid #E5E5E5}
|
||||
.poll_table td.poll_content div.title{color:#000000;background-color:#F5F5F5;border-top:2px solid #C1C0BD;border-bottom:2px solid #C1C0BD;font-weight:bold;padding:7px 0 7px 10px;margin-bottom:10px}
|
||||
.poll_table td.poll_content div.item_text{color:#636363;padding:0 10px 0 10px;margin-top:10px}
|
||||
.poll_table td.poll_content div.item_text strong{font-weight:bold;color:#000000;font-family:돋움;font-size:12px}
|
||||
.poll_table td.poll_content table.item_bar_table{width:100%;table-layout:fixed;border-bottom:1px solid #EDEDED;margin-top:10px}
|
||||
.poll_table td.poll_content table.noborder{border-bottom:none;margin-bottom:10px}
|
||||
.poll_table td.poll_content table.item_bar_table td.bar{padding:0 0 5px 0;background:url(../images/back_bar.png) repeat-x left center}
|
||||
.poll_table td.poll_content table.item_bar_table td.bar img{width:100%;height:6px}
|
||||
.poll_table td.poll_content table.item_bar_table td.status{font-size:.9em;padding-bottom:5px;color:#636363;padding-left:15px}
|
||||
.poll_table td.poll_content table.item_bar_table td.status strong{font-weight:bold;color:#58C011}
|
||||
.poll_table td.poll_content div.item{color:#636363;border-bottom:1px solid #EDEDED;padding:5px 0 8px 10px;margin-bottom:3px}
|
||||
.poll_table td.poll_content div.noborder{border-bottom:none;margin-bottom:10px}
|
||||
.poll_table td.poll_content div.checkcount{border-bottom:1px dashed #EDEDED;padding:0 0 8px 10px;margin-bottom:3px;text-align:right;color:#636363}
|
||||
.poll_table tr.cap>td{font-size:0;line-height:0;height:7px;overflow:hidden}
|
||||
.item.add{-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box; }
|
||||
.item.add *{-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box; }
|
||||
.item.add input[type='text']{width:90%;width:-webkit-calc(100% - 35px);width:-moz-calc(100% - 35px);width:calc(100% - 35px);}
|
||||
1
widgets/pollWidget/skins/default/css/poll.min.css
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
.poll_table{table-layout:fixed;width:100%;padding:0;border:0}.poll_table td{padding:0;margin:0}.poll_table td.h{background:url(../images/top_bg.png) repeat-x left top}.poll_table td.title{height:28px;background:url(../images/top_title_bg.png) repeat-x left top;padding:0 20px;color:#C3C3C4}.poll_table td.title strong{color:#FFF;font-weight:700}.poll_table td.l{border-left:1px solid #E5E5E5}.poll_table td.r{border-right:1px solid #E5E5E5}.poll_table td.poll_content{padding:18px 13px}.poll_table td.poll_button{border:1px solid #E5E5E5;border-bottom:0;background-color:#F6F6F5}.poll_table td.poll_button div{padding:5px 0 2px;text-align:center}.poll_table td.b{background-color:#F6F6F5;height:7px}.poll_table td.b img{width:100%;height:6px;border-bottom:1px solid #E5E5E5}.poll_table td.bb{height:7px}.poll_table td.bb img{width:100%;height:6px;border-bottom:1px solid #E5E5E5}.poll_table td.poll_content div.title{color:#000;background-color:#F5F5F5;border-top:2px solid #C1C0BD;border-bottom:2px solid #C1C0BD;font-weight:700;padding:7px 0 7px 10px;margin-bottom:10px}.poll_table td.poll_content div.item_text{color:#636363;padding:0 10px;margin-top:10px}.poll_table td.poll_content div.item_text strong{font-weight:700;color:#000;font-family:돋움;font-size:12px}.poll_table td.poll_content table.item_bar_table{width:100%;table-layout:fixed;border-bottom:1px solid #EDEDED;margin-top:10px}.poll_table td.poll_content table.noborder{border-bottom:0;margin-bottom:10px}.poll_table td.poll_content table.item_bar_table td.bar{padding:0 0 5px;background:url(../images/back_bar.png) repeat-x left center}.poll_table td.poll_content table.item_bar_table td.bar img{width:100%;height:6px}.poll_table td.poll_content table.item_bar_table td.status{font-size:.9em;padding-bottom:5px;color:#636363;padding-left:15px}.poll_table td.poll_content table.item_bar_table td.status strong{font-weight:700;color:#58C011}.poll_table td.poll_content div.item{color:#636363;border-bottom:1px solid #EDEDED;padding:5px 0 8px 10px;margin-bottom:3px}.poll_table td.poll_content div.noborder{border-bottom:0;margin-bottom:10px}.poll_table td.poll_content div.checkcount{border-bottom:1px dashed #EDEDED;padding:0 0 8px 10px;margin-bottom:3px;text-align:right;color:#636363}.poll_table tr.cap>td{font-size:0;line-height:0;height:7px;overflow:hidden}
|
||||
BIN
widgets/pollWidget/skins/default/images/back_bar.png
Normal file
|
After Width: | Height: | Size: 159 B |
BIN
widgets/pollWidget/skins/default/images/blank.gif
Normal file
|
After Width: | Height: | Size: 43 B |
BIN
widgets/pollWidget/skins/default/images/color_bar.png
Normal file
|
After Width: | Height: | Size: 328 B |
BIN
widgets/pollWidget/skins/default/images/lb.png
Normal file
|
After Width: | Height: | Size: 216 B |
BIN
widgets/pollWidget/skins/default/images/lh.png
Normal file
|
After Width: | Height: | Size: 272 B |
BIN
widgets/pollWidget/skins/default/images/pipe.png
Normal file
|
After Width: | Height: | Size: 177 B |
BIN
widgets/pollWidget/skins/default/images/rb.png
Normal file
|
After Width: | Height: | Size: 211 B |
BIN
widgets/pollWidget/skins/default/images/rh.png
Normal file
|
After Width: | Height: | Size: 262 B |
BIN
widgets/pollWidget/skins/default/images/rlb.png
Normal file
|
After Width: | Height: | Size: 215 B |
BIN
widgets/pollWidget/skins/default/images/rrb.png
Normal file
|
After Width: | Height: | Size: 212 B |
BIN
widgets/pollWidget/skins/default/images/top_bg.png
Normal file
|
After Width: | Height: | Size: 299 B |
BIN
widgets/pollWidget/skins/default/images/top_title_bg.png
Normal file
|
After Width: | Height: | Size: 523 B |
404
widgets/pollWidget/skins/default/js/poll.js
Normal file
|
|
@ -0,0 +1,404 @@
|
|||
function initTemplete(type)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case 'poll':
|
||||
if(typeof window.template == 'undefined')
|
||||
{
|
||||
var source = jQuery("#entry-template").html();
|
||||
window.template = Handlebars.compile(source);
|
||||
}
|
||||
break;
|
||||
case 'result':
|
||||
if(typeof window.template_result == 'undefined')
|
||||
{
|
||||
var source = jQuery("#entry-template-result").html();
|
||||
window.template_result = Handlebars.compile(source);
|
||||
}
|
||||
break;
|
||||
case 'members':
|
||||
if(typeof window.template_member == 'undefined')
|
||||
{
|
||||
var source = jQuery("#entry-template-members").html();
|
||||
window.template_member = Handlebars.compile(source);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* 설문 참여 함수 */
|
||||
function doPoll(fo_obj) {
|
||||
|
||||
var checkcount = new Array();
|
||||
var item = new Array();
|
||||
|
||||
for(var i=0;i<fo_obj.length;i++) {
|
||||
var obj = fo_obj[i];
|
||||
if(obj.nodeName != 'INPUT') continue;
|
||||
|
||||
var name = obj.name;
|
||||
if(name.indexOf('checkcount')>-1) {
|
||||
var t = name.split('_');
|
||||
var poll_srl_index = parseInt(t[1],10);
|
||||
checkcount[poll_srl_index] = obj.value;
|
||||
item[poll_srl_index] = new Array();
|
||||
|
||||
} else if(name.indexOf('item_')>-1) {
|
||||
var t = name.split('_');
|
||||
var poll_srl = parseInt(t[1],10);
|
||||
var poll_srl_index = parseInt(t[2],10);
|
||||
if(obj.checked == true) item[poll_srl_index][item[poll_srl_index].length] = obj.value;
|
||||
}
|
||||
}
|
||||
|
||||
var poll_srl_indexes = "";
|
||||
for(var poll_srl_index in checkcount) {
|
||||
if(!checkcount.hasOwnProperty(poll_srl_index)) continue;
|
||||
var count = checkcount[poll_srl_index];
|
||||
var items = item[poll_srl_index];
|
||||
if(items.length < 1 || count < items.length) {
|
||||
alert(poll_alert_lang);
|
||||
return false;
|
||||
}
|
||||
|
||||
poll_srl_indexes += items.join(',')+',';
|
||||
}
|
||||
fo_obj.poll_srl_indexes.value = poll_srl_indexes;
|
||||
|
||||
jQuery.exec_json("poll.procPoll", {"poll_srl":poll_srl,"poll_srl_indexes":poll_srl_indexes}, function(data){
|
||||
if(data.error!=0) alert(data.message);
|
||||
else
|
||||
{
|
||||
loadPollResult(poll_srl);
|
||||
jQuery("#poll_" + poll_srl + "_gotoresult_button").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + poll_srl + "_result_nobutton").css({
|
||||
display: "table-row"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + poll_srl + "_result_yesbutton").css({
|
||||
display: "none"
|
||||
});
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 항목 추가 함수 */
|
||||
function addItem(poll_srl,poll_srl_indexes) {
|
||||
jQuery.exec_json("poll.procPollInsertItem", {"srl":poll_srl,"index_srl":poll_srl_indexes,"title":jQuery("#new_item_" + poll_srl_indexes).val()}, function(data){
|
||||
if(data.error!=0) alert(data.message);
|
||||
else
|
||||
{
|
||||
jQuery("#poll_" + poll_srl + "_result_button").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + poll_srl + "_result_nobutton").css({
|
||||
display: "table-row"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + poll_srl + "_result_yesbutton").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
loadPoll(poll_srl);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 항목 삭제 함수 */
|
||||
function deleteItem(poll_srl,poll_srl_indexes,poll_item_srl) {
|
||||
jQuery.exec_json("poll.procPollDeleteItem", {"srl":poll_srl,"index_srl":poll_srl_indexes,"item_srl":poll_item_srl}, function(data){
|
||||
if(data.error!=0) alert(data.message);
|
||||
else
|
||||
{
|
||||
jQuery("#poll_" + poll_srl + "_result_button").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + poll_srl + "_result_nobutton").css({
|
||||
display: "table-row"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + poll_srl + "_result_yesbutton").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
loadPoll(poll_srl);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function loadPoll(poll_srl)
|
||||
{
|
||||
jQuery.exec_json("poll.getPollinfo", {"poll_srl":poll_srl}, function(data){
|
||||
jQuery("#stop_date_"+poll_srl).html(data.poll.stop_date);
|
||||
|
||||
initTemplete('poll');
|
||||
var template = window.template;
|
||||
var context = Object;
|
||||
var additem = data.caniadditem;
|
||||
context.questions = {};
|
||||
for (var i in data.poll.poll) {
|
||||
var poll = data.poll.poll[i];
|
||||
context.questions[i] = {};
|
||||
context.questions[i].poll_index_srl = poll.poll_index_srl;
|
||||
context.questions[i].checkcount = poll.checkcount;
|
||||
context.questions[i].title = poll.title;
|
||||
context.questions[i].items = poll.item;
|
||||
context.questions[i].poll_srl = poll_srl;
|
||||
context.questions[i].isMultipleChoice = (poll.checkcount>1);
|
||||
context.questions[i].additem = additem;
|
||||
}
|
||||
var html = template(context);
|
||||
|
||||
jQuery("#poll_content_" + poll_srl).html(html);
|
||||
|
||||
jQuery("#poll_" + poll_srl).css({
|
||||
display: "block"
|
||||
});
|
||||
jQuery("#poll_" + poll_srl + '_result').css({
|
||||
display: "none"
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function showPollMemberNext(poll_srl,poll_item_srl)
|
||||
{
|
||||
if(typeof window.cur_page == 'undefined')
|
||||
{
|
||||
window.cur_page = 1;
|
||||
}
|
||||
|
||||
window.cur_page++;
|
||||
|
||||
jQuery.exec_json("poll.getPollitemInfo", {"poll_srl":poll_srl,"poll_item":poll_item_srl,"page":window.cur_page}, function(data){
|
||||
initTemplete('members');
|
||||
var template = window.template_member;
|
||||
var context = Object;
|
||||
|
||||
context.poll_srl = poll_srl;
|
||||
context.poll_item_srl = poll_item_srl;
|
||||
context.page = window.cur_page;
|
||||
context.isPage = ((data.page.total_count>5) && (window.cur_page<data.page.total_page));
|
||||
|
||||
context.members = {};
|
||||
|
||||
for (var i in data.item.member) {
|
||||
var member = data.item.member[i];
|
||||
|
||||
context.members[i] = {};
|
||||
context.members[i].profile_image = member.profile_image;
|
||||
context.members[i].member_srl = member.member_srl;
|
||||
context.members[i].nick_name = member.nick_name;
|
||||
context.members[i].isImage = (member.profile_image != '');
|
||||
context.members[i].dummy_profile = data.dummy_profile;
|
||||
}
|
||||
var html = template(context);
|
||||
|
||||
jQuery("#btn_load_more_" + poll_item_srl).replaceWith(html);
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function showPollMember(poll_srl,poll_item_srl)
|
||||
{
|
||||
window.cur_page = 1;
|
||||
|
||||
jQuery.exec_json("poll.getPollitemInfo", {"poll_srl":poll_srl,"poll_item":poll_item_srl,"page":window.cur_page}, function(data){
|
||||
initTemplete('members');
|
||||
var template = window.template_member;
|
||||
var context = Object;
|
||||
var title = poll_member_lang;
|
||||
title = title.replace("%s",data.item.title);
|
||||
var html = '<div class="title">' + title + '</div><ul>';
|
||||
context.poll_srl = poll_srl;
|
||||
context.poll_item_srl = poll_item_srl;
|
||||
context.page = window.cur_page;
|
||||
context.isPage = ((data.page.total_count>5) && (window.cur_page<data.page.total_count));
|
||||
|
||||
context.members = {};
|
||||
|
||||
for (var i in data.item.member) {
|
||||
var member = data.item.member[i];
|
||||
|
||||
context.members[i] = {};
|
||||
context.members[i].profile_image = member.profile_image;
|
||||
context.members[i].member_srl = member.member_srl;
|
||||
context.members[i].nick_name = member.nick_name;
|
||||
context.members[i].isImage = (member.profile_image != '');
|
||||
context.members[i].dummy_profile = data.dummy_profile;
|
||||
}
|
||||
html = html + template(context) + '</ul>';
|
||||
|
||||
jQuery("#poll_content_" + poll_srl + "_result").html(html);
|
||||
|
||||
jQuery("#poll_" + poll_srl + "_gotoresult_button").css({
|
||||
display: "table-row"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + poll_srl + "_result_nobutton").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + poll_srl + "_result_yesbutton").css({
|
||||
display: "table-row"
|
||||
});
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function loadPollResult(poll_srl)
|
||||
{
|
||||
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>
|
||||
*/
|
||||
jQuery("#stop_date_result_" + poll_srl).html(data.poll.stop_date);
|
||||
jQuery("#poll_count_result_" + poll_srl).html(data.poll.poll_count);
|
||||
|
||||
initTemplete('result');
|
||||
var template = window.template_result;
|
||||
var context = Object;
|
||||
var showMembers = (data.poll.poll_type==1 || data.poll.poll_type==3);
|
||||
context.questions = {};
|
||||
for (var i in data.poll.poll) {
|
||||
var poll = data.poll.poll[i];
|
||||
context.questions[i] = {};
|
||||
context.questions[i].poll_index_srl = poll.poll_index_srl;
|
||||
context.questions[i].checkcount = poll.checkcount;
|
||||
context.questions[i].title = poll.title;
|
||||
context.questions[i].poll_count = poll.poll_count;
|
||||
context.questions[i].showMembers = showMembers;
|
||||
context.questions[i].items = poll.item;
|
||||
var count = 0;
|
||||
for (var j in poll.item) {
|
||||
var item = poll.item[j];
|
||||
count++;
|
||||
if(poll.poll_count>0)
|
||||
{
|
||||
context.questions[i].items[j].per = Math.round((item.poll_count / poll.poll_count)*100);
|
||||
context.questions[i].items[j].isVote = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
context.questions[i].items[j].per = 0;
|
||||
context.questions[i].items[j].isVote = false;
|
||||
}
|
||||
context.questions[i].items[j].number = count;
|
||||
}
|
||||
context.questions[i].items = poll.item;
|
||||
context.questions[i].poll_srl = poll_srl;
|
||||
context.questions[i].isMultipleChoice = (poll.checkcount>1);
|
||||
}
|
||||
var html = template(context);
|
||||
|
||||
jQuery("#poll_content_" + poll_srl + "_result").html(html);
|
||||
jQuery("#poll_" + poll_srl).css({
|
||||
display: "none"
|
||||
});
|
||||
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($){
|
||||
/* View poll result */
|
||||
$('._poll_result').click(function(){
|
||||
var cls = $(this).attr('class'), srl, skin;
|
||||
|
||||
try{
|
||||
srl = cls.match(/\b_srl_(\d+)\b/)[1];
|
||||
}catch(e){ };
|
||||
|
||||
if(!srl) return false;
|
||||
|
||||
jQuery("#poll_" + srl + "_result_button").css({
|
||||
display: "table-row"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + srl + "_result_nobutton").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + srl + "_result_yesbutton").css({
|
||||
display: "table-row"
|
||||
});
|
||||
|
||||
loadPollResult(srl);
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
/* goto poll result */
|
||||
$('._gotoresult_screen').click(function(){
|
||||
var cls = $(this).attr('class'), srl, skin;
|
||||
|
||||
try{
|
||||
srl = cls.match(/\b_srl_(\d+)\b/)[1];
|
||||
}catch(e){ };
|
||||
|
||||
if(!srl) return false;
|
||||
|
||||
jQuery("#poll_" + srl + "_gotoresult_button").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + srl + "_result_nobutton").css({
|
||||
display: "table-row"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + srl + "_result_yesbutton").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
loadPollResult(srl);
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
/* View poll screen */
|
||||
$('._poll_screen').click(function(){
|
||||
var cls = $(this).attr('class'), srl, skin;
|
||||
|
||||
try{
|
||||
srl = cls.match(/\b_srl_(\d+)\b/)[1];
|
||||
}catch(e){ };
|
||||
|
||||
if(!srl) return false;
|
||||
|
||||
jQuery("#poll_" + srl + "_result_button").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + srl + "_result_nobutton").css({
|
||||
display: "table-row"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + srl + "_result_yesbutton").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
loadPoll(srl);
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
1
widgets/pollWidget/skins/default/js/poll.min.js
vendored
Normal file
205
widgets/pollWidget/skins/default/pollview.html
Normal file
|
|
@ -0,0 +1,205 @@
|
|||
<include target="_header.html" />
|
||||
<script>
|
||||
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});
|
||||
else
|
||||
{
|
||||
loadPollResult({$poll_srl});
|
||||
jQuery("#poll_{$poll_srl}_result_button").css({/**/
|
||||
display: "none"
|
||||
/**/});
|
||||
|
||||
jQuery("#poll_{$poll_srl}_result_nobutton").css({/**/
|
||||
display: "table-row"
|
||||
/**/});
|
||||
|
||||
jQuery("#poll_{$poll_srl}_result_yesbutton").css({/**/
|
||||
display: "none"
|
||||
/**/});
|
||||
}
|
||||
/**/});
|
||||
</script>
|
||||
<div style="{$style}">
|
||||
<div id="poll_{$poll_srl}" class="pollWidget" style="display:none;">
|
||||
<script id="entry-template" type="text/x-handlebars-template">
|
||||
{{#each questions as |question questionid|}}
|
||||
<input type="hidden" name="checkcount_{{question.poll_index_srl}}" value="{{question.checkcount}}" />
|
||||
<div class="title">Q : {{question.title}}</div>
|
||||
|
||||
{{#if question.isMultipleChoice}}
|
||||
<div class="checkcount">
|
||||
{$lang->poll_checkcount} : {{question.checkcount}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#each question.items as |item itemid|}}
|
||||
<div class="item">
|
||||
{{#if question.isMultipleChoice}}
|
||||
<input type="checkbox" name="item_{{question.poll_srl}}_{{question.poll_index_srl}}" value="{{item.poll_item_srl}}" id="item_{{item.poll_item_srl}}" />
|
||||
{{else}}
|
||||
<input type="radio" name="item_{{question.poll_srl}}_{{question.poll_index_srl}}" value="{{item.poll_item_srl}}" id="item_{{item.poll_item_srl}}" />
|
||||
{{/if}}
|
||||
<label for="item_{{item.poll_item_srl}}">{{item.title}}</label>
|
||||
{{#if item.my_item}}
|
||||
<input type="button" value="x" onclick="deleteItem({{question.poll_srl}},{{question.poll_index_srl}},{{item.poll_item_srl}})" style="float: right;" class="btn poll_button _poll_delete_item" />
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
{{#if question.additem}}
|
||||
<div class="item add">
|
||||
<input type="text" name="new_item" id="new_item_{{question.poll_index_srl}}" value="" /> <input type="button" value="+" onclick="addItem({{question.poll_srl}},{{question.poll_index_srl}})" style="float: right;" class="btn poll_button _poll_add_item" />
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</script>
|
||||
<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)">
|
||||
<input type="hidden" name="module" value="poll" />
|
||||
<input type="hidden" name="act" value="procPoll" />
|
||||
<input type="hidden" name="poll_srl" value="{$poll_srl}" />
|
||||
<input type="hidden" name="poll_srl_indexes" value="" />
|
||||
<input type="hidden" name="skin" value="{$skin}" />
|
||||
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
|
||||
<input type="hidden" name="xe_validator_id" value="widgets/pollWidget/skins/default/form/1" />
|
||||
<table cellspacing="0" class="poll_table">
|
||||
<col width="7" />
|
||||
<col />
|
||||
<col width="7" />
|
||||
<tr class="cap">
|
||||
<td><img src="./images/lh.png" alt="lh" width="7" height="7" /></td>
|
||||
<td class="h"><img src="./images/blank.gif" height="7" alt="blank" /></td>
|
||||
<td><img src="./images/rh.png" alt="rh" width="7" height="7" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="title" colspan="3">
|
||||
{$lang->poll_stop_date}: <strong id="stop_date_{$poll_srl}"></strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l"><img src="./images/blank.gif" height="7" alt="blank" /></td>
|
||||
<td id="poll_content_{$poll_srl}" class="poll_content">
|
||||
|
||||
</td>
|
||||
<td class="r"><img src="./images/blank.gif" height="7" alt="blank" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="poll_button">
|
||||
<div>
|
||||
<input type="button" value="{$lang->cmd_view_result}" class="btn poll_button _poll_result _srl_{$poll_srl}" />
|
||||
<input type="submit" value="{$lang->cmd_apply_poll}" class="btn poll_button" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="cap">
|
||||
<td class="lb" ><img src="./images/lb.png" alt="lb" width="7" height="7" /></td>
|
||||
<td class="b"><img src="./images/blank.gif" alt="blank" /></td>
|
||||
<td class="rb" ><img src="./images/rb.png" alt="rb" width="7" height="7" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<div id="poll_{$poll_srl}_result" class="pollWidget poll_box" style="display:none;">
|
||||
<script id="entry-template-result" type="text/x-handlebars-template">
|
||||
{{#each questions as |question questionid|}}
|
||||
<div class="title">{{question.title}} ({{question.poll_count}})</div>
|
||||
{{#each question.items as |item itemid|}}
|
||||
<div class="item_text">
|
||||
{{#if question.showMembers}}
|
||||
<strong>{{item.number}}</strong> <img src="./images/pipe.png" alt="" /> <a href="#" onclick="showPollMember({{question.poll_srl}},{{item.poll_item_srl}});return false;">{{item.title}}</a>
|
||||
{{else}}
|
||||
<strong>{{item.number}}</strong> <img src="./images/pipe.png" alt="" /> {{item.title}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<table cellspacing="0" class="item_bar_table">
|
||||
<col width="30" />
|
||||
<col/>
|
||||
<col width="75" />
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td class="bar">
|
||||
{{#if item.isVote}}
|
||||
<img src="./images/color_bar.png" style="width:{{item.per}}%;height:6px;" alt="bar" />
|
||||
{{else}}
|
||||
<img src="./images/blank.gif" width="1" height="1" alt="" />
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="status"><strong>{{item.poll_count}}</strong> ({{item.per}}%)</td>
|
||||
</tr>
|
||||
</table>
|
||||
{{/each}}
|
||||
{{/each}}
|
||||
</script>
|
||||
<script id="entry-template-members" type="text/x-handlebars-template">
|
||||
{{#each members as |member memberid|}}
|
||||
{{#if member.isImage}}
|
||||
<li><img src="{{member.profile_image}}" width="16" height="16" /> <a href="#popup_menu_area" class="member_{{member.member_srl}}" onclick="return false">{{member.nick_name}}</a></li>
|
||||
{{else}}
|
||||
<li><img class="dummy" src="{{dummy_profile}}" width="16" height="16" /> <a href="#popup_menu_area" class="member_{{member.member_srl}}" onclick="return false">{{member.nick_name}}</a></li>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
{{#if isPage}}
|
||||
<input type="button" id="btn_load_more_{{poll_item_srl}}" value="More..." onclick="showPollMemberNext({{poll_srl}},{{poll_item_srl}});return false;" style="width:100%;" class="btn poll_button" />
|
||||
{{/if}}
|
||||
</script>
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/poll/skins/default/form/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
|
||||
<table cellspacing="0" class="poll_table">
|
||||
<col width="7" />
|
||||
<col />
|
||||
<col width="7" />
|
||||
<tr class="cap">
|
||||
<td><img src="./images/lh.png" alt="lh" width="7" height="7" /></td>
|
||||
<td class="h"><img src="./images/blank.gif" height="7" alt="blank" /></td>
|
||||
<td><img src="./images/rh.png" alt="rh" width="7" height="7" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="title" colspan="3">
|
||||
<div style="float:left">
|
||||
{$lang->poll_stop_date}: <strong id="stop_date_result_{$poll_srl}"></strong> 24:00
|
||||
</div>
|
||||
<div style="float:right">
|
||||
{$lang->poll_join_count}: <strong id="poll_count_result_{$poll_srl}"></strong>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l"><img src="./images/blank.gif" height="7" alt="blank" /></td>
|
||||
<td id="poll_content_{$poll_srl}_result" class="poll_content">
|
||||
</td>
|
||||
<td class="r"><img src="./images/blank.gif" height="7" alt="blank" /></td>
|
||||
</tr>
|
||||
<tr id="poll_{$poll_srl}_result_button" style="width:100%;display: none;">
|
||||
<td colspan="3" class="poll_button">
|
||||
<div>
|
||||
<input type="button" value="{$lang->btn_poll_gotovote}" class="btn poll_button _poll_screen _srl_{$poll_srl}" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="poll_{$poll_srl}_gotoresult_button" style="width:100%;display: none;">
|
||||
<td colspan="3" class="poll_button">
|
||||
<div>
|
||||
<input type="button" value="{$lang->btn_poll_gotoresult}" class="btn poll_button _gotoresult_screen _srl_{$poll_srl}" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="poll_{$poll_srl}_result_nobutton" class="cap">
|
||||
<td class="rlb" ><img src="./images/rlb.png" alt="lb" width="7" height="7" /></td>
|
||||
<td class="bb"><img src="./images/blank.gif" alt="blank" /></td>
|
||||
<td class="rrb" ><img src="./images/rrb.png" alt="rb" width="7" height="7" /></td>
|
||||
</tr>
|
||||
<tr id="poll_{$poll_srl}_result_yesbutton" class="cap">
|
||||
<td class="lb" ><img src="./images/lb.png" alt="lb" width="7" height="7" /></td>
|
||||
<td class="b"><img src="./images/blank.gif" alt="blank" /></td>
|
||||
<td class="rb" ><img src="./images/rb.png" alt="rb" width="7" height="7" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
41
widgets/pollWidget/skins/default/skin.xml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<skin version="0.2">
|
||||
<title xml:lang="ko">설문조사 기본 스킨</title>
|
||||
<title xml:lang="zh-CN">投票系统默认皮肤</title>
|
||||
<title xml:lang="jp">アンケート調査デフォルトスキン</title>
|
||||
<title xml:lang="en">Default Skin of teh Poll</title>
|
||||
<title xml:lang="vi">Skin mặc định của thăm dò</title>
|
||||
<title xml:lang="zh-TW">投票系統預設面板</title>
|
||||
<title xml:lang="tr">Oylamanın Varsayılan Dış Görünümü</title>
|
||||
<description xml:lang="ko">설문조사 기본 스킨</description>
|
||||
<description xml:lang="zh-CN">投票系统默认皮肤。</description>
|
||||
<description xml:lang="jp">アンケート調査デフォルトスキン</description>
|
||||
<description xml:lang="en">Default Skin of the Poll</description>
|
||||
<description xml:lang="vi">Skin mặc định của thăm dò.</description>
|
||||
<description xml:lang="zh-TW">投票系統預設面板。</description>
|
||||
<description xml:lang="tr">Oylamanın Varsayılan Dış Görünümü</description>
|
||||
<version>2.0</version>
|
||||
<date>2015-06-09</date>
|
||||
|
||||
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
|
||||
<name xml:lang="ko">NAVER</name>
|
||||
<name xml:lang="vi">NAVER</name>
|
||||
<name xml:lang="zh-CN">NAVER</name>
|
||||
<name xml:lang="jp">NAVER</name>
|
||||
<name xml:lang="en">NAVER</name>
|
||||
<name xml:lang="zh-TW">NAVER</name>
|
||||
<name xml:lang="tr">NAVER</name>
|
||||
</author>
|
||||
|
||||
<colorset>
|
||||
<color name="normal">
|
||||
<title xml:lang="ko">기본</title>
|
||||
<title xml:lang="vi">Mặc định</title>
|
||||
<title xml:lang="zh-CN">默认</title>
|
||||
<title xml:lang="jp">デフォルト</title>
|
||||
<title xml:lang="en">Default</title>
|
||||
<title xml:lang="zh-TW">預設</title>
|
||||
<title xml:lang="tr">Varsayılan</title>
|
||||
</color>
|
||||
</colorset>
|
||||
</skin>
|
||||
12
widgets/pollWidget/skins/simple/_header.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<!--%load_js_plugin("handlebars")-->
|
||||
|
||||
<!--@if(__DEBUG__)-->
|
||||
<load target="css/poll.css" />
|
||||
<load target="js/poll.js" />
|
||||
<!--@else-->
|
||||
<load target="css/poll.min.css" />
|
||||
<load target="js/poll.min.js" />
|
||||
<!--@end-->
|
||||
{@
|
||||
Context::loadLang(_XE_PATH_ . 'modules/poll/lang');
|
||||
}
|
||||
30
widgets/pollWidget/skins/simple/css/poll.css
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
.simple_poll { table-layout:fixed; padding:0; margin:0; border:none;}
|
||||
|
||||
.simple_poll td { padding:0; margin:0; }
|
||||
.simple_poll td.title { text-align:right; }
|
||||
|
||||
.simple_poll td .itemDiv { border-top:1px solid #BBBBBB; margin-top:3px; padding:3px 0 3px 0; }
|
||||
.simple_poll td .title { color:#000000; font-weight:bold; letter-spacing:-1px;}
|
||||
.simple_poll td .checkcount { color:#AAAAAA; }
|
||||
|
||||
.simple_poll td .item { color:#636363; margin:5px 0 5px 0; }
|
||||
.simple_poll td .item input { margin:0; padding:0; }
|
||||
.simple_poll td .item label { letter-spacing:-1px; }
|
||||
|
||||
.simple_poll td .resultItem { color:#636363; margin:6px 0 0 10px; letter-spacing:-1px;}
|
||||
|
||||
.simple_poll td .barBox { margin-left:10px; }
|
||||
.simple_poll td .barBox .bar { margin:3px 0;}
|
||||
.simple_poll td .barBox .status {color:#AAAAAA; }
|
||||
|
||||
.simple_poll td.stopDate { color:#AAAAAA; border-top:1px solid #BBBBBB; padding-top:3px;}
|
||||
.simple_poll td.stopDate a { color:#AAAAAA; text-decoration:none; }
|
||||
|
||||
.simple_poll td.poll_button { text-align:left; padding-top:3px;}
|
||||
.simple_poll td.poll_button .poll_button { border:1px solid #EEEEEE; background-color:#AAAAAA; color:#FFFFFF; font-weight:bold; padding:1px 3px 1px 3px; height:20px; }
|
||||
|
||||
|
||||
.simple_poll td.b { background-color:#F6F6F5; height:7px; }
|
||||
.simple_poll td.b img { width:100%; height:6px; border-bottom:1px solid #E5E5E5; }
|
||||
.simple_poll td.bb { height:7px; }
|
||||
.simple_poll td.bb img { width:100%; height:6px; border-bottom:1px solid #E5E5E5; }
|
||||
1
widgets/pollWidget/skins/simple/css/poll.min.css
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
.simple_poll{table-layout:fixed;padding:0;margin:0;border:0}.simple_poll td{padding:0;margin:0}.simple_poll td.title{text-align:right}.simple_poll td .itemDiv{border-top:1px solid #BBB;margin-top:3px;padding:3px 0}.simple_poll td .title{color:#000;font-weight:700;letter-spacing:-1px}.simple_poll td .checkcount{color:#AAA}.simple_poll td .item{color:#636363;margin:5px 0}.simple_poll td .item input{margin:0;padding:0}.simple_poll td .item label{letter-spacing:-1px}.simple_poll td .resultItem{color:#636363;margin:6px 0 0 10px;letter-spacing:-1px}.simple_poll td .barBox{margin-left:10px}.simple_poll td .barBox .bar{margin:3px 0}.simple_poll td .barBox .status{color:#AAA}.simple_poll td.stopDate{color:#AAA;border-top:1px solid #BBB;padding-top:3px}.simple_poll td.stopDate a{color:#AAA;text-decoration:none}.simple_poll td.poll_button{text-align:left;padding-top:3px}.simple_poll td.poll_button .poll_button{border:1px solid #EEE;background-color:#AAA;color:#FFF;font-weight:700;padding:1px 3px;height:20px}.simple_poll td.b{background-color:#F6F6F5;height:7px}.simple_poll td.b img{width:100%;height:6px;border-bottom:1px solid #E5E5E5}.simple_poll td.bb{height:7px}.simple_poll td.bb img{width:100%;height:6px;border-bottom:1px solid #E5E5E5}
|
||||
BIN
widgets/pollWidget/skins/simple/images/color_bar.png
Normal file
|
After Width: | Height: | Size: 328 B |
404
widgets/pollWidget/skins/simple/js/poll.js
Normal file
|
|
@ -0,0 +1,404 @@
|
|||
function initTemplete(type)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
case 'poll':
|
||||
if(typeof window.template == 'undefined')
|
||||
{
|
||||
var source = jQuery("#entry-template").html();
|
||||
window.template = Handlebars.compile(source);
|
||||
}
|
||||
break;
|
||||
case 'result':
|
||||
if(typeof window.template_result == 'undefined')
|
||||
{
|
||||
var source = jQuery("#entry-template-result").html();
|
||||
window.template_result = Handlebars.compile(source);
|
||||
}
|
||||
break;
|
||||
case 'members':
|
||||
if(typeof window.template_member == 'undefined')
|
||||
{
|
||||
var source = jQuery("#entry-template-members").html();
|
||||
window.template_member = Handlebars.compile(source);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* 설문 참여 함수 */
|
||||
function doPoll(fo_obj) {
|
||||
|
||||
var checkcount = new Array();
|
||||
var item = new Array();
|
||||
|
||||
for(var i=0;i<fo_obj.length;i++) {
|
||||
var obj = fo_obj[i];
|
||||
if(obj.nodeName != 'INPUT') continue;
|
||||
|
||||
var name = obj.name;
|
||||
if(name.indexOf('checkcount')>-1) {
|
||||
var t = name.split('_');
|
||||
var poll_srl_index = parseInt(t[1],10);
|
||||
checkcount[poll_srl_index] = obj.value;
|
||||
item[poll_srl_index] = new Array();
|
||||
|
||||
} else if(name.indexOf('item_')>-1) {
|
||||
var t = name.split('_');
|
||||
var poll_srl = parseInt(t[1],10);
|
||||
var poll_srl_index = parseInt(t[2],10);
|
||||
if(obj.checked == true) item[poll_srl_index][item[poll_srl_index].length] = obj.value;
|
||||
}
|
||||
}
|
||||
|
||||
var poll_srl_indexes = "";
|
||||
for(var poll_srl_index in checkcount) {
|
||||
if(!checkcount.hasOwnProperty(poll_srl_index)) continue;
|
||||
var count = checkcount[poll_srl_index];
|
||||
var items = item[poll_srl_index];
|
||||
if(items.length < 1 || count < items.length) {
|
||||
alert(poll_alert_lang);
|
||||
return false;
|
||||
}
|
||||
|
||||
poll_srl_indexes += items.join(',')+',';
|
||||
}
|
||||
fo_obj.poll_srl_indexes.value = poll_srl_indexes;
|
||||
|
||||
jQuery.exec_json("poll.procPoll", {"poll_srl":poll_srl,"poll_srl_indexes":poll_srl_indexes}, function(data){
|
||||
if(data.error!=0) alert(data.message);
|
||||
else
|
||||
{
|
||||
loadPollResult(poll_srl);
|
||||
jQuery("#poll_" + poll_srl + "_gotoresult_button").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + poll_srl + "_result_nobutton").css({
|
||||
display: "table-row"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + poll_srl + "_result_yesbutton").css({
|
||||
display: "none"
|
||||
});
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 항목 추가 함수 */
|
||||
function addItem(poll_srl,poll_srl_indexes) {
|
||||
jQuery.exec_json("poll.procPollInsertItem", {"srl":poll_srl,"index_srl":poll_srl_indexes,"title":jQuery("#new_item_" + poll_srl_indexes).val()}, function(data){
|
||||
if(data.error!=0) alert(data.message);
|
||||
else
|
||||
{
|
||||
jQuery("#poll_" + poll_srl + "_result_button").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + poll_srl + "_result_nobutton").css({
|
||||
display: "table-row"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + poll_srl + "_result_yesbutton").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
loadPoll(poll_srl);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 항목 삭제 함수 */
|
||||
function deleteItem(poll_srl,poll_srl_indexes,poll_item_srl) {
|
||||
jQuery.exec_json("poll.procPollDeleteItem", {"srl":poll_srl,"index_srl":poll_srl_indexes,"item_srl":poll_item_srl}, function(data){
|
||||
if(data.error!=0) alert(data.message);
|
||||
else
|
||||
{
|
||||
jQuery("#poll_" + poll_srl + "_result_button").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + poll_srl + "_result_nobutton").css({
|
||||
display: "table-row"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + poll_srl + "_result_yesbutton").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
loadPoll(poll_srl);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
function loadPoll(poll_srl)
|
||||
{
|
||||
jQuery.exec_json("poll.getPollinfo", {"poll_srl":poll_srl}, function(data){
|
||||
jQuery("#stop_date_"+poll_srl).html(data.poll.stop_date);
|
||||
|
||||
initTemplete('poll');
|
||||
var template = window.template;
|
||||
var context = Object;
|
||||
var additem = data.caniadditem;
|
||||
context.questions = {};
|
||||
for (var i in data.poll.poll) {
|
||||
var poll = data.poll.poll[i];
|
||||
context.questions[i] = {};
|
||||
context.questions[i].poll_index_srl = poll.poll_index_srl;
|
||||
context.questions[i].checkcount = poll.checkcount;
|
||||
context.questions[i].title = poll.title;
|
||||
context.questions[i].items = poll.item;
|
||||
context.questions[i].poll_srl = poll_srl;
|
||||
context.questions[i].isMultipleChoice = (poll.checkcount>1);
|
||||
context.questions[i].additem = additem;
|
||||
}
|
||||
var html = template(context);
|
||||
|
||||
jQuery("#poll_content_" + poll_srl).html(html);
|
||||
|
||||
jQuery("#poll_" + poll_srl).css({
|
||||
display: "block"
|
||||
});
|
||||
jQuery("#poll_" + poll_srl + '_result').css({
|
||||
display: "none"
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function showPollMemberNext(poll_srl,poll_item_srl)
|
||||
{
|
||||
if(typeof window.cur_page == 'undefined')
|
||||
{
|
||||
window.cur_page = 1;
|
||||
}
|
||||
|
||||
window.cur_page++;
|
||||
|
||||
jQuery.exec_json("poll.getPollitemInfo", {"poll_srl":poll_srl,"poll_item":poll_item_srl,"page":window.cur_page}, function(data){
|
||||
initTemplete('members');
|
||||
var template = window.template_member;
|
||||
var context = Object;
|
||||
|
||||
context.poll_srl = poll_srl;
|
||||
context.poll_item_srl = poll_item_srl;
|
||||
context.page = window.cur_page;
|
||||
context.isPage = ((data.page.total_count>5) && (window.cur_page<data.page.total_page));
|
||||
|
||||
context.members = {};
|
||||
|
||||
for (var i in data.item.member) {
|
||||
var member = data.item.member[i];
|
||||
|
||||
context.members[i] = {};
|
||||
context.members[i].profile_image = member.profile_image;
|
||||
context.members[i].member_srl = member.member_srl;
|
||||
context.members[i].nick_name = member.nick_name;
|
||||
context.members[i].isImage = (member.profile_image != '');
|
||||
context.members[i].dummy_profile = data.dummy_profile;
|
||||
}
|
||||
var html = template(context);
|
||||
|
||||
jQuery("#btn_load_more_" + poll_item_srl).replaceWith(html);
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function showPollMember(poll_srl,poll_item_srl)
|
||||
{
|
||||
window.cur_page = 1;
|
||||
|
||||
jQuery.exec_json("poll.getPollitemInfo", {"poll_srl":poll_srl,"poll_item":poll_item_srl,"page":window.cur_page}, function(data){
|
||||
initTemplete('members');
|
||||
var template = window.template_member;
|
||||
var context = Object;
|
||||
var title = poll_member_lang;
|
||||
title = title.replace("%s",data.item.title);
|
||||
var html = '<div class="itemDiv"><div class="title">' + title + '</div><ul>';
|
||||
context.poll_srl = poll_srl;
|
||||
context.poll_item_srl = poll_item_srl;
|
||||
context.page = window.cur_page;
|
||||
context.isPage = ((data.page.total_count>5) && (window.cur_page<data.page.total_count));
|
||||
|
||||
context.members = {};
|
||||
|
||||
for (var i in data.item.member) {
|
||||
var member = data.item.member[i];
|
||||
|
||||
context.members[i] = {};
|
||||
context.members[i].profile_image = member.profile_image;
|
||||
context.members[i].member_srl = member.member_srl;
|
||||
context.members[i].nick_name = member.nick_name;
|
||||
context.members[i].isImage = (member.profile_image != '');
|
||||
context.members[i].dummy_profile = data.dummy_profile;
|
||||
}
|
||||
html = html + template(context) + '</ul></div>';
|
||||
|
||||
jQuery("#poll_content_" + poll_srl + "_result").html(html);
|
||||
|
||||
jQuery("#poll_" + poll_srl + "_gotoresult_button").css({
|
||||
display: "table-row"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + poll_srl + "_result_nobutton").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + poll_srl + "_result_yesbutton").css({
|
||||
display: "table-row"
|
||||
});
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function loadPollResult(poll_srl)
|
||||
{
|
||||
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>
|
||||
*/
|
||||
jQuery("#stop_date_result_" + poll_srl).html(data.poll.stop_date);
|
||||
jQuery("#poll_count_result_" + poll_srl).html(data.poll.poll_count);
|
||||
|
||||
initTemplete('result');
|
||||
var template = window.template_result;
|
||||
var context = Object;
|
||||
var showMembers = (data.poll.poll_type==1 || data.poll.poll_type==3);
|
||||
context.questions = {};
|
||||
for (var i in data.poll.poll) {
|
||||
var poll = data.poll.poll[i];
|
||||
context.questions[i] = {};
|
||||
context.questions[i].poll_index_srl = poll.poll_index_srl;
|
||||
context.questions[i].checkcount = poll.checkcount;
|
||||
context.questions[i].title = poll.title;
|
||||
context.questions[i].poll_count = poll.poll_count;
|
||||
context.questions[i].showMembers = showMembers;
|
||||
context.questions[i].items = poll.item;
|
||||
var count = 0;
|
||||
for (var j in poll.item) {
|
||||
var item = poll.item[j];
|
||||
count++;
|
||||
if(poll.poll_count>0)
|
||||
{
|
||||
context.questions[i].items[j].per = Math.round((item.poll_count / poll.poll_count)*100);
|
||||
context.questions[i].items[j].isVote = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
context.questions[i].items[j].per = 0;
|
||||
context.questions[i].items[j].isVote = false;
|
||||
}
|
||||
context.questions[i].items[j].number = count;
|
||||
}
|
||||
context.questions[i].items = poll.item;
|
||||
context.questions[i].poll_srl = poll_srl;
|
||||
context.questions[i].isMultipleChoice = (poll.checkcount>1);
|
||||
}
|
||||
var html = template(context);
|
||||
|
||||
jQuery("#poll_content_" + poll_srl + "_result").html(html);
|
||||
jQuery("#poll_" + poll_srl).css({
|
||||
display: "none"
|
||||
});
|
||||
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($){
|
||||
/* View poll result */
|
||||
$('._poll_result').click(function(){
|
||||
var cls = $(this).attr('class'), srl, skin;
|
||||
|
||||
try{
|
||||
srl = cls.match(/\b_srl_(\d+)\b/)[1];
|
||||
}catch(e){ };
|
||||
|
||||
if(!srl) return false;
|
||||
|
||||
jQuery("#poll_" + srl + "_result_button").css({
|
||||
display: "table-row"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + srl + "_result_nobutton").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + srl + "_result_yesbutton").css({
|
||||
display: "table-row"
|
||||
});
|
||||
|
||||
loadPollResult(srl);
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
/* goto poll result */
|
||||
$('._gotoresult_screen').click(function(){
|
||||
var cls = $(this).attr('class'), srl, skin;
|
||||
|
||||
try{
|
||||
srl = cls.match(/\b_srl_(\d+)\b/)[1];
|
||||
}catch(e){ };
|
||||
|
||||
if(!srl) return false;
|
||||
|
||||
jQuery("#poll_" + srl + "_gotoresult_button").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + srl + "_result_nobutton").css({
|
||||
display: "table-row"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + srl + "_result_yesbutton").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
loadPollResult(srl);
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
/* View poll screen */
|
||||
$('._poll_screen').click(function(){
|
||||
var cls = $(this).attr('class'), srl, skin;
|
||||
|
||||
try{
|
||||
srl = cls.match(/\b_srl_(\d+)\b/)[1];
|
||||
}catch(e){ };
|
||||
|
||||
if(!srl) return false;
|
||||
|
||||
jQuery("#poll_" + srl + "_result_button").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + srl + "_result_nobutton").css({
|
||||
display: "table-row"
|
||||
});
|
||||
|
||||
jQuery("#poll_" + srl + "_result_yesbutton").css({
|
||||
display: "none"
|
||||
});
|
||||
|
||||
loadPoll(srl);
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
1
widgets/pollWidget/skins/simple/js/poll.min.js
vendored
Normal file
148
widgets/pollWidget/skins/simple/pollview.html
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
<include target="_header.html" />
|
||||
<script>
|
||||
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});
|
||||
else
|
||||
{
|
||||
loadPollResult({$poll_srl});
|
||||
jQuery("#poll_{$poll_srl}_result_button").css({/**/
|
||||
display: "none"
|
||||
/**/});
|
||||
|
||||
jQuery("#poll_{$poll_srl}_result_nobutton").css({/**/
|
||||
display: "table-row"
|
||||
/**/});
|
||||
|
||||
jQuery("#poll_{$poll_srl}_result_yesbutton").css({/**/
|
||||
display: "none"
|
||||
/**/});
|
||||
}
|
||||
/**/});
|
||||
</script>
|
||||
<div style="{$style}">
|
||||
<div id="poll_{$poll_srl}" class="pollWidget" style="display:none;">
|
||||
<script id="entry-template" type="text/x-handlebars-template">
|
||||
{{#each questions as |question questionid|}}
|
||||
<div class="itemDiv">
|
||||
<input type="hidden" name="checkcount_{{question.poll_index_srl}}" value="{{question.checkcount}}" />
|
||||
<div class="title">{{question.title}}</div>
|
||||
|
||||
{{#if question.isMultipleChoice}}
|
||||
<div class="checkcount">
|
||||
{$lang->poll_checkcount} : {{question.checkcount}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#each question.items as |item itemid|}}
|
||||
<div class="item">
|
||||
{{#if question.isMultipleChoice}}
|
||||
<input type="checkbox" name="item_{{question.poll_srl}}_{{question.poll_index_srl}}" value="{{item.poll_item_srl}}" id="item_{{item.poll_item_srl}}" />
|
||||
{{else}}
|
||||
<input type="radio" name="item_{{question.poll_srl}}_{{question.poll_index_srl}}" value="{{item.poll_item_srl}}" id="item_{{item.poll_item_srl}}" />
|
||||
{{/if}}
|
||||
<label for="item_{{item.poll_item_srl}}">{{item.title}}</label>
|
||||
{{#if item.my_item}}
|
||||
<input type="button" value="x" onclick="deleteItem({{question.poll_srl}},{{question.poll_index_srl}},{{item.poll_item_srl}})" style="float: right;" class="btn poll_button _poll_delete_item" />
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
{{#if question.additem}}
|
||||
<div class="item add">
|
||||
<input type="text" name="new_item" id="new_item_{{question.poll_index_srl}}" value="" /> <input type="button" value="+" onclick="addItem({{question.poll_srl}},{{question.poll_index_srl}})" style="float: right;" class="btn poll_button _poll_add_item" />
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/each}}
|
||||
</script>
|
||||
<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)">
|
||||
<input type="hidden" name="module" value="poll" />
|
||||
<input type="hidden" name="act" value="procPoll" />
|
||||
<input type="hidden" name="poll_srl" value="{$poll_srl}" />
|
||||
<input type="hidden" name="poll_srl_indexes" value="" />
|
||||
<input type="hidden" name="skin" value="{$skin}" />
|
||||
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
|
||||
<input type="hidden" name="xe_validator_id" value="widgets/pollWidget/skins/default/form/1" />
|
||||
<table cellspacing="0" class="simple_poll">
|
||||
<tr>
|
||||
<td id="poll_content_{$poll_srl}" class="poll_content">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="stopDate">
|
||||
~<strong id="stop_date_{$poll_srl}"></strong> (<a href="#" class="_poll_result _srl_{$poll_srl}">{$lang->cmd_view_result}</a>)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="poll_button">
|
||||
<input type="submit" value="{$lang->cmd_apply_poll}" class="poll_button" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<div id="poll_{$poll_srl}_result" class="pollWidget poll_box" style="display:none;">
|
||||
<script id="entry-template-result" type="text/x-handlebars-template">
|
||||
<div class="itemDiv">
|
||||
{{#each questions as |question questionid|}}
|
||||
<div class="title">{{question.title}} ({{question.poll_count}})</div>
|
||||
{{#each question.items as |item itemid|}}
|
||||
<div class="resultItem">
|
||||
{{#if question.showMembers}}
|
||||
<a href="#" onclick="showPollMember({{question.poll_srl}},{{item.poll_item_srl}});return false;">{{item.title}}</a>
|
||||
{{else}}
|
||||
{{item.title}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class="barBox">
|
||||
<div class="bar"><img src="./images/color_bar.png" style="width:{{item.per}}%;height:6px;" alt="bar" /></div>
|
||||
<div class="status">{{item.poll_count}} ({{item.per}}%)</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/each}}
|
||||
</div>
|
||||
</script>
|
||||
<script id="entry-template-members" type="text/x-handlebars-template">
|
||||
{{#each members as |member memberid|}}
|
||||
{{#if member.isImage}}
|
||||
<li><img src="{{member.profile_image}}" width="16" height="16" /> <a href="#popup_menu_area" class="member_{{member.member_srl}}" onclick="return false">{{member.nick_name}}</a></li>
|
||||
{{else}}
|
||||
<li><img class="dummy" src="{{dummy_profile}}" width="16" height="16" /> <a href="#popup_menu_area" class="member_{{member.member_srl}}" onclick="return false">{{member.nick_name}}</a></li>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
{{#if isPage}}
|
||||
<input type="button" id="btn_load_more_{{poll_item_srl}}" value="More..." onclick="showPollMemberNext({{poll_srl}},{{poll_item_srl}});return false;" style="width:100%;" class="btn poll_button" />
|
||||
{{/if}}
|
||||
</script>
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/poll/skins/default/form/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
|
||||
<table cellspacing="0" class="simple_poll">
|
||||
<tr>
|
||||
<td id="poll_content_{$poll_srl}_result" class="poll_content">
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="poll_{$poll_srl}_result_button" style="width:100%;display: none;">
|
||||
<td colspan="3" class="poll_button">
|
||||
<div>
|
||||
<input type="button" value="{$lang->btn_poll_gotovote}" class="btn poll_button _poll_screen _srl_{$poll_srl}" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="poll_{$poll_srl}_gotoresult_button" style="width:100%;display: none;">
|
||||
<td colspan="3" class="poll_button">
|
||||
<div>
|
||||
<input type="button" value="{$lang->btn_poll_gotoresult}" class="btn poll_button _gotoresult_screen _srl_{$poll_srl}" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
38
widgets/pollWidget/skins/simple/skin.xml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<skin version="0.2">
|
||||
<title xml:lang="ko">설문조사 간단한 스킨</title>
|
||||
<title xml:lang="vi">Skin thăm dò đơn giản</title>
|
||||
<title xml:lang="jp">アンケート調査の簡単スキン</title>
|
||||
<title xml:lang="zh-CN">投票系统简易皮肤</title>
|
||||
<title xml:lang="zh-TW">投票系統簡單面板</title>
|
||||
<title xml:lang="tr">Oylama Sistem Dış Görünümü</title>
|
||||
<description xml:lang="ko">설문조사 간단한 스킨</description>
|
||||
<description xml:lang="vi">Skin hiển thị thăm dò đơn giản.</description>
|
||||
<description xml:lang="jp">アンケート調査の簡単スキン</description>
|
||||
<description xml:lang="zh-CN">投票系统简易皮肤。</description>
|
||||
<description xml:lang="zh-TW">投票系統簡單面板。</description>
|
||||
<description xml:lang="tr">Oylama Sistemi Dış Görünümü</description>
|
||||
<version>2.0</version>
|
||||
<date>2015-06-09</date>
|
||||
|
||||
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
|
||||
<name xml:lang="ko">NAVER</name>
|
||||
<name xml:lang="vi">NAVER</name>
|
||||
<name xml:lang="jp">NAVER</name>
|
||||
<name xml:lang="zh-CN">NAVER</name>
|
||||
<name xml:lang="zh-TW">NAVER</name>
|
||||
<name xml:lang="tr">NAVER</name>
|
||||
</author>
|
||||
|
||||
<colorset>
|
||||
<color name="normal">
|
||||
<title xml:lang="ko">기본</title>
|
||||
<title xml:lang="vi">Mặc định</title>
|
||||
<title xml:lang="zh-CN">默认</title>
|
||||
<title xml:lang="jp">デフォルト</title>
|
||||
<title xml:lang="en">Default</title>
|
||||
<title xml:lang="zh-TW">預設</title>
|
||||
<title xml:lang="tr">Varsayılan</title>
|
||||
</color>
|
||||
</colorset>
|
||||
</skin>
|
||||