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

@ -1,104 +1,115 @@
<?php
/**
* @class emoticon
* @author NHN (developers@xpressengine.com)
* @brief Emoticons image connected components
**/
/**
* @class emoticon
* @author NHN (developers@xpressengine.com)
* @brief Emoticons image connected components
*/
class emoticon extends EditorHandler
{
// editor_sequence from the editor must attend mandatory wearing ....
var $editor_sequence = 0;
var $component_path = '';
var $emoticon_path = '';
class emoticon extends EditorHandler {
// editor_sequence from the editor must attend mandatory wearing ....
var $editor_sequence = 0;
var $component_path = '';
var $emoticon_path = '';
/**
* @brief editor_sequence and components out of the path
*/
function emoticon($editor_sequence, $component_path)
{
$this->editor_sequence = $editor_sequence;
$this->component_path = $component_path;
$this->emoticon_path = sprintf('%s%s/images',preg_replace('/^\.\//i','',$this->component_path),'tpl','images');
}
/**
* @brief editor_sequence and components out of the path
**/
function emoticon($editor_sequence, $component_path) {
$this->editor_sequence = $editor_sequence;
$this->component_path = $component_path;
$this->emoticon_path = sprintf('%s%s/images',preg_replace('/^\.\//i','',$this->component_path),'tpl','images');
}
/**
* @brief Returns a list of emoticons file
*/
function getEmoticonList()
{
$emoticon = Context::get('emoticon');
if(!$emoticon || !preg_match("/^([a-z0-9\_]+)$/i",$emoticon)) return new Object(-1,'msg_invalid_request');
/**
* @brief Returns a list of emoticons file
**/
function getEmoticonList() {
$emoticon = Context::get('emoticon');
if(!$emoticon || !preg_match("/^([a-z0-9\_]+)$/i",$emoticon)) return new Object(-1,'msg_invalid_request');
$list = $this->getEmoticons($emoticon);
$list = $this->getEmoticons($emoticon);
$this->add('emoticons', implode("\n",$list));
}
$this->add('emoticons', implode("\n",$list));
}
/**
* @brief Likely to be recursively emoticons will search all the files to a subdirectory. 8000 gaekkajineun ran tests whether the stack and raise beef pro-overs and Unsure. (06/09/2007, Benny)
*/
function getEmoticons($path)
{
$emoticon_path = sprintf("%s/%s", $this->emoticon_path, $path);
$output = array();
/**
* @brief Likely to be recursively emoticons will search all the files to a subdirectory. 8000 gaekkajineun ran tests whether the stack and raise beef pro-overs and Unsure. (06/09/2007, Benny)
**/
function getEmoticons($path) {
$emoticon_path = sprintf("%s/%s", $this->emoticon_path, $path);
$output = array();
$oDir = dir($emoticon_path);
while($file = $oDir->read())
{
if(substr($file,0,1)=='.') continue;
if(preg_match('/\.(jpg|jpeg|gif|png)$/i',$file)) $output[] = sprintf("%s/%s", $path, str_replace($this->emoticon_path,'',$file));
}
$oDir->close();
if(count($output)) asort($output);
return $output;
}
$oDir = dir($emoticon_path);
while($file = $oDir->read()) {
if(substr($file,0,1)=='.') continue;
if(preg_match('/\.(jpg|jpeg|gif|png)$/i',$file)) $output[] = sprintf("%s/%s", $path, str_replace($this->emoticon_path,'',$file));
}
$oDir->close();
if(count($output)) asort($output);
return $output;
}
/**
* @brief popup window to display in popup window request is to add content
*/
function getPopupContent()
{
// Bringing a list of emoticons directory
$emoticon_dirs = FileHandler::readDir($this->emoticon_path);
$emoticon_list = array();
if($emoticon_dirs)
{
foreach($emoticon_dirs as $emoticon)
{
if(preg_match("/^([a-z0-9\_]+)$/i", $emoticon)) $emoticon_list[] = $emoticon;
}
}
Context::set('emoticon_list', $emoticon_list);
// The first emoticon image files in the directory Wanted
$emoticons = $this->getEmoticons($emoticon_list[0]);
Context::set('emoticons', $emoticons);
// 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() {
// Bringing a list of emoticons directory
$emoticon_dirs = FileHandler::readDir($this->emoticon_path);
$emoticon_list = array();
if($emoticon_dirs) {
foreach($emoticon_dirs as $emoticon) {
if(preg_match("/^([a-z0-9\_]+)$/i", $emoticon)) $emoticon_list[] = $emoticon;
}
}
Context::set('emoticon_list', $emoticon_list);
// The first emoticon image files in the directory Wanted
$emoticons = $this->getEmoticons($emoticon_list[0]);
Context::set('emoticons', $emoticons);
// 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 Emoticon of the path were added to solve the problem. (06/09/2007 Benny)
*/
function transHTML($xml_obj)
{
$src = $xml_obj->attrs->src;
$alt = $xml_obj->attrs->alt;
/**
* @brief Emoticon of the path were added to solve the problem. (06/09/2007 Benny)
**/
function transHTML($xml_obj) {
$src = $xml_obj->attrs->src;
$alt = $xml_obj->attrs->alt;
if(!$alt)
{
$tmp_arr = explode('/',$src);
$alt = array_pop($tmp_arr);
}
if(!$alt) {
$tmp_arr = explode('/',$src);
$alt = array_pop($tmp_arr);
}
$src = str_replace(array('&','"'), array('&amp;','&qout;'), $src);
if(!$alt) $alt = $src;
$src = str_replace(array('&','"'), array('&amp;','&qout;'), $src);
if(!$alt) $alt = $src;
$attr_output = array();
$attr_output = array("src=\"".$src."\"");
$attr_output = array();
$attr_output = array("src=\"".$src."\"");
if($alt)
{
$attr_output[] = "alt=\"".$alt."\"";
}
if(preg_match("/\.png$/i",$src)) $attr_output[] = "class=\"iePngFix\"";
if($alt) {
$attr_output[] = "alt=\"".$alt."\"";
}
if(preg_match("/\.png$/i",$src)) $attr_output[] = "class=\"iePngFix\"";
$code = sprintf("<img %s style=\"border:0px\" />", implode(" ",$attr_output));
$code = sprintf("<img %s style=\"border:0px\" />", implode(" ",$attr_output));
return $code;
}
}
?>
return $code;
}
}
/* End of file emoticon.class.php */
/* Location: ./modules/editor/components/emoticon/emoticon.class.php */

View file

@ -1,6 +1,5 @@
@charset "utf-8";
@import url(../../../../../modules/admin/tpl/css/admin.css);
img.emoticon { margin:10px 10px 0 0; cursor:pointer; }
.emoticonList { position:absolute; right:40px; top:4px;}
@import url(../../../../../common/css/bootstrap.min.css);
img.emoticon{ margin:10px 10px 0 0; cursor:pointer}
#emoticons{padding:0 10px 20px 10px}

View file

@ -1,11 +1,15 @@
<!--%import("popup.js")-->
<!--%import("popup.css")-->
<h1 class="h1">{$component_info->title} ver. {$component_info->version}</h1>
<div class="emoticonList">
<select name="list" id="selectEmoticonList">
<!--@foreach($emoticon_list as $key => $val)-->
<option <!--@if($val=='msn')-->selected="select"<!--@end--> value="{$val}">{$val}</option>
<!--@end-->
</select>
</div>
<div id="emoticons"></div>
<load target="popup.js" />
<load target="popup.css" />
<section class="section">
<h1>{$component_info->title} ver. {$component_info->version}</h1>
<div class="x_clearfix">
<div class="x_pull-right">
<select name="list" id="selectEmoticonList">
<!--@foreach($emoticon_list as $key => $val)-->
<option <!--@if($val=='msn')-->selected="select"<!--@end--> value="{$val}">{$val}</option>
<!--@end-->
</select>
</div>
</div>
<div id="emoticons" style="height:1px"></div>
</section>

View file

@ -1,78 +1,84 @@
<?php
/**
* @class image_gallery
* @author NHN (developers@xpressengine.com)
* @brief Making images uploaded to the image gallery
**/
/**
* @class image_gallery
* @author NHN (developers@xpressengine.com)
* @brief Making images uploaded to the image gallery
*/
class image_gallery extends EditorHandler
{
// editor_sequence from the editor must attend mandatory wearing ....
var $editor_sequence = 0;
var $component_path = '';
class image_gallery 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 image_gallery($editor_sequence, $component_path)
{
$this->editor_sequence = $editor_sequence;
$this->component_path = $component_path;
}
/**
* @brief editor_sequence and components out of the path
**/
function image_gallery($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()
{
// 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() {
// Pre-compiled source code to compile template return to
$tpl_path = $this->component_path.'tpl';
$tpl_file = 'popup.html';
Context::set("tpl_path", $tpl_path);
Context::set("tpl_path", $tpl_path);
$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)
{
$gallery_info->srl = rand(111111,999999);
$gallery_info->border_thickness = $xml_obj->attrs->border_thickness;
$gallery_info->gallery_style = $xml_obj->attrs->gallery_style;
$color_preg = "/^([a-fA-F0-9]{6})/";
$gallery_info->border_color = preg_replace($color_preg,"#$1",$xml_obj->attrs->border_color);
$gallery_info->bg_color = preg_replace($color_preg,"#$1",$xml_obj->attrs->bg_color);
$gallery_info->gallery_align = $xml_obj->attrs->gallery_align;
/**
* @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) {
$gallery_info->srl = rand(111111,999999);
$gallery_info->border_thickness = $xml_obj->attrs->border_thickness;
$gallery_info->gallery_style = $xml_obj->attrs->gallery_style;
$gallery_info->border_color = $xml_obj->attrs->border_color;
$gallery_info->bg_color = $xml_obj->attrs->bg_color;
$gallery_info->gallery_align = $xml_obj->attrs->gallery_align;
$images_list = $xml_obj->attrs->images_list;
$images_list = preg_replace('/\.(gif|jpg|jpeg|png) /i',".\\1\n",$images_list);
$gallery_info->images_list = explode("\n",trim($images_list));
// If you set the output to output the XML code generated a list of the image
if(Context::getResponseMethod() == 'XMLRPC')
{
$output = '';
for($i=0;$i<count($gallery_info->images_list);$i++)
{
$output .= sprintf('<img src="%s" alt="" /><br />', $gallery_info->images_list[$i]);
}
return $output;
}
// HTML gallery output, the output settings via the template for the conversion to generate the html code should
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$xml_obj->attrs->style,$matches);
$gallery_info->width = trim($matches[3][0]);
if(!$gallery_info->width) $gallery_info->width = 400;
$images_list = $xml_obj->attrs->images_list;
$images_list = preg_replace('/\.(gif|jpg|jpeg|png) /i',".\\1\n",$images_list);
$gallery_info->images_list = explode("\n",trim($images_list));
// If you set the output to output the XML code generated a list of the image
if(Context::getResponseMethod() == 'XMLRPC') {
$output = '';
for($i=0;$i<count($gallery_info->images_list);$i++) {
$output .= sprintf('<img src="%s" alt="" /><br />', $gallery_info->images_list[$i]);
}
return $output;
}
// HTML gallery output, the output settings via the template for the conversion to generate the html code should
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$xml_obj->attrs->style,$matches);
$gallery_info->width = trim($matches[3][0]);
if(!$gallery_info->width) $gallery_info->width = 400;
Context::set('gallery_info', $gallery_info);
Context::set('gallery_info', $gallery_info);
$tpl_path = $this->component_path.'tpl';
Context::set("tpl_path", $tpl_path);
$tpl_path = $this->component_path.'tpl';
Context::set("tpl_path", $tpl_path);
if($gallery_info->gallery_style == "list") $tpl_file = 'list_gallery.html';
else $tpl_file = 'slide_gallery.html';
if($gallery_info->gallery_style == "list") $tpl_file = 'list_gallery.html';
else $tpl_file = 'slide_gallery.html';
$oTemplate = &TemplateHandler::getInstance();
return $oTemplate->compile($tpl_path, $tpl_file);
}
}
?>
$oTemplate = &TemplateHandler::getInstance();
return $oTemplate->compile($tpl_path, $tpl_file);
}
}
/* End of file image_gallery.class.php */
/* Location: ./modules/editor/components/image_gallery/image_gallery.class.php */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 B

View file

@ -5,7 +5,7 @@
<load target="gallery.min.js" />
<load target="list_gallery.min.js" />
<!--@end-->
<script type="text/javascript">
<script>
(function(){
var gallery = xe.getApp('gallery')[0];

View file

@ -3,5 +3,5 @@
* @brief List-type image gallery
* @author NHN (developers@xpressengine.com)
**/
(function(k){var h=xe.createPlugin("list",{API_SHOW_LIST:function(i,h){var d=h[0],e,f,j,b,a,g,c;e=this.cast("GET_IMAGES",[d]);if(e.length){d=k("#zone_list_gallery_"+d).empty();width=d.innerWidth();f=0;for(j=e.length;f<j;f++)b=e[f],a=b.$obj.prop("width"),c=b.$obj.prop("height"),0==a&&(a=b.$obj.attr("width")),0==c&&(c=b.$obj.attr("height")),a>width-25&&(g=width-25,a=g/a,c=Math.floor(c*a),a=g,b.$obj.attr("rel","xe_gallery")),d.append(b.$obj),b.$obj.css({width:a+"px",height:c,margin:"0 10px",display:"block"})}}}),
i=xe.getApp("Gallery")[0];i&&i.registerPlugin(new h)})(jQuery);
(function(l){var h=xe.createPlugin("list",{API_SHOW_LIST:function(j,h){var d=h[0],e,f,k,b,a,g,c;e=this.cast("GET_IMAGES",[d]);if(e.length){d=l("#zone_list_gallery_"+d).empty();width=d.innerWidth();f=0;for(k=e.length;f<k;f++)b=e[f],a=b.$obj.prop("width"),c=b.$obj.prop("height"),0==a&&(a=b.$obj.attr("width")),0==c&&(c=b.$obj.attr("height")),a>width-25&&(g=width-25,a=g/a,c=Math.floor(c*a),a=g,b.$obj.attr("rel","xe_gallery")),d.append(b.$obj),b.$obj.css({width:a+"px",height:c,margin:"0 10px",display:"block"})}}}),
j=xe.getApp("Gallery")[0];j&&j.registerPlugin(new h)})(jQuery);

View file

@ -1,35 +1,3 @@
@charset "utf-8";
@import url(../../../../../modules/admin/tpl/css/admin.css);
li { float:left; list-style:none; margin-right:5px; }
img.bg_preview_color {
width:30px;
height:16px;
border:1px solid #000000;
background-color:#FFFFFF;
}
img.border_preview_color {
width:30px;
height:16px;
border:1px solid #EEEEEE;
background-color:#000000;
}
img.color_icon {
width:14px;
height:14px;
border:1px solid #FFFFFF;
}
img.color_icon_over {
width:14px;
height:14px;
border:1px solid #000000;
cursor:pointer;
}
.editor_color_box { clear:both; height:65px; width:400px; border:1px solid #DDDDDD; padding:2px; }
.image_list { width:100%; border:1px solid #EEEEEE; height:200px !important; }
@import url(../../../../../common/css/bootstrap.min.css);

View file

@ -1,80 +1,68 @@
<!--%import("popup.js")-->
<!--%import("popup.css")-->
<!--%import("../lang")-->
<h1 class="h1">{$component_info->title} ver. {$component_info->version}</h1>
<form action="./" method="get" onSubmit="return false" id="fo">
<section class="section">
<h1>{$component_info->title} ver. {$component_info->version}</h1>
<form action="./" method="get" onSubmit="return false" id="fo" class="x_form-horizontal">
<input type="hidden" name="editor_sequence" value="{$editor_sequence}" />
<div class="table">
<table width="100%" border="1" cellspacing="0">
<col width="120" />
<col />
<tr>
<th scope="row">{$lang->width}</th>
<td><input type="text" size="3" id="width" value="400" />px</td>
</tr>
<tr>
<th scope="row">{$lang->gallery_style}</th>
<td>
<select id="gallery_style">
<option value="slide">{$lang->gallery_slide_style}</option>
<option value="list">{$lang->gallery_list_style}</option>
</select>
</td>
</tr>
<tr>
<th scope="row">{$lang->gallery_slide_align}</th>
<td>
<select id="gallery_align">
<option value="center">{$lang->gallery_slide_center}</option>
<option value="left">{$lang->gallery_slide_left}</option>
<option value="right">{$lang->gallery_slide_right}</option>
</select>
</td>
</tr>
<tr>
<th scope="row">{$lang->gallery_border_thickness}</th>
<td><input type="text" size="1" id="border_thickness" value="0" />px</td>
</tr>
<tr>
<th scope="row">{$lang->gallery_border_color}</th>
<td>
<div class="editor_color_box">
<script type="text/javascript">
printColor("border", "{$tpl_path}/images/blank.gif");
</script>
</div>
<ul class="buttonLeft">
<li><img src="./images/border_solid.gif" alt="blank" class="border_preview_color" id="border_preview_color" /></li>
<li>#<input type="text" id="border_color_input" size="7" maxlength="6" value="000000" onkeyup="manual_select_color('border',this)"/></li>
</ul>
</td>
</tr>
<tr>
<th scope="row">{$lang->gallery_bg_color}</th>
<td>
<div class="editor_color_box">
<script type="text/javascript">
printColor("bg", "{$tpl_path}/images/blank.gif");
</script>
</div>
<ul class="buttonLeft">
<li><img src="./images/blank.gif" alt="blank" class="bg_preview_color" id="bg_preview_color" /></li>
<li>#<input type="text" id="bg_color_input" size="7" maxlength="6" value="FFFFFF" onkeyup="manual_select_color('bg',this)"/></li>
</ul>
</td>
</tr>
<tr>
<th scope="row">{$lang->image_list}</th>
<td>
<select id="image_list" size="6" multiple="true" class="image_list">
</select>
<p>{$lang->about_image_list}</p>
</td>
</tr>
</table>
</div>
<div class="btnArea">
<span class="btn"><button type="button" onclick="insertSlideShow()">{$lang->cmd_insert}</button></span>
<span class="btn"><a href="./?module=editor&amp;act=dispEditorComponentInfo&amp;component_name={$component_info->component_name}" target="_blank" onclick="window.open('this.href','ComponentInfo','width=10,height=10');return false;">{$lang->about_component}</a></span>
</div>
</form>
<div class="x_control-group">
<label for="" class="x_control-label">{$lang->width}</label>
<div class="x_controls">
<input type="text" size="3" id="width" value="400" />px
</div>
</div>
<div class="x_control-group">
<label for="" class="x_control-label">{$lang->gallery_style}</label>
<div class="x_controls">
<select id="gallery_style">
<option value="slide">{$lang->gallery_slide_style}</option>
<option value="list">{$lang->gallery_list_style}</option>
</select>
</div>
</div>
<div class="x_control-group">
<label for="" class="x_control-label">{$lang->gallery_slide_align}</label>
<div class="x_controls">
<select id="gallery_align">
<option value="center">{$lang->gallery_slide_center}</option>
<option value="left">{$lang->gallery_slide_left}</option>
<option value="right">{$lang->gallery_slide_right}</option>
</select>
</div>
</div>
<div class="x_control-group">
<label for="" class="x_control-label">{$lang->gallery_border_thickness}</label>
<div class="x_controls">
<input type="text" size="1" id="border_thickness" value="0" />px
</div>
</div>
<div class="x_control-group">
<label for="" class="x_control-label">{$lang->gallery_border_color}</label>
<div class="x_controls">
<input type="text" id="border_color_input" class="color-indicator" size="7" maxlength="6" value="#000000" />
</div>
</div>
<div class="x_control-group">
<label for="" class="x_control-label">{$lang->gallery_bg_color}</label>
<div class="x_controls">
<input type="text" id="bg_color_input" class="color-indicator" size="7" maxlength="6" value="#FFFFFF" />
</div>
</div>
<div class="x_control-group">
<label for="" class="x_control-label">{$lang->image_list}</label>
<div class="x_controls">
<select id="image_list" size="6" multiple="true" class="image_list">
</select>
<p>{$lang->about_image_list}</p>
</div>
</div>
<div class="x_clearfix btnArea">
<div class="x_pull-right">
<button type="button" class="x_btn x_btn-primary" onclick="insertSlideShow()">{$lang->cmd_insert}</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>
<!--%load_js_plugin("ui.colorpicker")-->

View file

@ -11,7 +11,7 @@ function getSlideShow() {
if($node.is('img')) {
selected_node = node;
width = $(node).width() - 4;
width = $node.width();
style = $node.attr('gallery_style');
align = $node.attr('gallery_align') || 'center';
border_color = $node.attr('border_color');
@ -24,10 +24,8 @@ function getSlideShow() {
get_by_id('border_thickness').value = thickness;
get_by_id('border_color_input').value = border_color;
manual_select_color('border', get_by_id('border_color_input'));
get_by_id('bg_color_input').value = bg_color;
manual_select_color("bg", get_by_id('bg_color_input'));
selected_images = $node.attr('images_list');
}
@ -118,43 +116,6 @@ function select_color(type, code) {
get_by_id(type+"_color_input").value = code;
}
/* 수동 색상 변경시 */
function manual_select_color(type, obj) {
if(obj.value.length!=6) return;
code = obj.value;
get_by_id(type+"_preview_color").style.backgroundColor = "#"+code;
}
/* 색상표를 출력 */
function printColor(type, blank_img_src) {
var colorTable = new Array('22','44','66','88','AA','CC','EE');
var html = "";
for(var i=0;i<8;i+=1) html += printColorBlock(type, i.toString(16)+i.toString(16)+i.toString(16)+i.toString(16)+i.toString(16)+i.toString(16), blank_img_src);
for(var i=0; i<colorTable.length; i+=3) {
for(var j=0; j<colorTable.length; j+=2) {
for(var k=0; k<colorTable.length; k++) {
var code = colorTable[i] + colorTable[j] + colorTable[k];
html += printColorBlock(type, code, blank_img_src);
}
}
}
for(var i=8;i<16;i+=1) html += printColorBlock(type, i.toString(16)+i.toString(16)+i.toString(16)+i.toString(16)+i.toString(16)+i.toString(16), blank_img_src);
document.write(html);
}
/* 개별 색상 block 출력 함수 */
function printColorBlock(type, code, blank_img_src) {
if(type=="bg") {
return "<div style=\"float:left;background-color:#"+code+"\"><img src=\""+blank_img_src+"\" class=\"color_icon\" onmouseover=\"this.className='color_icon_over'\" onmouseout=\"this.className='color_icon'\" onclick=\"select_color('"+type+"','"+code+"')\" alt=\"color\" \/><\/div>";
} else {
return "<div style=\"float:left;background-color:#"+code+"\"><img src=\""+blank_img_src+"\" class=\"color_icon\" onmouseover=\"this.className='color_icon_over'\" onmouseout=\"this.className='color_icon'\" onclick=\"select_color('"+type+"','"+code+"')\" alt=\"color\" \/><\/div>";
}
}
jQuery(function($){
getSlideShow();
});

View file

@ -3,4 +3,4 @@
* @brief Slideshow type image gallery plugin
* @author NHN (developers@xpressengine.com)
**/
@charset "utf-8";@import "../../../../../modules/admin/tpl/css/admin.css";li{float:left;list-style:none;margin-right:5px}img.bg_preview_color{width:30px;height:16px;border:1px solid #000000;background-color:#FFFFFF}img.border_preview_color{width:30px;height:16px;border:1px solid #EEEEEE;background-color:#000000}img.color_icon{width:14px;height:14px;border:1px solid #FFFFFF}img.color_icon_over{width:14px;height:14px;border:1px solid #000000;cursor:pointer}.editor_color_box{clear:both;height:65px;width:400px;border:1px solid #DDDDDD;padding:2px}.image_list{width:100%;border:1px solid #EEEEEE;height:200px !important}
@charset "utf-8";@import "../../../../../modules/admin/tpl/css/admin.css";@import "../../../../../common/css/bootstrap.min.css";

View file

@ -1,10 +1,7 @@
var selected_node=null;
function getSlideShow(){var c,b,d="",e,a,f,g;if("undefined"!=typeof opener&&(c=opener.editorPrevNode,b=jQuery(c),b.is("img")&&(selected_node=c,d=$(c).width()-4,c=b.attr("gallery_style"),e=b.attr("gallery_align")||"center",a=b.attr("border_color"),f=b.attr("bg_color"),g=b.attr("border_thickness")||1,get_by_id("width").value=d,get_by_id("gallery_style").selectedIndex="list"==c?1:0,get_by_id("gallery_align").selectedIndex="left"==e?1:"right"==e?2:0,get_by_id("border_thickness").value=g,get_by_id("border_color_input").value=
a,manual_select_color("border",get_by_id("border_color_input")),get_by_id("bg_color_input").value=f,manual_select_color("bg",get_by_id("bg_color_input")),d=b.attr("images_list")),b=get_by_id("fo").editor_sequence.value,b=opener.get_by_id("uploaded_file_list_"+b))){c=get_by_id("image_list");for(e=0;e<b.length;e++){a=b.options[e];f=a.value;if(!f)break;f=opener.uploadedFiles[f].download_url.replace(request_uri,"");/(jpg|jpeg|gif|png)$/i.test(f)&&(g=!1,-1!=d.indexOf(f)&&(g=!0),a=new Option(a.text,a.value,
!1,g),c.options.add(a))}}}
function insertSlideShow(){if("undefined"!=typeof opener){for(var c=[],b=get_by_id("image_list"),d=0;d<b.length;d++){var e=b.options[d];e.selected&&(e=opener.uploadedFiles[e.value].download_url.replace(request_uri,""),c[c.length]=e)}if(c.length){for(var b=get_by_id("width").value,e=get_by_id("gallery_style").options[get_by_id("gallery_style").selectedIndex].value,a=get_by_id("gallery_align").options[get_by_id("gallery_align").selectedIndex].value,f=get_by_id("border_thickness").value,g=get_by_id("border_color_input").value,
i=get_by_id("bg_color_input").value,h="",d=0;d<c.length;d++)h+=c[d].trim()+" ";selected_node?(selected_node.setAttribute("width",b),selected_node.setAttribute("gallery_style",e),selected_node.setAttribute("align",a),selected_node.setAttribute("gallery_align",a),selected_node.setAttribute("border_thickness",f),selected_node.setAttribute("border_color",g),selected_node.setAttribute("bg_color",i),selected_node.setAttribute("images_list",h),selected_node.style.width=b+"px"):(c='<img src="../../../../common/img/blank.gif" editor_component="image_gallery" width="'+
b+'" gallery_style="'+e+'" align="'+a+'" gallery_align="'+a+'" border_thickness="'+f+'" border_color="'+g+'" bg_color="'+i+'" style="width:'+b+'px;border:2px dotted #4371B9;background:url(./modules/editor/components/image_gallery/tpl/image_gallery_component.gif) no-repeat center;" images_list="'+h+'" />',opener.editorFocus(opener.editorPrevSrl),d=opener.editorGetIFrame(opener.editorPrevSrl),opener.editorReplaceHTML(d,c));opener.editorFocus(opener.editorPrevSrl)}window.close()}}
function select_color(c,b){get_by_id(c+"_preview_color").style.backgroundColor="#"+b;get_by_id(c+"_color_input").value=b}function manual_select_color(c,b){6==b.value.length&&(code=b.value,get_by_id(c+"_preview_color").style.backgroundColor="#"+code)}
function printColor(c,b){for(var d="22 44 66 88 AA CC EE".split(" "),e="",a=0;8>a;a+=1)e+=printColorBlock(c,a.toString(16)+a.toString(16)+a.toString(16)+a.toString(16)+a.toString(16)+a.toString(16),b);for(a=0;a<d.length;a+=3)for(var f=0;f<d.length;f+=2)for(var g=0;g<d.length;g++)e+=printColorBlock(c,d[a]+d[f]+d[g],b);for(a=8;16>a;a+=1)e+=printColorBlock(c,a.toString(16)+a.toString(16)+a.toString(16)+a.toString(16)+a.toString(16)+a.toString(16),b);document.write(e)}
function printColorBlock(c,b,d){return'<div style="float:left;background-color:#'+b+'"><img src="'+d+'" class="color_icon" onmouseover="this.className=\'color_icon_over\'" onmouseout="this.className=\'color_icon\'" onclick="select_color(\''+c+"','"+b+'\')" alt="color" /></div>'}jQuery(function(){getSlideShow()});
function getSlideShow(){var b,a,d="",c,e,f,g;if("undefined"!=typeof opener&&(b=opener.editorPrevNode,a=jQuery(b),a.is("img")&&(selected_node=b,d=a.width(),b=a.attr("gallery_style"),c=a.attr("gallery_align")||"center",e=a.attr("border_color"),f=a.attr("bg_color"),g=a.attr("border_thickness")||1,get_by_id("width").value=d,get_by_id("gallery_style").selectedIndex="list"==b?1:0,get_by_id("gallery_align").selectedIndex="left"==c?1:"right"==c?2:0,get_by_id("border_thickness").value=g,get_by_id("border_color_input").value=
e,get_by_id("bg_color_input").value=f,d=a.attr("images_list")),a=get_by_id("fo").editor_sequence.value,a=opener.get_by_id("uploaded_file_list_"+a))){b=get_by_id("image_list");for(c=0;c<a.length;c++){e=a.options[c];f=e.value;if(!f)break;f=opener.uploadedFiles[f].download_url.replace(request_uri,"");/(jpg|jpeg|gif|png)$/i.test(f)&&(g=!1,-1!=d.indexOf(f)&&(g=!0),e=new Option(e.text,e.value,!1,g),b.options.add(e))}}}
function insertSlideShow(){if("undefined"!=typeof opener){for(var b=[],a=get_by_id("image_list"),d=0;d<a.length;d++){var c=a.options[d];c.selected&&(c=opener.uploadedFiles[c.value].download_url.replace(request_uri,""),b[b.length]=c)}if(b.length){for(var a=get_by_id("width").value,c=get_by_id("gallery_style").options[get_by_id("gallery_style").selectedIndex].value,e=get_by_id("gallery_align").options[get_by_id("gallery_align").selectedIndex].value,f=get_by_id("border_thickness").value,g=get_by_id("border_color_input").value,
j=get_by_id("bg_color_input").value,h="",d=0;d<b.length;d++)h+=b[d].trim()+" ";selected_node?(selected_node.setAttribute("width",a),selected_node.setAttribute("gallery_style",c),selected_node.setAttribute("align",e),selected_node.setAttribute("gallery_align",e),selected_node.setAttribute("border_thickness",f),selected_node.setAttribute("border_color",g),selected_node.setAttribute("bg_color",j),selected_node.setAttribute("images_list",h),selected_node.style.width=a+"px"):(b='<img src="../../../../common/img/blank.gif" editor_component="image_gallery" width="'+
a+'" gallery_style="'+c+'" align="'+e+'" gallery_align="'+e+'" border_thickness="'+f+'" border_color="'+g+'" bg_color="'+j+'" style="width:'+a+'px;border:2px dotted #4371B9;background:url(./modules/editor/components/image_gallery/tpl/image_gallery_component.gif) no-repeat center;" images_list="'+h+'" />',opener.editorFocus(opener.editorPrevSrl),d=opener.editorGetIFrame(opener.editorPrevSrl),opener.editorReplaceHTML(d,b));opener.editorFocus(opener.editorPrevSrl)}window.close()}}
function select_color(b,a){get_by_id(b+"_preview_color").style.backgroundColor="#"+a;get_by_id(b+"_color_input").value=a}jQuery(function(){getSlideShow()});

View file

@ -8,7 +8,7 @@
<load target="slide_gallery.min.js" />
<load target="slide_gallery.min.css" />
<!--@end-->
<script type="text/javascript">
<script>
(function(){
var gallery = xe.getApp('gallery')[0];
@ -29,7 +29,7 @@ gallery.cast('SET_STYLE', [{$gallery_info->srl}, 'slide']);
<span class="zone_gallery_navigator_status" title="{$lang->cmd_gallery_thumbnail}" id="zone_gallery_navigator_status_{$gallery_info->srl}">1/1</span>
<a href="#" class="__next"><img src="./images/next.gif" alt="{$lang->cmd_gallery_next}" title="{$lang->cmd_gallery_next}" border="0" /></a>
</div>
<div style="width:{$gallery_info->width}px;background-color:#{$gallery_info->bg_color};border:{$gallery_info->border_thickness}px solid #{$gallery_info->border_color};text-align:left;">
<div style="width:{$gallery_info->width}px;background-color:{$gallery_info->bg_color};border:{$gallery_info->border_thickness}px solid {$gallery_info->border_color};text-align:left;">
<div class="slide_gallery_thumbnail_image_box" style="display:none"></div>
<div class="slide_gallery_loading_text">Loading images...</div>
<div class="slide_gallery_placeholder"></div>

View file

@ -3,7 +3,7 @@
* @brief Slideshow type image gallery plugin
* @author NHN (developers@xpressengine.com)
**/
(function(k){var m=xe.createPlugin("slideShow",{_holders:{},_thumbs:{},_current:{},init:function(){this._holders={};this._thumbs={};this._current={}},API_SHOW_SLIDE:function(h,f){var b=this,a=f[0],d="@"+a,c,e,j,i,g,l;c=this.cast("GET_IMAGES",[a]);if(c.length){g=0;for(e=c.length;g<e;g++)if(!c[g].loaded){setTimeout(function(){b.cast("SHOW_SLIDE",f)},200);return}e=k("#zone_slide_gallery_"+a);i=e.find(".slide_gallery_placeholder").css("overflow","hidden");e.find(".slide_gallery_loading_text").remove();
j=e.find(".slide_gallery_thumbnail_image_box").show();g=0;for(l=c.length;g<l;g++)c[g].$obj.clone().css({cursor:"pointer",width:"60px",height:"60px",margin:"5px",opacity:0.5}).click({idx:g},function(c){b.cast("SET_SLIDE",[a,c.data.idx])}).appendTo(j);k("#zone_gallery_navigator_status_"+a).click(function(){j.toggle()});e.find(".__prev").click(function(){b.cast("PREV_SLIDE",[a]);return!1}).end().find(".__next").click(function(){b.cast("NEXT_SLIDE",[a]);return!1});this._holders[d]=i;this._thumbs[d]=j;
this._current[d]=0;this.cast("SET_SLIDE",[a,0])}},_showSideSlide:function(h,f){var b,a;b=this.cast("GET_IMAGES",[h]);b.length&&(a=this._current["@"+h],a+=f,0>a?a=b.length-1:a>=b.length&&(a=0),this.cast("SET_SLIDE",[h,a]))},API_NEXT_SLIDE:function(h,f){this._showSideSlide(f[0],1)},API_PREV_SLIDE:function(h,f){this._showSideSlide(f[0],-1)},API_SET_SLIDE:function(h,f){var b=f[0],a=f[1],d,c,e;d=this.cast("GET_IMAGES",[b]);if(d.length&&is_def(c=d[a]))this._current["@"+b]=a,k("#zone_gallery_navigator_status_"+
b).text(a+1+"/"+d.length),this._thumbs["@"+b].find("img").eq(a).animate({opacity:1}).end().not(":eq("+a+")").animate({opacity:0.5}),b=this._holders["@"+b],d=b.parent().innerWidth(),a=c.$obj.prop("width"),e=c.$obj.prop("height"),0==a&&(a=c.$obj.attr("width")),0==e&&(e=c.$obj.attr("height")),a>d-20&&(d-=20,e=Math.floor(e*(d/a)),a=d,c.$obj.css("cursor","pointer"),c.$obj.attr("rel","xe_gallery")),c.$obj.css({width:a,height:e,margin:"0 10px"}),b.empty().append(c.$obj)}}),i=xe.getApp("Gallery")[0];i&&i.registerPlugin(new m)})(jQuery);
(function(l){var n=xe.createPlugin("slideShow",{_holders:{},_thumbs:{},_current:{},init:function(){this._holders={};this._thumbs={};this._current={}},API_SHOW_SLIDE:function(h,f){var b=this,a=f[0],d="@"+a,c,e,k,j,g,m;c=this.cast("GET_IMAGES",[a]);if(c.length){g=0;for(e=c.length;g<e;g++)if(!c[g].loaded){setTimeout(function(){b.cast("SHOW_SLIDE",f)},200);return}e=l("#zone_slide_gallery_"+a);j=e.find(".slide_gallery_placeholder").css("overflow","hidden");e.find(".slide_gallery_loading_text").remove();
k=e.find(".slide_gallery_thumbnail_image_box").show();g=0;for(m=c.length;g<m;g++)c[g].$obj.clone().css({cursor:"pointer",width:"60px",height:"60px",margin:"5px",opacity:0.5}).click({idx:g},function(c){b.cast("SET_SLIDE",[a,c.data.idx])}).appendTo(k);l("#zone_gallery_navigator_status_"+a).click(function(){k.toggle()});e.find(".__prev").click(function(){b.cast("PREV_SLIDE",[a]);return!1}).end().find(".__next").click(function(){b.cast("NEXT_SLIDE",[a]);return!1});this._holders[d]=j;this._thumbs[d]=k;
this._current[d]=0;this.cast("SET_SLIDE",[a,0])}},_showSideSlide:function(h,f){var b,a;b=this.cast("GET_IMAGES",[h]);b.length&&(a=this._current["@"+h],a+=f,0>a?a=b.length-1:a>=b.length&&(a=0),this.cast("SET_SLIDE",[h,a]))},API_NEXT_SLIDE:function(h,f){this._showSideSlide(f[0],1)},API_PREV_SLIDE:function(h,f){this._showSideSlide(f[0],-1)},API_SET_SLIDE:function(h,f){var b=f[0],a=f[1],d,c,e;d=this.cast("GET_IMAGES",[b]);if(d.length&&is_def(c=d[a]))this._current["@"+b]=a,l("#zone_gallery_navigator_status_"+
b).text(a+1+"/"+d.length),this._thumbs["@"+b].find("img").eq(a).animate({opacity:1}).end().not(":eq("+a+")").animate({opacity:0.5}),b=this._holders["@"+b],d=b.parent().innerWidth(),a=c.$obj.prop("width"),e=c.$obj.prop("height"),0==a&&(a=c.$obj.attr("width")),0==e&&(e=c.$obj.attr("height")),a>d-20&&(d-=20,e=Math.floor(e*(d/a)),a=d,c.$obj.css("cursor","pointer"),c.$obj.attr("rel","xe_gallery")),c.$obj.css({width:a,height:e,margin:"0 10px"}),b.empty().append(c.$obj)}}),j=xe.getApp("Gallery")[0];j&&j.registerPlugin(new n)})(jQuery);

View file

@ -1,103 +1,111 @@
<?php
/**
* @class image_link
* @author NHN (developers@xpressengine.com)
* @brief Add an image, or to modify the properties of components
**/
/**
* @class image_link
* @author NHN (developers@xpressengine.com)
* @brief Add an image, or to modify the properties of components
*/
class image_link extends EditorHandler
{
// editor_sequence from the editor must attend mandatory wearing ....
var $editor_sequence = 0;
var $component_path = '';
class image_link 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 image_link($editor_sequence, $component_path)
{
$this->editor_sequence = $editor_sequence;
$this->component_path = $component_path;
}
/**
* @brief editor_sequence and components out of the path
**/
function image_link($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()
{
// 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() {
// Pre-compiled source code to compile template return to
$tpl_path = $this->component_path.'tpl';
$tpl_file = 'popup.html';
Context::set("tpl_path", $tpl_path);
Context::set("tpl_path", $tpl_path);
$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)
{
$src = $xml_obj->attrs->src;
$width = $xml_obj->attrs->width;
$height = $xml_obj->attrs->height;
$align = $xml_obj->attrs->align;
$alt = $xml_obj->attrs->alt;
$title = $xml_obj->attrs->title;
$border = (int)$xml_obj->attrs->border;
$link_url = $xml_obj->attrs->link_url;
$open_window = $xml_obj->attrs->open_window;
$style = $xml_obj->attrs->style;
$margin = (int)$xml_obj->attrs->margin;
/**
* @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) {
$src = $xml_obj->attrs->src;
$width = $xml_obj->attrs->width;
$height = $xml_obj->attrs->height;
$align = $xml_obj->attrs->align;
$alt = $xml_obj->attrs->alt;
$title = $xml_obj->attrs->title;
$border = (int)$xml_obj->attrs->border;
$link_url = $xml_obj->attrs->link_url;
$open_window = $xml_obj->attrs->open_window;
$style = $xml_obj->attrs->style;
$margin = (int)$xml_obj->attrs->margin;
$src = str_replace(array('&','"'), array('&amp;','&qout;'), $src);
$src = str_replace('&amp;amp;', '&amp;', $src);
$src = str_replace(array('&','"'), array('&amp;','&qout;'), $src);
$src = str_replace('&amp;amp;', '&amp;', $src);
// Image containing the address to the address conversion request uri (rss output, etc. purposes)
$temp_src = explode('/', $src);
if(substr($src, 0,2)=='./') $src = Context::getRequestUri().substr($src, 2);
else if(substr($src , 0, 1)=='/')
{
if($_SERVER['HTTPS']=='on') $http_src = 'https://';
else $http_src = 'http://';
$src = $http_src.$_SERVER['HTTP_HOST'].$src;
}
else if(!strpos($temp_src[0],':') && $src) $src = Context::getRequestUri().$src;
// Image containing the address to the address conversion request uri (rss output, etc. purposes)
$temp_src = explode('/', $src);
if(substr($src, 0,2)=='./') $src = Context::getRequestUri().substr($src, 2);
elseif(substr($src , 0, 1)=='/') {
if($_SERVER['HTTPS']=='on') $http_src = 'https://';
else $http_src = 'http://';
$src = $http_src.$_SERVER['HTTP_HOST'].$src;
}
elseif(!strpos($temp_src[0],':') && $src) $src = Context::getRequestUri().$src;
$attr_output = array();
$attr_output = array("src=\"".$src."\"");
$attr_output[] = "alt=\"".$alt."\"";
$attr_output = array();
$attr_output = array("src=\"".$src."\"");
$attr_output[] = "alt=\"".$alt."\"";
if($title)
{
$attr_output[] = "title=\"".$title."\"";
}
if($margin)
{
$style = trim(preg_replace('/margin[a-z\-]*[ ]*:[ ]*[0-9 a-z]+(;| )/i','', $style)).';';
$style = str_replace(';;',';',$style);
if($style == ';') $style = '';
$style .= ' margin:'.$margin.'px;';
}
if($align) $attr_output[] = "align=\"".$align."\"";
if($title) {
$attr_output[] = "title=\"".$title."\"";
}
if($margin) {
$style = trim(preg_replace('/margin[a-z\-]*[ ]*:[ ]*[0-9 a-z]+(;| )/i','', $style)).';';
$style = str_replace(';;',';',$style);
if($style == ';') $style = '';
$style .= ' margin:'.$margin.'px;';
}
if($align) $attr_output[] = "align=\"".$align."\"";
if(preg_match("/\.png$/i",$src)) $attr_output[] = "class=\"iePngFix\"";
if(preg_match("/\.png$/i",$src)) $attr_output[] = "class=\"iePngFix\"";
if($width) $attr_output[] = 'width="'.$width.'"';
if($height) $attr_output[] = 'height="'.$height.'"';
if($border)
{
$style = trim(preg_replace('/border[a-z\-]*[ ]*:[ ]*[0-9 a-z]+(;| )/i','', $style)).';';
$style = str_replace(';;',';',$style);
if($style == ';') $style = '';
$style .= ' border-style: solid; border-width:'.$border.'px;';
}
if($width) $attr_output[] = 'width="'.$width.'"';
if($height) $attr_output[] = 'height="'.$height.'"';
if($border) {
$style = trim(preg_replace('/border[a-z\-]*[ ]*:[ ]*[0-9 a-z]+(;| )/i','', $style)).';';
$style = str_replace(';;',';',$style);
if($style == ';') $style = '';
$style .= ' border-style: solid; border-width:'.$border.'px;';
}
$code = sprintf("<img %s style=\"%s\" />", implode(' ',$attr_output), $style);
$code = sprintf("<img %s style=\"%s\" />", implode(' ',$attr_output), $style);
if($link_url) {
if($open_window =='Y') $code = sprintf('<a href="%s" onclick="window.open(this.href);return false;">%s</a>', $link_url, $code);
else $code = sprintf('<a href="%s" >%s</a>', $link_url, $code);
}
return $code;
}
}
?>
if($link_url)
{
if($open_window =='Y') $code = sprintf('<a href="%s" onclick="window.open(this.href);return false;">%s</a>', $link_url, $code);
else $code = sprintf('<a href="%s" >%s</a>', $link_url, $code);
}
return $code;
}
}
/* End of file image_link.class.php */
/* Location: ./modules/editor/components/image_link/image_link.class.php */

View file

@ -115,7 +115,7 @@
<value xml:lang="zh-CN"><![CDATA[新窗口打开]]></value>
</item>
<item name="about_url_link_open_window">
<value xml:lang="ko"><![CDATA[선택하면 링크 선택 시 새 창으로 열립니다.]]></value>
<value xml:lang="ko"><![CDATA[선택하면 링크 선택 시 새 창으로 열립니다.]]></value>
<value xml:lang="en"><![CDATA[Select this to open a link in a new window.]]></value>
<value xml:lang="jp"><![CDATA[チェックを入れると、リンクをクリックする際に新しいウィンドウで開きます。]]></value>
<value xml:lang="zh-CN"><![CDATA[将在新窗口中打开链接。]]></value>

View file

@ -1,5 +1,6 @@
@charset "utf-8";
@import url(../../../../../modules/admin/tpl/css/admin.css);
@import url(../../../../../common/css/bootstrap.min.css);
.image_align {
margin:0px 0px 5px 0px;

View file

@ -1,88 +1,83 @@
<!--%import("popup.js")-->
<!--%import("popup.css")-->
<!--%import("../lang")-->
<h1 class="h1">{$component_info->title} ver. {$component_info->version}</h1>
<form action="./" method="get" onSubmit="return false" id="fo">
<div class="table">
<table width="100%" border="1" cellspacing="0">
<col width="100" />
<col />
<tr>
<th scope="row">{$lang->image_url}</th>
<td><input type="text" id="image_url" value="{url_decode($manual_url)}" /></td>
</tr>
<tr>
<th scope="row">{$lang->image_scale}</th>
<td>
<ul>
<li><input type="text" id="width" value="0" size="4" />px </li>
<li><input type="text" id="height" value="0" size="4" />px </li>
<li><button type="button" id="get_scale">{$lang->cmd_get_scale}</button></li>
</ul>
</td>
</tr>
<tr>
<th scope="row">URL</th>
<td><input type="text" id="link_url" value=""/></td>
</tr>
<tr>
<th scope="row">{$lang->urllink_open_window}</th>
<td><input type="checkbox" id="open_window" value="Y" /> {$lang->about_url_link_open_window}</td>
</tr>
<tr>
<th scope="row">{$lang->image_alt}</th>
<td><input type="text" id="image_alt" value=""/></td>
</tr>
<tr>
<th scope="row">{$lang->image_align}</th>
<td>
<div class="image_align">
<input type="radio" name="align" value="" id="align_normal" checked="checked"/>
<label for="align_normal">
<img src="./images/align_normal.gif" alt="{$lang->image_align_normal}" />
{$lang->image_align_normal}
</label>
</div>
<div class="image_align">
<input type="radio" name="align" value="left" id="align_left" />
<label for="align_left">
<img src="./images/align_left.gif" alt="{$lang->image_align_left}" />
{$lang->image_align_left}
</label>
</div>
<div class="image_align">
<input type="radio" name="align" value="middle" id="align_middle" />
<label for="align_middle">
<img src="./images/align_middle.gif" alt="{$lang->image_align_middle}" />
{$lang->image_align_middle}
</label>
</div>
<div class="image_align">
<input type="radio" name="align" value="right" id="align_right" />
<label for="align_right">
<img src="./images/align_right.gif" alt="{$lang->image_align_right}" />
{$lang->image_align_right}
</label>
</div>
</td>
</tr>
<tr>
<th scope="row">{$lang->image_border}</th>
<td><input type="text" id="image_border" value="0" size="2" />px</td>
</tr>
<tr>
<th scope="row">{$lang->image_margin}</th>
<td><input type="text" id="image_margin" value="0" size="2" />px</td>
</tr>
</table>
</div>
<div class="btnArea">
<span class="btn"><button type="button" id="btn_insert">{$lang->cmd_insert}</button></span>
<span class="btn"><a href="./?module=editor&amp;act=dispEditorComponentInfo&amp;component_name={$component_info->component_name}" target="_blank" onclick="window.open('this.href','ComponentInfo','width=10,height=10');return false;">{$lang->about_component}</a></span>
</div>
</form>
<section class="section">
<h1>{$component_info->title} ver. {$component_info->version}</h1>
<form action="./" method="get" onSubmit="return false" id="fo" class="x_form-horizontal">
<div class="x_control-group">
<label for="image_url" class="x_control-label">{$lang->image_url}</label>
<div class="x_controls">
<input type="text" id="image_url" value="{url_decode($manual_url)}" />
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->image_scale}</label>
<div class="x_controls">
<input type="text" id="width" value="0" size="4" style="width:80px" /> px
<input type="text" id="height" value="0" size="4" style="width:80px" /> px
<button type="button" id="get_scale" class="x_btn">{$lang->cmd_get_scale}</button>
</div>
</div>
<div class="x_control-group">
<label for="link_url" class="x_control-label">URL</label>
<div class="x_controls">
<input type="text" id="link_url" value=""/>
</div>
</div>
<div class="x_control-group">
<label for="open_window" class="x_control-label">{$lang->urllink_open_window}</label>
<div class="x_controls">
<input type="checkbox" id="open_window" value="Y" /> {$lang->about_url_link_open_window}
</div>
</div>
<div class="x_control-group">
<label for="image_alt" class="x_control-label">{$lang->image_alt}</label>
<div class="x_controls">
<input type="text" id="image_alt" value=""/>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->image_align}</label>
<div class="x_controls">
<label for="align_normal">
<input type="radio" name="align" value="" id="align_normal" checked="checked"/>
<img src="./images/align_normal.gif" alt="{$lang->image_align_normal}" />
{$lang->image_align_normal}
</label>
<label for="align_left">
<input type="radio" name="align" value="left" id="align_left" />
<img src="./images/align_left.gif" alt="{$lang->image_align_left}" />
{$lang->image_align_left}
</label>
<label for="align_middle">
<input type="radio" name="align" value="middle" id="align_middle" />
<img src="./images/align_middle.gif" alt="{$lang->image_align_middle}" />
{$lang->image_align_middle}
</label>
<label for="align_right">
<input type="radio" name="align" value="right" id="align_right" />
<img src="./images/align_right.gif" alt="{$lang->image_align_right}" />
{$lang->image_align_right}
</label>
</div>
</div>
<div class="x_control-group">
<label for="image_border" class="x_control-label">{$lang->image_border}</label>
<div class="x_controls">
<input type="text" id="image_border" value="0" size="2" />px
</div>
</div>
<div class="x_control-group">
<label for="image_margin" class="x_control-label">{$lang->image_margin}</label>
<div class="x_controls">
<input type="text" id="image_margin" value="0" size="2" />px
</div>
</div>
<div class="x_clearfix btnArea">
<div class="x_pull-right">
<button type="button" id="btn_insert" class="x_btn x_btn-primary">{$lang->cmd_insert}</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>

View file

@ -1,70 +1,74 @@
<?php
/**
* @class multimedia_link
* @author NHN (developers@xpressengine.com)
* @brief The components connected to the body of multimedia data
**/
/**
* @class multimedia_link
* @author NHN (developers@xpressengine.com)
* @brief The components connected to the body of multimedia data
*/
class multimedia_link extends EditorHandler
{
// editor_sequence from the editor must attend mandatory wearing ....
var $editor_sequence = 0;
var $component_path = '';
class multimedia_link 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 multimedia_link($editor_sequence, $component_path)
{
$this->editor_sequence = $editor_sequence;
$this->component_path = $component_path;
}
/**
* @brief editor_sequence and components out of the path
**/
function multimedia_link($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()
{
// 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() {
// Pre-compiled source code to compile template return to
$tpl_path = $this->component_path.'tpl';
$tpl_file = 'popup.html';
Context::set("tpl_path", $tpl_path);
Context::set("tpl_path", $tpl_path);
$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)
{
$src = $xml_obj->attrs->multimedia_src;
$style = $xml_obj->attrs->style;
/**
* @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) {
$src = $xml_obj->attrs->multimedia_src;
$style = $xml_obj->attrs->style;
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$style,$matches);
$width = trim($matches[3][0]);
$height = trim($matches[3][1]);
if(!$width) $width = 400;
if(!$height) $height = 400;
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$style,$matches);
$width = trim($matches[3][0]);
$height = trim($matches[3][1]);
if(!$width) $width = 400;
if(!$height) $height = 400;
$auto_start = $xml_obj->attrs->auto_start;
if($auto_start!="true") $auto_start = "false";
else $auto_start = "true";
$auto_start = $xml_obj->attrs->auto_start;
if($auto_start!="true") $auto_start = "false";
else $auto_start = "true";
$wmode = $xml_obj->attrs->wmode;
if($wmode == 'window') $wmode = 'window';
else if($wmode == 'opaque') $wmode = 'opaque';
else $wmode = 'transparent';
$wmode = $xml_obj->attrs->wmode;
if($wmode == 'window') $wmode = 'window';
elseif($wmode == 'opaque') $wmode = 'opaque';
else $wmode = 'transparent';
$caption = $xml_obj->body;
$caption = $xml_obj->body;
$src = str_replace(array('&','"'), array('&amp;','&qout;'), $src);
$src = str_replace('&amp;amp;', '&amp;', $src);
$src = str_replace(array('&','"'), array('&amp;','&qout;'), $src);
$src = str_replace('&amp;amp;', '&amp;', $src);
if(Context::getResponseMethod() != "XMLRPC") return sprintf("<script type=\"text/javascript\">displayMultimedia(\"%s\", \"%s\",\"%s\", { \"autostart\" : %s, \"wmode\" : \"%s\" });</script>", $src, $width, $height, $auto_start, $wmode);
else return sprintf("<div style=\"width: %dpx; height: %dpx;\"><span style=\"position:relative; top:%dpx;left:%d\"><img src=\"%s\" /><br />Attached Multimedia</span></div>", $width, $height, ($height/2-16), ($width/2-31), Context::getRequestUri().'./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif');
}
}
?>
if(Context::getResponseMethod() != "XMLRPC") return sprintf("<script type=\"text/javascript\">displayMultimedia(\"%s\", \"%s\",\"%s\", { \"autostart\" : %s, \"wmode\" : \"%s\" });</script>", $src, $width, $height, $auto_start, $wmode);
else return sprintf("<div style=\"width: %dpx; height: %dpx;\"><span style=\"position:relative; top:%dpx;left:%d\"><img src=\"%s\" /><br />Attached Multimedia</span></div>", $width, $height, ($height/2-16), ($width/2-31), Context::getRequestUri().'./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif');
}
}
/* End of file multimedia_link.class.php */
/* Location: ./modules/editor/components/multimedia_link/multimedia_link.class.php */

View file

@ -1,2 +1,4 @@
@charset "utf-8";
@import url(../../../../../modules/admin/tpl/css/admin.css);
@import url(../../../../../common/css/bootstrap.min.css);

View file

@ -6,47 +6,55 @@
<load target="popup.min.css" />
<load target="popup.min.js" />
<!--@end-->
<h1 class="h1">{$component_info->title} ver. {$component_info->version}</h1>
<form action="./" method="get" onsubmit="return false" id="fo">
<div class="table">
<table width="100%" border="1" cellspacing="0">
<col width="150" />
<col />
<tr>
<th scope="row"><div>{$lang->multimedia_url}</div></th>
<td><input type="text" id="multimedia_url" value="{$manual_url}" /></td>
</tr>
<tr>
<th scope="row"><div>{$lang->multimedia_caption}</div></th>
<td><input type="text" id="multimedia_caption" value="" /></td>
</tr>
<tr>
<th scope="row"><div>{$lang->multimedia_width}</div></th>
<td><input type="text" size="3" id="multimedia_width" value="400" />px</td>
</tr>
<tr>
<th scope="row"><div>{$lang->multimedia_height}</div></th>
<td><input type="text" size="3" id="multimedia_height" value="400" />px</td>
</tr>
<tr>
<th scope="row"><div>{$lang->multimedia_auto_start}</div></th>
<td><input type="checkbox" id="multimedia_auto_start" value="Y" /></td>
</tr>
<tr>
<th scope="row"><div>{$lang->multimedia_wmode}</div></th>
<td>
<select id="multimedia_wmode">
<option value="window">{$lang->multimedia_wmode_window}</option>
<option value="opaque">{$lang->multimedia_wmode_opaque}</option>
<option value="transparent" selected="selected">{$lang->multimedia_wmode_transparent}</option>
</select>
<p>{$lang->about_ccl_allow_modification}</p>
</td>
</table>
</div>
<div class="btnArea">
<span class="btn"><button type="button">{$lang->cmd_insert}</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>
<section class="section">
<h1>{$component_info->title} ver. {$component_info->version}</h1>
<form action="./" method="get" onsubmit="return false" id="fo" class="x_form-horizontal">
<div class="x_control-group">
<label for="" class="x_control-label">{$lang->multimedia_url}</label>
<div class="x_controls">
<input type="text" id="multimedia_url" value="{$manual_url}" />
</div>
</div>
<div class="x_control-group">
<label for="" class="x_control-label">{$lang->multimedia_caption}</label>
<div class="x_controls">
<input type="text" id="multimedia_caption" value="" />
</div>
</div>
<div class="x_control-group">
<label for="" class="x_control-label">{$lang->multimedia_width}</label>
<div class="x_controls">
<input type="text" size="3" id="multimedia_width" value="400" /> px
</div>
</div>
<div class="x_control-group">
<label for="" class="x_control-label">{$lang->multimedia_height}</label>
<div class="x_controls">
<input type="text" size="3" id="multimedia_height" value="400" /> px
</div>
</div>
<div class="x_control-group">
<label for="" class="x_control-label">{$lang->multimedia_auto_start}</label>
<div class="x_controls">
<input type="checkbox" id="multimedia_auto_start" value="Y" />
</div>
</div>
<div class="x_control-group">
<label for="" class="x_control-label">{$lang->multimedia_wmode}</label>
<div class="x_controls">
<select id="multimedia_wmode">
<option value="window">{$lang->multimedia_wmode_window}</option>
<option value="opaque">{$lang->multimedia_wmode_opaque}</option>
<option value="transparent" selected="selected">{$lang->multimedia_wmode_transparent}</option>
</select>
<p>{$lang->about_ccl_allow_modification}</p>
</div>
</div>
<div class="x_clearfix btnArea">
<div class="x_pull-right">
<button type="button" id="btn_insert" class="x_btn x_btn-primary">{$lang->cmd_insert}</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>

View file

@ -11,11 +11,11 @@ jQuery(function($){
if(!$node.length) return;
attrs = {
url : $node.attr('multimedia_src'),
caption : $node.attr('alt'),
width : $node.width() - 4,
height : $node.height() - 4,
wmode : $node.attr('wmode')
url : $node.attr('multimedia_src') || null,
caption : $node.attr('alt') || null,
width : $node.width() || 400,
height : $node.height() || 400,
wmode : $node.attr('wmode') || null
};
$.each(attrs, function(key, val) {
@ -45,17 +45,30 @@ $('.btnArea button').click(function(){
return;
}
var html = '<img src="../../../../common/img/blank.gif" editor_component="multimedia_link" multimedia_src="" width="" height="" wmode="" style="display:block;width:'+attrs.width+'px;height:'+attrs.height+'px;border:2px dotted #4371B9;background:url(./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif) no-repeat center" auto_start="" alt="" />';
var $selected_node = $(opener.editorPrevNode);
if($selected_node.is('img') && $selected_node.attr('editor_component') == 'multimedia_link'){
$selected_node
.attr('multimedia_src', attrs.multimedia_src)
.attr('width', attrs.width)
.attr('height', attrs.height)
.attr('wmode', attrs.wmode)
.attr('auto_start', attrs.auto_start)
.attr('alt', attrs.alt)
.css('width', attrs.width + 'px')
.css('height', attrs.height + 'px')
}else{
var html = '<img src="../../../../common/img/blank.gif" editor_component="multimedia_link" multimedia_src="" width="" height="" wmode="" style="display:block;width:'+attrs.width+'px;height:'+attrs.height+'px;border:2px dotted #4371B9;background:url(./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif) no-repeat center" auto_start="" alt="" />';
html = html.replace(/(\w+)=""/g, function(m0,m1) {
return attrs[m1] ? (m1+'="'+attrs[m1]+'"') : '';
});
html = html.replace(/(\w+)=""/g, function(m0,m1) {
return attrs[m1] ? (m1+'="'+attrs[m1]+'"') : '';
});
opener.editorFocus(opener.editorPrevSrl);
opener.editorFocus(opener.editorPrevSrl);
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
opener.editorReplaceHTML(iframe_obj, html);
opener.editorReplaceHTML(iframe_obj, html);
}
opener.editorFocus(opener.editorPrevSrl);
window.close();

View file

@ -2,4 +2,4 @@
* popup으로 열렸을 경우 부모창의 위지윅에디터에 select된 멀티미디어 컴포넌트 코드를 체크하여
* 있으면 가져와서 원하는 곳에 삽입
**/
@charset "utf-8";@import "../../../../../modules/admin/tpl/css/admin.css";
@charset "utf-8";@import "../../../../../modules/admin/tpl/css/admin.css";@import "../../../../../common/css/bootstrap.min.css";

View file

@ -2,4 +2,4 @@
* popup으로 열렸을 경우 부모창의 위지윅에디터에 select된 멀티미디어 컴포넌트 코드를 체크하여
* 있으면 가져와서 원하는 곳에 삽입
**/
jQuery(function($){(function(){if(!is_def(opener))return;var $node=$(opener.editorPrevNode).filter('img'),attrs;if(!$node.length)return;attrs={url:$node.attr('multimedia_src'),caption:$node.attr('alt'),width:$node.width()-4,height:$node.height()-4,wmode:$node.attr('wmode')};$.each(attrs,function(key,val){get_by_id('multimedia_'+key).value=val});get_by_id('multimedia_auto_start').checked=($node.attr('auto_start')=='true')})();$('.btnArea button').click(function(){if(!is_def(opener))return;var el_wmode=get_by_id('fo').elements['multimedia_wmode'],attrs={alt:encodeURIComponent(get_by_id('multimedia_caption').value),width:get_by_id('multimedia_width').value||400,height:get_by_id('multimedia_height').value||400,wmode:el_wmode.value||el_wmode.options[0].value,auto_start:get_by_id('multimedia_auto_start').checked?'true':'false',multimedia_src:get_by_id('multimedia_url').value.replace(request_uri,'')};if(!attrs.multimedia_src){window.close();return};var html='<img src="../../../../common/img/blank.gif" editor_component="multimedia_link" multimedia_src="" width="" height="" wmode="" style="display:block;width:'+attrs.width+'px;height:'+attrs.height+'px;border:2px dotted #4371B9;background:url(./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif) no-repeat center" auto_start="" alt="" />';html=html.replace(/(\w+)=""/g,function(m0,m1){return attrs[m1]?(m1+'="'+attrs[m1]+'"'):''});opener.editorFocus(opener.editorPrevSrl);var iframe_obj=opener.editorGetIFrame(opener.editorPrevSrl);opener.editorReplaceHTML(iframe_obj,html);opener.editorFocus(opener.editorPrevSrl);window.close()})})
jQuery(function($){(function(){if(!is_def(opener))return;var $node=$(opener.editorPrevNode).filter('img'),attrs;if(!$node.length)return;attrs={url:$node.attr('multimedia_src')||null,caption:$node.attr('alt')||null,width:$node.width()||400,height:$node.height()||400,wmode:$node.attr('wmode')||null};$.each(attrs,function(key,val){get_by_id('multimedia_'+key).value=val});get_by_id('multimedia_auto_start').checked=($node.attr('auto_start')=='true')})();$('.btnArea button').click(function(){if(!is_def(opener))return;var el_wmode=get_by_id('fo').elements['multimedia_wmode'],attrs={alt:encodeURIComponent(get_by_id('multimedia_caption').value),width:get_by_id('multimedia_width').value||400,height:get_by_id('multimedia_height').value||400,wmode:el_wmode.value||el_wmode.options[0].value,auto_start:get_by_id('multimedia_auto_start').checked?'true':'false',multimedia_src:get_by_id('multimedia_url').value.replace(request_uri,'')};if(!attrs.multimedia_src){window.close();return};var $selected_node=$(opener.editorPrevNode);if($selected_node.is('img')&&$selected_node.attr('editor_component')=='multimedia_link'){$selected_node.attr('multimedia_src',attrs.multimedia_src).attr('width',attrs.width).attr('height',attrs.height).attr('wmode',attrs.wmode).attr('auto_start',attrs.auto_start).attr('alt',attrs.alt).css('width',attrs.width+'px').css('height',attrs.height+'px')}else{var html='<img src="../../../../common/img/blank.gif" editor_component="multimedia_link" multimedia_src="" width="" height="" wmode="" style="display:block;width:'+attrs.width+'px;height:'+attrs.height+'px;border:2px dotted #4371B9;background:url(./modules/editor/components/multimedia_link/tpl/multimedia_link_component.gif) no-repeat center" auto_start="" alt="" />';html=html.replace(/(\w+)=""/g,function(m0,m1){return attrs[m1]?(m1+'="'+attrs[m1]+'"'):''});opener.editorFocus(opener.editorPrevSrl);var iframe_obj=opener.editorGetIFrame(opener.editorPrevSrl);opener.editorReplaceHTML(iframe_obj,html)};opener.editorFocus(opener.editorPrevSrl);window.close()})})

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>