merge from 1.7.3.5(r13153:r13167)

git-svn-id: http://xe-core.googlecode.com/svn/trunk@13168 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2013-09-29 23:32:39 +00:00
parent cc47d2b247
commit 2d3f149b5a
2042 changed files with 129266 additions and 126243 deletions

View file

@ -10,7 +10,7 @@
<title xml:lang="zh-TW">投票調查</title>
<title xml:lang="tr">Oylama Bileşenleri</title>
<description xml:lang="vi">Bạn có thể tạo một cuộc thăm dò cho chủ đề của mình.</description>
<description xml:lang="ko">글 작성시에 설문조사를 첨부하실 수 있습니다. 설문조사 컴포넌트는 설문조사 모듈의 설정에 영향을 받습니다.</description>
<description xml:lang="ko">글 작성시에 설문조사를 첨부 수 있습니다. 설문조사 컴포넌트는 설문조사 모듈의 설정에 영향을 받습니다.</description>
<description xml:lang="jp">書き込みの時、アンケート機能の追加ができます。アンケートモジュールの影響を受けます。</description>
<description xml:lang="zh-CN">发表主题时可以附加投票调查。投票调查组件受投票调查模块设置的影响。</description>
<description xml:lang="en">You can attach a poll to your articles. Poll component will be available when the poll module is enabled.</description>

View file

@ -83,7 +83,7 @@
<value xml:lang="jp"><![CDATA[最後の項目削除]]></value>
</item>
<item name="msg_poll_cannot_modify">
<value xml:lang="ko"><![CDATA[설문조사는 수정할 수 없습니다. 삭제 후 다시 생성하셔야 합니다.]]></value>
<value xml:lang="ko"><![CDATA[설문조사는 수정할 수 없습니다. 삭제 후 다시 생성야 합니다.]]></value>
<value xml:lang="en"><![CDATA[You cannot modify the poll. You need to delete it and create a new one.]]></value>
<value xml:lang="jp"><![CDATA[アンケートは修正できません。削除後、改めて作成してください。]]></value>
<value xml:lang="zh-CN"><![CDATA[投票调查不提供修改功能。必须删除后再生成]]></value>

View file

@ -1,57 +1,61 @@
<?php
/**
* @class poll_maker
* @author NHN (developers@xpressengine.com)
* @brief Editor provides the ability to link to the url.
**/
/**
* @class poll_maker
* @author NHN (developers@xpressengine.com)
* @brief Editor provides the ability to link to the url.
*/
class poll_maker extends EditorHandler
{
// editor_sequence from the editor must attend mandatory wearing ....
var $editor_sequence = 0;
var $component_path = '';
class poll_maker extends EditorHandler {
// editor_sequence from the editor must attend mandatory wearing ....
var $editor_sequence = 0;
var $component_path = '';
/**
* @brief editor_sequence and components out of the path
*/
function poll_maker($editor_sequence, $component_path)
{
$this->editor_sequence = $editor_sequence;
$this->component_path = $component_path;
}
/**
* @brief editor_sequence and components out of the path
**/
function poll_maker($editor_sequence, $component_path) {
$this->editor_sequence = $editor_sequence;
$this->component_path = $component_path;
}
/**
* @brief popup window to display in popup window request is to add content
*/
function getPopupContent()
{
// Wanted Skins survey
$oModuleModel = &getModel('module');
$skin_list = $oModuleModel->getSkins("./modules/poll/");
Context::set('skin_list', $skin_list);
// Pre-compiled source code to compile template return to
$tpl_path = $this->component_path.'tpl';
$tpl_file = 'popup.html';
/**
* @brief popup window to display in popup window request is to add content
**/
function getPopupContent() {
// Wanted Skins survey
$oModuleModel = &getModel('module');
$skin_list = $oModuleModel->getSkins("./modules/poll/");
Context::set('skin_list', $skin_list);
// Pre-compiled source code to compile template return to
$tpl_path = $this->component_path.'tpl';
$tpl_file = 'popup.html';
$oTemplate = &TemplateHandler::getInstance();
return $oTemplate->compile($tpl_path, $tpl_file);
}
$oTemplate = &TemplateHandler::getInstance();
return $oTemplate->compile($tpl_path, $tpl_file);
}
/**
* @brief Editor of the components separately if you use a unique code to the html code for a method to change
*
* Images and multimedia, seolmundeung unique code is required for the editor component added to its own code, and then
* DocumentModule:: transContent() of its components transHtml() method call to change the html code for your own
*/
function transHTML($xml_obj)
{
$poll_srl = $xml_obj->attrs->poll_srl;
$skin = $xml_obj->attrs->skin;
if(!$skin) $skin = 'default';
/**
* @brief Editor of the components separately if you use a unique code to the html code for a method to change
*
* Images and multimedia, seolmundeung unique code is required for the editor component added to its own code, and then
* DocumentModule:: transContent() of its components transHtml() method call to change the html code for your own
**/
function transHTML($xml_obj) {
$poll_srl = $xml_obj->attrs->poll_srl;
$skin = $xml_obj->attrs->skin;
if(!$skin) $skin = 'default';
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);
}
}
?>
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);
}
}
/* End of file poll_maker.class.php */
/* Location: ./modules/editor/components/poll_maker/poll_maker.class.php */

View file

@ -1,5 +1,6 @@
@charset "utf-8";
@import url(../../../../../modules/admin/tpl/css/admin.css);
@import url(../../../../../common/css/bootstrap.min.css);
.display_date { cursor:pointer; width:80px; float:left; border:1px solid; border-color:#a6a6a6 #d8d8d8 #d8d8d8 #a6a6a6; height:1em; padding:3px; font-family:tahoma; }

View file

@ -6,89 +6,90 @@
<!--// datepicker javascript plugin load -->
<!--%load_js_plugin("ui.datepicker")-->
<script type="text/javascript">
<script>
var msg_poll_cannot_modify = "{$lang->msg_poll_cannot_modify}";
</script>
<h1 class="h1">{$component_info->title} ver. {$component_info->version}</h1>
<form action="./" method="post" id="fo_component" onSubmit="procFilter(this, insert_poll); return false;">
<input type="hidden" name="component" value="{$component_info->component_name}" />
<input type="hidden" name="method" value="insertPoll" />
<input type="hidden" name="poll_srl" value="" />
<div class="table">
<table width="100%" border="1" cellspacing="0">
<col width="100" />
<col />
<tr>
<th scope="row">{$lang->poll_stop_date}</th>
<td>
<input type="hidden" name="stop_date" id="stop_date" value="{date('Ymd',time()+60*60*24*30)}" />
<input type="text" class="inputDate" value="{date('Y-m-d',time()+60*60*24*30)}" readonly="readonly" />
<script type="text/javascript">
<section class="section">
<h1>{$component_info->title} ver. {$component_info->version}</h1>
<form action="./" method="post" id="fo_component" onSubmit="procFilter(this, insert_poll); return false;" class="x_form-horizontal">
<input type="hidden" name="component" value="{$component_info->component_name}" />
<input type="hidden" name="method" value="insertPoll" />
<input type="hidden" name="poll_srl" value="" />
<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*30)}" />
<input type="date" class="inputDate" value="{date('Y-m-d',time()+60*60*24*30)}" />
<script>
(function($){
$(function(){
var option = {
changeMonth:true,
changeYear:true,
gotoCurrent: false
,yearRange:'-100:+10'
, onSelect:function(){
$(this).prev('input[type="hidden"]').val(this.value.replace(/-/g,""));
}
};
$.extend(option,$.datepicker.regional['{$lang_type}']);
$(".inputDate").datepicker(option);
});
$(function(){
var option = {
changeMonth:true
,changeYear:true
,gotoCurrent: false
,yearRange:'-100:+10'
, onSelect:function(){
$(this).prev('input[type="hidden"]').val(this.value.replace(/-/g,""));
}
,minDate: new Date("{date('Y-m-d',time()+60*60*24*30)}")
};
$.extend(option,$.datepicker.regional['{$lang_type}']);
$(".inputDate").datepicker(option);
});
})(jQuery);
</script>
</td>
</tr>
<tr>
<th scope="row">{$lang->skin}</th>
<td>
<select name="skin">
<!--@foreach($skin_list as $skin=>$skin_info)-->
<option value="{$skin}">{$skin_info->title} (skin by {$skin_info->maker->name})</option>
<!--@end-->
</select>
</td>
</tr>
</table>
<div id="poll_source" style="display:none">
<div class="table">
<table width="100%" border="1" cellspacing="0">
<col width="100" />
<col />
<tr>
<th scope="row"><div><label>{$lang->poll_chk_count}</label></div></th>
<td><input type="text" name="checkcount_tidx" value="1" size="1" /></td>
</tr>
<tr>
<th scope="row"><div>{$lang->poll_title}</div></th>
<td><input type="text" name="title_tidx" /></td>
</tr>
<tr>
<th scope="row"><div>{$lang->poll_item} 1</div></th>
<td><input type="text" name="item_tidx_1" /></td>
</tr>
<tr>
<th scope="row"><div>{$lang->poll_item} 2</div></th>
<td><input type="text" name="item_tidx_2" /></td>
</tr>
</table>
</div>
<button type="button" class="_add_item">{$lang->cmd_add_item}</button>
<button type="button" class="_del_item">{$lang->cmd_del_item}</button>
<button type="button" class="_del_poll">{$lang->cmd_del_poll}</button>
</div>
</div>
<div class="btnArea">
<span class="btn"><input type="submit" value="{$lang->cmd_submit}" /></span>
<span class="btn"><button type="button" id="add_poll">{$lang->cmd_add_poll}</button></span>
<span class="btn"><a href="./?module=editor&amp;act=dispEditorComponentInfo&amp;component_name={$component_info->component_name}" target="_blank">{$lang->about_component}</a></span>
</div>
</form>
</div>
<div class="x_control-group">
<label for="" class="x_control-label">{$lang->skin}</label>
<div class="x_controls">
<select name="skin">
<!--@foreach($skin_list as $skin=>$skin_info)-->
<option value="{$skin}">{$skin_info->title} (skin by {$skin_info->maker->name})</option>
<!--@end-->
</select>
</div>
</div>
<div id="poll_source" style="display:none">
<div class="table">
<table class="x_table x_table-striped x_table-hover">
<thead>
<col width="100" />
<col />
</thead>
<tbody>
<tr>
<th scope="row"><div>{$lang->poll_chk_count}</div></th>
<td><input type="text" name="checkcount_tidx" value="1" size="1" /></td>
</tr>
<tr>
<th scope="row"><div>{$lang->poll_title}</div></th>
<td><input type="text" name="title_tidx" /></td>
</tr>
<tr>
<th scope="row"><div>{$lang->poll_item} 1</div></th>
<td><input type="text" name="item_tidx_1" /></td>
</tr>
<tr>
<th scope="row"><div>{$lang->poll_item} 2</div></th>
<td><input type="text" name="item_tidx_2" /></td>
</tr>
</tbody>
</table>
</div>
<button type="button" class="_add_item x_btn">{$lang->cmd_add_item}</button>
<button type="button" class="_del_item x_btn">{$lang->cmd_del_item}</button>
<button type="button" class="_del_poll x_btn">{$lang->cmd_del_poll}</button>
</div>
<div class="x_clearfix btnArea">
<div class="x_pull-right">
<button type="submit" class="x_btn x_btn-primary" />{$lang->cmd_submit}</button>
<button type="button" id="add_poll" class="x_btn">{$lang->cmd_add_poll}</button>
<a class="x_btn" href="{getUrl('','module','editor','act','dispEditorComponentInfo','component_name',$component_info->component_name)}" target="_blank" onclick="window.open(this.href,'ComponentInfo','width=10,height=10');return false;">{$lang->about_component}</a>
</div>
</div>
</form>
</section>