Fix conflicted, handlebars.min.js

This commit is contained in:
MinSoo Kim 2016-01-04 13:04:32 +09:00
commit c0c290a460
68 changed files with 6834 additions and 3722 deletions

View file

@ -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>

View file

@ -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 */

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

@ -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">

View file

@ -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);

View 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);