mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-18 02:39:56 +09:00
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:
parent
cc47d2b247
commit
2d3f149b5a
2042 changed files with 129266 additions and 126243 deletions
|
|
@ -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('&','&qout;'), $src);
|
||||
if(!$alt) $alt = $src;
|
||||
|
||||
$src = str_replace(array('&','"'), array('&','&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 */
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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 |
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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&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></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")-->
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
@ -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()});
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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('&','&qout;'), $src);
|
||||
$src = str_replace('&amp;', '&', $src);
|
||||
|
||||
$src = str_replace(array('&','"'), array('&','&qout;'), $src);
|
||||
$src = str_replace('&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 */
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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&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></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>
|
||||
|
|
|
|||
|
|
@ -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('&','&qout;'), $src);
|
||||
$src = str_replace('&amp;', '&', $src);
|
||||
$src = str_replace(array('&','"'), array('&','&qout;'), $src);
|
||||
$src = str_replace('&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 */
|
||||
|
|
|
|||
|
|
@ -1,2 +1,4 @@
|
|||
@charset "utf-8";
|
||||
@import url(../../../../../modules/admin/tpl/css/admin.css);
|
||||
@import url(../../../../../common/css/bootstrap.min.css);
|
||||
|
||||
|
|
|
|||
|
|
@ -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&act=dispEditorComponentInfo&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>
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
@ -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()})})
|
||||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
||||
|
|
|
|||
|
|
@ -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&act=dispEditorComponentInfo&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>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<title xml:lang="zh-TW">網頁編輯器</title>
|
||||
<title xml:lang="tr">Editor WYSIWYG</title>
|
||||
<description xml:lang="vi">Module hiển thị WYSIWYG Editor để quản lý những kiểu viết bài.</description>
|
||||
<description xml:lang="ko">위지윅 에디터를 출력하거나 에디터 컴포넌트들을 관리/중계하는 모듈입니다.</description>
|
||||
<description xml:lang="ko">위지윅 에디터를 출력하거나 에디터 컴포넌트들을 관리/중계하는 합니다.</description>
|
||||
<description xml:lang="en">Module for displaying WYSIWYG editor and managing/relaying editor components.</description>
|
||||
<description xml:lang="es">Módulo para mostrar en la pantalla el editor de WYSIWYG y para el manejo/relato de los componentes del editor.</description>
|
||||
<description xml:lang="zh-CN">显示网页编辑器或管理/传递编辑器组件的模块。</description>
|
||||
|
|
|
|||
|
|
@ -1,172 +1,194 @@
|
|||
<?php
|
||||
/**
|
||||
* @class editorAdminController
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief editor of the module admin controller class
|
||||
**/
|
||||
/**
|
||||
* @class editorAdminController
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief editor of the module admin controller class
|
||||
*/
|
||||
class editorAdminController extends editor
|
||||
{
|
||||
/**
|
||||
* @brief Initialization
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
}
|
||||
|
||||
class editorAdminController extends editor {
|
||||
/**
|
||||
* @brief 컴포넌트 사용설정, 목록 순서 변경
|
||||
*/
|
||||
function procEditorAdminCheckUseListOrder()
|
||||
{
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$enables = Context::get('enables');
|
||||
$component_names = Context::get('component_names');
|
||||
|
||||
/**
|
||||
* @brief Initialization
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트 사용설정, 목록 순서 변경
|
||||
**/
|
||||
function procEditorAdminCheckUseListOrder(){
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$enables = Context::get('enables');
|
||||
$component_names = Context::get('component_names');
|
||||
if(!is_array($component_names)) $component_names = array();
|
||||
if(!is_array($enables)) $enables = array();
|
||||
|
||||
if(!is_array($component_names)) $component_names = array();
|
||||
if(!is_array($enables)) $enables = array();
|
||||
$unables = array_diff($component_names, $enables);
|
||||
$componentList = array();
|
||||
|
||||
$unables = array_diff($component_names, $enables);
|
||||
$componentList = array();
|
||||
|
||||
foreach($enables as $component_name) {
|
||||
$componentList[$component_name] = 'Y';
|
||||
}
|
||||
foreach($unables as $component_name) {
|
||||
$componentList[$component_name] = 'N';
|
||||
}
|
||||
|
||||
$output = $this->editorListOrder($component_names,$site_module_info->site_srl);
|
||||
if(!$output->toBool()) return new Object();
|
||||
|
||||
$output = $this->editorCheckUse($componentList,$site_module_info->site_srl);
|
||||
if(!$output->toBool()) return new Object();
|
||||
|
||||
$oEditorController = &getController('editor');
|
||||
$oEditorController->removeCache($site_module_info->site_srl);
|
||||
$this->setRedirectUrl(Context::get('error_return_url'));
|
||||
foreach($enables as $component_name)
|
||||
{
|
||||
$componentList[$component_name] = 'Y';
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief check use component
|
||||
**/
|
||||
function editorCheckUse($componentList, $site_srl = 0){
|
||||
$args->site_srl = $site_srl;
|
||||
|
||||
foreach($componentList as $componentName => $value){
|
||||
$args->component_name = $componentName;
|
||||
$args->enabled = $value;
|
||||
if($site_srl == 0) {
|
||||
foreach($unables as $component_name)
|
||||
{
|
||||
$componentList[$component_name] = 'N';
|
||||
}
|
||||
|
||||
$output = $this->editorListOrder($component_names,$site_module_info->site_srl);
|
||||
if(!$output->toBool()) return new Object();
|
||||
|
||||
$output = $this->editorCheckUse($componentList,$site_module_info->site_srl);
|
||||
if(!$output->toBool()) return new Object();
|
||||
|
||||
$oEditorController = &getController('editor');
|
||||
$oEditorController->removeCache($site_module_info->site_srl);
|
||||
$this->setRedirectUrl(Context::get('error_return_url'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief check use component
|
||||
*/
|
||||
function editorCheckUse($componentList, $site_srl = 0)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->site_srl = $site_srl;
|
||||
|
||||
foreach($componentList as $componentName => $value)
|
||||
{
|
||||
$args->component_name = $componentName;
|
||||
$args->enabled = $value;
|
||||
if($site_srl == 0)
|
||||
{
|
||||
$output = executeQuery('editor.updateComponent', $args);
|
||||
}
|
||||
else
|
||||
{
|
||||
$output = executeQuery('editor.updateSiteComponent', $args);
|
||||
}
|
||||
}
|
||||
if(!$output->toBool()) return new Object();
|
||||
|
||||
unset($componentList);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief list order componet
|
||||
*/
|
||||
function editorListOrder($component_names, $site_srl = 0)
|
||||
{
|
||||
$args = new stdClass();
|
||||
$args->site_srl = $site_srl;
|
||||
$list_order_num = '30';
|
||||
if(is_array($component_names))
|
||||
{
|
||||
foreach($component_names as $name)
|
||||
{
|
||||
$args->list_order = $list_order_num;
|
||||
$args->component_name = $name;
|
||||
if($site_srl == 0)
|
||||
{
|
||||
$output = executeQuery('editor.updateComponent', $args);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$output = executeQuery('editor.updateSiteComponent', $args);
|
||||
}
|
||||
|
||||
if(!$output->toBool()) return new Object();
|
||||
$list_order_num++;
|
||||
}
|
||||
if(!$output->toBool()) return new Object();
|
||||
|
||||
unset($componentList);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief list order componet
|
||||
**/
|
||||
function editorListOrder($component_names, $site_srl = 0){
|
||||
$args->site_srl = $site_srl;
|
||||
$list_order_num = '30';
|
||||
if(is_array($component_names)) {
|
||||
foreach($component_names as $name){
|
||||
$args->list_order = $list_order_num;
|
||||
$args->component_name = $name;
|
||||
if($site_srl == 0) {
|
||||
$output = executeQuery('editor.updateComponent', $args);
|
||||
} else {
|
||||
$output = executeQuery('editor.updateSiteComponent', $args);
|
||||
}
|
||||
}
|
||||
unset($component_names);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
if(!$output->toBool()) return new Object();
|
||||
$list_order_num++;
|
||||
}
|
||||
}
|
||||
unset($component_names);
|
||||
return $output;
|
||||
}
|
||||
/**
|
||||
* @brief Set components
|
||||
*/
|
||||
function procEditorAdminSetupComponent()
|
||||
{
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
|
||||
/**
|
||||
* @brief Set components
|
||||
**/
|
||||
function procEditorAdminSetupComponent() {
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$component_name = Context::get('component_name');
|
||||
$extra_vars = Context::getRequestVars();
|
||||
unset($extra_vars->component_name);
|
||||
unset($extra_vars->module);
|
||||
unset($extra_vars->act);
|
||||
unset($extra_vars->body);
|
||||
|
||||
$component_name = Context::get('component_name');
|
||||
$extra_vars = Context::getRequestVars();
|
||||
unset($extra_vars->component_name);
|
||||
unset($extra_vars->module);
|
||||
unset($extra_vars->act);
|
||||
unset($extra_vars->body);
|
||||
$args->component_name = $component_name;
|
||||
$args->extra_vars = serialize($extra_vars);
|
||||
$args->site_srl = (int)$site_module_info->site_srl;
|
||||
|
||||
if($extra_vars->target_group) $extra_vars->target_group = explode('|@|', $extra_vars->target_group);
|
||||
if($extra_vars->mid_list) $extra_vars->mid_list = explode('|@|', $extra_vars->mid_list);
|
||||
if(!$args->site_srl) $output = executeQuery('editor.updateComponent', $args);
|
||||
else $output = executeQuery('editor.updateSiteComponent', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$args->component_name = $component_name;
|
||||
$args->extra_vars = serialize($extra_vars);
|
||||
$args->site_srl = (int)$site_module_info->site_srl;
|
||||
$oEditorController = &getController('editor');
|
||||
$oEditorController->removeCache($args->site_srl);
|
||||
|
||||
if(!$args->site_srl) $output = executeQuery('editor.updateComponent', $args);
|
||||
else $output = executeQuery('editor.updateSiteComponent', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
$this->setMessage('success_updated');
|
||||
$this->setRedirectUrl(Context::get('error_return_url'));
|
||||
}
|
||||
|
||||
$oEditorController = &getController('editor');
|
||||
$oEditorController->removeCache($args->site_srl);
|
||||
/**
|
||||
* @brief Config components
|
||||
*/
|
||||
function procEditorAdminGeneralConfig()
|
||||
{
|
||||
$oModuleController = &getController('module');
|
||||
$configVars = Context::getRequestVars();
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
$this->setRedirectUrl(Context::get('error_return_url'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Config components
|
||||
**/
|
||||
|
||||
function procEditorAdminGeneralConfig(){
|
||||
$oModuleController = &getController('module');
|
||||
$configVars = Context::getRequestVars();
|
||||
|
||||
$config->editor_skin = $configVars->editor_skin;
|
||||
$config->editor_height = $configVars->editor_height;
|
||||
$config->comment_editor_skin = $configVars->comment_editor_skin;
|
||||
$config->comment_editor_height = $configVars->comment_editor_height;
|
||||
$config->content_style = $configVars->content_style;
|
||||
if($configVars->font_defined != 'Y') $config->font_defined = $configVars->font_defined = 'N';
|
||||
else $config->font_defined = 'Y';
|
||||
|
||||
if($config->font_defined == 'Y')
|
||||
$config->content_font = $configVars->content_font_defined;
|
||||
else
|
||||
$config->content_font = $configVars->content_font;
|
||||
$config->content_font_size= $configVars->content_font_size.'px';
|
||||
$config->sel_editor_colorset= $configVars->sel_editor_colorset;
|
||||
$config->sel_comment_editor_colorset= $configVars->sel_comment_editor_colorset;
|
||||
|
||||
$oModuleController->insertModuleConfig('editor',$config);
|
||||
$this->setRedirectUrl(Context::get('error_return_url'));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Add a component to DB
|
||||
**/
|
||||
function insertComponent($component_name, $enabled = false, $site_srl = 0) {
|
||||
if($enabled) $enabled = 'Y';
|
||||
else $enabled = 'N';
|
||||
$config->editor_skin = $configVars->editor_skin;
|
||||
$config->editor_height = $configVars->editor_height;
|
||||
$config->comment_editor_skin = $configVars->comment_editor_skin;
|
||||
$config->comment_editor_height = $configVars->comment_editor_height;
|
||||
$config->content_style = $configVars->content_style;
|
||||
|
||||
$args->component_name = $component_name;
|
||||
$args->enabled = $enabled;
|
||||
$args->site_srl = $site_srl;
|
||||
// Check if the component exists
|
||||
if(!$site_srl) $output = executeQuery('editor.isComponentInserted', $args);
|
||||
else $output = executeQuery('editor.isSiteComponentInserted', $args);
|
||||
if($output->data->count) return new Object(-1, 'msg_component_is_not_founded');
|
||||
// Inert a component
|
||||
$args->list_order = getNextSequence();
|
||||
if(!$site_srl) $output = executeQuery('editor.insertComponent', $args);
|
||||
else $output = executeQuery('editor.insertSiteComponent', $args);
|
||||
$config->content_font_size= $configVars->content_font_size.'px';
|
||||
$config->sel_editor_colorset= $configVars->sel_editor_colorset;
|
||||
$config->sel_comment_editor_colorset= $configVars->sel_comment_editor_colorset;
|
||||
|
||||
$oEditorController = &getController('editor');
|
||||
$oEditorController->removeCache($site_srl);
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
?>
|
||||
$oModuleController->insertModuleConfig('editor',$config);
|
||||
$this->setRedirectUrl(Context::get('error_return_url'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Add a component to DB
|
||||
*/
|
||||
function insertComponent($component_name, $enabled = false, $site_srl = 0)
|
||||
{
|
||||
if($enabled) $enabled = 'Y';
|
||||
else $enabled = 'N';
|
||||
|
||||
$args->component_name = $component_name;
|
||||
$args->enabled = $enabled;
|
||||
$args->site_srl = $site_srl;
|
||||
// Check if the component exists
|
||||
if(!$site_srl) $output = executeQuery('editor.isComponentInserted', $args);
|
||||
else $output = executeQuery('editor.isSiteComponentInserted', $args);
|
||||
if($output->data->count) return new Object(-1, 'msg_component_is_not_founded');
|
||||
// Inert a component
|
||||
$args->list_order = getNextSequence();
|
||||
if(!$site_srl) $output = executeQuery('editor.insertComponent', $args);
|
||||
else $output = executeQuery('editor.insertSiteComponent', $args);
|
||||
|
||||
$oEditorController = &getController('editor');
|
||||
$oEditorController->removeCache($site_srl);
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
/* End of file editor.admin.controller.php */
|
||||
/* Location: ./modules/editor/editor.admin.controller.php */
|
||||
|
|
|
|||
|
|
@ -1,129 +1,188 @@
|
|||
<?php
|
||||
/**
|
||||
* @class editorAdminView
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief editor admin view of the module class
|
||||
**/
|
||||
/**
|
||||
* @class editorAdminView
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief editor admin view of the module class
|
||||
*/
|
||||
class editorAdminView extends editor
|
||||
{
|
||||
/**
|
||||
* @brief Initialization
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
}
|
||||
|
||||
class editorAdminView extends editor {
|
||||
/**
|
||||
* @brief Administrator Setting page
|
||||
* Settings to enable/disable editor component and other features
|
||||
*/
|
||||
function dispEditorAdminIndex()
|
||||
{
|
||||
$component_count = 0;
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$site_srl = (int)$site_module_info->site_srl;
|
||||
|
||||
/**
|
||||
* @brief Initialization
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
// Get a type of component
|
||||
$oEditorModel = &getModel('editor');
|
||||
$oModuleModel = &getModel('module');
|
||||
$editor_config = $oModuleModel->getModuleConfig('editor');
|
||||
|
||||
/**
|
||||
* @brief Administrator Setting page
|
||||
* Settings to enable/disable editor component and other features
|
||||
**/
|
||||
function dispEditorAdminIndex() {
|
||||
$component_count = 0;
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$site_srl = (int)$site_module_info->site_srl;
|
||||
|
||||
// Get a type of component
|
||||
$oEditorModel = &getModel('editor');
|
||||
$oModuleModel = &getModel('module');
|
||||
$editor_config = $oModuleModel->getModuleConfig('editor');
|
||||
if(!$editor_config)
|
||||
{
|
||||
$editor_config = new stdClass();
|
||||
}
|
||||
|
||||
//editor_config init
|
||||
if(!$editor_config->editor_height) $editor_config->editor_height = 400;
|
||||
if(!$editor_config->comment_editor_height) $editor_config->comment_editor_height = 100;
|
||||
if(!$editor_config->editor_skin) $editor_config->editor_skin = 'xpresseditor';
|
||||
if(!$editor_config->comment_editor_skin) $editor_config->comment_editor_skin = 'xpresseditor';
|
||||
if(!$editor_config->sel_editor_colorset) $editor_config->sel_editor_colorset= 'white';
|
||||
if(!$editor_config->sel_comment_editor_colorset) $editor_config->sel_comment_editor_colorset= 'white';
|
||||
|
||||
$component_list = $oEditorModel->getComponentList(false, $site_srl, true);
|
||||
$editor_skin_list = FileHandler::readDir(_XE_PATH_.'modules/editor/skins');
|
||||
|
||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path,$editor_config->editor_skin);
|
||||
|
||||
$contents = FileHandler::readDir(_XE_PATH_.'modules/editor/styles');
|
||||
for($i=0,$c=count($contents);$i<$c;$i++) {
|
||||
$style = $contents[$i];
|
||||
$info = $oModuleModel->loadSkinInfo($this->module_path,$style,'styles');
|
||||
$content_style_list[$style]->title = $info->title;
|
||||
}
|
||||
|
||||
// Get install info, update info, count
|
||||
$oAutoinstallModel = &getModel('autoinstall');
|
||||
foreach($component_list as $component_name => $xml_info) {
|
||||
$component_count++;
|
||||
$xml_info->path = './modules/editor/components/'.$xml_info->component_name;
|
||||
$xml_info->delete_url = $oAutoinstallModel->getRemoveUrlByPath($xml_info->path);
|
||||
$xml_info->package_srl = $oAutoinstallModel->getPackageSrlByPath($xml_info->path);
|
||||
if($xml_info->package_srl) $targetpackages[$xml_info->package_srl] = 0;
|
||||
}
|
||||
|
||||
if(is_array($targetpackages)) $packages = $oAutoinstallModel->getInstalledPackages(array_keys($targetpackages));
|
||||
|
||||
foreach($component_list as $component_name => $xml_info) {
|
||||
if($packages[$xml_info->package_srl]) $xml_info->need_update = $packages[$xml_info->package_srl]->need_update;
|
||||
//editor_config init
|
||||
if(!$editor_config->editor_height) $editor_config->editor_height = 300;
|
||||
if(!$editor_config->comment_editor_height) $editor_config->comment_editor_height = 100;
|
||||
if(!$editor_config->editor_skin) $editor_config->editor_skin = 'xpresseditor';
|
||||
if(!$editor_config->comment_editor_skin) $editor_config->comment_editor_skin = 'xpresseditor';
|
||||
if(!$editor_config->sel_editor_colorset) $editor_config->sel_editor_colorset= 'white';
|
||||
if(!$editor_config->sel_comment_editor_colorset) $editor_config->sel_comment_editor_colorset= 'white';
|
||||
|
||||
$component_list = $oEditorModel->getComponentList(false, $site_srl, true);
|
||||
$editor_skin_list = FileHandler::readDir(_XE_PATH_.'modules/editor/skins');
|
||||
|
||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path,$editor_config->editor_skin);
|
||||
|
||||
$contents = FileHandler::readDir(_XE_PATH_.'modules/editor/styles');
|
||||
$content_style_list = array();
|
||||
for($i=0,$c=count($contents);$i<$c;$i++)
|
||||
{
|
||||
$style = $contents[$i];
|
||||
$info = $oModuleModel->loadSkinInfo($this->module_path,$style,'styles');
|
||||
$content_style_list[$style] = new stdClass();
|
||||
$content_style_list[$style]->title = $info->title;
|
||||
}
|
||||
|
||||
// Get install info, update info, count
|
||||
$oAutoinstallModel = &getModel('autoinstall');
|
||||
foreach($component_list as $component_name => $xml_info)
|
||||
{
|
||||
$component_count++;
|
||||
$xml_info->path = './modules/editor/components/'.$xml_info->component_name;
|
||||
$xml_info->delete_url = $oAutoinstallModel->getRemoveUrlByPath($xml_info->path);
|
||||
$xml_info->package_srl = $oAutoinstallModel->getPackageSrlByPath($xml_info->path);
|
||||
if($xml_info->package_srl) $targetpackages[$xml_info->package_srl] = 0;
|
||||
}
|
||||
|
||||
if(is_array($targetpackages)) $packages = $oAutoinstallModel->getInstalledPackages(array_keys($targetpackages));
|
||||
|
||||
foreach($component_list as $component_name => $xml_info)
|
||||
{
|
||||
if($packages[$xml_info->package_srl]) $xml_info->need_update = $packages[$xml_info->package_srl]->need_update;
|
||||
}
|
||||
$editor_config_default = array( "editor_height" => "300", "comment_editor_height" => "100","content_font_size"=>"12");
|
||||
|
||||
//editor preview
|
||||
$config = $oEditorModel->getEditorConfig();
|
||||
|
||||
$option = new stdClass();
|
||||
$option->allow_fileupload = false;
|
||||
$option->content_style = $config->content_style;
|
||||
$option->content_font = $config->content_font;
|
||||
$option->content_font_size = $config->content_font_size;
|
||||
$option->enable_autosave = false;
|
||||
$option->enable_default_component = true;
|
||||
$option->enable_component = true;
|
||||
$option->disable_html = false;
|
||||
$option->height = $config->editor_height;
|
||||
$option->skin = $config->editor_skin;
|
||||
$option->content_key_name = 'dummy_content';
|
||||
$option->primary_key_name = 'dummy_key';
|
||||
$option->colorset = $config->sel_editor_colorset;
|
||||
$editor = $oEditorModel->getEditor(0, $option);
|
||||
|
||||
Context::set('preview_editor', $editor);
|
||||
|
||||
$option_com = new stdClass();
|
||||
$option_com->allow_fileupload = false;
|
||||
$option_com->content_style = $config->content_style;
|
||||
$option_com->content_font = $config->content_font;
|
||||
$option_com->content_font_size = $config->content_font_size;
|
||||
$option_com->enable_autosave = false;
|
||||
$option_com->enable_default_component = true;
|
||||
$option_com->enable_component = true;
|
||||
$option_com->disable_html = false;
|
||||
$option_com->height = $config->comment_editor_height;
|
||||
$option_com->skin = $config->comment_editor_skin;
|
||||
$option_com->content_key_name = 'dummy_content2';
|
||||
$option_com->primary_key_name = 'dummy_key2';
|
||||
$option_com->content_style = $config->comment_content_style;
|
||||
$option_com->colorset = $config->sel_comment_editor_colorset;
|
||||
|
||||
$editor_comment = $oEditorModel->getEditor(0, $option_com);
|
||||
|
||||
Context::set('preview_editor_comment', $editor_comment);
|
||||
|
||||
Context::set('editor_config', $editor_config);
|
||||
Context::set('editor_skin_list', $editor_skin_list);
|
||||
Context::set('editor_colorset_list', $skin_info->colorset);
|
||||
Context::set('content_style_list', $content_style_list);
|
||||
Context::set('component_list', $component_list);
|
||||
Context::set('component_count', $component_count);
|
||||
Context::set('editor_config_default', $editor_config_default);
|
||||
|
||||
$security = new Security();
|
||||
$security->encodeHTML('component_list....');
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('admin_index');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Component setup
|
||||
*/
|
||||
function dispEditorAdminSetupComponent()
|
||||
{
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$site_srl = (int)$site_module_info->site_srl;
|
||||
|
||||
$component_name = Context::get('component_name');
|
||||
// Get information of the editor component
|
||||
$oEditorModel = &getModel('editor');
|
||||
$component = $oEditorModel->getComponent($component_name,$site_srl);
|
||||
Context::set('component', $component);
|
||||
// Get a group list to set a group
|
||||
$oMemberModel = &getModel('member');
|
||||
$group_list = $oMemberModel->getGroups($site_srl);
|
||||
Context::set('group_list', $group_list);
|
||||
// Get a mid list
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
$args =new stdClass();
|
||||
$args->site_srl = $site_srl;
|
||||
$columnList = array('module_srl', 'mid', 'module_category_srl', 'browser_title');
|
||||
$mid_list = $oModuleModel->getMidList($args, $columnList);
|
||||
// Combination of module_category and module
|
||||
if(!$args->site_srl)
|
||||
{
|
||||
// Get a list of module category
|
||||
$module_categories = $oModuleModel->getModuleCategories();
|
||||
|
||||
if(!is_array($mid_list)) $mid_list = array($mid_list);
|
||||
foreach($mid_list as $module_srl => $module)
|
||||
{
|
||||
if($module) $module_categories[$module->module_category_srl]->list[$module_srl] = $module;
|
||||
}
|
||||
$editor_config_default = array( "editor_height" => "400", "comment_editor_height" => "100","content_font_size"=>"12");
|
||||
|
||||
Context::set('editor_config', $editor_config);
|
||||
Context::set('editor_skin_list', $editor_skin_list);
|
||||
Context::set('editor_colorset_list', $skin_info->colorset);
|
||||
Context::set('content_style_list', $content_style_list);
|
||||
Context::set('component_list', $component_list);
|
||||
Context::set('component_count', $component_count);
|
||||
Context::set('editor_config_default', $editor_config_default);
|
||||
|
||||
$security = new Security();
|
||||
$security->encodeHTML('component_list....');
|
||||
}
|
||||
else
|
||||
{
|
||||
$module_categories[0]->list = $mid_list;
|
||||
}
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('admin_index');
|
||||
}
|
||||
Context::set('mid_list',$module_categories);
|
||||
|
||||
/**
|
||||
* @brief Component setup
|
||||
**/
|
||||
function dispEditorAdminSetupComponent() {
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$site_srl = (int)$site_module_info->site_srl;
|
||||
//Security
|
||||
$security = new Security();
|
||||
$security->encodeHTML('group_list..title');
|
||||
$security->encodeHTML('component...');
|
||||
$security->encodeHTML('mid_list..title','mid_list..list..browser_title');
|
||||
|
||||
$component_name = Context::get('component_name');
|
||||
// Get information of the editor component
|
||||
$oEditorModel = &getModel('editor');
|
||||
$component = $oEditorModel->getComponent($component_name,$site_srl);
|
||||
Context::set('component', $component);
|
||||
// Get a group list to set a group
|
||||
$oMemberModel = &getModel('member');
|
||||
$group_list = $oMemberModel->getGroups($site_srl);
|
||||
Context::set('group_list', $group_list);
|
||||
// Get a mid list
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
$args->site_srl = $site_srl;
|
||||
$columnList = array('module_srl', 'mid', 'module_category_srl', 'browser_title');
|
||||
$mid_list = $oModuleModel->getMidList($args, $columnList);
|
||||
// Combination of module_category and module
|
||||
if(!$args->site_srl) {
|
||||
// Get a list of module category
|
||||
$module_categories = $oModuleModel->getModuleCategories();
|
||||
|
||||
if(!is_array($mid_list)) $mid_list = array($mid_list);
|
||||
foreach($mid_list as $module_srl => $module) {
|
||||
if($module) $module_categories[$module->module_category_srl]->list[$module_srl] = $module;
|
||||
}
|
||||
} else {
|
||||
$module_categories[0]->list = $mid_list;
|
||||
}
|
||||
|
||||
Context::set('mid_list',$module_categories);
|
||||
|
||||
//Security
|
||||
$security = new Security();
|
||||
$security->encodeHTML('group_list..title');
|
||||
$security->encodeHTML('component...');
|
||||
$security->encodeHTML('mid_list..title','mid_list..list..browser_title');
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('setup_component');
|
||||
}
|
||||
}
|
||||
?>
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('setup_component');
|
||||
}
|
||||
}
|
||||
/* End of file editor.admin.view.php */
|
||||
/* Location: ./modules/editor/editor.admin.view.php */
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
<?php
|
||||
/**
|
||||
* @class editorAPI
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief
|
||||
**/
|
||||
|
||||
class editorAPI extends editor {
|
||||
function dispEditorSkinColorset(&$oModule) {
|
||||
$oModule->add('colorset', Context::get('colorset'));
|
||||
}
|
||||
}
|
||||
?>
|
||||
/**
|
||||
* @class editorAPI
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief
|
||||
*/
|
||||
class editorAPI extends editor
|
||||
{
|
||||
function dispEditorSkinColorset(&$oModule)
|
||||
{
|
||||
$oModule->add('colorset', Context::get('colorset'));
|
||||
}
|
||||
}
|
||||
/* End of file editor.api.php */
|
||||
/* Location: ./modules/editor/editor.api.php */
|
||||
|
|
|
|||
|
|
@ -1,114 +1,117 @@
|
|||
<?php
|
||||
/**
|
||||
* @class editor
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief high class of the editor odule
|
||||
**/
|
||||
/**
|
||||
* @class editor
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief high class of the editor odule
|
||||
*/
|
||||
class editor extends ModuleObject
|
||||
{
|
||||
/**
|
||||
* @brief Implement if additional tasks are necessary when installing
|
||||
*/
|
||||
function moduleInstall()
|
||||
{
|
||||
// Register action forward (to use in administrator mode)
|
||||
$oModuleController = &getController('module');
|
||||
// Add the default editor component
|
||||
$oEditorController = &getAdminController('editor');
|
||||
$oEditorController->insertComponent('colorpicker_text',true);
|
||||
$oEditorController->insertComponent('colorpicker_bg',true);
|
||||
$oEditorController->insertComponent('emoticon',true);
|
||||
$oEditorController->insertComponent('url_link',true);
|
||||
$oEditorController->insertComponent('image_link',true);
|
||||
$oEditorController->insertComponent('multimedia_link',true);
|
||||
$oEditorController->insertComponent('quotation',true);
|
||||
$oEditorController->insertComponent('table_maker',true);
|
||||
$oEditorController->insertComponent('poll_maker',true);
|
||||
$oEditorController->insertComponent('image_gallery',true);
|
||||
// Create a directory to use in the editor module
|
||||
FileHandler::makeDir('./files/cache/editor');
|
||||
// 2007. 10. 17 Add a trigger to delete automatically saved document whenever the document(insert or update) is modified
|
||||
$oModuleController->insertTrigger('document.insertDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after');
|
||||
$oModuleController->insertTrigger('document.updateDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after');
|
||||
// 2007. 10. 23 Add an editor trigger on the module addition setup
|
||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'editor', 'view', 'triggerDispEditorAdditionSetup', 'before');
|
||||
// 2009. 04. 14 Add a trigger from compiled codes of the editor component
|
||||
$oModuleController->insertTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before');
|
||||
|
||||
class editor extends ModuleObject {
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Implement if additional tasks are necessary when installing
|
||||
**/
|
||||
function moduleInstall() {
|
||||
// Register action forward (to use in administrator mode)
|
||||
$oModuleController = &getController('module');
|
||||
// Add the default editor component
|
||||
$oEditorController = &getAdminController('editor');
|
||||
$oEditorController->insertComponent('colorpicker_text',true);
|
||||
$oEditorController->insertComponent('colorpicker_bg',true);
|
||||
$oEditorController->insertComponent('emoticon',true);
|
||||
$oEditorController->insertComponent('url_link',true);
|
||||
$oEditorController->insertComponent('image_link',true);
|
||||
$oEditorController->insertComponent('multimedia_link',true);
|
||||
$oEditorController->insertComponent('quotation',true);
|
||||
$oEditorController->insertComponent('table_maker',true);
|
||||
$oEditorController->insertComponent('poll_maker',true);
|
||||
$oEditorController->insertComponent('image_gallery',true);
|
||||
// Create a directory to use in the editor module
|
||||
FileHandler::makeDir('./files/cache/editor');
|
||||
// 2007. 10. 17 Add a trigger to delete automatically saved document whenever the document(insert or update) is modified
|
||||
$oModuleController->insertTrigger('document.insertDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after');
|
||||
$oModuleController->insertTrigger('document.updateDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after');
|
||||
// 2007. 10. 23 Add an editor trigger on the module addition setup
|
||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'editor', 'view', 'triggerDispEditorAdditionSetup', 'before');
|
||||
// 2009. 04. 14 Add a trigger from compiled codes of the editor component
|
||||
$oModuleController->insertTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before');
|
||||
/**
|
||||
* @brief a method to check if successfully installed
|
||||
*/
|
||||
function checkUpdate()
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
return new Object();
|
||||
}
|
||||
$oDB = &DB::getInstance();
|
||||
// 2009. 06. 15 Save module_srl when auto-saving
|
||||
if(!$oDB->isColumnExists("editor_autosave","module_srl")) return true;
|
||||
if(!$oDB->isIndexExists("editor_autosave","idx_module_srl")) return true;
|
||||
|
||||
/**
|
||||
* @brief a method to check if successfully installed
|
||||
**/
|
||||
function checkUpdate() {
|
||||
$oModuleModel = &getModel('module');
|
||||
// 2007. 10. 17 Add a trigger to delete automatically saved document whenever the document(insert or update) is modified
|
||||
if(!$oModuleModel->getTrigger('document.insertDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after')) return true;
|
||||
if(!$oModuleModel->getTrigger('document.updateDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after')) return true;
|
||||
// 2007. 10. 23 Add an editor trigger on the module addition setup
|
||||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'editor', 'view', 'triggerDispEditorAdditionSetup', 'before')) return true;
|
||||
// 2009. 04. 14 Add a trigger from compiled codes of the editor component
|
||||
if(!$oModuleModel->getTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before')) return true;
|
||||
// 2009. 06. 19 Remove unused trigger
|
||||
if($oModuleModel->getTrigger('file.getIsPermitted', 'editor', 'controller', 'triggerSrlSetting', 'before')) return true;
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
// 2009. 06. 15 Save module_srl when auto-saving
|
||||
if(!$oDB->isColumnExists("editor_autosave","module_srl")) return true;
|
||||
if(!$oDB->isIndexExists("editor_autosave","idx_module_srl")) return true;
|
||||
// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
|
||||
if(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'editor', 'controller', 'triggerCopyModule', 'after')) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// 2007. 10. 17 Add a trigger to delete automatically saved document whenever the document(insert or update) is modified
|
||||
if(!$oModuleModel->getTrigger('document.insertDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after')) return true;
|
||||
if(!$oModuleModel->getTrigger('document.updateDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after')) return true;
|
||||
// 2007. 10. 23 Add an editor trigger on the module addition setup
|
||||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'editor', 'view', 'triggerDispEditorAdditionSetup', 'before')) return true;
|
||||
// 2009. 04. 14 Add a trigger from compiled codes of the editor component
|
||||
if(!$oModuleModel->getTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before')) return true;
|
||||
// 2009. 06. 19 Remove unused trigger
|
||||
if($oModuleModel->getTrigger('file.getIsPermitted', 'editor', 'controller', 'triggerSrlSetting', 'before')) return true;
|
||||
/**
|
||||
* @brief Execute update
|
||||
*/
|
||||
function moduleUpdate()
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleController = &getController('module');
|
||||
|
||||
// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
|
||||
if(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'editor', 'controller', 'triggerCopyModule', 'after')) return true;
|
||||
$oDB = &DB::getInstance();
|
||||
// Save module_srl when auto-saving 15/06/2009
|
||||
if(!$oDB->isColumnExists("editor_autosave","module_srl"))
|
||||
$oDB->addColumn("editor_autosave","module_srl","number",11);
|
||||
|
||||
return false;
|
||||
}
|
||||
// create an index on module_srl
|
||||
if(!$oDB->isIndexExists("editor_autosave","idx_module_srl")) $oDB->addIndex("editor_autosave","idx_module_srl", "module_srl");
|
||||
|
||||
/**
|
||||
* @brief Execute update
|
||||
**/
|
||||
function moduleUpdate() {
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleController = &getController('module');
|
||||
// 2007. 10. 17 Add a trigger to delete automatically saved document whenever the document(insert or update) is modified
|
||||
if(!$oModuleModel->getTrigger('document.insertDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after'))
|
||||
$oModuleController->insertTrigger('document.insertDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after');
|
||||
if(!$oModuleModel->getTrigger('document.updateDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after'))
|
||||
$oModuleController->insertTrigger('document.updateDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after');
|
||||
// 2007. 10. Add an editor trigger on the module addition setup
|
||||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'editor', 'view', 'triggerDispEditorAdditionSetup', 'before'))
|
||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'editor', 'view', 'triggerDispEditorAdditionSetup', 'before');
|
||||
// 2009. 04. 14 Add a trigger from compiled codes of the editor component
|
||||
if(!$oModuleModel->getTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before'))
|
||||
$oModuleController->insertTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before');
|
||||
// 2009. 06. 19 Remove unused trigger
|
||||
if($oModuleModel->getTrigger('file.getIsPermitted', 'editor', 'controller', 'triggerSrlSetting', 'before'))
|
||||
$oModuleController->deleteTrigger('file.getIsPermitted', 'editor', 'controller', 'triggerSrlSetting', 'before');
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
// Save module_srl when auto-saving 15/06/2009
|
||||
if(!$oDB->isColumnExists("editor_autosave","module_srl"))
|
||||
$oDB->addColumn("editor_autosave","module_srl","number",11);
|
||||
// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
|
||||
if(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'editor', 'controller', 'triggerCopyModule', 'after'))
|
||||
{
|
||||
$oModuleController->insertTrigger('module.procModuleAdminCopyModule', 'editor', 'controller', 'triggerCopyModule', 'after');
|
||||
}
|
||||
|
||||
// create an index on module_srl
|
||||
if(!$oDB->isIndexExists("editor_autosave","idx_module_srl")) $oDB->addIndex("editor_autosave","idx_module_srl", "module_srl");
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
// 2007. 10. 17 Add a trigger to delete automatically saved document whenever the document(insert or update) is modified
|
||||
if(!$oModuleModel->getTrigger('document.insertDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after'))
|
||||
$oModuleController->insertTrigger('document.insertDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after');
|
||||
if(!$oModuleModel->getTrigger('document.updateDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after'))
|
||||
$oModuleController->insertTrigger('document.updateDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after');
|
||||
// 2007. 10. Add an editor trigger on the module addition setup
|
||||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'editor', 'view', 'triggerDispEditorAdditionSetup', 'before'))
|
||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'editor', 'view', 'triggerDispEditorAdditionSetup', 'before');
|
||||
// 2009. 04. 14 Add a trigger from compiled codes of the editor component
|
||||
if(!$oModuleModel->getTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before'))
|
||||
$oModuleController->insertTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before');
|
||||
// 2009. 06. 19 Remove unused trigger
|
||||
if($oModuleModel->getTrigger('file.getIsPermitted', 'editor', 'controller', 'triggerSrlSetting', 'before'))
|
||||
$oModuleController->deleteTrigger('file.getIsPermitted', 'editor', 'controller', 'triggerSrlSetting', 'before');
|
||||
|
||||
// 2012. 08. 29 Add a trigger to copy additional setting when the module is copied
|
||||
if(!$oModuleModel->getTrigger('module.procModuleAdminCopyModule', 'editor', 'controller', 'triggerCopyModule', 'after'))
|
||||
{
|
||||
$oModuleController->insertTrigger('module.procModuleAdminCopyModule', 'editor', 'controller', 'triggerCopyModule', 'after');
|
||||
}
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Re-generate the cache file
|
||||
**/
|
||||
function recompileCache() {
|
||||
}
|
||||
}
|
||||
?>
|
||||
/**
|
||||
* @brief Re-generate the cache file
|
||||
*/
|
||||
function recompileCache()
|
||||
{
|
||||
}
|
||||
}
|
||||
/* End of file editor.class.php */
|
||||
/* Location: ./modules/editor/editor.class.php */
|
||||
|
|
|
|||
|
|
@ -1,445 +1,489 @@
|
|||
<?php
|
||||
/**
|
||||
* @class editor
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief editor module's controller class
|
||||
**/
|
||||
/**
|
||||
* @class editor
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief editor module's controller class
|
||||
*/
|
||||
class editorController extends editor
|
||||
{
|
||||
/**
|
||||
* @brief Initialization
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
}
|
||||
|
||||
class editorController extends editor {
|
||||
/**
|
||||
* @brief AutoSave
|
||||
*/
|
||||
function procEditorSaveDoc()
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief Initialization
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
$this->deleteSavedDoc(false);
|
||||
|
||||
/**
|
||||
* @brief AutoSave
|
||||
**/
|
||||
function procEditorSaveDoc() {
|
||||
$args->document_srl = Context::get('document_srl');
|
||||
$args->content = Context::get('content');
|
||||
$args->title = Context::get('title');
|
||||
$output = $this->doSaveDoc($args);
|
||||
|
||||
$this->deleteSavedDoc(false);
|
||||
$this->setMessage('msg_auto_saved');
|
||||
}
|
||||
|
||||
$args->document_srl = Context::get('document_srl');
|
||||
$args->content = Context::get('content');
|
||||
$args->title = Context::get('title');
|
||||
$output = $this->doSaveDoc($args);
|
||||
/**
|
||||
* @brief Delete autosaved documents
|
||||
*/
|
||||
function procEditorRemoveSavedDoc()
|
||||
{
|
||||
$oEditorController = &getController('editor');
|
||||
$oEditorController->deleteSavedDoc(true);
|
||||
}
|
||||
|
||||
$this->setMessage('msg_auto_saved');
|
||||
}
|
||||
/**
|
||||
* @brief Execute a method of the component when the component requests ajax
|
||||
*/
|
||||
function procEditorCall()
|
||||
{
|
||||
$component = Context::get('component');
|
||||
$method = Context::get('method');
|
||||
if(!$component) return new Object(-1, sprintf(Context::getLang('msg_component_is_not_founded'), $component));
|
||||
|
||||
/**
|
||||
* @brief Delete autosaved documents
|
||||
**/
|
||||
function procEditorRemoveSavedDoc() {
|
||||
$oEditorController = &getController('editor');
|
||||
$oEditorController->deleteSavedDoc(true);
|
||||
}
|
||||
$oEditorModel = &getModel('editor');
|
||||
$oComponent = &$oEditorModel->getComponentObject($component);
|
||||
if(!$oComponent->toBool()) return $oComponent;
|
||||
|
||||
/**
|
||||
* @brief Execute a method of the component when the component requests ajax
|
||||
**/
|
||||
function procEditorCall() {
|
||||
$component = Context::get('component');
|
||||
$method = Context::get('method');
|
||||
if(!$component) return new Object(-1, sprintf(Context::getLang('msg_component_is_not_founded'), $component));
|
||||
if(!method_exists($oComponent, $method)) return new Object(-1, sprintf(Context::getLang('msg_component_is_not_founded'), $component));
|
||||
|
||||
$oEditorModel = &getModel('editor');
|
||||
$oComponent = &$oEditorModel->getComponentObject($component);
|
||||
if(!$oComponent->toBool()) return $oComponent;
|
||||
//$output = call_user_method($method, $oComponent);
|
||||
//$output = call_user_func(array($oComponent, $method));
|
||||
if(method_exists($oComponent, $method)) $output = $oComponent->{$method}();
|
||||
else return new Object(-1,sprintf('%s method is not exists', $method));
|
||||
|
||||
if(!method_exists($oComponent, $method)) return new Object(-1, sprintf(Context::getLang('msg_component_is_not_founded'), $component));
|
||||
if((is_a($output, 'Object') || is_subclass_of($output, 'Object')) && !$output->toBool()) return $output;
|
||||
|
||||
//$output = call_user_method($method, $oComponent);
|
||||
//$output = call_user_func(array($oComponent, $method));
|
||||
if(method_exists($oComponent, $method)) $output = $oComponent->{$method}();
|
||||
else return new Object(-1,sprintf('%s method is not exists', $method));
|
||||
$this->setError($oComponent->getError());
|
||||
$this->setMessage($oComponent->getMessage());
|
||||
|
||||
if((is_a($output, 'Object') || is_subclass_of($output, 'Object')) && !$output->toBool()) return $output;
|
||||
|
||||
$this->setError($oComponent->getError());
|
||||
$this->setMessage($oComponent->getMessage());
|
||||
|
||||
$vars = $oComponent->getVariables();
|
||||
if(count($vars)) {
|
||||
foreach($vars as $key=>$val) $this->add($key, $val);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Save Editor's additional form for each module
|
||||
**/
|
||||
function procEditorInsertModuleConfig() {
|
||||
$module_srl = Context::get('target_module_srl');
|
||||
// To configure many of modules at once
|
||||
if(preg_match('/^([0-9,]+)$/',$module_srl)) $module_srl = explode(',',$module_srl);
|
||||
else $module_srl = array($module_srl);
|
||||
|
||||
$editor_config = null;
|
||||
|
||||
$editor_config->editor_skin = Context::get('editor_skin');
|
||||
$editor_config->comment_editor_skin = Context::get('comment_editor_skin');
|
||||
$editor_config->content_style = Context::get('content_style');
|
||||
$editor_config->comment_content_style = Context::get('comment_content_style');
|
||||
$editor_config->content_font = Context::get('content_font');
|
||||
if($editor_config->content_font) {
|
||||
$font_list = array();
|
||||
$fonts = explode(',',$editor_config->content_font);
|
||||
for($i=0,$c=count($fonts);$i<$c;$i++) {
|
||||
$font = trim(str_replace(array('"','\''),'',$fonts[$i]));
|
||||
if(!$font) continue;
|
||||
$font_list[] = $font;
|
||||
}
|
||||
if(count($font_list)) $editor_config->content_font = '"'.implode('","',$font_list).'"';
|
||||
}
|
||||
$editor_config->content_font_size = Context::get('content_font_size');
|
||||
$editor_config->sel_editor_colorset = Context::get('sel_editor_colorset');
|
||||
$editor_config->sel_comment_editor_colorset = Context::get('sel_comment_editor_colorset');
|
||||
|
||||
$grants = array('enable_html_grant','enable_comment_html_grant','upload_file_grant','comment_upload_file_grant','enable_default_component_grant','enable_comment_default_component_grant','enable_component_grant','enable_comment_component_grant');
|
||||
|
||||
foreach($grants as $key)
|
||||
{
|
||||
$grant = Context::get($key);
|
||||
if(!$grant)
|
||||
{
|
||||
$editor_config->{$key} = array();
|
||||
}
|
||||
else if(is_array($grant))
|
||||
{
|
||||
$editor_config->{$key} = $grant;
|
||||
}
|
||||
else
|
||||
{
|
||||
$editor_config->{$key} = explode('|@|', $grant);
|
||||
}
|
||||
}
|
||||
|
||||
$editor_config->editor_height = (int)Context::get('editor_height');
|
||||
|
||||
$editor_config->comment_editor_height = (int)Context::get('comment_editor_height');
|
||||
|
||||
$editor_config->enable_autosave = Context::get('enable_autosave');
|
||||
|
||||
if($editor_config->enable_autosave != 'Y') $editor_config->enable_autosave = 'N';
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
for($i=0;$i<count($module_srl);$i++) {
|
||||
$srl = trim($module_srl[$i]);
|
||||
if(!$srl) continue;
|
||||
$oModuleController->insertModulePartConfig('editor',$srl,$editor_config);
|
||||
}
|
||||
|
||||
$this->setError(-1);
|
||||
$this->setMessage('success_updated', 'info');
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispBoardAdminContent');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief convert editor component codes to be returned and specify content style.
|
||||
**/
|
||||
function triggerEditorComponentCompile(&$content) {
|
||||
if(Context::getResponseMethod()!='HTML') return new Object();
|
||||
|
||||
$module_info = Context::get('module_info');
|
||||
$module_srl = $module_info->module_srl;
|
||||
if($module_srl) {
|
||||
$oEditorModel = &getModel('editor');
|
||||
$editor_config = $oEditorModel->getEditorConfig($module_srl);
|
||||
$content_style = $editor_config->content_style;
|
||||
if($content_style) {
|
||||
$path = _XE_PATH_.'modules/editor/styles/'.$content_style.'/';
|
||||
if(is_dir($path) && file_exists($path.'style.ini')) {
|
||||
$ini = file($path.'style.ini');
|
||||
for($i=0,$c=count($ini);$i<$c;$i++) {
|
||||
$file = trim($ini[$i]);
|
||||
if(!$file) continue;
|
||||
if(preg_match('/\.css$/i',$file)) Context::addCSSFile('./modules/editor/styles/'.$content_style.'/'.$file, false);
|
||||
elseif(preg_match('/\.js/i',$file)) Context::addJsFile('./modules/editor/styles/'.$content_style.'/'.$file, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
$content_font = $editor_config->content_font;
|
||||
$content_font_size = $editor_config->content_font_size;
|
||||
if($content_font || $content_font_size) {
|
||||
$buff = '<style type="text/css"> .xe_content { ';
|
||||
if($content_font) $buff .= 'font-family:'.$content_font.';';
|
||||
if($content_font_size) $buff .= 'font-size:'.$content_font_size.';';
|
||||
$buff .= ' }</style>';
|
||||
Context::addHtmlHeader($buff);
|
||||
}
|
||||
}
|
||||
|
||||
$content = $this->transComponent($content);
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Convert editor component codes to be returned
|
||||
**/
|
||||
function transComponent($content) {
|
||||
$content = preg_replace_callback('!<(?:(div)|img)([^>]*)editor_component=([^>]*)>(?(1)(.*?)</div>)!is', array($this,'transEditorComponent'), $content);
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Convert editor component code of the contents
|
||||
**/
|
||||
function transEditorComponent($match) {
|
||||
$script = " {$match[2]} editor_component={$match[3]}";
|
||||
$script = preg_replace('/([\w:-]+)\s*=(?:\s*(["\']))?((?(2).*?|[^ ]+))\2/i', '\1="\3"', $script);
|
||||
preg_match_all('/([a-z0-9_-]+)="([^"]+)"/is', $script, $m);
|
||||
|
||||
$xml_obj = new stdClass;
|
||||
for($i=0,$c=count($m[0]);$i<$c;$i++) {
|
||||
$xml_obj->attrs->{$m[1][$i]} = $m[2][$i];
|
||||
}
|
||||
$xml_obj->body = $match[4];
|
||||
|
||||
if(!$xml_obj->attrs->editor_component) return $match[0];
|
||||
// Get converted codes by using component::transHTML()
|
||||
$oEditorModel = &getModel('editor');
|
||||
$oComponent = &$oEditorModel->getComponentObject($xml_obj->attrs->editor_component, 0);
|
||||
if(!is_object($oComponent)||!method_exists($oComponent, 'transHTML')) return $match[0];
|
||||
|
||||
return $oComponent->transHTML($xml_obj);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief AutoSave
|
||||
**/
|
||||
function doSaveDoc($args) {
|
||||
|
||||
if(!$args->document_srl) $args->document_srl = $_SESSION['upload_info'][$editor_sequence]->upload_target_srl;
|
||||
if(Context::get('is_logged')) {
|
||||
$logged_info = Context::get('logged_info');
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
} else {
|
||||
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
// Get the current module if module_srl doesn't exist
|
||||
if(!$args->module_srl) {
|
||||
$args->module_srl = Context::get('module_srl');
|
||||
}
|
||||
if(!$args->module_srl) {
|
||||
$current_module_info = Context::get('current_module_info');
|
||||
$args->module_srl = $current_module_info->module_srl;
|
||||
}
|
||||
// Save
|
||||
return executeQuery('editor.insertSavedDoc', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Load the srl of autosaved document - for those who uses XE older versions.
|
||||
**/
|
||||
function procEditorLoadSavedDocument() {
|
||||
$editor_sequence = Context::get('editor_sequence');
|
||||
$primary_key = Context::get('primary_key');
|
||||
$oEditorModel = &getModel('editor');
|
||||
$oFileController = &getController('file');
|
||||
|
||||
$saved_doc = $oEditorModel->getSavedDoc(null);
|
||||
|
||||
$oFileController->setUploadInfo($editor_sequence, $saved_doc->document_srl);
|
||||
$vars = $this->getVariables();
|
||||
$this->add("editor_sequence", $editor_sequence);
|
||||
$this->add("key", $primary_key);
|
||||
$this->add("title", $saved_doc->title);
|
||||
$this->add("content", $saved_doc->content);
|
||||
$this->add("document_srl", $saved_doc->document_srl);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief A trigger to remove auto-saved document when inserting/updating the document
|
||||
**/
|
||||
function triggerDeleteSavedDoc(&$obj) {
|
||||
$this->deleteSavedDoc(false);
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Delete the auto-saved document
|
||||
* Based on the current logged-in user
|
||||
**/
|
||||
function deleteSavedDoc($mode = false) {
|
||||
if(Context::get('is_logged')) {
|
||||
$logged_info = Context::get('logged_info');
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
} else {
|
||||
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
$args->module_srl = Context::get('module_srl');
|
||||
// Get the current module if module_srl doesn't exist
|
||||
if(!$args->module_srl) {
|
||||
$current_module_info = Context::get('current_module_info');
|
||||
$args->module_srl = $current_module_info->module_srl;
|
||||
}
|
||||
// Check if the auto-saved document already exists
|
||||
$output = executeQuery('editor.getSavedDocument', $args);
|
||||
$saved_doc = $output->data;
|
||||
if(!$saved_doc) return;
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oSaved = $oDocumentModel->getDocument($saved_doc->document_srl);
|
||||
if(!$oSaved->isExists()) {
|
||||
if($mode) {
|
||||
$output = executeQuery('editor.getSavedDocument', $args);
|
||||
$output = ModuleHandler::triggerCall('editor.deleteSavedDoc', 'after', $saved_doc);
|
||||
}
|
||||
}
|
||||
// Delete the saved document
|
||||
return executeQuery('editor.deleteSavedDoc', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ERemove editor component information used on the virtual site
|
||||
**/
|
||||
function removeEditorConfig($site_srl) {
|
||||
$args->site_srl = $site_srl;
|
||||
executeQuery('editor.deleteSiteComponent', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Caching a list of editor component (editorModel::getComponentList)
|
||||
* For the editor component list, use a caching file because of DB query and Xml parsing
|
||||
**/
|
||||
function makeCache($filter_enabled = true, $site_srl) {
|
||||
$oEditorModel = &getModel('editor');
|
||||
|
||||
if($filter_enabled) $args->enabled = "Y";
|
||||
|
||||
if($site_srl) {
|
||||
$args->site_srl = $site_srl;
|
||||
$output = executeQuery('editor.getSiteComponentList', $args);
|
||||
} else $output = executeQuery('editor.getComponentList', $args);
|
||||
$db_list = $output->data;
|
||||
// Get a list of files
|
||||
$downloaded_list = FileHandler::readDir(_XE_PATH_.'modules/editor/components');
|
||||
// Get information about log-in status and its group
|
||||
$is_logged = Context::get('is_logged');
|
||||
if($is_logged) {
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($logged_info->group_list && is_array($logged_info->group_list)) {
|
||||
$group_list = array_keys($logged_info->group_list);
|
||||
} else $group_list = array();
|
||||
}
|
||||
// Get xml information for looping DB list
|
||||
if(!is_array($db_list)) $db_list = array($db_list);
|
||||
foreach($db_list as $component) {
|
||||
if(in_array($component->component_name, array('colorpicker_text','colorpicker_bg'))) continue;
|
||||
|
||||
$component_name = $component->component_name;
|
||||
if(!$component_name) continue;
|
||||
|
||||
if(!in_array($component_name, $downloaded_list)) continue;
|
||||
|
||||
unset($xml_info);
|
||||
$xml_info = $oEditorModel->getComponentXmlInfo($component_name);
|
||||
$xml_info->enabled = $component->enabled;
|
||||
|
||||
if($component->extra_vars) {
|
||||
$extra_vars = unserialize($component->extra_vars);
|
||||
if($extra_vars->target_group) {
|
||||
$xml_info->target_group = $extra_vars->target_group;
|
||||
}
|
||||
|
||||
if($extra_vars->mid_list && count($extra_vars->mid_list))
|
||||
{
|
||||
$xml_info->mid_list = $extra_vars->mid_list;
|
||||
}
|
||||
/*
|
||||
// Permisshin check if you are granted
|
||||
if($extra_vars->target_group) {
|
||||
// Stop using if not logged-in
|
||||
if(!$is_logged) continue;
|
||||
// Compare a target group with the current logged-in user group
|
||||
$target_group = $extra_vars->target_group;
|
||||
unset($extra_vars->target_group);
|
||||
|
||||
$is_granted = false;
|
||||
foreach($group_list as $group_srl) {
|
||||
if(in_array($group_srl, $target_group)) {
|
||||
$is_granted = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!$is_granted) continue;
|
||||
}
|
||||
// Check if the target module exists
|
||||
if($extra_vars->mid_list && count($extra_vars->mid_list) && Context::get('mid')) {
|
||||
if(!in_array(Context::get('mid'), $extra_vars->mid_list)) continue;
|
||||
}*/
|
||||
// Check the configuration of the editor component
|
||||
if($xml_info->extra_vars) {
|
||||
foreach($xml_info->extra_vars as $key => $val) {
|
||||
$xml_info->extra_vars->{$key}->value = $extra_vars->{$key};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$component_list->{$component_name} = $xml_info;
|
||||
// Get buttons, icons, images
|
||||
$icon_file = _XE_PATH_.'modules/editor/components/'.$component_name.'/icon.gif';
|
||||
$component_icon_file = _XE_PATH_.'modules/editor/components/'.$component_name.'/component_icon.gif';
|
||||
if(file_exists($icon_file)) $component_list->{$component_name}->icon = true;
|
||||
if(file_exists($component_icon_file)) $component_list->{$component_name}->component_icon = true;
|
||||
}
|
||||
// Return if it checks enabled only
|
||||
if($filter_enabled) {
|
||||
$cache_file = $oEditorModel->getCacheFile($filter_enabled, $site_srl);
|
||||
$buff = sprintf('<?php if(!defined("__ZBXE__")) exit(); $component_list = unserialize("%s"); ?>', str_replace('"','\\"',serialize($component_list)));
|
||||
FileHandler::writeFile($cache_file, $buff);
|
||||
return $component_list;
|
||||
}
|
||||
// Get xml_info of downloaded list
|
||||
foreach($downloaded_list as $component_name) {
|
||||
if(in_array($component_name, array('colorpicker_text','colorpicker_bg'))) continue;
|
||||
// Pass if configured
|
||||
if($component_list->{$component_name}) continue;
|
||||
// Insert data into the DB
|
||||
$oEditorController = &getAdminController('editor');
|
||||
$oEditorController->insertComponent($component_name, false, $site_srl);
|
||||
// Add to component_list
|
||||
unset($xml_info);
|
||||
$xml_info = $oEditorModel->getComponentXmlInfo($component_name);
|
||||
$xml_info->enabled = 'N';
|
||||
|
||||
$component_list->{$component_name} = $xml_info;
|
||||
}
|
||||
|
||||
$cache_file = $oEditorModel->getCacheFile($filter_enabled, $site_srl);
|
||||
$buff = sprintf('<?php if(!defined("__ZBXE__")) exit(); $component_list = unserialize("%s"); ?>', str_replace('"','\\"',serialize($component_list)));
|
||||
FileHandler::writeFile($cache_file, $buff);
|
||||
|
||||
return $component_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Delete cache files
|
||||
**/
|
||||
function removeCache($site_srl = 0) {
|
||||
$oEditorModel = &getModel('editor');
|
||||
FileHandler::removeFile($oEditorModel->getCacheFile(true, $site_srl));
|
||||
FileHandler::removeFile($oEditorModel->getCacheFile(false, $site_srl));
|
||||
}
|
||||
|
||||
function triggerCopyModule(&$obj)
|
||||
$vars = $oComponent->getVariables();
|
||||
if(count($vars))
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$editorConfig = $oModuleModel->getModulePartConfig('editor', $obj->originModuleSrl);
|
||||
foreach($vars as $key=>$val) $this->add($key, $val);
|
||||
}
|
||||
}
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
if(is_array($obj->moduleSrlList))
|
||||
/**
|
||||
* @brief Save Editor's additional form for each module
|
||||
*/
|
||||
function procEditorInsertModuleConfig()
|
||||
{
|
||||
$module_srl = Context::get('target_module_srl');
|
||||
// To configure many of modules at once
|
||||
if(preg_match('/^([0-9,]+)$/',$module_srl)) $module_srl = explode(',',$module_srl);
|
||||
else $module_srl = array($module_srl);
|
||||
|
||||
$editor_config = null;
|
||||
|
||||
$editor_config->editor_skin = Context::get('editor_skin');
|
||||
$editor_config->comment_editor_skin = Context::get('comment_editor_skin');
|
||||
$editor_config->content_style = Context::get('content_style');
|
||||
$editor_config->comment_content_style = Context::get('comment_content_style');
|
||||
$editor_config->content_font = Context::get('content_font');
|
||||
if($editor_config->content_font)
|
||||
{
|
||||
$font_list = array();
|
||||
$fonts = explode(',',$editor_config->content_font);
|
||||
for($i=0,$c=count($fonts);$i<$c;$i++)
|
||||
{
|
||||
foreach($obj->moduleSrlList AS $key=>$moduleSrl)
|
||||
{
|
||||
$oModuleController->insertModulePartConfig('editor', $moduleSrl, $editorConfig);
|
||||
}
|
||||
$font = trim(str_replace(array('"','\''),'',$fonts[$i]));
|
||||
if(!$font) continue;
|
||||
$font_list[] = $font;
|
||||
}
|
||||
if(count($font_list)) $editor_config->content_font = '"'.implode('","',$font_list).'"';
|
||||
}
|
||||
$editor_config->content_font_size = Context::get('content_font_size');
|
||||
$editor_config->sel_editor_colorset = Context::get('sel_editor_colorset');
|
||||
$editor_config->sel_comment_editor_colorset = Context::get('sel_comment_editor_colorset');
|
||||
|
||||
$grants = array('enable_html_grant','enable_comment_html_grant','upload_file_grant','comment_upload_file_grant','enable_default_component_grant','enable_comment_default_component_grant','enable_component_grant','enable_comment_component_grant');
|
||||
|
||||
foreach($grants as $key)
|
||||
{
|
||||
$grant = Context::get($key);
|
||||
if(!$grant)
|
||||
{
|
||||
$editor_config->{$key} = array();
|
||||
}
|
||||
else if(is_array($grant))
|
||||
{
|
||||
$editor_config->{$key} = $grant;
|
||||
}
|
||||
else
|
||||
{
|
||||
$editor_config->{$key} = explode('|@|', $grant);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
$editor_config->editor_height = (int)Context::get('editor_height');
|
||||
$editor_config->comment_editor_height = (int)Context::get('comment_editor_height');
|
||||
$editor_config->enable_autosave = Context::get('enable_autosave');
|
||||
if($editor_config->enable_autosave != 'Y') $editor_config->enable_autosave = 'N';
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
for($i=0;$i<count($module_srl);$i++)
|
||||
{
|
||||
$srl = trim($module_srl[$i]);
|
||||
if(!$srl) continue;
|
||||
$oModuleController->insertModulePartConfig('editor',$srl,$editor_config);
|
||||
}
|
||||
|
||||
$this->setError(-1);
|
||||
$this->setMessage('success_updated', 'info');
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispBoardAdminContent');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief convert editor component codes to be returned and specify content style.
|
||||
*/
|
||||
function triggerEditorComponentCompile(&$content)
|
||||
{
|
||||
if(Context::getResponseMethod()!='HTML') return new Object();
|
||||
|
||||
$module_info = Context::get('module_info');
|
||||
$module_srl = $module_info->module_srl;
|
||||
if($module_srl)
|
||||
{
|
||||
$oEditorModel = &getModel('editor');
|
||||
$editor_config = $oEditorModel->getEditorConfig($module_srl);
|
||||
$content_style = $editor_config->content_style;
|
||||
if($content_style)
|
||||
{
|
||||
$path = _XE_PATH_.'modules/editor/styles/'.$content_style.'/';
|
||||
if(is_dir($path) && file_exists($path.'style.ini'))
|
||||
{
|
||||
$ini = file($path.'style.ini');
|
||||
for($i=0,$c=count($ini);$i<$c;$i++)
|
||||
{
|
||||
$file = trim($ini[$i]);
|
||||
if(!$file) continue;
|
||||
if(preg_match('/\.css$/i',$file)) Context::addCSSFile('./modules/editor/styles/'.$content_style.'/'.$file, false);
|
||||
elseif(preg_match('/\.js/i',$file)) Context::addJsFile('./modules/editor/styles/'.$content_style.'/'.$file, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
$content_font = $editor_config->content_font;
|
||||
$content_font_size = $editor_config->content_font_size;
|
||||
if($content_font || $content_font_size)
|
||||
{
|
||||
$buff = '<style> .xe_content { ';
|
||||
if($content_font) $buff .= 'font-family:'.$content_font.';';
|
||||
if($content_font_size) $buff .= 'font-size:'.$content_font_size.';';
|
||||
$buff .= ' }</style>';
|
||||
Context::addHtmlHeader($buff);
|
||||
}
|
||||
}
|
||||
|
||||
$content = $this->transComponent($content);
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Convert editor component codes to be returned
|
||||
*/
|
||||
function transComponent($content)
|
||||
{
|
||||
$content = preg_replace_callback('!<(?:(div)|img)([^>]*)editor_component=([^>]*)>(?(1)(.*?)</div>)!is', array($this,'transEditorComponent'), $content);
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Convert editor component code of the contents
|
||||
*/
|
||||
function transEditorComponent($match)
|
||||
{
|
||||
$script = " {$match[2]} editor_component={$match[3]}";
|
||||
$script = preg_replace('/([\w:-]+)\s*=(?:\s*(["\']))?((?(2).*?|[^ ]+))\2/i', '\1="\3"', $script);
|
||||
preg_match_all('/([a-z0-9_-]+)="([^"]+)"/is', $script, $m);
|
||||
|
||||
$xml_obj = new stdClass;
|
||||
for($i=0,$c=count($m[0]);$i<$c;$i++)
|
||||
{
|
||||
$xml_obj->attrs->{$m[1][$i]} = $m[2][$i];
|
||||
}
|
||||
$xml_obj->body = $match[4];
|
||||
|
||||
if(!$xml_obj->attrs->editor_component) return $match[0];
|
||||
// Get converted codes by using component::transHTML()
|
||||
$oEditorModel = &getModel('editor');
|
||||
$oComponent = &$oEditorModel->getComponentObject($xml_obj->attrs->editor_component, 0);
|
||||
if(!is_object($oComponent)||!method_exists($oComponent, 'transHTML')) return $match[0];
|
||||
|
||||
return $oComponent->transHTML($xml_obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief AutoSave
|
||||
*/
|
||||
function doSaveDoc($args)
|
||||
{
|
||||
if(!$args->document_srl) $args->document_srl = $_SESSION['upload_info'][$editor_sequence]->upload_target_srl;
|
||||
if(Context::get('is_logged'))
|
||||
{
|
||||
$logged_info = Context::get('logged_info');
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
}
|
||||
else
|
||||
{
|
||||
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
// Get the current module if module_srl doesn't exist
|
||||
if(!$args->module_srl)
|
||||
{
|
||||
$args->module_srl = Context::get('module_srl');
|
||||
}
|
||||
if(!$args->module_srl)
|
||||
{
|
||||
$current_module_info = Context::get('current_module_info');
|
||||
$args->module_srl = $current_module_info->module_srl;
|
||||
}
|
||||
// Save
|
||||
return executeQuery('editor.insertSavedDoc', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Load the srl of autosaved document - for those who uses XE older versions.
|
||||
*/
|
||||
function procEditorLoadSavedDocument()
|
||||
{
|
||||
$editor_sequence = Context::get('editor_sequence');
|
||||
$primary_key = Context::get('primary_key');
|
||||
$oEditorModel = &getModel('editor');
|
||||
$oFileController = &getController('file');
|
||||
|
||||
$saved_doc = $oEditorModel->getSavedDoc(null);
|
||||
|
||||
$oFileController->setUploadInfo($editor_sequence, $saved_doc->document_srl);
|
||||
$vars = $this->getVariables();
|
||||
$this->add("editor_sequence", $editor_sequence);
|
||||
$this->add("key", $primary_key);
|
||||
$this->add("title", $saved_doc->title);
|
||||
$this->add("content", $saved_doc->content);
|
||||
$this->add("document_srl", $saved_doc->document_srl);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief A trigger to remove auto-saved document when inserting/updating the document
|
||||
*/
|
||||
function triggerDeleteSavedDoc(&$obj)
|
||||
{
|
||||
$this->deleteSavedDoc(false);
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Delete the auto-saved document
|
||||
* Based on the current logged-in user
|
||||
*/
|
||||
function deleteSavedDoc($mode = false)
|
||||
{
|
||||
$args = new stdClass();
|
||||
if(Context::get('is_logged'))
|
||||
{
|
||||
$logged_info = Context::get('logged_info');
|
||||
$args->member_srl = $logged_info->member_srl;
|
||||
}
|
||||
else
|
||||
{
|
||||
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
$args->module_srl = Context::get('module_srl');
|
||||
// Get the current module if module_srl doesn't exist
|
||||
if(!$args->module_srl)
|
||||
{
|
||||
$current_module_info = Context::get('current_module_info');
|
||||
$args->module_srl = $current_module_info->module_srl;
|
||||
}
|
||||
// Check if the auto-saved document already exists
|
||||
$output = executeQuery('editor.getSavedDocument', $args);
|
||||
$saved_doc = $output->data;
|
||||
if(!$saved_doc) return;
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oSaved = $oDocumentModel->getDocument($saved_doc->document_srl);
|
||||
if(!$oSaved->isExists())
|
||||
{
|
||||
if($mode)
|
||||
{
|
||||
$output = executeQuery('editor.getSavedDocument', $args);
|
||||
$output = ModuleHandler::triggerCall('editor.deleteSavedDoc', 'after', $saved_doc);
|
||||
}
|
||||
}
|
||||
// Delete the saved document
|
||||
return executeQuery('editor.deleteSavedDoc', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ERemove editor component information used on the virtual site
|
||||
*/
|
||||
function removeEditorConfig($site_srl)
|
||||
{
|
||||
$args->site_srl = $site_srl;
|
||||
executeQuery('editor.deleteSiteComponent', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Caching a list of editor component (editorModel::getComponentList)
|
||||
* For the editor component list, use a caching file because of DB query and Xml parsing
|
||||
*/
|
||||
function makeCache($filter_enabled = true, $site_srl)
|
||||
{
|
||||
$oEditorModel = &getModel('editor');
|
||||
|
||||
if($filter_enabled) $args->enabled = "Y";
|
||||
|
||||
if($site_srl)
|
||||
{
|
||||
$args->site_srl = $site_srl;
|
||||
$output = executeQuery('editor.getSiteComponentList', $args);
|
||||
}
|
||||
else $output = executeQuery('editor.getComponentList', $args);
|
||||
$db_list = $output->data;
|
||||
// Get a list of files
|
||||
$downloaded_list = FileHandler::readDir(_XE_PATH_.'modules/editor/components');
|
||||
// Get information about log-in status and its group
|
||||
$is_logged = Context::get('is_logged');
|
||||
if($is_logged)
|
||||
{
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($logged_info->group_list && is_array($logged_info->group_list))
|
||||
{
|
||||
$group_list = array_keys($logged_info->group_list);
|
||||
}
|
||||
else $group_list = array();
|
||||
}
|
||||
// Get xml information for looping DB list
|
||||
if(!is_array($db_list)) $db_list = array($db_list);
|
||||
$component_list = new stdClass();
|
||||
foreach($db_list as $component)
|
||||
{
|
||||
if(in_array($component->component_name, array('colorpicker_text','colorpicker_bg'))) continue;
|
||||
|
||||
$component_name = $component->component_name;
|
||||
if(!$component_name) continue;
|
||||
|
||||
if(!in_array($component_name, $downloaded_list)) continue;
|
||||
|
||||
unset($xml_info);
|
||||
$xml_info = $oEditorModel->getComponentXmlInfo($component_name);
|
||||
$xml_info->enabled = $component->enabled;
|
||||
|
||||
if($component->extra_vars)
|
||||
{
|
||||
$extra_vars = unserialize($component->extra_vars);
|
||||
if($extra_vars->target_group)
|
||||
{
|
||||
$xml_info->target_group = $extra_vars->target_group;
|
||||
}
|
||||
|
||||
if($extra_vars->mid_list && count($extra_vars->mid_list))
|
||||
{
|
||||
$xml_info->mid_list = $extra_vars->mid_list;
|
||||
}
|
||||
/*
|
||||
// Permisshin check if you are granted
|
||||
if($extra_vars->target_group) {
|
||||
// Stop using if not logged-in
|
||||
if(!$is_logged) continue;
|
||||
// Compare a target group with the current logged-in user group
|
||||
$target_group = $extra_vars->target_group;
|
||||
unset($extra_vars->target_group);
|
||||
|
||||
$is_granted = false;
|
||||
foreach($group_list as $group_srl) {
|
||||
if(in_array($group_srl, $target_group)) {
|
||||
$is_granted = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!$is_granted) continue;
|
||||
}
|
||||
// Check if the target module exists
|
||||
if($extra_vars->mid_list && count($extra_vars->mid_list) && Context::get('mid')) {
|
||||
if(!in_array(Context::get('mid'), $extra_vars->mid_list)) continue;
|
||||
}*/
|
||||
// Check the configuration of the editor component
|
||||
if($xml_info->extra_vars)
|
||||
{
|
||||
foreach($xml_info->extra_vars as $key => $val)
|
||||
{
|
||||
$xml_info->extra_vars->{$key}->value = $extra_vars->{$key};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$component_list->{$component_name} = $xml_info;
|
||||
// Get buttons, icons, images
|
||||
$icon_file = _XE_PATH_.'modules/editor/components/'.$component_name.'/icon.gif';
|
||||
$component_icon_file = _XE_PATH_.'modules/editor/components/'.$component_name.'/component_icon.gif';
|
||||
if(file_exists($icon_file)) $component_list->{$component_name}->icon = true;
|
||||
if(file_exists($component_icon_file)) $component_list->{$component_name}->component_icon = true;
|
||||
}
|
||||
// Return if it checks enabled only
|
||||
if($filter_enabled)
|
||||
{
|
||||
$cache_file = $oEditorModel->getCacheFile($filter_enabled, $site_srl);
|
||||
$buff = sprintf('<?php if(!defined("__XE__")) exit(); $component_list = unserialize("%s"); ?>', str_replace('"','\\"',serialize($component_list)));
|
||||
FileHandler::writeFile($cache_file, $buff);
|
||||
return $component_list;
|
||||
}
|
||||
// Get xml_info of downloaded list
|
||||
foreach($downloaded_list as $component_name)
|
||||
{
|
||||
if(in_array($component_name, array('colorpicker_text','colorpicker_bg'))) continue;
|
||||
// Pass if configured
|
||||
if($component_list->{$component_name}) continue;
|
||||
// Insert data into the DB
|
||||
$oEditorController = &getAdminController('editor');
|
||||
$oEditorController->insertComponent($component_name, false, $site_srl);
|
||||
// Add to component_list
|
||||
unset($xml_info);
|
||||
$xml_info = $oEditorModel->getComponentXmlInfo($component_name);
|
||||
$xml_info->enabled = 'N';
|
||||
|
||||
$component_list->{$component_name} = $xml_info;
|
||||
}
|
||||
|
||||
$cache_file = $oEditorModel->getCacheFile($filter_enabled, $site_srl);
|
||||
$buff = sprintf('<?php if(!defined("__XE__")) exit(); $component_list = unserialize("%s"); ?>', str_replace('"','\\"',serialize($component_list)));
|
||||
FileHandler::writeFile($cache_file, $buff);
|
||||
|
||||
return $component_list;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Delete cache files
|
||||
*/
|
||||
function removeCache($site_srl = 0)
|
||||
{
|
||||
$oEditorModel = &getModel('editor');
|
||||
FileHandler::removeFile($oEditorModel->getCacheFile(true, $site_srl));
|
||||
FileHandler::removeFile($oEditorModel->getCacheFile(false, $site_srl));
|
||||
}
|
||||
|
||||
function triggerCopyModule(&$obj)
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$editorConfig = $oModuleModel->getModulePartConfig('editor', $obj->originModuleSrl);
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
if(is_array($obj->moduleSrlList))
|
||||
{
|
||||
foreach($obj->moduleSrlList AS $key=>$moduleSrl)
|
||||
{
|
||||
$oModuleController->insertModulePartConfig('editor', $moduleSrl, $editorConfig);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* End of file editor.controller.php */
|
||||
/* Location: ./modules/editor/editor.controller.php */
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,142 +1,179 @@
|
|||
<?php
|
||||
/**
|
||||
* @class editorView
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief view class of the editor module
|
||||
**/
|
||||
/**
|
||||
* @class editorView
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief view class of the editor module
|
||||
*/
|
||||
class editorView extends editor
|
||||
{
|
||||
/**
|
||||
* @brief Initialization
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
}
|
||||
|
||||
class editorView extends editor {
|
||||
/**
|
||||
* @brief Action to get a request to display compoenet pop-up
|
||||
*/
|
||||
function dispEditorPopup()
|
||||
{
|
||||
// add a css file
|
||||
Context::loadFile($this->module_path."tpl/css/editor.css", true);
|
||||
// List variables
|
||||
$editor_sequence = Context::get('editor_sequence');
|
||||
$component = Context::get('component');
|
||||
|
||||
/**
|
||||
* @brief Initialization
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$site_srl = (int)$site_module_info->site_srl;
|
||||
// Get compoenet object
|
||||
$oEditorModel = &getModel('editor');
|
||||
$oComponent = &$oEditorModel->getComponentObject($component, $editor_sequence, $site_srl);
|
||||
if(!$oComponent->toBool())
|
||||
{
|
||||
Context::set('message', sprintf(Context::getLang('msg_component_is_not_founded'), $component));
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('component_not_founded');
|
||||
}
|
||||
else
|
||||
{
|
||||
// Get the result after executing a method to display popup url of the component
|
||||
$popup_content = $oComponent->getPopupContent();
|
||||
Context::set('popup_content', $popup_content);
|
||||
// Set layout to popup_layout
|
||||
$this->setLayoutFile('popup_layout');
|
||||
// Set a template
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('popup');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Action to get a request to display compoenet pop-up
|
||||
**/
|
||||
function dispEditorPopup() {
|
||||
// add a css file
|
||||
Context::loadFile($this->module_path."tpl/css/editor.css", true);
|
||||
// List variables
|
||||
$editor_sequence = Context::get('editor_sequence');
|
||||
$component = Context::get('component');
|
||||
/**
|
||||
* @brief Get component information
|
||||
*/
|
||||
function dispEditorComponentInfo()
|
||||
{
|
||||
$component_name = Context::get('component_name');
|
||||
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$site_srl = (int)$site_module_info->site_srl;
|
||||
// Get compoenet object
|
||||
$oEditorModel = &getModel('editor');
|
||||
$oComponent = &$oEditorModel->getComponentObject($component, $editor_sequence, $site_srl);
|
||||
if(!$oComponent->toBool()) {
|
||||
Context::set('message', sprintf(Context::getLang('msg_component_is_not_founded'), $component));
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('component_not_founded');
|
||||
} else {
|
||||
// Get the result after executing a method to display popup url of the component
|
||||
$popup_content = $oComponent->getPopupContent();
|
||||
Context::set('popup_content', $popup_content);
|
||||
// Set layout to popup_layout
|
||||
$this->setLayoutFile('popup_layout');
|
||||
// Set a template
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('popup');
|
||||
}
|
||||
}
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$site_srl = (int)$site_module_info->site_srl;
|
||||
|
||||
/**
|
||||
* @brief Get component information
|
||||
**/
|
||||
function dispEditorComponentInfo() {
|
||||
$component_name = Context::get('component_name');
|
||||
$oEditorModel = &getModel('editor');
|
||||
$component = $oEditorModel->getComponent($component_name, $site_srl);
|
||||
Context::set('component', $component);
|
||||
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$site_srl = (int)$site_module_info->site_srl;
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('view_component');
|
||||
$this->setLayoutFile("popup_layout");
|
||||
}
|
||||
|
||||
$oEditorModel = &getModel('editor');
|
||||
$component = $oEditorModel->getComponent($component_name, $site_srl);
|
||||
Context::set('component', $component);
|
||||
/**
|
||||
* @brief Add a form for editor addition setup
|
||||
*/
|
||||
function triggerDispEditorAdditionSetup(&$obj)
|
||||
{
|
||||
$current_module_srl = Context::get('module_srl');
|
||||
$current_module_srls = Context::get('module_srls');
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('view_component');
|
||||
$this->setLayoutFile("popup_layout");
|
||||
}
|
||||
if(!$current_module_srl && !$current_module_srls)
|
||||
{
|
||||
// Get information of the current module
|
||||
$current_module_info = Context::get('current_module_info');
|
||||
$current_module_srl = $current_module_info->module_srl;
|
||||
if(!$current_module_srl) return new Object();
|
||||
}
|
||||
// Get editors settings
|
||||
$oEditorModel = &getModel('editor');
|
||||
$editor_config = $oEditorModel->getEditorConfig($current_module_srl);
|
||||
|
||||
/**
|
||||
* @brief Add a form for editor addition setup
|
||||
**/
|
||||
function triggerDispEditorAdditionSetup(&$obj) {
|
||||
$current_module_srl = Context::get('module_srl');
|
||||
$current_module_srls = Context::get('module_srls');
|
||||
Context::set('editor_config', $editor_config);
|
||||
|
||||
if(!$current_module_srl && !$current_module_srls) {
|
||||
// Get information of the current module
|
||||
$current_module_info = Context::get('current_module_info');
|
||||
$current_module_srl = $current_module_info->module_srl;
|
||||
if(!$current_module_srl) return new Object();
|
||||
}
|
||||
// Get editors settings
|
||||
$oEditorModel = &getModel('editor');
|
||||
$editor_config = $oEditorModel->getEditorConfig($current_module_srl);
|
||||
$oModuleModel = &getModel('module');
|
||||
// Get a list of editor skin
|
||||
$editor_skin_list = FileHandler::readDir(_XE_PATH_.'modules/editor/skins');
|
||||
Context::set('editor_skin_list', $editor_skin_list);
|
||||
|
||||
Context::set('editor_config', $editor_config);
|
||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path,$editor_config->editor_skin);
|
||||
Context::set('editor_colorset_list', $skin_info->colorset);
|
||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path,$editor_config->comment_editor_skin);
|
||||
Context::set('editor_comment_colorset_list', $skin_info->colorset);
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
// Get a list of editor skin
|
||||
$editor_skin_list = FileHandler::readDir(_XE_PATH_.'modules/editor/skins');
|
||||
Context::set('editor_skin_list', $editor_skin_list);
|
||||
$contents = FileHandler::readDir(_XE_PATH_.'modules/editor/styles');
|
||||
$content_style_list = array();
|
||||
for($i=0,$c=count($contents);$i<$c;$i++)
|
||||
{
|
||||
$style = $contents[$i];
|
||||
$info = $oModuleModel->loadSkinInfo($this->module_path,$style,'styles');
|
||||
$content_style_list[$style] = new stdClass();
|
||||
$content_style_list[$style]->title = $info->title;
|
||||
}
|
||||
Context::set('content_style_list', $content_style_list);
|
||||
// Get a group list
|
||||
$oMemberModel = &getModel('member');
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$group_list = $oMemberModel->getGroups($site_module_info->site_srl);
|
||||
Context::set('group_list', $group_list);
|
||||
|
||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path,$editor_config->editor_skin);
|
||||
Context::set('editor_colorset_list', $skin_info->colorset);
|
||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path,$editor_config->comment_editor_skin);
|
||||
Context::set('editor_comment_colorset_list', $skin_info->colorset);
|
||||
//Security
|
||||
$security = new Security();
|
||||
$security->encodeHTML('group_list..title');
|
||||
$security->encodeHTML('group_list..description');
|
||||
$security->encodeHTML('content_style_list..');
|
||||
$security->encodeHTML('editor_comment_colorset_list..title');
|
||||
|
||||
$contents = FileHandler::readDir(_XE_PATH_.'modules/editor/styles');
|
||||
for($i=0,$c=count($contents);$i<$c;$i++) {
|
||||
$style = $contents[$i];
|
||||
$info = $oModuleModel->loadSkinInfo($this->module_path,$style,'styles');
|
||||
$content_style_list[$style]->title = $info->title;
|
||||
}
|
||||
Context::set('content_style_list', $content_style_list);
|
||||
// Get a group list
|
||||
$oMemberModel = &getModel('member');
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$group_list = $oMemberModel->getGroups($site_module_info->site_srl);
|
||||
Context::set('group_list', $group_list);
|
||||
// Set a template file
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
$tpl = $oTemplate->compile($this->module_path.'tpl', 'editor_module_config');
|
||||
$obj .= $tpl;
|
||||
|
||||
//Security
|
||||
$security = new Security();
|
||||
$security->encodeHTML('group_list..title');
|
||||
$security->encodeHTML('group_list..description');
|
||||
$security->encodeHTML('content_style_list..');
|
||||
$security->encodeHTML('editor_comment_colorset_list..title');
|
||||
|
||||
// Set a template file
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
$tpl = $oTemplate->compile($this->module_path.'tpl', 'editor_module_config');
|
||||
$obj .= $tpl;
|
||||
|
||||
return new Object();
|
||||
}
|
||||
return new Object();
|
||||
}
|
||||
|
||||
|
||||
function dispEditorPreview(){
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('preview');
|
||||
}
|
||||
function dispEditorPreview()
|
||||
{
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('preview');
|
||||
}
|
||||
|
||||
function dispEditorSkinColorset(){
|
||||
$skin = Context::get('skin');
|
||||
$oModuleModel = &getModel('module');
|
||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path,$skin);
|
||||
$colorset = $skin_info->colorset;
|
||||
Context::set('colorset', $colorset);
|
||||
}
|
||||
function dispEditorSkinColorset()
|
||||
{
|
||||
$skin = Context::get('skin');
|
||||
$oModuleModel = &getModel('module');
|
||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path,$skin);
|
||||
$colorset = $skin_info->colorset;
|
||||
Context::set('colorset', $colorset);
|
||||
}
|
||||
|
||||
function dispEditorConfigPreview() {
|
||||
$oEditorModel = &getModel('editor');
|
||||
$config = $oEditorModel->getEditorConfig();
|
||||
function dispEditorConfigPreview()
|
||||
{
|
||||
$oEditorModel = &getModel('editor');
|
||||
$config = $oEditorModel->getEditorConfig();
|
||||
|
||||
$mode = Context::get('mode');
|
||||
|
||||
if($mode != 'main')
|
||||
{
|
||||
$option_com = new stdClass();
|
||||
$option_com->allow_fileupload = false;
|
||||
$option_com->content_style = $config->content_style;
|
||||
$option_com->content_font = $config->content_font;
|
||||
$option_com->content_font_size = $config->content_font_size;
|
||||
$option_com->enable_autosave = false;
|
||||
$option_com->enable_default_component = true;
|
||||
$option_com->enable_component = true;
|
||||
$option_com->disable_html = false;
|
||||
$option_com->height = $config->comment_editor_height;
|
||||
$option_com->skin = $config->comment_editor_skin;
|
||||
$option_com->content_key_name = 'dummy_content';
|
||||
$option_com->primary_key_name = 'dummy_key';
|
||||
$option_com->content_style = $config->comment_content_style;
|
||||
$option_com->colorset = $config->sel_comment_editor_colorset;
|
||||
$editor = $oEditorModel->getEditor(0, $option_com);
|
||||
}
|
||||
else
|
||||
{
|
||||
$option = new stdClass();
|
||||
$option->allow_fileupload = false;
|
||||
$option->content_style = $config->content_style;
|
||||
$option->content_font = $config->content_font;
|
||||
|
|
@ -151,32 +188,15 @@
|
|||
$option->primary_key_name = 'dummy_key';
|
||||
$option->colorset = $config->sel_editor_colorset;
|
||||
$editor = $oEditorModel->getEditor(0, $option);
|
||||
|
||||
Context::set('editor', $editor);
|
||||
|
||||
$option_com->allow_fileupload = false;
|
||||
$option_com->content_style = $config->content_style;
|
||||
$option_com->content_font = $config->content_font;
|
||||
$option_com->content_font_size = $config->content_font_size;
|
||||
$option_com->enable_autosave = false;
|
||||
$option_com->enable_default_component = true;
|
||||
$option_com->enable_component = true;
|
||||
$option_com->disable_html = false;
|
||||
$option_com->height = $config->comment_editor_height;
|
||||
$option_com->skin = $config->comment_editor_skin;
|
||||
$option_com->content_key_name = 'dummy_content2';
|
||||
$option_com->primary_key_name = 'dummy_key2';
|
||||
$option_com->content_style = $config->comment_content_style;
|
||||
$option_com->colorset = $config->sel_comment_editor_colorset;
|
||||
|
||||
$editor_comment = $oEditorModel->getEditor(0, $option_com);
|
||||
|
||||
Context::set('editor_comment', $editor_comment);
|
||||
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('config_preview');
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Context::set('editor', $editor);
|
||||
Context::set('admin_bar', 'false');
|
||||
|
||||
$this->setLayoutFile('popup_layout');
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('config_preview');
|
||||
}
|
||||
}
|
||||
/* End of file editor.view.php */
|
||||
/* Location: ./modules/editor/editor.view.php */
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<lang>
|
||||
<item name="editor_preview">
|
||||
<value xml:lang="ko"><![CDATA[에디터 미리보기]]></value>
|
||||
<value xml:lang="en"><![CDATA[Editor Preview]]></value>
|
||||
<value xml:lang="jp"><![CDATA[エディタープレビュー]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[Editor Preview]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[Editor Preview]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Editor Preview]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Editor Preview]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Editor Preview]]></value>
|
||||
<item name="editor_now">
|
||||
<value xml:lang="ko"><![CDATA[현재 설정 상태]]></value>
|
||||
<value xml:lang="en"><![CDATA[현재 설정 상태]]></value>
|
||||
<value xml:lang="jp"><![CDATA[현재 설정 상태]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[현재 설정 상태]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[현재 설정 상태]]></value>
|
||||
<value xml:lang="ru"><![CDATA[현재 설정 상태]]></value>
|
||||
<value xml:lang="tr"><![CDATA[현재 설정 상태]]></value>
|
||||
<value xml:lang="vi"><![CDATA[현재 설정 상태]]></value>
|
||||
</item>
|
||||
<item name="editor_component">
|
||||
<value xml:lang="ko"><![CDATA[에디터 컴포넌트]]></value>
|
||||
|
|
@ -51,74 +51,74 @@
|
|||
<value xml:lang="vi"><![CDATA[Editor Option]]></value>
|
||||
</item>
|
||||
<item name="guide_choose_main_editor">
|
||||
<value xml:lang="ko"><![CDATA[본문 에디터를 선택하세요.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Choose the main editor.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[本文エディターを選択してください。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[Choose the main editor.]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[Choose the main editor.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Choose the main editor.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Choose the main editor.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Choose the main editor.]]></value>
|
||||
<value xml:lang="ko"><![CDATA[본문 에디터]]></value>
|
||||
<value xml:lang="en"><![CDATA[Main editor.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[本文エディター]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[Main editor.]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[Main editor.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Main editor.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Main editor.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Main editor.]]></value>
|
||||
</item>
|
||||
<item name="guide_set_height_main_editor">
|
||||
<value xml:lang="ko"><![CDATA[본문 에디터의 높이를 설정하세요.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Set height of the main editor.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[本文エディターの高さを設定してください。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[Set height of the main editor.]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[Set height of the main editor.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Set height of the main editor.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Set height of the main editor.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Set height of the main editor.]]></value>
|
||||
<value xml:lang="ko"><![CDATA[본문 에디터 높이]]></value>
|
||||
<value xml:lang="en"><![CDATA[Height of the main editor.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[本文エディターの高さ]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[Height of the main editor.]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[Height of the main editor.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Height of the main editor.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Height of the main editor.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Height of the main editor.]]></value>
|
||||
</item>
|
||||
<item name="guide_choose_comment_editor">
|
||||
<value xml:lang="ko"><![CDATA[댓글 에디터를 선택하세요.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Choose the comment editor.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[コメントエディターを選択してください。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[Choose the comment editor.]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[Choose the comment editor.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Choose the comment editor.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Choose the comment editor.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Choose the comment editor.]]></value>
|
||||
<value xml:lang="ko"><![CDATA[댓글 에디터]]></value>
|
||||
<value xml:lang="en"><![CDATA[Comment editor.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[コメントエディター]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[Comment editor.]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[Comment editor.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Comment editor.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Comment editor.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Comment editor.]]></value>
|
||||
</item>
|
||||
<item name="guide_set_height_comment_editor">
|
||||
<value xml:lang="ko"><![CDATA[댓글 에디터의 높이를 설정하세요.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Set height of the comment editor.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[コメントエディターの高さを設定してください。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[Set height of the comment editor.]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[Set height of the comment editor.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Set height of the comment editor.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Set height of the comment editor.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Set height of the comment editor.]]></value>
|
||||
<value xml:lang="ko"><![CDATA[댓글 에디터 높이]]></value>
|
||||
<value xml:lang="en"><![CDATA[Height of the comment editor.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[コメントエディターの高さ]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[Height of the comment editor.]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[Height of the comment editor.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Height of the comment editor.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Height of the comment editor.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Height of the comment editor.]]></value>
|
||||
</item>
|
||||
<item name="guide_choose_text_formatting">
|
||||
<value xml:lang="ko"><![CDATA[본문 서식을 선택하세요.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Choose the body format.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[本文のスタイルを選択してください。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[Choose the text formatting.]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[Choose the text formatting.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Choose the text formatting.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Choose the text formatting.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Choose the text formatting.]]></value>
|
||||
<value xml:lang="ko"><![CDATA[본문 서식]]></value>
|
||||
<value xml:lang="en"><![CDATA[Text formatting]]></value>
|
||||
<value xml:lang="jp"><![CDATA[本文のスタイル]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[Text formatting.]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[Text formatting.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Text formatting.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Text formatting.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Text formatting.]]></value>
|
||||
</item>
|
||||
<item name="guide_choose_font_body">
|
||||
<value xml:lang="ko"><![CDATA[본문 글꼴을 선택하세요.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Choose the body font.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[本文のフォントを選択してください。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[Choose the font body.]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[Choose the font body.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Choose the font body.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Choose the font body.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Choose the font body.]]></value>
|
||||
<value xml:lang="ko"><![CDATA[본문 글꼴]]></value>
|
||||
<value xml:lang="en"><![CDATA[Font body]]></value>
|
||||
<value xml:lang="jp"><![CDATA[本文のフォント]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[Font body.]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[Font body.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Font body.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Font body.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Font body.]]></value>
|
||||
</item>
|
||||
<item name="guide_choose_font_size_body">
|
||||
<value xml:lang="ko"><![CDATA[본문 글꼴크기를 선택하세요.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Choose the font size of body.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[本文の文字サイズを選択してください。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[Choose the font size body.]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[Choose the font size body.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Choose the font size body.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Choose the font size body.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Choose the font size body.]]></value>
|
||||
<value xml:lang="ko"><![CDATA[본문 글꼴크기]]></value>
|
||||
<value xml:lang="en"><![CDATA[Size body]]></value>
|
||||
<value xml:lang="jp"><![CDATA[本文の文字サイズ]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[Font size body.]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[Font size body.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Font size body.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Font size body.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Font size body.]]></value>
|
||||
</item>
|
||||
|
||||
<item name="font_preview">
|
||||
|
|
@ -310,18 +310,6 @@
|
|||
<value xml:lang="tr"><![CDATA[Bileşen hakkında]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Thông tin Thành phần]]></value>
|
||||
</item>
|
||||
<item name="about_component_grant">
|
||||
<value xml:lang="ko"><![CDATA[기본 컴포넌트외의 확장 컴포넌트 기능을 사용할 수 있는 권한을 지정할 수 있습니다.(모두 해제 시 아무나 사용 가능합니다)]]></value>
|
||||
<value xml:lang="en"><![CDATA[Selected group(s) will be able to use expanded components of editor.(Leave them blank if you want all groups to have permissions.)]]></value>
|
||||
<value xml:lang="jp"><![CDATA[基本コンポーネント以外の拡張コンポーネント機能が利用可能な権限の設定ができます。(選択なしの場合、誰でも利用可能)]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[可以设置除默认组件外的扩展组件使用权限(全部解除时任何用户都可以使用)。]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[除預設組件外,可設置延伸組件的使用權限(全部解除時,任何用戶都可使用)。]]></value>
|
||||
<value xml:lang="fr"><![CDATA[Vous pouvez configurer la Permission d'utiliser des composants additionnels de l'Editeur. (Tout le monde aura la Permission si vous ne cochez rien)]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Возможен выбор дополнительных компонентов. (Каждый может использовать его, если режим выключен)]]></value>
|
||||
<value xml:lang="es"><![CDATA[Usted puede configurar el permiso de utilizar la ampliación de los componentes de editor. (Todo el mundo tendría permiso si no comprobado)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Seçilen grup(lar), editörün genişletilmiş bileşenlerini kullanabilirler.(Eğer tüm grupların bu yetkiye sahip olmasını istiyorsanız, boş bırakınız)]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Những nhóm đã chọn sẽ được phép sử dụng Thành phần mở rộng cho biên tập.(Để trống nếu bạn muốn tất cả các nhóm đều được phép sử dụng.)]]></value>
|
||||
</item>
|
||||
<item name="about_component_mid">
|
||||
<value xml:lang="ko"><![CDATA[에디터 컴포넌트가 사용될 대상을 지정할 수 있습니다.(모두 해제 시 모든 대상에서 사용 가능합니다)]]></value>
|
||||
<value xml:lang="en"><![CDATA[Editor components can select targets.(All targets will be selected when nothing is selected.)]]></value>
|
||||
|
|
@ -347,7 +335,7 @@
|
|||
<value xml:lang="vi"><![CDATA[Không tìm thấy biên tập Thành phần %s]]></value>
|
||||
</item>
|
||||
<item name="msg_component_is_inserted">
|
||||
<value xml:lang="ko"><![CDATA[선택하신 컴포넌트는 이미 입력되어 있습니다.]]></value>
|
||||
<value xml:lang="ko"><![CDATA[선택한 컴포넌트는 이미 입력되어 있습니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Selected component is already inserted.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[選択されたコンポーネントは既に入力されています。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[您选择的组件已插入!]]></value>
|
||||
|
|
@ -359,7 +347,7 @@
|
|||
<value xml:lang="vi"><![CDATA[Đã chèn Thành phần được chọn.]]></value>
|
||||
</item>
|
||||
<item name="msg_component_is_first_order">
|
||||
<value xml:lang="ko"><![CDATA[선택하신 컴포넌트는 첫 번째에 위치하고 있습니다.]]></value>
|
||||
<value xml:lang="ko"><![CDATA[선택한 컴포넌트는 첫 번째에 위치하고 있습니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Selected component is located at the first position.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[選択されたコンポーネントは最上位にあります。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[您选择的组件已到最上端位置!]]></value>
|
||||
|
|
@ -371,7 +359,7 @@
|
|||
<value xml:lang="vi"><![CDATA[Lựa chọn Thành phần trước một khu vực.]]></value>
|
||||
</item>
|
||||
<item name="msg_component_is_last_order">
|
||||
<value xml:lang="ko"><![CDATA[선택하신 컴포넌트는 마지막에 위치하고 있습니다.]]></value>
|
||||
<value xml:lang="ko"><![CDATA[선택한 컴포넌트는 마지막에 위치하고 있습니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Selected component is located at the last position.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[選択されたコンポーネントは最下位にあります。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[您选择的组件已到最下端位置!]]></value>
|
||||
|
|
@ -383,25 +371,16 @@
|
|||
<value xml:lang="vi"><![CDATA[Lựa chọn Thành phần sau một khu vực.]]></value>
|
||||
</item>
|
||||
<item name="msg_load_saved_doc">
|
||||
<value xml:lang="ko"><![CDATA[자동 저장된 글이 있습니다. 복구하시겠습니까?
|
||||
글을 다 쓰신 후 저장하시면 자동 저장 본은 사라집니다.]]></value>
|
||||
<value xml:lang="ko"><![CDATA[자동 저장된 글이 있습니다. 복구하시겠습니까? 글을 다 쓰신 후 저장하면 자동 저장 본은 사라집니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[There is a draft automatically saved. Do you want to restore it? The auto-saved draft will be discarded when you write and save it.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[自動保存された書き込みがあります。復旧しますか?
|
||||
書き終わってから登録すると前の自動保存データは削除されます。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[有自动保存的内容, 确定要恢复吗?
|
||||
发布主题后,自动保存的文本将会被删除。]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[有自動儲存的內容,確定要恢復嗎?
|
||||
儲存內容後,自動儲存的內容將會被刪除。]]></value>
|
||||
<value xml:lang="fr"><![CDATA[Il y a un article conservé automatiquement. Voulez-vous le réstaurer?
|
||||
L'esquisse conservé automatiquement va être débarrasser après conserver l'article courant.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Существует автоматически сохраненная статья. Хотите ли Вы ее восстановить?
|
||||
Автоматически сохраненный черновик будет отменен после сохранения текущей статьи]]></value>
|
||||
<value xml:lang="es"><![CDATA[Existe un documento guardado automáticamente ¿desea recuperarlo ?
|
||||
Después de guardar el documento escrito, el documento autoguardado sera eliminado.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Kendiliğinden kaydolan bir makale mevcut. Bunu kurtarmak ister misiniz?
|
||||
Otomatik kaydolan taslak, geçerli makaleyi kaydedince, çıkartılacaktır]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Đã có bài viết tự động lưu. Bạn có muốn khôi phục nó không?
|
||||
Bài viết tự động lưu sẽ tự động hủy sau khi bạn hoàn thành bài viết này và bấm 'Gửi']]></value>
|
||||
<value xml:lang="jp"><![CDATA[自動保存された書き込みがあります。復旧しますか?書き終わってから登録すると前の自動保存データは削除されます。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[有自动保存的内容, 确定要恢复吗?发布主题后,自动保存的文本将会被删除。]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[有自動儲存的內容,確定要恢復嗎? 儲存內容後,自動儲存的內容將會被刪除。]]></value>
|
||||
<value xml:lang="fr"><![CDATA[Il y a un article conservé automatiquement. Voulez-vous le réstaurer? L'esquisse conservé automatiquement va être débarrasser après conserver l'article courant.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Существует автоматически сохраненная статья. Хотите ли Вы ее восстановить? Автоматически сохраненный черновик будет отменен после сохранения текущей статьи]]></value>
|
||||
<value xml:lang="es"><![CDATA[Existe un documento guardado automáticamente ¿desea recuperarlo ? Después de guardar el documento escrito, el documento autoguardado sera eliminado.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Kendiliğinden kaydolan bir makale mevcut. Bunu kurtarmak ister misiniz? Otomatik kaydolan taslak, geçerli makaleyi kaydedince, çıkartılacaktır]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Đã có bài viết tự động lưu. Bạn có muốn khôi phục nó không? Bài viết tự động lưu sẽ tự động hủy sau khi bạn hoàn thành bài viết này và bấm 'Gửi']]></value>
|
||||
</item>
|
||||
<item name="msg_auto_saved">
|
||||
<value xml:lang="ko"><![CDATA[자동 저장되었습니다.]]></value>
|
||||
|
|
@ -475,9 +454,9 @@ Bài viết tự động lưu sẽ tự động hủy sau khi bạn hoàn thành
|
|||
<value xml:lang="tr"><![CDATA[Varsayılan Bileşenler için Yetki]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Quyền sử dụng Thành phần cơ bản]]></value>
|
||||
</item>
|
||||
<item name="enable_component_grant">
|
||||
<value xml:lang="ko"><![CDATA[컴포넌트 사용 권한]]></value>
|
||||
<value xml:lang="en"><![CDATA[Permission to use components]]></value>
|
||||
<item name="enable_extra_component_grant">
|
||||
<value xml:lang="ko"><![CDATA[확장 컴포넌트 사용 권한]]></value>
|
||||
<value xml:lang="en"><![CDATA[Permission to use extra components]]></value>
|
||||
<value xml:lang="jp"><![CDATA[コンポーネント使用権限]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[组件使用权限]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[組件使用權限]]></value>
|
||||
|
|
@ -535,113 +514,30 @@ Bài viết tự động lưu sẽ tự động hủy sau khi bạn hoàn thành
|
|||
<value xml:lang="tr"><![CDATA[Editör Yüksekliği]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Chiều cao khung viết bài]]></value>
|
||||
</item>
|
||||
<item name="about_editor_skin">
|
||||
<value xml:lang="ko"><![CDATA[에디터 스킨을 선택하실 수 있습니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[You may select the skin for the editor.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[エディターのスキンの選択ができます。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[可以选择编辑器皮肤。]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[選擇編輯器面板。]]></value>
|
||||
<value xml:lang="fr"><![CDATA[Vous pouvez choisir l'habillage de l'Editeur.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Выберите скин редактора]]></value>
|
||||
<value xml:lang="es"><![CDATA[Usted puede seleccionar la piel del editor.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Editör dış görünümünü seçebilirsiniz.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Bạn có thể chọn kiểu gửi bài.]]></value>
|
||||
</item>
|
||||
<item name="about_content_style">
|
||||
<value xml:lang="ko"><![CDATA[문서 편집 및 내용 출력 시 원하는 서식을 지정할 수 있습니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[You may select a style for editting an article or displaying a content]]></value>
|
||||
<value xml:lang="jp"><![CDATA[コンテンツの編集、および内容表示の際のスタイルを指定します。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[可以指定编辑或打印文档时的文档样式。]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[修改內容時,可指定要顯示的內容樣式]]></value>
|
||||
<value xml:lang="fr"><![CDATA[문서 편집 및 내용 출력시 원하는 서식을 지정할 수 있습니다]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Вы можете выбрать стиль для редактирования и просмотра записи ]]></value>
|
||||
<value xml:lang="es"><![CDATA[문서 편집 및 내용 출력시 원하는 서식을 지정할 수 있습니다]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Makale düzenleme veya içerik gösterme için tarz seçebilirsiniz]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Bạn có thể chọn kiểu viết bài hay kiểu hiển thị.]]></value>
|
||||
</item>
|
||||
<item name="about_content_font">
|
||||
<value xml:lang="ko"><![CDATA[문서 편집 및 내용 출력 시 원하는 폰트를 지정할 수 있습니다. 지정하지 않으면 사용자 설정에 따르게 됩니다. 콤마(,)로 여러 폰트를 지정할 수 있습니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[You may select a font for editting an article or displaying a content. The default font is your own font. Please use comma for multiple input.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[コンテンツの編集、および内容表示の際のフォントを指定します。 指定してない場合、ユーザーの設定を従います。 半角コンマ(,)区切りで複数フォントの登録が出来ます。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[可以指定编辑或打印文档时的文档字体,不指定随用户设置。 多个字体可以用逗号(,)区分输入。]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[修改內容時,可指定要顯示的內容字體。 如果沒有指定的話,以系統預設為主。 以逗號(,)區分多個字體。]]></value>
|
||||
<value xml:lang="fr"><![CDATA[문서 편집 및 내용 출력시 원하는 폰트를 지정할 수 있습니다. 지정하지 않으면 사용자 설정에 따르게 됩니다. 콤마(,)로 여러 폰트를 지정할 수 있습니다.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Вы можете выбрать шрифт для редактирования и просмотра записи. Используйте запятую(,) если выбрали несколько шрифтов.]]></value>
|
||||
<value xml:lang="es"><![CDATA[문서 편집 및 내용 출력시 원하는 폰트를 지정할 수 있습니다. 지정하지 않으면 사용자 설정에 따르게 됩니다. 콤마(,)로 여러 폰트를 지정할 수 있습니다.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Makale düzenleme veya içerik gösterme için yazı tipi seçebilirsiniz. Varsayılan yazı tipi sizin kendi yazı tipinizdir Lütfen çoklu giriş için virgül(,) kullanınız.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Bạn có thể chọn Font chữ để viết và hiển thị trong bài viết. Để đặt mặc định chỉ Font chữ bạn hay sử dụng, hãy đặt dấu (,) vào giữa các Font.]]></value>
|
||||
<value xml:lang="ko"><![CDATA[콤마(,)로 여러 폰트를 지정할 수 있습니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Please use comma for multiple input.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[半角コンマ(,)区切りで複数フォントの登録が出来ます。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[多个字体可以用逗号(,)区分输入。]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[以逗號(,)區分多個字體。]]></value>
|
||||
<value xml:lang="fr"><![CDATA[콤마(,)로 여러 폰트를 지정할 수 있습니다.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Используйте запятую(,) если выбрали несколько шрифтов.]]></value>
|
||||
<value xml:lang="es"><![CDATA[콤마(,)로 여러 폰트를 지정할 수 있습니다.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Varsayılan yazı tipi sizin kendi yazı tipinizdir Lütfen çoklu giriş için virgül(,) kullanınız.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Để đặt mặc định chỉ Font chữ bạn hay sử dụng, hãy đặt dấu (,) vào giữa các Font.]]></value>
|
||||
</item>
|
||||
<item name="about_content_font_size">
|
||||
<value xml:lang="ko"><![CDATA[문서 편집 및 내용 출력 시 원하는 폰트의 크기를 지정할 수 있습니다. 12px, 1em등 단위까지 포함해서 입력해주세요.]]></value>
|
||||
<value xml:lang="en"><![CDATA[You may select the font size for editting an article or displaying a content. Please input units such as px or em.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[コンテンツの編集、および内容表示の際のフォントサイズを指定します。 12px、1emなどサイズ単位まで入力してください。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[可以指定编辑或打印文档时的文档字体大小。 指定时请包含字体单位(如12px, 1em)。]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[修改內容時,可指定要顯示的內容字體大小。 請輸入單位,像是12px, 1em等。]]></value>
|
||||
<value xml:lang="fr"><![CDATA[문서 편집 및 내용 출력시 원하는 폰트의 크기를 지정할 수 있습니다. 12px, 1em등 단위까지 포함해서 입력해주세요.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Вы можете выбрать размер шрифта для редактирования и просмотра записи. Пожалуйста, выберите единицы такие как px или em.]]></value>
|
||||
<value xml:lang="es"><![CDATA[문서 편집 및 내용 출력시 원하는 폰트의 크기를 지정할 수 있습니다. 12px, 1em등 단위까지 포함해서 입력해주세요.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Makale düzenleme veya içerik görüntüleme için yazı boyutu seçebilirsiniz. Lütfen px veya em gibi birimler kullanınız.]]></value>
|
||||
<value xml:lang="ko"><![CDATA[12px, 1em등 단위까지 포함해서 입력해주세요.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Please input units such as px or em.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[12px、1emなどサイズ単位まで入力してください。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[指定时请包含字体单位(如12px, 1em)。]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[請輸入單位,像是12px, 1em等。]]></value>
|
||||
<value xml:lang="fr"><![CDATA[12px, 1em등 단위까지 포함해서 입력해주세요.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Пожалуйста, выберите единицы такие как px или em.]]></value>
|
||||
<value xml:lang="es"><![CDATA[12px, 1em등 단위까지 포함해서 입력해주세요.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Lütfen px veya em gibi birimler kullanınız.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Bạn có thể chọn cỡ chữ để viết bài và hiển thị theo định dạng "px" hoặc "em".]]></value>
|
||||
</item>
|
||||
<item name="about_upload_file_grant">
|
||||
<value xml:lang="ko"><![CDATA[파일을 첨부할 수 있는 권한을 지정하실 수 있습니다. (모두 해제 시 아무나 첨부 가능합니다)]]></value>
|
||||
<value xml:lang="en"><![CDATA[Selected group(s) will be able to upload files. (Leave them blank if you want all groups to have this permission.)]]></value>
|
||||
<value xml:lang="jp"><![CDATA[ファイル添付権限の設定ができます。(選択なしの場合、誰でも添付が可能)]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[可以设置上传文件的权限(全部解除为无限制)。]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[設置上傳檔案的權限(全部解除為無限制)。]]></value>
|
||||
<value xml:lang="fr"><![CDATA[Vous pouvez configurer la permission d'attacher les fichiers. (Tout le monde aura la permission si vous ne cochez rien)]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Вы можете разрешить прикреплять файлы выбранным группам. (Если оставить поле пустым то право прикреплять файлы будут иметь все)]]></value>
|
||||
<value xml:lang="es"><![CDATA[Usted puede configurar el permiso de archivo adjunto. (Todo el mundo tendría permiso si no comprobado)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Seçilen (gruplar) dosyaları karşıya yükleme yetkisine sahip olacaklardır. (Eğer tüm grupların bu yetkiye sahip olmasını istiyorsanız lütfen boş bırakınız)]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Chọn nhóm được phép Upload File. (Để trống nếu bạn muốn tất cả các nhóm đều có thể Upload.)]]></value>
|
||||
</item>
|
||||
<item name="about_default_component_grant">
|
||||
<value xml:lang="ko"><![CDATA[에디터에서 사용되는 기본 컴포넌트를 사용할 수 있는 권한을 지정할 수 있습니다. (모두 해제 시 아무나 사용 가능합니다)]]></value>
|
||||
<value xml:lang="en"><![CDATA[Selected group(s) will be able to use default components of editor. (Leave them blank if you want all groups to have this permission.)]]></value>
|
||||
<value xml:lang="jp"><![CDATA[エディターの基本コンポーネントの使用権限の設定ができます。(選択なしの場合、誰でも利用可能)]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[可以设置编辑器默认组件的使用权限(全部解除为无限制)。]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[設置編輯器預設組件的使用權限(全部解除為無限制)。]]></value>
|
||||
<value xml:lang="fr"><![CDATA[Vous pouvez configurer la permission d'utiliser les Composants Par Défaut de l'Editeur. (Tout le monde aura la permission si vous ne cochez rien)]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Selected group(s) will be able to use default components of editor. (Leave them blank if you want all groups to have permission)]]></value>
|
||||
<value xml:lang="es"><![CDATA[Usted puede configurar el permiso de uso de los componentes de editor por defecto. (Todo el mundo tendría permiso si no comprobado)]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Seçilen grup(lar) editörün varsayılan bileşenlerini kullanabileceklerdir. (Eğer tüm grupların bu yetkiye sahip olmasını istiyorsanız lütfen boş bırakınız)]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Chọn nhóm được phép sử dụng Thành phần mặc định. (Để trống nếu bạn muốn tất cả đều có thể sử dụng.)]]></value>
|
||||
</item>
|
||||
<item name="about_editor_height">
|
||||
<value xml:lang="ko"><![CDATA[에디터의 기본 높이를 지정하실 수 있습니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[You may set the height of the editor.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[エディターの基本高さを設定します。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[可以指定编辑器的默认高度。]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[指定編輯器的預設高度。]]></value>
|
||||
<value xml:lang="fr"><![CDATA[Vous pouvez configurer l'hauteur de l'Editeur.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[You may set the height of editor.]]></value>
|
||||
<value xml:lang="es"><![CDATA[Usted puede configurar la altura del editor.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Editör yüksekliğini ayarlayabilirsiniz.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Bạn có thể đặt chiều cao của khung viết bài.]]></value>
|
||||
</item>
|
||||
<item name="about_editor_height_resizable">
|
||||
<value xml:lang="ko"><![CDATA[에디터의 높이를 직접 변경할 수 있도록 허용합니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[You may decide whether the height of the editor can be resized.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[エディターの高さを変更できるようにします。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[允许用户拖动编辑器高度。]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[允許用戶拖曳編輯器高度。]]></value>
|
||||
<value xml:lang="fr"><![CDATA[Permettre de remettre l'hauteur de l'Editeur.]]></value>
|
||||
<value xml:lang="ru"><![CDATA[You may decide whether height of editor can be resized.]]></value>
|
||||
<value xml:lang="es"><![CDATA[Permiso para cambiar el tamaño de la altura del editor.]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Editörün yüksekliğinin yeniden boyutlandırıp-boyutlandırılamayacağı kararını verebilirsiniz.]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Đặt chiều cao có thể thay đổi.]]></value>
|
||||
</item>
|
||||
<item name="about_enable_html_grant">
|
||||
<value xml:lang="ko"><![CDATA[HTML 편집 권한을 부여할 수 있습니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Selected group(s) will be able to use HTML.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[HTML編集権限を設定します。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[HTML代码编辑权限设置。]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[HTML原始碼編輯權限設置。]]></value>
|
||||
<value xml:lang="fr"><![CDATA[Vous pouvez permettre d'utiliser HTML]]></value>
|
||||
<value xml:lang="es"><![CDATA[Usted puede dar el permiso de uso de HTML]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Seçilen grup(lar) HTML kullanabileceklerdir]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Chọn nhóm được phép sử dụng HTML]]></value>
|
||||
</item>
|
||||
<item name="about_enable_autosave">
|
||||
<value xml:lang="ko"><![CDATA[글 작성 시 자동 저장 기능을 활성화 시킬 수 있습니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[You may decide whether the auto-save function will be used.]]></value>
|
||||
|
|
@ -1244,7 +1140,7 @@ Bài viết tự động lưu sẽ tự động hủy sau khi bạn hoàn thành
|
|||
<value xml:lang="vi"><![CDATA[Thứ tự chấm]]></value>
|
||||
</item>
|
||||
<item name="help_use_paragraph">
|
||||
<value xml:lang="ko"><![CDATA[문단 나누기를 하시려면 Ctrl+Enter를 누르시면 됩니다. (글 작성완료 후 Alt+S를 누르면 저장이 됩니다.)]]></value>
|
||||
<value xml:lang="ko"><![CDATA[문단 나누기를 하려면 Ctrl+Enter를 누르면 됩니다. (글 작성완료 후 Alt+S를 누르면 저장이 됩니다.)]]></value>
|
||||
<value xml:lang="en"><![CDATA[Press Ctrl+Enter to use paragraph break. (Press Alt+S to save it.)]]></value>
|
||||
<value xml:lang="jp"><![CDATA[段落機能を使用する場合は、「Ctrl+Enter」を押します(書き終わった後、「Alt+S」を押すと保存されます)。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[分段请按 Ctrl+回车. (发表主题快捷键:Alt+S)]]></value>
|
||||
|
|
@ -1963,16 +1859,6 @@ Bài viết tự động lưu sẽ tự động hủy sau khi bạn hoàn thành
|
|||
<value xml:lang="tr"><![CDATA[Simge Durumuna Küçült]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Thu nhỏ]]></value>
|
||||
</item>
|
||||
<item name="move">
|
||||
<value xml:lang="ko"><![CDATA[이동]]></value>
|
||||
<value xml:lang="en"><![CDATA[Move]]></value>
|
||||
<value xml:lang="jp"><![CDATA[移動]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[移动]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[搬移]]></value>
|
||||
<value xml:lang="ru"><![CDATA[Перейти]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Taşı]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Di chuyển]]></value>
|
||||
</item>
|
||||
<item name="refresh">
|
||||
<value xml:lang="ko"><![CDATA[새로 고침]]></value>
|
||||
<value xml:lang="en"><![CDATA[Refresh]]></value>
|
||||
|
|
@ -2099,7 +1985,7 @@ Bài viết tự động lưu sẽ tự động hủy sau khi bạn hoàn thành
|
|||
</item>
|
||||
</item>
|
||||
<item name="about_dblclick_in_editor">
|
||||
<value xml:lang="ko"><![CDATA[배경, 글자, 이미지, 인용문등에서 더블클릭을 하시면 상세한 컴포넌트 설정이 가능합니다.]]></value>
|
||||
<value xml:lang="ko"><![CDATA[배경, 글자, 이미지, 인용문등에서 더블클릭을 하면 상세한 컴포넌트 설정이 가능합니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[You may set the component's detailed configurations by double-clicking background, text, images, or quotations.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[背景、文字、イメージ、引用文の上にカーソルを合わせ、ダブルクリックすると詳細設定できるコンポーネントを表示します。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[双击背景, 文本, 图片, 引用即可对其相关组件进行详细设置。]]></value>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" type="text/css" href="./css/editor.css" />
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="./css/editor.css" />
|
||||
<title>XpressEngine DrEditor</title>
|
||||
</head>
|
||||
<body class="xe_content editable">
|
||||
|
|
|
|||
|
|
@ -1,81 +1,80 @@
|
|||
@charset "utf-8";
|
||||
/* NHN (developers@xpressengine.com) */
|
||||
@charset "utf-8";
|
||||
|
||||
/* -- Button Gray Style -- */
|
||||
.buttonGray,
|
||||
.buttonGray button{ position:relative; border:0; margin:0; display:inline-block; color:#000; font-family:Tahoma, Sans-serif; cursor:pointer; text-decoration:none !important; white-space:nowrap; vertical-align:middle; background-color:transparent; background-image:url(../img/buttonGray.gif) !important; background-repeat:no-repeat;}
|
||||
.buttonGray{ margin-right:2px;}
|
||||
.buttonGray button{ left:2px; overflow:visible;}
|
||||
.buttonGray button{position:relative;border:0;margin:0;display:inline-block;color:#000;font-family:Tahoma, Sans-serif;cursor:pointer;text-decoration:none!important;white-space:nowrap;vertical-align:middle;background-color:transparent;background-image:url(../img/buttonGray.gif)!important;background-repeat:no-repeat}
|
||||
.buttonGray{margin-right:2px}
|
||||
.buttonGray button{left:2px;overflow:visible}
|
||||
|
||||
/* Medium Size */
|
||||
.buttonGray.medium { background-position:left -30px;}
|
||||
.buttonGray.medium button{ height:24px; padding:0 10px 0 8px; *padding:0 5px 0 3px; font:12px/25px Sans-serif; background-position:right -30px; _top:-1px;}
|
||||
.buttonGray.medium{background-position:left -30px}
|
||||
.buttonGray.medium button{height:24px;padding:0 10px 0 8px;*padding:0 5px 0 3px;font:12px/25px Sans-serif;background-position:right -30px;_top:-1px}
|
||||
|
||||
/* Strong Button */
|
||||
.buttonGray.strong * { font-weight:bold !important;}
|
||||
.buttonGray.strong *{font-weight:bold!important}
|
||||
|
||||
/* Icon Add */
|
||||
.buttonGray .icon { position:relative; margin-right:5px; vertical-align:middle;}
|
||||
.buttonGray .icon{position:relative;margin-right:5px;vertical-align:middle}
|
||||
|
||||
/* Button Reset */
|
||||
.buttonDrEditor,
|
||||
.buttonDrEditor a,
|
||||
.buttonDrEditor button,
|
||||
.buttonDrEditor input { position:relative; margin:0; display:inline-block; text-decoration:none !important; border:0; font-size:12px; font-family:Tahoma, Sans-serif; white-space:nowrap; background:url(../img/buttonWhite.gif) no-repeat; vertical-align:middle; overflow:visible; color:#333;}
|
||||
.buttonDrEditor { height:23px; padding:0; margin-right:2px; background-position:left top;}
|
||||
.buttonDrEditor input{position:relative;margin:0;display:inline-block;text-decoration:none!important;border:0;font-size:12px;font-family:Tahoma, Sans-serif;white-space:nowrap;background:url(../img/buttonWhite.gif) no-repeat;vertical-align:middle;overflow:visible;color:#333}
|
||||
.buttonDrEditor{height:23px;padding:0;margin-right:2px;background-position:left top}
|
||||
.buttonDrEditor a,
|
||||
.buttonDrEditor button,
|
||||
.buttonDrEditor input{ left:2px; *vertical-align:top; cursor:pointer;}
|
||||
.buttonDrEditor input{left:2px;*vertical-align:top;cursor:pointer}
|
||||
|
||||
/* Button Size */
|
||||
.buttonDrEditor.large { height:29px; background-position:left -30px; }
|
||||
.buttonDrEditor.xLarge { height:35px; background-position:left -65px; }
|
||||
.buttonDrEditor.small { height:18px; background-position:left -107px; }
|
||||
.buttonDrEditor.large{height:29px;background-position:left -30px}
|
||||
.buttonDrEditor.xLarge{height:35px;background-position:left -65px}
|
||||
.buttonDrEditor.small{height:18px;background-position:left -107px}
|
||||
.buttonDrEditor a,
|
||||
.buttonDrEditor button,
|
||||
.buttonDrEditor input { height:23px; padding:0 10px 0 8px; font-size:12px; line-height:23px; background-position:right top;}
|
||||
.buttonDrEditor input{height:23px;padding:0 10px 0 8px;font-size:12px;line-height:23px;background-position:right top}
|
||||
.buttonDrEditor.large a,
|
||||
.buttonDrEditor.large button,
|
||||
.buttonDrEditor.large input { height:30px; padding:0 10px 0 8px; font-size:16px; line-height:29px; background-position:right -30px;}
|
||||
.buttonDrEditor.large input{height:30px;padding:0 10px 0 8px;font-size:16px;line-height:29px;background-position:right -30px}
|
||||
.buttonDrEditor.xLarge a,
|
||||
.buttonDrEditor.xLarge button,
|
||||
.buttonDrEditor.xLarge input { height:35px; padding:0 10px 0 8px; font-size:20px; line-height:35px; background-position:right -65px;}
|
||||
.buttonDrEditor.xLarge input{height:35px;padding:0 10px 0 8px;font-size:20px;line-height:35px;background-position:right -65px}
|
||||
.buttonDrEditor.small a,
|
||||
.buttonDrEditor.small button,
|
||||
.buttonDrEditor.small input { height:18px; padding:0 6px 0 4px; font-size:11px; line-height:18px; background-position:right -107px;}
|
||||
.buttonDrEditor.small input{height:18px;padding:0 6px 0 4px;font-size:11px;line-height:18px;background-position:right -107px}
|
||||
|
||||
/* Button Text Color */
|
||||
.buttonDrEditor *:hover,
|
||||
.buttonDrEditor *:active,
|
||||
.buttonDrEditor *:focus{ color:#690;}
|
||||
.buttonDrEditor *:focus{color:#690}
|
||||
.buttonDrEditor.green,
|
||||
.buttonDrEditor.green a,
|
||||
.buttonDrEditor.green button,
|
||||
.buttonDrEditor.green input { background-image:url(../img/buttonGreen.gif); color:#fff;}
|
||||
.buttonDrEditor.green input{background-image:url(../img/buttonGreen.gif);color:#fff}
|
||||
.buttonDrEditor.green *:hover,
|
||||
.buttonDrEditor.green *:active,
|
||||
.buttonDrEditor.green *:focus{ color:#ff0;}
|
||||
.buttonDrEditor.green *:focus{color:#ff0}
|
||||
.buttonDrEditor.black,
|
||||
.buttonDrEditor.black a,
|
||||
.buttonDrEditor.black button,
|
||||
.buttonDrEditor.black input { background-image:url(../img/buttonBlack.gif); color:#fff;}
|
||||
.buttonDrEditor.black input{background-image:url(../img/buttonBlack.gif);color:#fff}
|
||||
.buttonDrEditor.black *:hover,
|
||||
.buttonDrEditor.black *:active,
|
||||
.buttonDrEditor.black *:focus{ color:#ff0;}
|
||||
.buttonDrEditor.black *:focus{color:#ff0}
|
||||
.buttonDrEditor.red,
|
||||
.buttonDrEditor.red a,
|
||||
.buttonDrEditor.red button,
|
||||
.buttonDrEditor.red input { background-image:url(../img/buttonRed.gif); color:#fff;}
|
||||
.buttonDrEditor.red input{background-image:url(../img/buttonRed.gif);color:#fff}
|
||||
.buttonDrEditor.red *:hover,
|
||||
.buttonDrEditor.red *:active,
|
||||
.buttonDrEditor.red *:focus{ color:#ff0;}
|
||||
.buttonDrEditor.red *:focus{color:#ff0}
|
||||
.buttonDrEditor.blue,
|
||||
.buttonDrEditor.blue a,
|
||||
.buttonDrEditor.blue button,
|
||||
.buttonDrEditor.blue input { background-image:url(../img/buttonBlue.gif); color:#fff;}
|
||||
.buttonDrEditor.blue input{background-image:url(../img/buttonBlue.gif);color:#fff}
|
||||
.buttonDrEditor.blue *:hover,
|
||||
.buttonDrEditor.blue *:active,
|
||||
.buttonDrEditor.blue *:focus{ color:#ff0;}
|
||||
.buttonDrEditor.blue *:focus{color:#ff0}
|
||||
|
||||
/* Button Text Strong */
|
||||
.buttonDrEditor.strong * { font-weight:bold !important;}
|
||||
.buttonDrEditor.strong *{font-weight:bold!important}
|
||||
|
|
|
|||
|
|
@ -1,348 +1,350 @@
|
|||
@charset "utf-8";
|
||||
/* NHN (developers@xpressengine.com) */
|
||||
@charset "utf-8";
|
||||
|
||||
/* Textyle Editor */
|
||||
.textyleEditor{ position:relative; *zoom:1; margin:0 0 1em 0;}
|
||||
.textyleEditor:after{ content:""; display:block; clear:both;}
|
||||
.textyleEditor .editorContainer{ position:relative; width:100%; display:table; table-layout:fixed;}
|
||||
.textyleEditor .editorContainer .editorArea{ opacity:1; filter:alpha(opacity=100);}
|
||||
.textyleEditor .editorContainer .writeArea{ position:relative; *zoom:1;}
|
||||
.textyleEditor{position:relative;*zoom:1;margin:0 0 1em 0}
|
||||
.textyleEditor:after{content:"";display:block;clear:both}
|
||||
.textyleEditor .editorContainer{position:relative;width:100%;display:table;table-layout:fixed}
|
||||
.textyleEditor .editorContainer .editorArea{opacity:1;filter:alpha(opacity=100)}
|
||||
.textyleEditor .editorContainer .writeArea{position:relative;*zoom:1}
|
||||
|
||||
/* Writing Toolbar */
|
||||
.wToolbarContainer{ position:relative; margin:20px 0 40px 0; height:62px; overflow:hidden; z-index:1000; _zoom:1;}
|
||||
.wToolbarContainer.more{ height:auto;}
|
||||
.wToolbar{ position:relative; height:62px; margin:0 10px; *zoom:1; background-image:url(../img/bgWritingToolbarCenter.gif); background-repeat:repeat-x; }
|
||||
.wToolbarContainer.more .wToolbar{ height:auto; padding:0 0 5px 0; background-position:0 bottom; border-top:1px solid #bec2ca;}
|
||||
.wToolbar .cap{ position:absolute; top:0; height:62px; background-repeat:no-repeat; font-size:0; line-height:0; background:url(../img/bgWritingToolbar.gif) no-repeat; z-index:1;}
|
||||
.wToolbar .top{ display:none; position:absolute; top:-1px; width:10px; height:7px; background:url(../img/bgWritingToolbarMore.gif) no-repeat; z-index:2;}
|
||||
.wToolbarContainer.more .cap{ height:100%; _top:auto; _bottom:0; _height:300px; background:url(../img/bgWritingToolbarMore.gif) no-repeat;}
|
||||
.wToolbarContainer.more .top{ display:block;}
|
||||
.wToolbar .capLeft{ width:10px; left:-10px; background-position:left top;}
|
||||
.wToolbar .topLeft{ left:-10px; background-position:left top;}
|
||||
.wToolbarContainer.more .cap.capLeft{ background-position:left bottom;}
|
||||
.wToolbar .capRight{ width:10px; right:-10px; background-position:right top;}
|
||||
.wToolbar .topRight{ right:-10px; background-position:right top;}
|
||||
.wToolbarContainer.more .capRight{ background-position:right bottom;}
|
||||
.wToolbarContainer{position:relative;margin:20px 0 40px 0;height:62px;overflow:hidden;z-index:1000;_zoom:1}
|
||||
.wToolbarContainer.more{height:auto}
|
||||
.wToolbar{position:relative;height:62px;margin:0 10px;*zoom:1;background-image:url(../img/bgWritingToolbarCenter.gif);background-repeat:repeat-x}
|
||||
.wToolbarContainer.more .wToolbar{height:auto;padding:0 0 5px 0;background-position:0 bottom;border-top:1px solid #bec2ca}
|
||||
.wToolbar .cap{position:absolute;top:0;height:62px;background-repeat:no-repeat;font-size:0;line-height:0;background:url(../img/bgWritingToolbar.gif) no-repeat;z-index:1}
|
||||
.wToolbar .top{display:none;position:absolute;top:-1px;width:10px;height:7px;background:url(../img/bgWritingToolbarMore.gif) no-repeat;z-index:2}
|
||||
.wToolbarContainer.more .cap{height:100%;_top:auto;_bottom:0;_height:300px;background:url(../img/bgWritingToolbarMore.gif) no-repeat}
|
||||
.wToolbarContainer.more .top{display:block}
|
||||
.wToolbar .capLeft{width:10px;left:-10px;background-position:left top}
|
||||
.wToolbar .topLeft{left:-10px;background-position:left top}
|
||||
.wToolbarContainer.more .cap.capLeft{background-position:left bottom}
|
||||
.wToolbar .capRight{width:10px;right:-10px;background-position:right top}
|
||||
.wToolbar .topRight{right:-10px;background-position:right top}
|
||||
.wToolbarContainer.more .capRight{background-position:right bottom}
|
||||
|
||||
.wToolbar ul{ position:relative; margin:0 70px 0 0; padding:0; *zoom:1; height:58px; z-index:2;}
|
||||
.wToolbarContainer.more ul{ height:auto; _height:58px; background:url(../img/hrToolbarMore.gif);}
|
||||
.wToolbar ul:after{ content:""; display:block; clear:both;}
|
||||
.wToolbar li{ position:relative; float:left; list-style:none; margin-bottom:4px; width:11.1%; *width:11%; _margin-top:0; _margin-right:-1px;}
|
||||
.wToolbar li button{ position:relative; padding:0; width:100%; height:57px; *height:59px; border:0; background:transparent; cursor:pointer; font-size:11px; color:#44506a; background-image:url(../img/iconWritingToolbar.gif); background-repeat:no-repeat;}
|
||||
.wToolbar li button .tx{ display:inline-block; padding-top:37px; height:20px;}
|
||||
.wToolbar li.more{ float:none; position:absolute; top:1px; right:-70px; width:60px; background:url(../img/vrToolbarMore.gif) repeat-y; _zoom:1;}
|
||||
.wToolbar li.more button{ width:60px;}
|
||||
.wToolbarContainer.more li{ margin-bottom:0;}
|
||||
.wToolbarContainer.more li.more{ height:100%;}
|
||||
.wToolbarContainer.more li.more button{ height:100%; _height:114px; background:url(../img/iconWritingToolbarFolder.gif) no-repeat center !important;}
|
||||
.wToolbarContainer.more li.more button .nx{ top:0;}
|
||||
.wToolbar li.hover button{ background-color:#bfc3cb;}
|
||||
.wToolbar ul{position:relative;margin:0 70px 0 0;padding:0;*zoom:1;height:58px;z-index:2}
|
||||
.wToolbarContainer.more ul{height:auto;_height:58px;background:url(../img/hrToolbarMore.gif)}
|
||||
.wToolbar ul:after{content:"";display:block;clear:both}
|
||||
.wToolbar li{position:relative;float:left;list-style:none;margin-bottom:4px;width:11.1%;*width:11%;_margin-top:0;_margin-right:-1px}
|
||||
.wToolbar li button{position:relative;padding:0;width:100%;height:57px;*height:59px;border:0;background:transparent;cursor:pointer;font-size:11px;color:#44506a;background-image:url(../img/iconWritingToolbar.gif);background-repeat:no-repeat}
|
||||
.wToolbar li button .tx{display:inline-block;padding-top:37px;height:20px}
|
||||
.wToolbar li.more{float:none;position:absolute;top:1px;right:-70px;width:60px;background:url(../img/vrToolbarMore.gif) repeat-y;_zoom:1}
|
||||
.wToolbar li.more button{width:60px}
|
||||
.wToolbarContainer.more li{margin-bottom:0}
|
||||
.wToolbarContainer.more li.more{height:100%}
|
||||
.wToolbarContainer.more li.more button{height:100%;_height:114px;background:url(../img/iconWritingToolbarFolder.gif) no-repeat center!important}
|
||||
.wToolbarContainer.more li.more button .nx{top:0}
|
||||
.wToolbar li.hover button{background-color:#bfc3cb}
|
||||
|
||||
.wToolbar li.hx button{ background-position:center top;}
|
||||
.wToolbar li.txt button{ background-position:center -100px;}
|
||||
.wToolbar li.link button{ background-position:center -200px;}
|
||||
.wToolbar li.list button{ background-position:center -300px;}
|
||||
.wToolbar li.quote button{ background-position:center -400px;}
|
||||
.wToolbar li.img button{ background-position:center -500px;}
|
||||
.wToolbar li.movie button{ background-position:center -600px;}
|
||||
.wToolbar li.file button{ background-position:center -700px;}
|
||||
.wToolbar li.hr button{ background-position:center -800px;}
|
||||
.wToolbar li.index button{ background-position:center -900px;}
|
||||
.wToolbar li.material button{ background-position:center -1000px;}
|
||||
.wToolbar li.help button{ background-position:center -1100px;}
|
||||
.wToolbar li.more button{ background-position:center -1187px;}
|
||||
.wToolbar li.hx button{background-position:center top}
|
||||
.wToolbar li.txt button{background-position:center -100px}
|
||||
.wToolbar li.link button{background-position:center -200px}
|
||||
.wToolbar li.list button{background-position:center -300px}
|
||||
.wToolbar li.quote button{background-position:center -400px}
|
||||
.wToolbar li.img button{background-position:center -500px}
|
||||
.wToolbar li.movie button{background-position:center -600px}
|
||||
.wToolbar li.file button{background-position:center -700px}
|
||||
.wToolbar li.hr button{background-position:center -800px}
|
||||
.wToolbar li.index button{background-position:center -900px}
|
||||
.wToolbar li.material button{background-position:center -1000px}
|
||||
.wToolbar li.help button{background-position:center -1100px}
|
||||
.wToolbar li.more button{background-position:center -1187px}
|
||||
|
||||
.wToolbar li .dragable{ position:absolute; display:none; bottom:38px; right:0; padding:0; border:0; width:20px; height:20px; overflow:hidden; background:url(../img/iconMovable.gif) no-repeat center center !important; cursor:move; font-size:0; line-height:0; text-indent:-200%;}
|
||||
.wToolbarContainer.more li.hover .dragable{ _display:block;}
|
||||
.wToolbarContainer.more li:hover .dragable{ display:block;}
|
||||
.wToolbar li .nx{ position:absolute; text-align:center; top:8px; left:50%; font:bold 10px Tahoma, Geneva, sans-serif; color:#fff; width:18px; height:18px; line-height:16px; opacity:.7; background:url(../img/bgShortcut.png) no-repeat center top; _background:none; _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='./modules/editor/skins/dreditor/img/bgShortcut.png', sizingMethod='crop');}
|
||||
.wToolbar li .dragable{position:absolute;display:none;bottom:38px;right:0;padding:0;border:0;width:20px;height:20px;overflow:hidden;background:url(../img/iconMovable.gif) no-repeat center center!important;cursor:move;font-size:0;line-height:0;text-indent:-200%}
|
||||
.wToolbarContainer.more li.hover .dragable{_display:block}
|
||||
.wToolbarContainer.more li:hover .dragable{display:block}
|
||||
.wToolbar li .nx{position:absolute;text-align:center;top:8px;left:50%;font:bold 10px Tahoma, Geneva, sans-serif;color:#fff;width:18px;height:18px;line-height:16px;opacity:.7;background:url(../img/bgShortcut.png) no-repeat center top;_background:none;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='./modules/editor/skins/dreditor/img/bgShortcut.png', sizingMethod='crop')}
|
||||
|
||||
/* Writing Area + Material Area */
|
||||
.wArea,
|
||||
.mArea{ display:none; position:relative; *zoom:1; padding:20px; margin:0;}
|
||||
.wArea{ background:#f5f5f5; border:1px solid #e9e9e9;}
|
||||
.mArea{ background:url(../img/bgChess76.gif); border:1px solid #666;}
|
||||
.mArea{ margin:20px 0;}
|
||||
.mArea{display:none;position:relative;*zoom:1;padding:20px;margin:0}
|
||||
.wArea{background:#f5f5f5;border:1px solid #e9e9e9}
|
||||
.mArea{background:url(../img/bgChess76.gif);border:1px solid #666}
|
||||
.mArea{margin:20px 0}
|
||||
.wArea.open,
|
||||
.mArea.open{ display:block;}
|
||||
.mArea.open{display:block}
|
||||
.wArea .cap,
|
||||
.mArea .cap{ position:absolute; width:10px; height:10px; background-repeat:no-repeat; font-size:0; line-height:0; overflow:hidden;}
|
||||
.wArea .cap{ background-image:url(../img/bgRouningF5.gif);}
|
||||
.mArea .cap{ background-image:url(../img/bgRouning76.gif);}
|
||||
.mArea .cap{position:absolute;width:10px;height:10px;background-repeat:no-repeat;font-size:0;line-height:0;overflow:hidden}
|
||||
.wArea .cap{background-image:url(../img/bgRouningF5.gif)}
|
||||
.mArea .cap{background-image:url(../img/bgRouning76.gif)}
|
||||
.wArea .cap.capTL,
|
||||
.mArea .cap.capTL{ top:-1px; left:-1px; background-position:left top;}
|
||||
.mArea .cap.capTL{top:-1px;left:-1px;background-position:left top}
|
||||
.wArea .cap.capTR,
|
||||
.mArea .cap.capTR{ top:-1px; right:-1px; background-position:right top;}
|
||||
.mArea .cap.capTR{top:-1px;right:-1px;background-position:right top}
|
||||
.wArea .cap.capBL,
|
||||
.mArea .cap.capBL{ bottom:-1px; left:-1px; background-position:left bottom;}
|
||||
.mArea .cap.capBL{bottom:-1px;left:-1px;background-position:left bottom}
|
||||
.wArea .cap.capBR,
|
||||
.mArea .cap.capBR{ bottom:-1px; right:-1px; background-position:right bottom;}
|
||||
.mArea .cap.capBR{bottom:-1px;right:-1px;background-position:right bottom}
|
||||
.wArea .h4,
|
||||
.mArea .h4{ font-size:16px; margin:0 0 10px 0;}
|
||||
.wArea .h4{ color:#555;}
|
||||
.mArea .h4{ color:#fff;}
|
||||
.mArea .controls{ position:absolute; top:20px; right:20px;}
|
||||
.mArea .h4{font-size:16px!important;margin:0 0 10px 0!important;border:0!important;padding:0!important}
|
||||
.wArea .h4{color:#555}
|
||||
.mArea .h4{color:#fff}
|
||||
.mArea .controls{position:absolute;top:20px;right:20px}
|
||||
|
||||
/* Writing Area */
|
||||
.wArea .buttonArea{ position:relative; text-align:left; *zoom:1;}
|
||||
.wArea .buttonArea .buttonGray button{ _top:0;}
|
||||
.wArea .buttonArea .info{ display:inline; padding:0 0 0 15px; color:#777;}
|
||||
.wArea .inputTitle{ width:98%; border:1px solid #ddd; background:#fff url(../img/bgInputText.gif) no-repeat; color:#767676; padding:6px 0 0 10px; height:21px; font-size:14px; margin-bottom:10px;}
|
||||
.wArea .inputLink{ width:98%; border:1px solid #ddd; background:#fff url(../img/bgInputText.gif) no-repeat; color:#767676; padding:6px 0 0 10px; height:21px; font-size:11px; margin-bottom:10px;}
|
||||
.wArea .iText{ width:98%; border:1px solid #ddd; background:#fff url(../img/bgInputText.gif) no-repeat; color:#767676; padding:6px 0 0 10px; height:21px; font-size:12px; margin-bottom:10px;}
|
||||
.wArea .inputFile{ width:100%; border:1px solid #ddd; background:#fff url(../img/bgInputText.gif) no-repeat; color:#767676; padding:6px 0 0 10px; height:29px; font-size:12px; margin-bottom:10px;}
|
||||
.wArea .iTextArea{ width:98%; border:1px solid #ddd; background:#fff url(../img/bgInputText.gif) no-repeat; color:#767676; padding:10px 0 0 10px; height:150px; font-size:12px; line-height:1.5; margin-bottom:10px;}
|
||||
.wArea .inputRadio{ width:13px; height:13px; vertical-align:middle;}
|
||||
.wArea .hr{ border-top:1px solid #e6e6e6; border-bottom:1px solid #fff; font-size:0; line-height:0; overflow:hidden; height:0; margin:15px -20px;}
|
||||
.wArea .buttonArea{position:relative;text-align:left;*zoom:1}
|
||||
.wArea .buttonArea .buttonGray button{_top:0}
|
||||
.wArea .buttonArea .info{display:inline;padding:0 0 0 15px;color:#777}
|
||||
.wArea .inputTitle{width:98%;border:1px solid #ddd;background:#fff url(../img/bgInputText.gif) no-repeat;color:#767676;padding:6px 0 0 10px;height:21px;font-size:14px;margin-bottom:10px}
|
||||
.wArea .inputLink{width:98%;border:1px solid #ddd;background:#fff url(../img/bgInputText.gif) no-repeat;color:#767676;padding:6px 0 0 10px;height:21px;font-size:11px;margin-bottom:10px}
|
||||
.wArea .iText{width:98%;border:1px solid #ddd;background:#fff url(../img/bgInputText.gif) no-repeat;color:#767676;padding:6px 0 0 10px;height:21px;font-size:12px;margin-bottom:10px}
|
||||
.wArea .inputFile{width:100%;border:1px solid #ddd;background:#fff url(../img/bgInputText.gif) no-repeat;color:#767676;padding:6px 0 0 10px;height:29px;font-size:12px;margin-bottom:10px}
|
||||
.wArea .iTextArea{width:98%;border:1px solid #ddd;background:#fff url(../img/bgInputText.gif) no-repeat;color:#767676;padding:10px 0 0 10px;height:150px;font-size:12px;line-height:1.5;margin-bottom:10px}
|
||||
.wArea .inputRadio{width:13px;height:13px;vertical-align:middle}
|
||||
.wArea .hr{border-top:1px solid #e6e6e6;border-bottom:1px solid #fff;font-size:0;line-height:0;overflow:hidden;height:0;margin:15px -20px}
|
||||
|
||||
/* Material Area */
|
||||
.mArea .reload{ position:absolute; top:24px; right:40px; width:15px; height:16px; padding:0; cursor:pointer; border:0; *margin:0 5px 0 0; background:transparent url(../img/buttonRefresh.gif) no-repeat; vertical-align:middle;}
|
||||
.mArea .reload span{ position:absolute; width:0; height:0; font-size:0; line-height:0; overflow:hidden; z-index:-1; visibility:hidden;}
|
||||
.mArea .close{ position:absolute; top:24px; right:20px; width:15px; height:16px; padding:0; cursor:pointer; border:0; *margin:0 5px 0 0; background:transparent url(../img/buttonClose.gif) no-repeat; vertical-align:middle;}
|
||||
.mArea .close span{ position:absolute; width:0; height:0; font-size:0; line-height:0; overflow:hidden; z-index:-1; visibility:hidden;}
|
||||
.mArea .noData{ position:relative; border-top:1px solid #ddd; border-bottom:1px solid #ddd; background:#fff; padding:10px 20px;}
|
||||
.mArea dl{ position:relative; background:#fff;}
|
||||
.mArea dt{ position:relative; padding:7px 15px; font-weight:bold; color:#fff; background:#555; border-top:1px solid #444;}
|
||||
.mArea dd{ margin:0 15px; padding:5px 0;}
|
||||
.mArea dd .buttonDrEditor{ position:absolute; top:8px; right:10px;}
|
||||
.mArea .eArea{ border:0; padding:0;}
|
||||
.mArea .reload{position:absolute;top:24px;right:40px;width:15px;height:16px;padding:0;cursor:pointer;border:0;*margin:0 5px 0 0;background:transparent url(../img/buttonRefresh.gif) no-repeat;vertical-align:middle}
|
||||
.mArea .reload span{position:absolute;width:0;height:0;font-size:0;line-height:0;overflow:hidden;z-index:-1;visibility:hidden}
|
||||
.mArea .close{position:absolute;top:24px;right:20px;width:15px;height:16px;padding:0;cursor:pointer;border:0;*margin:0 5px 0 0;background:transparent url(../img/buttonClose.gif) no-repeat;vertical-align:middle}
|
||||
.mArea .close span{position:absolute;width:0;height:0;font-size:0;line-height:0;overflow:hidden;z-index:-1;visibility:hidden}
|
||||
.mArea .noData{position:relative;border-top:1px solid #ddd;border-bottom:1px solid #ddd;background:#fff;padding:10px 20px}
|
||||
.mArea dl{position:relative;background:#fff}
|
||||
.mArea dt{position:relative;padding:7px 15px;font-weight:bold;color:#fff;background:#555;border-top:1px solid #444}
|
||||
.mArea dd{margin:0 15px;padding:5px 0}
|
||||
.mArea dd .buttonDrEditor{position:absolute;top:8px;right:10px}
|
||||
.mArea .eArea{border:0;padding:0}
|
||||
|
||||
.mArea .paginate{ position:relative; width:100px; margin:0 auto; text-align:center; padding:0; font-size:12px; color:#fff; *zoom:1;}
|
||||
.mArea .paginate:after{ content:""; display:block; clear:both;}
|
||||
.mArea .paginate button{ width:17px; height:17px; padding:0; background:transparent url(../img/buttonPaginate.gif) no-repeat 0 0; cursor:pointer; border:0; vertical-align:middle;}
|
||||
.mArea .paginate button span{ position:absolute; width:0; height:0; font-size:0; line-height:0; overflow:hidden; visibility:hidden; z-index:-1;}
|
||||
.mArea .paginate .prev{ float:left; background-position:left top;}
|
||||
.mArea .paginate .next{ float:right; background-position:right top;}
|
||||
.mArea .paginate{position:relative;width:100px;margin:0 auto;text-align:center;padding:0;font-size:12px;color:#fff;*zoom:1}
|
||||
.mArea .paginate:after{content:"";display:block;clear:both}
|
||||
.mArea .paginate button{width:17px;height:17px;padding:0;background:transparent url(../img/buttonPaginate.gif) no-repeat 0 0;cursor:pointer;border:0;vertical-align:middle}
|
||||
.mArea .paginate button span{position:absolute;width:0;height:0;font-size:0;line-height:0;overflow:hidden;visibility:hidden;z-index:-1}
|
||||
.mArea .paginate .prev{float:left;background-position:left top}
|
||||
.mArea .paginate .next{float:right;background-position:right top}
|
||||
|
||||
/* Writing Area Blank */
|
||||
.editorArea .wArea { display:block;}
|
||||
.wArea.blank{ padding:15px 30px; margin:0;}
|
||||
.wArea.blank dt{ font-size:12px; font-weight:bold; color:#333;}
|
||||
.wArea.blank dd{ margin:0 0 5px 0; color:#767676;}
|
||||
.wArea.blank .drEditorBugReport{ position:absolute; margin:0 !important; top:20px; right:30px;}
|
||||
.editorArea .wArea{display:block}
|
||||
.wArea.blank{padding:15px 30px;margin:0}
|
||||
.wArea.blank dt{font-size:12px;font-weight:bold;color:#333}
|
||||
.wArea.blank dd{margin:0 0 5px 0;color:#767676}
|
||||
.wArea.blank .drEditorBugReport{position:absolute;margin:0!important;top:20px;right:30px}
|
||||
|
||||
/* Writing Area Hx */
|
||||
.wArea.hx ul{ margin:0 0 5px 0; padding:0; list-style:none;}
|
||||
.wArea.hx li{ display:inline !important; font-weight:bold !important; color:#333 !important;}
|
||||
.wArea.hx li label{ margin-right:30px;}
|
||||
.wArea.hx .inputTitle{ font-weight:bold !important;}
|
||||
.wArea.hx ul{margin:0 0 5px 0;padding:0;list-style:none}
|
||||
.wArea.hx li{display:inline!important;font-weight:bold!important;color:#333!important;border:0;padding:0}
|
||||
.wArea.hx li label{margin:0 30px 0 0;display:inline}
|
||||
.wArea.hx .inputTitle{font-weight:bold!important}
|
||||
.wArea.hx li.h3,
|
||||
.wArea.hx .inputTitle.h3{ font-size:18px !important; height:28px;}
|
||||
.wArea.hx .inputTitle.h3{font-size:18px!important;height:28px}
|
||||
.wArea.hx li.h4,
|
||||
.wArea.hx .inputTitle.h4{ font-size:16px !important; height:26px;}
|
||||
.wArea.hx .inputTitle.h4{font-size:16px!important;height:26px}
|
||||
.wArea.hx li.h5,
|
||||
.wArea.hx .inputTitle.h5{ font-size:13px !important; height:23px;}
|
||||
.wArea.hx .inputTitle.h5{font-size:13px!important;height:23px}
|
||||
|
||||
/* Writing Area List */
|
||||
.wArea.list .toolbar{ border:1px solid #ddd; list-style:none; margin:0 0 -1px 0; padding:0; background:#fafafa; padding:6px 20px;}
|
||||
.wArea.list .toolbar li{ display:inline; margin-right:5px;}
|
||||
.wArea.list .toolbar li button{ position:relative; width:23px; height:22px; padding:0; border:0; cursor:pointer; background-image:url(../img/buttonListToolbar.gif); background-repeat:no-repeat;}
|
||||
.wArea.list .toolbar{border:1px solid #ddd;list-style:none;margin:0 0 -1px 0;padding:0;background:#fafafa;padding:6px 20px}
|
||||
.wArea.list .toolbar li{display:inline;margin-right:5px}
|
||||
.wArea.list .toolbar li button{position:relative;width:23px;height:22px;padding:0;border:0;cursor:pointer;background-image:url(../img/buttonListToolbar.gif);background-repeat:no-repeat}
|
||||
.wArea.list .toolbar li button:hover,
|
||||
.wArea.list .toolbar li button:active,
|
||||
.wArea.list .toolbar li button:focus{ border:1px solid #ddd;}
|
||||
.wArea.list .toolbar li button.type_disc{ background-position:center 0;}
|
||||
.wArea.list .toolbar li button.type_circle{ background-position:center -30px;}
|
||||
.wArea.list .toolbar li button.type_square{ background-position:center -60px;}
|
||||
.wArea.list .toolbar li button.type_decimal{ background-position:center -90px;}
|
||||
.wArea.list .toolbar li button.type_lower-alpha{ background-position:center -120px;}
|
||||
.wArea.list .toolbar li button.type_upper-alpha{ background-position:center -150px;}
|
||||
.wArea.list .toolbar li button.type_lower-roman{ background-position:center -180px;}
|
||||
.wArea.list .toolbar li button.type_upper-roman{ background-position:center -210px;}
|
||||
.wArea.list .toolbar li button span{ position:absolute; width:0; height:0; font-size:0; line-height:0; overflow:hidden; visibility:hidden;}
|
||||
.wArea.list .toolbar li button:focus{border:1px solid #ddd}
|
||||
.wArea.list .toolbar li button.type_disc{background-position:center 0}
|
||||
.wArea.list .toolbar li button.type_circle{background-position:center -30px}
|
||||
.wArea.list .toolbar li button.type_square{background-position:center -60px}
|
||||
.wArea.list .toolbar li button.type_decimal{background-position:center -90px}
|
||||
.wArea.list .toolbar li button.type_lower-alpha{background-position:center -120px}
|
||||
.wArea.list .toolbar li button.type_upper-alpha{background-position:center -150px}
|
||||
.wArea.list .toolbar li button.type_lower-roman{background-position:center -180px}
|
||||
.wArea.list .toolbar li button.type_upper-roman{background-position:center -210px}
|
||||
.wArea.list .toolbar li button span{position:absolute;width:0;height:0;font-size:0;line-height:0;overflow:hidden;visibility:hidden}
|
||||
|
||||
.wArea.list .listArea{ padding:1em 0; margin-bottom:1em; background:#fff url(../img/bgInputText.gif) no-repeat; border:1px solid #ddd;}
|
||||
.wArea.list .listArea ul{ border:0;}
|
||||
.wArea.list .listArea input{ border:0; border-bottom:1px solid #ddd; background:transparent; width:96%; padding:3px 4px;}
|
||||
.wArea.list .listArea{padding:1em 0;margin-bottom:1em;background:#fff url(../img/bgInputText.gif) no-repeat;border:1px solid #ddd}
|
||||
.wArea.list .listArea ul{border:0}
|
||||
.wArea.list .listArea input{border:0;border-bottom:1px solid #ddd;background:transparent;width:96%;padding:3px 4px}
|
||||
|
||||
/* Writing Area Image */
|
||||
.wArea.img .image{ position:relative; margin-bottom:10px; background:#fff; padding:0; _width:100%; overflow:hidden;}
|
||||
.wArea.img .image img{ max-width:100%;}
|
||||
.wArea.img .uploading{ display:none; padding:0 0 0 20px; background:url(../img/iconLoading.gif) no-repeat left center;}
|
||||
.wArea.img .uploading button{ border:2px solid #ccc; background:#eee; cursor:pointer; font-size:11px; font-weight:bold; padding:0; overflow:visible; vertical-align:middle; margin:0 10px;}
|
||||
.wArea.img .info{ font-size:11px; color:#737fa1; margin:0;}
|
||||
.wArea.img .resize{ display:none;}
|
||||
.wArea.img .resize.open{ display:block;}
|
||||
.wArea.img .resize dl *{ vertical-align:middle;}
|
||||
.wArea.img .resize dt{ display:inline; font-weight:bold;}
|
||||
.wArea.img .resize dd{ display:inline; margin:0;}
|
||||
.wArea.img .resize .width{ width:60px; text-align:right; padding:1px 4px; height:16px;}
|
||||
.wArea.img .resize .width.original{ background:#d4d0c8;}
|
||||
.wArea.img .resize .resizeInfo{ margin:0 0 0 1em;}
|
||||
.wArea.img .resize .resizeError{ display:none; padding:.5em 3.5em; margin:1em 6px 1em 0; color:#ff6633; background:#fff url(../img/iconCheckSmall.gif) no-repeat 2em center;; border:1px solid #ddd;}
|
||||
.wArea.img .resize .resizeError.open{ display:block;}
|
||||
.wArea.img .align{ display:none;}
|
||||
.wArea.img .align dt{ display:inline; font-weight:bold;}
|
||||
.wArea.img .align dd{ display:inline; margin:0;}
|
||||
.wArea.img .image{position:relative;margin-bottom:10px;background:#fff;padding:0;_width:100%;overflow:hidden}
|
||||
.wArea.img .image img{max-width:100%}
|
||||
.wArea.img .uploading{display:none;padding:0 0 0 20px;background:url(../img/iconLoading.gif) no-repeat left center}
|
||||
.wArea.img .uploading button{border:2px solid #ccc;background:#eee;cursor:pointer;font-size:11px;font-weight:bold;padding:0;overflow:visible;vertical-align:middle;margin:0 10px}
|
||||
.wArea.img .info{font-size:11px;color:#737fa1;margin:0}
|
||||
.wArea.img .resize{display:none}
|
||||
.wArea.img .resize.open{display:block}
|
||||
.wArea.img .resize dl{margin:1em 0}
|
||||
.wArea.img .resize dl *{vertical-align:middle}
|
||||
.wArea.img .resize dt{display:inline;font-weight:bold}
|
||||
.wArea.img .resize dd{display:inline;margin:0}
|
||||
.wArea.img .resize .width{width:60px;text-align:right;padding:1px 4px;height:16px;margin:0}
|
||||
.wArea.img .resize .width.original{background:#d4d0c8}
|
||||
.wArea.img .resize .resizeInfo{margin:0 0 0 1em}
|
||||
.wArea.img .resize .resizeError{display:none;padding:.5em 3.5em;margin:1em 6px 1em 0;color:#ff6633;background:#fff url(../img/iconCheckSmall.gif) no-repeat 2em center;;border:1px solid #ddd}
|
||||
.wArea.img .resize .resizeError.open{display:block}
|
||||
.wArea.img .align dl{margin:1em 0}
|
||||
.wArea.img .align{display:none}
|
||||
.wArea.img .align dt{display:inline;font-weight:bold}
|
||||
.wArea.img .align dd{display:inline;margin:0}
|
||||
.wArea.img .align dd label{display:inline;margin:0 10px 0 0}
|
||||
|
||||
/* Writing Area File */
|
||||
.wArea.file .buttonFileUpload,
|
||||
.wArea.file .buttonFileUpload button{ position:relative; display:inline-block; height:39px; background-color:transparent; background-image:url(../img/buttonUpload.gif); background-repeat:no-repeat; cursor:pointer;}
|
||||
.wArea.file .buttonFileUpload{ background-position:left top;}
|
||||
.wArea.file .buttonFileUpload button{ left:7px; border:0; padding:0 15px 0 25px; background-position:right top; font-size:12px; font-weight:bold; color:#fff; line-height:39px; overflow:visible;}
|
||||
.wArea.file .buttonFileUpload .swfupload{ margin:0 !important; cursor:pointer;}
|
||||
.wArea.file .info{ font-size:11px; color:#737fa1;}
|
||||
.wArea.file .info .help{ position:relative; font-size:11px; border:0; background:none; padding:0; cursor:pointer; *zoom:1; color:#f66; overflow:visible;}
|
||||
.wArea.file .inputFile{ display:none;}
|
||||
.wArea.file .inputFile.open{ display:block;}
|
||||
.wArea.file dl{ margin:0; padding:0;}
|
||||
.wArea.file dd{ font-size:11px; margin-bottom:3px; margin:0;}
|
||||
.wArea.file dd strong{ margin-right:15px; color:#555; font-weight:normal;}
|
||||
.wArea.file dd em{ color:#767676; font-style:normal; margin-right:15px;}
|
||||
.wArea.file dd .buttonDelete{ border:0; padding:0; width:17px; height:17px; vertical-align:middle; cursor:pointer; background:url(../img/buttonTableDataX.gif) no-repeat center center;}
|
||||
.wArea.file dd .buttonDelete span{ position:absolute; width:0; height:0; overflow:hidden; font-size:0; line-height:0; z-index:-1; visibility:hidden;}
|
||||
.wArea.file .summary{ text-align:right; font-size:11px;}
|
||||
.wArea.file .summary{ color:#555;}
|
||||
.wArea.file .summary em{ color:#767676; font-style:normal; margin-left:10px;}
|
||||
.wArea.file .buttonFileUpload button{position:relative;display:inline-block;height:39px;background-color:transparent;background-image:url(../img/buttonUpload.gif);background-repeat:no-repeat;cursor:pointer}
|
||||
.wArea.file .buttonFileUpload{background-position:left top}
|
||||
.wArea.file .buttonFileUpload button{left:7px;border:0;padding:0 15px 0 25px;background-position:right top;font-size:12px;font-weight:bold;color:#fff;line-height:39px;overflow:visible}
|
||||
.wArea.file .buttonFileUpload .swfupload{margin:0!important;cursor:pointer}
|
||||
.wArea.file .info{font-size:11px;color:#737fa1}
|
||||
.wArea.file .info .help{position:relative;font-size:11px;border:0;background:none;padding:0;cursor:pointer;*zoom:1;color:#f66;overflow:visible}
|
||||
.wArea.file .inputFile{display:none}
|
||||
.wArea.file .inputFile.open{display:block}
|
||||
.wArea.file dl{margin:0;padding:0}
|
||||
.wArea.file dd{font-size:11px;margin-bottom:3px;margin:0}
|
||||
.wArea.file dd strong{margin-right:15px;color:#555;font-weight:normal}
|
||||
.wArea.file dd em{color:#767676;font-style:normal;margin-right:15px}
|
||||
.wArea.file dd .buttonDelete{border:0;padding:0;width:17px;height:17px;vertical-align:middle;cursor:pointer;background:url(../img/buttonTableDataX.gif) no-repeat center center}
|
||||
.wArea.file dd .buttonDelete span{position:absolute;width:0;height:0;overflow:hidden;font-size:0;line-height:0;z-index:-1;visibility:hidden}
|
||||
.wArea.file .summary{text-align:right;font-size:11px}
|
||||
.wArea.file .summary{color:#555}
|
||||
.wArea.file .summary em{color:#767676;font-style:normal;margin-left:10px}
|
||||
|
||||
/* Writing Area Hr */
|
||||
.wArea.hr ul{ margin:0 0 20px 0; padding:0; list-style:none; font-size:12px; color:#555; *zoom:1;}
|
||||
.wArea.hr li{ position:relative; margin-bottom:10px; *zoom:1;}
|
||||
.wArea.hr li label{ position:relative; background:#f5f5f5; padding:0 15px 0 30px; margin-left:-30px; z-index:1; display:none;}
|
||||
.wArea.hr li .inputRadio{ position:relative; z-index:10; display:none;}
|
||||
.wArea.hr ul{margin:0 0 20px 0;padding:0;list-style:none;font-size:12px;color:#555;*zoom:1}
|
||||
.wArea.hr li{position:relative;margin-bottom:10px;*zoom:1}
|
||||
.wArea.hr li label{position:relative;background:#f5f5f5;padding:0 15px 0 30px;margin-left:-30px;z-index:1;display:none}
|
||||
.wArea.hr li .inputRadio{position:relative;z-index:10;display:none}
|
||||
.wArea.hr .inputToggle,
|
||||
.wArea.hr .inputContinue{ position:absolute; top:0; border:1px solid #ddd; font-size:12px; color:#767676; width:150px; padding:3px 4px; height:14px; text-align:right; background-image:url(../img/bgInputText.gif); background-repeat:no-repeat;}
|
||||
.wArea.hr .inputShow{ right:170px;}
|
||||
.wArea.hr .inputContinue{position:absolute;top:0;border:1px solid #ddd;font-size:12px;color:#767676;width:150px;padding:3px 4px;height:14px;text-align:right;background-image:url(../img/bgInputText.gif);background-repeat:no-repeat}
|
||||
.wArea.hr .inputShow{right:170px}
|
||||
.wArea.hr .inputHide,
|
||||
.wArea.hr .inputContinue{ right:0;}
|
||||
.wArea.hr .hRule{ position:absolute; width:100%; top:50%; left:0; display:block; border-top:1px solid #e6e6e6; border-bottom:1px solid #fff; font-size:0; line-height:0; overflow:hidden; height:0;}
|
||||
.wArea.hr .inputContinue{right:0}
|
||||
.wArea.hr .hRule{position:absolute;width:100%;top:50%;left:0;display:block;border-top:1px solid #e6e6e6;border-bottom:1px solid #fff;font-size:0;line-height:0;overflow:hidden;height:0}
|
||||
|
||||
/* Edit Area */
|
||||
.eArea{ position:relative; padding:0 20px; margin:0; font-size:12px; border:1px solid #fff; overflow:visible !important; _zoom:1;}
|
||||
.eArea.xe_dr_hr{ padding-top:1em; padding-bottom:1em;}
|
||||
.eArea a{ color:#648AB9;}
|
||||
.eArea button.holder{ position:absolute; left:-2000px; top:0px; }
|
||||
.eArea .eTool{ display:none;}
|
||||
.eArea .eFocusTrigger{ position:absolute; top:0; left:0; font-size:0; line-height:0; border:0; background:transparent; width:1px; height:1px; overflow:hidden; opacity:0; filter:alpha(opacity=0);}
|
||||
.eArea .eFocusTrigger:focus{ border:1px solid;}
|
||||
.eArea .del{ display:none; position:absolute; top:0; right:20px; border:0; padding:0; width:20px; height:20px; cursor:pointer; background:transparent url(../img/buttonTableDataX.gif) no-repeat center;}
|
||||
.eArea .del span{position:absolute; width:0; height:0; overflow:hidden; font-size:0; line-height:0; z-index:-1; visibility:hidden;}
|
||||
.eArea{position:relative;padding:0 20px;margin:0;font-size:12px;border:1px solid #fff;overflow:visible!important;_zoom:1}
|
||||
.eArea.xe_dr_hr{padding-top:1em;padding-bottom:1em}
|
||||
.eArea a{color:#648AB9}
|
||||
.eArea button.holder{position:absolute;left:-2000px;top:0px}
|
||||
.eArea .eTool{display:none}
|
||||
.eArea .eFocusTrigger{position:absolute;top:0;left:0;font-size:0;line-height:0;border:0;background:transparent;width:1px;height:1px;overflow:hidden;opacity:0;filter:alpha(opacity=0)}
|
||||
.eArea .eFocusTrigger:focus{border:1px solid}
|
||||
.eArea .del{display:none;position:absolute;top:0;right:20px;border:0;padding:0;width:20px;height:20px;cursor:pointer;background:transparent url(../img/buttonTableDataX.gif) no-repeat center}
|
||||
.eArea .del span{position:absolute;width:0;height:0;overflow:hidden;font-size:0;line-height:0;z-index:-1;visibility:hidden}
|
||||
|
||||
.eArea.xe_dr_img p{ overflow:hidden; width:100%;}
|
||||
.eArea.xe_dr_img p img{ *padding:1em 0;}
|
||||
.eArea.xe_dr_img p{overflow:hidden;width:100%}
|
||||
.eArea.xe_dr_img p img{*padding:1em 0}
|
||||
|
||||
.eFocus{ border:1px solid #d8d8de; z-index:999; background:#f9f9f9;}
|
||||
.eArea .cap{ display:none;}
|
||||
.eFocus .cap{ display:none; *display:block; position:absolute; width:10px; height:10px; background-repeat:no-repeat; font-size:0; line-height:0; overflow:hidden;}
|
||||
.eFocus .cap.capTL{ top:-1px; left:-1px; background-position:left top;}
|
||||
.eFocus .cap.capTR{ top:-1px; right:-1px; background-position:right top;}
|
||||
.eFocus .cap.capBL{ bottom:-1px; left:-1px; background-position:left bottom;}
|
||||
.eFocus .cap.capBR{ bottom:-1px; right:-1px; background-position:right bottom;}
|
||||
.eFocus{border:1px solid #d8d8de;z-index:999;background:#f9f9f9}
|
||||
.eArea .cap{display:none}
|
||||
.eFocus .cap{display:none;*display:block;position:absolute;width:10px;height:10px;background-repeat:no-repeat;font-size:0;line-height:0;overflow:hidden}
|
||||
.eFocus .cap.capTL{top:-1px;left:-1px;background-position:left top}
|
||||
.eFocus .cap.capTR{top:-1px;right:-1px;background-position:right top}
|
||||
.eFocus .cap.capBL{bottom:-1px;left:-1px;background-position:left bottom}
|
||||
.eFocus .cap.capBR{bottom:-1px;right:-1px;background-position:right bottom}
|
||||
|
||||
.eFocus .eTool{ display:block; height:24px; position:absolute !important; z-index:99; top:-24px !important; left:-1px !important; white-space:nowrap; margin:0 0 0 2px !important; padding:0 5px 0 0 !important; border:0 !important; background:url(../img/bgEtool.gif) no-repeat right top !important;}
|
||||
.eFocus .eTool li{ position:relative; left:-2px; display:block; float:left; height:22px; padding:2px 3px 0 5px; background:url(../img/vrContentNavigation.gif) no-repeat left center;}
|
||||
.eFocus .eTool li.edit{ background:url(../img/bgEtool.gif) no-repeat left top;}
|
||||
.eFocus .eTool li button{ border:0; padding:0; overflow:visible; cursor:pointer; background-color:transparent; font-size:11px; vertical-align:middle;}
|
||||
.eFocus .eTool{display:block;height:24px;position:absolute!important;z-index:99;top:-24px!important;left:-1px!important;white-space:nowrap;margin:0 0 0 2px!important;padding:0 5px 0 0!important;border:0!important;background:url(../img/bgEtool.gif) no-repeat right top!important}
|
||||
.eFocus .eTool li{position:relative;left:-2px;display:block;float:left;height:22px;padding:2px 3px 0 5px;background:url(../img/vrContentNavigation.gif) no-repeat left center}
|
||||
.eFocus .eTool li.edit{background:url(../img/bgEtool.gif) no-repeat left top}
|
||||
.eFocus .eTool li button{border:0;padding:0;overflow:visible;cursor:pointer;background-color:transparent;font-size:11px;vertical-align:middle}
|
||||
.eFocus .eTool li.move button,
|
||||
.eFocus .eTool li.delete button{ overflow:hidden; width:17px; height:17px; background-position:center center; background-repeat:no-repeat;}
|
||||
.eFocus .eTool li.move button{ background-image:url(../img/iconMovable.gif); cursor:move;}
|
||||
.eFocus .eTool li.delete button{ background-image:url(../img/buttonWasteBox.gif);}
|
||||
.eFocus .eTool li.delete button{overflow:hidden;width:17px;height:17px;background-position:center center;background-repeat:no-repeat}
|
||||
.eFocus .eTool li.move button{background-image:url(../img/iconMovable.gif);cursor:move}
|
||||
.eFocus .eTool li.delete button{background-image:url(../img/buttonWasteBox.gif)}
|
||||
.eFocus .eTool li.move button span,
|
||||
.eFocus .eTool li.delete button span{ position:absolute; width:0; height:0; overflow:hidden; font-size:0; line-height:0; z-index:-1; visibility:hidden;}
|
||||
.eFocus .del{ display:block;}
|
||||
.eFocus .eTool li.delete button span{position:absolute;width:0;height:0;overflow:hidden;font-size:0;line-height:0;z-index:-1;visibility:hidden}
|
||||
.eFocus .del{display:block}
|
||||
|
||||
/* txEditor */
|
||||
.txEditor{ position:relative; width:98%; padding-right:10px; margin-bottom:10px; border:1px solid #ddd; *zoom:1; background:#fff;}
|
||||
.txEditor .toolbar{ position:relative; z-index:10; margin:0 -10px 0 0; padding:6px 10px; list-style:none; *zoom:1; background:#fafafa; border-bottom:1px solid #ddd;}
|
||||
.txEditor .toolbar:after{ content:""; display:block; clear:both;}
|
||||
.txEditor .toolbar li{ position:relative; float:left; margin-right:5px;}
|
||||
.txEditor .toolbar li button{ border:0; padding:0; height:22px; background-color:transparent; background-image:url(../img/buttonEditorToolbar.gif); background-repeat:no-repeat; cursor:pointer; vertical-align:middle;}
|
||||
.txEditor{position:relative;width:98%;padding-right:10px;margin-bottom:10px;border:1px solid #ddd;*zoom:1;background:#fff}
|
||||
.txEditor .toolbar{position:relative;z-index:10;margin:0 -10px 0 0;padding:6px 10px;list-style:none;*zoom:1;background:#fafafa;border-bottom:1px solid #ddd}
|
||||
.txEditor .toolbar:after{content:"";display:block;clear:both}
|
||||
.txEditor .toolbar li{position:relative;float:left;margin-right:5px}
|
||||
.txEditor .toolbar li button{border:0;padding:0;height:22px;background-color:transparent;background-image:url(../img/buttonEditorToolbar.gif);background-repeat:no-repeat;cursor:pointer;vertical-align:middle}
|
||||
.txEditor .toolbar li button:hover,
|
||||
.txEditor .toolbar li button:active,
|
||||
.txEditor .toolbar li button:focus,
|
||||
.txEditor .toolbar li button.active{ border:1px solid #ddd;}
|
||||
.txEditor .toolbar li button span{ position:absolute; width:0; height:0; overflow:hidden; font-size:0; line-height:0; z-index:-1; visibility:hidden;}
|
||||
.txEditor .toolbar li select{ font-size:12px; vertical-align:middle; height:21px;}
|
||||
.txEditor .toolbar li.undo button{ width:23px; background-position:center -210px;}
|
||||
.txEditor .toolbar li.redo button{ width:23px; background-position:center -240px;}
|
||||
.txEditor .toolbar li.strong button{ width:23px; background-position:center 0;}
|
||||
.txEditor .toolbar li.em button{ width:23px; background-position:center -30px;}
|
||||
.txEditor .toolbar li.underline button{ width:23px; background-position:center -60px;}
|
||||
.txEditor .toolbar li.del button{ width:23px; background-position:center -90px;}
|
||||
.txEditor .toolbar li.vRule{ padding-left:10px; margin:0 5px; background:url(../img/vrEditorToolbar.gif) no-repeat left center;}
|
||||
.txEditor .toolbar li.aHref button{ width:23px; background-position:center -120px;}
|
||||
.txEditor .toolbar li.fSize{ margin-right:5px;}
|
||||
.txEditor .toolbar li.fColor{ margin-right:5px; z-index:2;}
|
||||
.txEditor .toolbar li.fColor button{ width:28px; background-position:center -150px;}
|
||||
.txEditor .toolbar li.bgColor{ margin-right:5px; z-index:1;}
|
||||
.txEditor .toolbar li.bgColor button{ width:28px; background-position:center -180px;}
|
||||
.txEditor .toolbar li.left button{ width:23px; background-position:center -270px;}
|
||||
.txEditor .toolbar li.center button{ width:23px; background-position:center -300px;}
|
||||
.txEditor .toolbar li.right button{ width:23px; background-position:center -330px;}
|
||||
.txEditor .toolbar li.justify button{ width:23px; background-position:center -360px;}
|
||||
.txEditor .toolbar li.character button{ width:23px; background-position:center -390px;}
|
||||
.txEditor .toolbar li.list button{ width:23px; background-image:url(../img/buttonListToolbar.gif); background-repeat:no-repeat;}
|
||||
.txEditor .toolbar li.disc button{ background-position:center 0;}
|
||||
.txEditor .toolbar li.circle button{ background-position:center -30px;}
|
||||
.txEditor .toolbar li.square button{ background-position:center -60px;}
|
||||
.txEditor .toolbar li.decimal button{ background-position:center -90px;}
|
||||
.txEditor .toolbar li.alphaLower button{ background-position:center -120px;}
|
||||
.txEditor .toolbar li.alphaUpper button{ background-position:center -150px;}
|
||||
.txEditor .toolbar li.romanLower button{ background-position:center -180px;}
|
||||
.txEditor .toolbar li.romanUpper button{ background-position:center -210px;}
|
||||
.txEditor .toolbar li .uri{ display:none; position:absolute; left:10px; top:25px; padding:15px 20px; border:1px solid #ddd; background:#fff; *zoom:1; *white-space:nowrap;}
|
||||
.txEditor .toolbar li .uri h3{ font-size:12px; margin:0 0 .5em 0;}
|
||||
.txEditor .toolbar li .uri .link{ border:1px solid #ccc; padding:3px 4px; height:14px; font-size:12px; width:200px; font-size:11px; color:#666;}
|
||||
.txEditor .toolbar li .uri p{ margin:.5em 0;}
|
||||
.txEditor .toolbar li .uri p input{ width:13px; height:13px; margin:0 3px 0 0; vertical-align:middle;}
|
||||
.txEditor .toolbar li .uri .btn_area{ text-align:center;}
|
||||
.txEditor .toolbar li button.active{border:1px solid #ddd}
|
||||
.txEditor .toolbar li button span{position:absolute;width:0;height:0;overflow:hidden;font-size:0;line-height:0;z-index:-1;visibility:hidden}
|
||||
.txEditor .toolbar li select{font-size:12px;vertical-align:middle;height:21px;width:auto;margin:0}
|
||||
.txEditor .toolbar li.undo button{width:23px;background-position:center -210px}
|
||||
.txEditor .toolbar li.redo button{width:23px;background-position:center -240px}
|
||||
.txEditor .toolbar li.strong button{width:23px;background-position:center 0}
|
||||
.txEditor .toolbar li.em button{width:23px;background-position:center -30px}
|
||||
.txEditor .toolbar li.underline button{width:23px;background-position:center -60px}
|
||||
.txEditor .toolbar li.del button{width:23px;background-position:center -90px}
|
||||
.txEditor .toolbar li.vRule{padding-left:10px;margin:0 5px;background:url(../img/vrEditorToolbar.gif) no-repeat left center}
|
||||
.txEditor .toolbar li.aHref button{width:23px;background-position:center -120px}
|
||||
.txEditor .toolbar li.fSize{margin-right:5px}
|
||||
.txEditor .toolbar li.fColor{margin-right:5px;z-index:2}
|
||||
.txEditor .toolbar li.fColor button{width:28px;background-position:center -150px}
|
||||
.txEditor .toolbar li.bgColor{margin-right:5px;z-index:1}
|
||||
.txEditor .toolbar li.bgColor button{width:28px;background-position:center -180px}
|
||||
.txEditor .toolbar li.left button{width:23px;background-position:center -270px}
|
||||
.txEditor .toolbar li.center button{width:23px;background-position:center -300px}
|
||||
.txEditor .toolbar li.right button{width:23px;background-position:center -330px}
|
||||
.txEditor .toolbar li.justify button{width:23px;background-position:center -360px}
|
||||
.txEditor .toolbar li.character button{width:23px;background-position:center -390px}
|
||||
.txEditor .toolbar li.list button{width:23px;background-image:url(../img/buttonListToolbar.gif);background-repeat:no-repeat}
|
||||
.txEditor .toolbar li.disc button{background-position:center 0}
|
||||
.txEditor .toolbar li.circle button{background-position:center -30px}
|
||||
.txEditor .toolbar li.square button{background-position:center -60px}
|
||||
.txEditor .toolbar li.decimal button{background-position:center -90px}
|
||||
.txEditor .toolbar li.alphaLower button{background-position:center -120px}
|
||||
.txEditor .toolbar li.alphaUpper button{background-position:center -150px}
|
||||
.txEditor .toolbar li.romanLower button{background-position:center -180px}
|
||||
.txEditor .toolbar li.romanUpper button{background-position:center -210px}
|
||||
.txEditor .toolbar li .uri{display:none;position:absolute;left:10px;top:25px;padding:15px 20px;border:1px solid #ddd;background:#fff;*zoom:1;*white-space:nowrap}
|
||||
.txEditor .toolbar li .uri h3{font-size:12px;margin:0 0 .5em 0}
|
||||
.txEditor .toolbar li .uri .link{border:1px solid #ccc;padding:3px 4px;height:14px;font-size:12px;width:200px;font-size:11px;color:#666}
|
||||
.txEditor .toolbar li .uri p{margin:.5em 0}
|
||||
.txEditor .toolbar li .uri p input{width:13px;height:13px;margin:0 3px 0 0;vertical-align:middle}
|
||||
.txEditor .toolbar li .uri .btn_area{text-align:center}
|
||||
.txEditor .toolbar li .uri .btn_area .buttonGray,
|
||||
.txEditor .toolbar li .uri .btn_area .buttonGray button{ background-image:url(../img/buttonGray.gif);}
|
||||
.txEditor .toolbar li .uri .btn_area .buttonGray{ background-position:left top;}
|
||||
.txEditor .toolbar li .uri .btn_area .buttonGray button{ background-position:right top; line-height:18px; border:0 !important; width:auto; padding:0 6px 0 4px;}
|
||||
.txEditor .toolbar li .palette{ display:none; width:211px; position:absolute; left:0; top:25px; padding:8px 0 7px 8px; margin:0; list-style:none; border:1px solid #ddd; background:#fff; *zoom:1;}
|
||||
.txEditor .toolbar li .palette:after{ content:""; display:block; clear:both;}
|
||||
.txEditor .toolbar li .palette.open{ display:block;}
|
||||
.txEditor .toolbar li .palette li{ float:left; margin:0 1px 1px 0; font-size:0; line-height:0;}
|
||||
.txEditor .toolbar li .palette button{ position:relative; overflow:hidden; width:11px; height:11px;}
|
||||
.txEditor .toolbar li .palette button span{ position:absolute; width:0; height:0; overflow:hidden; font-size:0; line-height:0; z-index:-1; visibility:hidden;}
|
||||
.txEditor .inputRichText{ position:relative; margin-right:-10px; position:relative; *zoom:1; z-index:1; padding:3px 0 3px 3px; background-image:url(../img/bgInputText.gif); background-repeat:no-repeat; background-position:0 0;}
|
||||
.txEditor .inputRichText iframe{ width:100%; height:136px; border:0; overflow-x:hidden;}
|
||||
.txEditor .resizeVertical{ position:relative; margin-right:-10px; border-top:1px solid #ddd; height:10px; background:url(../img/buttonResizeVertical.gif) no-repeat center center; *zoom:1; font-size:0; line-height:0;}
|
||||
.txEditor .resizeVertical button{ width:100%; height:10px; border:0; margin:0; padding:0; background:transparent; cursor:n-resize; vertical-align:middle;}
|
||||
.txEditor .resizeVertical button span{ position:absolute; width:0; height:0; font-size:0; line-height:0; overflow:hidden; visibility:hidden; z-index:-1;}
|
||||
.txEditor .toolbar li .uri .btn_area .buttonGray button{background-image:url(../img/buttonGray.gif)}
|
||||
.txEditor .toolbar li .uri .btn_area .buttonGray{background-position:left top}
|
||||
.txEditor .toolbar li .uri .btn_area .buttonGray button{background-position:right top;line-height:18px;border:0!important;width:auto;padding:0 6px 0 4px}
|
||||
.txEditor .toolbar li .palette{display:none;width:211px;position:absolute;left:0;top:25px;padding:8px 0 7px 8px;margin:0;list-style:none;border:1px solid #ddd;background:#fff;*zoom:1}
|
||||
.txEditor .toolbar li .palette:after{content:"";display:block;clear:both}
|
||||
.txEditor .toolbar li .palette.open{display:block}
|
||||
.txEditor .toolbar li .palette li{float:left;margin:0 1px 1px 0;font-size:0;line-height:0}
|
||||
.txEditor .toolbar li .palette button{position:relative;overflow:hidden;width:11px;height:11px}
|
||||
.txEditor .toolbar li .palette button span{position:absolute;width:0;height:0;overflow:hidden;font-size:0;line-height:0;z-index:-1;visibility:hidden}
|
||||
.txEditor .inputRichText{position:relative;margin-right:-10px;position:relative;*zoom:1;z-index:1;padding:3px 0 3px 3px;background-image:url(../img/bgInputText.gif);background-repeat:no-repeat;background-position:0 0}
|
||||
.txEditor .inputRichText iframe{width:100%;height:136px;border:0;overflow-x:hidden}
|
||||
.txEditor .resizeVertical{position:relative;margin-right:-10px;border-top:1px solid #ddd;height:10px;background:url(../img/buttonResizeVertical.gif) no-repeat center center;*zoom:1;font-size:0;line-height:0}
|
||||
.txEditor .resizeVertical button{width:100%;height:10px;border:0;margin:0;padding:0;background:transparent;cursor:n-resize;vertical-align:middle}
|
||||
.txEditor .resizeVertical button span{position:absolute;width:0;height:0;font-size:0;line-height:0;overflow:hidden;visibility:hidden;z-index:-1}
|
||||
|
||||
.txEditor .toolbar li.character .layer{ width:433px; height:242px; overflow:hidden; padding:0;}
|
||||
.txEditor .toolbar li.character .layer .close{ position:absolute; background:url(../img/buttonLayerClose.gif) no-repeat center; width:20px; height:21px; top:4px; right:3px; border:0 !important;}
|
||||
.txEditor .toolbar li.character .layer ul{ margin:0; padding:0; list-style:none;}
|
||||
.txEditor .toolbar li.character .layer h3{position:absolute; width:0; height:0; overflow:hidden; visibility:hidden;}
|
||||
.txEditor .toolbar li.character .layer .nav{ position:absolute; top:8px; left:-1px; overflow:hidden; white-space:nowrap; line-height:normal;}
|
||||
.txEditor .toolbar li.character .layer .nav li{ display:inline; margin:0 -4px 0 0; padding:0 8px; background:url(../img/vr_layer_character.gif) no-repeat 0 center;}
|
||||
.txEditor .toolbar li.character .layer .nav li a{ color:#444; text-decoration:none; letter-spacing:-1px;}
|
||||
.txEditor .toolbar li.character .layer{width:433px;height:242px;overflow:hidden;padding:0}
|
||||
.txEditor .toolbar li.character .layer .close{position:absolute;background:url(../img/buttonLayerClose.gif) no-repeat center;width:20px;height:21px;top:4px;right:3px;border:0!important}
|
||||
.txEditor .toolbar li.character .layer ul{margin:0;padding:0;list-style:none}
|
||||
.txEditor .toolbar li.character .layer h3{position:absolute;width:0;height:0;overflow:hidden;visibility:hidden}
|
||||
.txEditor .toolbar li.character .layer .nav{position:absolute;top:8px;left:-1px;overflow:hidden;white-space:nowrap;line-height:normal}
|
||||
.txEditor .toolbar li.character .layer .nav li{display:inline;margin:0 -4px 0 0;padding:0 8px;background:url(../img/vr_layer_character.gif) no-repeat 0 center}
|
||||
.txEditor .toolbar li.character .layer .nav li a{color:#444;text-decoration:none;letter-spacing:-1px}
|
||||
.txEditor .toolbar li.character .layer .nav li a:hover,
|
||||
.txEditor .toolbar li.character .layer .nav li a:active,
|
||||
.txEditor .toolbar li.character .layer .nav li a:focus{ text-decoration:underline;}
|
||||
.txEditor .toolbar li.character .layer .nav li a.on{ font-weight:bold; color:#004790; display:inline;}
|
||||
.txEditor .toolbar li.character .layer .list{ position:absolute; left:7px; top:30px; width:421px; height:172px; background:url(../img/bx_character.gif) no-repeat;}
|
||||
.txEditor .toolbar li.character .layer .list li{ position:relative; top:1px; left:1px; float:left; width:20px; height:18px; margin:0 1px 1px 0;}
|
||||
.txEditor .toolbar li.character .layer .list li button{ width:20px; height:18px; background:none; padding:0; vertical-align:top;}
|
||||
.txEditor .toolbar li.character .layer .nav li a:focus{text-decoration:underline}
|
||||
.txEditor .toolbar li.character .layer .nav li a.on{font-weight:bold;color:#004790;display:inline}
|
||||
.txEditor .toolbar li.character .layer .list{position:absolute;left:7px;top:30px;width:421px;height:172px;background:url(../img/bx_character.gif) no-repeat}
|
||||
.txEditor .toolbar li.character .layer .list li{position:relative;top:1px;left:1px;float:left;width:20px;height:18px;margin:0 1px 1px 0}
|
||||
.txEditor .toolbar li.character .layer .list li button{width:20px;height:18px;background:none;padding:0;vertical-align:top}
|
||||
.txEditor .toolbar li.character .layer .list li button:hover,
|
||||
.txEditor .toolbar li.character .layer .list li button:active,
|
||||
.txEditor .toolbar li.character .layer .list li button:focus{ border:2px solid #27c11a;}
|
||||
.txEditor .toolbar li.character .layer .list li button span{ overflow:visible; font-size:12px; width:auto; height:auto; position:relative; visibility:visible; line-height:normal; z-index:1;}
|
||||
.txEditor .toolbar li.character .layer p{ position:absolute; top:212px; left:7px; margin:0 !important;}
|
||||
.txEditor .toolbar li.character .layer p *{ vertical-align:top;}
|
||||
.txEditor .toolbar li.character .layer p label{ position:relative; top:4px; margin:0 7px 0 0; color:#333; letter-spacing:-1px; line-height:normal;}
|
||||
.txEditor .toolbar li.character .layer p input{ padding:3px 0 0 4px; margin:0 4px 0 0; width:300px; height:16px; border:1px solid #acacac; border-right:1px solid #dadada; border-bottom:1px solid #dadada; font-size:12px;}
|
||||
.txEditor .toolbar li.character .layer p button{ position:relative; *top:1px; width:38px; height:21px; background:url(../img/buttonLayerConfirm.gif) no-repeat; border:0 !important;}
|
||||
.txEditor .toolbar li.character .layer .list li button:focus{border:2px solid #27c11a}
|
||||
.txEditor .toolbar li.character .layer .list li button span{overflow:visible;font-size:12px;width:auto;height:auto;position:relative;visibility:visible;line-height:normal;z-index:1}
|
||||
.txEditor .toolbar li.character .layer p{position:absolute;top:212px;left:7px;margin:0!important}
|
||||
.txEditor .toolbar li.character .layer p *{vertical-align:top}
|
||||
.txEditor .toolbar li.character .layer p label{position:relative;top:4px;margin:0 7px 0 0;color:#333;letter-spacing:-1px;line-height:normal}
|
||||
.txEditor .toolbar li.character .layer p input{padding:3px 0 0 4px;margin:0 4px 0 0;width:300px;height:16px;border:1px solid #acacac;border-right:1px solid #dadada;border-bottom:1px solid #dadada;font-size:12px}
|
||||
.txEditor .toolbar li.character .layer p button{position:relative;*top:1px;width:38px;height:21px;background:url(../img/buttonLayerConfirm.gif) no-repeat;border:0!important}
|
||||
|
||||
.txEditor .toolbar .font9px { font-size:9px }
|
||||
.txEditor .toolbar .font10px { font-size:10px }
|
||||
.txEditor .toolbar .font11px { font-size:11px }
|
||||
.txEditor .toolbar .font12px { font-size:12px }
|
||||
.txEditor .toolbar .font14px { font-size:14px }
|
||||
.txEditor .toolbar .font16px { font-size:16px }
|
||||
.txEditor .toolbar .font18px { font-size:18px }
|
||||
.txEditor .toolbar .font20px { font-size:20px }
|
||||
.txEditor .toolbar .font24px { font-size:24px }
|
||||
.txEditor .toolbar .font28px { font-size:28px }
|
||||
.txEditor .toolbar .font32px { font-size:32px }
|
||||
.txEditor .toolbar .font36px { font-size:36px }
|
||||
.txEditor .toolbar .font9px{font-size:9px }
|
||||
.txEditor .toolbar .font10px{font-size:10px }
|
||||
.txEditor .toolbar .font11px{font-size:11px }
|
||||
.txEditor .toolbar .font12px{font-size:12px }
|
||||
.txEditor .toolbar .font14px{font-size:14px }
|
||||
.txEditor .toolbar .font16px{font-size:16px }
|
||||
.txEditor .toolbar .font18px{font-size:18px }
|
||||
.txEditor .toolbar .font20px{font-size:20px }
|
||||
.txEditor .toolbar .font24px{font-size:24px }
|
||||
.txEditor .toolbar .font28px{font-size:28px }
|
||||
.txEditor .toolbar .font32px{font-size:32px }
|
||||
.txEditor .toolbar .font36px{font-size:36px }
|
||||
|
||||
/* Drag and Drop */
|
||||
.xe_dr_placeholder { background-color:#F8F4CE; margin:5px 0; height:20px; padding:10px 0; z-index:0; -moz-border-radius:5px; -webkit-border-radius:5px; z-index:1; }
|
||||
.drag_handle { position:absolute; height:100%; width:10px; top:0; opacity:.5; filter:alpha(opacity=50); background:#ddd url(../img/iconDragHandler.gif) no-repeat center; cursor:n-resize; margin:0 2px !important; padding:0 !important; border:0 !important; _zoom:1;}
|
||||
.drag_handle.left { left:0; }
|
||||
.drag_handle.right { right:0; }
|
||||
.eArea .drag_handle {display:none}
|
||||
.eFocus .drag_handle {display:block}
|
||||
.editorContainer .ui-draggable{ margin:0 0 3em 0 !important;}
|
||||
.xe_dr_placeholder{background-color:#F8F4CE;margin:5px 0;height:20px;padding:10px 0;z-index:0;-moz-border-radius:5px;-webkit-border-radius:5px;z-index:1}
|
||||
.drag_handle{position:absolute;height:100%;width:10px;top:0;opacity:.5;filter:alpha(opacity=50);background:#ddd url(../img/iconDragHandler.gif) no-repeat center;cursor:n-resize;margin:0 2px!important;padding:0!important;border:0!important;_zoom:1}
|
||||
.drag_handle.left{left:0}
|
||||
.drag_handle.right{right:0}
|
||||
.eArea .drag_handle{display:none}
|
||||
.eFocus .drag_handle{display:block}
|
||||
.editorContainer .ui-draggable{margin:0 0 3em 0!important}
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
@charset "utf-8";
|
||||
/* NHN (developers@xpressengine.com) */
|
||||
|
||||
html, body { height:100%; background-color:transparent; padding:0; margin:0;}
|
||||
body{ margin:1em;}
|
||||
.xe_content{ color:#000; font-size:12px; line-height:1.5;}
|
||||
html,body{height:100%;background-color:transparent}
|
||||
body{margin:1em;color:#000;font-size:12px;line-height:1.5}
|
||||
|
|
@ -1,52 +1,51 @@
|
|||
@charset "utf-8";
|
||||
/* NHN (developers@xpressengine.com) */
|
||||
@charset "utf-8";
|
||||
|
||||
/* textyleContent */
|
||||
.textyleContent{ font-size:12px; line-height:1.6; clear:both;}
|
||||
.textyleContent h1{ font-size:24px;}
|
||||
.textyleContent h2{ font-size:20px;}
|
||||
.textyleContent h3{ font-size:18px;}
|
||||
.textyleContent h4{ font-size:16px;}
|
||||
.textyleContent h5{ font-size:14px;}
|
||||
.textyleContent h6{ font-size:12px;}
|
||||
.textyleContent{font-size:12px;line-height:1.6;clear:both}
|
||||
.textyleContent h1{font-size:24px}
|
||||
.textyleContent h2{font-size:20px}
|
||||
.textyleContent h3{font-size:18px}
|
||||
.textyleContent h4{font-size:16px}
|
||||
.textyleContent h5{font-size:14px}
|
||||
.textyleContent h6{font-size:12px}
|
||||
|
||||
/* Attached File */
|
||||
.textyleContent dl.attachedFile { margin:1em 0; padding:1em 0; background:#f9f9f9; border:1px solid #eee; }
|
||||
.textyleContent dl.attachedFile dt { padding:0 2em .5em 2em; margin:0 0 1em 0; font-weight:bold; text-indent:1em; border-bottom:1px solid #eee; background:#f9f9f9 url(../img/iconClip.gif) no-repeat 2em .3em; font-size:12px;}
|
||||
.textyleContent dl.attachedFile em{ font-size:11px; font-weight:normal; font-style:normal; margin:0 5px;}
|
||||
.textyleContent dl.attachedFile dd{ margin:0; padding:0 2em; color:#8b8b8b; font-size:11px;}
|
||||
.textyleContent dl.attachedFile dd a{ text-decoration:none; color:#0092cf; margin-right:10px;}
|
||||
.textyleContent dl.attachedFile{margin:1em 0;padding:1em 0;background:#f9f9f9;border:1px solid #eee}
|
||||
.textyleContent dl.attachedFile dt{padding:0 2em .5em 2em;margin:0 0 1em 0;font-weight:bold;text-indent:1em;border-bottom:1px solid #eee;background:#f9f9f9 url(../img/iconClip.gif) no-repeat 2em .3em;font-size:12px}
|
||||
.textyleContent dl.attachedFile em{font-size:11px;font-weight:normal;font-style:normal;margin:0 5px}
|
||||
.textyleContent dl.attachedFile dd{margin:0;padding:0 2em;color:#8b8b8b;font-size:11px}
|
||||
.textyleContent dl.attachedFile dd a{text-decoration:none;color:#0092cf;margin-right:10px}
|
||||
.textyleContent dl.attachedFile dd a:hover,
|
||||
.textyleContent dl.attachedFile dd a:active,
|
||||
.textyleContent dl.attachedFile dd a:focus{ text-decoration:underline;}
|
||||
.textyleContent dl.attachedFile dd a:focus{text-decoration:underline}
|
||||
|
||||
/* Table Of Content */
|
||||
.textyleContent .toc{ background:#fff; border:1px solid #ddd; font-size:14px; line-height:1.6; margin:1em 0; padding:15px;}
|
||||
.textyleContent .toc li{ font-weight:bold; color:#555; margin-left:35px;}
|
||||
.textyleContent .toc{background:#fff;border:1px solid #ddd;font-size:14px;line-height:1.6;margin:1em 0;padding:15px}
|
||||
.textyleContent .toc li{font-weight:bold;color:#555;margin-left:35px}
|
||||
.textyleContent .toc li.toc3{}
|
||||
.textyleContent .toc li.toc4{ margin-left:55px;}
|
||||
.textyleContent .toc li.toc5{ margin-left:75px;}
|
||||
.textyleContent .toc li a{ color:#648ab9; text-decoration:none; font-weight:normal;}
|
||||
.textyleContent .toc li.toc4{margin-left:55px}
|
||||
.textyleContent .toc li.toc5{margin-left:75px}
|
||||
.textyleContent .toc li a{color:#648ab9;text-decoration:none;font-weight:normal}
|
||||
.textyleContent .toc li a:hover,
|
||||
.textyleContent .toc li a:active,
|
||||
.textyleContent .toc li a:focus{ text-decoration:underline;}
|
||||
.textyleContent .toc li a:focus{text-decoration:underline}
|
||||
|
||||
/* Object */
|
||||
.textyleContent object,
|
||||
.textyleContent embed{ margin:1em 0;}
|
||||
.textyleContent embed{margin:1em 0}
|
||||
|
||||
/* Horizontal Rule */
|
||||
.textyleContent hr{ display:block; position:static; border-bottom:0; height:1px; overflow:hidden; color:#e2e2e2; clear:both;}
|
||||
.textyleContent hr{display:block;position:static;border-bottom:0;height:1px;overflow:hidden;color:#e2e2e2;clear:both}
|
||||
|
||||
/* Blockquote */
|
||||
.textyleContent blockquote{ margin-left:0; margin-right:0; padding:1em 40px; background:#f6f6f6 url(../img/bgBlockquote.gif) no-repeat 20px 1.5em; -moz-border-radius:5px; -webkit-border-radius:5px; }
|
||||
.textyleContent blockquote{margin:1em 0!important;padding:1em 40px!important;border:0!important;background:#f6f6f6 url(../img/bgBlockquote.gif) no-repeat 20px 1.5em;-moz-border-radius:5px;-webkit-border-radius:5px}
|
||||
|
||||
/* Cite */
|
||||
.textyleContent cite{ display:block; margin:1em 0;}
|
||||
.textyleContent cite{display:block;margin:1em 0}
|
||||
|
||||
/* Link */
|
||||
.textyleContent .xe_dr_link p strong{ display:block;}
|
||||
.textyleContent .xe_dr_link p strong{display:block}
|
||||
|
||||
/* P */
|
||||
.xe_content p,
|
||||
.textyleContent p{ margin:1em 0 !important;}
|
||||
.textyleContent p{margin:1em 0!important}
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@
|
|||
<fieldset>
|
||||
<legend>{$lang->edit->title}</legend>
|
||||
<ul>
|
||||
<li class="h3"><input name="hx" type="radio" value="h3" id="h3" class="inputRadio" checked="checked" /><label for="h3">{$lang->edit->title1}</label></li>
|
||||
<li class="h4"><input name="hx" type="radio" value="h4" id="h4" class="inputRadio" /><label for="h4">{$lang->edit->title2}</label></li>
|
||||
<li class="h5"><input name="hx" type="radio" value="h5" id="h5" class="inputRadio" /><label for="h5">{$lang->edit->title3}</label></li>
|
||||
<li class="h3"><input name="hx" type="radio" value="h3" id="h3" class="inputRadio" checked="checked" /> <label for="h3">{$lang->edit->title1}</label></li>
|
||||
<li class="h4"><input name="hx" type="radio" value="h4" id="h4" class="inputRadio" /> <label for="h4">{$lang->edit->title2}</label></li>
|
||||
<li class="h5"><input name="hx" type="radio" value="h5" id="h5" class="inputRadio" /> <label for="h5">{$lang->edit->title3}</label></li>
|
||||
</ul>
|
||||
<input name="" type="text" class="inputTitle h3" value="{$lang->edit->insert_dr_title}" title="{$lang->edit->insert_dr_title}" />
|
||||
<!-- class="inputTitle h3" | class="inputTitle h4" | class="inputTitle h5" -->
|
||||
|
|
@ -355,9 +355,9 @@
|
|||
<dl>
|
||||
<dt>{$lang->edit->image_align} :</dt>
|
||||
<dd>
|
||||
<input type="radio" name="align" id="img_align_left" value="left" /><label for="img_align_left">{$lang->edit->align_left}</label>
|
||||
<input type="radio" name="align" id="img_align_center" value="center" /><label for="img_align_center">{$lang->edit->align_center}</label>
|
||||
<input type="radio" name="align" id="img_align_right" value="right" /><label for="img_align_right">{$lang->edit->align_right}</label>
|
||||
<input type="radio" name="align" id="img_align_left" value="left" /> <label for="img_align_left">{$lang->edit->align_left}</label>
|
||||
<input type="radio" name="align" id="img_align_center" value="center" /> <label for="img_align_center">{$lang->edit->align_center}</label>
|
||||
<input type="radio" name="align" id="img_align_right" value="right" /> <label for="img_align_right">{$lang->edit->align_right}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
|
@ -401,7 +401,7 @@
|
|||
<!--@if($allow_fileupload)-->
|
||||
<!--%import("js/uploader.js",optimized=false)-->
|
||||
<!--%import("../../tpl/js/swfupload.js",optimized=false)-->
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
<script>//<![CDATA[
|
||||
uploaderSettings=
|
||||
{
|
||||
"editorSequence" : {$editor_sequence},
|
||||
|
|
@ -555,7 +555,7 @@
|
|||
<dt>{$lang->edit->help_first_dt_5}</dt>
|
||||
<dd>{$lang->edit->help_first_dd_5}</dd>
|
||||
</dl>
|
||||
<p class="drEditorBugReport"><a href="http://xe.xpressengine.net/?mid=issuetracker&act=dispIssuetrackerViewIssue" target="_blank" title="{$lang->edit->cmd_new_window}">{$lang->edit->help_bug_report}</a></p>
|
||||
<p class="drEditorBugReport"><a href="http://code.google.com/p/xe-core/issues/entry" target="_blank" title="{$lang->edit->cmd_new_window}">{$lang->edit->help_bug_report}</a></p>
|
||||
<span class="cap capTL"></span>
|
||||
<span class="cap capTR"></span>
|
||||
<span class="cap capBL"></span>
|
||||
|
|
@ -613,7 +613,7 @@
|
|||
</ul>
|
||||
|
||||
<!-- JS for Prototype -->
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
//<![CDATA[
|
||||
jQuery(function($){
|
||||
$('.wToolbar button').slice(0,9).append('<span class="nx"></span>');
|
||||
|
|
@ -658,7 +658,7 @@
|
|||
<!-- /에디터 -->
|
||||
|
||||
<!-- 에디터 활성화 -->
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
<script>//<![CDATA[
|
||||
var editor_path = "{$editor_path}";
|
||||
|
||||
var auto_saved_msg = "{$lang->msg_auto_saved}";
|
||||
|
|
|
|||
|
|
@ -1277,9 +1277,9 @@ var ImageWriter = xe.createPlugin('ImageWriter', {
|
|||
}
|
||||
|
||||
_resize.find('p.resizeError').hide();
|
||||
var _src = _image.attr('rawsrc') || _image.attr('src');
|
||||
var _file_srl = _image.attr('filesrl');
|
||||
|
||||
$.exec_json('file.procFileImageResize',{width:w, source_src:decodeURI(_src)},function(data){
|
||||
$.exec_json('file.procFileImageResize',{width:w, file_srl:_file_srl},function(data){
|
||||
if(data.error != 0) return;
|
||||
|
||||
_image.attr({
|
||||
|
|
|
|||
|
|
@ -114,12 +114,12 @@
|
|||
</item>
|
||||
<item name="uploading">
|
||||
<value xml:lang="ko"><![CDATA[업로드 중입니다]]></value>
|
||||
<value xml:lang="en"><![CDATA[Uploading...]]></value>
|
||||
<value xml:lang="en"><![CDATA[Uploading]]></value>
|
||||
<value xml:lang="jp"><![CDATA[アップロードしています。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[正在上传图片…]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[上傳中...]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Yükleniyor...]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Đang Upload ...]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[上傳中]]></value>
|
||||
<value xml:lang="tr"><![CDATA[Yükleniyor]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Đang Upload ]]></value>
|
||||
</item>
|
||||
<item name="uploading_info">
|
||||
<value xml:lang="ko"><![CDATA[%s MB까지 업로드할 수 있습니다]]></value>
|
||||
|
|
@ -445,7 +445,7 @@
|
|||
<value xml:lang="vi"><![CDATA[* Tạo văn bản mới (1~9, 0, `)]]></value>
|
||||
</item>
|
||||
<item name="help_first_dd_1">
|
||||
<value xml:lang="ko"><![CDATA[도구모음 버튼을 클릭함으로써 새 단락 쓰기를 시작할 수 있습니다. 도구모음 버튼에는 배치된 순서대로 왼쪽으로부터 1~9까지 단축키가 할당되어 있습니다. 숫자키 '0' 또는 ESC키 바로 아래 위치한 [`] 그레이브(grave) 키를 누르시면 숨겨진 도구모음 버튼을 보거나 토글(toggle)할 수 있습니다.]]></value>
|
||||
<value xml:lang="ko"><![CDATA[도구모음 버튼을 클릭함으로써 새 단락 쓰기를 시작할 수 있습니다. 도구모음 버튼에는 배치된 순서대로 왼쪽으로부터 1~9까지 단축키가 할당되어 있습니다. 숫자키 '0' 또는 ESC키 바로 아래 위치한 [`] 그레이브(grave) 키를 누르면 숨겨진 도구모음 버튼을 보거나 토글(toggle)할 수 있습니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[To start writing a new paragraph click on the toolbar. The buttons on the toolbar have keyboard shortcuts starting from 1 to 9, 1 representing the first left button. To toggle the toolbar, press the numeric '0' or the grave key (`) under the Esc key.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[ツールバーボタンをクリックすることで、新しい段落を書くことができます。ツールバーボタンには、配置順にに、左から1~9までショートカットキーが割り当てられています。数字キー '0' または、Escキーの下の[`] グレーブキーを押下すると、隠れているツールバーを表示したり、トグルすることができます。]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[藉由點選工具列的按鈕可以編寫新的內容。 工具列的快速鍵是鍵盤的 1~9 數字鍵。 數字鍵 '0' 或是 ESC 鍵底下的 [`] 波浪鍵(grave) 可隱藏、顯示及切換(toggle)工具列。]]></value>
|
||||
|
|
|
|||
|
|
@ -50,60 +50,5 @@
|
|||
<title xml:lang="zh-TW">白色 WYSIWYG(預設)</title>
|
||||
<title xml:lang="tr">Beyaz WYSIWYG(varsayılan)</title>
|
||||
</color>
|
||||
<color name="black">
|
||||
<title xml:lang="ko">검은색 위지윅</title>
|
||||
<title xml:lang="jp">黒 WYSIWYG</title>
|
||||
<title xml:lang="en">Black WYSIWYG</title>
|
||||
<title xml:lang="vi">Black WYSIWYG</title>
|
||||
<title xml:lang="ru">Черного WYSIWYG</title>
|
||||
<title xml:lang="es">Negro WYSIWYG</title>
|
||||
<title xml:lang="zh-CN">黑色 WYSIWYG</title>
|
||||
<title xml:lang="zh-TW">黑色 WYSIWYG</title>
|
||||
<title xml:lang="tr">Siyah WYSIWYG</title>
|
||||
</color>
|
||||
<color name="white_text_usehtml">
|
||||
<title xml:lang="ko">하얀색 텍스트(HTML 사용)</title>
|
||||
<title xml:lang="jp">白色テキスト(HTMLタグを使う)</title>
|
||||
<title xml:lang="en">White Text(Use HTML)</title>
|
||||
<title xml:lang="vi">White Text(Sử dụng HTML)</title>
|
||||
<title xml:lang="ru">White Text(Use HTML)</title>
|
||||
<title xml:lang="es">Editor de texto en blanco (Uso de HTML)</title>
|
||||
<title xml:lang="zh-CN">白色文本编辑器(使用HTML)</title>
|
||||
<title xml:lang="zh-TW">白色文字編輯器(使用HTML)</title>
|
||||
<title xml:lang="tr">Beyaz Metin Editörü(HTML kullan)</title>
|
||||
</color>
|
||||
<color name="black_text_usehtml">
|
||||
<title xml:lang="ko">검은색 텍스트(HTML 사용)</title>
|
||||
<title xml:lang="jp">黒色テキスト(HTMLタグを使う)</title>
|
||||
<title xml:lang="en">Black Text(Use HTML)</title>
|
||||
<title xml:lang="vi">Black Text(Sử dụng HTML)</title>
|
||||
<title xml:lang="ru">Black Text(Use HTML)</title>
|
||||
<title xml:lang="es">Editor de texto negro (Uso de HTML)</title>
|
||||
<title xml:lang="zh-CN">黑色文本编辑器(使用HTML)</title>
|
||||
<title xml:lang="zh-TW">黑色文字編輯器(使用HTML)</title>
|
||||
<title xml:lang="tr">Siyah Metin Alanı(HTML kullan)</title>
|
||||
</color>
|
||||
<color name="white_text_nohtml">
|
||||
<title xml:lang="ko">하얀색 텍스트(HTML 사용 안함)</title>
|
||||
<title xml:lang="jp">白色テキスト(HTMLタグを使わない)</title>
|
||||
<title xml:lang="en">White Text(No HTML)</title>
|
||||
<title xml:lang="vi">White Text(Không sử dụng HTML)</title>
|
||||
<title xml:lang="ru">White Text(No HTML)</title>
|
||||
<title xml:lang="es">Editor de texto en blanco (no HTML)</title>
|
||||
<title xml:lang="zh-CN">白色文本编辑器(不使用HTML)</title>
|
||||
<title xml:lang="zh-TW">白色文字編輯器(不使用HTML)</title>
|
||||
<title xml:lang="tr">Beyaz Metin Editörü(HTML yok)</title>
|
||||
</color>
|
||||
<color name="black_text_nohtml">
|
||||
<title xml:lang="ko">검은색 텍스트(HTML 사용 안함)</title>
|
||||
<title xml:lang="jp">黒色テキスト(HTMLタグを使わない)</title>
|
||||
<title xml:lang="en">Black Text(No HTML)</title>
|
||||
<title xml:lang="vi">Black Text(Không sử dụng HTML)</title>
|
||||
<title xml:lang="ru">Black Text(No HTML)</title>
|
||||
<title xml:lang="es">Editor de texto negro (no HTML)</title>
|
||||
<title xml:lang="zh-CN">黑色文本编辑器(不使用HTML)</title>
|
||||
<title xml:lang="zh-TW">黑色文字編輯器(不使用HTML)</title>
|
||||
<title xml:lang="tr">Siyah Metin Alanı(HTML yok)</title>
|
||||
</color>
|
||||
</colorset>
|
||||
</skin>
|
||||
|
|
|
|||
|
|
@ -32,17 +32,16 @@
|
|||
.xpress-editor a.skip:hover,
|
||||
.xpress-editor a.skip:active,
|
||||
.xpress-editor a.skip:focus{position:relative;display:block;padding:5px;right:0;z-index:60;width:auto;height:auto;text-align:right;white-space:nowrap;color:#000;text-decoration:none;letter-spacing:-1px;_zoom:1}
|
||||
.xpress-editor .input_area{position:relative;margin:10px 10px 20px 10px;z-index:30;*zoom:1;height:400px;overflow:hidden}
|
||||
.xpress-editor .input_area{position:relative;margin:10px 10px 20px 10px;z-index:30;*zoom:1;height:300px;overflow:hidden}
|
||||
.xpress-editor .input_area iframe,
|
||||
.xpress-editor .input_area textarea{display:block;width:100% !important;position:relative;height:100%;border:0 !important;padding:0 !important;overflow:auto}
|
||||
.xpress-editor .input_area textarea{*margin:0 -10px;_margin-bottom:-2px}
|
||||
.xpress-editor .input_area textarea.blind{display:none}
|
||||
.xpress-editor .input_control{position:relative;display:block;width:100%;clear:both;text-align:center;border-top:1px solid #ccc;background:#f8f8f8 url(../img/btn_expand.gif) no-repeat center center;cursor:n-resize}
|
||||
.xpress-editor .input_control span{display:block;height:21px;visibility:hidden;overflow:visible;font-size:0;line-height:0;white-space:nowrap;color:#fff}
|
||||
.xpress-editor .input_auto{position:absolute;z-index:2;left:5px;bottom:4px;zoom:1}
|
||||
.xpress-editor .input_auto.line{height:17px;margin:0;display:block;border-top:1px solid #ccc;padding:4px 0 0 8px;background:#f8f8f8}
|
||||
.xpress-editor .input_auto input{margin:0;padding:0;width:13px;height:13px;vertical-align:middle;margin:0 4px 0 0}
|
||||
.xpress-editor .input_auto label{font-size:11px;vertical-align:middle;line-height:13px;color:#666}
|
||||
.xpress-editor .input_control{position:relative;display:block;width:100%;height:25px;clear:both;text-align:center;border-top:1px solid #ccc;background:#f8f8f8 url(../img/btn_expand.gif) no-repeat center center;cursor:n-resize;margin:0 0 -25px 0}
|
||||
.xpress-editor .input_control span{display:block;zoom:1;height:21px;visibility:hidden;overflow:visible;font-size:0;line-height:0;white-space:nowrap;color:#fff}
|
||||
.xpress-editor .input_auto{position:relative;z-index:2;zoom:1;white-space:nowrap;display:block;height:0;border-top:1px solid #ccc;margin:0 0 24px 0;*margin:0}
|
||||
.xpress-editor .input_auto input{margin:0 4px 0 0 !important;padding:0;width:13px;height:13px;vertical-align:middle}
|
||||
.xpress-editor .input_auto label{position:absolute;font-size:11px;color:#666;padding:0 5px !important;line-height:25px;font-weight:normal !important}
|
||||
.xpress-editor.black .input_control {background:#111 url(../img/btn_expand.black.gif) no-repeat center center}
|
||||
.xpress-editor.black .input_control span{border-top:1px solid #333; color:#000}
|
||||
.xpress-editor .tool{position:relative;overflow:visible;padding:5px 10px 6px 10px;*padding:5px 10px 8px 10px;z-index:40;clear:both;background:#f8f8f8 url(../img/bg_tool.gif) repeat-x left bottom;border:0;*zoom:1}
|
||||
|
|
@ -81,7 +80,7 @@
|
|||
.xpress-editor .tool li.html span button,
|
||||
.xpress-editor .tool li.preview span button{left:2px;height:21px;background-position:right top;font:11px/21px Tahoma, Sans-serif;padding:0 4px;*overflow:visible;*line-height:20px}
|
||||
.xpress-editor .tool ul.type li{float:none;display:inline;*top:1px}
|
||||
.xpress-editor .tool ul.type li select{height:21px;width:64px;white-space:nowrap}
|
||||
.xpress-editor .tool ul.type li select{height:21px;width:64px;white-space:nowrap;min-width:auto;padding:0}
|
||||
.xpress-editor .tool ul.type li option{white-space:nowrap}
|
||||
.xpress-editor.black .tool ul.type li select{color:#fff;background-color:#000}
|
||||
/* Content > Tool > Button Default */
|
||||
|
|
@ -106,6 +105,7 @@
|
|||
.xpress-editor .tool li.blockquote button{width:22px;background-position:-381px 0}
|
||||
.xpress-editor .tool li.url button{width:26px;background-position:-403px 0}
|
||||
.xpress-editor .tool li.character button{background-position:-429px 0}
|
||||
.xpress-editor .tool li.table{width:auto}
|
||||
.xpress-editor .tool li.table button{width:22px;background-position:-450px 0}
|
||||
.xpress-editor .tool li.merge button{background-position:-472px 0}
|
||||
.xpress-editor .tool li.splitCol button{background-position:-493px 0}
|
||||
|
|
@ -306,13 +306,13 @@
|
|||
.xpress-editor .tool li.character .layer{width:433px;height:242px;overflow:hidden}
|
||||
.xpress-editor .tool li.character .layer ul{margin:0}
|
||||
.xpress-editor .tool li.character .layer h3{position:absolute;width:0;height:0;overflow:hidden;visibility:hidden}
|
||||
.xpress-editor .tool li.character .layer .nav{position:absolute;top:11px;left:-1px;overflow:hidden;white-space:nowrap}
|
||||
.xpress-editor .tool li.character .layer .nav li{display:inline;margin:0 -4px 0 0;padding:0 8px !important;background:url(../img/vr_layer_character.gif) no-repeat 0 0}
|
||||
.xpress-editor .tool li.character .layer .nav li a{color:#444;text-decoration:none;letter-spacing:-1px}
|
||||
.xpress-editor .tool li.character .layer .nav li a:hover,
|
||||
.xpress-editor .tool li.character .layer .nav li a:active,
|
||||
.xpress-editor .tool li.character .layer .nav li a:focus{text-decoration:underline}
|
||||
.xpress-editor .tool li.character .layer .nav li a.on{font-weight:bold;color:#004790;display:inline}
|
||||
.xpress-editor .tool li.character .layer .characterNav{position:absolute;top:11px;left:-1px;overflow:hidden;white-space:nowrap}
|
||||
.xpress-editor .tool li.character .layer .characterNav li{display:inline;margin:0 -4px 0 0;padding:0 8px !important;background:url(../img/vr_layer_character.gif) no-repeat 0 0}
|
||||
.xpress-editor .tool li.character .layer .characterNav li a{color:#444;text-decoration:none;letter-spacing:-1px}
|
||||
.xpress-editor .tool li.character .layer .characterNav li a:hover,
|
||||
.xpress-editor .tool li.character .layer .characterNav li a:active,
|
||||
.xpress-editor .tool li.character .layer .characterNav li a:focus{text-decoration:underline}
|
||||
.xpress-editor .tool li.character .layer .characterNav li a.on{font-weight:bold;color:#004790;display:inline}
|
||||
.xpress-editor .tool li.character .layer .list{position:absolute;left:7px;top:30px;width:421px;height:172px;background:url(../img/bx_character.gif) no-repeat}
|
||||
.xpress-editor .tool li.character .layer .list li{position:relative;top:1px;left:1px;float:left;width:20px;height:18px;margin:0 1px 1px 0 !important}
|
||||
.xpress-editor .tool li.character .layer .list li button{width:20px;height:18px}
|
||||
|
|
@ -340,7 +340,7 @@
|
|||
.xpress-editor .fileUploader .fileListArea.black select {background-color:#000;border:1px solid #666}
|
||||
.xpress-editor .fileUploader .fileListArea.black select option {color:#aaa}
|
||||
.xpress-editor .fileUploader .fileUploadControl{clear:right}
|
||||
.xpress-editor .fileUploader .fileUploadControl .button{margin-bottom:5px}
|
||||
.xpress-editor .fileUploader .fileUploadControl .text{margin:0 0 5px 0;font-size:11px;text-decoration:underline}
|
||||
.xpress-editor .fileUploader .file_attach_info{clear:right;margin:5px 0;font-size:11px;color:#333}
|
||||
/* Auto Save */
|
||||
.xpress-editor .autosave_message {display:none;background: #f6ffdb;padding:6px 10px;margin:0;line-height:1}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -16,9 +16,9 @@
|
|||
|
||||
<div class="xeTextEditor {$editor_class}">
|
||||
<input type="hidden" id="htm_{$editor_sequence}" value="<!--@if($colorset == "white_text_nohtml" || $colorset == "black_text_nohtml")-->n<!--@end--><!--@if($colorset == "white_texteditor" || $colorset == "white_texteditor")-->br<!--@end-->" />
|
||||
<textarea id="editor_{$editor_sequence}" style="height:{$editor_height}px;" rows="8" cols="42" class="iTextArea"></textarea>
|
||||
<textarea id="editor_{$editor_sequence}" style="height:{$editor_height}px;font-family:{$content_font};" rows="8" cols="42" class="iTextArea"></textarea>
|
||||
</div>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
<script>//<![CDATA[
|
||||
editorStartTextarea({$editor_sequence}, "{$editor_content_key_name}", "{$editor_primary_key_name}");
|
||||
//]]></script>
|
||||
|
||||
|
|
@ -62,7 +62,7 @@
|
|||
<select class="xpress_xeditor_ui_fontName_select" disabled="disabled">
|
||||
<option value="">{$lang->edit->fontname}</option>
|
||||
<!--@foreach($lang->edit->fontlist as $key=>$obj)-->
|
||||
<option value="{$key}" style="font-family:{$obj}">{$obj}</option>
|
||||
<option value="{htmlspecialchars($obj)}" style="font-family:{$obj}">{$obj}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
</li>
|
||||
|
|
@ -282,7 +282,7 @@
|
|||
<div class="layer xpress_xeditor_sCharacter_layer" style="display:none">
|
||||
<h3>{$lang->edit->insert_special_character}</h3>
|
||||
<button type="button" class="close" title="{$lang->edit->close_special_character}"><span>{$lang->edit->close_special_character}</span></button>
|
||||
<ul class="nav">
|
||||
<ul class="characterNav">
|
||||
<li><a href="#character1" class="on">{$lang->edit->symbol}</a></li>
|
||||
<li><a href="#character2">{$lang->edit->number_unit}</a></li>
|
||||
<li><a href="#character3">{$lang->edit->circle_bracket}</a></li>
|
||||
|
|
@ -438,7 +438,7 @@
|
|||
|
||||
<!-- /입력 -->
|
||||
<button type="button" class="input_control xpress_xeditor_editingArea_verticalResizer" title="{$lang->edit->edit_height_control}"><span>{$lang->edit->edit_height_control}</span></button>
|
||||
<span class="input_auto xpress_xeditor_ui_editorresize"><input type="checkbox" id="editorresize"><label for="editorresize">{$lang->edit->edit_height_auto}</label></span>
|
||||
<span class="input_auto xpress_xeditor_ui_editorresize"><label for="editorresize"><input type="checkbox" id="editorresize">{$lang->edit->edit_height_auto}</label></span>
|
||||
</div>
|
||||
|
||||
<div id="fileUploader_{$editor_sequence}" class="fileUploader" cond="$allow_fileupload"><!--File upload zone-->
|
||||
|
|
@ -455,7 +455,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<!-- 에디터 활성화 -->
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
<script>//<![CDATA[
|
||||
var editor_path = "{$editor_path}";
|
||||
var auto_saved_msg = "{$lang->msg_auto_saved}";
|
||||
var oEditor;
|
||||
|
|
|
|||
|
|
@ -3192,7 +3192,6 @@ xe.XE_EditingAreaVerticalResizer = $.Class({
|
|||
|
||||
_assignHTMLObjects : function(oAppContainer){
|
||||
oAppContainer = $.$(oAppContainer) || document;
|
||||
|
||||
this.oResizeGrip = $(".xpress_xeditor_editingArea_verticalResizer", oAppContainer).get(0);
|
||||
},
|
||||
|
||||
|
|
@ -4986,7 +4985,7 @@ xe.XE_Table = $.Class({
|
|||
}
|
||||
}
|
||||
|
||||
var sTable = '<table style="background:'+sBorderColorCode+'" cellspacing="'+iBorderWidth+'">';
|
||||
var sTable = '<table style="background:'+sBorderColorCode+';border-spacing:1px" cellspacing="'+iBorderWidth+'">';
|
||||
var sRow = '<tr style="background:'+sBGColorCode+'">';
|
||||
var iColumns = this.oColumnInput.value;
|
||||
for(var i=0; i<iColumns; i++){
|
||||
|
|
@ -5083,7 +5082,10 @@ xe.XE_Editorresize = $.Class({
|
|||
}
|
||||
},
|
||||
$ON_XE_EDITOR_RESIZE : function(){
|
||||
this.inputArea.style.height = this.oIframe.style.height = this.oIframeBody[0].scrollHeight + 'px';
|
||||
var t = this;
|
||||
setTimeout(function(){
|
||||
t.inputArea.style.height = t.oIframe.style.height = t.oIframeBody[0].scrollHeight + 'px';
|
||||
}, 0);
|
||||
}
|
||||
});
|
||||
//}
|
||||
|
|
@ -5122,7 +5124,8 @@ var
|
|||
|
||||
var
|
||||
allow_tags = 'a,abbr,acronym,address,area,blockquote,br,caption,center,cite,code,col,colgroup,dd,del,dfn,div,dl,dt,em,embed,h1,h2,h3,h4,h5,h6,hr,img,ins,kbd,li,map,object,ol,p,param,pre,q,samp,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,u,ul,var,iframe,object,param,style'.split(','),
|
||||
lonely_tags = 'area,br,col,embed,hr,img,input,param'.split(',');
|
||||
no_closing_tags = 'area,br,col,embed,hr,img,input,param,base,meta,link,basefont,isindex'.split(',');
|
||||
|
||||
|
||||
var
|
||||
replace_tags = {
|
||||
|
|
@ -5203,10 +5206,10 @@ xe.XE_XHTMLFormatter = $.Class({
|
|||
attrs = $.trim(attrs || '');
|
||||
|
||||
if (!closing) {
|
||||
if ($.inArray(tag,lonely_tags) >= 0) {
|
||||
if ($.inArray(tag,no_closing_tags) >= 0) {
|
||||
var len = attrs.length;
|
||||
if (tag == 'br') attrs = '';
|
||||
if (!attrs || attrs.substring(len-1,len) != '/') attrs += '/';
|
||||
if (!attrs || attrs.substring(len-1,len) != '/') attrs += ' /';
|
||||
|
||||
return '<'+tag+' '+$.trim(attrs)+'>';
|
||||
} else {
|
||||
|
|
@ -5216,7 +5219,7 @@ xe.XE_XHTMLFormatter = $.Class({
|
|||
var tags = [], t = '';
|
||||
|
||||
// if the tag does not require a closing tag, simply remove the closing tag
|
||||
if ($.inArray(tag,lonely_tags) >= 0) {
|
||||
if ($.inArray(tag,no_closing_tags) >= 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
@ -5813,15 +5816,4 @@ xe.XE_Table = $.Class({
|
|||
}
|
||||
}).extend(xe.XE_Table);
|
||||
|
||||
// Auto Resize Checkbox Toggle Class
|
||||
$('.input_auto>input').change(function(){
|
||||
setTimeout(function(){
|
||||
if($('.input_control').is(':hidden')){
|
||||
$('.input_auto').addClass('line');
|
||||
} else {
|
||||
$('.input_auto').removeClass('line');
|
||||
}
|
||||
},1);
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
function editorStartTextarea(a,b,e){var c=xGetElementById("editor_"+a),d=xGetElementById("htm_"+a).value;c.form.setAttribute("editor_sequence",a);c.style.width="100%";editorRelKeys[a]=[];editorRelKeys[a].primary=c.form[e];editorRelKeys[a].content=c.form[b];editorRelKeys[a].func=editorGetContentTextarea;a=c.form[b].value;d&&(a=a.replace(/<br([^>]*)>/ig,"\n"),"br"!=d&&(a=a.replace(/</g,"<"),a=a.replace(/>/g,">"),a=a.replace(/"/g,'"'),a=a.replace(/&/g,"&")));c.value=a}
|
||||
function editorGetContentTextarea(a){var b=xGetElementById("editor_"+a),a=xGetElementById("htm_"+a).value,b=b.value.trim();a&&("br"!=a&&(b=b.replace(/&/g,"&"),b=b.replace(/</g,"<"),b=b.replace(/>/g,">"),b=b.replace(/\"/g,""")),b=b.replace(/(\r\n|\n)/g,"<br />"));return b};
|
||||
function editorGetContentTextarea(a){var b=xGetElementById("editor_"+a);a=xGetElementById("htm_"+a).value;b=b.value.trim();a&&("br"!=a&&(b=b.replace(/&/g,"&"),b=b.replace(/</g,"<"),b=b.replace(/>/g,">"),b=b.replace(/\"/g,""")),b=b.replace(/(\r\n|\n)/g,"<br />"));return b};
|
||||
|
|
|
|||
|
|
@ -3192,7 +3192,6 @@ xe.XE_EditingAreaVerticalResizer = $.Class({
|
|||
|
||||
_assignHTMLObjects : function(oAppContainer){
|
||||
oAppContainer = $.$(oAppContainer) || document;
|
||||
|
||||
this.oResizeGrip = $(".xpress_xeditor_editingArea_verticalResizer", oAppContainer).get(0);
|
||||
},
|
||||
|
||||
|
|
@ -4986,7 +4985,7 @@ xe.XE_Table = $.Class({
|
|||
}
|
||||
}
|
||||
|
||||
var sTable = '<table style="background:'+sBorderColorCode+'" cellspacing="'+iBorderWidth+'">';
|
||||
var sTable = '<table style="background:'+sBorderColorCode+';border-spacing:1px" cellspacing="'+iBorderWidth+'">';
|
||||
var sRow = '<tr style="background:'+sBGColorCode+'">';
|
||||
var iColumns = this.oColumnInput.value;
|
||||
for(var i=0; i<iColumns; i++){
|
||||
|
|
@ -5083,7 +5082,10 @@ xe.XE_Editorresize = $.Class({
|
|||
}
|
||||
},
|
||||
$ON_XE_EDITOR_RESIZE : function(){
|
||||
this.inputArea.style.height = this.oIframe.style.height = this.oIframeBody[0].scrollHeight + 'px';
|
||||
var t = this;
|
||||
setTimeout(function(){
|
||||
t.inputArea.style.height = t.oIframe.style.height = t.oIframeBody[0].scrollHeight + 'px';
|
||||
}, 0);
|
||||
}
|
||||
});
|
||||
//}
|
||||
|
|
@ -5122,7 +5124,8 @@ var
|
|||
|
||||
var
|
||||
allow_tags = 'a,abbr,acronym,address,area,blockquote,br,caption,center,cite,code,col,colgroup,dd,del,dfn,div,dl,dt,em,embed,h1,h2,h3,h4,h5,h6,hr,img,ins,kbd,li,map,object,ol,p,param,pre,q,samp,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,u,ul,var,iframe,object,param,style'.split(','),
|
||||
lonely_tags = 'area,br,col,embed,hr,img,input,param'.split(',');
|
||||
no_closing_tags = 'base,meta,link,hr,br,basefont,param,img,area,input,isindex,col'.split(',');
|
||||
|
||||
|
||||
var
|
||||
replace_tags = {
|
||||
|
|
@ -5203,10 +5206,10 @@ xe.XE_XHTMLFormatter = $.Class({
|
|||
attrs = $.trim(attrs || '');
|
||||
|
||||
if (!closing) {
|
||||
if ($.inArray(tag,lonely_tags) >= 0) {
|
||||
if ($.inArray(tag,no_closing_tags) >= 0) {
|
||||
var len = attrs.length;
|
||||
if (tag == 'br') attrs = '';
|
||||
if (!attrs || attrs.substring(len-1,len) != '/') attrs += '/';
|
||||
if (!attrs || attrs.substring(len-1,len) != '/') attrs += ' /';
|
||||
|
||||
return '<'+tag+' '+$.trim(attrs)+'>';
|
||||
} else {
|
||||
|
|
@ -5216,7 +5219,7 @@ xe.XE_XHTMLFormatter = $.Class({
|
|||
var tags = [], t = '';
|
||||
|
||||
// if the tag does not require a closing tag, simply remove the closing tag
|
||||
if ($.inArray(tag,lonely_tags) >= 0) {
|
||||
if ($.inArray(tag,no_closing_tags) >= 0) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
@ -5813,17 +5816,6 @@ xe.XE_Table = $.Class({
|
|||
}
|
||||
}).extend(xe.XE_Table);
|
||||
|
||||
// Auto Resize Checkbox Toggle Class
|
||||
$('.input_auto>input').change(function(){
|
||||
setTimeout(function(){
|
||||
if($('.input_control').is(':hidden')){
|
||||
$('.input_auto').addClass('line');
|
||||
} else {
|
||||
$('.input_auto').removeClass('line');
|
||||
}
|
||||
},1);
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
if (!window.xe) xe = {};
|
||||
|
||||
|
|
@ -6105,4 +6097,4 @@ xe.XE_Preview = jQuery.Class({
|
|||
$ON_EVENT_PREVIEW : function() {
|
||||
// TODO : 버튼이 눌렸을 때의 동작 정의
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,137 +1,136 @@
|
|||
(function(c){function o(a){function b(a){return function(){return a.apply(this.$this,arguments)}}a=a.prototype;this.prototype.$super={};for(var d in a)a.propertyIsEnumerable(d)&&("undefined"==typeof this.prototype[d]&&(this.prototype[d]=a[d]),this.prototype.$super[d]=c.isFunction(a[d])?b(a[d]):a[d]);return this}c.extend({Class:function(a){function b(){"undefined"!=typeof this.$super&&(this.$super.$this=this);c.isFunction(this.$init)&&this.$init.apply(this,arguments)}b.prototype=a;b.constructor=b;
|
||||
b.extend=o;return b},$:function(a){return"string"==typeof a?"<"==a.substring(0,1)?c(a).get(0):c("#"+a).get(0):a},fnBind:function(a,b){var d=c.makeArray(arguments);d.shift();d.shift();return function(){var f=d.concat(c.makeArray(arguments));return a.apply(b,f)}}});c.browser.nVersion=parseFloat(c.browser.version);"undefined"==typeof window.xe&&(window.xe={});xe.XpressCore=c.Class({name:"XpressCore",$init:function(a){a=!a?{}:c.Class({}).extend({oDebugger:null}).extend(a);if(a.oDebugger){this.oDebugger=
|
||||
a.oDebugger;this.oDebugger.oApp=this}this.commandQueue=[];this.oCommandMap={};this.oDisabledCommand={};this.aPlugins=[];this.appStatus=xe.APP_STATUS.NOT_READY;this.registerPlugin(this)},exec:function(a,b,d){if(this.appStatus==xe.APP_STATUS.NOT_READY){this.commandQueue[this.commandQueue.length]={msg:a,args:b,event:d};return true}this.exec=this._exec;this.exec(a,b,d)},delayedExec:function(a,b,d,f){a=c.fnBind(this.exec,this,a,b,f);setTimeout(a,d)},_exec:function(a,b,d){return(this._exec=this.oDebugger?
|
||||
this._execWithDebugger:this._execWithoutDebugger).call(this,a,b,d)},_execWithDebugger:function(a,b,d){this.oDebugger.log_MessageStart(a,b);d=this._doExec(a,b,d);this.oDebugger.log_MessageEnd(a,b);return d},_execWithoutDebugger:function(a,b,d){return this._doExec(a,b,d)},_doExec:function(a,b,d){var f=false;if(!this.oDisabledCommand[a]){var c=[];if(b&&b.length)for(var f=b.length,g=0;g<f;g++)c[g]=b[g];d&&(c[c.length]=d);(f=this._execMsgStep("BEFORE",a,c))&&(f=this._execMsgStep("ON",a,c));f&&(f=this._execMsgStep("AFTER",
|
||||
a,c))}return f},registerPlugin:function(a){if(!a)throw"An error occured in registerPlugin(): invalid plug-in";a.nIdx=this.aPlugins.length;a.oApp=this;this.aPlugins[a.nIdx]=a;if(a.status!=xe.PLUGIN_STATUS.NOT_READY)a.status=xe.PLUGIN_STATUS.READY;this.exec("MSG_PLUGIN_REGISTERED",[a]);return a.nIdx},disableCommand:function(a,b){this.oDisabledCommand[a]=b},registerBrowserEvent:function(a,b,d,f,e){if(a){f=f||[];d=e?c.fnBind(this.delayedExec,this,d,f,e):c.fnBind(this.exec,this,d,f);c(a).bind(b,d)}},run:function(){this._changeAppStatus(xe.APP_STATUS.WAITING_FOR_PLUGINS_READY);
|
||||
(function(c){function p(a){function b(a){return function(){return a.apply(this.$this,arguments)}}a=a.prototype;this.prototype.$super={};for(var d in a)a.propertyIsEnumerable(d)&&("undefined"==typeof this.prototype[d]&&(this.prototype[d]=a[d]),this.prototype.$super[d]=c.isFunction(a[d])?b(a[d]):a[d]);return this}c.extend({Class:function(a){function b(){"undefined"!=typeof this.$super&&(this.$super.$this=this);c.isFunction(this.$init)&&this.$init.apply(this,arguments)}b.prototype=a;b.constructor=b;
|
||||
b.extend=p;return b},$:function(a){return"string"==typeof a?"<"==a.substring(0,1)?c(a).get(0):c("#"+a).get(0):a},fnBind:function(a,b){var d=c.makeArray(arguments);d.shift();d.shift();return function(){var f=d.concat(c.makeArray(arguments));return a.apply(b,f)}}});c.browser.nVersion=parseFloat(c.browser.version);"undefined"==typeof window.xe&&(window.xe={});xe.XpressCore=c.Class({name:"XpressCore",$init:function(a){a=!a?{}:c.Class({}).extend({oDebugger:null}).extend(a);a.oDebugger&&(this.oDebugger=
|
||||
a.oDebugger,this.oDebugger.oApp=this);this.commandQueue=[];this.oCommandMap={};this.oDisabledCommand={};this.aPlugins=[];this.appStatus=xe.APP_STATUS.NOT_READY;this.registerPlugin(this)},exec:function(a,b,d){if(this.appStatus==xe.APP_STATUS.NOT_READY)return this.commandQueue[this.commandQueue.length]={msg:a,args:b,event:d},!0;this.exec=this._exec;this.exec(a,b,d)},delayedExec:function(a,b,d,f){a=c.fnBind(this.exec,this,a,b,f);setTimeout(a,d)},_exec:function(a,b,d){return(this._exec=this.oDebugger?
|
||||
this._execWithDebugger:this._execWithoutDebugger).call(this,a,b,d)},_execWithDebugger:function(a,b,d){this.oDebugger.log_MessageStart(a,b);d=this._doExec(a,b,d);this.oDebugger.log_MessageEnd(a,b);return d},_execWithoutDebugger:function(a,b,d){return this._doExec(a,b,d)},_doExec:function(a,b,d){var f=!1;if(!this.oDisabledCommand[a]){var c=[];if(b&&b.length)for(var f=b.length,g=0;g<f;g++)c[g]=b[g];d&&(c[c.length]=d);(f=this._execMsgStep("BEFORE",a,c))&&(f=this._execMsgStep("ON",a,c));f&&(f=this._execMsgStep("AFTER",
|
||||
a,c))}return f},registerPlugin:function(a){if(!a)throw"An error occured in registerPlugin(): invalid plug-in";a.nIdx=this.aPlugins.length;a.oApp=this;this.aPlugins[a.nIdx]=a;a.status!=xe.PLUGIN_STATUS.NOT_READY&&(a.status=xe.PLUGIN_STATUS.READY);this.exec("MSG_PLUGIN_REGISTERED",[a]);return a.nIdx},disableCommand:function(a,b){this.oDisabledCommand[a]=b},registerBrowserEvent:function(a,b,d,f,e){a&&(f=f||[],d=e?c.fnBind(this.delayedExec,this,d,f,e):c.fnBind(this.exec,this,d,f),c(a).bind(b,d))},run:function(){this._changeAppStatus(xe.APP_STATUS.WAITING_FOR_PLUGINS_READY);
|
||||
var a=this.commandQueue.length;for(i=0;i<a;i++){var b=this.commandQueue[i];this.exec(b.msg,b.args,b.event)}this._waitForPluginReady()},createCommandMap:function(a){this.oCommandMap[a]=[];for(var b=this.aPlugins.length,d=0;d<b;d++)this._doAddToCommandMap(a,this.aPlugins[d])},addToCommandMap:function(a,b){this.oCommandMap[a]&&this._addToCommandMap(a,b)},_changeAppStatus:function(a){this.appStatus=a;this.appStatus==xe.APP_STATUS.READY&&this.exec("MSG_APP_READY")},_execMsgStep:function(a,b,d){return(this._execMsgStep=
|
||||
this.oDebugger?this._execMsgStepWithDebugger:this._execMsgStepWithoutDebugger).call(this,a,b,d)},_execMsgStepWithDebugger:function(a,b,d){this.oDebugger.log_MessageStepStart(a,b,d);var f=this._execMsgHandler("$"+a+"_"+b,d);this.oDebugger.log_MessageStepEnd(a,b,d);return f},_execMsgStepWithoutDebugger:function(a,b,d){return this._execMsgHandler("$"+a+"_"+b,d)},_execMsgHandler:function(a,b){this.oCommandMap[a]||this.createCommandMap(a);var d=this.oCommandMap[a],f=d.length;if(f==0)return true;var c,
|
||||
g=true;if(a.match(/^\$(BEFORE|ON|AFTER)_MSG_APP_READY$/))for(var h=0;h<f;h++){c=this._execHandler(d[h],a,b);if(c===false){g=false;break}}else for(h=0;h<f;h++)if(typeof d[h].$PRECONDITION!="function"||this._execHandler(d[h],"$PRECONDITION",[a,b])){c=this._execHandler(d[h],a,b);if(c===false){g=false;break}}return g},_execHandler:function(a,b,d){return(this._execHandler=this.oDebugger?this._execHandlerWithDebugger:this._execHandlerWithoutDebugger).call(this,a,b,d)},_execHandlerWithDebugger:function(a,
|
||||
b,d){this.oDebugger.log_CallHandlerStart(a,b,d);var f=a[b].apply(a,d);this.oDebugger.log_CallHandlerEnd(a,b,d);return f},_execHandlerWithoutDebugger:function(a,b,d){return a[b].apply(a,d)},_doAddToCommandMap:function(a,b){typeof b[a]=="function"&&(this.oCommandMap[a][this.oCommandMap[a].length]=b)},_waitForPluginReady:function(){for(var a=true,b=0;b<this.aPlugins.length;b++)if(this.aPlugins[b].status==xe.PLUGIN_STATUS.NOT_READY){a=false;break}a?this._changeAppStatus(xe.APP_STATUS.READY):setTimeout(c.fnBind(this._waitForPluginReady,
|
||||
this),100)}});xe.APP_STATUS={NOT_READY:0,WAITING_FOR_PLUGINS_READY:1,READY:2};xe.PLUGIN_STATUS={NOT_READY:0,READY:1};xe.W3CDOMRange=c.Class({$init:function(a){this._document=a||document;this.collapsed=true;this.endContainer=this.commonAncestorContainer=this._document.body;this.endOffset=0;this.startContainer=this._document.body;this.startOffset=0},cloneContents:function(){var a=this._document.createDocumentFragment(),b=this._document.createDocumentFragment(),d=this._getNodesInRange();if(d.length<
|
||||
1)return a;d=this._constructClonedTree(d,b);if(b=b.firstChild)for(var b=b.firstChild,f;b;){f=b.nextSibling;a.appendChild(b);b=f}d=this._splitTextEndNodes({oStartContainer:d.oStartContainer,iStartOffset:this.startOffset,oEndContainer:d.oEndContainer,iEndOffset:this.endOffset});d.oStartContainer&&d.oStartContainer.previousSibling&&xe.DOMFix.parentNode(d.oStartContainer).removeChild(d.oStartContainer.previousSibling);d.oEndContainer&&d.oEndContainer.nextSibling&&xe.DOMFix.parentNode(d.oEndContainer).removeChild(d.oEndContainer.nextSibling);
|
||||
return a},_constructClonedTree:function(a,b){var d=null,f=null,c=this.startContainer,g=this.endContainer;_recurConstructClonedTree=function(a,b,j,n){if(b<0)return b;var j=b-1,m=a[b].cloneNode(false);a[b]==c&&(d=m);for(a[b]==g&&(f=m);j>=0&&xe.DOMFix.parentNode(a[j])==a[b];)j=this._recurConstructClonedTree(a,j,a[b],m,d,f);n.insertBefore(m,n.firstChild);return j};a[a.length]=xe.DOMFix.parentNode(a[a.length-1]);_recurConstructClonedTree(a,a.length-1,a[a.length-1],b);return{oStartContainer:d,oEndContainer:f}},
|
||||
cloneRange:function(){return this._copyRange(new xe.W3CDOMRange(this._document))},_copyRange:function(a){a.collapsed=this.collapsed;a.commonAncestorContainer=this.commonAncestorContainer;a.endContainer=this.endContainer;a.endOffset=this.endOffset;a.startContainer=this.startContainer;a.startOffset=this.startOffset;a._document=this._document;return a},collapse:function(a){if(a){this.endContainer=this.startContainer;this.endOffset=this.startOffset}else{this.startContainer=this.endContainer;this.startOffset=
|
||||
this.endOffset}this._updateRangeInfo()},compareBoundaryPoints:function(a,b){switch(a){case xe.W3CDOMRange.START_TO_START:return this._compareEndPoint(this.startContainer,this.startOffset,b.startContainer,b.startOffset);case xe.W3CDOMRange.START_TO_END:return this._compareEndPoint(this.endContainer,this.endOffset,b.startContainer,b.startOffset);case xe.W3CDOMRange.END_TO_END:return this._compareEndPoint(this.endContainer,this.endOffset,b.endContainer,b.endOffset);case xe.W3CDOMRange.END_TO_START:return this._compareEndPoint(this.startContainer,
|
||||
this.startOffset,b.endContainer,b.endOffset)}},_findBody:function(a){if(!a)return null;for(;a;){if(a.tagName=="BODY")return a;a=xe.DOMFix.parentNode(a)}return null},_compareEndPoint:function(a,b,d,f){if(!a||this._findBody(a)!=this._document.body){a=this._document.body;b=0}if(!d||this._findBody(d)!=this._document.body){d=this._document.body;f=0}var c=this._getCommonAncestorContainer(a,d);if(a!=c){for(;(oTmpNode=xe.DOMFix.parentNode(a))!=c;)a=oTmpNode;b=this._getPosIdx(a)+0.5}if(d!=c){for(;(oTmpNode=
|
||||
xe.DOMFix.parentNode(d))!=c;)d=oTmpNode;f=this._getPosIdx(d)+0.5}f==-1&&(f=b+1);return b<f?-1:b==f?0:1},_getCommonAncestorContainer:function(a,b){for(var d=b;a;){for(;d;){if(a==d)return a;d=xe.DOMFix.parentNode(d)}d=b;a=xe.DOMFix.parentNode(a)}return this._document.body},deleteContents:function(){if(!this.collapsed){this._splitTextEndNodesOfTheRange();var a=this._getNodesInRange();if(!(a.length<1)){for(var b=a[0].previousSibling;b&&this._isBlankTextNode(b);)b=b.previousSibling;var d,f;if(!b){d=xe.DOMFix.parentNode(a[0]);
|
||||
f=0}for(var c=0;c<a.length;c++){var g=a[c];if(!g.firstChild){if(d==g){f=this._getPosIdx(d);d=xe.DOMFix.parentNode(g)}xe.DOMFix.parentNode(g).removeChild(g)}}b?b.tagName=="BODY"?this.setStartBefore(b):this.setStartAfter(b):this.setStart(d,f);this.collapse(true)}}},extractContents:function(){var a=this.cloneContents();this.deleteContents();return a},insertNode:function(a){var b=null,d;if(this.startContainer.nodeType=="3"){d=xe.DOMFix.parentNode(this.startContainer);b=this.startContainer.nodeValue.length<=
|
||||
this.startOffset?this.startContainer.nextSibling:this.startContainer.splitText(this.startOffset)}else{d=this.startContainer;b=xe.DOMFix.childNodes(this.startContainer)[this.startOffset]}if(!b||!xe.DOMFix.parentNode(b))b=null;d.insertBefore(a,b);this.setStartBefore(a)},selectNode:function(a){this.setStartBefore(a);this.setEndAfter(a)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,xe.DOMFix.childNodes(a).length)},_endsNodeValidation:function(a,b){if(!a||this._findBody(a)!=this._document.body)throw Error("INVALID_NODE_TYPE_ERR oNode is not part of current document");
|
||||
if(a.nodeType==3){if(b>a.nodeValue.length)b=a.nodeValue.length}else if(b>xe.DOMFix.childNodes(a).length)b=xe.DOMFix.childNodes(a).length;return b},setEnd:function(a,b){b=this._endsNodeValidation(a,b);this.endContainer=a;this.endOffset=b;(!this.startContainer||this._compareEndPoint(this.startContainer,this.startOffset,this.endContainer,this.endOffset)!=-1)&&this.collapse(false);this._updateRangeInfo()},setEndAfter:function(a){if(!a)throw Error("INVALID_NODE_TYPE_ERR in setEndAfter");a.tagName=="BODY"?
|
||||
this.setEnd(a,xe.DOMFix.childNodes(a).length):this.setEnd(xe.DOMFix.parentNode(a),this._getPosIdx(a)+1)},setEndBefore:function(a){if(!a)throw Error("INVALID_NODE_TYPE_ERR in setEndBefore");a.tagName=="BODY"?this.setEnd(a,0):this.setEnd(xe.DOMFix.parentNode(a),this._getPosIdx(a))},setStart:function(a,b){b=this._endsNodeValidation(a,b);this.startContainer=a;this.startOffset=b;(!this.endContainer||this._compareEndPoint(this.startContainer,this.startOffset,this.endContainer,this.endOffset)!=-1)&&this.collapse(true);
|
||||
this._updateRangeInfo()},setStartAfter:function(a){if(!a)throw Error("INVALID_NODE_TYPE_ERR in setStartAfter");a.tagName=="BODY"?this.setStart(a,xe.DOMFix.childNodes(a).length):this.setStart(xe.DOMFix.parentNode(a),this._getPosIdx(a)+1)},setStartBefore:function(a){if(!a)throw Error("INVALID_NODE_TYPE_ERR in setStartBefore");a.tagName=="BODY"?this.setStart(a,0):this.setStart(xe.DOMFix.parentNode(a),this._getPosIdx(a))},surroundContents:function(a){a.appendChild(this.extractContents());this.insertNode(a);
|
||||
this.selectNode(a)},toString:function(){var a=this._document.createElement("DIV");a.appendChild(this.cloneContents());return a.textContent||a.innerText||""},_isBlankTextNode:function(a){return a.nodeType==3&&a.nodeValue==""?true:false},_getPosIdx:function(a){for(var b=0,a=a.previousSibling;a;a=a.previousSibling)b++;return b},_updateRangeInfo:function(){if(this.startContainer){this.collapsed=this._isCollapsed(this.startContainer,this.startOffset,this.endContainer,this.endOffset);this.commonAncestorContainer=
|
||||
this._getCommonAncestorContainer(this.startContainer,this.endContainer)}else this.init(this._document)},_isCollapsed:function(a,b,d,f){var c=false;if(a==d&&b==f)c=true;else{a=this._getActualStartNode(a,b);d=this._getActualEndNode(d,f);a=this._getNextNode(this._getPrevNode(a));d=this._getPrevNode(this._getNextNode(d));if(a&&d&&d.tagName!="BODY"&&(this._getNextNode(d)==a||d==a&&this._isBlankTextNode(d)))c=true}return c},_splitTextEndNodesOfTheRange:function(){var a=this._splitTextEndNodes({oStartContainer:this.startContainer,
|
||||
iStartOffset:this.startOffset,oEndContainer:this.endContainer,iEndOffset:this.endOffset});this.startContainer=a.oStartContainer;this.startOffset=a.iStartOffset;this.endContainer=a.oEndContainer;this.endOffset=a.iEndOffset},_splitTextEndNodes:function(a){a=this._splitStartTextNode(a);return a=this._splitEndTextNode(a)},_splitStartTextNode:function(a){var b=a.oStartContainer,d=a.iStartOffset,f=a.oEndContainer,c=a.iEndOffset;if(!b||b.nodeType!=3||d==0||b.nodeValue.length<=d)return a;a=b.splitText(d);
|
||||
if(b==f){c=c-d;f=a}return{oStartContainer:a,iStartOffset:0,oEndContainer:f,iEndOffset:c}},_splitEndTextNode:function(a){var b=a.oStartContainer,d=a.iStartOffset,f=a.oEndContainer,c=a.iEndOffset;if(!f||f.nodeType!=3||c>=f.nodeValue.length||c==0)return a;f.splitText(c);return{oStartContainer:b,iStartOffset:d,oEndContainer:f,iEndOffset:c}},_getNodesInRange:function(){if(this.collapsed)return[];var a=this._getActualStartNode(this.startContainer,this.startOffset),b=this._getActualEndNode(this.endContainer,
|
||||
this.endOffset);return this._getNodesBetween(a,b)},_getActualStartNode:function(a,b){var d=a;if(a.nodeType==3)if(b>=a.nodeValue.length){d=this._getNextNode(a);d.tagName=="BODY"&&(d=null)}else d=a;else if(b<xe.DOMFix.childNodes(a).length)d=xe.DOMFix.childNodes(a)[b];else{d=this._getNextNode(a);d.tagName=="BODY"&&(d=null)}return d},_getActualEndNode:function(a,b){var d=a;if(b==0){d=this._getPrevNode(a);d.tagName=="BODY"&&(d=null)}else d=a.nodeType==3?a:xe.DOMFix.childNodes(a)[b-1];return d},_getNextNode:function(a){return!a||
|
||||
a.tagName=="BODY"?this._document.body:a.nextSibling?a.nextSibling:this._getNextNode(xe.DOMFix.parentNode(a))},_getPrevNode:function(a){return!a||a.tagName=="BODY"?this._document.body:a.previousSibling?a.previousSibling:this._getPrevNode(xe.DOMFix.parentNode(a))},_getNodesBetween:function(a,b){var d=[];this._nNodesBetweenLen=0;if(!a||!b)return d;this._recurGetNextNodesUntil(a,b,d);return d},_recurGetNextNodesUntil:function(a,b,d){if(!a||!this._recurGetChildNodesUntil(a,b,d))return false;for(var f=
|
||||
a.nextSibling;!f;){if(!(a=xe.DOMFix.parentNode(a)))return false;d[this._nNodesBetweenLen++]=a;if(a==b)return false;f=a.nextSibling}return this._recurGetNextNodesUntil(f,b,d)},_recurGetChildNodesUntil:function(a,b,d){if(!a)return false;var f=false,c=a;if(c.firstChild)for(c=c.firstChild;c;){if(!this._recurGetChildNodesUntil(c,b,d)){f=true;break}c=c.nextSibling}d[this._nNodesBetweenLen++]=a;return f||a==b?false:true}});xe.W3CDOMRange.START_TO_START=0;xe.W3CDOMRange.START_TO_END=1;xe.W3CDOMRange.END_TO_END=
|
||||
2;xe.W3CDOMRange.END_TO_START=3;xe.XpressRange=c.Class({setWindow:function(a){this._window=a;this._document=a.document},$init:function(a){this.HUSKY_BOOMARK_START_ID_PREFIX="xpress_bookmark_start_";this.HUSKY_BOOMARK_END_ID_PREFIX="xpress_bookmark_end_";this.sBlockElement="P|DIV|LI|H[1-6]|PRE";this.sBlockContainer="BODY|TABLE|TH|TR|TD|UL|OL|BLOCKQUOTE|FORM";this.rxBlockElement=RegExp("^("+this.sBlockElement+")$");this.rxBlockContainer=RegExp("^("+this.sBlockContainer+")$");this.rxLineBreaker=RegExp("^("+
|
||||
this.sBlockElement+"|"+this.sBlockContainer+")$");this.setWindow(a);this.oSimpleSelection=new xe.SimpleSelection(this._window);this.selectionLoaded=this.oSimpleSelection.selectionLoaded;this.$super.$init(this._document)},select:function(){this.oSimpleSelection.selectRange(this)},setFromSelection:function(a){this.setRange(this.oSimpleSelection.getRangeAt(a))},setRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},setEndNodes:function(a,b){this.setEndAfter(b);
|
||||
this.setStartBefore(a)},splitTextAtBothEnds:function(){this._splitTextEndNodesOfTheRange()},getStartNode:function(){return this.collapsed?this.startContainer.nodeType==3?this.startOffset==0||this.startContainer.nodeValue.length<=this.startOffset?null:this.startContainer:null:this.startContainer.nodeType==3?this.startOffset>=this.startContainer.nodeValue.length?this._getNextNode(this.startContainer):this.startContainer:this.startOffset>=xe.DOMFix.childNodes(this.startContainer).length?this._getNextNode(this.startContainer):
|
||||
xe.DOMFix.childNodes(this.startContainer)[this.startOffset]},getEndNode:function(){return this.collapsed?this.getStartNode():this.endContainer.nodeType==3?this.endOffset==0?this._getPrevNode(this.endContainer):this.endContainer:this.endOffset==0?this._getPrevNode(this.endContainer):xe.DOMFix.childNodes(this.endContainer)[this.endOffset-1]},getNodeAroundRange:function(a,b){if(this.collapsed&&this.startContainer&&this.startContainer.nodeType==3)return this.startContainer;if(!this.collapsed||this.startContainer&&
|
||||
this.startContainer.nodeType==3)return this.getStartNode();var d,c,e;c=this.startOffset>=xe.DOMFix.childNodes(this.startContainer).length?this._getNextNode(this.startContainer):xe.DOMFix.childNodes(this.startContainer)[this.startOffset];d=this.endOffset==0?this._getPrevNode(this.endContainer):xe.DOMFix.childNodes(this.endContainer)[this.endOffset-1];if(a){e=d;!e&&!b&&(e=c)}else{e=c;!e&&!b&&(e=d)}return e},_getXPath:function(a){for(var b="";a&&a.nodeType==1;){b="/"+a.tagName+"["+this._getPosIdx4XPath(a)+
|
||||
"]"+b;a=xe.DOMFix.parentNode(a)}return b},_getPosIdx4XPath:function(a){for(var b=0,d=a.previousSibling;d;d=d.previousSibling)d.tagName==a.tagName&&b++;return b},_evaluateXPath:function(a,b){for(var a=a.substring(1,a.length-1),d=a.split(/\//),c=b.body,e=2;e<d.length&&c;e++){d[e].match(/([^\[]+)\[(\d+)/i);for(var g=RegExp.$1,h=RegExp.$2,c=xe.DOMFix.childNodes(c),k=[],j=c.length,n=0,m=0;m<j;m++)c[m].tagName==g&&(k[n++]=c[m]);c=k.length<h?null:k[h]}return c},_evaluateXPathBookmark:function(a){var b=a.nTextNodeIdx,
|
||||
d=a.nOffset,a=this._evaluateXPath(a.sXPath,this._document);if(b>-1&&a){for(var c=xe.DOMFix.childNodes(a),e=null;(e=c[b])&&e.nodeType==3&&e.nodeValue.length<d;){d=d-e.nodeValue.length;b++}a=xe.DOMFix.childNodes(a)[b]}if(!a){a=this._document.body;d=0}return{elContainer:a,nOffset:d}},getXPathBookmark:function(){var a=-1,b={elContainer:this.startContainer,nOffset:this.startOffset},d=this.startContainer;if(d.nodeType==3){b=this._getFixedStartTextNode();a=this._getPosIdx(b.elContainer);d=xe.DOMFix.parentNode(d)}var a=
|
||||
{sXPath:this._getXPath(d),nTextNodeIdx:a,nOffset:b.nOffset},b=-1,d={elContainer:this.endContainer,nOffset:this.endOffset},c=this.endContainer;if(c.nodeType==3){d=this._getFixedEndTextNode();b=this._getPosIdx(d.elContainer);c=xe.DOMFix.parentNode(c)}b={sXPath:this._getXPath(c),nTextNodeIdx:b,nOffset:d.nOffset};return[a,b]},moveToXPathBookmark:function(a){if(a){var b=this._evaluateXPathBookmark(a[0]),a=this._evaluateXPathBookmark(a[1]);if(b.elContainer&&a.elContainer){this.startContainer=b.elContainer;
|
||||
this.startOffset=b.nOffset;this.endContainer=a.elContainer;this.endOffset=a.nOffset}}},_getFixedTextContainer:function(a,b){for(;a&&a.nodeType==3&&a.previousSibling&&a.previousSibling.nodeType==3;){b=b+a.previousSibling.nodeValue.length;a=a.previousSibling}return{elContainer:a,nOffset:b}},_getFixedStartTextNode:function(){return this._getFixedTextContainer(this.startContainer,this.startOffset)},_getFixedEndTextNode:function(){return this._getFixedTextContainer(this.endContainer,this.endOffset)},placeStringBookmark:function(){var a=
|
||||
(new Date).getTime(),b=this.cloneRange();b.collapseToEnd();var d=this._document.createElement("A");d.id=this.HUSKY_BOOMARK_END_ID_PREFIX+a;b.insertNode(d);b=this.cloneRange();b.collapseToStart();d=this._document.createElement("A");d.id=this.HUSKY_BOOMARK_START_ID_PREFIX+a;b.insertNode(d);this.moveToBookmark(a);return a},cloneRange:function(){return this._copyRange(new xe.XpressRange(this._window))},moveToBookmark:function(a){typeof a!="object"?this.moveToStringBookmark(a):this.moveToXPathBookmark(a)},
|
||||
moveToStringBookmark:function(a){var b=this._document.getElementById(this.HUSKY_BOOMARK_START_ID_PREFIX+a),a=this._document.getElementById(this.HUSKY_BOOMARK_END_ID_PREFIX+a);if(b&&a){this.setEndBefore(a);this.setStartAfter(b)}},removeStringBookmark:function(a){var b=this._document.getElementById(this.HUSKY_BOOMARK_START_ID_PREFIX+a),a=this._document.getElementById(this.HUSKY_BOOMARK_END_ID_PREFIX+a);b&&xe.DOMFix.parentNode(b).removeChild(b);a&&xe.DOMFix.parentNode(a).removeChild(a)},collapseToStart:function(){this.collapse(true)},
|
||||
collapseToEnd:function(){this.collapse(false)},createAndInsertNode:function(){tmpNode=this._document.createElement(tagName);this.insertNode(tmpNode);return tmpNode},getNodes:function(a,b){a&&this._splitTextEndNodesOfTheRange();var d=this._getNodesInRange(),c=[];if(!b)return d;for(var e=0;e<d.length;e++)b(d[e])&&(c[c.length]=d[e]);return c},getTextNodes:function(a){return this.getNodes(a,function(a){return a.nodeType==3&&a.nodeValue!="\n"&&a.nodeValue!=""?true:false})},surroundContentsWithNewNode:function(a){a=
|
||||
this._document.createElement(a);this.surroundContents(a);return a},isRangeinRange:function(a){var b=this.compareBoundaryPoints(this.START_TO_START,a),d=this.compareBoundaryPoints(this.START_TO_END,a),c=this.compareBoundaryPoints(this.END_TO_START,a),a=this.compareBoundaryPoints(this.END_TO_END,a);return b<=0&&a>=0?true:bIncludePartlyIncluded?d==1||c==-1?false:true:false},isNodeInRange:function(a,b,d){var c=new xe.XpressRange(this._window);if(d&&a.firstChild){c.setStartBefore(a.firstChild);c.setEndAfter(a.lastChild)}else c.selectNode(a);
|
||||
return isRangeInRange(c,b)},pasteHTML:function(a){if(a=="")this.deleteContents();else{var b=this._document.createElement("DIV");b.innerHTML=a;for(var a=b.firstChild,d=b.lastChild,c=this.cloneRange(),e=c.placeStringBookmark();b.lastChild;)this.insertNode(b.lastChild);this.setEndNodes(a,d);c.moveToBookmark(e);c.deleteContents();c.removeStringBookmark(e)}},toString:function(){this.toString=xe.W3CDOMRange.prototype.toString;return this.toString()},toHTMLString:function(){var a=this._document.createElement("DIV");
|
||||
a.appendChild(this.cloneContents());return a.innerHTML},findAncestorByTagName:function(a){for(var b=this.commonAncestorContainer;b&&b.tagName!=a;)b=xe.DOMFix.parentNode(b);return b},selectNodeContents:function(a){if(a){var b=a.firstChild?a.firstChild:a,a=a.lastChild?a.lastChild:a;b.nodeType==3?this.setStart(b,0):this.setStartBefore(b);a.nodeType==3?this.setEnd(a,a.nodeValue.length):this.setEndAfter(a)}},styleRange:function(a,b,d){d=this._getStyleParentNodes(d);if(!(d.length<1)){for(var f,e,g=0;g<
|
||||
d.length;g++){for(var h in a){f=h;e=a[f];typeof e=="string"&&(d[g].style[f]=e)}if(b)for(h in b){f=h;e=b[f];typeof e=="string"&&(f=="class"?c(d[g]).addClass(e):d[g].setAttribute(f,e))}}this.setStartBefore(d[0]);this.setEndAfter(d[d.length-1])}},_getStyleParentNodes:function(a){this._splitTextEndNodesOfTheRange();var b=this.getStartNode(),d=this.getEndNode(),f=this._getNodesInRange(),e=[],g=0,h,k,j,n,m,q=f.length;c(f).filter(function(){return!!this.childNodes.length});for(var l=0;l<q;l++)if((h=f[l])&&
|
||||
!(h.nodeType!=3||h.nodeValue=="")){m=xe.DOMFix.parentNode(h);if(m.tagName=="SPAN"){var o=c(m).html();k=this._getVeryFirstRealChild(m);j=k==h?1:o.indexOf(k);if(j!=-1){k=this._getVeryLastRealChild(m);n=k==h?1:o.indexOf(k)}if(j!=-1&&n!=-1){e[g++]=m;continue}}k=this._document.createElement("SPAN");m.insertBefore(k,h);k.appendChild(h);e[g++]=k;a&&k.setAttribute(a,"true")}this.setStartBefore(b);this.setEndAfter(d);return e},_getVeryFirstChild:function(a){return a.firstChild?this._getVeryFirstChild(a.firstChild):
|
||||
a},_getVeryLastChild:function(a){return a.lastChild?this._getVeryLastChild(a.lastChild):a},_getFirstRealChild:function(a){for(a=a.firstChild;a&&a.nodeType==3&&a.nodeValue=="";)a=a.nextSibling;return a},_getLastRealChild:function(a){for(a=a.lastChild;a&&a.nodeType==3&&a.nodeValue=="";)a=a.previousSibling;return a},_getVeryFirstRealChild:function(a){var b=this._getFirstRealChild(a);return b?this._getVeryFirstRealChild(b):a},_getVeryLastRealChild:function(a){var b=this._getLastRealChild(a);return b?
|
||||
this._getVeryLastChild(b):a},_getLineStartInfo:function(a){function b(a){if(a&&!c)if(k.test(a.tagName)){g=a;c=e;h=true}else{e=a;d(a.previousSibling);c||b(xe.DOMFix.parentNode(a))}}function d(a){if(a&&!c)if(k.test(a.tagName)){g=a;c=e;h=false}else{if(a.firstChild&&a.tagName!="TABLE")for(var b=a.lastChild;b&&!c;){d(b);b=b.previousSibling}else e=a;c||d(a.previousSibling)}}var c=null,e=a,g=a,h=true,k=this.rxLineBreaker;b(a);return{oNode:c,oLineBreaker:g,bParentBreak:h}},_getLineEndInfo:function(a){function b(a){if(a&&
|
||||
!c)if(k.test(a.tagName)){g=a;c=e;h=true}else{e=a;d(a.nextSibling);c||b(xe.DOMFix.parentNode(a))}}function d(a){if(a&&!c)if(k.test(a.tagName)){g=a;c=e;h=false}else{if(a.firstChild&&a.tagName!="TABLE")for(var b=a.firstChild;b&&!c;){d(b);b=b.nextSibling}else e=a;c||d(a.nextSibling)}}var c=null,e=a,g=a,h=true,k=this.rxLineBreaker;b(a);return{oNode:c,oLineBreaker:g,bParentBreak:h}},getLineInfo:function(){var a=this.getStartNode(),b=this.getEndNode();a||(a=this.getNodeAroundRange(true,true));b||(b=this.getNodeAroundRange(true,
|
||||
true));var a=this._getLineStartInfo(a),d=a.oNode,b=this._getLineEndInfo(b),c=b.oNode,d=this._compareEndPoint(xe.DOMFix.parentNode(d),this._getPosIdx(d),this.endContainer,this.endOffset),c=this._compareEndPoint(xe.DOMFix.parentNode(c),this._getPosIdx(c)+1,this.startContainer,this.startOffset);if(!(d<=0&&c>=0)){a=this.getNodeAroundRange(false,true);b=this.getNodeAroundRange(false,true);a=this._getLineStartInfo(a);b=this._getLineEndInfo(b)}return{oStart:a,oEnd:b}}}).extend(xe.W3CDOMRange);xe.SimpleSelection=
|
||||
function(a){this.init=function(a){this._window=a||window;this._document=this._window.document};this.init(a);c.browser.msie?xe.SimpleSelectionImpl_IE.apply(this):xe.SimpleSelectionImpl_FF.apply(this);this.selectRange=function(a){this.selectNone();this.addRange(a)};this.selectionLoaded=true;if(!this._oSelection)this.selectionLoaded=false};xe.SimpleSelectionImpl_FF=function(){this._oSelection=this._window.getSelection();this.getRangeAt=function(a){try{var b=this._oSelection.getRangeAt(a||0)}catch(d){return new xe.W3CDOMRange(this._document)}return this._FFRange2W3CRange(b)};
|
||||
this.addRange=function(a){this._oSelection.addRange(this._W3CRange2FFRange(a))};this.selectNone=function(){this._oSelection.removeAllRanges()};this._FFRange2W3CRange=function(a){var b=new xe.W3CDOMRange(this._document);b.setStart(a.startContainer,a.startOffset);b.setEnd(a.endContainer,a.endOffset);return b};this._W3CRange2FFRange=function(a){var b=this._document.createRange();b.setStart(a.startContainer,a.startOffset);b.setEnd(a.endContainer,a.endOffset);return b}};xe.SimpleSelectionImpl_IE=function(){this._oSelection=
|
||||
this._document.selection;this.getRangeAt=function(a){a=a||0;if(this._oSelection.type=="Control"){var b=new xe.W3CDOMRange(this._document),d=this._oSelection.createRange().item(a);if(!d||d.ownerDocument!=this._document)return b;b.selectNode(d);return b}d=this._oSelection.createRangeCollection().item(a).parentElement();if(!d||d.ownerDocument!=this._document)return b=new xe.W3CDOMRange(this._document);return this._IERange2W3CRange(this._oSelection.createRangeCollection().item(a))};this.addRange=function(a){this._W3CRange2IERange(a).select()};
|
||||
this.selectNone=function(){this._oSelection.empty()};this._W3CRange2IERange=function(a){var b=this._getIERangeAt(a.startContainer,a.startOffset),a=this._getIERangeAt(a.endContainer,a.endOffset);b.setEndPoint("EndToEnd",a);return b};this._getIERangeAt=function(a,b){var d=this._document.body.createTextRange(),c=this._getSelectableNodeAndOffsetForIE(a,b),e=c.iOffsetForIE;d.moveToElementText(c.oSelectableNodeForIE);d.collapse(c.bCollapseToStart);d.moveStart("character",e);return d};this._getSelectableNodeAndOffsetForIE=
|
||||
function(a,b){var d=this._document.body.createTextRange(),c=null,e=null,g=0;if(a.nodeType==3){c=xe.DOMFix.parentNode(a);e=xe.DOMFix.childNodes(c);g=e.length}else{c=a;e=xe.DOMFix.childNodes(c);g=b}for(var h=null,k=0,j=true,n=0;n<g;n++){h=e[n];if(h.nodeType==3){if(h==a)break;k=k+h.nodeValue.length}else{d.moveToElementText(h);c=h;k=0;j=false}}a.nodeType==3&&(k=k+b);return{oSelectableNodeForIE:c,iOffsetForIE:k,bCollapseToStart:j}};this._IERange2W3CRange=function(a){var b=new xe.W3CDOMRange(this._document),
|
||||
d=null,d=null,d=a.duplicate();d.collapse(true);d=this._getW3CContainerAndOffset(d,true);b.setStart(d.oContainer,d.iOffset);d=a.duplicate();d.collapse(true);if(d.isEqual(a))b.collapse(true);else{d=a.duplicate();d.collapse(false);d=this._getW3CContainerAndOffset(d);b.setEnd(d.oContainer,d.iOffset)}return b};this._getW3CContainerAndOffset=function(a,b){for(var d=a.parentElement(),c=-1,e=this._document.body.createTextRange(),g=xe.DOMFix.childNodes(d),c=null,h=0,h=0;h<g.length;h++)if(g[h].nodeType!=3){e.moveToElementText(g[h]);
|
||||
if(e.compareEndPoints("StartToStart",a)>=0)break;c=g[h]}if(h!=0&&g[h-1].nodeType==3){g=this._document.body.createTextRange();e=null;if(c){g.moveToElementText(c);g.collapse(false);e=c.nextSibling}else{g.moveToElementText(d);g.collapse(true);e=d.firstChild}d=a.duplicate();d.setEndPoint("StartToStart",g);for(c=d.text.length;c>e.nodeValue.length&&e.nextSibling;){c=c-e.nodeValue.length;e=e.nextSibling}if(b&&e.nextSibling&&e.nextSibling.nodeType==3&&c==e.nodeValue.length){c=c-e.nodeValue.length;e=e.nextSibling}d=
|
||||
e}else{d=a.parentElement();c=h}return{oContainer:d,iOffset:c}}};xe.DOMFix=new (c.Class({$init:function(){if(c.browser.msie||c.browser.opera){this.childNodes=this._childNodes_Fix;this.parentNode=this._parentNode_Fix}else{this.childNodes=this._childNodes_Native;this.parentNode=this._parentNode_Native}},_parentNode_Native:function(a){return a.parentNode},_parentNode_Fix:function(a){if(!a)return a;for(;a.previousSibling;)a=a.previousSibling;return a.parentNode},_childNodes_Native:function(a){return a.childNodes},
|
||||
_childNodes_Fix:function(a){var b=null,d=0;if(a){b=[];for(a=a.firstChild;a;){b[d++]=a;a=a.nextSibling}}return b}}));xe.DraggableLayer=c.Class({$init:function(a,b){this.oOptions=c.extend({bModal:"false",oHandle:a,iMinX:-999999,iMinY:-999999,iMaxX:999999,iMaxY:999999},b);this.oHandle=this.oOptions.oHandle;a.style.display="block";a.style.position="absolute";a.style.zIndex="9999";this.aBasePosition=this.getBaseOffset(a);a.style.top=this.toInt(c(a).offset().top)-this.aBasePosition.top+"px";a.style.left=
|
||||
this.toInt(c(a).offset().left)-this.aBasePosition.left+"px";this.$FnMouseDown=c.fnBind(this._mousedown,this,a);this.$FnMouseMove=c.fnBind(this._mousemove,this,a);this.$FnMouseUp=c.fnBind(this._mouseup,this,a);c(this.oHandle).bind("mousedown",this.$FnMouseDown)},_mousedown:function(a,b){if(b.target.tagName!="INPUT"){this.MouseOffsetY=b.pageY-this.toInt(a.style.top)-this.aBasePosition.top;this.MouseOffsetX=b.pageX-this.toInt(a.style.left)-this.aBasePosition.left;c(a).bind("mousemove",this.$FnMouseMove);
|
||||
c(a).bind("mouseup",this.$FnMouseUp)}},_mousemove:function(a,b){var d=b.pageY-this.MouseOffsetY-this.aBasePosition.top,c=b.pageX-this.MouseOffsetX-this.aBasePosition.left;if(d<this.oOptions.iMinY)d=this.oOptions.iMinY;if(d>this.oOptions.iMaxY)d=this.oOptions.iMaxY;if(c<this.oOptions.iMinX)c=this.oOptions.iMinX;if(c>this.oOptions.iMaxX)c=this.oOptions.iMaxX;a.style.top=d+"px";a.style.left=c+"px"},_mouseup:function(a){c(a).unbind("mousemove",this.$FnMouseMove);c(a).unbind("mouseup",this.$FnMouseUp)},
|
||||
toInt:function(a){return parseInt(a)||0},findNonStatic:function(a){return!a?null:a.tagName=="BODY"||c(a).css("position").match(/absolute|relative/i)?a:this.findNonStatic(a.offsetParent)},getBaseOffset:function(a){a=this.findNonStatic(a.offsetParent);a=c(a).offset();return{top:a.top,left:a.left}}});xe.CorePlugin=c.Class({name:"CorePlugin",$init:function(a){this.funcOnReady=a},$AFTER_MSG_APP_READY:function(){this.oApp.exec("EXEC_ON_READY_FUNCTION",[])},$ON_ADD_APP_PROPERTY:function(a,b){this.oApp[a]=
|
||||
b},$ON_REGISTER_BROWSER_EVENT:function(a,b,d,c,e){this.oApp.registerBrowserEvent(a,b,d,c,e)},$ON_DISABLE_COMMAND:function(a){this.oApp.disableCommand(a,true)},$ON_ENABLE_COMMAND:function(a){this.oApp.disableCommand(a,false)},$ON_EXEC_ON_READY_FUNCTION:function(){typeof this.funcOnReady=="function"&&this.funcOnReady()}});xe.Utils=c.Class({name:"Utils",$init:function(){if(c.browser.msie&&c.browser.nVersion==6)try{document.execCommand("BackgroundImageCache",false,true)}catch(a){}},$ON_ATTACH_HOVER_EVENTS:function(a,
|
||||
b){b=b||"hover";a&&c(a).hover(function(){c(this).addClass(b)},function(){c(this).removeClass(b)})}});xe.XpressRangeManager=c.Class({name:"XpressRangeManager",oWindow:null,$init:function(a){this.oWindow=a||window},$BEFORE_MSG_APP_READY:function(){if(this.oWindow&&this.oWindow.tagName=="IFRAME")this.oWindow=this.oWindow.contentWindow;this.oApp.exec("ADD_APP_PROPERTY",["getSelection",c.fnBind(this.getSelection,this)]);this.oApp.exec("ADD_APP_PROPERTY",["getEmptySelection",c.fnBind(this.getEmptySelection,
|
||||
this)])},$ON_SET_EDITING_WINDOW:function(a){this.oWindow=a},getEmptySelection:function(){return new xe.XpressRange(this.oWindow)},getSelection:function(){this.oApp.exec("RESTORE_IE_SELECTION",[]);var a=this.getEmptySelection();try{a.setFromSelection()}catch(b){}return a}});xe.Hotkey=c.Class({name:"Hotkey",storage:{},keyhash:{},$init:function(){this.storage={};this.keyhash={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,meta:224,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,left:37,up:38,
|
||||
right:39,down:40,del:46,comma:188,period:190,slash:191,hyphen:109,equal:61};if(c.browser.msie||c.browser.safari){this.keyhash.hyphen=189;this.keyhash.equal=187;this.keyhash.meta=91}},$ON_MSG_APP_READY:function(){c(this.oApp.getWYSIWYGDocument()||document).keydown(c.fnBind(this.keydown,this))},$ON_REGISTER_HOTKEY:function(a,b,d){d||(d=[]);b=c.fnBind(this.oApp.exec,this.oApp,b,d);a=this.normalize(a);if(!a)return false;this.add(a,b)},add:function(a,b){typeof this.storage[a]=="undefined"?this.storage[a]=
|
||||
[b]:this.storage[a].push(b)},keydown:function(a){var b=[],d=this.keyhash;if(!(c.inArray(a.keyCode,[d.shift,d.ctrl,d.alt,d.meta])>=0)){a.shiftKey&&b.push("shift");a.altKey&&b.push("alt");a.ctrlKey&&b.push("ctrl");a.metaKey&&b.push("meta");if(b.length){b.length==1&&a.metaKey&&(b=["ctrl","meta"]);b.push(a.keyCode);b=b.join("+");if(this.storage[b]){c.each(this.storage[b],function(){this()});return false}}}},normalize:function(a){var b,d,f,e,g,a=(a||"").toLowerCase().split("+");b=d=f=e=g=false;c.each(a,
|
||||
function(){var a=""+this;switch(a){case "shift":b=true;case "alt":f=true;case "ctrl":d=true;case "meta":e=true;default:g=a}});if(!g)return"";a=[];b&&a.push("shift");f&&a.push("alt");d&&a.push("ctrl");(e||d&&!b&&!f)&&a.push("meta");a.push(this.keyhash[g]||g.toUpperCase().charCodeAt(0));return a.join("+")}});xe.DialogLayerManager=c.Class({name:"DialogLayerManager",aMadeDraggable:null,aOpenedLayers:null,$init:function(){this.aMadeDraggable=[];this.aOpenedLayers=[]},$ON_SHOW_DIALOG_LAYER:function(a,b){a=
|
||||
c.$(a);b=c.$(b)||false;if(a&&c.inArray(a,this.aOpenedLayers)==-1){this.oApp.exec("POSITION_DIALOG_LAYER",[a]);this.aOpenedLayers[this.aOpenedLayers.length]=a;if(c.inArray(a,this.aMadeDraggable)==-1){new xe.DraggableLayer(a,{bModal:b,iMinY:0});this.aMadeDraggable[this.aMadeDraggable.length]=a}else a.style.display="block"}},$ON_HIDE_LAST_DIALOG_LAYER:function(){this.oApp.exec("HIDE_DIALOG_LAYER",[this.aOpenedLayers[this.aOpenedLayers.length-1]])},$ON_HIDE_ALL_DIALOG_LAYER:function(){for(var a=this.aOpenedLayers.length-
|
||||
1;a>=0;a--)this.oApp.exec("HIDE_DIALOG_LAYER",[this.aOpenedLayers[a]])},$ON_HIDE_DIALOG_LAYER:function(a){if(a=c.$(a))a.style.display="none";this.aOpenedLayers=c.grep(this.aOpenedLayers,function(b){return b!=a})},$ON_SET_DIALOG_LAYER_POSITION:function(a,b,d){a.style.top=b;a.style.left=d}});xe.ActiveLayerManager=c.Class({name:"ActiveLayerManager",oCurrentLayer:null,$ON_TOGGLE_ACTIVE_LAYER:function(a,b,d,c,e){if(a==this.oCurrentLayer)this.oApp.exec("HIDE_ACTIVE_LAYER",[]);else{this.oApp.exec("SHOW_ACTIVE_LAYER",
|
||||
[a,c,e]);b&&this.oApp.exec(b,d)}},$ON_SHOW_ACTIVE_LAYER:function(a,b,d){a=c.$(a);this.sOnCloseCmd=b;this.aOnCloseParam=d;if(a!=this.oCurrentLayer){this.oApp.exec("HIDE_ACTIVE_LAYER",[]);a.style.display="block";this.oCurrentLayer=a}},$ON_HIDE_ACTIVE_LAYER:function(){var a=this.oCurrentLayer;if(a){a.style.display="none";this.oCurrentLayer=null;this.sOnCloseCmd&&this.oApp.exec(this.sOnCloseCmd,this.aOnCloseParam)}},$ON_HIDE_CURRENT_ACTIVE_LAYER:function(){this.oApp.exec("HIDE_ACTIVE_LAYER",[])},$ON_EVENT_EDITING_AREA_KEYDOWN:function(){this.oApp.exec("HIDE_ACTIVE_LAYER",
|
||||
[])},$ON_EVENT_EDITING_AREA_MOUSEDOWN:function(){this.oApp.exec("HIDE_ACTIVE_LAYER",[])}});xe.StringConverterManager=c.Class({name:"StringConverterManager",oConverters:null,$init:function(){this.oConverters={}},$BEFORE_MSG_APP_READY:function(){this.oApp.exec("ADD_APP_PROPERTY",["applyConverter",c.fnBind(this.applyConverter,this)]);this.oApp.exec("ADD_APP_PROPERTY",["addConverter",c.fnBind(this.addConverter,this)])},applyConverter:function(a,b){var d=this.oConverters[a];if(!d)return b;for(var c=0;c<
|
||||
d.length;c++)b=d[c](b);return b},addConverter:function(a,b){this.oConverters[a]||(this.oConverters[a]=[]);this.oConverters[a][this.oConverters[a].length]=b}});xe.MessageManager=c.Class({name:"MessageManager",oMessageMap:null,$init:function(a){this.oMessageMap=a},$BEFORE_MSG_APP_READY:function(){this.oApp.exec("ADD_APP_PROPERTY",["$MSG",c.fnBind(this.getMessage,this)])},getMessage:function(a){return this.oMessageMap[a]?unescape(this.oMessageMap[a]):a}});xe.XE_Toolbar=c.Class({name:"XE_Toolbar",toolbarArea:null,
|
||||
toolbarButton:null,uiNameTag:"uiName",sUIClassPrefix:"xpress_xeditor_ui_",aUICmdMap:null,$init:function(a){this.htUIList={};this.aUICmdMap={};this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){a=c.$(a)||document;this.toolbarArea=c(".tool",a).get(0);this.welToolbarArea=c(this.toolbarArea);this.aAllButtons=c("BUTTON",this.toolbarArea).get();for(var a=this.toolbarArea.getElementsByTagName("LI"),b=a.length,d=RegExp(this.sUIClassPrefix+"([^ ]+)"),f=0;f<b;f++)if(d.test(a[f].className)){var e=RegExp.$1;
|
||||
this.htUIList[e]==null&&(this.htUIList[e]=c(">*:first-child",a[f]).get(0))}},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.toolbarArea,"mouseover","EVENT_TOOLBAR_MOUSEOVER",[]);this.oApp.registerBrowserEvent(this.toolbarArea,"mouseout","EVENT_TOOLBAR_MOUSEOUT",[]);this.oApp.exec("ADD_APP_PROPERTY",["getToolbarButtonByUIName",c.fnBind(this.getToolbarButtonByUIName,this)])},$ON_EVENT_TOOLBAR_MOUSEOVER:function(a){a.target.tagName=="BUTTON"&&c(a.target).addClass("hover").parent("span").addClass("hover")},
|
||||
$ON_EVENT_TOOLBAR_MOUSEOUT:function(a){a.target.tagName=="BUTTON"&&c(a.target).removeClass("hover").parent("span").removeClass("hover")},$ON_TOGGLE_TOOLBAR_ACTIVE_LAYER:function(a,b,d,c,e,g){this.oApp.exec("TOGGLE_ACTIVE_LAYER",[a,"MSG_TOOLBAR_LAYER_SHOWN",[a,b,d,c],e,g])},$ON_MSG_TOOLBAR_LAYER_SHOWN:function(a,b,d,c){this.oApp.exec("POSITION_TOOLBAR_LAYER",[a,b]);d&&this.oApp.exec(d,c)},$ON_SHOW_TOOLBAR_ACTIVE_LAYER:function(a,b,d,c){this.oApp.exec("SHOW_ACTIVE_LAYER",[a,b,d]);this.oApp.exec("POSITION_TOOLBAR_LAYER",
|
||||
[a,c])},$ON_ENABLE_UI:function(a){var b=this.htUIList[a];if(b){c(b).removeClass("off");b.disabled=false;b="";if(this.aUICmdMap[a])for(var d=0;d<this.aUICmdMap[a].length;d++){b=this.aUICmdMap[a][d];this.oApp.exec("ENABLE_COMMAND",[b])}}},$ON_DISABLE_UI:function(a){var b=this.htUIList[a];if(b){c(b).addClass("off");c(b).removeClass("hover").parent("span").removeClass("hover");b.disabled=true;b="";if(this.aUICmdMap[a])for(var d=0;d<this.aUICmdMap[a].length;d++){b=this.aUICmdMap[a][d];this.oApp.exec("DISABLE_COMMAND",
|
||||
[b])}}},$ON_SELECT_UI:function(a){(a=this.htUIList[a])&&c(a).addClass("active")},$ON_DESELECT_UI:function(a){(a=this.htUIList[a])&&c(a).removeClass("active")},$ON_ENABLE_ALL_UI:function(){for(var a in this.htUIList)a&&this.oApp.exec("ENABLE_UI",[a]);c(this.toolbarArea).removeClass("off")},$ON_DISABLE_ALL_UI:function(){for(var a in this.htUIList)a&&this.oApp.exec("DISABLE_UI",[a]);c(this.toolbarArea).addClass("off");this.oApp.exec("HIDE_ACTIVE_LAYER",[])},$ON_MSG_STYLE_CHANGED:function(a,b){b==1?this.oApp.exec("SELECT_UI",
|
||||
[a]):this.oApp.exec("DESELECT_UI",[a])},$ON_REGISTER_UI_EVENT:function(a,b,d,c){this.aUICmdMap[a]||(this.aUICmdMap[a]=[]);this.aUICmdMap[a][this.aUICmdMap[a].length]=d;(a=this.htUIList[a])&&this.oApp.registerBrowserEvent(a,b,d,c)},$ON_POSITION_TOOLBAR_LAYER:function(a,b){a=c.$(a);b=c.$(b);if(a){b&&(b.tagName&&b.tagName=="BUTTON")&&b.parentNode.appendChild(a);a.style.left="0";var d=c(a).offset().left,d=d+a.offsetWidth,f=this.welToolbarArea.offset().left,f=f+this.toolbarArea.offsetWidth;if(d>f)a.style.left=
|
||||
f-d-5+"px"}},getToolbarButtonByUIName:function(a){return this.htUIList[a]}});xe.XE_EditingAreaManager=c.Class({name:"XE_EditingAreaManager",oActivePlugin:null,oIRField:null,bIsDirty:!1,$init:function(a,b,d,f,e){this.sInitialMode=a;this.oIRField=c.$(b);this._assignHTMLObjects(e);this.fOnBeforeUnload=f;this.oEditingMode={};this.elEditingAreaContainer.style.height=parseInt(d.nHeight||this.elEditingAreaContainer.offsetHeight)+"px";this.nMinHeight=d.nMinHeight||10;this.niMinWidth=d.nMinWidth||10},_assignHTMLObjects:function(a){a=
|
||||
c.$(a)||document;this.elEditingAreaContainer=c("DIV.xpress_xeditor_editing_area_container",a).get(0);this.elEditingAreaSkipUI=c("A.skip",a).get(0)},$BEFORE_MSG_APP_READY:function(){this.oApp.exec("ADD_APP_PROPERTY",["elEditingAreaContainer",this.elEditingAreaContainer]);this.oApp.exec("ADD_APP_PROPERTY",["getIR",c.fnBind(this.getIR,this)]);this.oApp.exec("ADD_APP_PROPERTY",["setIR",this.setIR]);this.oApp.exec("ADD_APP_PROPERTY",["getEditingMode",c.fnBind(this.getEditingMode,this)])},$ON_MSG_APP_READY:function(){this.oApp.exec("CHANGE_EDITING_MODE",
|
||||
[this.sInitialMode,true]);this.oApp.exec("LOAD_IR_FIELD",[false]);this.oApp.registerBrowserEvent(this.elEditingAreaSkipUI,"focus","MSG_EDITING_AREA_SIZE_CHANGED",[],50);this.oApp.registerBrowserEvent(this.elEditingAreaSkipUI,"blur","MSG_EDITING_AREA_SIZE_CHANGED",[],50)},$AFTER_MSG_APP_READY:function(){this.oApp.exec("UPDATE_IR_FIELD",[])},$ON_LOAD_IR_FIELD:function(a){this.oApp.setIR(this.oIRField.value,a)},$ON_UPDATE_IR_FIELD:function(){this.oIRField.value=this.oApp.getIR()},$BEFORE_CHANGE_EDITING_MODE:function(a){this._oPrevActivePlugin=
|
||||
this.oActivePlugin;this.oActivePlugin=this.oEditingMode[a]},$AFTER_CHANGE_EDITING_MODE:function(a,b){if(this._oPrevActivePlugin){this.oApp.exec("SET_IR",[this._oPrevActivePlugin.getIR()]);this.oApp.exec("ENABLE_UI",[this._oPrevActivePlugin.sMode]);this._setEditingAreaDimension()}this.oApp.exec("DISABLE_UI",[this.oActivePlugin.sMode]);b||this.oApp.exec("FOCUS",[])},$ON_SET_IS_DIRTY:function(a){this.bIsDirty=a},$ON_FOCUS:function(){this.oActivePlugin&&typeof this.oActivePlugin.setIR=="function"&&this.oActivePlugin.focus()},
|
||||
$BEFORE_SET_IR:function(a,b){b||this.oApp.exec("RECORD_UNDO_ACTION",["SET CONTENTS"])},$ON_SET_IR:function(a){this.oActivePlugin&&typeof this.oActivePlugin.setIR=="function"&&this.oActivePlugin.setIR(a)},$AFTER_SET_IR:function(a,b){b||this.oApp.exec("RECORD_UNDO_ACTION",["SET CONTENTS"])},$ON_REGISTER_EDITING_AREA:function(a){this.oEditingMode[a.sMode]=a;this.attachDocumentEvents(a.oEditingArea)},$ON_MSG_EDITING_AREA_RESIZE_STARTED:function(){this.oActivePlugin.elEditingArea.style.display="none";
|
||||
this.iStartingHeight=parseInt(this.elEditingAreaContainer.style.height)},$ON_RESIZE_EDITING_AREA:function(a,b){var d=parseInt(a),c=parseInt(b);if(d<this.niMinWidth)d=this.niMinWidth;if(c<this.nMinHeight)c=this.nMinHeight;if(a)this.elEditingAreaContainer.style.width=d+"px";if(b)this.elEditingAreaContainer.style.height=c+"px"},$ON_RESIZE_EDITING_AREA_BY:function(a,b){var d=parseInt(a),c=parseInt(b);this.oApp.exec("RESIZE_EDITING_AREA",[this.elEditingAreaContainer.style.width?parseInt(this.elEditingAreaContainer.style.width)+
|
||||
d:null,this.elEditingAreaContainer.style.height?this.iStartingHeight+c:null])},$ON_MSG_EDITING_AREA_RESIZE_ENDED:function(){this.oActivePlugin.elEditingArea.style.display="block";this._setEditingAreaDimension()},_setEditingAreaDimension:function(){this.oActivePlugin.elEditingArea.style.height=this.elEditingAreaContainer.style.height;this.oActivePlugin.elEditingArea.style.width=this.elEditingAreaContainer.style.width},attachDocumentEvents:function(a){this.oApp.registerBrowserEvent(a,"click","EVENT_EDITING_AREA_CLICK");
|
||||
this.oApp.registerBrowserEvent(a,"mousedown","EVENT_EDITING_AREA_MOUSEDOWN");this.oApp.registerBrowserEvent(a,"mousemove","EVENT_EDITING_AREA_MOUSEMOVE");this.oApp.registerBrowserEvent(a,"mouseup","EVENT_EDITING_AREA_MOUSEUP");this.oApp.registerBrowserEvent(a,"keydown","EVENT_EDITING_AREA_KEYDOWN");this.oApp.registerBrowserEvent(a,"keypress","EVENT_EDITING_AREA_KEYPRESS");this.oApp.registerBrowserEvent(a,"keyup","EVENT_EDITING_AREA_KEYUP")},getIR:function(){return this.oActivePlugin.getIR()},setIR:function(a,
|
||||
b){this.oApp.exec("SET_IR",[a,b])},getEditingMode:function(){return this.oActivePlugin.sMode}});xe.XE_EditingArea_HTMLSrc=c.Class({name:"XE_EditingArea_HTMLSrc",sMode:"HTMLSrc",textarea:null,$init:function(a){this.elEditingArea=this.textarea=c.$(a)},$BEFORE_MSG_APP_READY:function(){this.oEditingArea=this.textarea;this.oApp.exec("REGISTER_EDITING_AREA",[this])},$ON_CHANGE_EDITING_MODE:function(a){this.textarea.style.display=a==this.sMode?"block":"none"},$ON_PASTE_HTML:function(a){if(this.oApp.getEditingMode()==
|
||||
this.sMode){(new l(this.textarea)).paste(a);this.textarea.focus()}},getIR:function(){var a=this.textarea.value;return this.oApp.applyConverter?this.oApp.applyConverter(this.sMode+"_TO_IR",a):a},setIR:function(a){this.textarea.value=this.oApp.applyConverter?this.oApp.applyConverter("IR_TO_"+this.sMode,a):a},focus:function(){this.textarea.focus()}});var l=function(a){this._o=a};l.prototype.getSelection=function(){var a=this._o,b=[-1,-1];if(isNaN(this._o.selectionStart)){a.focus();var d=document.body.createTextRange(),
|
||||
c=null,c=document.selection.createRange().duplicate();d.moveToElementText(a);c.collapse(true);d.setEndPoint("EndToEnd",c);b[0]=d.text.length;c=document.selection.createRange().duplicate();d.moveToElementText(a);c.collapse(false);d.setEndPoint("EndToEnd",c);b[1]=d.text.length;a.blur()}else{b[0]=a.selectionStart;b[1]=a.selectionEnd}return b};l.prototype.setSelection=function(a,b){var d=this._o;typeof b=="undefined"&&(b=a);if(d.setSelectionRange)d.setSelectionRange(a,b);else if(d.createTextRange){var c=
|
||||
d.createTextRange();c.collapse(true);c.moveStart("character",a);c.moveEnd("character",b-a);c.select();d.blur()}};l.prototype.copy=function(){var a=this.getSelection();return this._o.value.substring(a[0],a[1])};l.prototype.paste=function(a){var b=this._o,d=this.getSelection(),c=b.value,e=c.substr(0,d[0]),c=c.substr(d[1]);b.value=e+a+c;b=0;if(typeof document.body.style.maxHeight=="undefined"){e=e.match(/\n/gi);b=e!=null?e.length:0}this.setSelection(d[0]+a.length-b)};l.prototype.cut=function(){var a=
|
||||
this.copy();this.paste("");return a};xe.XE_EditingArea_WYSIWYG=c.Class({name:"XE_EditingArea_WYSIWYG",status:xe.PLUGIN_STATUS.NOT_READY,sMode:"WYSIWYG",iframe:null,doc:null,iLastUndoRecorded:0,iMinUndoInterval:3E3,_nIFrameReadyCount:50,$init:function(a){this.iframe=c.$(a);this.initIframe();this.elEditingArea=a},$BEFORE_MSG_APP_READY:function(){this.oEditingArea=this.doc;this.oApp.exec("REGISTER_EDITING_AREA",[this]);this.oApp.exec("ADD_APP_PROPERTY",["getWYSIWYGWindow",c.fnBind(this.getWindow,this)]);
|
||||
this.oApp.exec("ADD_APP_PROPERTY",["getWYSIWYGDocument",c.fnBind(this.getDocument,this)])},$ON_MSG_APP_READY:function(){if(c.browser.msie){c(this.doc).unbind("keydown.ea").bind("keydown.ea",c.fnBind(function(a){if(this.doc.selection.type.toLowerCase()=="control"&&a.keyCode==8){this.oApp.exec("EXECCOMMAND",["delete",false,false]);a.preventDefault();a.stopPropagation()}},this));c(this.doc.body).unbind("mousedown.ea").bind("mousedown.ea",c.fnBind(function(){this._oIERange=null;this._bIERangeReset=true},
|
||||
this)).unbind("beforedeactivate.ea").bind("beforedeactivate.ea",c.fnBind(function(){if(!this._bIERangeReset){var a=this.getDocument().selection.createRange(0);this._oIERange=a.parentElement&&a.parentElement()&&a.parentElement().tagName=="INPUT"?this._oPrevIERange:a}},this)).unbind("mouseup.ea").bind("mouseup.ea",c.fnBind(function(){this._bIERangeReset=false},this))}},$ON_CHANGE_EDITING_MODE:function(a){if(a==this.sMode){this.iframe.style.display="block";this.oApp.exec("REFRESH_WYSIWYG",[]);this.oApp.exec("SET_EDITING_WINDOW",
|
||||
[this.getWindow()])}else this.iframe.style.display="none"},$AFTER_CHANGE_EDITING_MODE:function(){this._oIERange=null},$ON_REFRESH_WYSIWYG:function(){if(c.browser.mozilla){this._disableWYSIWYG();this._enableWYSIWYG()}},$ON_ENABLE_WYSIWYG:function(){this._enableWYSIWYG()},$ON_DISABLE_WYSIWYG:function(){this._disableWYSIWYG()},$ON_EVENT_EDITING_AREA_KEYDOWN:function(a){if(a.ctrlKey){switch(a.keyCode){case 37:this.oApp.exec("EXECCOMMAND",["outdent",false,false]);break;case 39:this.oApp.exec("EXECCOMMAND",
|
||||
["indent",false,false]);break;case 49:case 50:case 51:case 52:case 53:case 54:this.oApp.exec("EXECCOMMAND",["FormatBlock",false,"<h"+(a.keyCode-48)+">"]);break;default:return}a.preventDefault();a.stopPropagation()}},$ON_EVENT_EDITING_AREA_KEYUP:function(a){a.keyCode==229||(a.keyCode==13||a.altKey||a.ctrlKey||a.keyCode>=33&&a.keyCode<=40||a.keyCode==16)||this._recordUndo(a)},$ON_PASTE_HTML:function(a,b){if(this.oApp.getEditingMode()==this.sMode){var d=b||this.oApp.getSelection();d.pasteHTML(a);if(!c.browser.msie){var f=
|
||||
d.placeStringBookmark();this.oApp.getWYSIWYGDocument().body.innerHTML=this.oApp.getWYSIWYGDocument().body.innerHTML;d.moveToBookmark(f);d.collapseToEnd();d.select();d.removeStringBookmark(f)}this.oApp.exec("RECORD_UNDO_ACTION",["INSERT HTML"])}},$AFTER_MSG_EDITING_AREA_RESIZE_ENDED:function(){this.oApp.exec("REFRESH_WYSIWYG",[])},$ON_RESTORE_IE_SELECTION:function(){if(this._oIERange){this._oIERange.select();this._oPrevIERange=this._oIERange;this._oIERange=null}},initIframe:function(){try{this.doc=
|
||||
this.iframe.contentWindow.document;if(this.doc==null||this.doc.location.href=="about:blank")throw Error("Access denied");this._enableWYSIWYG();this.status=xe.PLUGIN_STATUS.READY}catch(a){if(this._nIFrameReadyCount-- >0)setTimeout(c.fnBind(this.initIframe,this),100);else throw"iframe for WYSIWYG editing mode can't be initialized. Please check if the iframe document exists and is also accessable(cross-domain issues). ";}},getIR:function(){var a=this.doc.body.innerHTML;return this.oApp.applyConverter?
|
||||
this.oApp.applyConverter(this.sMode+"_TO_IR",a):a},setIR:function(a){this.doc.body.innerHTML=this.oApp.applyConverter?this.oApp.applyConverter("IR_TO_"+this.sMode,a):a;if(c.browser.mozilla&&this.doc.body.innerHTML=="")this.doc.body.innerHTML="<br>"},getWindow:function(){return this.iframe.contentWindow},getDocument:function(){return this.iframe.contentWindow.document},focus:function(){},_recordUndo:function(a){if(!(new Date-this.iLastUndoRecorded<this.iMinUndoInterval)){this.oApp.exec("RECORD_UNDO_ACTION",
|
||||
["KEYPRESS"]);this.iLastUndoRecorded=new Date;this.prevKeyCode=a.keyCode}},_enableWYSIWYG:function(){if(c.browser.msie){this.doc.body.disabled=true;this.doc.body.contentEditable=true;this.doc.body.removeAttribute("disabled")}else this.doc.designMode="on"},_disableWYSIWYG:function(){c.browser.msie?this.doc.body.contentEditable=false:this.doc.designMode="off"}});xe.XE_EditingAreaVerticalResizer=c.Class({name:"XE_EditingAreaVerticalResizer",oResizeGrip:null,$init:function(a){this._assignHTMLObjects(a);
|
||||
this.$FnMouseDown=c.fnBind(this._mousedown,this);this.$FnMouseMove=c.fnBind(this._mousemove,this);this.$FnMouseUp=c.fnBind(this._mouseup,this);c(this.oResizeGrip).bind("mousedown",this.$FnMouseDown)},_assignHTMLObjects:function(a){a=c.$(a)||document;this.oResizeGrip=c(".xpress_xeditor_editingArea_verticalResizer",a).get(0)},_mousedown:function(a){this.iStartHeight=a.clientY;c(document).bind("mousemove",this.$FnMouseMove);c(document).bind("mouseup",this.$FnMouseUp);this.oApp.exec("MSG_EDITING_AREA_RESIZE_STARTED",
|
||||
[this.$FnMouseDown,this.$FnMouseMove,this.$FnMouseUp])},_mousemove:function(a){this.oApp.exec("RESIZE_EDITING_AREA_BY",[0,a.clientY-this.iStartHeight])},_mouseup:function(){c(document).unbind("mousemove",this.$FnMouseMove);c(document).unbind("mouseup",this.$FnMouseUp);this.oApp.exec("MSG_EDITING_AREA_RESIZE_ENDED",[this.$FnMouseDown,this.$FnMouseMove,this.$FnMouseUp])}});xe.XE_ExecCommand=c.Class({name:"XE_ExecCommand",oEditingArea:null,$init:function(a){this.oEditingArea=a},$BEFORE_MSG_APP_READY:function(){if(this.oEditingArea&&
|
||||
this.oEditingArea.tagName=="IFRAME")this.oEditingArea=this.oEditingArea.contentWindow.document},$ON_MSG_APP_READY:function(){this.oApp.exec("REGISTER_HOTKEY",["ctrl+b","EXECCOMMAND",["bold",false,false]]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+u","EXECCOMMAND",["underline",false,false]]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+i","EXECCOMMAND",["italic",false,false]]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+d","EXECCOMMAND",["strikethrough",false,false]]);this.oApp.exec("REGISTER_UI_EVENT",["bold",
|
||||
"click","EXECCOMMAND",["bold",false,false]]);this.oApp.exec("REGISTER_UI_EVENT",["underline","click","EXECCOMMAND",["underline",false,false]]);this.oApp.exec("REGISTER_UI_EVENT",["italic","click","EXECCOMMAND",["italic",false,false]]);this.oApp.exec("REGISTER_UI_EVENT",["lineThrough","click","EXECCOMMAND",["strikethrough",false,false]]);this.oApp.exec("REGISTER_UI_EVENT",["superscript","click","EXECCOMMAND",["superscript",false,false]]);this.oApp.exec("REGISTER_UI_EVENT",["subscript","click","EXECCOMMAND",
|
||||
["subscript",false,false]]);this.oApp.exec("REGISTER_UI_EVENT",["justifyleft","click","EXECCOMMAND",["justifyleft",false,false]]);this.oApp.exec("REGISTER_UI_EVENT",["justifycenter","click","EXECCOMMAND",["justifycenter",false,false]]);this.oApp.exec("REGISTER_UI_EVENT",["justifyright","click","EXECCOMMAND",["justifyright",false,false]]);this.oApp.exec("REGISTER_UI_EVENT",["justifyfull","click","EXECCOMMAND",["justifyfull",false,false]]);this.oApp.exec("REGISTER_UI_EVENT",["orderedlist","click","EXECCOMMAND",
|
||||
["insertorderedlist",false,false]]);this.oApp.exec("REGISTER_UI_EVENT",["unorderedlist","click","EXECCOMMAND",["insertunorderedlist",false,false]]);this.oApp.exec("REGISTER_UI_EVENT",["outdent","click","EXECCOMMAND",["outdent",false,false]]);this.oApp.exec("REGISTER_UI_EVENT",["indent","click","EXECCOMMAND",["indent",false,false]])},$BEFORE_EXECCOMMAND:function(a){this._bOnlyCursorChanged=false;this.oApp.exec("FOCUS",[]);if(a.match(/^bold|underline|italic|strikethrough|superscript|subscript$/i)&&
|
||||
this.oApp.getSelection().collapsed)this._bOnlyCursorChanged=true;this._bOnlyCursorChanged||this.oApp.exec("RECORD_UNDO_BEFORE_ACTION",[a])},$ON_EXECCOMMAND:function(a,b,d){this.oEditingArea.execCommand(a,b==""||b?b:false,d==""||d?d:false)},$AFTER_EXECCOMMAND:function(a){this._bOnlyCursorChanged||this.oApp.exec("RECORD_UNDO_AFTER_ACTION",[a]);this.oApp.exec("CHECK_STYLE_CHANGE",[])}});xe.XE_WYSIWYGEnterKey=c.Class({name:"XE_WYSIWYGEnterKey",unsupportedBrowser:["ie","opera"],oEditingArea:null,$init:function(a){this.oEditingArea=
|
||||
a},$BEFORE_MSG_APP_READY:function(){if(this.oEditingArea&&this.oEditingArea.tagName=="IFRAME")this.oEditingArea=this.oEditingArea.contentWindow.document},$ON_EVENT_EDITING_AREA_KEYDOWN:function(a){if(this.oApp.getEditingMode()=="WYSIWYG"&&!a.shiftKey&&a.keyCode==13){var b=this.oApp.getSelection(),d=b.placeStringBookmark(),c=b.getLineInfo(),e=c.oStart,c=c.oEnd;if(!e.bParentBreak||b.rxBlockContainer.test(e.oLineBreaker.tagName)){a.stopPropagation();a.preventDefault();a=this.oEditingArea.createElement("P");
|
||||
b.moveToBookmark(d);b.setStartBefore(e.oNode);b.surroundContents(a);b.collapseToEnd();e=this.oEditingArea.createElement("P");b.setEndAfter(c.oNode);b.surroundContents(e);b.removeStringBookmark(d);if(a.innerHTML=="")a.innerHTML="<br>";if(e.innerHTML=="")e.innerHTML="<br>";e.nextSibling&&e.nextSibling.tagName=="BR"&&e.parentNode.removeChild(e.nextSibling);b.selectNodeContents(e);b.collapseToStart();b.select();this.oApp.exec("CHECK_STYLE_CHANGE",[])}else b.removeStringBookmark(d)}}});xe.XE_WYSIWYGStyler=
|
||||
c.Class({name:"XE_WYSIWYGStyler",$PRECONDITION:function(){return this.oApp.getEditingMode()=="WYSIWYG"},$ON_SET_WYSIWYG_STYLE:function(a){var b=this.oApp.getSelection();if(b.collapsed){var d=this.oApp.getWYSIWYGDocument().createElement("SPAN");b.insertNode(d);d.innerHTML=unescape("%uFEFF");var f,e;for(e in a){f=a[e];typeof f=="string"&&(d.style[e]=f)}b.selectNodeContents(d);b.collapseToEnd();b._window.focus();b._window.document.body.focus();b.select();if(c.browser.mozilla&&c.browser.nVersion==3)d.innerHTML=
|
||||
""}else{this.oApp.exec("RECORD_UNDO_BEFORE_ACTION",["FONT STYLE"]);b.styleRange(a);b._window.focus();b.select();this.oApp.exec("RECORD_UNDO_AFTER_ACTION",["FONT STYLE"])}}});xe.XE_WYSIWYGStyleGetter=c.Class({name:"XE_WYSIWYGStyleGetter",hKeyUp:null,getStyleInterval:200,oStyleMap:{fontFamily:{type:"Value",css:"fontFamily"},fontSize:{type:"Value",css:"fontSize"},lineHeight:{type:"Value",css:"lineHeight",converter:function(a,b){return!a.match(/px$/)?a:Math.ceil(parseInt(a)/parseInt(b.fontSize)*10)/10}},
|
||||
bold:{command:"bold"},underline:{command:"underline"},italic:{command:"italic"},lineThrough:{command:"strikethrough"},superscript:{command:"superscript"},subscript:{command:"subscript"},justifyleft:{command:"justifyleft"},justifycenter:{command:"justifycenter"},justifyright:{command:"justifyright"},justifyfull:{command:"justifyfull"},orderedlist:{command:"insertorderedlist"},unorderedlist:{command:"insertunorderedlist"}},$init:function(){this.oStyle=this._getBlankStyle()},$PRECONDITION:function(){return this.oApp.getEditingMode()!=
|
||||
"WYSIWYG"?false:true},$ON_MSG_APP_READY:function(){this.oDocument=this.oApp.getWYSIWYGDocument();this.oApp.exec("ADD_APP_PROPERTY",["getCurrentStyle",c.fnBind(this.getCurrentStyle,this)])},$ON_EVENT_EDITING_AREA_MOUSEUP:function(){this.hKeyUp&&clearTimeout(this.hKeyUp);this.oApp.exec("CHECK_STYLE_CHANGE",[])},$ON_EVENT_EDITING_AREA_KEYUP:function(a){if(a.keyCode==8||a.keyCode>=33&&a.keyCode<=40||a.keyCode==45||a.keyCode==46){this.hKeyUp&&clearTimeout(this.hKeyUp);this.hKeyUp=setTimeout(c.fnBind(this.oApp.exec,
|
||||
this.oApp,"CHECK_STYLE_CHANGE",[]),this.getStyleInterval)}},$ON_CHECK_STYLE_CHANGE:function(){this._getStyle()},$ON_RESET_STYLE_STATUS:function(){var a=this._getBlankStyle(),b;for(b in a)this.oApp.exec("SET_STYLE_STATUS",[b,a[b]])},getCurrentStyle:function(){return this.oStyle},_check_style_change:function(){this.oApp.exec("CHECK_STYLE_CHANGE",[])},_getBlankStyle:function(){var a={},b;for(b in this.oStyleMap)a[b]=this.oStyleMap[b].type=="Value"?"":0;return a},_getStyle:function(){var a=this.oApp.getSelection(),
|
||||
b=a.getNodes(false,function(a){return!a.childNodes||a.childNodes.length==0?true:false}),d,a=b.length==0?this._getStyleOf(a.commonAncestorContainer):this._getStyleOf(b[0]);for(d in a){this.oStyleMap[d].converter&&(a[d]=this.oStyleMap[d].converter(a[d],a));this.oStyle[d]!=a[d]&&this.oApp.exec("MSG_STYLE_CHANGED",[d,a[d]])}this.oStyle=a},_getStyleOf:function(a){var b=this._getBlankStyle();if(!a)return b;if(a.nodeType==3)a=a.parentNode;var a=c(a),d,f;for(f in this.oStyle){d=this.oStyleMap[f];if(d.type&&
|
||||
d.type=="Value")if(d.css){d=a.css(d.css);f=="fontFamily"&&(d=d.split(/,/)[0]);b[f]=d}else{if(d.command)try{b[f]=this.oDocument.queryCommandState(d.command)}catch(e){}}else if(d.command)try{b[f]=this.oDocument.queryCommandState(d.command)?1:0}catch(g){}}return b}});xe.XE_FontSizeWithSelectUI=c.Class({name:"XE_FontSizeWithSelectUI",$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elFontSizeSelect=c("SELECT.xpress_xeditor_ui_fontSize_select",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elFontSizeSelect,
|
||||
"change","SET_FONTSIZE_FROM_SELECT_UI");this.elFontSizeSelect.selectedIndex=0},$ON_MSG_STYLE_CHANGED:function(a,b){if(a=="fontSize"){this.elFontSizeSelect.value=b;if(this.elFontSizeSelect.selectedIndex<0)this.elFontSizeSelect.selectedIndex=0}},$ON_SET_FONTSIZE_FROM_SELECT_UI:function(){var a=this.elFontSizeSelect.value;if(a){this.oApp.exec("SET_WYSIWYG_STYLE",[{fontSize:a}]);this.oApp.exec("CHECK_STYLE_CHANGE",[])}}});xe.XE_FontNameWithSelectUI=c.Class({name:"XE_FontNameWithSelectUI",$init:function(a){this._assignHTMLObjects(a)},
|
||||
_assignHTMLObjects:function(a){this.elFontNameSelect=c("SELECT.xpress_xeditor_ui_fontName_select",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elFontNameSelect,"change","SET_FONTNAME_FROM_SELECT_UI");this.elFontNameSelect.selectedIndex=0},$ON_MSG_STYLE_CHANGED:function(a,b){if(a=="fontFamily"){this.elFontNameSelect.value=b.toLowerCase();if(this.elFontNameSelect.selectedIndex<0)this.elFontNameSelect.selectedIndex=0}},$ON_SET_FONTNAME_FROM_SELECT_UI:function(){var a=this.elFontNameSelect.value;
|
||||
if(a){this.oApp.exec("SET_WYSIWYG_STYLE",[{fontFamily:a}]);this.oApp.exec("CHECK_STYLE_CHANGE",[])}}});xe.XE_LineHeight=c.Class({name:"XE_LineHeight",$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(){},$ON_SET_LINEHEIGHT:function(a){this.setLineHeight(a)},getLineHeight:function(){var a=this._getSelectedNodes(false),b,d,f;if(a.length==0)return-1;var e=a.length;if(e==0)f=-1;else{d=this._getLineWrapper(a[0]);f=this._getWrapperLineheight(d)}var g=this.oSelection.getStartNode();
|
||||
if(f>0)for(var h=1;h<e;h++)if(!this._isChildOf(a[h],b)&&a[h]){b=this._getLineWrapper(a[h]);if(b!=d){curHeight=this._getWrapperLineheight(b);if(curHeight!=f){f=-1;break}d=b}}b=this._getLineWrapper(a[e-1]);a=this.oSelection.getEndNode();selectText=c.fnBind(function(a,b){this.oSelection.setEndNodes(a,b);this.oSelection.select()},this,g,a);setTimeout(selectText,100);return f},setLineHeight:function(a){function b(a,b){if(!a)try{a=thisRef.oSelection.surroundContentsWithNewNode("P")}catch(d){a=thisRef.oSelection.surroundContentsWithNewNode("DIV")}a.style.lineHeight=
|
||||
b;return a}function d(a){for(;a&&a.tagName!="BODY";)a=xe.DOMFix.parentNode(a);return!a?false:true}thisRef=this;var f=this._getSelectedNodes(false);if(f.length!=0){var e,g,h=f.length;this.oApp.exec("RECORD_UNDO_BEFORE_ACTION",["LINEHEIGHT"]);g=this._getLineWrapper(f[0]);for(var k=g=b(g,a),j=1;j<h;j++){try{if(!d(xe.DOMFix.parentNode(f[j])))continue}catch(n){continue}if(!this._isChildOf(f[j],e)){e=this._getLineWrapper(f[j]);if(e!=g)g=e=b(e,a)}}setTimeout(c.fnBind(function(a,b){this.oSelection.setEndNodes(a,
|
||||
b);this.oSelection.select();this.oApp.exec("RECORD_UNDO_AFTER_ACTION",["LINEHEIGHT"])},this,k,e||k),100)}},_getSelectedNodes:function(a){if(!a)this.oSelection=this.oApp.getSelection();this.oSelection.collapsed&&this.oSelection.selectNode(this.oSelection.commonAncestorContainer);a=this.oSelection.getTextNodes();if(a.length==0){var b=this.oSelection.getStartNode();b?a[0]=b:a=[]}return a},_getWrapperLineheight:function(a){var b="";if(a&&a.style.lineHeight)b=a.style.lineHeight;else for(a=this.oSelection.commonAncesterContainer;a&&
|
||||
!this.oSelection.rxLineBreaker.test(a.tagName);){if(a&&a.style.lineHeight){b=a.style.lineHeight;break}a=xe.DOMFix.parentNode(a)}return b},_isChildOf:function(a,b){for(;a&&a.tagName!="BODY";){if(a==b)return true;a=xe.DOMFix.parentNode(a)}return false},_getLineWrapper:function(a){var b=this.oApp.getEmptySelection();b.selectNode(a);var a=b.getLineInfo(),d=a.oStart,c=a.oEnd,e,b=null,a=d.oNode;e=d.oLineBreaker;d=c.oNode;c=c.oLineBreaker;this.oSelection.setEndNodes(a,d);e==c&&(e.tagName=="P"||e.tagName==
|
||||
"DIV"?b=e:this.oSelection.setEndNodes(e.firstChild,e.lastChild));return b}});xe.XE_LineHeightWithSelectUI=c.Class({name:"XE_LineHeightWithSelectUI",_assignHTMLObjects:function(a){this.elLineHeightSelect=c("SELECT.xpress_xeditor_ui_lineHeight_select",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elLineHeightSelect,"change","SET_LINEHEIGHT_FROM_SELECT_UI");this.elLineHeightSelect.selectedIndex=0},$ON_MSG_STYLE_CHANGED:function(a,b){if(a=="lineHeight"){this.elLineHeightSelect.value=
|
||||
b;if(this.elLineHeightSelect.selectedIndex<0)this.elLineHeightSelect.selectedIndex=0}},$ON_SET_LINEHEIGHT_FROM_SELECT_UI:function(){var a=this.elLineHeightSelect.value;if(a){this.elLineHeightSelect.selectedIndex=0;this.oApp.exec("SET_LINEHEIGHT",[a]);this.oApp.exec("CHECK_STYLE_CHANGE",[])}}}).extend(xe.XE_LineHeight);xe.XE_ColorPalette=c.Class({name:"XE_ColorPalette",rxRGBColorPattern:/rgb\((\d+), ?(\d+), ?(\d+)\)/i,$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elColorPaletteLayer=
|
||||
c("UL.xpress_xeditor_color_palette",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elColorPaletteLayer,"click","EVENT_MOUSEUP_COLOR_PALETTE")},$ON_SHOW_COLOR_PALETTE:function(a,b){this.sCallbackCmd=a;this.oLayerContainer=b;this.oLayerContainer.insertBefore(this.elColorPaletteLayer,null);this.elColorPaletteLayer.style.display="block"},$ON_HIDE_COLOR_PALETTE:function(){this.elColorPaletteLayer.style.display="none"},$ON_COLOR_PALETTE_APPLY_COLOR:function(a){if(this.rxRGBColorPattern.test(a))var b=
|
||||
function(a){a=parseInt(a).toString(16);a.length<2&&(a="0"+a);return a.toUpperCase()},a=b(RegExp.$1),d=b(RegExp.$2),b=b(RegExp.$3),a="#"+a+d+b;this.oApp.exec(this.sCallbackCmd,[a])},$ON_EVENT_MOUSEUP_COLOR_PALETTE:function(a){a=a.target;a.style.backgroundColor&&this.oApp.exec("COLOR_PALETTE_APPLY_COLOR",[a.style.backgroundColor])}});xe.XE_FontColor=c.Class({name:"XE_FontColor",rxColorPattern:/^#?[0-9a-fA-F]{6}$|^rgb\(\d+, ?\d+, ?\d+\)$/i,$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elDropdownLayer=
|
||||
c("DIV.xpress_xeditor_fontcolor_layer",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.exec("REGISTER_UI_EVENT",["fontColor","click","TOGGLE_FONTCOLOR_LAYER"])},$ON_TOGGLE_FONTCOLOR_LAYER:function(){this.oApp.exec("TOGGLE_TOOLBAR_ACTIVE_LAYER",[this.elDropdownLayer,null,"SHOW_COLOR_PALETTE",["APPLY_FONTCOLOR",this.elDropdownLayer]])},$ON_APPLY_FONTCOLOR:function(a){if(this.rxColorPattern.test(a)){this.oApp.exec("SET_WYSIWYG_STYLE",[{color:a}]);this.oApp.exec("HIDE_ACTIVE_LAYER")}else alert(this.oApp.$MSG("XE_FontColor.invalidColorCode"))}});
|
||||
this.oDebugger?this._execMsgStepWithDebugger:this._execMsgStepWithoutDebugger).call(this,a,b,d)},_execMsgStepWithDebugger:function(a,b,d){this.oDebugger.log_MessageStepStart(a,b,d);var f=this._execMsgHandler("$"+a+"_"+b,d);this.oDebugger.log_MessageStepEnd(a,b,d);return f},_execMsgStepWithoutDebugger:function(a,b,d){return this._execMsgHandler("$"+a+"_"+b,d)},_execMsgHandler:function(a,b){this.oCommandMap[a]||this.createCommandMap(a);var d=this.oCommandMap[a],f=d.length;if(0==f)return!0;var c,g=!0;
|
||||
if(a.match(/^\$(BEFORE|ON|AFTER)_MSG_APP_READY$/))for(var h=0;h<f;h++){if(c=this._execHandler(d[h],a,b),!1===c){g=!1;break}}else for(h=0;h<f;h++)if("function"!=typeof d[h].$PRECONDITION||this._execHandler(d[h],"$PRECONDITION",[a,b]))if(c=this._execHandler(d[h],a,b),!1===c){g=!1;break}return g},_execHandler:function(a,b,d){return(this._execHandler=this.oDebugger?this._execHandlerWithDebugger:this._execHandlerWithoutDebugger).call(this,a,b,d)},_execHandlerWithDebugger:function(a,b,d){this.oDebugger.log_CallHandlerStart(a,
|
||||
b,d);var f=a[b].apply(a,d);this.oDebugger.log_CallHandlerEnd(a,b,d);return f},_execHandlerWithoutDebugger:function(a,b,d){return a[b].apply(a,d)},_doAddToCommandMap:function(a,b){"function"==typeof b[a]&&(this.oCommandMap[a][this.oCommandMap[a].length]=b)},_waitForPluginReady:function(){for(var a=!0,b=0;b<this.aPlugins.length;b++)if(this.aPlugins[b].status==xe.PLUGIN_STATUS.NOT_READY){a=!1;break}a?this._changeAppStatus(xe.APP_STATUS.READY):setTimeout(c.fnBind(this._waitForPluginReady,this),100)}});
|
||||
xe.APP_STATUS={NOT_READY:0,WAITING_FOR_PLUGINS_READY:1,READY:2};xe.PLUGIN_STATUS={NOT_READY:0,READY:1};xe.W3CDOMRange=c.Class({$init:function(a){this._document=a||document;this.collapsed=!0;this.endContainer=this.commonAncestorContainer=this._document.body;this.endOffset=0;this.startContainer=this._document.body;this.startOffset=0},cloneContents:function(){var a=this._document.createDocumentFragment(),b=this._document.createDocumentFragment(),d=this._getNodesInRange();if(1>d.length)return a;d=this._constructClonedTree(d,
|
||||
b);if(b=b.firstChild)for(var b=b.firstChild,f;b;)f=b.nextSibling,a.appendChild(b),b=f;d=this._splitTextEndNodes({oStartContainer:d.oStartContainer,iStartOffset:this.startOffset,oEndContainer:d.oEndContainer,iEndOffset:this.endOffset});d.oStartContainer&&d.oStartContainer.previousSibling&&xe.DOMFix.parentNode(d.oStartContainer).removeChild(d.oStartContainer.previousSibling);d.oEndContainer&&d.oEndContainer.nextSibling&&xe.DOMFix.parentNode(d.oEndContainer).removeChild(d.oEndContainer.nextSibling);
|
||||
return a},_constructClonedTree:function(a,b){var d=null,f=null,c=this.startContainer,g=this.endContainer;_recurConstructClonedTree=function(a,b,j,l){if(0>b)return b;j=b-1;var m=a[b].cloneNode(!1);a[b]==c&&(d=m);for(a[b]==g&&(f=m);0<=j&&xe.DOMFix.parentNode(a[j])==a[b];)j=this._recurConstructClonedTree(a,j,a[b],m,d,f);l.insertBefore(m,l.firstChild);return j};a[a.length]=xe.DOMFix.parentNode(a[a.length-1]);_recurConstructClonedTree(a,a.length-1,a[a.length-1],b);return{oStartContainer:d,oEndContainer:f}},
|
||||
cloneRange:function(){return this._copyRange(new xe.W3CDOMRange(this._document))},_copyRange:function(a){a.collapsed=this.collapsed;a.commonAncestorContainer=this.commonAncestorContainer;a.endContainer=this.endContainer;a.endOffset=this.endOffset;a.startContainer=this.startContainer;a.startOffset=this.startOffset;a._document=this._document;return a},collapse:function(a){a?(this.endContainer=this.startContainer,this.endOffset=this.startOffset):(this.startContainer=this.endContainer,this.startOffset=
|
||||
this.endOffset);this._updateRangeInfo()},compareBoundaryPoints:function(a,b){switch(a){case xe.W3CDOMRange.START_TO_START:return this._compareEndPoint(this.startContainer,this.startOffset,b.startContainer,b.startOffset);case xe.W3CDOMRange.START_TO_END:return this._compareEndPoint(this.endContainer,this.endOffset,b.startContainer,b.startOffset);case xe.W3CDOMRange.END_TO_END:return this._compareEndPoint(this.endContainer,this.endOffset,b.endContainer,b.endOffset);case xe.W3CDOMRange.END_TO_START:return this._compareEndPoint(this.startContainer,
|
||||
this.startOffset,b.endContainer,b.endOffset)}},_findBody:function(a){if(!a)return null;for(;a;){if("BODY"==a.tagName)return a;a=xe.DOMFix.parentNode(a)}return null},_compareEndPoint:function(a,b,d,f){if(!a||this._findBody(a)!=this._document.body)a=this._document.body,b=0;if(!d||this._findBody(d)!=this._document.body)d=this._document.body,f=0;var c=this._getCommonAncestorContainer(a,d);if(a!=c){for(;(oTmpNode=xe.DOMFix.parentNode(a))!=c;)a=oTmpNode;b=this._getPosIdx(a)+0.5}if(d!=c){for(;(oTmpNode=
|
||||
xe.DOMFix.parentNode(d))!=c;)d=oTmpNode;f=this._getPosIdx(d)+0.5}-1==f&&(f=b+1);return b<f?-1:b==f?0:1},_getCommonAncestorContainer:function(a,b){for(var d=b;a;){for(;d;){if(a==d)return a;d=xe.DOMFix.parentNode(d)}d=b;a=xe.DOMFix.parentNode(a)}return this._document.body},deleteContents:function(){if(!this.collapsed){this._splitTextEndNodesOfTheRange();var a=this._getNodesInRange();if(!(1>a.length)){for(var b=a[0].previousSibling;b&&this._isBlankTextNode(b);)b=b.previousSibling;var d,f;b||(d=xe.DOMFix.parentNode(a[0]),
|
||||
f=0);for(var c=0;c<a.length;c++){var g=a[c];g.firstChild||(d==g&&(f=this._getPosIdx(d),d=xe.DOMFix.parentNode(g)),xe.DOMFix.parentNode(g).removeChild(g))}b?"BODY"==b.tagName?this.setStartBefore(b):this.setStartAfter(b):this.setStart(d,f);this.collapse(!0)}}},extractContents:function(){var a=this.cloneContents();this.deleteContents();return a},insertNode:function(a){var b=null,d;"3"==this.startContainer.nodeType?(d=xe.DOMFix.parentNode(this.startContainer),b=this.startContainer.nodeValue.length<=this.startOffset?
|
||||
this.startContainer.nextSibling:this.startContainer.splitText(this.startOffset)):(d=this.startContainer,b=xe.DOMFix.childNodes(this.startContainer)[this.startOffset]);if(!b||!xe.DOMFix.parentNode(b))b=null;d.insertBefore(a,b);this.setStartBefore(a)},selectNode:function(a){this.setStartBefore(a);this.setEndAfter(a)},selectNodeContents:function(a){this.setStart(a,0);this.setEnd(a,xe.DOMFix.childNodes(a).length)},_endsNodeValidation:function(a,b){if(!a||this._findBody(a)!=this._document.body)throw Error("INVALID_NODE_TYPE_ERR oNode is not part of current document");
|
||||
3==a.nodeType?b>a.nodeValue.length&&(b=a.nodeValue.length):b>xe.DOMFix.childNodes(a).length&&(b=xe.DOMFix.childNodes(a).length);return b},setEnd:function(a,b){b=this._endsNodeValidation(a,b);this.endContainer=a;this.endOffset=b;(!this.startContainer||-1!=this._compareEndPoint(this.startContainer,this.startOffset,this.endContainer,this.endOffset))&&this.collapse(!1);this._updateRangeInfo()},setEndAfter:function(a){if(!a)throw Error("INVALID_NODE_TYPE_ERR in setEndAfter");"BODY"==a.tagName?this.setEnd(a,
|
||||
xe.DOMFix.childNodes(a).length):this.setEnd(xe.DOMFix.parentNode(a),this._getPosIdx(a)+1)},setEndBefore:function(a){if(!a)throw Error("INVALID_NODE_TYPE_ERR in setEndBefore");"BODY"==a.tagName?this.setEnd(a,0):this.setEnd(xe.DOMFix.parentNode(a),this._getPosIdx(a))},setStart:function(a,b){b=this._endsNodeValidation(a,b);this.startContainer=a;this.startOffset=b;(!this.endContainer||-1!=this._compareEndPoint(this.startContainer,this.startOffset,this.endContainer,this.endOffset))&&this.collapse(!0);
|
||||
this._updateRangeInfo()},setStartAfter:function(a){if(!a)throw Error("INVALID_NODE_TYPE_ERR in setStartAfter");"BODY"==a.tagName?this.setStart(a,xe.DOMFix.childNodes(a).length):this.setStart(xe.DOMFix.parentNode(a),this._getPosIdx(a)+1)},setStartBefore:function(a){if(!a)throw Error("INVALID_NODE_TYPE_ERR in setStartBefore");"BODY"==a.tagName?this.setStart(a,0):this.setStart(xe.DOMFix.parentNode(a),this._getPosIdx(a))},surroundContents:function(a){a.appendChild(this.extractContents());this.insertNode(a);
|
||||
this.selectNode(a)},toString:function(){var a=this._document.createElement("DIV");a.appendChild(this.cloneContents());return a.textContent||a.innerText||""},_isBlankTextNode:function(a){return 3==a.nodeType&&""==a.nodeValue?!0:!1},_getPosIdx:function(a){var b=0;for(a=a.previousSibling;a;a=a.previousSibling)b++;return b},_updateRangeInfo:function(){this.startContainer?(this.collapsed=this._isCollapsed(this.startContainer,this.startOffset,this.endContainer,this.endOffset),this.commonAncestorContainer=
|
||||
this._getCommonAncestorContainer(this.startContainer,this.endContainer)):this.init(this._document)},_isCollapsed:function(a,b,d,f){var c=!1;if(a==d&&b==f)c=!0;else if(a=this._getActualStartNode(a,b),d=this._getActualEndNode(d,f),a=this._getNextNode(this._getPrevNode(a)),d=this._getPrevNode(this._getNextNode(d)),a&&d&&"BODY"!=d.tagName&&(this._getNextNode(d)==a||d==a&&this._isBlankTextNode(d)))c=!0;return c},_splitTextEndNodesOfTheRange:function(){var a=this._splitTextEndNodes({oStartContainer:this.startContainer,
|
||||
iStartOffset:this.startOffset,oEndContainer:this.endContainer,iEndOffset:this.endOffset});this.startContainer=a.oStartContainer;this.startOffset=a.iStartOffset;this.endContainer=a.oEndContainer;this.endOffset=a.iEndOffset},_splitTextEndNodes:function(a){a=this._splitStartTextNode(a);return a=this._splitEndTextNode(a)},_splitStartTextNode:function(a){var b=a.oStartContainer,d=a.iStartOffset,f=a.oEndContainer,c=a.iEndOffset;if(!b||3!=b.nodeType||0==d||b.nodeValue.length<=d)return a;a=b.splitText(d);
|
||||
b==f&&(c-=d,f=a);return{oStartContainer:a,iStartOffset:0,oEndContainer:f,iEndOffset:c}},_splitEndTextNode:function(a){var b=a.oStartContainer,d=a.iStartOffset,f=a.oEndContainer,c=a.iEndOffset;if(!f||3!=f.nodeType||c>=f.nodeValue.length||0==c)return a;f.splitText(c);return{oStartContainer:b,iStartOffset:d,oEndContainer:f,iEndOffset:c}},_getNodesInRange:function(){if(this.collapsed)return[];var a=this._getActualStartNode(this.startContainer,this.startOffset),b=this._getActualEndNode(this.endContainer,
|
||||
this.endOffset);return this._getNodesBetween(a,b)},_getActualStartNode:function(a,b){var d=a;3==a.nodeType?b>=a.nodeValue.length?(d=this._getNextNode(a),"BODY"==d.tagName&&(d=null)):d=a:b<xe.DOMFix.childNodes(a).length?d=xe.DOMFix.childNodes(a)[b]:(d=this._getNextNode(a),"BODY"==d.tagName&&(d=null));return d},_getActualEndNode:function(a,b){var d=a;0==b?(d=this._getPrevNode(a),"BODY"==d.tagName&&(d=null)):d=3==a.nodeType?a:xe.DOMFix.childNodes(a)[b-1];return d},_getNextNode:function(a){return!a||
|
||||
"BODY"==a.tagName?this._document.body:a.nextSibling?a.nextSibling:this._getNextNode(xe.DOMFix.parentNode(a))},_getPrevNode:function(a){return!a||"BODY"==a.tagName?this._document.body:a.previousSibling?a.previousSibling:this._getPrevNode(xe.DOMFix.parentNode(a))},_getNodesBetween:function(a,b){var d=[];this._nNodesBetweenLen=0;if(!a||!b)return d;this._recurGetNextNodesUntil(a,b,d);return d},_recurGetNextNodesUntil:function(a,b,d){if(!a||!this._recurGetChildNodesUntil(a,b,d))return!1;for(var f=a.nextSibling;!f;){if(!(a=
|
||||
xe.DOMFix.parentNode(a)))return!1;d[this._nNodesBetweenLen++]=a;if(a==b)return!1;f=a.nextSibling}return this._recurGetNextNodesUntil(f,b,d)},_recurGetChildNodesUntil:function(a,b,d){if(!a)return!1;var f=!1,c=a;if(c.firstChild)for(c=c.firstChild;c;){if(!this._recurGetChildNodesUntil(c,b,d)){f=!0;break}c=c.nextSibling}d[this._nNodesBetweenLen++]=a;return f||a==b?!1:!0}});xe.W3CDOMRange.START_TO_START=0;xe.W3CDOMRange.START_TO_END=1;xe.W3CDOMRange.END_TO_END=2;xe.W3CDOMRange.END_TO_START=3;xe.XpressRange=
|
||||
c.Class({setWindow:function(a){this._window=a;this._document=a.document},$init:function(a){this.HUSKY_BOOMARK_START_ID_PREFIX="xpress_bookmark_start_";this.HUSKY_BOOMARK_END_ID_PREFIX="xpress_bookmark_end_";this.sBlockElement="P|DIV|LI|H[1-6]|PRE";this.sBlockContainer="BODY|TABLE|TH|TR|TD|UL|OL|BLOCKQUOTE|FORM";this.rxBlockElement=RegExp("^("+this.sBlockElement+")$");this.rxBlockContainer=RegExp("^("+this.sBlockContainer+")$");this.rxLineBreaker=RegExp("^("+this.sBlockElement+"|"+this.sBlockContainer+
|
||||
")$");this.setWindow(a);this.oSimpleSelection=new xe.SimpleSelection(this._window);this.selectionLoaded=this.oSimpleSelection.selectionLoaded;this.$super.$init(this._document)},select:function(){this.oSimpleSelection.selectRange(this)},setFromSelection:function(a){this.setRange(this.oSimpleSelection.getRangeAt(a))},setRange:function(a){this.setStart(a.startContainer,a.startOffset);this.setEnd(a.endContainer,a.endOffset)},setEndNodes:function(a,b){this.setEndAfter(b);this.setStartBefore(a)},splitTextAtBothEnds:function(){this._splitTextEndNodesOfTheRange()},
|
||||
getStartNode:function(){return this.collapsed?3==this.startContainer.nodeType?0==this.startOffset||this.startContainer.nodeValue.length<=this.startOffset?null:this.startContainer:null:3==this.startContainer.nodeType?this.startOffset>=this.startContainer.nodeValue.length?this._getNextNode(this.startContainer):this.startContainer:this.startOffset>=xe.DOMFix.childNodes(this.startContainer).length?this._getNextNode(this.startContainer):xe.DOMFix.childNodes(this.startContainer)[this.startOffset]},getEndNode:function(){return this.collapsed?
|
||||
this.getStartNode():3==this.endContainer.nodeType?0==this.endOffset?this._getPrevNode(this.endContainer):this.endContainer:0==this.endOffset?this._getPrevNode(this.endContainer):xe.DOMFix.childNodes(this.endContainer)[this.endOffset-1]},getNodeAroundRange:function(a,b){if(this.collapsed&&this.startContainer&&3==this.startContainer.nodeType)return this.startContainer;if(!this.collapsed||this.startContainer&&3==this.startContainer.nodeType)return this.getStartNode();var d,f,c;f=this.startOffset>=xe.DOMFix.childNodes(this.startContainer).length?
|
||||
this._getNextNode(this.startContainer):xe.DOMFix.childNodes(this.startContainer)[this.startOffset];d=0==this.endOffset?this._getPrevNode(this.endContainer):xe.DOMFix.childNodes(this.endContainer)[this.endOffset-1];a?(c=d,!c&&!b&&(c=f)):(c=f,!c&&!b&&(c=d));return c},_getXPath:function(a){for(var b="";a&&1==a.nodeType;)b="/"+a.tagName+"["+this._getPosIdx4XPath(a)+"]"+b,a=xe.DOMFix.parentNode(a);return b},_getPosIdx4XPath:function(a){for(var b=0,d=a.previousSibling;d;d=d.previousSibling)d.tagName==a.tagName&&
|
||||
b++;return b},_evaluateXPath:function(a,b){a=a.substring(1,a.length-1);for(var d=a.split(/\//),c=b.body,e=2;e<d.length&&c;e++){d[e].match(/([^\[]+)\[(\d+)/i);for(var g=RegExp.$1,h=RegExp.$2,c=xe.DOMFix.childNodes(c),k=[],j=c.length,l=0,m=0;m<j;m++)c[m].tagName==g&&(k[l++]=c[m]);c=k.length<h?null:k[h]}return c},_evaluateXPathBookmark:function(a){var b=a.nTextNodeIdx,d=a.nOffset;a=this._evaluateXPath(a.sXPath,this._document);if(-1<b&&a){for(var c=xe.DOMFix.childNodes(a),e=null;(e=c[b])&&3==e.nodeType&&
|
||||
e.nodeValue.length<d;)d-=e.nodeValue.length,b++;a=xe.DOMFix.childNodes(a)[b]}a||(a=this._document.body,d=0);return{elContainer:a,nOffset:d}},getXPathBookmark:function(){var a=-1,b={elContainer:this.startContainer,nOffset:this.startOffset},d=this.startContainer;3==d.nodeType&&(b=this._getFixedStartTextNode(),a=this._getPosIdx(b.elContainer),d=xe.DOMFix.parentNode(d));var a={sXPath:this._getXPath(d),nTextNodeIdx:a,nOffset:b.nOffset},b=-1,d={elContainer:this.endContainer,nOffset:this.endOffset},c=this.endContainer;
|
||||
3==c.nodeType&&(d=this._getFixedEndTextNode(),b=this._getPosIdx(d.elContainer),c=xe.DOMFix.parentNode(c));b={sXPath:this._getXPath(c),nTextNodeIdx:b,nOffset:d.nOffset};return[a,b]},moveToXPathBookmark:function(a){if(a){var b=this._evaluateXPathBookmark(a[0]);a=this._evaluateXPathBookmark(a[1]);b.elContainer&&a.elContainer&&(this.startContainer=b.elContainer,this.startOffset=b.nOffset,this.endContainer=a.elContainer,this.endOffset=a.nOffset)}},_getFixedTextContainer:function(a,b){for(;a&&3==a.nodeType&&
|
||||
a.previousSibling&&3==a.previousSibling.nodeType;)b+=a.previousSibling.nodeValue.length,a=a.previousSibling;return{elContainer:a,nOffset:b}},_getFixedStartTextNode:function(){return this._getFixedTextContainer(this.startContainer,this.startOffset)},_getFixedEndTextNode:function(){return this._getFixedTextContainer(this.endContainer,this.endOffset)},placeStringBookmark:function(){var a=(new Date).getTime(),b=this.cloneRange();b.collapseToEnd();var d=this._document.createElement("A");d.id=this.HUSKY_BOOMARK_END_ID_PREFIX+
|
||||
a;b.insertNode(d);b=this.cloneRange();b.collapseToStart();d=this._document.createElement("A");d.id=this.HUSKY_BOOMARK_START_ID_PREFIX+a;b.insertNode(d);this.moveToBookmark(a);return a},cloneRange:function(){return this._copyRange(new xe.XpressRange(this._window))},moveToBookmark:function(a){"object"!=typeof a?this.moveToStringBookmark(a):this.moveToXPathBookmark(a)},moveToStringBookmark:function(a){var b=this._document.getElementById(this.HUSKY_BOOMARK_START_ID_PREFIX+a);a=this._document.getElementById(this.HUSKY_BOOMARK_END_ID_PREFIX+
|
||||
a);b&&a&&(this.setEndBefore(a),this.setStartAfter(b))},removeStringBookmark:function(a){var b=this._document.getElementById(this.HUSKY_BOOMARK_START_ID_PREFIX+a);a=this._document.getElementById(this.HUSKY_BOOMARK_END_ID_PREFIX+a);b&&xe.DOMFix.parentNode(b).removeChild(b);a&&xe.DOMFix.parentNode(a).removeChild(a)},collapseToStart:function(){this.collapse(!0)},collapseToEnd:function(){this.collapse(!1)},createAndInsertNode:function(){tmpNode=this._document.createElement(tagName);this.insertNode(tmpNode);
|
||||
return tmpNode},getNodes:function(a,b){a&&this._splitTextEndNodesOfTheRange();var d=this._getNodesInRange(),c=[];if(!b)return d;for(var e=0;e<d.length;e++)b(d[e])&&(c[c.length]=d[e]);return c},getTextNodes:function(a){return this.getNodes(a,function(a){return 3==a.nodeType&&"\n"!=a.nodeValue&&""!=a.nodeValue?!0:!1})},surroundContentsWithNewNode:function(a){a=this._document.createElement(a);this.surroundContents(a);return a},isRangeinRange:function(a){var b=this.compareBoundaryPoints(this.START_TO_START,
|
||||
a),d=this.compareBoundaryPoints(this.START_TO_END,a),c=this.compareBoundaryPoints(this.END_TO_START,a);a=this.compareBoundaryPoints(this.END_TO_END,a);return 0>=b&&0<=a?!0:bIncludePartlyIncluded?1==d||-1==c?!1:!0:!1},isNodeInRange:function(a,b,d){var c=new xe.XpressRange(this._window);d&&a.firstChild?(c.setStartBefore(a.firstChild),c.setEndAfter(a.lastChild)):c.selectNode(a);return isRangeInRange(c,b)},pasteHTML:function(a){if(""==a)this.deleteContents();else{var b=this._document.createElement("DIV");
|
||||
b.innerHTML=a;a=b.firstChild;for(var d=b.lastChild,c=this.cloneRange(),e=c.placeStringBookmark();b.lastChild;)this.insertNode(b.lastChild);this.setEndNodes(a,d);c.moveToBookmark(e);c.deleteContents();c.removeStringBookmark(e)}},toString:function(){this.toString=xe.W3CDOMRange.prototype.toString;return this.toString()},toHTMLString:function(){var a=this._document.createElement("DIV");a.appendChild(this.cloneContents());return a.innerHTML},findAncestorByTagName:function(a){for(var b=this.commonAncestorContainer;b&&
|
||||
b.tagName!=a;)b=xe.DOMFix.parentNode(b);return b},selectNodeContents:function(a){if(a){var b=a.firstChild?a.firstChild:a;a=a.lastChild?a.lastChild:a;3==b.nodeType?this.setStart(b,0):this.setStartBefore(b);3==a.nodeType?this.setEnd(a,a.nodeValue.length):this.setEndAfter(a)}},styleRange:function(a,b,d){d=this._getStyleParentNodes(d);if(!(1>d.length)){for(var f,e,g=0;g<d.length;g++){for(var h in a)f=h,e=a[f],"string"==typeof e&&(d[g].style[f]=e);if(b)for(h in b)f=h,e=b[f],"string"==typeof e&&("class"==
|
||||
f?c(d[g]).addClass(e):d[g].setAttribute(f,e))}this.setStartBefore(d[0]);this.setEndAfter(d[d.length-1])}},_getStyleParentNodes:function(a){this._splitTextEndNodesOfTheRange();var b=this.getStartNode(),d=this.getEndNode(),f=this._getNodesInRange(),e=[],g=0,h,k,j,l,m,r=f.length;c(f).filter(function(){return!!this.childNodes.length});for(var n=0;n<r;n++)if((h=f[n])&&!(3!=h.nodeType||""==h.nodeValue)){m=xe.DOMFix.parentNode(h);if("SPAN"==m.tagName){var p=c(m).html();k=this._getVeryFirstRealChild(m);j=
|
||||
k==h?1:p.indexOf(k);-1!=j&&(k=this._getVeryLastRealChild(m),l=k==h?1:p.indexOf(k));if(-1!=j&&-1!=l){e[g++]=m;continue}}k=this._document.createElement("SPAN");m.insertBefore(k,h);k.appendChild(h);e[g++]=k;a&&k.setAttribute(a,"true")}this.setStartBefore(b);this.setEndAfter(d);return e},_getVeryFirstChild:function(a){return a.firstChild?this._getVeryFirstChild(a.firstChild):a},_getVeryLastChild:function(a){return a.lastChild?this._getVeryLastChild(a.lastChild):a},_getFirstRealChild:function(a){for(a=
|
||||
a.firstChild;a&&3==a.nodeType&&""==a.nodeValue;)a=a.nextSibling;return a},_getLastRealChild:function(a){for(a=a.lastChild;a&&3==a.nodeType&&""==a.nodeValue;)a=a.previousSibling;return a},_getVeryFirstRealChild:function(a){var b=this._getFirstRealChild(a);return b?this._getVeryFirstRealChild(b):a},_getVeryLastRealChild:function(a){var b=this._getLastRealChild(a);return b?this._getVeryLastChild(b):a},_getLineStartInfo:function(a){function b(a){a&&!c&&(k.test(a.tagName)?(g=a,c=e,h=!0):(e=a,d(a.previousSibling),
|
||||
c||b(xe.DOMFix.parentNode(a))))}function d(a){if(a&&!c)if(k.test(a.tagName))g=a,c=e,h=!1;else{if(a.firstChild&&"TABLE"!=a.tagName)for(var b=a.lastChild;b&&!c;)d(b),b=b.previousSibling;else e=a;c||d(a.previousSibling)}}var c=null,e=a,g=a,h=!0,k=this.rxLineBreaker;b(a);return{oNode:c,oLineBreaker:g,bParentBreak:h}},_getLineEndInfo:function(a){function b(a){a&&!c&&(k.test(a.tagName)?(g=a,c=e,h=!0):(e=a,d(a.nextSibling),c||b(xe.DOMFix.parentNode(a))))}function d(a){if(a&&!c)if(k.test(a.tagName))g=a,c=
|
||||
e,h=!1;else{if(a.firstChild&&"TABLE"!=a.tagName)for(var b=a.firstChild;b&&!c;)d(b),b=b.nextSibling;else e=a;c||d(a.nextSibling)}}var c=null,e=a,g=a,h=!0,k=this.rxLineBreaker;b(a);return{oNode:c,oLineBreaker:g,bParentBreak:h}},getLineInfo:function(){var a=this.getStartNode(),b=this.getEndNode();a||(a=this.getNodeAroundRange(!0,!0));b||(b=this.getNodeAroundRange(!0,!0));var a=this._getLineStartInfo(a),d=a.oNode,b=this._getLineEndInfo(b),c=b.oNode,d=this._compareEndPoint(xe.DOMFix.parentNode(d),this._getPosIdx(d),
|
||||
this.endContainer,this.endOffset),c=this._compareEndPoint(xe.DOMFix.parentNode(c),this._getPosIdx(c)+1,this.startContainer,this.startOffset);0>=d&&0<=c||(a=this.getNodeAroundRange(!1,!0),b=this.getNodeAroundRange(!1,!0),a=this._getLineStartInfo(a),b=this._getLineEndInfo(b));return{oStart:a,oEnd:b}}}).extend(xe.W3CDOMRange);xe.SimpleSelection=function(a){this.init=function(a){this._window=a||window;this._document=this._window.document};this.init(a);c.browser.msie?xe.SimpleSelectionImpl_IE.apply(this):
|
||||
xe.SimpleSelectionImpl_FF.apply(this);this.selectRange=function(a){this.selectNone();this.addRange(a)};this.selectionLoaded=!0;this._oSelection||(this.selectionLoaded=!1)};xe.SimpleSelectionImpl_FF=function(){this._oSelection=this._window.getSelection();this.getRangeAt=function(a){try{var b=this._oSelection.getRangeAt(a||0)}catch(d){return new xe.W3CDOMRange(this._document)}return this._FFRange2W3CRange(b)};this.addRange=function(a){a=this._W3CRange2FFRange(a);this._oSelection.addRange(a)};this.selectNone=
|
||||
function(){this._oSelection.removeAllRanges()};this._FFRange2W3CRange=function(a){var b=new xe.W3CDOMRange(this._document);b.setStart(a.startContainer,a.startOffset);b.setEnd(a.endContainer,a.endOffset);return b};this._W3CRange2FFRange=function(a){var b=this._document.createRange();b.setStart(a.startContainer,a.startOffset);b.setEnd(a.endContainer,a.endOffset);return b}};xe.SimpleSelectionImpl_IE=function(){this._oSelection=this._document.selection;this.getRangeAt=function(a){a=a||0;if("Control"==
|
||||
this._oSelection.type){var b=new xe.W3CDOMRange(this._document),d=this._oSelection.createRange().item(a);if(!d||d.ownerDocument!=this._document)return b;b.selectNode(d);return b}d=this._oSelection.createRangeCollection().item(a).parentElement();return!d||d.ownerDocument!=this._document?b=new xe.W3CDOMRange(this._document):this._IERange2W3CRange(this._oSelection.createRangeCollection().item(a))};this.addRange=function(a){this._W3CRange2IERange(a).select()};this.selectNone=function(){this._oSelection.empty()};
|
||||
this._W3CRange2IERange=function(a){var b=this._getIERangeAt(a.startContainer,a.startOffset);a=this._getIERangeAt(a.endContainer,a.endOffset);b.setEndPoint("EndToEnd",a);return b};this._getIERangeAt=function(a,b){var d=this._document.body.createTextRange(),c=this._getSelectableNodeAndOffsetForIE(a,b),e=c.iOffsetForIE;d.moveToElementText(c.oSelectableNodeForIE);d.collapse(c.bCollapseToStart);d.moveStart("character",e);return d};this._getSelectableNodeAndOffsetForIE=function(a,b){var d=this._document.body.createTextRange(),
|
||||
c=null,e=null,g=0;3==a.nodeType?(c=xe.DOMFix.parentNode(a),e=xe.DOMFix.childNodes(c),g=e.length):(c=a,e=xe.DOMFix.childNodes(c),g=b);for(var h=null,k=0,j=!0,l=0;l<g;l++)if(h=e[l],3==h.nodeType){if(h==a)break;k+=h.nodeValue.length}else d.moveToElementText(h),c=h,k=0,j=!1;3==a.nodeType&&(k+=b);return{oSelectableNodeForIE:c,iOffsetForIE:k,bCollapseToStart:j}};this._IERange2W3CRange=function(a){var b=new xe.W3CDOMRange(this._document),d=null,d=null,d=a.duplicate();d.collapse(!0);d=this._getW3CContainerAndOffset(d,
|
||||
!0);b.setStart(d.oContainer,d.iOffset);d=a.duplicate();d.collapse(!0);d.isEqual(a)?b.collapse(!0):(d=a.duplicate(),d.collapse(!1),d=this._getW3CContainerAndOffset(d),b.setEnd(d.oContainer,d.iOffset));return b};this._getW3CContainerAndOffset=function(a,b){for(var d=a.parentElement(),c=-1,e=this._document.body.createTextRange(),g=xe.DOMFix.childNodes(d),c=null,h=0,h=0;h<g.length;h++)if(3!=g[h].nodeType){e.moveToElementText(g[h]);if(0<=e.compareEndPoints("StartToStart",a))break;c=g[h]}if(0!=h&&3==g[h-
|
||||
1].nodeType){g=this._document.body.createTextRange();e=null;c?(g.moveToElementText(c),g.collapse(!1),e=c.nextSibling):(g.moveToElementText(d),g.collapse(!0),e=d.firstChild);d=a.duplicate();d.setEndPoint("StartToStart",g);for(c=d.text.length;c>e.nodeValue.length&&e.nextSibling;)c-=e.nodeValue.length,e=e.nextSibling;b&&(e.nextSibling&&3==e.nextSibling.nodeType&&c==e.nodeValue.length)&&(c-=e.nodeValue.length,e=e.nextSibling);d=e}else d=a.parentElement(),c=h;return{oContainer:d,iOffset:c}}};xe.DOMFix=
|
||||
new (c.Class({$init:function(){c.browser.msie||c.browser.opera?(this.childNodes=this._childNodes_Fix,this.parentNode=this._parentNode_Fix):(this.childNodes=this._childNodes_Native,this.parentNode=this._parentNode_Native)},_parentNode_Native:function(a){return a.parentNode},_parentNode_Fix:function(a){if(!a)return a;for(;a.previousSibling;)a=a.previousSibling;return a.parentNode},_childNodes_Native:function(a){return a.childNodes},_childNodes_Fix:function(a){var b=null,d=0;if(a){b=[];for(a=a.firstChild;a;)b[d++]=
|
||||
a,a=a.nextSibling}return b}}));xe.DraggableLayer=c.Class({$init:function(a,b){this.oOptions=c.extend({bModal:"false",oHandle:a,iMinX:-999999,iMinY:-999999,iMaxX:999999,iMaxY:999999},b);this.oHandle=this.oOptions.oHandle;a.style.display="block";a.style.position="absolute";a.style.zIndex="9999";this.aBasePosition=this.getBaseOffset(a);a.style.top=this.toInt(c(a).offset().top)-this.aBasePosition.top+"px";a.style.left=this.toInt(c(a).offset().left)-this.aBasePosition.left+"px";this.$FnMouseDown=c.fnBind(this._mousedown,
|
||||
this,a);this.$FnMouseMove=c.fnBind(this._mousemove,this,a);this.$FnMouseUp=c.fnBind(this._mouseup,this,a);c(this.oHandle).bind("mousedown",this.$FnMouseDown)},_mousedown:function(a,b){"INPUT"!=b.target.tagName&&(this.MouseOffsetY=b.pageY-this.toInt(a.style.top)-this.aBasePosition.top,this.MouseOffsetX=b.pageX-this.toInt(a.style.left)-this.aBasePosition.left,c(a).bind("mousemove",this.$FnMouseMove),c(a).bind("mouseup",this.$FnMouseUp))},_mousemove:function(a,b){var d=b.pageY-this.MouseOffsetY-this.aBasePosition.top,
|
||||
c=b.pageX-this.MouseOffsetX-this.aBasePosition.left;d<this.oOptions.iMinY&&(d=this.oOptions.iMinY);d>this.oOptions.iMaxY&&(d=this.oOptions.iMaxY);c<this.oOptions.iMinX&&(c=this.oOptions.iMinX);c>this.oOptions.iMaxX&&(c=this.oOptions.iMaxX);a.style.top=d+"px";a.style.left=c+"px"},_mouseup:function(a){c(a).unbind("mousemove",this.$FnMouseMove);c(a).unbind("mouseup",this.$FnMouseUp)},toInt:function(a){return parseInt(a)||0},findNonStatic:function(a){return!a?null:"BODY"==a.tagName||c(a).css("position").match(/absolute|relative/i)?
|
||||
a:this.findNonStatic(a.offsetParent)},getBaseOffset:function(a){a=this.findNonStatic(a.offsetParent);a=c(a).offset();return{top:a.top,left:a.left}}});xe.CorePlugin=c.Class({name:"CorePlugin",$init:function(a){this.funcOnReady=a},$AFTER_MSG_APP_READY:function(){this.oApp.exec("EXEC_ON_READY_FUNCTION",[])},$ON_ADD_APP_PROPERTY:function(a,b){this.oApp[a]=b},$ON_REGISTER_BROWSER_EVENT:function(a,b,d,c,e){this.oApp.registerBrowserEvent(a,b,d,c,e)},$ON_DISABLE_COMMAND:function(a){this.oApp.disableCommand(a,
|
||||
!0)},$ON_ENABLE_COMMAND:function(a){this.oApp.disableCommand(a,!1)},$ON_EXEC_ON_READY_FUNCTION:function(){"function"==typeof this.funcOnReady&&this.funcOnReady()}});xe.Utils=c.Class({name:"Utils",$init:function(){if(c.browser.msie&&6==c.browser.nVersion)try{document.execCommand("BackgroundImageCache",!1,!0)}catch(a){}},$ON_ATTACH_HOVER_EVENTS:function(a,b){b=b||"hover";a&&c(a).hover(function(){c(this).addClass(b)},function(){c(this).removeClass(b)})}});xe.XpressRangeManager=c.Class({name:"XpressRangeManager",
|
||||
oWindow:null,$init:function(a){this.oWindow=a||window},$BEFORE_MSG_APP_READY:function(){this.oWindow&&"IFRAME"==this.oWindow.tagName&&(this.oWindow=this.oWindow.contentWindow);this.oApp.exec("ADD_APP_PROPERTY",["getSelection",c.fnBind(this.getSelection,this)]);this.oApp.exec("ADD_APP_PROPERTY",["getEmptySelection",c.fnBind(this.getEmptySelection,this)])},$ON_SET_EDITING_WINDOW:function(a){this.oWindow=a},getEmptySelection:function(){return new xe.XpressRange(this.oWindow)},getSelection:function(){this.oApp.exec("RESTORE_IE_SELECTION",
|
||||
[]);var a=this.getEmptySelection();try{a.setFromSelection()}catch(b){}return a}});xe.Hotkey=c.Class({name:"Hotkey",storage:{},keyhash:{},$init:function(){this.storage={};this.keyhash={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,meta:224,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,left:37,up:38,right:39,down:40,del:46,comma:188,period:190,slash:191,hyphen:109,equal:61};if(c.browser.msie||c.browser.safari)this.keyhash.hyphen=189,this.keyhash.equal=187,this.keyhash.meta=91},$ON_MSG_APP_READY:function(){c(this.oApp.getWYSIWYGDocument()||
|
||||
document).keydown(c.fnBind(this.keydown,this))},$ON_REGISTER_HOTKEY:function(a,b,d){d||(d=[]);b=c.fnBind(this.oApp.exec,this.oApp,b,d);a=this.normalize(a);if(!a)return!1;this.add(a,b)},add:function(a,b){"undefined"==typeof this.storage[a]?this.storage[a]=[b]:this.storage[a].push(b)},keydown:function(a){var b=[],d=this.keyhash;if(!(0<=c.inArray(a.keyCode,[d.shift,d.ctrl,d.alt,d.meta]))&&(a.shiftKey&&b.push("shift"),a.altKey&&b.push("alt"),a.ctrlKey&&b.push("ctrl"),a.metaKey&&b.push("meta"),b.length&&
|
||||
(1==b.length&&a.metaKey&&(b=["ctrl","meta"]),b.push(a.keyCode),b=b.join("+"),this.storage[b])))return c.each(this.storage[b],function(){this()}),!1},normalize:function(a){var b,d,f,e,g;a=(a||"").toLowerCase().split("+");b=d=f=e=g=!1;c.each(a,function(){var a=""+this;switch(a){case "shift":b=!0;case "alt":f=!0;case "ctrl":d=!0;case "meta":e=!0;default:g=a}});if(!g)return"";a=[];b&&a.push("shift");f&&a.push("alt");d&&a.push("ctrl");(e||d&&!b&&!f)&&a.push("meta");a.push(this.keyhash[g]||g.toUpperCase().charCodeAt(0));
|
||||
return a.join("+")}});xe.DialogLayerManager=c.Class({name:"DialogLayerManager",aMadeDraggable:null,aOpenedLayers:null,$init:function(){this.aMadeDraggable=[];this.aOpenedLayers=[]},$ON_SHOW_DIALOG_LAYER:function(a,b){a=c.$(a);b=c.$(b)||!1;a&&-1==c.inArray(a,this.aOpenedLayers)&&(this.oApp.exec("POSITION_DIALOG_LAYER",[a]),this.aOpenedLayers[this.aOpenedLayers.length]=a,-1==c.inArray(a,this.aMadeDraggable)?(new xe.DraggableLayer(a,{bModal:b,iMinY:0}),this.aMadeDraggable[this.aMadeDraggable.length]=
|
||||
a):a.style.display="block")},$ON_HIDE_LAST_DIALOG_LAYER:function(){this.oApp.exec("HIDE_DIALOG_LAYER",[this.aOpenedLayers[this.aOpenedLayers.length-1]])},$ON_HIDE_ALL_DIALOG_LAYER:function(){for(var a=this.aOpenedLayers.length-1;0<=a;a--)this.oApp.exec("HIDE_DIALOG_LAYER",[this.aOpenedLayers[a]])},$ON_HIDE_DIALOG_LAYER:function(a){if(a=c.$(a))a.style.display="none";this.aOpenedLayers=c.grep(this.aOpenedLayers,function(b){return b!=a})},$ON_SET_DIALOG_LAYER_POSITION:function(a,b,d){a.style.top=b;a.style.left=
|
||||
d}});xe.ActiveLayerManager=c.Class({name:"ActiveLayerManager",oCurrentLayer:null,$ON_TOGGLE_ACTIVE_LAYER:function(a,b,d,c,e){a==this.oCurrentLayer?this.oApp.exec("HIDE_ACTIVE_LAYER",[]):(this.oApp.exec("SHOW_ACTIVE_LAYER",[a,c,e]),b&&this.oApp.exec(b,d))},$ON_SHOW_ACTIVE_LAYER:function(a,b,d){a=c.$(a);this.sOnCloseCmd=b;this.aOnCloseParam=d;a!=this.oCurrentLayer&&(this.oApp.exec("HIDE_ACTIVE_LAYER",[]),a.style.display="block",this.oCurrentLayer=a)},$ON_HIDE_ACTIVE_LAYER:function(){var a=this.oCurrentLayer;
|
||||
a&&(a.style.display="none",this.oCurrentLayer=null,this.sOnCloseCmd&&this.oApp.exec(this.sOnCloseCmd,this.aOnCloseParam))},$ON_HIDE_CURRENT_ACTIVE_LAYER:function(){this.oApp.exec("HIDE_ACTIVE_LAYER",[])},$ON_EVENT_EDITING_AREA_KEYDOWN:function(){this.oApp.exec("HIDE_ACTIVE_LAYER",[])},$ON_EVENT_EDITING_AREA_MOUSEDOWN:function(){this.oApp.exec("HIDE_ACTIVE_LAYER",[])}});xe.StringConverterManager=c.Class({name:"StringConverterManager",oConverters:null,$init:function(){this.oConverters={}},$BEFORE_MSG_APP_READY:function(){this.oApp.exec("ADD_APP_PROPERTY",
|
||||
["applyConverter",c.fnBind(this.applyConverter,this)]);this.oApp.exec("ADD_APP_PROPERTY",["addConverter",c.fnBind(this.addConverter,this)])},applyConverter:function(a,b){var d=this.oConverters[a];if(!d)return b;for(var c=0;c<d.length;c++)b=d[c](b);return b},addConverter:function(a,b){this.oConverters[a]||(this.oConverters[a]=[]);this.oConverters[a][this.oConverters[a].length]=b}});xe.MessageManager=c.Class({name:"MessageManager",oMessageMap:null,$init:function(a){this.oMessageMap=a},$BEFORE_MSG_APP_READY:function(){this.oApp.exec("ADD_APP_PROPERTY",
|
||||
["$MSG",c.fnBind(this.getMessage,this)])},getMessage:function(a){return this.oMessageMap[a]?unescape(this.oMessageMap[a]):a}});xe.XE_Toolbar=c.Class({name:"XE_Toolbar",toolbarArea:null,toolbarButton:null,uiNameTag:"uiName",sUIClassPrefix:"xpress_xeditor_ui_",aUICmdMap:null,$init:function(a){this.htUIList={};this.aUICmdMap={};this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){a=c.$(a)||document;this.toolbarArea=c(".tool",a).get(0);this.welToolbarArea=c(this.toolbarArea);this.aAllButtons=c("BUTTON",
|
||||
this.toolbarArea).get();a=this.toolbarArea.getElementsByTagName("LI");for(var b=a.length,d=RegExp(this.sUIClassPrefix+"([^ ]+)"),f=0;f<b;f++)if(d.test(a[f].className)){var e=RegExp.$1;null==this.htUIList[e]&&(this.htUIList[e]=c(">*:first-child",a[f]).get(0))}},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.toolbarArea,"mouseover","EVENT_TOOLBAR_MOUSEOVER",[]);this.oApp.registerBrowserEvent(this.toolbarArea,"mouseout","EVENT_TOOLBAR_MOUSEOUT",[]);this.oApp.exec("ADD_APP_PROPERTY",
|
||||
["getToolbarButtonByUIName",c.fnBind(this.getToolbarButtonByUIName,this)])},$ON_EVENT_TOOLBAR_MOUSEOVER:function(a){"BUTTON"==a.target.tagName&&c(a.target).addClass("hover").parent("span").addClass("hover")},$ON_EVENT_TOOLBAR_MOUSEOUT:function(a){"BUTTON"==a.target.tagName&&c(a.target).removeClass("hover").parent("span").removeClass("hover")},$ON_TOGGLE_TOOLBAR_ACTIVE_LAYER:function(a,b,d,c,e,g){this.oApp.exec("TOGGLE_ACTIVE_LAYER",[a,"MSG_TOOLBAR_LAYER_SHOWN",[a,b,d,c],e,g])},$ON_MSG_TOOLBAR_LAYER_SHOWN:function(a,
|
||||
b,d,c){this.oApp.exec("POSITION_TOOLBAR_LAYER",[a,b]);d&&this.oApp.exec(d,c)},$ON_SHOW_TOOLBAR_ACTIVE_LAYER:function(a,b,d,c){this.oApp.exec("SHOW_ACTIVE_LAYER",[a,b,d]);this.oApp.exec("POSITION_TOOLBAR_LAYER",[a,c])},$ON_ENABLE_UI:function(a){var b=this.htUIList[a];if(b&&(c(b).removeClass("off"),b.disabled=!1,b="",this.aUICmdMap[a]))for(var d=0;d<this.aUICmdMap[a].length;d++)b=this.aUICmdMap[a][d],this.oApp.exec("ENABLE_COMMAND",[b])},$ON_DISABLE_UI:function(a){var b=this.htUIList[a];if(b&&(c(b).addClass("off"),
|
||||
c(b).removeClass("hover").parent("span").removeClass("hover"),b.disabled=!0,b="",this.aUICmdMap[a]))for(var d=0;d<this.aUICmdMap[a].length;d++)b=this.aUICmdMap[a][d],this.oApp.exec("DISABLE_COMMAND",[b])},$ON_SELECT_UI:function(a){(a=this.htUIList[a])&&c(a).addClass("active")},$ON_DESELECT_UI:function(a){(a=this.htUIList[a])&&c(a).removeClass("active")},$ON_ENABLE_ALL_UI:function(){for(var a in this.htUIList)a&&this.oApp.exec("ENABLE_UI",[a]);c(this.toolbarArea).removeClass("off")},$ON_DISABLE_ALL_UI:function(){for(var a in this.htUIList)a&&
|
||||
this.oApp.exec("DISABLE_UI",[a]);c(this.toolbarArea).addClass("off");this.oApp.exec("HIDE_ACTIVE_LAYER",[])},$ON_MSG_STYLE_CHANGED:function(a,b){1==b?this.oApp.exec("SELECT_UI",[a]):this.oApp.exec("DESELECT_UI",[a])},$ON_REGISTER_UI_EVENT:function(a,b,d,c){this.aUICmdMap[a]||(this.aUICmdMap[a]=[]);this.aUICmdMap[a][this.aUICmdMap[a].length]=d;(a=this.htUIList[a])&&this.oApp.registerBrowserEvent(a,b,d,c)},$ON_POSITION_TOOLBAR_LAYER:function(a,b){a=c.$(a);b=c.$(b);if(a){b&&(b.tagName&&"BUTTON"==b.tagName)&&
|
||||
b.parentNode.appendChild(a);a.style.left="0";var d=c(a).offset().left,d=d+a.offsetWidth,f=this.welToolbarArea.offset().left,f=f+this.toolbarArea.offsetWidth;d>f&&(a.style.left=f-d-5+"px")}},getToolbarButtonByUIName:function(a){return this.htUIList[a]}});xe.XE_EditingAreaManager=c.Class({name:"XE_EditingAreaManager",oActivePlugin:null,oIRField:null,bIsDirty:!1,$init:function(a,b,d,f,e){this.sInitialMode=a;this.oIRField=c.$(b);this._assignHTMLObjects(e);this.fOnBeforeUnload=f;this.oEditingMode={};this.elEditingAreaContainer.style.height=
|
||||
parseInt(d.nHeight||this.elEditingAreaContainer.offsetHeight)+"px";this.nMinHeight=d.nMinHeight||10;this.niMinWidth=d.nMinWidth||10},_assignHTMLObjects:function(a){a=c.$(a)||document;this.elEditingAreaContainer=c("DIV.xpress_xeditor_editing_area_container",a).get(0);this.elEditingAreaSkipUI=c("A.skip",a).get(0)},$BEFORE_MSG_APP_READY:function(){this.oApp.exec("ADD_APP_PROPERTY",["elEditingAreaContainer",this.elEditingAreaContainer]);this.oApp.exec("ADD_APP_PROPERTY",["getIR",c.fnBind(this.getIR,this)]);
|
||||
this.oApp.exec("ADD_APP_PROPERTY",["setIR",this.setIR]);this.oApp.exec("ADD_APP_PROPERTY",["getEditingMode",c.fnBind(this.getEditingMode,this)])},$ON_MSG_APP_READY:function(){this.oApp.exec("CHANGE_EDITING_MODE",[this.sInitialMode,!0]);this.oApp.exec("LOAD_IR_FIELD",[!1]);this.oApp.registerBrowserEvent(this.elEditingAreaSkipUI,"focus","MSG_EDITING_AREA_SIZE_CHANGED",[],50);this.oApp.registerBrowserEvent(this.elEditingAreaSkipUI,"blur","MSG_EDITING_AREA_SIZE_CHANGED",[],50)},$AFTER_MSG_APP_READY:function(){this.oApp.exec("UPDATE_IR_FIELD",
|
||||
[])},$ON_LOAD_IR_FIELD:function(a){this.oApp.setIR(this.oIRField.value,a)},$ON_UPDATE_IR_FIELD:function(){this.oIRField.value=this.oApp.getIR()},$BEFORE_CHANGE_EDITING_MODE:function(a){this._oPrevActivePlugin=this.oActivePlugin;this.oActivePlugin=this.oEditingMode[a]},$AFTER_CHANGE_EDITING_MODE:function(a,b){if(this._oPrevActivePlugin){var d=this._oPrevActivePlugin.getIR();this.oApp.exec("SET_IR",[d]);this.oApp.exec("ENABLE_UI",[this._oPrevActivePlugin.sMode]);this._setEditingAreaDimension()}this.oApp.exec("DISABLE_UI",
|
||||
[this.oActivePlugin.sMode]);b||this.oApp.exec("FOCUS",[])},$ON_SET_IS_DIRTY:function(a){this.bIsDirty=a},$ON_FOCUS:function(){this.oActivePlugin&&"function"==typeof this.oActivePlugin.setIR&&this.oActivePlugin.focus()},$BEFORE_SET_IR:function(a,b){b||this.oApp.exec("RECORD_UNDO_ACTION",["SET CONTENTS"])},$ON_SET_IR:function(a){this.oActivePlugin&&"function"==typeof this.oActivePlugin.setIR&&this.oActivePlugin.setIR(a)},$AFTER_SET_IR:function(a,b){b||this.oApp.exec("RECORD_UNDO_ACTION",["SET CONTENTS"])},
|
||||
$ON_REGISTER_EDITING_AREA:function(a){this.oEditingMode[a.sMode]=a;this.attachDocumentEvents(a.oEditingArea)},$ON_MSG_EDITING_AREA_RESIZE_STARTED:function(){this.oActivePlugin.elEditingArea.style.display="none";this.iStartingHeight=parseInt(this.elEditingAreaContainer.style.height)},$ON_RESIZE_EDITING_AREA:function(a,b){var d=parseInt(a),c=parseInt(b);d<this.niMinWidth&&(d=this.niMinWidth);c<this.nMinHeight&&(c=this.nMinHeight);a&&(this.elEditingAreaContainer.style.width=d+"px");b&&(this.elEditingAreaContainer.style.height=
|
||||
c+"px")},$ON_RESIZE_EDITING_AREA_BY:function(a,b){var d=parseInt(a),c=parseInt(b),d=this.elEditingAreaContainer.style.width?parseInt(this.elEditingAreaContainer.style.width)+d:null;this.oApp.exec("RESIZE_EDITING_AREA",[d,this.elEditingAreaContainer.style.height?this.iStartingHeight+c:null])},$ON_MSG_EDITING_AREA_RESIZE_ENDED:function(){this.oActivePlugin.elEditingArea.style.display="block";this._setEditingAreaDimension()},_setEditingAreaDimension:function(){this.oActivePlugin.elEditingArea.style.height=
|
||||
this.elEditingAreaContainer.style.height;this.oActivePlugin.elEditingArea.style.width=this.elEditingAreaContainer.style.width},attachDocumentEvents:function(a){this.oApp.registerBrowserEvent(a,"click","EVENT_EDITING_AREA_CLICK");this.oApp.registerBrowserEvent(a,"mousedown","EVENT_EDITING_AREA_MOUSEDOWN");this.oApp.registerBrowserEvent(a,"mousemove","EVENT_EDITING_AREA_MOUSEMOVE");this.oApp.registerBrowserEvent(a,"mouseup","EVENT_EDITING_AREA_MOUSEUP");this.oApp.registerBrowserEvent(a,"keydown","EVENT_EDITING_AREA_KEYDOWN");
|
||||
this.oApp.registerBrowserEvent(a,"keypress","EVENT_EDITING_AREA_KEYPRESS");this.oApp.registerBrowserEvent(a,"keyup","EVENT_EDITING_AREA_KEYUP")},getIR:function(){return this.oActivePlugin.getIR()},setIR:function(a,b){this.oApp.exec("SET_IR",[a,b])},getEditingMode:function(){return this.oActivePlugin.sMode}});xe.XE_EditingArea_HTMLSrc=c.Class({name:"XE_EditingArea_HTMLSrc",sMode:"HTMLSrc",textarea:null,$init:function(a){this.elEditingArea=this.textarea=c.$(a)},$BEFORE_MSG_APP_READY:function(){this.oEditingArea=
|
||||
this.textarea;this.oApp.exec("REGISTER_EDITING_AREA",[this])},$ON_CHANGE_EDITING_MODE:function(a){this.textarea.style.display=a==this.sMode?"block":"none"},$ON_PASTE_HTML:function(a){this.oApp.getEditingMode()==this.sMode&&((new n(this.textarea)).paste(a),this.textarea.focus())},getIR:function(){var a=this.textarea.value;return this.oApp.applyConverter?this.oApp.applyConverter(this.sMode+"_TO_IR",a):a},setIR:function(a){a=this.oApp.applyConverter?this.oApp.applyConverter("IR_TO_"+this.sMode,a):a;
|
||||
this.textarea.value=a},focus:function(){this.textarea.focus()}});var n=function(a){this._o=a};n.prototype.getSelection=function(){var a=this._o,b=[-1,-1];if(isNaN(this._o.selectionStart)){a.focus();var d=document.body.createTextRange(),c=null,c=document.selection.createRange().duplicate();d.moveToElementText(a);c.collapse(!0);d.setEndPoint("EndToEnd",c);b[0]=d.text.length;c=document.selection.createRange().duplicate();d.moveToElementText(a);c.collapse(!1);d.setEndPoint("EndToEnd",c);b[1]=d.text.length;
|
||||
a.blur()}else b[0]=a.selectionStart,b[1]=a.selectionEnd;return b};n.prototype.setSelection=function(a,b){var d=this._o;"undefined"==typeof b&&(b=a);if(d.setSelectionRange)d.setSelectionRange(a,b);else if(d.createTextRange){var c=d.createTextRange();c.collapse(!0);c.moveStart("character",a);c.moveEnd("character",b-a);c.select();d.blur()}};n.prototype.copy=function(){var a=this.getSelection();return this._o.value.substring(a[0],a[1])};n.prototype.paste=function(a){var b=this._o,d=this.getSelection(),
|
||||
c=b.value,e=c.substr(0,d[0]),c=c.substr(d[1]);b.value=e+a+c;b=0;"undefined"==typeof document.body.style.maxHeight&&(e=e.match(/\n/gi),b=null!=e?e.length:0);this.setSelection(d[0]+a.length-b)};n.prototype.cut=function(){var a=this.copy();this.paste("");return a};xe.XE_EditingArea_WYSIWYG=c.Class({name:"XE_EditingArea_WYSIWYG",status:xe.PLUGIN_STATUS.NOT_READY,sMode:"WYSIWYG",iframe:null,doc:null,iLastUndoRecorded:0,iMinUndoInterval:3E3,_nIFrameReadyCount:50,$init:function(a){this.iframe=c.$(a);this.initIframe();
|
||||
this.elEditingArea=a},$BEFORE_MSG_APP_READY:function(){this.oEditingArea=this.doc;this.oApp.exec("REGISTER_EDITING_AREA",[this]);this.oApp.exec("ADD_APP_PROPERTY",["getWYSIWYGWindow",c.fnBind(this.getWindow,this)]);this.oApp.exec("ADD_APP_PROPERTY",["getWYSIWYGDocument",c.fnBind(this.getDocument,this)])},$ON_MSG_APP_READY:function(){c.browser.msie&&(c(this.doc).unbind("keydown.ea").bind("keydown.ea",c.fnBind(function(a){"control"==this.doc.selection.type.toLowerCase()&&8==a.keyCode&&(this.oApp.exec("EXECCOMMAND",
|
||||
["delete",!1,!1]),a.preventDefault(),a.stopPropagation())},this)),c(this.doc.body).unbind("mousedown.ea").bind("mousedown.ea",c.fnBind(function(){this._oIERange=null;this._bIERangeReset=!0},this)).unbind("beforedeactivate.ea").bind("beforedeactivate.ea",c.fnBind(function(){if(!this._bIERangeReset){var a=this.getDocument().selection.createRange(0);this._oIERange=a.parentElement&&a.parentElement()&&"INPUT"==a.parentElement().tagName?this._oPrevIERange:a}},this)).unbind("mouseup.ea").bind("mouseup.ea",
|
||||
c.fnBind(function(){this._bIERangeReset=!1},this)))},$ON_CHANGE_EDITING_MODE:function(a){a==this.sMode?(this.iframe.style.display="block",this.oApp.exec("REFRESH_WYSIWYG",[]),this.oApp.exec("SET_EDITING_WINDOW",[this.getWindow()])):this.iframe.style.display="none"},$AFTER_CHANGE_EDITING_MODE:function(){this._oIERange=null},$ON_REFRESH_WYSIWYG:function(){c.browser.mozilla&&(this._disableWYSIWYG(),this._enableWYSIWYG())},$ON_ENABLE_WYSIWYG:function(){this._enableWYSIWYG()},$ON_DISABLE_WYSIWYG:function(){this._disableWYSIWYG()},
|
||||
$ON_EVENT_EDITING_AREA_KEYDOWN:function(a){if(a.ctrlKey){switch(a.keyCode){case 37:this.oApp.exec("EXECCOMMAND",["outdent",!1,!1]);break;case 39:this.oApp.exec("EXECCOMMAND",["indent",!1,!1]);break;case 49:case 50:case 51:case 52:case 53:case 54:this.oApp.exec("EXECCOMMAND",["FormatBlock",!1,"<h"+(a.keyCode-48)+">"]);break;default:return}a.preventDefault();a.stopPropagation()}},$ON_EVENT_EDITING_AREA_KEYUP:function(a){229==a.keyCode||(13==a.keyCode||a.altKey||a.ctrlKey||33<=a.keyCode&&40>=a.keyCode||
|
||||
16==a.keyCode)||this._recordUndo(a)},$ON_PASTE_HTML:function(a,b){if(this.oApp.getEditingMode()==this.sMode){var d=b||this.oApp.getSelection();d.pasteHTML(a);if(!c.browser.msie){var f=d.placeStringBookmark();this.oApp.getWYSIWYGDocument().body.innerHTML=this.oApp.getWYSIWYGDocument().body.innerHTML;d.moveToBookmark(f);d.collapseToEnd();d.select();d.removeStringBookmark(f)}this.oApp.exec("RECORD_UNDO_ACTION",["INSERT HTML"])}},$AFTER_MSG_EDITING_AREA_RESIZE_ENDED:function(){this.oApp.exec("REFRESH_WYSIWYG",
|
||||
[])},$ON_RESTORE_IE_SELECTION:function(){this._oIERange&&(this._oIERange.select(),this._oPrevIERange=this._oIERange,this._oIERange=null)},initIframe:function(){try{this.doc=this.iframe.contentWindow.document;if(null==this.doc||"about:blank"==this.doc.location.href)throw Error("Access denied");this._enableWYSIWYG();this.status=xe.PLUGIN_STATUS.READY}catch(a){if(0<this._nIFrameReadyCount--)setTimeout(c.fnBind(this.initIframe,this),100);else throw"iframe for WYSIWYG editing mode can't be initialized. Please check if the iframe document exists and is also accessable(cross-domain issues). ";
|
||||
}},getIR:function(){var a=this.doc.body.innerHTML;return this.oApp.applyConverter?this.oApp.applyConverter(this.sMode+"_TO_IR",a):a},setIR:function(a){a=this.oApp.applyConverter?this.oApp.applyConverter("IR_TO_"+this.sMode,a):a;this.doc.body.innerHTML=a;c.browser.mozilla&&""==this.doc.body.innerHTML&&(this.doc.body.innerHTML="<br>")},getWindow:function(){return this.iframe.contentWindow},getDocument:function(){return this.iframe.contentWindow.document},focus:function(){},_recordUndo:function(a){new Date-
|
||||
this.iLastUndoRecorded<this.iMinUndoInterval||(this.oApp.exec("RECORD_UNDO_ACTION",["KEYPRESS"]),this.iLastUndoRecorded=new Date,this.prevKeyCode=a.keyCode)},_enableWYSIWYG:function(){c.browser.msie?(this.doc.body.disabled=!0,this.doc.body.contentEditable=!0,this.doc.body.removeAttribute("disabled")):this.doc.designMode="on"},_disableWYSIWYG:function(){c.browser.msie?this.doc.body.contentEditable=!1:this.doc.designMode="off"}});xe.XE_EditingAreaVerticalResizer=c.Class({name:"XE_EditingAreaVerticalResizer",
|
||||
oResizeGrip:null,$init:function(a){this._assignHTMLObjects(a);this.$FnMouseDown=c.fnBind(this._mousedown,this);this.$FnMouseMove=c.fnBind(this._mousemove,this);this.$FnMouseUp=c.fnBind(this._mouseup,this);c(this.oResizeGrip).bind("mousedown",this.$FnMouseDown)},_assignHTMLObjects:function(a){a=c.$(a)||document;this.oResizeGrip=c(".xpress_xeditor_editingArea_verticalResizer",a).get(0)},_mousedown:function(a){this.iStartHeight=a.clientY;c(document).bind("mousemove",this.$FnMouseMove);c(document).bind("mouseup",
|
||||
this.$FnMouseUp);this.oApp.exec("MSG_EDITING_AREA_RESIZE_STARTED",[this.$FnMouseDown,this.$FnMouseMove,this.$FnMouseUp])},_mousemove:function(a){this.oApp.exec("RESIZE_EDITING_AREA_BY",[0,a.clientY-this.iStartHeight])},_mouseup:function(){c(document).unbind("mousemove",this.$FnMouseMove);c(document).unbind("mouseup",this.$FnMouseUp);this.oApp.exec("MSG_EDITING_AREA_RESIZE_ENDED",[this.$FnMouseDown,this.$FnMouseMove,this.$FnMouseUp])}});xe.XE_ExecCommand=c.Class({name:"XE_ExecCommand",oEditingArea:null,
|
||||
$init:function(a){this.oEditingArea=a},$BEFORE_MSG_APP_READY:function(){this.oEditingArea&&"IFRAME"==this.oEditingArea.tagName&&(this.oEditingArea=this.oEditingArea.contentWindow.document)},$ON_MSG_APP_READY:function(){this.oApp.exec("REGISTER_HOTKEY",["ctrl+b","EXECCOMMAND",["bold",!1,!1]]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+u","EXECCOMMAND",["underline",!1,!1]]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+i","EXECCOMMAND",["italic",!1,!1]]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+d","EXECCOMMAND",
|
||||
["strikethrough",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["bold","click","EXECCOMMAND",["bold",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["underline","click","EXECCOMMAND",["underline",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["italic","click","EXECCOMMAND",["italic",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["lineThrough","click","EXECCOMMAND",["strikethrough",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["superscript","click","EXECCOMMAND",["superscript",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",
|
||||
["subscript","click","EXECCOMMAND",["subscript",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["justifyleft","click","EXECCOMMAND",["justifyleft",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["justifycenter","click","EXECCOMMAND",["justifycenter",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["justifyright","click","EXECCOMMAND",["justifyright",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["justifyfull","click","EXECCOMMAND",["justifyfull",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["orderedlist","click",
|
||||
"EXECCOMMAND",["insertorderedlist",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["unorderedlist","click","EXECCOMMAND",["insertunorderedlist",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["outdent","click","EXECCOMMAND",["outdent",!1,!1]]);this.oApp.exec("REGISTER_UI_EVENT",["indent","click","EXECCOMMAND",["indent",!1,!1]])},$BEFORE_EXECCOMMAND:function(a){this._bOnlyCursorChanged=!1;this.oApp.exec("FOCUS",[]);a.match(/^bold|underline|italic|strikethrough|superscript|subscript$/i)&&this.oApp.getSelection().collapsed&&
|
||||
(this._bOnlyCursorChanged=!0);this._bOnlyCursorChanged||this.oApp.exec("RECORD_UNDO_BEFORE_ACTION",[a])},$ON_EXECCOMMAND:function(a,b,d){this.oEditingArea.execCommand(a,""==b||b?b:!1,""==d||d?d:!1)},$AFTER_EXECCOMMAND:function(a){this._bOnlyCursorChanged||this.oApp.exec("RECORD_UNDO_AFTER_ACTION",[a]);this.oApp.exec("CHECK_STYLE_CHANGE",[])}});xe.XE_WYSIWYGEnterKey=c.Class({name:"XE_WYSIWYGEnterKey",unsupportedBrowser:["ie","opera"],oEditingArea:null,$init:function(a){this.oEditingArea=a},$BEFORE_MSG_APP_READY:function(){this.oEditingArea&&
|
||||
"IFRAME"==this.oEditingArea.tagName&&(this.oEditingArea=this.oEditingArea.contentWindow.document)},$ON_EVENT_EDITING_AREA_KEYDOWN:function(a){if("WYSIWYG"==this.oApp.getEditingMode()&&!a.shiftKey&&13==a.keyCode){var b=this.oApp.getSelection(),d=b.placeStringBookmark(),c=b.getLineInfo(),e=c.oStart,c=c.oEnd;!e.bParentBreak||b.rxBlockContainer.test(e.oLineBreaker.tagName)?(a.stopPropagation(),a.preventDefault(),a=this.oEditingArea.createElement("P"),b.moveToBookmark(d),b.setStartBefore(e.oNode),b.surroundContents(a),
|
||||
b.collapseToEnd(),e=this.oEditingArea.createElement("P"),b.setEndAfter(c.oNode),b.surroundContents(e),b.removeStringBookmark(d),""==a.innerHTML&&(a.innerHTML="<br>"),""==e.innerHTML&&(e.innerHTML="<br>"),e.nextSibling&&"BR"==e.nextSibling.tagName&&e.parentNode.removeChild(e.nextSibling),b.selectNodeContents(e),b.collapseToStart(),b.select(),this.oApp.exec("CHECK_STYLE_CHANGE",[])):b.removeStringBookmark(d)}}});xe.XE_WYSIWYGStyler=c.Class({name:"XE_WYSIWYGStyler",$PRECONDITION:function(){return"WYSIWYG"==
|
||||
this.oApp.getEditingMode()},$ON_SET_WYSIWYG_STYLE:function(a){var b=this.oApp.getSelection();if(b.collapsed){var d=this.oApp.getWYSIWYGDocument().createElement("SPAN");b.insertNode(d);d.innerHTML=unescape("%uFEFF");var f,e;for(e in a)f=a[e],"string"==typeof f&&(d.style[e]=f);b.selectNodeContents(d);b.collapseToEnd();b._window.focus();b._window.document.body.focus();b.select();c.browser.mozilla&&3==c.browser.nVersion&&(d.innerHTML="")}else this.oApp.exec("RECORD_UNDO_BEFORE_ACTION",["FONT STYLE"]),
|
||||
b.styleRange(a),b._window.focus(),b.select(),this.oApp.exec("RECORD_UNDO_AFTER_ACTION",["FONT STYLE"])}});xe.XE_WYSIWYGStyleGetter=c.Class({name:"XE_WYSIWYGStyleGetter",hKeyUp:null,getStyleInterval:200,oStyleMap:{fontFamily:{type:"Value",css:"fontFamily"},fontSize:{type:"Value",css:"fontSize"},lineHeight:{type:"Value",css:"lineHeight",converter:function(a,b){return!a.match(/px$/)?a:Math.ceil(10*(parseInt(a)/parseInt(b.fontSize)))/10}},bold:{command:"bold"},underline:{command:"underline"},italic:{command:"italic"},
|
||||
lineThrough:{command:"strikethrough"},superscript:{command:"superscript"},subscript:{command:"subscript"},justifyleft:{command:"justifyleft"},justifycenter:{command:"justifycenter"},justifyright:{command:"justifyright"},justifyfull:{command:"justifyfull"},orderedlist:{command:"insertorderedlist"},unorderedlist:{command:"insertunorderedlist"}},$init:function(){this.oStyle=this._getBlankStyle()},$PRECONDITION:function(){return"WYSIWYG"!=this.oApp.getEditingMode()?!1:!0},$ON_MSG_APP_READY:function(){this.oDocument=
|
||||
this.oApp.getWYSIWYGDocument();this.oApp.exec("ADD_APP_PROPERTY",["getCurrentStyle",c.fnBind(this.getCurrentStyle,this)])},$ON_EVENT_EDITING_AREA_MOUSEUP:function(){this.hKeyUp&&clearTimeout(this.hKeyUp);this.oApp.exec("CHECK_STYLE_CHANGE",[])},$ON_EVENT_EDITING_AREA_KEYUP:function(a){if(8==a.keyCode||33<=a.keyCode&&40>=a.keyCode||45==a.keyCode||46==a.keyCode)this.hKeyUp&&clearTimeout(this.hKeyUp),this.hKeyUp=setTimeout(c.fnBind(this.oApp.exec,this.oApp,"CHECK_STYLE_CHANGE",[]),this.getStyleInterval)},
|
||||
$ON_CHECK_STYLE_CHANGE:function(){this._getStyle()},$ON_RESET_STYLE_STATUS:function(){var a=this._getBlankStyle(),b;for(b in a)this.oApp.exec("SET_STYLE_STATUS",[b,a[b]])},getCurrentStyle:function(){return this.oStyle},_check_style_change:function(){this.oApp.exec("CHECK_STYLE_CHANGE",[])},_getBlankStyle:function(){var a={},b;for(b in this.oStyleMap)a[b]="Value"==this.oStyleMap[b].type?"":0;return a},_getStyle:function(){var a=this.oApp.getSelection(),b=a.getNodes(!1,function(a){return!a.childNodes||
|
||||
0==a.childNodes.length?!0:!1}),d,a=0==b.length?this._getStyleOf(a.commonAncestorContainer):this._getStyleOf(b[0]);for(d in a)this.oStyleMap[d].converter&&(a[d]=this.oStyleMap[d].converter(a[d],a)),this.oStyle[d]!=a[d]&&this.oApp.exec("MSG_STYLE_CHANGED",[d,a[d]]);this.oStyle=a},_getStyleOf:function(a){var b=this._getBlankStyle();if(!a)return b;3==a.nodeType&&(a=a.parentNode);a=c(a);var d,f;for(f in this.oStyle)if(d=this.oStyleMap[f],d.type&&"Value"==d.type)if(d.css)d=a.css(d.css),"fontFamily"==f&&
|
||||
(d=d.split(/,/)[0]),b[f]=d;else{if(d.command)try{b[f]=this.oDocument.queryCommandState(d.command)}catch(e){}}else if(d.command)try{b[f]=this.oDocument.queryCommandState(d.command)?1:0}catch(g){}return b}});xe.XE_FontSizeWithSelectUI=c.Class({name:"XE_FontSizeWithSelectUI",$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elFontSizeSelect=c("SELECT.xpress_xeditor_ui_fontSize_select",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elFontSizeSelect,
|
||||
"change","SET_FONTSIZE_FROM_SELECT_UI");this.elFontSizeSelect.selectedIndex=0},$ON_MSG_STYLE_CHANGED:function(a,b){"fontSize"==a&&(this.elFontSizeSelect.value=b,0>this.elFontSizeSelect.selectedIndex&&(this.elFontSizeSelect.selectedIndex=0))},$ON_SET_FONTSIZE_FROM_SELECT_UI:function(){var a=this.elFontSizeSelect.value;a&&(this.oApp.exec("SET_WYSIWYG_STYLE",[{fontSize:a}]),this.oApp.exec("CHECK_STYLE_CHANGE",[]))}});xe.XE_FontNameWithSelectUI=c.Class({name:"XE_FontNameWithSelectUI",$init:function(a){this._assignHTMLObjects(a)},
|
||||
_assignHTMLObjects:function(a){this.elFontNameSelect=c("SELECT.xpress_xeditor_ui_fontName_select",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elFontNameSelect,"change","SET_FONTNAME_FROM_SELECT_UI");this.elFontNameSelect.selectedIndex=0},$ON_MSG_STYLE_CHANGED:function(a,b){"fontFamily"==a&&(this.elFontNameSelect.value=b.toLowerCase(),0>this.elFontNameSelect.selectedIndex&&(this.elFontNameSelect.selectedIndex=0))},$ON_SET_FONTNAME_FROM_SELECT_UI:function(){var a=this.elFontNameSelect.value;
|
||||
a&&(this.oApp.exec("SET_WYSIWYG_STYLE",[{fontFamily:a}]),this.oApp.exec("CHECK_STYLE_CHANGE",[]))}});xe.XE_LineHeight=c.Class({name:"XE_LineHeight",$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(){},$ON_SET_LINEHEIGHT:function(a){this.setLineHeight(a)},getLineHeight:function(){var a=this._getSelectedNodes(!1),b,d,f;if(0==a.length)return-1;var e=a.length;0==e?f=-1:(d=this._getLineWrapper(a[0]),f=this._getWrapperLineheight(d));var g=this.oSelection.getStartNode();if(0<f)for(var h=
|
||||
1;h<e;h++)if(!this._isChildOf(a[h],b)&&a[h]&&(b=this._getLineWrapper(a[h]),b!=d)){curHeight=this._getWrapperLineheight(b);if(curHeight!=f){f=-1;break}d=b}b=this._getLineWrapper(a[e-1]);a=this.oSelection.getEndNode();selectText=c.fnBind(function(a,b){this.oSelection.setEndNodes(a,b);this.oSelection.select()},this,g,a);setTimeout(selectText,100);return f},setLineHeight:function(a){function b(a,b){if(!a)try{a=thisRef.oSelection.surroundContentsWithNewNode("P")}catch(d){a=thisRef.oSelection.surroundContentsWithNewNode("DIV")}a.style.lineHeight=
|
||||
b;return a}thisRef=this;var d=this._getSelectedNodes(!1);if(0!=d.length){var f,e,g=d.length;this.oApp.exec("RECORD_UNDO_BEFORE_ACTION",["LINEHEIGHT"]);e=this._getLineWrapper(d[0]);for(var h=e=b(e,a),k=1;k<g;k++){try{var j;for(var l=xe.DOMFix.parentNode(d[k]);l&&"BODY"!=l.tagName;)l=xe.DOMFix.parentNode(l);j=l?!0:!1;if(!j)continue}catch(m){continue}this._isChildOf(d[k],f)||(f=this._getLineWrapper(d[k]),f!=e&&(e=f=b(f,a)))}setTimeout(c.fnBind(function(a,b){this.oSelection.setEndNodes(a,b);this.oSelection.select();
|
||||
this.oApp.exec("RECORD_UNDO_AFTER_ACTION",["LINEHEIGHT"])},this,h,f||h),100)}},_getSelectedNodes:function(a){a||(this.oSelection=this.oApp.getSelection());this.oSelection.collapsed&&this.oSelection.selectNode(this.oSelection.commonAncestorContainer);a=this.oSelection.getTextNodes();if(0==a.length){var b=this.oSelection.getStartNode();b?a[0]=b:a=[]}return a},_getWrapperLineheight:function(a){var b="";if(a&&a.style.lineHeight)b=a.style.lineHeight;else for(a=this.oSelection.commonAncesterContainer;a&&
|
||||
!this.oSelection.rxLineBreaker.test(a.tagName);){if(a&&a.style.lineHeight){b=a.style.lineHeight;break}a=xe.DOMFix.parentNode(a)}return b},_isChildOf:function(a,b){for(;a&&"BODY"!=a.tagName;){if(a==b)return!0;a=xe.DOMFix.parentNode(a)}return!1},_getLineWrapper:function(a){var b=this.oApp.getEmptySelection();b.selectNode(a);a=b.getLineInfo();var d=a.oStart,c=a.oEnd,e,b=null;a=d.oNode;e=d.oLineBreaker;d=c.oNode;c=c.oLineBreaker;this.oSelection.setEndNodes(a,d);e==c&&("P"==e.tagName||"DIV"==e.tagName?
|
||||
b=e:this.oSelection.setEndNodes(e.firstChild,e.lastChild));return b}});xe.XE_LineHeightWithSelectUI=c.Class({name:"XE_LineHeightWithSelectUI",_assignHTMLObjects:function(a){this.elLineHeightSelect=c("SELECT.xpress_xeditor_ui_lineHeight_select",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elLineHeightSelect,"change","SET_LINEHEIGHT_FROM_SELECT_UI");this.elLineHeightSelect.selectedIndex=0},$ON_MSG_STYLE_CHANGED:function(a,b){"lineHeight"==a&&(this.elLineHeightSelect.value=
|
||||
b,0>this.elLineHeightSelect.selectedIndex&&(this.elLineHeightSelect.selectedIndex=0))},$ON_SET_LINEHEIGHT_FROM_SELECT_UI:function(){var a=this.elLineHeightSelect.value;a&&(this.elLineHeightSelect.selectedIndex=0,this.oApp.exec("SET_LINEHEIGHT",[a]),this.oApp.exec("CHECK_STYLE_CHANGE",[]))}}).extend(xe.XE_LineHeight);xe.XE_ColorPalette=c.Class({name:"XE_ColorPalette",rxRGBColorPattern:/rgb\((\d+), ?(\d+), ?(\d+)\)/i,$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elColorPaletteLayer=
|
||||
c("UL.xpress_xeditor_color_palette",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elColorPaletteLayer,"click","EVENT_MOUSEUP_COLOR_PALETTE")},$ON_SHOW_COLOR_PALETTE:function(a,b){this.sCallbackCmd=a;this.oLayerContainer=b;this.oLayerContainer.insertBefore(this.elColorPaletteLayer,null);this.elColorPaletteLayer.style.display="block"},$ON_HIDE_COLOR_PALETTE:function(){this.elColorPaletteLayer.style.display="none"},$ON_COLOR_PALETTE_APPLY_COLOR:function(a){if(this.rxRGBColorPattern.test(a)){var b=
|
||||
function(a){a=parseInt(a).toString(16);2>a.length&&(a="0"+a);return a.toUpperCase()};a=b(RegExp.$1);var d=b(RegExp.$2),b=b(RegExp.$3);a="#"+a+d+b}this.oApp.exec(this.sCallbackCmd,[a])},$ON_EVENT_MOUSEUP_COLOR_PALETTE:function(a){a=a.target;a.style.backgroundColor&&this.oApp.exec("COLOR_PALETTE_APPLY_COLOR",[a.style.backgroundColor])}});xe.XE_FontColor=c.Class({name:"XE_FontColor",rxColorPattern:/^#?[0-9a-fA-F]{6}$|^rgb\(\d+, ?\d+, ?\d+\)$/i,$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elDropdownLayer=
|
||||
c("DIV.xpress_xeditor_fontcolor_layer",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.exec("REGISTER_UI_EVENT",["fontColor","click","TOGGLE_FONTCOLOR_LAYER"])},$ON_TOGGLE_FONTCOLOR_LAYER:function(){this.oApp.exec("TOGGLE_TOOLBAR_ACTIVE_LAYER",[this.elDropdownLayer,null,"SHOW_COLOR_PALETTE",["APPLY_FONTCOLOR",this.elDropdownLayer]])},$ON_APPLY_FONTCOLOR:function(a){this.rxColorPattern.test(a)?(this.oApp.exec("SET_WYSIWYG_STYLE",[{color:a}]),this.oApp.exec("HIDE_ACTIVE_LAYER")):alert(this.oApp.$MSG("XE_FontColor.invalidColorCode"))}});
|
||||
xe.XE_BGColor=c.Class({name:"XE_BGColor",rxColorPattern:/^#?[0-9a-fA-F]{6}$|^rgb\(\d+, ?\d+, ?\d+\)$/i,$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elDropdownLayer=c("DIV.xpress_xeditor_bgcolor_layer",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.exec("REGISTER_UI_EVENT",["bgColor","click","TOGGLE_BGCOLOR_LAYER"]);this.oApp.registerBrowserEvent(this.elDropdownLayer,"click","EVENT_APPLY_BGCOLOR",[])},$ON_TOGGLE_BGCOLOR_LAYER:function(){this.oApp.exec("TOGGLE_TOOLBAR_ACTIVE_LAYER",
|
||||
[this.elDropdownLayer,null,"SHOW_COLOR_PALETTE",["APPLY_BGCOLOR",this.elDropdownLayer]])},$ON_EVENT_APPLY_BGCOLOR:function(a){a=a.target;if(a.tagName=="SPAN")a=a.parentNode;a.tagName=="BUTTON"&&this.oApp.exec("APPLY_BGCOLOR",[a.style.backgroundColor,a.style.color])},$ON_APPLY_BGCOLOR:function(a,b){if(this.rxColorPattern.test(a)){var d={backgroundColor:a};if(b)d.color=b;this.oApp.exec("SET_WYSIWYG_STYLE",[d]);this.oApp.exec("HIDE_ACTIVE_LAYER")}else alert(this.oApp.$MSG("XE_BGColor.invalidColorCode"))}});
|
||||
[this.elDropdownLayer,null,"SHOW_COLOR_PALETTE",["APPLY_BGCOLOR",this.elDropdownLayer]])},$ON_EVENT_APPLY_BGCOLOR:function(a){a=a.target;"SPAN"==a.tagName&&(a=a.parentNode);"BUTTON"==a.tagName&&this.oApp.exec("APPLY_BGCOLOR",[a.style.backgroundColor,a.style.color])},$ON_APPLY_BGCOLOR:function(a,b){if(this.rxColorPattern.test(a)){var d={backgroundColor:a};b&&(d.color=b);this.oApp.exec("SET_WYSIWYG_STYLE",[d]);this.oApp.exec("HIDE_ACTIVE_LAYER")}else alert(this.oApp.$MSG("XE_BGColor.invalidColorCode"))}});
|
||||
xe.XE_Quote=c.Class({name:"XE_Quote",$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elDropdownLayer=c("DIV.xpress_xeditor_blockquote_layer",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.exec("REGISTER_UI_EVENT",["quote","click","TOGGLE_BLOCKQUOTE_LAYER"]);this.oApp.registerBrowserEvent(this.elDropdownLayer,"click","EVENT_APPLY_SEDITOR_BLOCKQUOTE",[])},$ON_TOGGLE_BLOCKQUOTE_LAYER:function(){this.oApp.exec("TOGGLE_TOOLBAR_ACTIVE_LAYER",[this.elDropdownLayer])},
|
||||
$ON_EVENT_APPLY_SEDITOR_BLOCKQUOTE:function(a){a=a.target;if(a.tagName=="BUTTON"){a=a.parentNode.className;a!="q8"?this._wrapBlock("BLOCKQUOTE",a):this._unwrapBlock("BLOCKQUOTE");this.oApp.exec("HIDE_ACTIVE_LAYER",[])}},_unwrapBlock:function(a){for(var b=this.oApp.getSelection().commonAncestorContainer;b&&b.tagName!=a;)b=b.parentNode;if(b){for(;b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);b.parentNode.removeChild(b)}},_wrapBlock:function(a,b){var d=this.oApp.getSelection(),c=d.getLineInfo(),
|
||||
e=c.oStart,c=c.oEnd,g=/BODY|TD|LI/i,e=e.bParentBreak&&!g.test(e.oLineBreaker.tagName)?e.oNode.parentNode:e.oNode,c=c.bParentBreak&&!g.test(c.oLineBreaker.tagName)?c.oNode.parentNode:c.oNode;d.setStartBefore(e);d.setEndAfter(c);if(g=this._expandToTableStart(d,c)){c=g;d.setEndAfter(g)}if(g=this._expandToTableStart(d,e)){e=g;d.setStartBefore(g)}g=e;for(e=d.commonAncestorContainer;g&&g!=e&&g.parentNode!=e;)g=g.parentNode;oFormattingNode=d._document.createElement(a);if(b)oFormattingNode.className=b;g==
|
||||
e?e.insertBefore(oFormattingNode,e.firstChild):e.insertBefore(oFormattingNode,g);d.setStartAfter(oFormattingNode);d.setEndAfter(c);d.surroundContents(oFormattingNode);e=oFormattingNode.childNodes;for(g=e.length-1;g>=0;g--)if(e[g].nodeType==3||e[g].tagName=="BR"){for(var h=d._document.createElement("P"),c=e[g].nextSibling;g>=0&&e[g]&&(e[g].nodeType==3||e[g].tagName=="BR");)h.insertBefore(e[g--],h.firstChild);oFormattingNode.insertBefore(h,c);g++}if(oFormattingNode&&oFormattingNode.parentNode){h=d._document.createElement("P");
|
||||
h.innerHTML=unescape("<br/>");oFormattingNode.parentNode.insertBefore(h,oFormattingNode.nextSibling)}this.oApp.exec("RECORD_UNDO_ACTION",["Block Quote"]);return oFormattingNode},_expandToTableStart:function(a,b){for(var c=a.commonAncestorContainer,f=null,e=false;b&&!e;){b==c&&(e=true);if(/TBODY|TFOOT|THEAD|TR/i.test(b.tagName)){f=this._getTableRoot(b);break}b=b.parentNode}return f},_getTableRoot:function(a){for(;a&&a.tagName!="TABLE";)a=a.parentNode;return a}});xe.XE_SCharacter=c.Class({name:"XE_SCharacter",
|
||||
$ON_EVENT_APPLY_SEDITOR_BLOCKQUOTE:function(a){a=a.target;"BUTTON"==a.tagName&&(a=a.parentNode.className,"q8"!=a?this._wrapBlock("BLOCKQUOTE",a):this._unwrapBlock("BLOCKQUOTE"),this.oApp.exec("HIDE_ACTIVE_LAYER",[]))},_unwrapBlock:function(a){for(var b=this.oApp.getSelection().commonAncestorContainer;b&&b.tagName!=a;)b=b.parentNode;if(b){for(;b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);b.parentNode.removeChild(b)}},_wrapBlock:function(a,b){var d=this.oApp.getSelection(),c=d.getLineInfo(),
|
||||
e=c.oStart,c=c.oEnd,g=/BODY|TD|LI/i,e=e.bParentBreak&&!g.test(e.oLineBreaker.tagName)?e.oNode.parentNode:e.oNode,c=c.bParentBreak&&!g.test(c.oLineBreaker.tagName)?c.oNode.parentNode:c.oNode;d.setStartBefore(e);d.setEndAfter(c);if(g=this._expandToTableStart(d,c))c=g,d.setEndAfter(g);if(g=this._expandToTableStart(d,e))e=g,d.setStartBefore(g);g=e;for(e=d.commonAncestorContainer;g&&g!=e&&g.parentNode!=e;)g=g.parentNode;oFormattingNode=d._document.createElement(a);b&&(oFormattingNode.className=b);g==e?
|
||||
e.insertBefore(oFormattingNode,e.firstChild):e.insertBefore(oFormattingNode,g);d.setStartAfter(oFormattingNode);d.setEndAfter(c);d.surroundContents(oFormattingNode);e=oFormattingNode.childNodes;for(g=e.length-1;0<=g;g--)if(3==e[g].nodeType||"BR"==e[g].tagName){for(var h=d._document.createElement("P"),c=e[g].nextSibling;0<=g&&e[g]&&(3==e[g].nodeType||"BR"==e[g].tagName);)h.insertBefore(e[g--],h.firstChild);oFormattingNode.insertBefore(h,c);g++}oFormattingNode&&oFormattingNode.parentNode&&(h=d._document.createElement("P"),
|
||||
h.innerHTML=unescape("<br/>"),oFormattingNode.parentNode.insertBefore(h,oFormattingNode.nextSibling));this.oApp.exec("RECORD_UNDO_ACTION",["Block Quote"]);return oFormattingNode},_expandToTableStart:function(a,b){for(var d=a.commonAncestorContainer,c=null,e=!1;b&&!e;){b==d&&(e=!0);if(/TBODY|TFOOT|THEAD|TR/i.test(b.tagName)){c=this._getTableRoot(b);break}b=b.parentNode}return c},_getTableRoot:function(a){for(;a&&"TABLE"!=a.tagName;)a=a.parentNode;return a}});xe.XE_SCharacter=c.Class({name:"XE_SCharacter",
|
||||
$init:function(a){this.bIE=c.browser.msie;this._assignHTMLObjects(a);this.charSet=[];this.charSet[0]=unescape("FF5B FF5D 3014 3015 3008 3009 300A 300B 300C 300D 300E 300F 3010 3011 2018 2019 201C 201D 3001 3002 %B7 2025 2026 %A7 203B 2606 2605 25CB 25CF 25CE 25C7 25C6 25A1 25A0 25B3 25B2 25BD 25BC 25C1 25C0 25B7 25B6 2664 2660 2661 2665 2667 2663 2299 25C8 25A3 25D0 25D1 2592 25A4 25A5 25A8 25A7 25A6 25A9 %B1 %D7 %F7 2260 2264 2265 221E 2234 %B0 2032 2033 2220 22A5 2312 2202 2261 2252 226A 226B 221A 223D 221D 2235 222B 222C 2208 220B 2286 2287 2282 2283 222A 2229 2227 2228 FFE2 21D2 21D4 2200 2203 %B4 FF5E 02C7 02D8 02DD 02DA 02D9 %B8 02DB %A1 %BF 02D0 222E 2211 220F 266D 2669 266A 266C 327F 2192 2190 2191 2193 2194 2195 2197 2199 2196 2198 321C 2116 33C7 2122 33C2 33D8 2121 2668 260F 260E 261C 261E %B6 2020 2021 %AE %AA %BA 2642 2640").replace(/(\S{4})/g,
|
||||
function(a){return"%u"+a}).split(" ");this.charSet[1]=unescape("%BD 2153 2154 %BC %BE 215B 215C 215D 215E %B9 %B2 %B3 2074 207F 2081 2082 2083 2084 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 FFE6 %24 FFE5 FFE1 20AC 2103 212B 2109 FFE0 %A4 2030 3395 3396 3397 2113 3398 33C4 33A3 33A4 33A5 33A6 3399 339A 339B 339C 339D 339E 339F 33A0 33A1 33A2 33CA 338D 338E 338F 33CF 3388 3389 33C8 33A7 33A8 33B0 33B1 33B2 33B3 33B4 33B5 33B6 33B7 33B8 33B9 3380 3381 3382 3383 3384 33BA 33BB 33BC 33BD 33BE 33BF 3390 3391 3392 3393 3394 2126 33C0 33C1 338A 338B 338C 33D6 33C5 33AD 33AE 33AF 33DB 33A9 33AA 33AB 33AC 33DD 33D0 33D3 33C3 33C9 33DC 33C6").replace(/(\S{4})/g,
|
||||
function(a){return"%u"+a}).split(" ");this.charSet[2]=unescape("3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 326A 326B 326C 326D 326E 326F 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 327A 327B 24D0 24D1 24D2 24D3 24D4 24D5 24D6 24D7 24D8 24D9 24DA 24DB 24DC 24DD 24DE 24DF 24E0 24E1 24E2 24E3 24E4 24E5 24E6 24E7 24E8 24E9 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 246A 246B 246C 246D 246E 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 320A 320B 320C 320D 320E 320F 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 321A 321B 249C 249D 249E 249F 24A0 24A1 24A2 24A3 24A4 24A5 24A6 24A7 24A8 24A9 24AA 24AB 24AC 24AD 24AE 24AF 24B0 24B1 24B2 24B3 24B4 24B5 2474 2475 2476 2477 2478 2479 247A 247B 247C 247D 247E 247F 2480 2481 2482").replace(/(\S{4})/g,
|
||||
|
|
@ -140,73 +139,72 @@ function(a){return"%u"+a}).split(" ");this.charSet[4]=unescape("0391 0392 0393 0
|
|||
function(a){return"%u"+a}).split(" ");this.charSet[5]=unescape("3041 3042 3043 3044 3045 3046 3047 3048 3049 304A 304B 304C 304D 304E 304F 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 305A 305B 305C 305D 305E 305F 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 306A 306B 306C 306D 306E 306F 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 307A 307B 307C 307D 307E 307F 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 308A 308B 308C 308D 308E 308F 3090 3091 3092 3093 30A1 30A2 30A3 30A4 30A5 30A6 30A7 30A8 30A9 30AA 30AB 30AC 30AD 30AE 30AF 30B0 30B1 30B2 30B3 30B4 30B5 30B6 30B7 30B8 30B9 30BA 30BB 30BC 30BD 30BE 30BF 30C0 30C1 30C2 30C3 30C4 30C5 30C6 30C7 30C8 30C9 30CA 30CB 30CC 30CD 30CE 30CF 30D0 30D1 30D2 30D3 30D4 30D5 30D6 30D7 30D8 30D9 30DA 30DB 30DC 30DD 30DE 30DF 30E0 30E1 30E2 30E3 30E4 30E5 30E6 30E7 30E8 30E9 30EA 30EB 30EC 30ED 30EE 30EF 30F0 30F1 30F2 30F3 30F4 30F5 30F6").replace(/(\S{4})/g,
|
||||
function(a){return"%u"+a}).split(" ")},_assignHTMLObjects:function(a){a=c.$(a)||document;this.elDropdownLayer=c("DIV.xpress_xeditor_sCharacter_layer",a).get(0);this.oTextField=c("INPUT",this.elDropdownLayer).get(0);this.oInsertButton=c("+ BUTTON",this.oTextField).get(0);this.aCloseButton=c("BUTTON.close",this.elDropdownLayer).get();this.aSCharList=c(".list",this.elDropdownLayer).get();a=c(">UL",this.elDropdownLayer).get(0);this.aLabelA=c("A",a).get()},$ON_MSG_APP_READY:function(){var a=c.fnBind(this.oApp.exec,
|
||||
this.oApp,"INSERT_SCHARACTERS",[this.oTextField.value]);c(this.oInsertButton).click(a);this.oApp.exec("SET_SCHARACTER_LIST",[this.charSet]);for(a=0;a<this.aLabelA.length;a++){var b=c.fnBind(this.oApp.exec,this.oApp,"CHANGE_SCHARACTER_SET",[a]);c(this.aLabelA[a]).mousedown(b);this._stopBrowserEvent(this.aLabelA[a],"click")}for(a=0;a<this.aCloseButton.length;a++)this.oApp.registerBrowserEvent(this.aCloseButton[a],"click","HIDE_ACTIVE_LAYER",[]);this.oApp.registerBrowserEvent(this.elDropdownLayer,"click",
|
||||
"EVENT_SCHARACTER_CLICKED",[]);this.oApp.exec("REGISTER_UI_EVENT",["sCharacter","click","TOGGLE_SCHARACTER_LAYER"])},$ON_TOGGLE_SCHARACTER_LAYER:function(){this.oTextField.value="";this.oSelection=this.oApp.getSelection();this.oApp.exec("TOGGLE_TOOLBAR_ACTIVE_LAYER",[this.elDropdownLayer])},$ON_EVENT_SCHARACTER_CLICKED:function(a){a=a.target;a.tagName=="BUTTON"&&a.parentNode.tagName=="LI"&&this.oApp.exec("SELECT_SCHARACTER",[a.firstChild.innerHTML])},$ON_SELECT_SCHARACTER:function(a){this.oTextField.value=
|
||||
this.oTextField.value+a;if(this.oTextField.createTextRange){a=this.oTextField.createTextRange();a.collapse(false);a.select()}else if(this.oTextField.selectionEnd){this.oTextField.selectionEnd=this.oTextField.value.length;this.oTextField.focus()}},$ON_INSERT_SCHARACTERS:function(){this.oSelection.pasteHTML(this.oTextField.value);this.oApp.exec("HIDE_ACTIVE_LAYER",[])},$ON_CHANGE_SCHARACTER_SET:function(a){for(var b=0;b<this.aSCharList.length;b++)if(this.aSCharList[b].style.display=="block"){if(b==
|
||||
a)return;c(this.aLabelA[b]).removeClass("on");this.aSCharList[b].style.display="none"}this._drawSCharList(a);c(this.aLabelA[a]).addClass("on");this.aSCharList[a].style.display="block"},$ON_SET_SCHARACTER_LIST:function(a){this.charSet=a;this.bSCharSetDrawn=Array(this.charSet.length);this._drawSCharList(0)},_drawSCharList:function(a){if(!this.bSCharSetDrawn[a]){this.bSCharSetDrawn[a]=true;var b=this.charSet[a].length,c=Array(b);this.aSCharList[a].innerHTML="";for(var f=0;f<b;f++){c[f]=document.createElement("LI");
|
||||
c[f].innerHTML='<button type="button"><span>'+unescape(this.charSet[a][f])+"</span></button>";this.aSCharList[a].appendChild(c[f])}}},_stopBrowserEvent:function(a,b){c(a).bind(b,function(a){a.stopPropagation();a.preventDefault()})}});xe.XE_UndoRedo=c.Class({name:"XE_UndoRedo",actionHistory:null,oCurStateIdx:null,iMinimumSizeChange:10,sBlankContentsForFF:"<br>",$init:function(){this.aUndoHistory=[];this.oCurStateIdx={nIdx:0,nStep:0}},$PRECONDITION:function(a){if(a.match(/_DO_RECORD_UNDO_HISTORY_AT$/))return true;
|
||||
try{if(this.oApp.getEditingMode()!="WYSIWYG")return false}catch(b){return false}return true},$BEFORE_MSG_APP_READY:function(){this.oApp.exec("DO_RECORD_UNDO_HISTORY_AT",[this.oCurStateIdx,"","",null])},$ON_MSG_APP_READY:function(){this.bFF=c.browser.mozilla;this.oApp.exec("ADD_APP_PROPERTY",["getUndoHistory",c.fnBind(this.getUndoHistory,this)]);this.oApp.exec("ADD_APP_PROPERTY",["getUndoStateIdx",c.fnBind(this.getUndoStateIdx,this)]);this.oApp.exec("REGISTER_UI_EVENT",["undo","click","UNDO"]);this.oApp.exec("REGISTER_UI_EVENT",
|
||||
["redo","click","REDO"]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+z","UNDO"]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+y","REDO"])},$ON_UNDO:function(){this.oApp.exec("DO_RECORD_UNDO_HISTORY",["KEYPRESS",false,false,1]);if(this.oCurStateIdx.nIdx!=0){if(this.oCurStateIdx.nStep>0)this.oCurStateIdx.nStep--;else{var a=this.aUndoHistory[this.oCurStateIdx.nIdx];this.oCurStateIdx.nIdx--;if(a.nTotalSteps>1)this.oCurStateIdx.nStep=0;else{a=this.aUndoHistory[this.oCurStateIdx.nIdx];this.oCurStateIdx.nStep=a.nTotalSteps-
|
||||
1}}this.oApp.exec("RESTORE_UNDO_HISTORY",[this.oCurStateIdx.nIdx,this.oCurStateIdx.nStep]);this.oApp.exec("CHECK_STYLE_CHANGE",[])}},$ON_REDO:function(){if(!(this.oCurStateIdx.nIdx>=this.aUndoHistory.length)){var a=this.aUndoHistory[this.oCurStateIdx.nIdx];if(!(this.oCurStateIdx.nIdx==this.aUndoHistory.length-1&&this.oCurStateIdx.nStep>=a.nTotalSteps-1)){if(this.oCurStateIdx.nStep<a.nTotalSteps-1)this.oCurStateIdx.nStep++;else{this.oCurStateIdx.nIdx++;a=this.aUndoHistory[this.oCurStateIdx.nIdx];this.oCurStateIdx.nStep=
|
||||
a.nTotalSteps-1}this.oApp.exec("RESTORE_UNDO_HISTORY",[this.oCurStateIdx.nIdx,this.oCurStateIdx.nStep]);this.oApp.exec("CHECK_STYLE_CHANGE",[])}}},$ON_RECORD_UNDO_ACTION:function(a){this.oApp.exec("DO_RECORD_UNDO_HISTORY",[a])},$ON_RECORD_UNDO_BEFORE_ACTION:function(a){this.oApp.exec("DO_RECORD_UNDO_HISTORY",[a,true,true])},$ON_RECORD_UNDO_AFTER_ACTION:function(a){this.oApp.exec("DO_RECORD_UNDO_HISTORY",[a,true,false])},$ON_RESTORE_UNDO_HISTORY:function(a,b){this.oCurStateIdx.nIdx=a;this.oCurStateIdx.nStep=
|
||||
b;var c=this.aUndoHistory[this.oCurStateIdx.nIdx],f=c.oBookmark[this.oCurStateIdx.nStep];this.oApp.setIR(c.sContent[this.oCurStateIdx.nStep],true);var e=this.oApp.getIR();this.bFF&&e==this.sBlankContentsForFF&&(e="");c.sContent[this.oCurStateIdx.nStep]=e;c=this.oApp.getEmptySelection();if(c.selectionLoaded){f?c.moveToXPathBookmark(f):c=this.oApp.getEmptySelection();c.select()}},$ON_DO_RECORD_UNDO_HISTORY:function(a,b,c,f){b=b||false;c=c||false;f=f||0;this.oCurStateIdx.nIdx!=this.aUndoHistory.length-
|
||||
1&&(f=1);var e=this.aUndoHistory[this.oCurStateIdx.nIdx],g=this.oApp.getIR(),h=e.sContent[this.oCurStateIdx.nStep];this.bFF&&g==this.sBlankContentsForFF&&(g="");if(!b)switch(f){case 0:if(Math.abs(h.length-g.length)<this.iMinimumSizeChange)return;break;case 1:if(h==g)return}h=this.oApp.getSelection();f=null;h.selectionLoaded&&(f=h.getXPathBookmark());h={nIdx:this.oCurStateIdx.nIdx,nStep:this.oCurStateIdx.nStep};h.nStep=b?c?0:1:0;if(h.nStep==0&&this.oCurStateIdx.nStep==e.nTotalSteps-1)h.nIdx=this.oCurStateIdx.nIdx+
|
||||
1;this.oApp.exec("DO_RECORD_UNDO_HISTORY_AT",[h,a,g,f])},$ON_DO_RECORD_UNDO_HISTORY_AT:function(a,b,c,f){if(a.nStep!=0){this.aUndoHistory[a.nIdx].nTotalSteps=a.nStep+1;this.aUndoHistory[a.nIdx].sContent[a.nStep]=c;this.aUndoHistory[a.nIdx].oBookmark[a.nStep]=f}else{b={sAction:b,nTotalSteps:1,sContent:[]};b.sContent[0]=c;b.oBookmark=[];b.oBookmark[0]=f;this.aUndoHistory.splice(a.nIdx,this.aUndoHistory.length-a.nIdx,b)}this.oCurStateIdx.nIdx=a.nIdx;this.oCurStateIdx.nStep=a.nStep},_getUndoHistory:function(){return this.aUndoHistory},
|
||||
_getUndoStateIdx:function(){return this.oCurStateIdx}});xe.XE_Hyperlink=c.Class({name:"XE_Hyperlink",sATagMarker:"HTTP://HUSKY_TMP.MARKER/",$init:function(a){this._assignHTMLObjects(a);this.sRXATagMarker=this.sATagMarker.replace(/\//g,"\\/").replace(/\./g,"\\.")},_assignHTMLObjects:function(a){this.oHyperlinkLayer=c("DIV.xpress_xeditor_hyperlink_layer",a).get(0);this.oLinkInput=c("INPUT[type=text]",this.oHyperlinkLayer).get(0);this.oBtnConfirm=c("BUTTON.confirm",this.oHyperlinkLayer).get(0);this.oBtnCancel=
|
||||
c("BUTTON.cancel",this.oHyperlinkLayer).get(0);this.oCbNewWin=c("INPUT[type=checkbox]",this.oHyperlinkLayer).get(0)},$ON_MSG_APP_READY:function(){this.oApp.exec("REGISTER_HOTKEY",["ctrl+k","XE_TOGGLE_HYPERLINK_LAYER",[]]);this.oApp.registerBrowserEvent(this.oBtnConfirm,"mousedown","XE_APPLY_HYPERLINK");this.oApp.registerBrowserEvent(this.oBtnCancel,"mousedown","HIDE_ACTIVE_LAYER");this.oApp.registerBrowserEvent(this.oLinkInput,"keydown","EVENT_XE_HYPERLINK_KEYDOWN");this.oApp.exec("REGISTER_UI_EVENT",
|
||||
["hyperlink","click","XE_TOGGLE_HYPERLINK_LAYER"])},$ON_XE_TOGGLE_HYPERLINK_LAYER:function(){this.oApp.delayedExec("TOGGLE_TOOLBAR_ACTIVE_LAYER",[this.oHyperlinkLayer,null,"XE_RESET_HYPERLINK_LAYER",[]],0)},$ON_XE_RESET_HYPERLINK_LAYER:function(){this.oApp.exec("FOCUS",[]);this.oSelection=this.oApp.getSelection();var a=this.oSelection.findAncestorByTagName("A");this.oCbNewWin.checked=false;if(a){this.oSelection.selectNode(a);this.oSelection.select();var b=a.target;if(b&&b=="_blank")this.oCbNewWin.checked=
|
||||
true;this.oLinkInput.value=a.href?a.href:"http://"}else this.oLinkInput.value="http://";this.oLinkInput.focus();this.oLinkInput.value=this.oLinkInput.value},$ON_XE_APPLY_HYPERLINK:function(){var a=this.oLinkInput.value,b=this.oCbNewWin.checked?"_blank":"";this.oApp.exec("FOCUS",[]);this.oSelection=this.oApp.getSelection();if(this.oSelection.collapsed)this.oSelection.pasteHTML("<a href='"+a+"' target="+b+">"+a+"</a>");else{var d=this.sATagMarker+Math.ceil(Math.random()*1E4);this.oApp.exec("EXECCOMMAND",
|
||||
a==""?["unlink"]:["createLink",false,d+a]);try{this.oSelection.setFromSelection()}catch(f){}a=this.oApp.getWYSIWYGDocument();c(a.body.getElementsByTagName("A")).filter('[href^="'+d+'"]').attr("href",function(){var a=RegExp("^"+d.replace(/([\.\\])/g,"\\$1"),"i");b?c(this).attr("target",b):c(this).removeAttr("target");return this.href.replace(a,"")})}this.oApp.exec("HIDE_ACTIVE_LAYER");setTimeout(c.fnBind(function(){try{this.oSelection.select()}catch(a){}},this),0)},_validateURL:function(a){return/^(http|https|ftp|mailto):(?:\/\/)?((\w|-)+(?:[\.:@](\w|-))+)(?:\/|@)?([^"\?]*?)(?:\?([^\?"]*?))?$/.test(a)},
|
||||
$ON_EVENT_XE_HYPERLINK_KEYDOWN:function(a){if(a.keyCode==13){this.oApp.exec("XE_APPLY_HYPERLINK");a.preventDefault();a.stopPropagation()}}});xe.XE_Table=c.Class({name:"XE_Table",iMinRows:1,iMaxRows:20,iMinColumns:1,iMaxColumns:10,iMinBorderWidth:1,iMaxBorderWidth:10,oSelection:null,$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){var b=null;this.elDropdownLayer=c("DIV.xpress_xeditor_table_layer",a).get(0);this.welDropdownLayer=c(this.elDropdownLayer);b=c("INPUT",this.elDropdownLayer).get();
|
||||
this.oRowInput=b[0];this.oColumnInput=b[1];this.oBorderWidthInput=b[2];this.oBorderColorInput=b[3];this.oBGColorInput=b[4];b=c("BUTTON",this.elDropdownLayer).get();this.oButton_AddRow=b[0];this.oButton_RemoveRow=b[1];this.oButton_AddColumn=b[2];this.oButton_RemoveColumn=b[3];this.oButton_IncBorderWidth=b[4];this.oButton_DecBorderWidth=b[5];this.oButton_BorderColorPreview=b[6];this.oButton_BorderColor=b[7];this.oButton_BGColorPreview=b[8];this.oButton_BGColor=b[9];this.oButton_Insert=b[10];this.oButton_Cancel=
|
||||
b[11];this.oSampleTable=c("TABLE",this.elDropdownLayer).get(0)},$ON_MSG_APP_READY:function(){this.oApp.exec("REGISTER_UI_EVENT",["table","click","ST_TOGGLE_TOOLBAR_LAYER"]);this.oApp.registerBrowserEvent(this.oRowInput,"change","ST_SET_ROW_NUM",[null,0]);this.oApp.registerBrowserEvent(this.oColumnInput,"change","ST_SET_COLUMN_NUM",[null,0]);this.oApp.registerBrowserEvent(this.oBorderWidthInput,"change","ST_SET_BORDER_WIDTH",[null,0]);this.oApp.registerBrowserEvent(this.oButton_AddRow,"click","ST_ADD_ROW");
|
||||
this.oApp.registerBrowserEvent(this.oButton_RemoveRow,"click","ST_REMOVE_ROW");this.oApp.registerBrowserEvent(this.oButton_AddColumn,"click","ST_ADD_COLUMN");this.oApp.registerBrowserEvent(this.oButton_RemoveColumn,"click","ST_REMOVE_COLUMN");this.oApp.registerBrowserEvent(this.oButton_IncBorderWidth,"click","ST_INC_BORDER_WIDTH");this.oApp.registerBrowserEvent(this.oButton_DecBorderWidth,"click","ST_DEC_BORDER_WIDTH");this.oApp.registerBrowserEvent(this.oButton_BorderColorPreview,"click","ST_TOGGLE_BORDER_COLOR_LAYER");
|
||||
this.oApp.registerBrowserEvent(this.oButton_BGColorPreview,"click","ST_TOGGLE_BGCOLOR_LAYER");this.oApp.registerBrowserEvent(this.oButton_BorderColor,"click","ST_TOGGLE_BORDER_COLOR_LAYER");this.oApp.registerBrowserEvent(this.oButton_BGColor,"click","ST_TOGGLE_BGCOLOR_LAYER");this.oApp.registerBrowserEvent(this.oButton_Insert,"click","ST_INSERT_TABLE");this.oApp.registerBrowserEvent(this.oButton_Cancel,"click","ST_CLOSE");this.oApp.exec("ST_SET_BORDER_COLOR",["#CCCCCC"]);this.oApp.exec("ST_SET_BGCOLOR",
|
||||
["#FFFFFF"])},$ON_ST_TOGGLE_TOOLBAR_LAYER:function(){this.oApp.exec("RECORD_UNDO_ACTION_FORCED",["KEYPRESS"]);this._showNewTable();this.oApp.exec("TOGGLE_TOOLBAR_ACTIVE_LAYER",[this.elDropdownLayer])},$ON_ST_ADD_ROW:function(){this.oApp.exec("ST_SET_ROW_NUM",[null,1])},$ON_ST_REMOVE_ROW:function(){this.oApp.exec("ST_SET_ROW_NUM",[null,-1])},$ON_ST_ADD_COLUMN:function(){this.oApp.exec("ST_SET_COLUMN_NUM",[null,1])},$ON_ST_REMOVE_COLUMN:function(){this.oApp.exec("ST_SET_COLUMN_NUM",[null,-1])},$ON_ST_SET_ROW_NUM:function(a,
|
||||
b){a=a||parseInt(this.oRowInput.value);a=a+(b||0);if(a<this.iMinRows)a=this.iMinRows;if(a>this.iMaxRows)a=this.iMaxRows;this.oRowInput.value=a;this._showNewTable()},$ON_ST_SET_COLUMN_NUM:function(a,b){a=a||parseInt(this.oColumnInput.value);a=a+(b||0);if(a<this.iMinColumns)a=this.iMinColumns;if(a>this.iMaxColumns)a=this.iMaxColumns;this.oColumnInput.value=a;this._showNewTable()},$ON_ST_INSERT_TABLE:function(){this.oApp.exec("PASTE_HTML",[this._getTableString()]);this.oApp.exec("ST_CLOSE",[])},$ON_ST_CLOSE:function(){this.oApp.exec("HIDE_ACTIVE_LAYER",
|
||||
[])},$ON_ST_SET_BORDER_WIDTH:function(a,b){a=a||parseInt(this.oBorderWidthInput.value);a=a+(b||0);if(a<this.iMinBorderWidth)a=this.iMinBorderWidth;if(a>this.iMaxBorderWidth)a=this.iMaxBorderWidth;this.oBorderWidthInput.value=a;this._showNewTable()},$ON_ST_INC_BORDER_WIDTH:function(){this.oApp.exec("ST_SET_BORDER_WIDTH",[null,1])},$ON_ST_DEC_BORDER_WIDTH:function(){this.oApp.exec("ST_SET_BORDER_WIDTH",[null,-1])},$ON_ST_TOGGLE_BORDER_COLOR_LAYER:function(){this.welDropdownLayer.hasClass("p1")?this.oApp.exec("ST_HIDE_BORDER_COLOR_LAYER",
|
||||
[]):this.oApp.exec("ST_SHOW_BORDER_COLOR_LAYER",[])},$ON_ST_SHOW_BORDER_COLOR_LAYER:function(){this.welDropdownLayer.addClass("p1");this.welDropdownLayer.removeClass("p2");this.oApp.exec("SHOW_COLOR_PALETTE",["ST_SET_BORDER_COLOR_FROM_PALETTE",this.elDropdownLayer])},$ON_ST_HIDE_BORDER_COLOR_LAYER:function(){this.welDropdownLayer.removeClass("p1");this.oApp.exec("HIDE_COLOR_PALETTE",[])},$ON_ST_TOGGLE_BGCOLOR_LAYER:function(){this.welDropdownLayer.hasClass("p2")?this.oApp.exec("ST_HIDE_BGCOLOR_LAYER",
|
||||
[]):this.oApp.exec("ST_SHOW_BGCOLOR_LAYER",[])},$ON_ST_SHOW_BGCOLOR_LAYER:function(){this.welDropdownLayer.removeClass("p1");this.welDropdownLayer.addClass("p2");this.oApp.exec("SHOW_COLOR_PALETTE",["ST_SET_BGCOLOR_FROM_PALETTE",this.elDropdownLayer])},$ON_ST_HIDE_BGCOLOR_LAYER:function(){this.welDropdownLayer.removeClass("p2");this.oApp.exec("HIDE_COLOR_PALETTE",[])},$ON_ST_SET_BORDER_COLOR_FROM_PALETTE:function(a){this.oApp.exec("ST_SET_BORDER_COLOR",[a]);this.oApp.exec("ST_HIDE_BORDER_COLOR_LAYER",
|
||||
[])},$ON_ST_SET_BORDER_COLOR:function(a){this.oBorderColorInput.value=a;this.oButton_BorderColorPreview.style.backgroundColor=a;this._showNewTable()},$ON_ST_SET_BGCOLOR_FROM_PALETTE:function(a){this.oApp.exec("ST_SET_BGCOLOR",[a]);this.oApp.exec("ST_HIDE_BGCOLOR_LAYER",[])},$ON_ST_SET_BGCOLOR:function(a){this.oBGColorInput.value=a;this.oButton_BGColorPreview.style.backgroundColor=a;this._showNewTable()},_showNewTable:function(){var a=document.createElement("DIV");a.innerHTML=this._getTableString();
|
||||
a=a.firstChild;this.oSampleTable.parentNode.insertBefore(a,this.oSampleTable);this.oSampleTable.parentNode.removeChild(this.oSampleTable);this.oSampleTable=a},_getTableString:function(){for(var a=this.oBorderColorInput.value,b=this.oBGColorInput.value,d=this.oBorderWidthInput.value,f="",f=c.browser.msie?"<td><p></p></td>":c.browser.firefox?"<td><p><br/></p></td>":"<td><p> </p></td>",b='<tr style="background:'+b+'">',e=this.oColumnInput.value,g=0;g<e;g++)b=b+f;b=b+"</tr>\n";f=this.oRowInput.value;
|
||||
a='<table style="background:'+a+'" cellspacing="'+d+'"><tbody>';for(g=0;g<f;g++)a=a+b;return a+"</tbody></table>"}});xe.XE_EditingModeToggler=c.Class({name:"XE_EditingModeToggler",$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){a=c.$(a)||document;this.elModeToggleButton=c("BUTTON.xpress_xeditor_mode_toggle_button",a).get(0);this.welModeToggleButton=c(this.elModeToggleButton)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elModeToggleButton,"click","EVENT_TOGGLE_EDITING_MODE",
|
||||
[])},$ON_EVENT_TOGGLE_EDITING_MODE:function(){this.oApp.getEditingMode()=="WYSIWYG"?this.oApp.exec("CHANGE_EDITING_MODE",["HTMLSrc"]):this.oApp.exec("CHANGE_EDITING_MODE",["WYSIWYG"])},$ON_CHANGE_EDITING_MODE:function(a){if(a=="HTMLSrc"){this.welModeToggleButton.addClass("active").parent("span").addClass("active");this.oApp.exec("DISABLE_ALL_UI",[])}else{this.welModeToggleButton.removeClass("active").parent("span").removeClass("active");this.oApp.exec("ENABLE_ALL_UI",[])}}});xe.XE_Editorresize=c.Class({name:"XE_Editorresize",
|
||||
$init:function(a,b){this.inputArea=c(".xpress_xeditor_editing_area_container",a).get(0);this.oVerticalResizer=c(".xpress_xeditor_editingArea_verticalResizer",a).get(0);this.oCheckBox=c("#editorresize",a).get(0);this.oIframe=b;var d=this;c(b).load(function(){d.oIframeBody=c(b).contents().find("body")})},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.oCheckBox,"change","XE_TOGGLE_EDITOR_RESIZE")},$ON_XE_TOGGLE_EDITOR_RESIZE:function(){if(this.oCheckBox.checked==true){if(this._prevHeight==
|
||||
void 0)this._prevHeight=this.inputArea.style.height;this.oVerticalResizer.style.display="none";this.oApp.registerBrowserEvent(this.oIframeBody,"keydown","XE_EDITOR_RESIZE");this.inputArea.style.height=this.oIframe.style.height=this.oIframeBody[0].scrollHeight+"px"}else{c(this.oIframeBody).unbind("keydown");this.oVerticalResizer.style.display="block";this.inputArea.style.height=this._prevHeight;this.oIframe.style.height=this._prevHeight}},$ON_XE_EDITOR_RESIZE:function(){this.inputArea.style.height=
|
||||
this.oIframe.style.height=this.oIframeBody[0].scrollHeight+"px"}});xe.XpressCore.oMessageMap={"XE_EditingAreaManager.onExit":"%uB0B4%uC6A9%uC774%20%uBCC0%uACBD%uB418%uC5C8%uC2B5%uB2C8%uB2E4.","XE_FontColor.invalidColorCode":"%uC0C9%uC0C1%20%uCF54%uB4DC%uB97C%20%uC62C%uBC14%uB974%uAC8C%20%uC785%uB825%uD558%uC5EC%20%uC8FC%uC2DC%uAE30%20%uBC14%uB78D%uB2C8%uB2E4.\n\n%uC608%29%20%23000000%2C%20%23FF0000%2C%20%23FFFFFF%2C%20%23ffffff%2C%20ffffff","XE_BGColor.invalidColorCode":"%uC0C9%uC0C1%20%uCF54%uB4DC%uB97C%20%uC62C%uBC14%uB974%uAC8C%20%uC785%uB825%uD558%uC5EC%20%uC8FC%uC2DC%uAE30%20%uBC14%uB78D%uB2C8%uB2E4.\n\n%uC608%29%20%23000000%2C%20%23FF0000%2C%20%23FFFFFF%2C%20%23ffffff%2C%20ffffff",
|
||||
"XE_Hyperlink.invalidURL":"%uC785%uB825%uD558%uC2E0%20URL%uC774%20%uC62C%uBC14%uB974%uC9C0%20%uC54A%uC2B5%uB2C8%uB2E4."};regex_handler=/<(.*?)\s+on[a-z]+\s*=(?:\s*".*?"|\s*'.*?'|[^\s>]+)(.*?)>/ig;regex_font_color=/color\s*=(?:\s*"(.*?)"|\s*'(.*?)'|([^\s>]+))/i;regex_font_face=/face\s*=(?:\s*"(.*?)"|\s*'(.*?)'|([^\s>]+))/i;regex_font_size=/size\s*=(?:\s*"(\d+)"|\s*'(\d+)'|(\d+))/i;regex_style=/style\s*=\s*(?:\s*"(.*?)"|\s*'(.*?)'|([^\s>]+))/i;regex_font_weight=/font-weight\s*:\s*([a-z]+);?/i;regex_font_style=
|
||||
/font-style\s*:\s*italic;?/i;regex_font_decoration=/text-decoration\s*:\s*([a-z -]+);?/i;regex_jquery=/jQuery\d+\s*=(\s*"\d+"|\d+)/ig;regex_quote_attr=/([\w-]+\s*=(?:\s*"[^"]+"|\s*'[^']+'))|([\w-]+)=([^\s]+)/g;var p="area br col embed hr img input param".split(" ");xe.XE_XHTMLFormatter=c.Class({name:"XE_XHTMLFormatter",$ON_MSG_APP_READY:function(){this.oApp.addConverter("WYSIWYG_TO_IR",this.TO_IR);this.oApp.addConverter("HTMLSrc_TO_IR",this.TO_IR);this.oApp.addConverter("IR_TO_HTMLSrc",this.IR_TO);
|
||||
this.oApp.addConverter("IR_TO_WYSIWYG",this.IR_TO)},TO_IR:function(a){var b=[];if(c.browser.msie){a=a.replace(regex_jquery,"");a=a.replace(/<(\w+) ([^>]+)>/g,function(a,b,c){return"<"+b+" "+c.replace(regex_quote_attr,function(a,b,c,d){return b?b:/^"/.test(d)||/"$/.test(d)?c+"="+d:c+'="'+(d||c)+'"'})+">"})}regex=/<(\/)?([:\w\/-]+)(.*?)>/ig;a=a.replace(regex,function(a,d,g,h){d=d||"";g=g.toLowerCase();h=c.trim(h||"");if(d){h=[];a="";if(c.inArray(g,p)>=0||!b.length)return"";do{a=b.pop();a.tag==g&&a.state!=
|
||||
"deleted"&&h.push("</"+a.tag+">")}while(b.length&&a.tag!=g);return h.join("")}if(c.inArray(g,p)>=0){a=h.length;g=="br"&&(h="");if(!h||h.substring(a-1,a)!="/")h=h+"/";return"<"+g+" "+c.trim(h)+">"}b.push({tag:g,state:""});return"<"+d+g+(h?" "+h:"")+">"});if(b.length){var d="";do{d=b.pop();d.state!="deleted"&&(a=a+("</"+d.tag+">"))}while(b.length)}regex=/<\/p>[ \t]*(\n)?/ig;return a=a.replace(regex,"</p>\n")},IR_TO:function(a){return a}});xe.XE_Extension=c.Class({name:"XE_Extension",seq:"",last_doc:"",
|
||||
$init:function(a,b){this.seq=b;this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elDropdownLayer=c("DIV.xpress_xeditor_extension_layer",a).get(0)},_removeAttrs:function(a){return a},_addEvent:function(){if(this.oApp.getEditingMode()=="WYSIWYG"){var a=this.oApp.getWYSIWYGDocument(),b=this.seq,d=function(){var a=c(this),d=a.attr("editor_component");if(d&&c.isFunction(openComponent)){editorPrevNode=a.get(0);openComponent(d,b)}};c(a).find("img,div[editor_component]").each(function(){var b=
|
||||
c(this);this.nodeName=="IMG"&&(!b.attr("editor_component")&&!b.attr("widget"))&&b.attr("editor_component","image_link");if(this.last_doc!=a){b.unbind("dblclick.widget").bind("dblclick.widget",d);this.last_doc=a}})}},$ON_MSG_APP_READY:function(){var a=this.oApp;a.exec("REGISTER_UI_EVENT",["extension","click","TOGGLE_EXTENSION_LAYER"]);var b=function(){a.exec("HIDE_ACTIVE_LAYER",[])};c("a",this.elDropdownLayer).each(function(){var a=c(this);if(!a.attr("component_onclick_event_added")){a.click(b);a.attr("component_onclick_event_added",
|
||||
"Y")}})},$ON_TOGGLE_EXTENSION_LAYER:function(){this.oApp.exec("TOGGLE_TOOLBAR_ACTIVE_LAYER",[this.elDropdownLayer])},$ON_CHANGE_EDITING_MODE:function(){var a=this;setTimeout(function(){a._addEvent()},100)},$ON_PASTE_HTML:function(){var a=this;setTimeout(function(){a._addEvent()},100)},$ON_LOAD_IR_FIELD:function(){var a=this;setTimeout(function(){a._addEvent()},100)},$ON_SET_IR:function(){var a=this;setTimeout(function(){a._addEvent()},100)}});xe.XE_AutoSave=c.Class({name:"XE_AutoSave",form:null,textarea:null,
|
||||
$init:function(a,b){this.form=a.form;this.textarea=a;this._assignHTMLObjects(b)},_assignHTMLObjects:function(){this.welMessageBox=c("autosave_message")},$ON_MSG_APP_READY:function(){var a=c(this.form._saved_doc_title),b=c(this.form._saved_doc_content),a=c.trim(a.val()),b=c.trim(b.val());if(a||b)if(confirm(this.form._saved_doc_message.value)){c(this.form.title).val(a);this.oApp.setIR(b);typeof editorGetAutoSavedDoc=="function"&&editorGetAutoSavedDoc(this.form)}else editorRemoveSavedDoc();editorEnableAutoSave(this.form,
|
||||
c(this.form).attr("editor_sequence"));this.oApp.exec("REGISTER_HOTKEY",["ctrl+shift+s","AUTO_SAVE"])},$ON_AUTO_SAVE:function(){_editorAutoSave()}});xe.XE_FormatWithSelectUI=c.Class({name:"XE_FormatWithSelectUI",$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elFormatSelect=c("SELECT.xpress_xeditor_ui_format_select",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elFormatSelect,"change","SET_FORMAT_FROM_SELECT_UI");this.elFormatSelect.selectedIndex=
|
||||
0},$ON_MSG_STYLE_CHANGED:function(){var a=this.oApp.getWYSIWYGDocument().queryCommandValue("FormatBlock");if(!a)return this.elFormatSelect.selectedIndex=0;c.browser.msie&&/([0-9])/.test(a)&&(a="h"+RegExp.$1);this.elFormatSelect.value=a.toLowerCase();if(this.elFormatSelect.selectedIndex<0)this.elFormatSelect.selectedIndex=0;if(this.elFormatSelect.value!=a.toLowerCase())this.elFormatSelect.selectedIndex=0},$ON_SET_FORMAT_FROM_SELECT_UI:function(){var a=this.elFormatSelect.value;if(a){c.browser.msie&&
|
||||
(a="<"+a+">");this.oApp.exec("EXECCOMMAND",["FormatBlock",false,a]);this.oApp.exec("CHECK_STYLE_CHANGE",[])}}});xe.XE_Table=c.Class({_startSel:null,_endSel:null,$ON_MSG_APP_READY:function(){this._doc=c(this.oApp.getWYSIWYGDocument());this.$FnMouseDown=c.fnBind(this._mousedown,this);this.$FnMouseUp=c.fnBind(this._mouseup,this);this.$FnMouseMove=c.fnBind(this._mousemove,this);this._doc.mousedown(this.$FnMouseDown);this._endSel=this._startSel=null;this.oApp.exec("REGISTER_UI_EVENT",["merge_cells","click",
|
||||
"MERGE_CELLS"]);this.oApp.exec("REGISTER_UI_EVENT",["split_col","click","CELL_SPLIT_BY_COL"]);this.oApp.exec("REGISTER_UI_EVENT",["split_row","click","CELL_SPLIT_BY_ROW"]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+alt+m","MERGE_CELLS"]);this.$super.$ON_MSG_APP_READY()},$ON_MERGE_CELLS:function(){var a="",b=c(".xe_selected_cell",this.oApp.getWYSIWYGDocument()).filter("td,th"),d=this;if(b.length){this.oApp.exec("RECORD_UNDO_ACTION",["Cell:Merge"]);b.each(function(){a=a+c(this).html()}).eq(0).html(a);
|
||||
var f=0;b.eq(0).nextAll("td,th").andSelf().filter(".xe_selected_cell").each(function(){f=f+d._getSpan(this,"col")});this._getRect(b.eq(0));var e=b.eq(0).parent("tr"),g=b.eq(b.length-1).parent("tr"),h=b.parents("table").eq(0).find("tr"),e=h.index(g.get(0))-h.index(e.get(0))+this._getSpan(b.eq(b.length-1),"row");b.eq(0).attr("colSpan",f).attr("rowSpan",e);b.slice(1).remove()}},$ON_CELL_SPLIT_BY_ROW:function(){var a=c(".xe_selected_cell",this.oApp.getWYSIWYGDocument()).filter("td,th"),b=a.parents("table").eq(0),
|
||||
d=this;if(a.length){this.oApp.exec("RECORD_UNDO_ACTION",["Cell:Split By Row"]);var f=this._getRect(a.eq(0)).top,e=this._getRect(a.eq(a.length-1)).bottom;(a=b.find("td,th").filter(function(){var a=d._getRect(c(this));return!(a.bottom<=f||a.top>=e)})).filter(".xe_selected_cell").each(function(){var b=c(this),e=b.parent("tr"),f=d._getSpan(b,"row"),j=d._getRect(b),n=[],m=b.clone().html("<br />"),l=1,o=1;if(f>1){l=Math.ceil(f/2);o=f-l;n.push(function(){b.attr("rowSpan",l)});m.attr("rowSpan",o)}else{a.filter(function(){if(b.get(0)==
|
||||
this)return false;var a=c(this),a=d._getRect(a);return a.bottom<=j.top||a.top>=j.bottom?false:true}).each(function(){var a=c(this),b=d._getSpan(a,"row")+1;n.push(function(){a.attr("rowSpan",b)})});c.browser.msie?e.after(e.clone().empty().get(0).outerHTML):e.after(e.clone().empty())}f=e.nextAll("tr");if(f.length){e=f.eq(l-1).children("td,th").filter(function(){return d._getRect(c(this)).left>j.left});c.browser.msie?e.length?e.eq(0).before(m.get(0).outerHTML):f.eq(l-1).append(m.get(0).outerHTML):e.length?
|
||||
e.slice(0,1).before(m):f.slice(l-1,1).append(m)}else e.after(e.clone().empty().append(m));c.each(n,function(){this()})})}},$ON_CELL_SPLIT_BY_COL:function(){var a=c(".xe_selected_cell",this.oApp.getWYSIWYGDocument()).filter("td,th"),b=a.parents("table").slice(0,1),d=this;(new Date).getTime();if(a.length){this.oApp.exec("RECORD_UNDO_ACTION",["Cell:Split By Column"]);var f=a.eq(0).parent("tr"),e=this._getRect(f.find(".xe_selected_cell:first")).left,g=this._getRect(f.find(".xe_selected_cell:last")).right;
|
||||
(a=b.find("td,th").filter(function(){var a=d._getRect(c(this));return!(a.right<=e||a.left>=g)})).filter(".xe_selected_cell").each(function(){var b=c(this),e=d._getSpan(b,"col"),f=b.clone().html("<br />");if(e>1){var g=Math.ceil(e/2),e=e-g;b.attr("colSpan",g);f.attr("colSpan",e)}else{var m=d._getRect(b);a.filter(function(){if(b.get(0)==this)return false;var a=c(this),a=d._getRect(a);return a.right<=m.left||a.left>=m.right?false:true}).each(function(){var a=c(this);a.attr("colSpan",d._getSpan(a,"col")+
|
||||
1)});f.attr("colSpan",1)}c.browser.msie?b.after(f.get(0).outerHTML):b.after(f)})}},$ON_CHECK_STYLE_CHANGE:function(){var a=this.oApp,b=this._startSel&&this._startSel.is(".xe_selected_cell")?"ENABLE_UI":"DISABLE_UI";c.each(["merge_cells","split_col","split_row"],function(){a.exec(b,[this])})},_mousedown:function(a){function b(){d=f.getSelection().cloneRange();d.collapseToStart();d=c(d.startContainer).parents().andSelf().filter("td,th").eq(0);if(!d.length)return e._removeAllListener()||true;e._getRect(e._startSel=
|
||||
d);e._doc.bind("mousemove",e.$FnMouseMove);e._doc.bind("mouseup",e.$FnMouseUp)}var d=c(a.target).parents().andSelf().filter("td,th,table"),f=this.oApp,e=this;c("td.xe_selected_cell",this.oApp.getWYSIWYGDocument()).removeClass("xe_selected_cell");this._endSel=this._startSel=null;d.length&&this._isLeftClicked(a.button)&&setTimeout(b,0)},_mouseup:function(){this._removeAllListener();this._startSel=this._endSel=null},_mousemove:function(a){var b=c(a.target).parents().andSelf().filter("td,th").eq(0),d=
|
||||
this;if(b.length&&this._isLeftClicked(a.button)&&(this._endSel||b.get(0)!=this._startSel.get(0))&&!(this._endSel&&b.get(0)==this._endSel.get(0))){this._getRect(this._endSel=b);var f=Math.min(this._startSel.rect.top,this._endSel.rect.top),e=Math.min(this._startSel.rect.left,this._endSel.rect.left),g=Math.max(this._startSel.rect.bottom,this._endSel.rect.bottom),h=Math.max(this._startSel.rect.right,this._endSel.rect.right),a=b.parents("table").find("td,th").removeClass("xe_selected_cell"),b=c();do{b.each(function(){var a=
|
||||
d._getRect(c(this));if(a.right>h)h=a.right;if(a.left<e)e=a.left;if(a.top<f)f=a.top;if(a.bottom>g)g=a.bottom});a=a.filter(":not(.xe_selected_cell)");b=a.filter(function(){var a=d._getRect(c(this));return a.right<=e||a.left>=h||a.bottom<=f||a.top>=g?false:true}).addClass("xe_selected_cell")}while(b.length);c.browser.mozilla||setTimeout(function(){var a=d.oApp.getSelection();if(d._startSel){d._startSel.get(0).firstChild||d._startSel.text(" ");a.selectNode(d._startSel.get(0).firstChild);a.collapseToStart();
|
||||
a.select()}},0);return false}},_removeAllListener:function(){this._doc.unbind("mousemove",this.$FnMouseMove);this._doc.unbind("mouseup",this.$FnMouseUp)},_isLeftClicked:function(a){return c.browser.msie?!!(a&1):a==0},_getRect:function(a){var b=a.get(0);a.rect={};a.rect.top=b.offsetTop;a.rect.left=b.offsetLeft;a.rect.bottom=a.rect.top+b.offsetHeight;a.rect.right=a.rect.left+b.offsetWidth;return a.rect},_getSpan:function(a,b){var d=parseInt(c(a).attr(b+"span"));return isNaN(d)?1:d}}).extend(xe.XE_Table);
|
||||
c(".input_auto>input").change(function(){setTimeout(function(){c(".input_control").is(":hidden")?c(".input_auto").addClass("line"):c(".input_auto").removeClass("line")},1)})})(jQuery);window.xe||(xe={});xe.Editors=[];
|
||||
function editorStart_xe(c,o,l,p,a,b,d,f){function e(){try{var a=n.contentWindow.document;if("about:blank"==a.location)throw"blank";a.body.innerHTML=a.body.innerHTML.trim();j.registerPlugin(new xe.XE_EditingArea_WYSIWYG(n));j.registerPlugin(new xe.XpressRangeManager(n));j.registerPlugin(new xe.XE_ExecCommand(n));d&&!a.body.style.fontFamily&&(a.body.style.fontFamily=d);f&&!a.body.style.fontSize&&(a.body.style.fontSize=f);j.run()}catch(b){setTimeout(e,0)}}"undefined"==typeof a&&(a="white");"undefined"==
|
||||
typeof b&&(b="xeStyle");"undefined"==typeof d&&(d="");"undefined"==typeof f&&(f="");var g=request_uri+"modules/editor/styles/"+b+"/editor.html",b=jQuery("#xpress-editor-"+c),g=jQuery('<iframe id="editor_iframe_'+c+'" allowTransparency="true" frameborder="0" src="'+g+'" scrolling="yes" style="width:100%;height:'+p+'px"></iframe>'),h=jQuery('<textarea rows="8" cols="42" class="input_syntax '+a+'" style="display:none"></textarea>'),a=b.get(0).form;a.setAttribute("editor_sequence",c);b.css("display",
|
||||
"none");var k="";0<jQuery("input[name=content]",a).size()&&(k=jQuery("input[name=content]",a).val().replace(/src=\"files\/attach/g,'src="'+request_uri+"files/attach"),jQuery("#xpress-editor-"+c).val(k));b.hide().css("width","100%").before(g).after(h);var j=new xe.XpressCore,n=g.get(0),b=b.get(0),g=h.get(0),h=jQuery(".xpress-editor",a).get(0);j.getFrame=function(){return n};j.getContent=function(){editorGetContentTextarea_xe(c)};k=a[l].value;xFF&&!k&&(k="<br />");k=editorReplacePath(k);a[l].value=
|
||||
k;jQuery("#xpress-editor-"+c).val(k);editorRelKeys[c]=[];editorRelKeys[c].primary=a[o];editorRelKeys[c].content=a[l];editorRelKeys[c].func=editorGetContentTextarea_xe;editorRelKeys[c].editor=j;editorRelKeys[c].pasteHTML=function(a){j.exec("PASTE_HTML",[a])};xe.Editors[c]=j;j.registerPlugin(new xe.CorePlugin(null));j.registerPlugin(new xe.XE_PreservTemplate(jQuery("#xpress-editor-"+c).val()));j.registerPlugin(new xe.StringConverterManager);j.registerPlugin(new xe.XE_EditingAreaManager("WYSIWYG",b,
|
||||
{nHeight:parseInt(p),nMinHeight:100},null,h));j.registerPlugin(new xe.XE_EditingArea_HTMLSrc(g));j.registerPlugin(new xe.XE_EditingAreaVerticalResizer(h));j.registerPlugin(new xe.Utils);j.registerPlugin(new xe.DialogLayerManager);j.registerPlugin(new xe.ActiveLayerManager);j.registerPlugin(new xe.Hotkey);j.registerPlugin(new xe.XE_WYSIWYGStyler);j.registerPlugin(new xe.XE_WYSIWYGStyleGetter);j.registerPlugin(new xe.MessageManager(xe.XpressCore.oMessageMap));j.registerPlugin(new xe.XE_Toolbar(h));
|
||||
"EVENT_SCHARACTER_CLICKED",[]);this.oApp.exec("REGISTER_UI_EVENT",["sCharacter","click","TOGGLE_SCHARACTER_LAYER"])},$ON_TOGGLE_SCHARACTER_LAYER:function(){this.oTextField.value="";this.oSelection=this.oApp.getSelection();this.oApp.exec("TOGGLE_TOOLBAR_ACTIVE_LAYER",[this.elDropdownLayer])},$ON_EVENT_SCHARACTER_CLICKED:function(a){a=a.target;"BUTTON"==a.tagName&&"LI"==a.parentNode.tagName&&this.oApp.exec("SELECT_SCHARACTER",[a.firstChild.innerHTML])},$ON_SELECT_SCHARACTER:function(a){this.oTextField.value+=
|
||||
a;this.oTextField.createTextRange?(a=this.oTextField.createTextRange(),a.collapse(!1),a.select()):this.oTextField.selectionEnd&&(this.oTextField.selectionEnd=this.oTextField.value.length,this.oTextField.focus())},$ON_INSERT_SCHARACTERS:function(){this.oSelection.pasteHTML(this.oTextField.value);this.oApp.exec("HIDE_ACTIVE_LAYER",[])},$ON_CHANGE_SCHARACTER_SET:function(a){for(var b=0;b<this.aSCharList.length;b++)if("block"==this.aSCharList[b].style.display){if(b==a)return;c(this.aLabelA[b]).removeClass("on");
|
||||
this.aSCharList[b].style.display="none"}this._drawSCharList(a);c(this.aLabelA[a]).addClass("on");this.aSCharList[a].style.display="block"},$ON_SET_SCHARACTER_LIST:function(a){this.charSet=a;this.bSCharSetDrawn=Array(this.charSet.length);this._drawSCharList(0)},_drawSCharList:function(a){if(!this.bSCharSetDrawn[a]){this.bSCharSetDrawn[a]=!0;var b=this.charSet[a].length,c=Array(b);this.aSCharList[a].innerHTML="";for(var f=0;f<b;f++)c[f]=document.createElement("LI"),c[f].innerHTML='<button type="button"><span>'+
|
||||
unescape(this.charSet[a][f])+"</span></button>",this.aSCharList[a].appendChild(c[f])}},_stopBrowserEvent:function(a,b){c(a).bind(b,function(a){a.stopPropagation();a.preventDefault()})}});xe.XE_UndoRedo=c.Class({name:"XE_UndoRedo",actionHistory:null,oCurStateIdx:null,iMinimumSizeChange:10,sBlankContentsForFF:"<br>",$init:function(){this.aUndoHistory=[];this.oCurStateIdx={nIdx:0,nStep:0}},$PRECONDITION:function(a){if(a.match(/_DO_RECORD_UNDO_HISTORY_AT$/))return!0;try{if("WYSIWYG"!=this.oApp.getEditingMode())return!1}catch(b){return!1}return!0},
|
||||
$BEFORE_MSG_APP_READY:function(){this.oApp.exec("DO_RECORD_UNDO_HISTORY_AT",[this.oCurStateIdx,"","",null])},$ON_MSG_APP_READY:function(){this.bFF=c.browser.mozilla;this.oApp.exec("ADD_APP_PROPERTY",["getUndoHistory",c.fnBind(this.getUndoHistory,this)]);this.oApp.exec("ADD_APP_PROPERTY",["getUndoStateIdx",c.fnBind(this.getUndoStateIdx,this)]);this.oApp.exec("REGISTER_UI_EVENT",["undo","click","UNDO"]);this.oApp.exec("REGISTER_UI_EVENT",["redo","click","REDO"]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+z",
|
||||
"UNDO"]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+y","REDO"])},$ON_UNDO:function(){this.oApp.exec("DO_RECORD_UNDO_HISTORY",["KEYPRESS",!1,!1,1]);if(0!=this.oCurStateIdx.nIdx){if(0<this.oCurStateIdx.nStep)this.oCurStateIdx.nStep--;else{var a=this.aUndoHistory[this.oCurStateIdx.nIdx];this.oCurStateIdx.nIdx--;1<a.nTotalSteps?this.oCurStateIdx.nStep=0:(a=this.aUndoHistory[this.oCurStateIdx.nIdx],this.oCurStateIdx.nStep=a.nTotalSteps-1)}this.oApp.exec("RESTORE_UNDO_HISTORY",[this.oCurStateIdx.nIdx,this.oCurStateIdx.nStep]);
|
||||
this.oApp.exec("CHECK_STYLE_CHANGE",[])}},$ON_REDO:function(){if(!(this.oCurStateIdx.nIdx>=this.aUndoHistory.length)){var a=this.aUndoHistory[this.oCurStateIdx.nIdx];this.oCurStateIdx.nIdx==this.aUndoHistory.length-1&&this.oCurStateIdx.nStep>=a.nTotalSteps-1||(this.oCurStateIdx.nStep<a.nTotalSteps-1?this.oCurStateIdx.nStep++:(this.oCurStateIdx.nIdx++,a=this.aUndoHistory[this.oCurStateIdx.nIdx],this.oCurStateIdx.nStep=a.nTotalSteps-1),this.oApp.exec("RESTORE_UNDO_HISTORY",[this.oCurStateIdx.nIdx,this.oCurStateIdx.nStep]),
|
||||
this.oApp.exec("CHECK_STYLE_CHANGE",[]))}},$ON_RECORD_UNDO_ACTION:function(a){this.oApp.exec("DO_RECORD_UNDO_HISTORY",[a])},$ON_RECORD_UNDO_BEFORE_ACTION:function(a){this.oApp.exec("DO_RECORD_UNDO_HISTORY",[a,!0,!0])},$ON_RECORD_UNDO_AFTER_ACTION:function(a){this.oApp.exec("DO_RECORD_UNDO_HISTORY",[a,!0,!1])},$ON_RESTORE_UNDO_HISTORY:function(a,b){this.oCurStateIdx.nIdx=a;this.oCurStateIdx.nStep=b;var c=this.aUndoHistory[this.oCurStateIdx.nIdx],f=c.oBookmark[this.oCurStateIdx.nStep];this.oApp.setIR(c.sContent[this.oCurStateIdx.nStep],
|
||||
!0);var e=this.oApp.getIR();this.bFF&&e==this.sBlankContentsForFF&&(e="");c.sContent[this.oCurStateIdx.nStep]=e;c=this.oApp.getEmptySelection();c.selectionLoaded&&(f?c.moveToXPathBookmark(f):c=this.oApp.getEmptySelection(),c.select())},$ON_DO_RECORD_UNDO_HISTORY:function(a,b,c,f){b=b||!1;c=c||!1;f=f||0;this.oCurStateIdx.nIdx!=this.aUndoHistory.length-1&&(f=1);var e=this.aUndoHistory[this.oCurStateIdx.nIdx],g=this.oApp.getIR(),h=e.sContent[this.oCurStateIdx.nStep];this.bFF&&g==this.sBlankContentsForFF&&
|
||||
(g="");if(!b)switch(f){case 0:if(Math.abs(h.length-g.length)<this.iMinimumSizeChange)return;break;case 1:if(h==g)return}h=this.oApp.getSelection();f=null;h.selectionLoaded&&(f=h.getXPathBookmark());h={nIdx:this.oCurStateIdx.nIdx,nStep:this.oCurStateIdx.nStep};h.nStep=b?c?0:1:0;0==h.nStep&&this.oCurStateIdx.nStep==e.nTotalSteps-1&&(h.nIdx=this.oCurStateIdx.nIdx+1);this.oApp.exec("DO_RECORD_UNDO_HISTORY_AT",[h,a,g,f])},$ON_DO_RECORD_UNDO_HISTORY_AT:function(a,b,c,f){0!=a.nStep?(this.aUndoHistory[a.nIdx].nTotalSteps=
|
||||
a.nStep+1,this.aUndoHistory[a.nIdx].sContent[a.nStep]=c,this.aUndoHistory[a.nIdx].oBookmark[a.nStep]=f):(b={sAction:b,nTotalSteps:1,sContent:[]},b.sContent[0]=c,b.oBookmark=[],b.oBookmark[0]=f,this.aUndoHistory.splice(a.nIdx,this.aUndoHistory.length-a.nIdx,b));this.oCurStateIdx.nIdx=a.nIdx;this.oCurStateIdx.nStep=a.nStep},_getUndoHistory:function(){return this.aUndoHistory},_getUndoStateIdx:function(){return this.oCurStateIdx}});xe.XE_Hyperlink=c.Class({name:"XE_Hyperlink",sATagMarker:"HTTP://HUSKY_TMP.MARKER/",
|
||||
$init:function(a){this._assignHTMLObjects(a);this.sRXATagMarker=this.sATagMarker.replace(/\//g,"\\/").replace(/\./g,"\\.")},_assignHTMLObjects:function(a){this.oHyperlinkLayer=c("DIV.xpress_xeditor_hyperlink_layer",a).get(0);this.oLinkInput=c("INPUT[type=text]",this.oHyperlinkLayer).get(0);this.oBtnConfirm=c("BUTTON.confirm",this.oHyperlinkLayer).get(0);this.oBtnCancel=c("BUTTON.cancel",this.oHyperlinkLayer).get(0);this.oCbNewWin=c("INPUT[type=checkbox]",this.oHyperlinkLayer).get(0)},$ON_MSG_APP_READY:function(){this.oApp.exec("REGISTER_HOTKEY",
|
||||
["ctrl+k","XE_TOGGLE_HYPERLINK_LAYER",[]]);this.oApp.registerBrowserEvent(this.oBtnConfirm,"mousedown","XE_APPLY_HYPERLINK");this.oApp.registerBrowserEvent(this.oBtnCancel,"mousedown","HIDE_ACTIVE_LAYER");this.oApp.registerBrowserEvent(this.oLinkInput,"keydown","EVENT_XE_HYPERLINK_KEYDOWN");this.oApp.exec("REGISTER_UI_EVENT",["hyperlink","click","XE_TOGGLE_HYPERLINK_LAYER"])},$ON_XE_TOGGLE_HYPERLINK_LAYER:function(){this.oApp.delayedExec("TOGGLE_TOOLBAR_ACTIVE_LAYER",[this.oHyperlinkLayer,null,"XE_RESET_HYPERLINK_LAYER",
|
||||
[]],0)},$ON_XE_RESET_HYPERLINK_LAYER:function(){this.oApp.exec("FOCUS",[]);this.oSelection=this.oApp.getSelection();var a=this.oSelection.findAncestorByTagName("A");this.oCbNewWin.checked=!1;if(a){this.oSelection.selectNode(a);this.oSelection.select();var b=a.target;b&&"_blank"==b&&(this.oCbNewWin.checked=!0);this.oLinkInput.value=a.href?a.href:"http://"}else this.oLinkInput.value="http://";this.oLinkInput.focus();this.oLinkInput.value=this.oLinkInput.value},$ON_XE_APPLY_HYPERLINK:function(){var a=
|
||||
this.oLinkInput.value,b=this.oCbNewWin.checked?"_blank":"";this.oApp.exec("FOCUS",[]);this.oSelection=this.oApp.getSelection();if(this.oSelection.collapsed)this.oSelection.pasteHTML("<a href='"+a+"' target="+b+">"+a+"</a>");else{var d=Math.ceil(1E4*Math.random()),f=this.sATagMarker+d;this.oApp.exec("EXECCOMMAND",""==a?["unlink"]:["createLink",!1,f+a]);try{this.oSelection.setFromSelection()}catch(e){}a=this.oApp.getWYSIWYGDocument();c(a.body.getElementsByTagName("A")).filter('[href^="'+f+'"]').attr("href",
|
||||
function(){var a=RegExp("^"+f.replace(/([\.\\])/g,"\\$1"),"i");b?c(this).attr("target",b):c(this).removeAttr("target");return this.href.replace(a,"")})}this.oApp.exec("HIDE_ACTIVE_LAYER");setTimeout(c.fnBind(function(){try{this.oSelection.select()}catch(a){}},this),0)},_validateURL:function(a){return/^(http|https|ftp|mailto):(?:\/\/)?((\w|-)+(?:[\.:@](\w|-))+)(?:\/|@)?([^"\?]*?)(?:\?([^\?"]*?))?$/.test(a)},$ON_EVENT_XE_HYPERLINK_KEYDOWN:function(a){13==a.keyCode&&(this.oApp.exec("XE_APPLY_HYPERLINK"),
|
||||
a.preventDefault(),a.stopPropagation())}});xe.XE_Table=c.Class({name:"XE_Table",iMinRows:1,iMaxRows:20,iMinColumns:1,iMaxColumns:10,iMinBorderWidth:1,iMaxBorderWidth:10,oSelection:null,$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){var b=null;this.elDropdownLayer=c("DIV.xpress_xeditor_table_layer",a).get(0);this.welDropdownLayer=c(this.elDropdownLayer);b=c("INPUT",this.elDropdownLayer).get();this.oRowInput=b[0];this.oColumnInput=b[1];this.oBorderWidthInput=b[2];this.oBorderColorInput=
|
||||
b[3];this.oBGColorInput=b[4];b=c("BUTTON",this.elDropdownLayer).get();this.oButton_AddRow=b[0];this.oButton_RemoveRow=b[1];this.oButton_AddColumn=b[2];this.oButton_RemoveColumn=b[3];this.oButton_IncBorderWidth=b[4];this.oButton_DecBorderWidth=b[5];this.oButton_BorderColorPreview=b[6];this.oButton_BorderColor=b[7];this.oButton_BGColorPreview=b[8];this.oButton_BGColor=b[9];this.oButton_Insert=b[10];this.oButton_Cancel=b[11];this.oSampleTable=c("TABLE",this.elDropdownLayer).get(0)},$ON_MSG_APP_READY:function(){this.oApp.exec("REGISTER_UI_EVENT",
|
||||
["table","click","ST_TOGGLE_TOOLBAR_LAYER"]);this.oApp.registerBrowserEvent(this.oRowInput,"change","ST_SET_ROW_NUM",[null,0]);this.oApp.registerBrowserEvent(this.oColumnInput,"change","ST_SET_COLUMN_NUM",[null,0]);this.oApp.registerBrowserEvent(this.oBorderWidthInput,"change","ST_SET_BORDER_WIDTH",[null,0]);this.oApp.registerBrowserEvent(this.oButton_AddRow,"click","ST_ADD_ROW");this.oApp.registerBrowserEvent(this.oButton_RemoveRow,"click","ST_REMOVE_ROW");this.oApp.registerBrowserEvent(this.oButton_AddColumn,
|
||||
"click","ST_ADD_COLUMN");this.oApp.registerBrowserEvent(this.oButton_RemoveColumn,"click","ST_REMOVE_COLUMN");this.oApp.registerBrowserEvent(this.oButton_IncBorderWidth,"click","ST_INC_BORDER_WIDTH");this.oApp.registerBrowserEvent(this.oButton_DecBorderWidth,"click","ST_DEC_BORDER_WIDTH");this.oApp.registerBrowserEvent(this.oButton_BorderColorPreview,"click","ST_TOGGLE_BORDER_COLOR_LAYER");this.oApp.registerBrowserEvent(this.oButton_BGColorPreview,"click","ST_TOGGLE_BGCOLOR_LAYER");this.oApp.registerBrowserEvent(this.oButton_BorderColor,
|
||||
"click","ST_TOGGLE_BORDER_COLOR_LAYER");this.oApp.registerBrowserEvent(this.oButton_BGColor,"click","ST_TOGGLE_BGCOLOR_LAYER");this.oApp.registerBrowserEvent(this.oButton_Insert,"click","ST_INSERT_TABLE");this.oApp.registerBrowserEvent(this.oButton_Cancel,"click","ST_CLOSE");this.oApp.exec("ST_SET_BORDER_COLOR",["#CCCCCC"]);this.oApp.exec("ST_SET_BGCOLOR",["#FFFFFF"])},$ON_ST_TOGGLE_TOOLBAR_LAYER:function(){this.oApp.exec("RECORD_UNDO_ACTION_FORCED",["KEYPRESS"]);this._showNewTable();this.oApp.exec("TOGGLE_TOOLBAR_ACTIVE_LAYER",
|
||||
[this.elDropdownLayer])},$ON_ST_ADD_ROW:function(){this.oApp.exec("ST_SET_ROW_NUM",[null,1])},$ON_ST_REMOVE_ROW:function(){this.oApp.exec("ST_SET_ROW_NUM",[null,-1])},$ON_ST_ADD_COLUMN:function(){this.oApp.exec("ST_SET_COLUMN_NUM",[null,1])},$ON_ST_REMOVE_COLUMN:function(){this.oApp.exec("ST_SET_COLUMN_NUM",[null,-1])},$ON_ST_SET_ROW_NUM:function(a,b){a=a||parseInt(this.oRowInput.value);a+=b||0;a<this.iMinRows&&(a=this.iMinRows);a>this.iMaxRows&&(a=this.iMaxRows);this.oRowInput.value=a;this._showNewTable()},
|
||||
$ON_ST_SET_COLUMN_NUM:function(a,b){a=a||parseInt(this.oColumnInput.value);a+=b||0;a<this.iMinColumns&&(a=this.iMinColumns);a>this.iMaxColumns&&(a=this.iMaxColumns);this.oColumnInput.value=a;this._showNewTable()},$ON_ST_INSERT_TABLE:function(){var a=this._getTableString();this.oApp.exec("PASTE_HTML",[a]);this.oApp.exec("ST_CLOSE",[])},$ON_ST_CLOSE:function(){this.oApp.exec("HIDE_ACTIVE_LAYER",[])},$ON_ST_SET_BORDER_WIDTH:function(a,b){a=a||parseInt(this.oBorderWidthInput.value);a+=b||0;a<this.iMinBorderWidth&&
|
||||
(a=this.iMinBorderWidth);a>this.iMaxBorderWidth&&(a=this.iMaxBorderWidth);this.oBorderWidthInput.value=a;this._showNewTable()},$ON_ST_INC_BORDER_WIDTH:function(){this.oApp.exec("ST_SET_BORDER_WIDTH",[null,1])},$ON_ST_DEC_BORDER_WIDTH:function(){this.oApp.exec("ST_SET_BORDER_WIDTH",[null,-1])},$ON_ST_TOGGLE_BORDER_COLOR_LAYER:function(){this.welDropdownLayer.hasClass("p1")?this.oApp.exec("ST_HIDE_BORDER_COLOR_LAYER",[]):this.oApp.exec("ST_SHOW_BORDER_COLOR_LAYER",[])},$ON_ST_SHOW_BORDER_COLOR_LAYER:function(){this.welDropdownLayer.addClass("p1");
|
||||
this.welDropdownLayer.removeClass("p2");this.oApp.exec("SHOW_COLOR_PALETTE",["ST_SET_BORDER_COLOR_FROM_PALETTE",this.elDropdownLayer])},$ON_ST_HIDE_BORDER_COLOR_LAYER:function(){this.welDropdownLayer.removeClass("p1");this.oApp.exec("HIDE_COLOR_PALETTE",[])},$ON_ST_TOGGLE_BGCOLOR_LAYER:function(){this.welDropdownLayer.hasClass("p2")?this.oApp.exec("ST_HIDE_BGCOLOR_LAYER",[]):this.oApp.exec("ST_SHOW_BGCOLOR_LAYER",[])},$ON_ST_SHOW_BGCOLOR_LAYER:function(){this.welDropdownLayer.removeClass("p1");this.welDropdownLayer.addClass("p2");
|
||||
this.oApp.exec("SHOW_COLOR_PALETTE",["ST_SET_BGCOLOR_FROM_PALETTE",this.elDropdownLayer])},$ON_ST_HIDE_BGCOLOR_LAYER:function(){this.welDropdownLayer.removeClass("p2");this.oApp.exec("HIDE_COLOR_PALETTE",[])},$ON_ST_SET_BORDER_COLOR_FROM_PALETTE:function(a){this.oApp.exec("ST_SET_BORDER_COLOR",[a]);this.oApp.exec("ST_HIDE_BORDER_COLOR_LAYER",[])},$ON_ST_SET_BORDER_COLOR:function(a){this.oBorderColorInput.value=a;this.oButton_BorderColorPreview.style.backgroundColor=a;this._showNewTable()},$ON_ST_SET_BGCOLOR_FROM_PALETTE:function(a){this.oApp.exec("ST_SET_BGCOLOR",
|
||||
[a]);this.oApp.exec("ST_HIDE_BGCOLOR_LAYER",[])},$ON_ST_SET_BGCOLOR:function(a){this.oBGColorInput.value=a;this.oButton_BGColorPreview.style.backgroundColor=a;this._showNewTable()},_showNewTable:function(){var a=document.createElement("DIV");a.innerHTML=this._getTableString();a=a.firstChild;this.oSampleTable.parentNode.insertBefore(a,this.oSampleTable);this.oSampleTable.parentNode.removeChild(this.oSampleTable);this.oSampleTable=a},_getTableString:function(){for(var a=this.oBorderColorInput.value,
|
||||
b=this.oBGColorInput.value,d=this.oBorderWidthInput.value,f="",f=c.browser.msie?"<td><p></p></td>":c.browser.firefox?"<td><p><br/></p></td>":"<td><p> </p></td>",b='<tr style="background:'+b+'">',e=this.oColumnInput.value,g=0;g<e;g++)b+=f;b+="</tr>\n";f=this.oRowInput.value;a='<table style="background:'+a+';border-spacing:1px" cellspacing="'+d+'"><tbody>';for(g=0;g<f;g++)a+=b;a+="</tbody>";return a+="</table>"}});xe.XE_EditingModeToggler=c.Class({name:"XE_EditingModeToggler",$init:function(a){this._assignHTMLObjects(a)},
|
||||
_assignHTMLObjects:function(a){a=c.$(a)||document;this.elModeToggleButton=c("BUTTON.xpress_xeditor_mode_toggle_button",a).get(0);this.welModeToggleButton=c(this.elModeToggleButton)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elModeToggleButton,"click","EVENT_TOGGLE_EDITING_MODE",[])},$ON_EVENT_TOGGLE_EDITING_MODE:function(){"WYSIWYG"==this.oApp.getEditingMode()?this.oApp.exec("CHANGE_EDITING_MODE",["HTMLSrc"]):this.oApp.exec("CHANGE_EDITING_MODE",["WYSIWYG"])},$ON_CHANGE_EDITING_MODE:function(a){"HTMLSrc"==
|
||||
a?(this.welModeToggleButton.addClass("active").parent("span").addClass("active"),this.oApp.exec("DISABLE_ALL_UI",[])):(this.welModeToggleButton.removeClass("active").parent("span").removeClass("active"),this.oApp.exec("ENABLE_ALL_UI",[]))}});xe.XE_Editorresize=c.Class({name:"XE_Editorresize",$init:function(a,b){this.inputArea=c(".xpress_xeditor_editing_area_container",a).get(0);this.oVerticalResizer=c(".xpress_xeditor_editingArea_verticalResizer",a).get(0);this.oCheckBox=c("#editorresize",a).get(0);
|
||||
this.oIframe=b;var d=this;c(b).load(function(){d.oIframeBody=c(b).contents().find("body")})},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.oCheckBox,"change","XE_TOGGLE_EDITOR_RESIZE")},$ON_XE_TOGGLE_EDITOR_RESIZE:function(){!0==this.oCheckBox.checked?(void 0==this._prevHeight&&(this._prevHeight=this.inputArea.style.height),this.oVerticalResizer.style.display="none",this.oApp.registerBrowserEvent(this.oIframeBody,"keydown","XE_EDITOR_RESIZE"),this.inputArea.style.height=this.oIframe.style.height=
|
||||
this.oIframeBody[0].scrollHeight+"px"):(c(this.oIframeBody).unbind("keydown"),this.oVerticalResizer.style.display="block",this.inputArea.style.height=this._prevHeight,this.oIframe.style.height=this._prevHeight)},$ON_XE_EDITOR_RESIZE:function(){var a=this;setTimeout(function(){a.inputArea.style.height=a.oIframe.style.height=a.oIframeBody[0].scrollHeight+"px"},0)}});xe.XpressCore.oMessageMap={"XE_EditingAreaManager.onExit":"%uB0B4%uC6A9%uC774%20%uBCC0%uACBD%uB418%uC5C8%uC2B5%uB2C8%uB2E4.","XE_FontColor.invalidColorCode":"%uC0C9%uC0C1%20%uCF54%uB4DC%uB97C%20%uC62C%uBC14%uB974%uAC8C%20%uC785%uB825%uD558%uC5EC%20%uC8FC%uC2DC%uAE30%20%uBC14%uB78D%uB2C8%uB2E4.\n\n%uC608%29%20%23000000%2C%20%23FF0000%2C%20%23FFFFFF%2C%20%23ffffff%2C%20ffffff",
|
||||
"XE_BGColor.invalidColorCode":"%uC0C9%uC0C1%20%uCF54%uB4DC%uB97C%20%uC62C%uBC14%uB974%uAC8C%20%uC785%uB825%uD558%uC5EC%20%uC8FC%uC2DC%uAE30%20%uBC14%uB78D%uB2C8%uB2E4.\n\n%uC608%29%20%23000000%2C%20%23FF0000%2C%20%23FFFFFF%2C%20%23ffffff%2C%20ffffff","XE_Hyperlink.invalidURL":"%uC785%uB825%uD558%uC2E0%20URL%uC774%20%uC62C%uBC14%uB974%uC9C0%20%uC54A%uC2B5%uB2C8%uB2E4."};regex_handler=/<(.*?)\s+on[a-z]+\s*=(?:\s*".*?"|\s*'.*?'|[^\s>]+)(.*?)>/ig;regex_font_color=/color\s*=(?:\s*"(.*?)"|\s*'(.*?)'|([^\s>]+))/i;
|
||||
regex_font_face=/face\s*=(?:\s*"(.*?)"|\s*'(.*?)'|([^\s>]+))/i;regex_font_size=/size\s*=(?:\s*"(\d+)"|\s*'(\d+)'|(\d+))/i;regex_style=/style\s*=\s*(?:\s*"(.*?)"|\s*'(.*?)'|([^\s>]+))/i;regex_font_weight=/font-weight\s*:\s*([a-z]+);?/i;regex_font_style=/font-style\s*:\s*italic;?/i;regex_font_decoration=/text-decoration\s*:\s*([a-z -]+);?/i;regex_jquery=/jQuery\d+\s*=(\s*"\d+"|\d+)/ig;regex_quote_attr=/([\w-]+\s*=(?:\s*"[^"]+"|\s*'[^']+'))|([\w-]+)=([^\s]+)/g;var q="base meta link hr br basefont param img area input isindex col".split(" ");
|
||||
xe.XE_XHTMLFormatter=c.Class({name:"XE_XHTMLFormatter",$ON_MSG_APP_READY:function(){this.oApp.addConverter("WYSIWYG_TO_IR",this.TO_IR);this.oApp.addConverter("HTMLSrc_TO_IR",this.TO_IR);this.oApp.addConverter("IR_TO_HTMLSrc",this.IR_TO);this.oApp.addConverter("IR_TO_WYSIWYG",this.IR_TO)},TO_IR:function(a){var b=[];c.browser.msie&&(a=a.replace(regex_jquery,""),a=a.replace(/<(\w+) ([^>]+)>/g,function(a,b,c){return"<"+b+" "+c.replace(regex_quote_attr,function(a,b,c,d){return b?b:/^"/.test(d)||/"$/.test(d)?
|
||||
c+"="+d:c+'="'+(d||c)+'"'})+">"}));regex=/<(\/)?([:\w\/-]+)(.*?)>/ig;a=a.replace(regex,function(a,d,g,h){d=d||"";g=g.toLowerCase();h=c.trim(h||"");if(d){h=[];a="";if(0<=c.inArray(g,q)||!b.length)return"";do a=b.pop(),a.tag==g&&"deleted"!=a.state&&h.push("</"+a.tag+">");while(b.length&&a.tag!=g);return h.join("")}if(0<=c.inArray(g,q)){a=h.length;"br"==g&&(h="");if(!h||"/"!=h.substring(a-1,a))h+=" /";return"<"+g+" "+c.trim(h)+">"}b.push({tag:g,state:""});return"<"+d+g+(h?" "+h:"")+">"});if(b.length){var d=
|
||||
"";do d=b.pop(),"deleted"!=d.state&&(a+="</"+d.tag+">");while(b.length)}regex=/<\/p>[ \t]*(\n)?/ig;return a=a.replace(regex,"</p>\n")},IR_TO:function(a){return a}});xe.XE_Extension=c.Class({name:"XE_Extension",seq:"",last_doc:"",$init:function(a,b){this.seq=b;this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elDropdownLayer=c("DIV.xpress_xeditor_extension_layer",a).get(0)},_removeAttrs:function(a){return a},_addEvent:function(){if("WYSIWYG"==this.oApp.getEditingMode()){var a=this.oApp.getWYSIWYGDocument(),
|
||||
b=this.seq,d=function(){var a=c(this),d=a.attr("editor_component");d&&c.isFunction(openComponent)&&(editorPrevNode=a.get(0),openComponent(d,b))};c(a).find("img,div[editor_component]").each(function(){var b=c(this);"IMG"==this.nodeName&&(!b.attr("editor_component")&&!b.attr("widget"))&&b.attr("editor_component","image_link");this.last_doc!=a&&(b.unbind("dblclick.widget").bind("dblclick.widget",d),this.last_doc=a)})}},$ON_MSG_APP_READY:function(){var a=this.oApp;a.exec("REGISTER_UI_EVENT",["extension",
|
||||
"click","TOGGLE_EXTENSION_LAYER"]);var b=function(){a.exec("HIDE_ACTIVE_LAYER",[])};c("a",this.elDropdownLayer).each(function(){var a=c(this);a.attr("component_onclick_event_added")||(a.click(b),a.attr("component_onclick_event_added","Y"))})},$ON_TOGGLE_EXTENSION_LAYER:function(){this.oApp.exec("TOGGLE_TOOLBAR_ACTIVE_LAYER",[this.elDropdownLayer])},$ON_CHANGE_EDITING_MODE:function(){var a=this;setTimeout(function(){a._addEvent()},100)},$ON_PASTE_HTML:function(){var a=this;setTimeout(function(){a._addEvent()},
|
||||
100)},$ON_LOAD_IR_FIELD:function(){var a=this;setTimeout(function(){a._addEvent()},100)},$ON_SET_IR:function(){var a=this;setTimeout(function(){a._addEvent()},100)}});xe.XE_AutoSave=c.Class({name:"XE_AutoSave",form:null,textarea:null,$init:function(a,b){this.form=a.form;this.textarea=a;this._assignHTMLObjects(b)},_assignHTMLObjects:function(){this.welMessageBox=c("autosave_message")},$ON_MSG_APP_READY:function(){var a=c(this.form._saved_doc_title),b=c(this.form._saved_doc_content),a=c.trim(a.val()),
|
||||
b=c.trim(b.val());if(a||b)confirm(this.form._saved_doc_message.value)?(c(this.form.title).val(a),this.oApp.setIR(b),"function"==typeof editorGetAutoSavedDoc&&editorGetAutoSavedDoc(this.form)):editorRemoveSavedDoc();editorEnableAutoSave(this.form,c(this.form).attr("editor_sequence"));this.oApp.exec("REGISTER_HOTKEY",["ctrl+shift+s","AUTO_SAVE"])},$ON_AUTO_SAVE:function(){_editorAutoSave()}});xe.XE_FormatWithSelectUI=c.Class({name:"XE_FormatWithSelectUI",$init:function(a){this._assignHTMLObjects(a)},
|
||||
_assignHTMLObjects:function(a){this.elFormatSelect=c("SELECT.xpress_xeditor_ui_format_select",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elFormatSelect,"change","SET_FORMAT_FROM_SELECT_UI");this.elFormatSelect.selectedIndex=0},$ON_MSG_STYLE_CHANGED:function(){var a=this.oApp.getWYSIWYGDocument().queryCommandValue("FormatBlock");if(!a)return this.elFormatSelect.selectedIndex=0;c.browser.msie&&/([0-9])/.test(a)&&(a="h"+RegExp.$1);this.elFormatSelect.value=a.toLowerCase();
|
||||
0>this.elFormatSelect.selectedIndex&&(this.elFormatSelect.selectedIndex=0);this.elFormatSelect.value!=a.toLowerCase()&&(this.elFormatSelect.selectedIndex=0)},$ON_SET_FORMAT_FROM_SELECT_UI:function(){var a=this.elFormatSelect.value;a&&(c.browser.msie&&(a="<"+a+">"),this.oApp.exec("EXECCOMMAND",["FormatBlock",!1,a]),this.oApp.exec("CHECK_STYLE_CHANGE",[]))}});xe.XE_Table=c.Class({_startSel:null,_endSel:null,$ON_MSG_APP_READY:function(){this._doc=c(this.oApp.getWYSIWYGDocument());this.$FnMouseDown=c.fnBind(this._mousedown,
|
||||
this);this.$FnMouseUp=c.fnBind(this._mouseup,this);this.$FnMouseMove=c.fnBind(this._mousemove,this);this._doc.mousedown(this.$FnMouseDown);this._endSel=this._startSel=null;this.oApp.exec("REGISTER_UI_EVENT",["merge_cells","click","MERGE_CELLS"]);this.oApp.exec("REGISTER_UI_EVENT",["split_col","click","CELL_SPLIT_BY_COL"]);this.oApp.exec("REGISTER_UI_EVENT",["split_row","click","CELL_SPLIT_BY_ROW"]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+alt+m","MERGE_CELLS"]);this.$super.$ON_MSG_APP_READY()},$ON_MERGE_CELLS:function(){var a=
|
||||
"",b=c(".xe_selected_cell",this.oApp.getWYSIWYGDocument()).filter("td,th"),d=this;if(b.length){this.oApp.exec("RECORD_UNDO_ACTION",["Cell:Merge"]);b.each(function(){a+=c(this).html()}).eq(0).html(a);var f=0;b.eq(0).nextAll("td,th").andSelf().filter(".xe_selected_cell").each(function(){f+=d._getSpan(this,"col")});this._getRect(b.eq(0));var e=b.eq(0).parent("tr"),g=b.eq(b.length-1).parent("tr"),h=b.parents("table").eq(0).find("tr"),e=h.index(g.get(0))-h.index(e.get(0))+this._getSpan(b.eq(b.length-1),
|
||||
"row");b.eq(0).attr("colSpan",f).attr("rowSpan",e);b.slice(1).remove()}},$ON_CELL_SPLIT_BY_ROW:function(){var a=c(".xe_selected_cell",this.oApp.getWYSIWYGDocument()).filter("td,th"),b=a.parents("table").eq(0),d=this;if(a.length){this.oApp.exec("RECORD_UNDO_ACTION",["Cell:Split By Row"]);var f=this._getRect(a.eq(0)).top,e=this._getRect(a.eq(a.length-1)).bottom;(a=b.find("td,th").filter(function(){var a=d._getRect(c(this));return!(a.bottom<=f||a.top>=e)})).filter(".xe_selected_cell").each(function(){var b=
|
||||
c(this),e=b.parent("tr"),f=d._getSpan(b,"row"),j=d._getRect(b),l=[],m=b.clone().html("<br />"),n=1,p=1;1<f?(n=Math.ceil(f/2),p=f-n,l.push(function(){b.attr("rowSpan",n)}),m.attr("rowSpan",p)):(a.filter(function(){if(b.get(0)==this)return!1;var a=c(this),a=d._getRect(a);return a.bottom<=j.top||a.top>=j.bottom?!1:!0}).each(function(){var a=c(this),b=d._getSpan(a,"row")+1;l.push(function(){a.attr("rowSpan",b)})}),c.browser.msie?e.after(e.clone().empty().get(0).outerHTML):e.after(e.clone().empty()));
|
||||
f=e.nextAll("tr");f.length?(e=f.eq(n-1).children("td,th").filter(function(){return d._getRect(c(this)).left>j.left}),c.browser.msie?e.length?e.eq(0).before(m.get(0).outerHTML):f.eq(n-1).append(m.get(0).outerHTML):e.length?e.slice(0,1).before(m):f.slice(n-1,1).append(m)):e.after(e.clone().empty().append(m));c.each(l,function(){this()})})}},$ON_CELL_SPLIT_BY_COL:function(){var a=c(".xe_selected_cell",this.oApp.getWYSIWYGDocument()).filter("td,th"),b=a.parents("table").slice(0,1),d=this;(new Date).getTime();
|
||||
if(a.length){this.oApp.exec("RECORD_UNDO_ACTION",["Cell:Split By Column"]);var f=a.eq(0).parent("tr"),e=this._getRect(f.find(".xe_selected_cell:first")).left,g=this._getRect(f.find(".xe_selected_cell:last")).right;(a=b.find("td,th").filter(function(){var a=d._getRect(c(this));return!(a.right<=e||a.left>=g)})).filter(".xe_selected_cell").each(function(){var b=c(this),e=d._getSpan(b,"col"),f=b.clone().html("<br />");if(1<e){var g=Math.ceil(e/2),e=e-g;b.attr("colSpan",g);f.attr("colSpan",e)}else{var m=
|
||||
d._getRect(b);a.filter(function(){if(b.get(0)==this)return!1;var a=c(this),a=d._getRect(a);return a.right<=m.left||a.left>=m.right?!1:!0}).each(function(){var a=c(this);a.attr("colSpan",d._getSpan(a,"col")+1)});f.attr("colSpan",1)}c.browser.msie?b.after(f.get(0).outerHTML):b.after(f)})}},$ON_CHECK_STYLE_CHANGE:function(){var a=this.oApp,b=this._startSel&&this._startSel.is(".xe_selected_cell")?"ENABLE_UI":"DISABLE_UI";c.each(["merge_cells","split_col","split_row"],function(){a.exec(b,[this])})},_mousedown:function(a){function b(){d=
|
||||
f.getSelection().cloneRange();d.collapseToStart();d=c(d.startContainer).parents().andSelf().filter("td,th").eq(0);if(!d.length)return e._removeAllListener()||!0;e._getRect(e._startSel=d);e._doc.bind("mousemove",e.$FnMouseMove);e._doc.bind("mouseup",e.$FnMouseUp)}var d=c(a.target).parents().andSelf().filter("td,th,table"),f=this.oApp,e=this;c("td.xe_selected_cell",this.oApp.getWYSIWYGDocument()).removeClass("xe_selected_cell");this._endSel=this._startSel=null;d.length&&this._isLeftClicked(a.button)&&
|
||||
setTimeout(b,0)},_mouseup:function(){this._removeAllListener();this._startSel=this._endSel=null},_mousemove:function(a){var b=c(a.target).parents().andSelf().filter("td,th").eq(0),d=this;if(b.length&&this._isLeftClicked(a.button)&&(this._endSel||b.get(0)!=this._startSel.get(0))&&!(this._endSel&&b.get(0)==this._endSel.get(0))){this._getRect(this._endSel=b);var f=Math.min(this._startSel.rect.top,this._endSel.rect.top),e=Math.min(this._startSel.rect.left,this._endSel.rect.left),g=Math.max(this._startSel.rect.bottom,
|
||||
this._endSel.rect.bottom),h=Math.max(this._startSel.rect.right,this._endSel.rect.right);a=b.parents("table").find("td,th").removeClass("xe_selected_cell");b=c();do b.each(function(){var a=d._getRect(c(this));a.right>h&&(h=a.right);a.left<e&&(e=a.left);a.top<f&&(f=a.top);a.bottom>g&&(g=a.bottom)}),a=a.filter(":not(.xe_selected_cell)"),b=a.filter(function(){var a=d._getRect(c(this));return a.right<=e||a.left>=h||a.bottom<=f||a.top>=g?!1:!0}).addClass("xe_selected_cell");while(b.length);c.browser.mozilla||
|
||||
setTimeout(function(){var a=d.oApp.getSelection();d._startSel&&(d._startSel.get(0).firstChild||d._startSel.text(" "),a.selectNode(d._startSel.get(0).firstChild),a.collapseToStart(),a.select())},0);return!1}},_removeAllListener:function(){this._doc.unbind("mousemove",this.$FnMouseMove);this._doc.unbind("mouseup",this.$FnMouseUp)},_isLeftClicked:function(a){return c.browser.msie?!!(a&1):0==a},_getRect:function(a){var b=a.get(0);a.rect={};a.rect.top=b.offsetTop;a.rect.left=b.offsetLeft;a.rect.bottom=
|
||||
a.rect.top+b.offsetHeight;a.rect.right=a.rect.left+b.offsetWidth;return a.rect},_getSpan:function(a,b){var d=parseInt(c(a).attr(b+"span"));return isNaN(d)?1:d}}).extend(xe.XE_Table)})(jQuery);window.xe||(xe={});xe.Editors=[];
|
||||
function editorStart_xe(c,p,n,q,a,b,d,f){function e(){try{var a=l.contentWindow.document;if("about:blank"==a.location)throw"blank";a.body.innerHTML=a.body.innerHTML.trim();j.registerPlugin(new xe.XE_EditingArea_WYSIWYG(l));j.registerPlugin(new xe.XpressRangeManager(l));j.registerPlugin(new xe.XE_ExecCommand(l));d&&!a.body.style.fontFamily&&(a.body.style.fontFamily=d);f&&!a.body.style.fontSize&&(a.body.style.fontSize=f);j.run()}catch(b){setTimeout(e,0)}}"undefined"==typeof a&&(a="white");"undefined"==
|
||||
typeof b&&(b="xeStyle");"undefined"==typeof d&&(d="");"undefined"==typeof f&&(f="");var g=request_uri+"modules/editor/styles/"+b+"/editor.html";b=jQuery("#xpress-editor-"+c);var g=jQuery('<iframe id="editor_iframe_'+c+'" allowTransparency="true" frameborder="0" src="'+g+'" scrolling="yes" style="width:100%;height:'+q+'px"></iframe>'),h=jQuery('<textarea rows="8" cols="42" class="input_syntax '+a+'" style="display:none"></textarea>');a=b.get(0).form;a.setAttribute("editor_sequence",c);b.css("display",
|
||||
"none");var k="";0<jQuery("input[name=content]",a).size()&&(k=jQuery("input[name=content]",a).val().replace(/src=\"files\/attach/g,'src="'+request_uri+"files/attach"),jQuery("#xpress-editor-"+c).val(k));b.hide().css("width","100%").before(g).after(h);var j=new xe.XpressCore,l=g.get(0);b=b.get(0);g=h.get(0);h=jQuery(".xpress-editor",a).get(0);j.getFrame=function(){return l};j.getContent=function(){editorGetContentTextarea_xe(c)};k=a[n].value;xFF&&!k&&(k="<br />");k=editorReplacePath(k);a[n].value=
|
||||
k;jQuery("#xpress-editor-"+c).val(k);editorRelKeys[c]=[];editorRelKeys[c].primary=a[p];editorRelKeys[c].content=a[n];editorRelKeys[c].func=editorGetContentTextarea_xe;editorRelKeys[c].editor=j;editorRelKeys[c].pasteHTML=function(a){j.exec("PASTE_HTML",[a])};xe.Editors[c]=j;j.registerPlugin(new xe.CorePlugin(null));j.registerPlugin(new xe.XE_PreservTemplate(jQuery("#xpress-editor-"+c).val()));j.registerPlugin(new xe.StringConverterManager);j.registerPlugin(new xe.XE_EditingAreaManager("WYSIWYG",b,
|
||||
{nHeight:parseInt(q),nMinHeight:100},null,h));j.registerPlugin(new xe.XE_EditingArea_HTMLSrc(g));j.registerPlugin(new xe.XE_EditingAreaVerticalResizer(h));j.registerPlugin(new xe.Utils);j.registerPlugin(new xe.DialogLayerManager);j.registerPlugin(new xe.ActiveLayerManager);j.registerPlugin(new xe.Hotkey);j.registerPlugin(new xe.XE_WYSIWYGStyler);j.registerPlugin(new xe.XE_WYSIWYGStyleGetter);j.registerPlugin(new xe.MessageManager(xe.XpressCore.oMessageMap));j.registerPlugin(new xe.XE_Toolbar(h));
|
||||
j.registerPlugin(new xe.XE_XHTMLFormatter);j.registerPlugin(new xe.XE_GET_WYSYWYG_MODE(c));jQuery("ul.extra1").length&&(j.registerPlugin(new xe.XE_ColorPalette(h)),j.registerPlugin(new xe.XE_FontColor(h)),j.registerPlugin(new xe.XE_BGColor(h)),j.registerPlugin(new xe.XE_Quote(h)),j.registerPlugin(new xe.XE_FontNameWithSelectUI(h)),j.registerPlugin(new xe.XE_FontSizeWithSelectUI(h)),j.registerPlugin(new xe.XE_LineHeightWithSelectUI(h)),j.registerPlugin(new xe.XE_UndoRedo),j.registerPlugin(new xe.XE_Table(h)),
|
||||
j.registerPlugin(new xe.XE_Hyperlink(h)),j.registerPlugin(new xe.XE_FormatWithSelectUI(h)),j.registerPlugin(new xe.XE_SCharacter(h)));jQuery("ul.extra2").length&&j.registerPlugin(new xe.XE_Extension(h,c));jQuery("ul.extra3").length&&j.registerPlugin(new xe.XE_EditingModeToggler(h));jQuery("#editorresize").length&&j.registerPlugin(new xe.XE_Editorresize(h,n));!jQuery.browser.msie&&!jQuery.browser.opera&&j.registerPlugin(new xe.XE_WYSIWYGEnterKey(n));(s=a._saved_doc_title)&&j.registerPlugin(new xe.XE_AutoSave(b,
|
||||
j.registerPlugin(new xe.XE_Hyperlink(h)),j.registerPlugin(new xe.XE_FormatWithSelectUI(h)),j.registerPlugin(new xe.XE_SCharacter(h)));jQuery("ul.extra2").length&&j.registerPlugin(new xe.XE_Extension(h,c));jQuery("ul.extra3").length&&j.registerPlugin(new xe.XE_EditingModeToggler(h));jQuery("#editorresize").length&&j.registerPlugin(new xe.XE_Editorresize(h,l));!jQuery.browser.msie&&!jQuery.browser.opera&&j.registerPlugin(new xe.XE_WYSIWYGEnterKey(l));(s=a._saved_doc_title)&&j.registerPlugin(new xe.XE_AutoSave(b,
|
||||
h));e();return j}
|
||||
function editorGetContentTextarea_xe(c){c=xe.Editors[c]||null;if(!c)return"";c=c.getIR();if(!jQuery.trim(c.replace(/( |<\/?(p|br|span|div)([^>]+)?>)/ig,"")))return"";c=c.replace(/<br ?\/?>$/i,"");if(1024>c.length){var o="#text A BR IMG EM STRONG SPAN BIG CITE CODE DD DFN HR INS KBD LINK Q SAMP SMALL SUB SUP TT".split(" "),l=!0,p=jQuery("<div>"+c+"</div>").eq(0).contents();jQuery.each(p,function(){3!=this.nodeType&&-1==jQuery.inArray(this.nodeName,o)&&(l=!1)});l&&(c="<p>"+c+"</p>")}c=c.replace(/src\s?=\s?(["']?)(?:\.\.\/)+(files\/attach\/)/ig,
|
||||
function(a,b,c){return"src="+(b||"")+c});c=c.replace(/\<(\/)?([A-Z]+)([^>]*)\>/ig,function(a,b,c,f){f=f?f.replace(/ ([A-Z]+?)\=/ig,function(a,b){b=b.toLowerCase();return" "+b+"="}):"";c=c.toLowerCase();b||(b="");return"<"+b+c+f+">"});return c=c.replace("<br>","<br />")}function editorGetIframe(c){return jQuery("iframe#editor_iframe_"+c).get(0)}function editorReplaceHTML(c,o){var o=editorReplacePath(o),l=parseInt(c.id.replace(/^.*_/,""),10);editorRelKeys[l].pasteHTML(o)}
|
||||
function editorReplacePath(c){return c=c.replace(/\<([^\>\<]*)(src=|href=|url\()("|\')*([^"\'\)]+)("|\'|\))*(\s|>)*/ig,function(c,l,p,a,b,d,f){"url("==p?(a="",d=")"):("undefined"==typeof a&&(a='"'),"undefined"==typeof d&&(d='"'),"undefined"==typeof f&&(f=""));b=jQuery.trim(b).replace(/^\.\//,"");return/^(http\:|https\:|ftp\:|telnet\:|mms\:|mailto\:|\/|\.\.|\#)/i.test(b)?c:"<"+l+p+a+request_uri+b+d+f})}
|
||||
function editorGetAutoSavedDoc(c){var o=[];o.mid=current_mid;o.editor_sequence=c.getAttribute("editor_sequence");setTimeout(function(){exec_xml("editor","procEditorLoadSavedDocument",o,function(c){editorRelKeys[o.editor_sequence].primary.value=c.document_srl;"object"==typeof uploadSettingObj[o.editor_sequence]&&editorUploadInit(uploadSettingObj[o.editor_sequence],!0)},"error message editor_sequence title content document_srl".split(" "))},0)}
|
||||
function editorGetContentTextarea_xe(c){c=xe.Editors[c]||null;if(!c)return"";c=c.getIR();if(!jQuery.trim(c.replace(/( |<\/?(p|br|span|div)([^>]+)?>)/ig,"")))return"";c=c.replace(/<br ?\/?>$/i,"");if(1024>c.length){var p="#text A BR IMG EM STRONG SPAN BIG CITE CODE DD DFN HR INS KBD LINK Q SAMP SMALL SUB SUP TT".split(" "),n=!0,q=jQuery("<div>"+c+"</div>").eq(0).contents();jQuery.each(q,function(){3!=this.nodeType&&-1==jQuery.inArray(this.nodeName,p)&&(n=!1)});n&&(c="<p>"+c+"</p>")}c=c.replace(/src\s?=\s?(["']?)(?:\.\.\/)+(files\/attach\/)/ig,
|
||||
function(a,b,c){return"src="+(b||"")+c});c=c.replace(/\<(\/)?([A-Z]+)([^>]*)\>/ig,function(a,b,c,f){f=f?f.replace(/ ([A-Z]+?)\=/ig,function(a,b){b=b.toLowerCase();return" "+b+"="}):"";c=c.toLowerCase();b||(b="");return"<"+b+c+f+">"});return c=c.replace("<br>","<br />")}function editorGetIframe(c){return jQuery("iframe#editor_iframe_"+c).get(0)}function editorReplaceHTML(c,p){p=editorReplacePath(p);var n=parseInt(c.id.replace(/^.*_/,""),10);editorRelKeys[n].pasteHTML(p)}
|
||||
function editorReplacePath(c){return c=c.replace(/\<([^\>\<]*)(src=|href=|url\()("|\')*([^"\'\)]+)("|\'|\))*(\s|>)*/ig,function(c,n,q,a,b,d,f){"url("==q?(a="",d=")"):("undefined"==typeof a&&(a='"'),"undefined"==typeof d&&(d='"'),"undefined"==typeof f&&(f=""));b=jQuery.trim(b).replace(/^\.\//,"");return/^(http\:|https\:|ftp\:|telnet\:|mms\:|mailto\:|\/|\.\.|\#)/i.test(b)?c:"<"+n+q+a+request_uri+b+d+f})}
|
||||
function editorGetAutoSavedDoc(c){var p=[];p.mid=current_mid;p.editor_sequence=c.getAttribute("editor_sequence");setTimeout(function(){exec_xml("editor","procEditorLoadSavedDocument",p,function(c){editorRelKeys[p.editor_sequence].primary.value=c.document_srl;"object"==typeof uploadSettingObj[p.editor_sequence]&&editorUploadInit(uploadSettingObj[p.editor_sequence],!0)},"error message editor_sequence title content document_srl".split(" "))},0)}
|
||||
xe.XE_GET_WYSYWYG_MODE=jQuery.Class({name:"XE_GET_WYSYWYG_MODE",$init:function(c){this.editor_sequence=c},$ON_CHANGE_EDITING_MODE:function(c){editorMode[this.editor_sequence]="HTMLSrc"==c?"html":"wysiwyg"}});xe.XE_PreservTemplate=jQuery.Class({name:"XE_PreservTemplate",isRun:!1,$BEFORE_SET_IR:function(c){if(!this.isRun&&!c)return this.isRun=!0,!1}});
|
||||
xe.XE_Preview=jQuery.Class({name:"XE_Preview",elPreviewButton:null,$init:function(c){this._assignHTMLObjects(c)},_assignHTMLObjects:function(c){this.elPreviewButton=jQuery("BUTTON.xpress_xeditor_preview_button",c)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elPreviewButton.get(0),"click","EVENT_PREVIEW",[])},$ON_EVENT_PREVIEW:function(){}});
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" type="text/css" href="editor.css" />
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="editor.css" />
|
||||
<title>XpressEngine</title>
|
||||
</head>
|
||||
<body class="xe_content editable">
|
||||
|
|
|
|||
|
|
@ -16,3 +16,4 @@
|
|||
.xe_content blockquote.q6{border:1px dashed #707070}
|
||||
.xe_content blockquote.q7{border:1px dashed #707070;background:#fbfbfb}
|
||||
.xe_content p{margin:0}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" type="text/css" href="editor.css" />
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="editor.css" />
|
||||
<title>XpressEngine</title>
|
||||
</head>
|
||||
<body class="xe_content editable">
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@
|
|||
<title xml:lang="en">dreditor</title>
|
||||
<title xml:lang="tr">dreditor</title>
|
||||
<description xml:lang="ko">
|
||||
단락편집기 문서서식입니다.
|
||||
텍스타일 이외의 모듈에서 단락편집기를 사용할 때 사용하시면 단락편집기 스타일에 맞추어서 표시해줍니다.
|
||||
단락편집기 문서 서식입니다.
|
||||
텍스타일 이외의 페이지에서 단락편집기 스타일에 맞추어 서식을 표시해줍니다.
|
||||
</description>
|
||||
<description xml:lang="en">
|
||||
DrEditor document style.
|
||||
If you use DrEditor with other modules rather than Textyle, setting style as this would help disply better.
|
||||
If you use DrEditor with other pages rather than Textyle, setting style as this would help disply better.
|
||||
</description>
|
||||
<description xml:lang="tr">
|
||||
DrEditor belge şekli.
|
||||
|
|
@ -17,9 +17,9 @@
|
|||
</description>
|
||||
<version>0.1</version>
|
||||
<date>2010-05-25</date>
|
||||
<author email_address="haneul0318@gmail.com" link="http://seungyeop.kr">
|
||||
<name xml:lang="ko">haneul</name>
|
||||
<name xml:lang="en">haneul</name>
|
||||
<name xml:lang="tr">haneul</name>
|
||||
<author email_address="developers@xpressengine.com" link="http://xpressengine.com/">
|
||||
<name xml:lang="ko">NHN</name>
|
||||
<name xml:lang="en">NHN</name>
|
||||
<name xml:lang="tr">NHN</name>
|
||||
</author>
|
||||
</skin>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" type="text/css" href="editor.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="editor.css" />
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<title>XpressEngine</title>
|
||||
</head>
|
||||
<body class="xe_content editable">
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" type="text/css" href="editor.css" />
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="editor.css" />
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<title>XpressEngine</title>
|
||||
</head>
|
||||
<body class="xe_content editable">
|
||||
|
|
|
|||
|
|
@ -1,165 +1,216 @@
|
|||
<load target="js/editor_module_config.js" usecdn="true" />
|
||||
<script type="text/javascript">
|
||||
jQuery(function($){
|
||||
var fontPreview = $('.fontPreview');
|
||||
var fontRadio = $('.fontSelector>:radio');
|
||||
var checkedFont = fontRadio.filter(':checked').next('label').css('fontFamily');
|
||||
fontPreview.css('fontFamily',checkedFont);
|
||||
fontRadio.change(function(){
|
||||
var myFont = $(this).next('label').css('fontFamily');
|
||||
fontPreview.css('fontFamily',myFont);
|
||||
});
|
||||
var changedSize = $('#fontSize').val();
|
||||
fontPreview.css('fontSize',changedSize+'px');
|
||||
$('#fontSize').keyup(function(){
|
||||
var mySize = $(this).val();
|
||||
fontPreview.css('fontSize',mySize+'px');
|
||||
if(mySize.length==0){ fontPreview.css('fontSize','') };
|
||||
if(mySize>28){
|
||||
alert('{$lang->msg_font_too_big}');
|
||||
$(this).val('28');
|
||||
fontPreview.css('fontSize','28px');
|
||||
};
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h1 class="h1">{$lang->editor}</h1>
|
||||
<h2 class="h2">{$lang->editor_preview}</h2>
|
||||
|
||||
<div class="x_page-header">
|
||||
<h1>{$lang->editor} <a class="x_icon-question-sign" href="./admin/help/index.html#UMAN_advanced_editor" target="_blank">{$lang->help}</a></h1>
|
||||
</div>
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/editor/tpl/admin_index/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<!-- Editor Preview -->
|
||||
<a href="{getUrl('module', 'admin', 'act', 'dispEditorConfigPreview')}" target="_blank">{$lang->cmd_preview}</a>
|
||||
<!-- /Editor Preview -->
|
||||
<form action="./" method="post" class="form" ruleset="generalConfig">
|
||||
<input type="hidden" name="module" value="editor" />
|
||||
<input type="hidden" name="act" value="procEditorAdminGeneralConfig " />
|
||||
|
||||
<fieldset class="section">
|
||||
<h2 class="h2">{$lang->editor_option}</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<p class="q">{$lang->guide_choose_main_editor}</p>
|
||||
<p class="a">
|
||||
<!--@foreach($editor_skin_list as $editor)-->
|
||||
<input type="radio" name="editor_skin" value="{$editor}" id="doc_{$editor}" onClick="getEditorSkinColorList(this.value, null, 'document','doc_{$editor}')" <!--@if($editor==$editor_config->editor_skin)-->checked="checked" <!--@end-->/>
|
||||
<label for="doc_{$editor}" value='sdf'>{$editor}</label>
|
||||
<select name="sel_editor_colorset" <!--@if($editor==$editor_config->editor_skin)--> >
|
||||
<!--@foreach($editor_colorset_list as $key => $val)-->
|
||||
<option value="{$val->name}" <!--@if($editor_config->sel_editor_colorset == $val->name)-->selected="selected"<!--@end-->>{$val->title}</option>
|
||||
<!--@end-->
|
||||
<!--@else-->style="display:none"> <!--@end-->
|
||||
</select>
|
||||
<br />
|
||||
<!--@end-->
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="editor_height">{$lang->guide_set_height_main_editor}</label></p>
|
||||
<p class="a"><input type="text" name="editor_height" id="editor_height" value="<!--@if($editor_config->editor_height)-->{$editor_config->editor_height}<!--@else-->{$editor_config_default['editor_height']}<!--@end-->" style="width:30px" /> px</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q">{$lang->guide_choose_comment_editor}</p>
|
||||
<p class="a">
|
||||
<!--@foreach($editor_skin_list as $editor)-->
|
||||
<input type="radio" name="comment_editor_skin" value="{$editor}" id="com_{$editor}" onclick="getEditorSkinColorList(this.value, null, 'reply','com_{$editor}')" <!--@if($editor == $editor_config->comment_editor_skin)-->checked="checked" <!--@end-->/>
|
||||
<label for="com_{$editor}">{$editor}</label>
|
||||
<select name="sel_comment_editor_colorset" <!--@if($editor==$editor_config->comment_editor_skin)--> >
|
||||
<!--@foreach($editor_colorset_list as $key => $val)-->
|
||||
<option value="{$val->name}" <!--@if($editor_config->sel_comment_editor_colorset == $val->name)-->selected="selected"<!--@end-->>{$val->title}</option>
|
||||
<!--@end-->
|
||||
<!--@else-->style="display:none"> <!--@end-->
|
||||
</select>
|
||||
<br />
|
||||
<!--@end-->
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="comment_editor_height">{$lang->guide_set_height_comment_editor}</label></p>
|
||||
<p class="a"><input type="text" name="comment_editor_height"id="comment_editor_height" value="<!--@if($editor_config->comment_editor_height)-->{$editor_config->comment_editor_height}<!--@else-->{$editor_config_default['comment_editor_height']}<!--@end-->" style="width:30px" /> px</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q">{$lang->guide_choose_text_formatting}</p>
|
||||
<p class="a">
|
||||
<!--@foreach($content_style_list as $key => $val)-->
|
||||
<input type="radio" name="content_style" value="{$key}" id="style_{$key}" checked="checked"|cond="$key==$editor_config->content_style||!$editor_config->content_style && $key=='default'"> <label for="style_{$key}">{$key}</label>
|
||||
<!--@end-->
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q">{$lang->guide_choose_font_body}</p>
|
||||
<textarea rows="8" cols="42" class="fontPreview" title="Font Preview">{$lang->font_preview}</textarea>
|
||||
<p class="answer fontSelector">
|
||||
<input type="radio" name="content_font" id="font_noFont" value="" <!--@if(!$editor_config->content_font)-->checked="checked" <!--@end-->/> <label for="font_noFont" style="font-family:''">none(inherit)</label><br />
|
||||
<!--@foreach($lang->edit->fontlist as $name => $detail)-->
|
||||
<input type="radio" name="content_font" id="font_{$name}" value="{$name}" <!--@if($editor_config->content_font==$name)-->checked="checked" <!--@end-->/> <label for="font_{$name}" style="font-family:{$detail}">{$detail}</label><br />
|
||||
<!--@end-->
|
||||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<p class="q"><label for="fontSize">{$lang->guide_choose_font_size_body}</label></p>
|
||||
<textarea rows="8" cols="42" class="fontPreview" title="Font Preview">{$lang->font_preview}</textarea>
|
||||
<p class="a"><input type="text" id="fontSize" name="content_font_size" value="<!--@if($editor_config->content_font_size)-->{str_replace('px','',$editor_config->content_font_size)}<!--@else-->{str_replace('px','',$editor_config_default['content_font_size'])}<!--@end-->" style="width:30px" /> px</p>
|
||||
</li>
|
||||
<section class="section">
|
||||
<h1>{$lang->editor_now}</h1>
|
||||
<div class="x_tabbable _preview">
|
||||
<ul class="x_nav x_nav-tabs" style="margin-bottom:0;border-bottom:0">
|
||||
<li class="x_active"><a href="#pre_document">{$lang->main_editor}</a></li>
|
||||
<li><a href="#pre_comment">{$lang->comment_editor}</a></li>
|
||||
</ul>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><input type="submit" value="{$lang->cmd_save}" /></span>
|
||||
<div class="x_tab-content x_thumbnail">
|
||||
<div class="x_tab-pane x_active" id="pre_document">
|
||||
<iframe src="{getUrl('','act', 'dispEditorConfigPreview','mode','main')}" id="pre_document_frame" frameborder="0" style="border:0"></iframe>
|
||||
</div>
|
||||
<div class="x_tab-pane" id="pre_comment">
|
||||
<iframe src="{getUrl('','act', 'dispEditorConfigPreview','mode','comment')}" id="pre_comment_frame" frameborder="0" style="border:0"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
<form action="./" method="post" class="form" ruleset="componentOrderAndUse">
|
||||
<input type="hidden" name="module" value="editor" />
|
||||
<input type="hidden" name="act" value="procEditorAdminCheckUseListOrder" />
|
||||
<fieldset class="section">
|
||||
<h2 class="h2">{$lang->editor_component}</h2>
|
||||
<div class="table even easyList">
|
||||
<table id="sortable_table" class="sortable"width="100%" border="1" cellspacing="0">
|
||||
<caption>
|
||||
{$lang->total_count}({$component_count})
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{$lang->cmd_move}</th>
|
||||
<th scope="col" class="title">{$lang->component_name} {$lang->user_name}</th>
|
||||
<th scope="col">{$lang->version}</th>
|
||||
<th scope="col">{$lang->author}</th>
|
||||
<th scope="col">{$lang->path}</th>
|
||||
<th scope="col">{$lang->use}</th>
|
||||
<th scope="col">{$lang->cmd_setup}</th>
|
||||
<th scope="col">{$lang->cmd_delete}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="uDrag">
|
||||
<!--@foreach($component_list as $component_name => $xml_info)-->
|
||||
<tr>
|
||||
<td><div class="wrap" style="height:80px"><button type="button" class="dragBtn">Move to</button></div></td>
|
||||
<td class="title">
|
||||
<input type="hidden" name="component_names[]" value="{$xml_info->component_name}" />
|
||||
<p><b>{$xml_info->title}</b></p>
|
||||
<p>{nl2br($xml_info->description)}</p>
|
||||
<!--@if($xml_info->version && $xml_info->need_update == 'Y')-->
|
||||
<p class="update">{$lang->msg_avail_easy_update}<a href="{getUrl('act','dispAutoinstallAdminInstall','package_srl',$xml_info->package_srl)}">{$lang->msg_do_you_like_update}</a></p>
|
||||
<!--@end-->
|
||||
</td>
|
||||
<td>{$xml_info->version}</td>
|
||||
<td>
|
||||
<!--@foreach($xml_info->author as $author)-->
|
||||
<a href="{$author->homepage}" target="_blank">{$author->name}</a>
|
||||
<!--@endforeach-->
|
||||
</td>
|
||||
<td>{$xml_info->path}</td>
|
||||
<td><input type="checkbox" name="enables[]" id="enable" value="{$xml_info->component_name}" title="Use this component " <!--@if($xml_info->enabled=='Y')--> checked="checked"<!--@end--> /></td>
|
||||
<td><a href="{getUrl('', 'module', 'admin', 'act', 'dispEditorAdminSetupComponent', 'component_name', $xml_info->component_name)}">{$lang->cmd_setup}</a>
|
||||
<td>
|
||||
<!--@if($xml_info->version && $xml_info->delete_url)-->
|
||||
<a href="{$xml_info->delete_url}">{$lang->cmd_delete}</a>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Editor Option -->
|
||||
<section class="section">
|
||||
<h1>{$lang->editor_option}</h1>
|
||||
<form action="./" method="post" ruleset="generalConfig" class="x_form-horizontal">
|
||||
<input type="hidden" name="module" value="editor" />
|
||||
<input type="hidden" name="act" value="procEditorAdminGeneralConfig" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/editor/tpl/admin_index/1" />
|
||||
|
||||
<div class="x_control-group">
|
||||
<label for="change_lang_type" class="x_control-label">{$lang->guide_choose_main_editor}</label>
|
||||
<div class="x_controls">
|
||||
<!--@foreach($editor_skin_list as $editor)-->
|
||||
<label class="x_inline" id="label_doc_{$editor}">
|
||||
<input type="radio" name="editor_skin" value="{$editor}" id="doc_{$editor}" onClick="getEditorSkinColorList(this.value, null, 'document','label_doc_{$editor}')" checked="checked"|cond="$editor==$editor_config->editor_skin" /> {$editor}
|
||||
</label>
|
||||
<label class="x_inline">
|
||||
<select name="sel_editor_colorset" style="display:none"|cond="$editor!=$editor_config->editor_skin">
|
||||
<option value="{$val->name}" selected="selected"|cond="$editor_config->sel_editor_colorset == $val->name" cond="$editor==$editor_config->editor_skin" loop="$editor_colorset_list=>$key,$val">{$val->title}</option>
|
||||
</select>
|
||||
</label>
|
||||
<br />
|
||||
<!--@end-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="editor_height" class="x_control-label">{$lang->guide_set_height_main_editor}</label>
|
||||
<div class="x_controls">
|
||||
<input type="number" name="editor_height" id="editor_height" value="{$editor_config->editor_height}"|cond="$editor_config->editor_height" value="{$editor_config_default['editor_height']}"|cond="!$editor_config->editor_height" /> px
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="sel_comment_editor_colorset" class="x_control-label">{$lang->guide_choose_comment_editor}</label>
|
||||
<div class="x_controls">
|
||||
<!--@foreach($editor_skin_list as $editor)-->
|
||||
<label class="x_inline" id="label_com_{$editor}">
|
||||
<input type="radio" name="comment_editor_skin" value="{$editor}" id="com_{$editor}" onclick="getEditorSkinColorList(this.value, null, 'reply','label_com_{$editor}')" checked="checked"|cond="$editor == $editor_config->comment_editor_skin" /> {$editor}
|
||||
</label>
|
||||
<label class="x_inline">
|
||||
<select name="sel_comment_editor_colorset" style="display:none"|cond="$editor!=$editor_config->comment_editor_skin">
|
||||
<option value="{$val->name}" selected="selected"|cond="$editor_config->sel_comment_editor_colorset == $val->name" cond="$editor==$editor_config->comment_editor_skin" loop="$editor_colorset_list=>$key,$val">{$val->title}</option>
|
||||
</select>
|
||||
</label>
|
||||
<br />
|
||||
<!--@end-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="x_control-group">
|
||||
<label for="comment_editor_height" class="x_control-label">{$lang->guide_set_height_comment_editor}</label>
|
||||
<div class="x_controls">
|
||||
<input type="number" name="comment_editor_height"id="comment_editor_height" value="{$editor_config->comment_editor_height}"|cond="$editor_config->comment_editor_height" value="{$editor_config_default['comment_editor_height']}"|cond="!$editor_config->comment_editor_height" /> px
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->guide_choose_text_formatting}</label>
|
||||
<div class="x_controls">
|
||||
<!--@foreach($content_style_list as $key => $val)-->
|
||||
<label class="x_inline">
|
||||
<input type="radio" name="content_style" value="{$key}" id="style_{$key}" checked="checked"|cond="$key==$editor_config->content_style||!$editor_config->content_style && $key=='default'"> {$val->title}
|
||||
</label>
|
||||
<!--@end-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><input type="submit" value="{$lang->cmd_save}" /></span>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->guide_choose_font_body}</label>
|
||||
<div class="x_controls">
|
||||
{@
|
||||
if($editor_config->content_font_size) $fontSize = str_replace('px','',$editor_config->content_font_size);
|
||||
else $fontSize = str_replace('px','',$editor_config_default['content_font_size']);
|
||||
}
|
||||
<div style="margin-right:14px">
|
||||
<textarea rows="4" cols="42" class="fontPreview" style="font-family:{$editor_config->content_font};font-size:{$fontSize}px;width:100%" title="Font Preview">{$lang->font_preview}</textarea>
|
||||
</div>
|
||||
<label style="font-family:''" class="fontSelector">
|
||||
<input type="radio" name="content_font" id="font_noFont" value="" checked="checked"|cond="!$editor_config->content_font && $editor_config->font_defined!= 'Y'" />none(inherit)
|
||||
</label>
|
||||
<label style="font-family:{$detail}" class="fontSelector" loop="$lang->edit->fontlist=>$name,$detail">
|
||||
<input type="radio" name="content_font" id="font_{$name}" value="{$detail}" checked="checked"|cond="stripcslashes($editor_config->content_font)==$detail && $editor_config->font_defined!= 'Y'" />{$detail}
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" name="font_defined" id="font_defined" value="Y" checked="checked"|cond="$editor_config->font_defined== 'Y'" />{$lang->by_you} :
|
||||
<input type="text" name="content_font_defined" value="{stripcslashes($editor_config->content_font)}"|cond="$editor_config->font_defined == 'Y'" />
|
||||
</label>
|
||||
<label>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="fontSize">{$lang->guide_choose_font_size_body}</label>
|
||||
<div class="x_controls">
|
||||
<input type="number" id="fontSize" name="content_font_size" value="{$fontSize}" /> px
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_clearfix btnArea">
|
||||
<div class="x_pull-right">
|
||||
<button type="submit" class="x_btn x_btn-primary">{$lang->cmd_save}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
<!-- Editor Preview -->
|
||||
<section class="section">
|
||||
<h1>{$lang->editor_component}</h1>
|
||||
<form action="./" method="post" ruleset="componentOrderAndUse">
|
||||
<input type="hidden" name="module" value="editor" />
|
||||
<input type="hidden" name="act" value="procEditorAdminCheckUseListOrder" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/editor/tpl/admin_index/1" />
|
||||
<table class="x_table x_table-striped x_table-hover sortable">
|
||||
<caption><strong>{$lang->total_count}({$component_count})</strong></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="nowr">{$lang->cmd_move}</th>
|
||||
<th>{$lang->component_name}</th>
|
||||
<th class="nowr">{$lang->version}</th>
|
||||
<th class="nowr">{$lang->author}</th>
|
||||
<th class="nowr">{$lang->path}</th>
|
||||
<th class="nowr">{$lang->use}</th>
|
||||
<th class="nowr">{$lang->cmd_delete}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="uDrag">
|
||||
<!--@foreach($component_list as $component_name => $xml_info)-->
|
||||
<tr>
|
||||
<td><div class="wrap" style="height:70px"><button type="button" class="dragBtn">Move to</button></div></td>
|
||||
<td class="title">
|
||||
<input type="hidden" name="component_names[]" value="{$xml_info->component_name}" />
|
||||
<p><b><a href="{getUrl('', 'module', 'admin', 'act', 'dispEditorAdminSetupComponent', 'component_name', $xml_info->component_name)}">{$xml_info->title}</a></b></p>
|
||||
<p>{nl2br($xml_info->description)}</p>
|
||||
<!--@if($xml_info->version && $xml_info->need_update == 'Y')-->
|
||||
<p class="update">{$lang->msg_avail_easy_update}<a href="{getUrl('act','dispAutoinstallAdminInstall','package_srl',$xml_info->package_srl)}">{$lang->msg_do_you_like_update}</a></p>
|
||||
<!--@end-->
|
||||
</td>
|
||||
<td>{$xml_info->version}</td>
|
||||
<td class="nowr">
|
||||
<a href="{$author->homepage}" target="_blank" loop="$xml_info->author => $author">{$author->name}</a>
|
||||
</td>
|
||||
<td>{$xml_info->path}</td>
|
||||
<td><input type="checkbox" name="enables[]" id="enable" value="{$xml_info->component_name}" title="Use this component " <!--@if($xml_info->enabled=='Y')--> checked="checked"<!--@end--> /></td>
|
||||
<td>
|
||||
<!--@if($xml_info->version && $xml_info->delete_url)-->
|
||||
<a href="{$xml_info->delete_url}">{$lang->cmd_delete}</a>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="x_clearfix">
|
||||
<div class="x_pull-right">
|
||||
<button type="submit" class="x_btn x_btn-primary">{$lang->cmd_save}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
<script>
|
||||
jQuery(function($){
|
||||
// Editor Preview
|
||||
function preview(){
|
||||
$('._preview iframe').css({
|
||||
width : "100%",
|
||||
height : "450px"
|
||||
});
|
||||
}
|
||||
preview();
|
||||
$('._preview li>a').click(preview);
|
||||
|
||||
//init
|
||||
var fontPreview = $('.fontPreview');
|
||||
var fontSelector = $('.fontSelector');
|
||||
var checkedFont = fontSelector.filter(':checked').css('fontFamily');
|
||||
var changedSize = $('#fontSize').val();
|
||||
|
||||
//change event
|
||||
fontSelector.change(function(){
|
||||
var myFont = $(this).css('fontFamily');
|
||||
fontPreview.css('fontFamily',myFont);
|
||||
});
|
||||
$('#fontSize').keyup(function(){
|
||||
var mySize = $(this).val();
|
||||
fontPreview.css('fontSize',mySize+'px');
|
||||
}).change(function(){$(this).keyup()});
|
||||
|
||||
$('input[name=font_defined]').click(function(){
|
||||
$('input[name=content_font]').removeAttr('checked');
|
||||
});
|
||||
$('input[name=content_font]').click(function(){
|
||||
$('input[name=font_defined]').removeAttr('checked');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<script type="text/javascript">
|
||||
<script>
|
||||
alert("{$message}");
|
||||
window.close();
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,17 +1,5 @@
|
|||
<load target="../../admin/tpl/css/admin.css" usecdn="true" />
|
||||
<div class="x" style="padding: 10px;">
|
||||
<h2 class="h2">{$lang->editor_preview}</h2>
|
||||
<h2 class="h3">{$lang->main_editor}</h2>
|
||||
<form onSubmit="return false">
|
||||
<input type="hidden" name="dummy_content" />
|
||||
<input type="hidden" name="dummy_key" value="1" />
|
||||
|
||||
<p>{$editor}</p>
|
||||
</form><br />
|
||||
<h2 class="h3">{$lang->comment_editor}</h2>
|
||||
<form onSubmit="return false">
|
||||
<input type="hidden" name="dummy_content2" />
|
||||
<input type="hidden" name="dummy_key2" value="1" />
|
||||
<p>{$editor_comment}</p>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,178 +1,122 @@
|
|||
<!--%import("filter/insert_editor_module_config.xml")-->
|
||||
<load target="js/editor_module_config.js" usecdn="true" />
|
||||
<form action="./" method="post" class="form">
|
||||
<form action="./" method="post" class="section">
|
||||
<input type="hidden" name="act" value="procEditorInsertModuleConfig" />
|
||||
<input type="hidden" name="module" value="editor" />
|
||||
<input type="hidden" name="target_module_srl" value="{$module_info->module_srl?$module_info->module_srl:$module_srls}" />
|
||||
<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />
|
||||
<h3 class="h3">{$lang->editor}</h3>
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<thead>
|
||||
<h1>{$lang->editor}</h1>
|
||||
<table class="x_table x_table-striped x_table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"> </th>
|
||||
<th scope="col" style="width:160px"> </th>
|
||||
<th scope="col">{$lang->document}</th>
|
||||
<th scope="col">{$lang->comment}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th rowspan="2" scope="row">{$lang->editor_skin}</th>
|
||||
<td colspan="2">{$lang->about_editor_skin}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row" style="text-align:right">{$lang->editor_skin}</th>
|
||||
<td>
|
||||
<select name="editor_skin" onchange="getEditorSkinColorList(this.value, null, 'document')">
|
||||
<!--@foreach($editor_skin_list as $editor)-->
|
||||
<option value="{$editor}" <!--@if($editor==$editor_config->editor_skin)-->selected="selected"<!--@end-->>{$editor}</option>
|
||||
<!--@end-->
|
||||
<option loop="$editor_skin_list => $editor" value="{$editor}" selected="selected"|cond="$editor==$editor_config->editor_skin">{$editor}</option>
|
||||
</select>
|
||||
<br/>
|
||||
<select name="sel_editor_colorset" id="sel_editor_colorset"<!--@if(!count($editor_colorset_list))--> style="display:none"<!--@end-->>
|
||||
<!--@foreach($editor_colorset_list as $key => $val)-->
|
||||
<option value="{$val->name}" <!--@if($editor_config->sel_editor_colorset == $val->name)-->selected="selected"<!--@end-->>{$val->title}</option>
|
||||
<!--@end-->
|
||||
<select name="sel_editor_colorset" id="sel_editor_colorset" data-display="none"|cond="!count($editor_colorset_list)">
|
||||
<option loop="$editor_colorset_list => $key, $val" value="{$val->name}" selected="selected"|cond="$editor_config->sel_editor_colorset == $val->name">{$val->title}</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select name="comment_editor_skin" onchange="getEditorSkinColorList(this.value, null, 'comment')">
|
||||
<!--@foreach($editor_skin_list as $editor)-->
|
||||
<option value="{$editor}" <!--@if($editor==$editor_config->comment_editor_skin)-->selected="selected"<!--@end-->>{$editor}</option>
|
||||
<!--@end-->
|
||||
<option loop="$editor_skin_list => $editor" value="{$editor}" selected="selected"|cond="$editor==$editor_config->comment_editor_skin">{$editor}</option>
|
||||
</select>
|
||||
<br/>
|
||||
<select name="sel_comment_editor_colorset" id="sel_comment_editor_colorset"<!--@if(!count($editor_comment_colorset_list))--> style="display:none"<!--@end-->>
|
||||
<!--@foreach($editor_comment_colorset_list as $key => $val)-->
|
||||
<option value="{$val->name}" <!--@if($editor_config->sel_comment_editor_colorset == $val->name)-->selected="selected"<!--@end-->>{$val->title}</option>
|
||||
<!--@end-->
|
||||
<select name="sel_comment_editor_colorset" id="sel_comment_editor_colorset" data-display="none"|cond="!count($editor_comment_colorset_list)">
|
||||
<option loop="$editor_comment_colorset_list => $key, $val" value="{$val->name}" selected="selected"|cond="$editor_config->sel_comment_editor_colorset == $val->name">{$val->title}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2" scope="row">{$lang->content_style}</th>
|
||||
<td colspan="2"><p>{$lang->about_content_style}</p></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" style="text-align:right">{$lang->content_style}</th>
|
||||
<td>
|
||||
<select name="content_style">
|
||||
<!--@foreach($content_style_list as $key => $val)-->
|
||||
<option value="{$key}" <!--@if($key==$editor_config->content_style||!$editor_config->content_style&&$key=='default')-->selected="selected"<!--@end-->>{$val->title}</option>
|
||||
<!--@end-->
|
||||
<option loop="$content_style_list => $key, $val" value="{$key}" selected="selected"|cond="$key==$editor_config->content_style||!$editor_config->content_style&&$key=='default'">{$val->title}</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select name="comment_content_style">
|
||||
<!--@foreach($content_style_list as $key => $val)-->
|
||||
<option value="{$key}" <!--@if($key==$editor_config->comment_content_style||!$editor_config->comment_content_style&&$key=='default')-->selected="selected"<!--@end-->>{$val->title}</option>
|
||||
<!--@end-->
|
||||
<option loop="$content_style_list => $key, $val" value="{$key}" selected="selected"|cond="$key==$editor_config->comment_content_style||!$editor_config->comment_content_style&&$key=='default'">{$val->title}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2" scope="row"><label for="content_font">{$lang->content_font}</label></th>
|
||||
<td colspan="2">{$lang->about_content_font}</td>
|
||||
<th scope="row" style="text-align:right">{$lang->editor_height}</th>
|
||||
<td>
|
||||
<input type="number" min="0" name="editor_height" value="{$editor_config->editor_height}" /> px
|
||||
</td>
|
||||
<td>
|
||||
<input type="number" min="0" name="comment_editor_height" value="{$editor_config->comment_editor_height}" /> px
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" style="text-align:right"><label for="content_font">{$lang->content_font}</label></th>
|
||||
<td colspan="2">
|
||||
<input type="text" name="content_font" id="content_font" value="{str_replace(array('"','\''),'',$editor_config->content_font)}" />
|
||||
<input type="text" name="content_font" id="content_font" value="{str_replace(array('"','\''),'',$editor_config->content_font)}" placeholder="Ex) Tahoma, Geneva, sans-serif" />
|
||||
{$lang->about_content_font}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2" scope="row"><label for="content_font_size">{$lang->content_font_size}</label></th>
|
||||
<td colspan="2">{$lang->about_content_font_size}</td>
|
||||
<th scope="row" style="text-align:right"><label for="content_font_size">{$lang->content_font_size}</label></th>
|
||||
<td colspan="2"><input type="text" name="content_font_size" id="content_font_size" value="{$editor_config->content_font_size}" style="width:50px" /> {$lang->about_content_font_size}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" style="text-align:right">{$lang->enable_autosave}</th>
|
||||
<td colspan="2">
|
||||
<input type="text" name="content_font_size" id="content_font_size" value="{$editor_config->content_font_size}" style="width:50px" />
|
||||
<label for="enable_autosave" class="x_inline">
|
||||
<input type="checkbox" value="Y" id="enable_autosave" name="enable_autosave" checked="checked"|cond="$editor_config->enable_autosave=='Y'" />
|
||||
{$lang->about_enable_autosave}
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2" scope="row">{$lang->editor_height}</th>
|
||||
<td colspan="2">{$lang->about_editor_height}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" style="text-align:right">{$lang->enable_html_grant}</th>
|
||||
<td>
|
||||
<input type="text" name="editor_height" value="{$editor_config->editor_height}" style="width:30px" /> px
|
||||
<label loop="$group_list => $k, $v" for="enable_html_{$k}" class="x_inline"><input type="checkbox" name="enable_html_grant[]" value="{$k}" id="enable_html_{$k}" checked="checked"|cond="in_array($k, $editor_config->enable_html_grant)" /> {$v->title}</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" name="comment_editor_height" value="{$editor_config->comment_editor_height}" style="width:30px" /> px
|
||||
<label loop="$group_list => $k, $v" for="enable_comment_html_{$k}" class="x_inline"><input type="checkbox" name="enable_comment_html_grant[]" value="{$k}" id="enable_comment_html_{$k}" checked="checked"|cond="in_array($k, $editor_config->enable_comment_html_grant)" /> {$v->title}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2" scope="row">{$lang->enable_autosave}</th>
|
||||
<td colspan="2">{$lang->about_enable_autosave}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><input type="checkbox" value="Y" name="enable_autosave" <!--@if($editor_config->enable_autosave=='Y')-->checked="checked"<!--@end-->/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2" scope="row">{$lang->enable_html_grant}</th>
|
||||
<td colspan="2">{$lang->about_enable_html_grant}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" style="text-align:right">{$lang->upload_file_grant}</th>
|
||||
<td>
|
||||
<!--@foreach($group_list as $k => $v)-->
|
||||
<input type="checkbox" name="enable_html_grant[]" value="{$k}" id="enable_html_{$k}" <!--@if(in_array($k, $editor_config->enable_html_grant))-->checked="checked"<!--@end-->/> <label for="enable_html_{$k}">{$v->title}</label>
|
||||
<!--@end-->
|
||||
<label loop="$group_list => $k, $v" for="fileupload_{$k}" class="x_inline"><input type="checkbox" name="upload_file_grant[]" value="{$k}" id="fileupload_{$k}" checked="checked"|cond="in_array($k, $editor_config->upload_file_grant)" /> {$v->title}</label>
|
||||
</td>
|
||||
<td>
|
||||
<!--@foreach($group_list as $k => $v)-->
|
||||
<input type="checkbox" name="enable_comment_html_grant[]" value="{$k}" id="enable_comment_html_{$k}" <!--@if(in_array($k, $editor_config->enable_comment_html_grant))-->checked="checked"<!--@end-->/> <label for="enable_comment_html_{$k}">{$v->title}</label>
|
||||
<!--@end-->
|
||||
<label loop="$group_list => $k, $v" for="comment_fileupload_{$k}" class="x_inline"><input type="checkbox" name="comment_upload_file_grant[]" value="{$k}" id="comment_fileupload_{$k}" checked="checked"|cond="in_array($k, $editor_config->comment_upload_file_grant)" /> {$v->title}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2" scope="row">{$lang->upload_file_grant}</th>
|
||||
<td colspan="2">{$lang->about_upload_file_grant}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" style="text-align:right">{$lang->enable_default_component_grant}</th>
|
||||
<td>
|
||||
<!--@foreach($group_list as $k => $v)-->
|
||||
<input type="checkbox" name="upload_file_grant[]" value="{$k}" id="fileupload_{$k}" <!--@if(in_array($k, $editor_config->upload_file_grant))-->checked="checked"<!--@end-->/> <label for="fileupload_{$k}">{$v->title}</label>
|
||||
<!--@end-->
|
||||
<label loop="$group_list => $k, $v" for="default_componen_{$k}" class="x_inline"><input type="checkbox" name="enable_default_component_grant[]" value="{$k}" id="default_componen_{$k}" checked="checked"|cond="in_array($k, $editor_config->enable_default_component_grant)" /> {$v->title}</label>
|
||||
</td>
|
||||
<td>
|
||||
<!--@foreach($group_list as $k => $v)-->
|
||||
<input type="checkbox" name="comment_upload_file_grant[]" value="{$k}" id="comment_fileupload_{$k}" <!--@if(in_array($k, $editor_config->comment_upload_file_grant))-->checked="checked"<!--@end-->/> <label for="comment_fileupload_{$k}">{$v->title}</label>
|
||||
<!--@end-->
|
||||
<label loop="$group_list => $k, $v" for="comment_default_component_{$k}" class="x_inline"><input type="checkbox" name="enable_comment_default_component_grant[]" value="{$k}" id="comment_default_component_{$k}" checked="checked"|cond="in_array($k, $editor_config->enable_comment_default_component_grant)" /> {$v->title}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2" scope="row">{$lang->enable_default_component_grant}</th>
|
||||
<td colspan="2">{$lang->about_default_component_grant}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row" style="text-align:right">{$lang->enable_extra_component_grant}</th>
|
||||
<td>
|
||||
<!--@foreach($group_list as $k => $v)-->
|
||||
<input type="checkbox" name="enable_default_component_grant[]" value="{$k}" id="default_componen_{$k}" <!--@if(in_array($k, $editor_config->enable_default_component_grant))-->checked="checked"<!--@end-->/> <label for="default_componen_{$k}">{$v->title}</label>
|
||||
<!--@end-->
|
||||
<label loop="$group_list => $k, $v" for="componen_{$k}" class="x_inline"><input type="checkbox" name="enable_component_grant[]" value="{$k}" id="componen_{$k}" checked="checked"|cond="in_array($k, $editor_config->enable_component_grant)" /> {$v->title}</label>
|
||||
</td>
|
||||
<td>
|
||||
<!--@foreach($group_list as $k => $v)-->
|
||||
<input type="checkbox" name="enable_comment_default_component_grant[]" value="{$k}" id="comment_default_component_{$k}" <!--@if(in_array($k, $editor_config->enable_comment_default_component_grant))-->checked="checked"<!--@end-->/> <label for="comment_default_component_{$k}">{$v->title}</label>
|
||||
<!--@end-->
|
||||
<label loop="$group_list => $k, $v" for="comment_component_{$k}" class="x_inline"><input type="checkbox" name="enable_comment_component_grant[]" value="{$k}" id="comment_component_{$k}" checked="checked"|cond="in_array($k, $editor_config->enable_comment_component_grant)" /> {$v->title}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2" scope="row">{$lang->enable_component_grant}</th>
|
||||
<td colspan="2">{$lang->about_component_grant}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<!--@foreach($group_list as $k => $v)-->
|
||||
<input type="checkbox" name="enable_component_grant[]" value="{$k}" id="componen_{$k}" <!--@if(in_array($k, $editor_config->enable_component_grant))-->checked="checked"<!--@end-->/> <label for="componen_{$k}">{$v->title}</label>
|
||||
<!--@end-->
|
||||
</td>
|
||||
<td>
|
||||
<!--@foreach($group_list as $k => $v)-->
|
||||
<input type="checkbox" name="enable_comment_component_grant[]" value="{$k}" id="comment_component_{$k}" <!--@if(in_array($k, $editor_config->enable_comment_component_grant))-->checked="checked"<!--@end-->/> <label for="comment_component_{$k}">{$v->title}</label>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><input type="submit" value="{$lang->cmd_save}"/></span>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="x_clearfix">
|
||||
<button class="x_btn x_btn-primary x_pull-right" type="submit">{$lang->cmd_save}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -128,10 +128,10 @@ function editorStart(editor_sequence, primary_key, content_key, editor_height, f
|
|||
// content 생성
|
||||
editor_path = editor_path.replace(/^\.\//ig, '');
|
||||
var contentHtml = ''+
|
||||
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'+
|
||||
'<html xmlns="http://www.w3.org/1999/xhtml><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/>'+
|
||||
'<style type="text/css">'+
|
||||
'body {font-size:.75em; line-height:1.6; font-family:Sans-serif; height:'+editor_height+'px; padding:0; margin:0; background-color:transparent; color:'+font_color+';}'+
|
||||
'<!DOCTYPE html>'+
|
||||
'<html><head><meta charset="utf-8"/>'+
|
||||
'<style>'+
|
||||
'body{font-size:.75em;line-height:1.6;font-family:Sans-serif;height:'+editor_height+'px;padding:0;margin:0;background-color:transparent;color:'+font_color+';}'+
|
||||
'</style>'+
|
||||
'</head><body editor_sequence="'+editor_sequence+'">'+
|
||||
content+
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ function resultGetEditorSkinColorList(ret_obj,response_tags, params) {
|
|||
var selectbox = null;
|
||||
jQuery(function($){
|
||||
if(params.testid){
|
||||
selectbox = $("#"+params.testid).next('label').next('select');
|
||||
selectbox = $("#"+params.testid).next('label').children('select');
|
||||
}else{
|
||||
selectbox = (params.type == 'document') ? $('select[name=sel_editor_colorset]') : $('select[name=sel_comment_editor_colorset]');
|
||||
}
|
||||
|
|
@ -36,7 +36,13 @@ function resultGetEditorSkinColorList(ret_obj,response_tags, params) {
|
|||
}
|
||||
var selectAttr = "";
|
||||
for(var i=0;i<it.length;i++){
|
||||
selectbox.append($('<option value="'+it[i].name+'" >'+it[i].title+'</option>'));
|
||||
var $options = $('<option value="'+it[i].name+'" >'+it[i].title+'</option>');
|
||||
|
||||
if(params.selected_colorset == it[i].name){
|
||||
$options.attr('selected', 'selected');
|
||||
}
|
||||
|
||||
selectbox.append($options);
|
||||
}
|
||||
selectbox.show();
|
||||
}else{
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ var defaultHandlers;
|
|||
|
||||
function init(cfg, exe) {
|
||||
var seq = cfg.editorSequence;
|
||||
|
||||
|
||||
if(!is_def(seq)) return;
|
||||
|
||||
cfg = $.extend({
|
||||
|
|
@ -437,7 +437,10 @@ function insertUploadedFile(editorSequence) {
|
|||
|
||||
// html 모드
|
||||
if(editorMode[editorSequence]=='html'){
|
||||
if(text.length>0) get_by_id('editor_textarea_'+editorSequence).value += text.join('');
|
||||
if(text.length>0 && get_by_id('editor_textarea_'+editorSequence))
|
||||
{
|
||||
get_by_id('editor_textarea_'+editorSequence).value += text.join('');
|
||||
}
|
||||
|
||||
// 위지윅 모드
|
||||
}else{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<script type="text/javascript">
|
||||
<script>
|
||||
top.xAddEventListener(window, 'load', function() { top.showPreviewContent({$editor_sequence}); } );
|
||||
</script>
|
||||
{$content}
|
||||
|
|
|
|||
|
|
@ -1,90 +1,96 @@
|
|||
<load target="css/editor.css" usecdn="true" />
|
||||
<load target="css/editor_admin.css" usecdn="true" />
|
||||
<load target="js/editor_admin.js" usecdn="true" />
|
||||
<h1 class="h1">{$lang->cmd_setup}</h1>
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<div class="x_page-header">
|
||||
<h1>{$lang->editor}</h1>
|
||||
</div>
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/editor/tpl/setup_component/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form ruleset="setupComponent" action="./" method="post">
|
||||
<input type="hidden" name="module" value="editor" />
|
||||
<input type="hidden" name="act" value="procEditorAdminSetupComponent" />
|
||||
<input type="hidden" name="component_name" value="{$component_name}" />
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->component_name}</div></th>
|
||||
<td>{$component->title}({$component->component_name}) ver. {$component->version}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->component_author}</div></th>
|
||||
<td class="blue">
|
||||
<!--@foreach($component->author as $author)-->
|
||||
{$author->name} (<a href="{$author->homepage}" onclick="window.open(this.href);return false;">{$author->homepage}</a>, <a href="mailto:{$author->email_address}">{$author->email_address}</a>)<br />
|
||||
<!--@endforeach-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@if($component->link)-->
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->component_link}</div></th>
|
||||
<td><a href="#" onclick="winopen('{$component->link}');return false;">{$component->link}</a></td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
|
||||
<!--@foreach($component->extra_vars as $key => $val)-->
|
||||
<tr class="row{$cycle_idx}">
|
||||
<th scope="row"><div>{$val->title}</div></th>
|
||||
<td>
|
||||
<input type="text" name="{$key}" value="{$val->value}" />
|
||||
<p>{$val->description}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->grant}</div></th>
|
||||
<td>
|
||||
<!--@foreach($group_list as $key => $val)-->
|
||||
<input type="checkbox" name="target_group" value="{$key}" <!--@if(in_array($key, $component->target_group))-->checked="checked"<!--@end--> id="group_{$key}"> <label for="group_{$key}">{$val->title}</label>
|
||||
<!--@end-->
|
||||
<p>{$lang->about_component_grant}</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!--@if($mid_list)-->
|
||||
<tr>
|
||||
<th scope="row"><div>
|
||||
{$lang->module}
|
||||
<input type="checkbox" onclick="XE.checkboxToggleAll('mid_list'); return false;" />
|
||||
</div></th>
|
||||
<td>
|
||||
<p>{$lang->about_component_mid}</p>
|
||||
<!--@foreach($mid_list as $module_category_srl => $modules)-->
|
||||
<div class="module_category_title">
|
||||
<input type="checkbox" onclick="XE.checkboxToggleAll('mid_list', { wrap:'section_{$module_category_srl}' }); return false;" />
|
||||
<!--@if($modules->title)-->
|
||||
{$modules->title}
|
||||
<!--@else-->
|
||||
{$lang->none_category}
|
||||
<!--@end-->
|
||||
</div>
|
||||
|
||||
<div id="section_{$module_category_srl}">
|
||||
<!--@foreach($modules->list as $key => $val)-->
|
||||
<div class="module_list">
|
||||
<input type="checkbox" value="{$key}" name="mid_list" id="chk_mid_list_{$key}" <!--@if(in_array($key, $component->mid_list))-->checked="checked"<!--@end--> />
|
||||
<label for="chk_mid_list_{$key}">{$key} ({$val->browser_title})</label>
|
||||
</div>
|
||||
<!--@end-->
|
||||
</div>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<div class="btnArea">
|
||||
<span class="btn"><a href="{getUrl('', 'module', 'admin', 'act', 'dispEditorAdminIndex')}" >{$lang->cmd_back}</a></span>
|
||||
<span class="btn"><input type="submit" value="{$lang->cmd_apply}" /></span>
|
||||
</div>
|
||||
</form>
|
||||
<section class="section">
|
||||
<h1>{$lang->cmd_setup}</h1>
|
||||
<form ruleset="setupComponent" action="./" method="post" class="x_form-horizontal">
|
||||
<input type="hidden" name="module" value="editor" />
|
||||
<input type="hidden" name="act" value="procEditorAdminSetupComponent" />
|
||||
<input type="hidden" name="component_name" value="{$component_name}" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/editor/tpl/setup_component/1" />
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->component_name}</label>
|
||||
<div class="x_controls">{$component->title}({$component->component_name}) ver. {$component->version}</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->component_author}</label>
|
||||
<div class="x_controls">
|
||||
<!--@foreach($component->author as $author)-->
|
||||
{$author->name} (<a href="{$author->homepage}" onclick="window.open(this.href);return false;">{$author->homepage}</a>, <a href="mailto:{$author->email_address}">{$author->email_address}</a>)<br />
|
||||
<!--@endforeach-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group" cond="$component->link">
|
||||
<label class="x_control-label">{$lang->component_link}</label>
|
||||
<div class="x_controls">
|
||||
<a href="#" onclick="winopen('{$component->link}');return false;">{$component->link}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group" loop="$component->extra_vars=>$key,$val">
|
||||
<label class="x_control-label">{$val->title}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="{$key}" value="{$val->value}" />
|
||||
<span class="x_help-block">{$val->description}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->grant}</label>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline" loop="$group_list=>$key,$val">
|
||||
<input type="checkbox" name="target_group[]" value="{$key}" <!--@if(in_array($key, $component->target_group))-->checked="checked"<!--@end--> id="group_{$key}"> {$val->title}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group" cond="$mid_list">
|
||||
<label class="x_control-label">
|
||||
{$lang->module}
|
||||
</label>
|
||||
<div class="x_controls">
|
||||
<span class="x_help-block">{$lang->about_component_mid}</span>
|
||||
<label class="checked" for="check_all"> <input id="check_all" type="checkbox"/> Check all</label>
|
||||
<!--@foreach($mid_list as $module_category_srl => $modules)-->
|
||||
<!--@if(count($mid_list) > 1)-->
|
||||
<fieldset>
|
||||
<legend>
|
||||
<input type="checkbox" />
|
||||
<!--@if($modules->title)-->{$modules->title}<!--@else-->{$lang->none_category}<!--@end-->
|
||||
</legend>
|
||||
<!--@end-->
|
||||
<div id="section_{$module_category_srl}">
|
||||
<!--@foreach($modules->list as $key => $val)-->
|
||||
<label>
|
||||
<input type="checkbox" value="{$key}" name="mid_list[]" id="chk_mid_list_{$key}" <!--@if(in_array($key, $component->mid_list))-->checked="checked"<!--@end--> />
|
||||
{$key} ({$val->browser_title})
|
||||
</label>
|
||||
<!--@end-->
|
||||
</div>
|
||||
<!--@if(count($mid_list) > 1)-->
|
||||
</fieldset>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_clearfix btnArea">
|
||||
<a class="x_btn x_pull-left" href="{getUrl('', 'module', 'admin', 'act', 'dispEditorAdminIndex')}" >{$lang->cmd_back}</a>
|
||||
<button type="submit" class="x_btn x_btn-primary x_pull-right">{$lang->cmd_save}</button>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
<script>
|
||||
(function($){
|
||||
$('#check_all')
|
||||
.bind('click', function(e){
|
||||
if (this.checked){
|
||||
$('input[name=mid_list\\[\\]]').attr('checked', 'checked');
|
||||
}else{
|
||||
$('input[name=mid_list\\[\\]]').removeAttr('checked');
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,76 +1,74 @@
|
|||
<load target="css/editor.css" usecdn="true" />
|
||||
<load target="../../../modules/admin/tpl/css/admin.css" usecdn="true" />
|
||||
<load target="../../../common/css/bootstrap.min.css" usecdn="true" />
|
||||
|
||||
<h1 class="h1">{$component->title} ver. {$component->version}</h1>
|
||||
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->component_author}</div></th>
|
||||
<td>
|
||||
<!--@foreach($component->author as $author)-->
|
||||
{$author->name} <!--@if($author->homepage || $author->email_address)-->(<!--@if($author->homepage)--><a href="{$author->homepage}" onclick="window.open(this.href);return false;">{$author->homepage}</a><!--@end--><!--@if($author->homepage && $author->email_address)-->, <!--@end--><!--@if($author->email_address)--><a href="mailto:{$author->email_address}">{$author->email_address}</a><!--@end-->)<!--@end--><br />
|
||||
<!--@end-->
|
||||
</tr>
|
||||
<section class="section">
|
||||
<h1>{$component->title} ver. {$component->version}</h1>
|
||||
<table class="x_table x_table-striped x_table-hover">
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->component_author}</div></th>
|
||||
<td>
|
||||
<!--@foreach($component->author as $author)-->
|
||||
{$author->name} <!--@if($author->homepage || $author->email_address)-->(<!--@if($author->homepage)--><a href="{$author->homepage}" onclick="window.open(this.href);return false;">{$author->homepage}</a><!--@end--><!--@if($author->homepage && $author->email_address)-->, <!--@end--><!--@if($author->email_address)--><a href="mailto:{$author->email_address}">{$author->email_address}</a><!--@end-->)<!--@end--><br />
|
||||
<!--@end-->
|
||||
</tr>
|
||||
<!--@if($component->homepage)-->
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->homepage}</div></th>
|
||||
<td class="blue"><a href="{$component->homepage}" onclick="window.open(this.href);return false;">{$component->homepage}</a></td>
|
||||
</tr><!--@end-->
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->regdate}</div></th>
|
||||
<td>{zdate(str_replace('-',"",$component->date), 'Y-m-d')}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->homepage}</div></th>
|
||||
<td class="blue"><a href="{$component->homepage}" onclick="window.open(this.href);return false;">{$component->homepage}</a></td>
|
||||
</tr><!--@end-->
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->regdate}</div></th>
|
||||
<td>{zdate(str_replace('-',"",$component->date), 'Y-m-d')}</td>
|
||||
</tr>
|
||||
<!--@if($component->license || $component->license_link)-->
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->component_license}</div></th>
|
||||
<td>
|
||||
{nl2br(trim($component->license))}
|
||||
<!--@if($component->license_link)-->
|
||||
<p><a href="{$component->license_link}" onclick="window.close(); return false;">{$component->license_link}</a></p>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr><!--@end-->
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->component_license}</div></th>
|
||||
<td>
|
||||
{nl2br(trim($component->license))}
|
||||
<!--@if($component->license_link)-->
|
||||
<p><a href="{$component->license_link}" onclick="window.close(); return false;">{$component->license_link}</a></p>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr><!--@end-->
|
||||
<!--@if($component->description)-->
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->component_description}</div></th>
|
||||
<td>{nl2br(trim($component->description))}</td>
|
||||
</tr><!--@end-->
|
||||
</table>
|
||||
</div>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->component_description}</div></th>
|
||||
<td>{nl2br(trim($component->description))}</td>
|
||||
</tr><!--@end-->
|
||||
</table>
|
||||
|
||||
<!--@if($component->history)-->
|
||||
<h1 class="h1">{$lang->component_history}</h1>
|
||||
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<!--@foreach($component->history as $history)-->
|
||||
<tr class="row{$cycle_idx}">
|
||||
<th scope="row"><div>
|
||||
{$history->version}<br />
|
||||
{zdate($history->date, 'Y-m-d')}
|
||||
</div></th>
|
||||
<td >
|
||||
<!--@foreach($history->author as $author)-->
|
||||
<p>{$author->name} (<a href="{$author->homepage}" onclick="window.open(this.href);return false;">{$author->homepage}</a> / <a href="mailto:{$author->email_address}">{$author->email_address}</a>)</p>
|
||||
<!--@endforeach-->
|
||||
<!--@if($history->description)-->
|
||||
<p>{nl2br(trim($history->description))}</p>
|
||||
<!--@endif-->
|
||||
<!--@if($history->logs)-->
|
||||
<ul>
|
||||
<!--@foreach($history->logs as $log)-->
|
||||
<!--@if($log->link)-->
|
||||
<li><a href="{$log->link}" onclick="window.close(); return false;">{$log->text}</a></li>
|
||||
<!--@else-->
|
||||
<li>{$log->text}</li>
|
||||
<!--@endif-->
|
||||
<!--@endforeach-->
|
||||
</ul>
|
||||
<!--@endif-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@endforeach-->
|
||||
</table>
|
||||
</div>
|
||||
<table class="x_table x_table-striped x_table-hover">
|
||||
<!--@foreach($component->history as $history)-->
|
||||
<tr class="row{$cycle_idx}">
|
||||
<th scope="row"><div>
|
||||
{$history->version}<br />
|
||||
{zdate($history->date, 'Y-m-d')}
|
||||
</div></th>
|
||||
<td >
|
||||
<!--@foreach($history->author as $author)-->
|
||||
<p>{$author->name} (<a href="{$author->homepage}" onclick="window.open(this.href);return false;">{$author->homepage}</a> / <a href="mailto:{$author->email_address}">{$author->email_address}</a>)</p>
|
||||
<!--@endforeach-->
|
||||
<!--@if($history->description)-->
|
||||
<p>{nl2br(trim($history->description))}</p>
|
||||
<!--@endif-->
|
||||
<!--@if($history->logs)-->
|
||||
<ul>
|
||||
<!--@foreach($history->logs as $log)-->
|
||||
<!--@if($log->link)-->
|
||||
<li><a href="{$log->link}" onclick="window.close(); return false;">{$log->text}</a></li>
|
||||
<!--@else-->
|
||||
<li>{$log->text}</li>
|
||||
<!--@endif-->
|
||||
<!--@endforeach-->
|
||||
</ul>
|
||||
<!--@endif-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@endforeach-->
|
||||
</table>
|
||||
<!--@endif-->
|
||||
</section>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue