merge from 1.5.2

git-svn-id: http://xe-core.googlecode.com/svn/trunk@10446 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
devjin 2012-03-20 08:03:02 +00:00
parent 6c23751ef8
commit c727926d9e
382 changed files with 6855 additions and 3603 deletions

View file

@ -110,6 +110,13 @@ var slideShow = xe.createPlugin('slideShow', {
w1 = im.$obj.prop('width');
h1 = im.$obj.prop('height');
if (w1 == 0){
w1 = im.$obj.attr('width');
}
if(h1 ==0){
h1 = im.$obj.attr('height');
}
if(w1 > iwidth - 20) {
w2 = iwidth - 20;
scale = w2 / w1;

View file

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

View file

@ -81,10 +81,10 @@
var border = parseInt($form.find('#image_border').val(), 10);
var margin = parseInt($form.find('#image_margin').val(), 10);
if($form.find('#align_normal').attr('checked') == true) align = '';
else if($form.find('#align_left').attr('checked') == true) align = 'left';
else if($form.find('#align_middle').attr('checked') == true) align = 'middle';
else if($form.find('#align_right').attr('checked') == true) align = 'right';
if($form.find('#align_normal').attr('checked') == 'checked') align = '';
else if($form.find('#align_left').attr('checked') == 'checked') align = 'left';
else if($form.find('#align_middle').attr('checked') == 'checked') align = 'middle';
else if($form.find('#align_right').attr('checked') == 'checked') align = 'right';
var width = $form.find('#width').val();
var height = $form.find('#height').val();

View file

@ -120,14 +120,7 @@
$this->setMessage('success_updated');
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) {
global $lang;
htmlHeader();
alertScript($lang->success_updated);
reload(true);
closePopupScript();
htmlFooter();
Context::close();
exit;
$this->setRedirectUrl(Context::get('error_return_url'));
}
}

View file

@ -157,7 +157,6 @@
**/
function triggerEditorComponentCompile(&$content) {
if(Context::getResponseMethod()!='HTML') return new Object();
if(Mobile::isFromMobilePhone()) return new Object();
$module_info = Context::get('module_info');
$module_srl = $module_info->module_srl;
@ -183,7 +182,7 @@
$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>';
$buff .= ' }</style>';
Context::addHtmlHeader($buff);
}
}

View file

@ -195,6 +195,10 @@
* Editor's default options
**/
// Option setting to allow file upload
if($upload_target_srl)
{
$option->editor_sequence = $upload_target_srl;
}
if(!$option->allow_fileupload) $allow_fileupload = false;
else $allow_fileupload = true;
// content_style setting
@ -248,8 +252,8 @@
**/
if($option->editor_sequence) $editor_sequence = $option->editor_sequence;
else {
if(!$GLOBALS['_editor_sequence_']) $GLOBALS['_editor_sequence_'] = 1;
$editor_sequence = $GLOBALS['_editor_sequence_'] ++;
if(!$_SESSION['_editor_sequence_']) $_SESSION['_editor_sequence_'] = 1;
$editor_sequence = $_SESSION['_editor_sequence_'] ++;
}
/**

View file

@ -130,7 +130,6 @@
$oModuleModel = &getModel('module');
$skin_info = $oModuleModel->loadSkinInfo($this->module_path,$skin);
$colorset = $skin_info->colorset;
Context::set('colorset', $colorset);
}

View file

@ -1449,14 +1449,14 @@ 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[Phím nóng]]></value>
</item>
<item name="lineheight">
<value xml:lang="ko"><![CDATA[줄 간격]]></value>
<value xml:lang="ko"><![CDATA[줄간격]]></value>
<value xml:lang="en"><![CDATA[Line Height]]></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="fr"><![CDATA[Line Height]]></value>
<value xml:lang="ru"><![CDATA[Высота строки]]></value>
<value xml:lang="es"><![CDATA[줄간격]]></value>
<value xml:lang="es"><![CDATA[Line Height]]></value>
<value xml:lang="tr"><![CDATA[Satır Yüksekliği]]></value>
<value xml:lang="vi"><![CDATA[Chiều cao dòng]]></value>
</item>
@ -1908,6 +1908,11 @@ 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[Düzen Formunun Boyutunu Ayarla]]></value>
<value xml:lang="vi"><![CDATA[Đặt kích thước mẫu]]></value>
</item>
<item name="edit_height_auto">
<value xml:lang="ko"><![CDATA[입력창 크기 자동조절]]></value>
<value xml:lang="en"><![CDATA[Auto-resize editor]]></value>
<value xml:lang="jp"><![CDATA[入力ボックスサイズの自動調節]]></value>
</item>
<item name="merge_cells">
<value xml:lang="ko"><![CDATA[셀 병합]]></value>
<value xml:lang="en"><![CDATA[Merge Table Cells]]></value>

View file

@ -89,9 +89,9 @@
.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 .inputText{ 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 .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 .inputTextarea{ 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 .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;}

View file

@ -3,7 +3,7 @@
<div class="wArea fold">
<fieldset>
<legend>{$lang->edit->fold}</legend>
<input name="" type="text" class="inputText" value="" title="{$lang->edit->fold_default}" />
<input name="" type="text" class="iText" value="" title="{$lang->edit->fold_default}" />
<div class="buttonArea">
<span class="buttonGray medium strong"><button type="button"><img src="iconCheckSmall.gif" width="12" height="8" alt="" class="icon" />{$lang->cmd_confirm}</button></span>
<span class="buttonGray medium"><button type="button"><img src="buttonCloseLayerX.gif" width="7" height="7" alt="" class="icon" />{$lang->cmd_cancel}</button></span>

View file

@ -282,9 +282,9 @@
<!-- class="wArea link" | class="wArea link open" -->
<fieldset>
<legend>{$lang->edit->link}</legend>
<input name="" type="text" class="inputText" value="" title="{$lang->edit->insert_site_name}" />
<input name="" type="text" class="iText" value="" title="{$lang->edit->insert_site_name}" />
<input name="" type="text" class="inputLink" value="" title="http://" />
<input name="" type="text" class="inputText" value="" title="{$lang->edit->insert_explain}" />
<input name="" type="text" class="iText" value="" title="{$lang->edit->insert_explain}" />
<div class="buttonArea">
<span class="buttonGray medium strong"><button type="button" title="Ctrl+Enter"><img src="img/iconCheckSmall.gif" width="12" height="8" alt="" class="icon" />{$lang->cmd_confirm}</button></span>
<span class="buttonGray medium"><button type="button" title="ESC"><img src="img/buttonCloseLayerX.gif" width="7" height="7" alt="" class="icon" />{$lang->cmd_cancel}</button></span>
@ -327,8 +327,8 @@
<!-- class="wArea blockquote" | class="wArea blockquote open" -->
<fieldset>
<legend>{$lang->edit->blockquote}</legend>
<textarea name="" cols="50" rows="5" class="inputTextarea" title="{$lang->edit->insert_blockquote}"></textarea>
<input name="" type="text" class="inputText" value="" title="{$lang->edit->insert_cite}" />
<textarea name="" rows="8" cols="42" class="iTextArea" title="{$lang->edit->insert_blockquote}"></textarea>
<input name="" type="text" class="iText" value="" title="{$lang->edit->insert_cite}" />
<div class="buttonArea">
<span class="buttonGray medium strong"><button type="button" title="Ctrl+Enter"><img src="img/iconCheckSmall.gif" width="12" height="8" alt="" class="icon" />{$lang->cmd_confirm}</button></span>
<span class="buttonGray medium"><button type="button" title="ESC"><img src="img/buttonCloseLayerX.gif" width="7" height="7" alt="" class="icon" />{$lang->cmd_cancel}</button></span>
@ -368,7 +368,7 @@
</dl>
<p class="resizeError">{$lang->edit->resize_error}</p>
</div>
<input name="" type="text" class="inputText desc" value="" title="{$lang->edit->insert_image_explain}" />
<input name="" type="text" class="iText desc" value="" title="{$lang->edit->insert_image_explain}" />
<div class="buttonArea">
<span class="buttonGray medium strong"><button type="button" title="Ctrl+Enter"><img src="img/iconCheckSmall.gif" width="12" height="8" alt="" class="icon" />{$lang->cmd_confirm}</button></span>
<span class="buttonGray medium"><button type="button" title="ESC"><img src="img/buttonCloseLayerX.gif" width="7" height="7" alt="" class="icon" />{$lang->cmd_cancel}</button></span>
@ -384,9 +384,9 @@
<!-- class="wArea mov" | class="wArea mov open" -->
<fieldset>
<legend>{$lang->edit->mov}</legend>
<textarea name="" cols="50" rows="5" class="inputTextarea" title="{$lang->edit->insert_mov}"></textarea>
<textarea name="" cols="50" rows="5" class="inputTextarea" title="{$lang->edit->insert_mov_explain}"></textarea>
<input name="" type="text" class="inputText" value="" title="{$lang->edit->insert_cite}" />
<textarea name="" rows="8" cols="42" class="iTextArea" title="{$lang->edit->insert_mov}"></textarea>
<textarea name="" rows="8" cols="42" class="iTextArea" title="{$lang->edit->insert_mov_explain}"></textarea>
<input name="" type="text" class="iText" value="" title="{$lang->edit->insert_cite}" />
<div class="buttonArea">
<span class="buttonGray medium strong"><button type="button" title="Ctrl+Enter"><img src="img/iconCheckSmall.gif" width="12" height="8" alt="" class="icon" />{$lang->cmd_confirm}</button></span>
<span class="buttonGray medium"><button type="button" title="ESC"><img src="img/buttonCloseLayerX.gif" width="7" height="7" alt="" class="icon" />{$lang->cmd_cancel}</button></span>
@ -431,8 +431,8 @@
</dl>
<p class="summary">{$lang->edit->file_total} <em class="filesize">{total_filesize}</em></p>
<div class="hr"></div>
<input name="" type="text" class="inputText" value="" title="{$lang->edit->insert_file_explain}" />
<input name="" type="text" class="inputText" value="" title="{$lang->edit->insert_cite}" />
<input name="" type="text" class="iText" value="" title="{$lang->edit->insert_file_explain}" />
<input name="" type="text" class="iText" value="" title="{$lang->edit->insert_cite}" />
<div class="buttonArea">
<span class="buttonGray medium strong"><button type="button" title="Ctrl+Enter"><img src="img/iconCheckSmall.gif" width="12" height="8" alt="" class="icon" />{$lang->cmd_confirm}</button></span>
<span class="buttonGray medium"><button type="button" title="ESC"><img src="img/buttonCloseLayerX.gif" width="7" height="7" alt="" class="icon" />{$lang->cmd_cancel}</button></span>

View file

@ -17,7 +17,7 @@
.xpress-editor li{list-style:none}
/* Layout Selector */
.xpress-editor{position:relative;background:transparent}
.xpress-editor #smart_content{position:relative;clear:both;margin:0 0 10px 0;border:1px solid #c2c2c2;*zoom:1;z-index:5;background:#fff}
.xpress-editor #smart_content{position:relative;clear:both;margin:0 0 10px 0;border:1px solid #c2c2c2;*zoom:1;z-index:1;background:#fff}
.xpress-editor.black #smart_content {background:transparent}
.xpress-editor #smart_footer{position:relative;text-align:center;padding:10px 0}
/* Footer */
@ -28,7 +28,7 @@
.xpress-editor #smart_footer input{margin:0}
.xpress-editor #smart_footer input.reset{width:67px;height:25px;border:0;background:url(../img/btn_cancel.gif) no-repeat;cursor:pointer;margin-left:5px}
/* Content > Input Area */
.xpress-editor a.skip{position:relative;display:block;top:0;right:0;width:0;height:0;overflow:hidden;clear:both;zoom:1}
.xpress-editor a.skip{position:absolute;display:block;top:0;right:0;width:1px;height:1px;overflow:hidden;clear:both;zoom:1}
.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}
@ -37,8 +37,12 @@
.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;background:#fbfbfb url(../img/btn_expand.gif) no-repeat center center;cursor:n-resize}
.xpress-editor .input_control span{display:block;height:10px;visibility:hidden;overflow:visible;font-size:0;line-height:200%;white-space:nowrap;color:#fff}
.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:200%;white-space:nowrap;color:#fff}
.xpress-editor .input_auto{position:relative;z-index:2;display:inline-block;margin:-20px 0 0 0;padding:3px 0 0 8px;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.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}
@ -56,7 +60,7 @@
.xpress-editor .tool ul.extra3{float:left;width:auto;z-index:1;margin-right:1px}
.xpress-editor .tool ul.extra3 li{margin-right:4px}
.xpress-editor .tool li{position:relative;float:left;margin:0 !important;padding:0 !important;border:0 !important}
.xpress-editor .tool li button{width:21px;height:21px;background:url(../img/btn_set.gif) no-repeat 0 0;vertical-align:top}
.xpress-editor .tool li button{width:21px;height:21px;background:url(../img/btn_set.gif) no-repeat 0 0;vertical-align:top;float:left}
.xpress-editor.black .tool li button{width:21px;height:21px;background:url(../img/btn_set.black.gif) no-repeat 0 0;vertical-align:top}
.xpress-editor .tool li button span{position:absolute;top:0;left:0;width:0;height:0;overflow:hidden;visibility:hidden}
.xpress-editor .tool li.extensions span.exButton,
@ -77,7 +81,8 @@
.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:62px}
.xpress-editor .tool ul.type li select{height:21px;width:64px;white-space:nowrap}
.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 */
.xpress-editor .tool li.undo button{width:22px;background-position:0 0}
@ -214,7 +219,7 @@
.xpress-editor .tool .layer{display:none;position:absolute;left:0;top:20px;background-color:#fbfbfb;border:1px solid #c5c5c5;border-right:1px solid #9f9f9f;border-bottom:1px solid #9f9f9f}
.xpress-editor .tool .layer li{float:none;left:0}
.xpress-editor .tool .layer button,
.xpress-editor.black .tool .layer button{margin:0 !important;width:auto;height:auto;background:none}
.xpress-editor.black .tool .layer button{margin:0 !important;width:auto;height:auto;background:none;float:none}
.xpress-editor .tool .layer button span{position:absolute;width:0;height:0;font-size:0;line-height:0;overflow:hidden;visibility:hidden}
.xpress-editor .tool .btn_area{position:relative;clear:both;text-align:center !important;padding:7px 0 12px 0;width:100%;white-space:nowrap;*zoom:1}
.xpress-editor .tool .btn_area *{vertical-align:top}
@ -225,27 +230,27 @@
.xpress-editor .tool .layer .btn_area button.cancel{width:38px;height:21px;background:url(../img/btn_layer_cancel.gif) no-repeat}
.xpress-editor .tool li.fcolor .layer{width:218px !important;height:auto !important;background-image:none !important;overflow:hidden}
.xpress-editor .tool .layer .palette{width:210px;position:relative;left:7px;padding:8px 0 7px 0;margin:0}
.xpress-editor .tool .layer .palette li{float:left;margin:0 1px 1px 0;font-size:0;line-height:0}
.xpress-editor .tool .layer .palette li{float:left;margin:0 1px 1px 0 !important;font-size:0;line-height:0}
.xpress-editor .tool .layer .palette button{position:relative;overflow:hidden;width:11px !important;height:11px !important}
.xpress-editor .tool li.bcolor .layer {width:218px;overflow:hidden}
.xpress-editor .tool .layer .background{width:210px;position:relative;left:7px;margin:0 0 -2px 0;padding:8px 0 0 0;*padding-bottom:8px;_padding-bottom:4px}
.xpress-editor .tool .layer .background li{float:left;margin:0 5px 2px 0}
.xpress-editor .tool .layer .background li{float:left;margin:0 5px 2px 0 !important}
.xpress-editor .tool .layer .background button{position:relative;overflow:hidden;width:65px;height:19px;text-align:left;padding:4px}
.xpress-editor .tool .layer .background button span{position:relative;visibility:visible;font-size:12px;line-height:normal;width:auto;height:auto}
.xpress-editor .tool li.style .layer{padding:4px 2px;_overflow:hidden;filter:progid:DXImageTransform.Microsoft.Shadow(color=#dddddd,direction=135,strength=2)}
.xpress-editor .tool li.style .layer li{position:relative;background:#fbfbfb}
.xpress-editor .tool li.style .layer li button{display:block;width:134px;position:relative}
.xpress-editor .tool li.style .layer li button span{display:block;width:130px;text-align:left;letter-spacing:normal}
.xpress-editor .tool li.style .layer li.h3 button span{padding:3px 0 1px 4px;height:15px;_height /**/:19px;font-size:16px;font-weight:bold}
.xpress-editor .tool li.style .layer li.h4 button span{padding:3px 0 2px 4px;height:13px;_height /**/:18px;font-size:14px;font-weight:bold}
.xpress-editor .tool li.style .layer li.h5 button span{padding:3px 0 1px 4px;height:11px;_height /**/:15px;font-size:12px;font-weight:bold}
.xpress-editor .tool li.style .layer li.h6 button span{padding:3px 0 1px 4px;height:11px;_height /**/:15px;font-size:12px}
.xpress-editor .tool li.style .layer li.p button span{padding:3px 0 1px 4px;height:11px;_height /**/:15px;font-size:12px;color:#5d5d5d}
.xpress-editor .tool li.style .layer li.h3 button span{padding:3px 0 1px 4px;height:15px;font-size:16px;font-weight:bold}
.xpress-editor .tool li.style .layer li.h4 button span{padding:3px 0 2px 4px;height:13px;font-size:14px;font-weight:bold}
.xpress-editor .tool li.style .layer li.h5 button span{padding:3px 0 1px 4px;height:11px;font-size:12px;font-weight:bold}
.xpress-editor .tool li.style .layer li.h6 button span{padding:3px 0 1px 4px;height:11px;font-size:12px}
.xpress-editor .tool li.style .layer li.p button span{padding:3px 0 1px 4px;height:11px;font-size:12px;color:#5d5d5d}
.xpress-editor .tool li.style .layer li button.hover{background:#c1f471;*height:1%}
.xpress-editor .tool li.blockquote .layer{padding:6px 5px 6px 7px;left:0;width:288px}
.xpress-editor .tool li.blockquote .layer{padding:6px 0 6px 7px;left:0;width:294px}
.xpress-editor .tool li.blockquote .layer ul{*zoom:1;margin:0}
.xpress-editor .tool li.blockquote .layer ul:after{content:"";display:block;clear:both}
.xpress-editor .tool li.blockquote .layer li{position:relative;float:left;overflow:hidden;width:32px;height:34px;margin:0 2px 0 0;border:1px solid #cdcecc;background-image:url(../img/btn_qmark.gif);background-repeat:no-repeat}
.xpress-editor .tool li.blockquote .layer li{position:relative;float:left;overflow:hidden;width:32px;height:34px;margin:0 2px 0 0 !important;border:1px solid #cdcecc !important;background-image:url(../img/btn_qmark.gif);background-repeat:no-repeat}
.xpress-editor .tool li.blockquote .layer li.q1{background-position:0 0}
.xpress-editor .tool li.blockquote .layer li.q2{background-position:-32px 0}
.xpress-editor .tool li.blockquote .layer li.q3{background-position:-64px 0}
@ -302,14 +307,14 @@
.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;background:url(../img/vr_layer_character.gif) no-repeat 0 0}
.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 .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}
.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}
.xpress-editor .tool li.character .layer .list li button.hover{border:2px solid #27c11a}
.xpress-editor .tool li.character .layer .list li button span{overflow:visible;font-size:12px;width:auto;height:auto;position:relative;visibility:visible;line-height:normal}

File diff suppressed because one or more lines are too long

View file

@ -16,7 +16,7 @@
<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;" cols="50" rows="5" class="inputTextarea"></textarea>
<textarea id="editor_{$editor_sequence}" style="height:{$editor_height}px;" rows="8" cols="42" class="iTextArea"></textarea>
</div>
<script type="text/javascript">//<![CDATA[
editorStartTextarea({$editor_sequence}, "{$editor_content_key_name}", "{$editor_primary_key_name}");
@ -422,8 +422,6 @@
<li class="html"><span><button class="xpress_xeditor_mode_toggle_button" type="button" title="{$lang->edit->html_editor}">{$lang->edit->html_editor}</button></span></li>
<!--// li class="preview"><span><button type="button" class="xpress_xeditor_preview_button" title="{$lang->cmd_preview}">{$lang->cmd_preview}</button></span></li-->
</ul>
</div>
<!--@else-->
<div class="tool off disable"></div>
@ -431,7 +429,7 @@
<!-- 에디터 출력 -->
<div id="xe-editor-container-{$editor_sequence}" class="input_area xpress_xeditor_editing_area_container">
<textarea id="xpress-editor-{$editor_sequence}" cols="10" rows="10"></textarea>
<textarea id="xpress-editor-{$editor_sequence}" rows="8" cols="42"></textarea>
</div>
<!--@if($enable_autosave)-->
@ -440,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>
</div>
<div id="fileUploader_{$editor_sequence}" class="fileUploader" cond="$allow_fileupload"><!--File upload zone-->

View file

@ -1370,16 +1370,17 @@ xe.XpressRange = $.Class({
oParentNode = xe.DOMFix.parentNode(oNode);
if(oParentNode.tagName == "SPAN"){
var parentText = $(oParentNode).html();
// check if the SPAN element is fully contained
// do quick checks before trying indexOf() because indexOf() function is very slow
oTmpNode = this._getVeryFirstRealChild(oParentNode);
if(oTmpNode == oNode) iSIdx = 1;
else iSIdx = arAllBottmNodes.indexOf(oTmpNode);
else iSIdx = parentText.indexOf(oTmpNode);
if(iSIdx != -1){
oTmpNode = this._getVeryLastRealChild(oParentNode);
if(oTmpNode == oNode) iEIdx = 1;
else iEIdx = arAllBottmNodes.indexOf(oTmpNode);
else iEIdx = parentText.indexOf(oTmpNode);
}
if(iSIdx != -1 && iEIdx != -1){
@ -5047,6 +5048,44 @@ xe.XE_EditingModeToggler = $.Class({
}
}
});
xe.XE_Editorresize = $.Class({
name : "XE_Editorresize",
$init : function(elAppContainer, oWYSIWYGIFrame){
this.inputArea = $('.xpress_xeditor_editing_area_container', elAppContainer).get(0);
this.oVerticalResizer = $('.xpress_xeditor_editingArea_verticalResizer', elAppContainer).get(0);
this.oCheckBox = $('#editorresize', elAppContainer).get(0);
this.oIframe = oWYSIWYGIFrame;
var self = this;
$(oWYSIWYGIFrame).load(function(){
self.oIframeBody = $(oWYSIWYGIFrame).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 == undefined)
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{
$(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';
}
});
//}
/**
* @fileOverview This file contains a message mapping(Korean), which is used to map the message code to the actual message
@ -5105,7 +5144,6 @@ xe.XE_XHTMLFormatter = $.Class({
TO_IR : function(sContent) {
var stack = [];
// remove xeHandled attrs
/*
sContent = sContent.replace(/xeHandled="YES"/ig,'');
@ -5172,19 +5210,26 @@ xe.XE_XHTMLFormatter = $.Class({
return '<'+tag+' '+$.trim(attrs)+'>';
} else {
stack[stack.length] = {tag:tag, state:state};
stack.push({tag:tag, state:state});
}
} else {
var tags = [], t = '';
// remove unnecessary closing tag
if (!stack.length) return '';
if (!stack.length){
return '';
}
do {
t = stack.pop();
if (t.tag != tag) continue;
if (t.state != 'deleted') tags.push('</'+t.tag+'>');
} while(stack.length && t.tag != tag);
t = stack[stack.length-1];
if (t.tag != tag){
continue;
}
if (t.state != 'deleted'){
tags.push('</'+t.tag+'>');
}
stack.pop();
} while(stack.length && t.tag == tag);
return tags.join('');
}
@ -5199,8 +5244,13 @@ xe.XE_XHTMLFormatter = $.Class({
t = stack.pop();
if (t.state != 'deleted') sContent += '</'+t.tag+'>';
} while(stack.length);
}
// add new line after </p>
regex = /<\/p>[ \t]*(\n)?/ig;
sContent = sContent.replace(regex, "</p>\n");
return sContent;
},
@ -5248,7 +5298,7 @@ xe.XE_Extension = $.Class({
$(doc).find('img,div[editor_component]').each(function(){
var obj = $(this);
if(this.nodeName == 'IMG' && !obj.attr('editor_component')) {
if(this.nodeName == 'IMG' && !obj.attr('editor_component') && !obj.attr('widget')) {
obj.attr('editor_component','image_link');
}
if(this.last_doc != doc) {
@ -5763,4 +5813,15 @@ 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);

View file

@ -11,8 +11,8 @@ function editorStart_xe(editor_sequence, primary_key, content_key, editor_height
var target_src = request_uri+'modules/editor/styles/'+content_style+'/editor.html';
var textarea = jQuery("#xpress-editor-"+editor_sequence);
var iframe = jQuery('<iframe id="editor_iframe_'+editor_sequence+'" allowTransparency="true" frameborder="0" src="'+target_src+'" scrolling="yes" style="width:100%;height:'+editor_height+'px">');
var htmlsrc = jQuery('<textarea rows="10" cols="20" class="input_syntax '+colorset+'" style="display:none"></textarea>');
var iframe = jQuery('<iframe id="editor_iframe_'+editor_sequence+'" allowTransparency="true" frameborder="0" src="'+target_src+'" scrolling="yes" style="width:100%;height:'+editor_height+'px"></iframe>');
var htmlsrc = jQuery('<textarea rows="8" cols="42" class="input_syntax '+colorset+'" style="display:none"></textarea>');
var form = textarea.get(0).form;
form.setAttribute('editor_sequence', editor_sequence);
textarea.css("display","none");
@ -63,7 +63,7 @@ function editorStart_xe(editor_sequence, primary_key, content_key, editor_height
oEditor.registerPlugin(new xe.XE_PreservTemplate(jQuery("#xpress-editor-"+editor_sequence).val()));
oEditor.registerPlugin(new xe.StringConverterManager());
oEditor.registerPlugin(new xe.XE_EditingAreaManager("WYSIWYG", oIRTextarea, {nHeight:parseInt(editor_height), nMinHeight:205}, null, elAppContainer));
oEditor.registerPlugin(new xe.XE_EditingAreaManager("WYSIWYG", oIRTextarea, {nHeight:parseInt(editor_height), nMinHeight:100}, null, elAppContainer));
oEditor.registerPlugin(new xe.XE_EditingArea_HTMLSrc(oHTMLSrcTextarea));
oEditor.registerPlugin(new xe.XE_EditingAreaVerticalResizer(elAppContainer));
oEditor.registerPlugin(new xe.Utils());
@ -101,7 +101,9 @@ function editorStart_xe(editor_sequence, primary_key, content_key, editor_height
oEditor.registerPlugin(new xe.XE_EditingModeToggler(elAppContainer));
}
if(jQuery("#editorresize").length) {
oEditor.registerPlugin(new xe.XE_Editorresize(elAppContainer, oWYSIWYGIFrame));
}
//oEditor.registerPlugin(new xe.XE_Preview(elAppContainer));
if (!jQuery.browser.msie && !jQuery.browser.opera) {
@ -119,6 +121,7 @@ function editorStart_xe(editor_sequence, primary_key, content_key, editor_height
if (doc.location == 'about:blank') throw 'blank';
// get innerHTML
doc.body.innerHTML = doc.body.innerHTML.trim();
str = doc.body.innerHTML;
// register plugin

View file

@ -1370,16 +1370,17 @@ xe.XpressRange = $.Class({
oParentNode = xe.DOMFix.parentNode(oNode);
if(oParentNode.tagName == "SPAN"){
var parentText = $(oParentNode).html();
// check if the SPAN element is fully contained
// do quick checks before trying indexOf() because indexOf() function is very slow
oTmpNode = this._getVeryFirstRealChild(oParentNode);
if(oTmpNode == oNode) iSIdx = 1;
else iSIdx = arAllBottmNodes.indexOf(oTmpNode);
else iSIdx = parentText.indexOf(oTmpNode);
if(iSIdx != -1){
oTmpNode = this._getVeryLastRealChild(oParentNode);
if(oTmpNode == oNode) iEIdx = 1;
else iEIdx = arAllBottmNodes.indexOf(oTmpNode);
else iEIdx = parentText.indexOf(oTmpNode);
}
if(iSIdx != -1 && iEIdx != -1){
@ -5047,6 +5048,44 @@ xe.XE_EditingModeToggler = $.Class({
}
}
});
xe.XE_Editorresize = $.Class({
name : "XE_Editorresize",
$init : function(elAppContainer, oWYSIWYGIFrame){
this.inputArea = $('.xpress_xeditor_editing_area_container', elAppContainer).get(0);
this.oVerticalResizer = $('.xpress_xeditor_editingArea_verticalResizer', elAppContainer).get(0);
this.oCheckBox = $('#editorresize', elAppContainer).get(0);
this.oIframe = oWYSIWYGIFrame;
var self = this;
$(oWYSIWYGIFrame).load(function(){
self.oIframeBody = $(oWYSIWYGIFrame).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 == undefined)
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{
$(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';
}
});
//}
/**
* @fileOverview This file contains a message mapping(Korean), which is used to map the message code to the actual message
@ -5105,7 +5144,6 @@ xe.XE_XHTMLFormatter = $.Class({
TO_IR : function(sContent) {
var stack = [];
// remove xeHandled attrs
/*
sContent = sContent.replace(/xeHandled="YES"/ig,'');
@ -5172,19 +5210,26 @@ xe.XE_XHTMLFormatter = $.Class({
return '<'+tag+' '+$.trim(attrs)+'>';
} else {
stack[stack.length] = {tag:tag, state:state};
stack.push({tag:tag, state:state});
}
} else {
var tags = [], t = '';
// remove unnecessary closing tag
if (!stack.length) return '';
if (!stack.length){
return '';
}
do {
t = stack.pop();
if (t.tag != tag) continue;
if (t.state != 'deleted') tags.push('</'+t.tag+'>');
} while(stack.length && t.tag != tag);
t = stack[stack.length-1];
if (t.tag != tag){
continue;
}
if (t.state != 'deleted'){
tags.push('</'+t.tag+'>');
}
stack.pop();
} while(stack.length && t.tag == tag);
return tags.join('');
}
@ -5199,8 +5244,13 @@ xe.XE_XHTMLFormatter = $.Class({
t = stack.pop();
if (t.state != 'deleted') sContent += '</'+t.tag+'>';
} while(stack.length);
}
// add new line after </p>
regex = /<\/p>[ \t]*(\n)?/ig;
sContent = sContent.replace(regex, "</p>\n");
return sContent;
},
@ -5248,7 +5298,7 @@ xe.XE_Extension = $.Class({
$(doc).find('img,div[editor_component]').each(function(){
var obj = $(this);
if(this.nodeName == 'IMG' && !obj.attr('editor_component')) {
if(this.nodeName == 'IMG' && !obj.attr('editor_component') && !obj.attr('widget')) {
obj.attr('editor_component','image_link');
}
if(this.last_doc != doc) {
@ -5763,6 +5813,17 @@ 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 = {};
@ -5777,8 +5838,8 @@ function editorStart_xe(editor_sequence, primary_key, content_key, editor_height
var target_src = request_uri+'modules/editor/styles/'+content_style+'/editor.html';
var textarea = jQuery("#xpress-editor-"+editor_sequence);
var iframe = jQuery('<iframe id="editor_iframe_'+editor_sequence+'" allowTransparency="true" frameborder="0" src="'+target_src+'" scrolling="yes" style="width:100%;height:'+editor_height+'px">');
var htmlsrc = jQuery('<textarea rows="10" cols="20" class="input_syntax '+colorset+'" style="display:none"></textarea>');
var iframe = jQuery('<iframe id="editor_iframe_'+editor_sequence+'" allowTransparency="true" frameborder="0" src="'+target_src+'" scrolling="yes" style="width:100%;height:'+editor_height+'px"></iframe>');
var htmlsrc = jQuery('<textarea rows="8" cols="42" class="input_syntax '+colorset+'" style="display:none"></textarea>');
var form = textarea.get(0).form;
form.setAttribute('editor_sequence', editor_sequence);
textarea.css("display","none");
@ -5829,7 +5890,7 @@ function editorStart_xe(editor_sequence, primary_key, content_key, editor_height
oEditor.registerPlugin(new xe.XE_PreservTemplate(jQuery("#xpress-editor-"+editor_sequence).val()));
oEditor.registerPlugin(new xe.StringConverterManager());
oEditor.registerPlugin(new xe.XE_EditingAreaManager("WYSIWYG", oIRTextarea, {nHeight:parseInt(editor_height), nMinHeight:205}, null, elAppContainer));
oEditor.registerPlugin(new xe.XE_EditingAreaManager("WYSIWYG", oIRTextarea, {nHeight:parseInt(editor_height), nMinHeight:100}, null, elAppContainer));
oEditor.registerPlugin(new xe.XE_EditingArea_HTMLSrc(oHTMLSrcTextarea));
oEditor.registerPlugin(new xe.XE_EditingAreaVerticalResizer(elAppContainer));
oEditor.registerPlugin(new xe.Utils());
@ -5867,7 +5928,9 @@ function editorStart_xe(editor_sequence, primary_key, content_key, editor_height
oEditor.registerPlugin(new xe.XE_EditingModeToggler(elAppContainer));
}
if(jQuery("#editorresize").length) {
oEditor.registerPlugin(new xe.XE_Editorresize(elAppContainer, oWYSIWYGIFrame));
}
//oEditor.registerPlugin(new xe.XE_Preview(elAppContainer));
if (!jQuery.browser.msie && !jQuery.browser.opera) {
@ -5885,6 +5948,7 @@ function editorStart_xe(editor_sequence, primary_key, content_key, editor_height
if (doc.location == 'about:blank') throw 'blank';
// get innerHTML
doc.body.innerHTML = doc.body.innerHTML.trim();
str = doc.body.innerHTML;
// register plugin
@ -6041,4 +6105,4 @@ xe.XE_Preview = jQuery.Class({
$ON_EVENT_PREVIEW : function() {
// TODO : 버튼이 눌렸을 때의 동작 정의
}
});
});

View file

@ -1,136 +1,137 @@
(function(c){function l(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(){if("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=l;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 e=d.concat(c.makeArray(arguments));return a.apply(b,e)}}});c.browser.nVersion=parseFloat(c.browser.version);if("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)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,e){a=c.fnBind(this.exec,this,a,b,e);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 e=!1;if(!this.oDisabledCommand[a]){var c=[];if(b&&b.length)for(var e=b.length,g=0;g<e;g++)c[g]=b[g];d&&(c[c.length]=d);(e=this._execMsgStep("BEFORE",a,c))&&(e=this._execMsgStep("ON",a,c));e&&(e=this._execMsgStep("AFTER",
a,c))}return e},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,e,f){a&&(e=e||[],d=f?c.fnBind(this.delayedExec,this,d,e,f):c.fnBind(this.exec,this,d,e),c(a).bind(b,d))},run:function(){this._changeAppStatus(xe.APP_STATUS.WAITING_FOR_PLUGINS_READY);
(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 e=d.concat(c.makeArray(arguments));return a.apply(b,e)}}});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,e){a=c.fnBind(this.exec,this,a,b,e);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 e=false;if(!this.oDisabledCommand[a]){var c=[];if(b&&b.length)for(var e=b.length,g=0;g<e;g++)c[g]=b[g];d&&(c[c.length]=d);(e=this._execMsgStep("BEFORE",a,c))&&(e=this._execMsgStep("ON",a,c));e&&(e=this._execMsgStep("AFTER",
a,c))}return e},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,e,f){if(a){e=e||[];d=f?c.fnBind(this.delayedExec,this,d,e,f):c.fnBind(this.exec,this,d,e);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 e=this._execMsgHandler("$"+a+"_"+b,d);this.oDebugger.log_MessageStepEnd(a,b,d);return e},_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],e=d.length;if(0==e)return!0;var c,g=!0;
if(a.match(/^\$(BEFORE|ON|AFTER)_MSG_APP_READY$/))for(var h=0;h<e;h++){if(c=this._execHandler(d[h],a,b),!1===c){g=!1;break}}else for(h=0;h<e;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 e=a[b].apply(a,d);this.oDebugger.log_CallHandlerEnd(a,b,d);return e},_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,e;b;)e=b.nextSibling,a.appendChild(b),b=e;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,e=null,c=this.startContainer,g=this.endContainer;_recurConstructClonedTree=function(a,b,j,n){if(0>b)return b;var j=b-1,m=a[b].cloneNode(!1);a[b]==c&&(d=m);for(a[b]==g&&(e=m);0<=j&&xe.DOMFix.parentNode(a[j])==a[b];)j=this._recurConstructClonedTree(a,j,a[b],m,d,e);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:e}},
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,e){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,e=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;e=this._getPosIdx(d)+0.5}-1==e&&(e=b+1);return b<e?-1:b==e?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,e;b||(d=xe.DOMFix.parentNode(a[0]),
e=0);for(var c=0;c<a.length;c++){var g=a[c];g.firstChild||(d==g&&(e=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,e);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");
if(3==a.nodeType){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||-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){for(var b=0,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,e){var c=!1;if(a==d&&b==e)c=!0;else if(a=this._getActualStartNode(a,b),d=this._getActualEndNode(d,e),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,e=a.oEndContainer,c=a.iEndOffset;if(!b)return a;if(3!=b.nodeType)return a;if(0==d)return a;if(b.nodeValue.length<=
d)return a;a=b.splitText(d);b==e&&(c-=d,e=a);return{oStartContainer:a,iStartOffset:0,oEndContainer:e,iEndOffset:c}},_splitEndTextNode:function(a){var b=a.oStartContainer,d=a.iStartOffset,e=a.oEndContainer,c=a.iEndOffset;if(!e)return a;if(3!=e.nodeType)return a;if(c>=e.nodeValue.length)return a;if(0==c)return a;e.splitText(c);return{oStartContainer:b,iStartOffset:d,oEndContainer:e,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)return!1;if(!this._recurGetChildNodesUntil(a,
b,d))return!1;for(var e=a.nextSibling;!e;){if(!(a=xe.DOMFix.parentNode(a)))return!1;d[this._nNodesBetweenLen++]=a;if(a==b)return!1;e=a.nextSibling}return this._recurGetNextNodesUntil(e,b,d)},_recurGetChildNodesUntil:function(a,b,d){if(!a)return!1;var e=!1,c=a;if(c.firstChild)for(c=c.firstChild;c;){if(!this._recurGetChildNodesUntil(c,b,d)){e=!0;break}c=c.nextSibling}d[this._nNodesBetweenLen++]=a;return e?!1:a==b?!1:!0}});xe.W3CDOMRange.START_TO_START=0;xe.W3CDOMRange.START_TO_END=1;xe.W3CDOMRange.END_TO_END=
this.oDebugger?this._execMsgStepWithDebugger:this._execMsgStepWithoutDebugger).call(this,a,b,d)},_execMsgStepWithDebugger:function(a,b,d){this.oDebugger.log_MessageStepStart(a,b,d);var e=this._execMsgHandler("$"+a+"_"+b,d);this.oDebugger.log_MessageStepEnd(a,b,d);return e},_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],e=d.length;if(e==0)return true;var c,
g=true;if(a.match(/^\$(BEFORE|ON|AFTER)_MSG_APP_READY$/))for(var h=0;h<e;h++){c=this._execHandler(d[h],a,b);if(c===false){g=false;break}}else for(h=0;h<e;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 e=a[b].apply(a,d);this.oDebugger.log_CallHandlerEnd(a,b,d);return e},_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,e;b;){e=b.nextSibling;a.appendChild(b);b=e}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,e=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&&(e=m);j>=0&&xe.DOMFix.parentNode(a[j])==a[b];)j=this._recurConstructClonedTree(a,j,a[b],m,d,e);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:e}},
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,e){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;e=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;e=this._getPosIdx(d)+0.5}e==-1&&(e=b+1);return b<e?-1:b==e?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,e;if(!b){d=xe.DOMFix.parentNode(a[0]);
e=0}for(var c=0;c<a.length;c++){var g=a[c];if(!g.firstChild){if(d==g){e=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,e);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,e){var c=false;if(a==d&&b==e)c=true;else{a=this._getActualStartNode(a,b);d=this._getActualEndNode(d,e);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,e=a.oEndContainer,c=a.iEndOffset;if(!b||b.nodeType!=3||d==0||b.nodeValue.length<=d)return a;a=b.splitText(d);
if(b==e){c=c-d;e=a}return{oStartContainer:a,iStartOffset:0,oEndContainer:e,iEndOffset:c}},_splitEndTextNode:function(a){var b=a.oStartContainer,d=a.iStartOffset,e=a.oEndContainer,c=a.iEndOffset;if(!e||e.nodeType!=3||c>=e.nodeValue.length||c==0)return a;e.splitText(c);return{oStartContainer:b,iStartOffset:d,oEndContainer:e,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 e=
a.nextSibling;!e;){if(!(a=xe.DOMFix.parentNode(a)))return false;d[this._nNodesBetweenLen++]=a;if(a==b)return false;e=a.nextSibling}return this._recurGetNextNodesUntil(e,b,d)},_recurGetChildNodesUntil:function(a,b,d){if(!a)return false;var e=false,c=a;if(c.firstChild)for(c=c.firstChild;c;){if(!this._recurGetChildNodesUntil(c,b,d)){e=true;break}c=c.nextSibling}d[this._nNodesBetweenLen++]=a;return e||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?3==this.startContainer.nodeType?0==this.startOffset?null: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,e,c;e=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=e)):(c=e,!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){for(var a=a.substring(1,a.length-1),d=a.split(/\//),e=b.body,c=2;c<d.length&&e;c++){d[c].match(/([^\[]+)\[(\d+)/i);for(var g=RegExp.$1,h=RegExp.$2,e=xe.DOMFix.childNodes(e),k=[],j=e.length,n=0,m=0;m<j;m++)e[m].tagName==g&&(k[n++]=e[m]);e=k.length<h?null:k[h]}return e},_evaluateXPathBookmark:function(a){var b=a.nTextNodeIdx,
d=a.nOffset,a=this._evaluateXPath(a.sXPath,this._document);if(-1<b&&a){for(var e=xe.DOMFix.childNodes(a),c=null;(c=e[b])&&3==c.nodeType&&c.nodeValue.length<d;)d-=c.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;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]);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&&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 f=0;f<d.length;f++)b(d[f])&&(c[c.length]=d[f]);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:-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;for(var a=b.firstChild,d=b.lastChild,c=this.cloneRange(),f=c.placeStringBookmark();b.lastChild;)this.insertNode(b.lastChild);this.setEndNodes(a,d);c.moveToBookmark(f);c.deleteContents();c.removeStringBookmark(f)}},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 e,f,g=0;g<
d.length;g++){for(var h in a)e=h,f=a[e],"string"==typeof f&&(d[g].style[e]=f);if(b)for(h in b)e=h,f=b[e],"string"==typeof f&&("class"==e?c(d[g]).addClass(f):d[g].setAttribute(e,f))}this.setStartBefore(d[0]);this.setEndAfter(d[d.length-1])}},_getStyleParentNodes:function(a){this._splitTextEndNodesOfTheRange();for(var b=this.getStartNode(),d=this.getEndNode(),e=this._getNodesInRange(),f=[],g=0,h,k,j,n,m,q=e.length,o=c(e).filter(function(){return!!this.childNodes.length}),l=0;l<q;l++)if((h=e[l])&&!(3!=
h.nodeType||""==h.nodeValue)){m=xe.DOMFix.parentNode(h);if("SPAN"==m.tagName&&(k=this._getVeryFirstRealChild(m),j=k==h?1:o.indexOf(k),-1!=j&&(k=this._getVeryLastRealChild(m),n=k==h?1:o.indexOf(k)),-1!=j&&-1!=n)){f[g++]=m;continue}k=this._document.createElement("SPAN");m.insertBefore(k,h);k.appendChild(h);f[g++]=k;a&&k.setAttribute(a,"true")}this.setStartBefore(b);this.setEndAfter(d);return f},_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=f,h=!0):(f=a,d(a.previousSibling),c||b(xe.DOMFix.parentNode(a))))}function d(a){if(a&&!c)if(k.test(a.tagName))g=a,c=f,h=!1;else{if(a.firstChild&&"TABLE"!=a.tagName)for(var b=a.lastChild;b&&!c;)d(b),b=b.previousSibling;else f=a;c||d(a.previousSibling)}}var c=null,f=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=f,h=!0):(f=a,d(a.nextSibling),c||b(xe.DOMFix.parentNode(a))))}
function d(a){if(a&&!c)if(k.test(a.tagName))g=a,c=f,h=!1;else{if(a.firstChild&&"TABLE"!=a.tagName)for(var b=a.firstChild;b&&!c;)d(b),b=b.nextSibling;else f=a;c||d(a.nextSibling)}}var c=null,f=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;if(!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){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("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),f=c.iOffsetForIE;d.moveToElementText(c.oSelectableNodeForIE);d.collapse(c.bCollapseToStart);d.moveStart("character",f);return d};this._getSelectableNodeAndOffsetForIE=function(a,b){var d=this._document.body.createTextRange(),
c=null,f=null,g=0;3==a.nodeType?(c=xe.DOMFix.parentNode(a),f=xe.DOMFix.childNodes(c),g=f.length):(c=a,f=xe.DOMFix.childNodes(c),g=b);for(var h=null,k=0,j=!0,n=0;n<g;n++)if(h=f[n],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,f=this._document.body.createTextRange(),g=xe.DOMFix.childNodes(d),c=null,h=0,h=0;h<g.length;h++)if(3!=g[h].nodeType){f.moveToElementText(g[h]);if(0<=f.compareEndPoints("StartToStart",a))break;c=g[h]}if(0!=h&&3==g[h-
1].nodeType){g=this._document.body.createTextRange();f=null;c?(g.moveToElementText(c),g.collapse(!1),f=c.nextSibling):(g.moveToElementText(d),g.collapse(!0),f=d.firstChild);d=a.duplicate();d.setEndPoint("StartToStart",g);for(c=d.text.length;c>f.nodeValue.length&&f.nextSibling;)c-=f.nodeValue.length,f=f.nextSibling;if(b&&f.nextSibling&&3==f.nextSibling.nodeType&&c==f.nodeValue.length)c-=f.nodeValue.length,f=f.nextSibling;d=f}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){if("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;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:"BODY"==a.tagName?a: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,f){this.oApp.registerBrowserEvent(a,b,d,c,f)},$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(){if(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,e,f,g,a=(a||"").toLowerCase().split("+");b=d=e=f=g=!1;c.each(a,function(){var a=""+this;switch(a){case "shift":b=!0;case "alt":e=!0;case "ctrl":d=!0;case "meta":f=!0;default:g=a}});if(!g)return"";a=[];b&&a.push("shift");e&&a.push("alt");d&&a.push("ctrl");(f||d&&!b&&!e)&&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;if(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,f){a==this.oCurrentLayer?this.oApp.exec("HIDE_ACTIVE_LAYER",[]):(this.oApp.exec("SHOW_ACTIVE_LAYER",[a,c,f]),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+"([^ ]+)"),e=0;e<b;e++)if(d.test(a[e].className)){var f=RegExp.$1;null==this.htUIList[f]&&(this.htUIList[f]=c(">*:first-child",a[e]).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,f,g){this.oApp.exec("TOGGLE_ACTIVE_LAYER",[a,"MSG_TOOLBAR_LAYER_SHOWN",[a,b,d,c],f,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,e=this.welToolbarArea.offset().left,e=e+this.toolbarArea.offsetWidth;if(d>e)a.style.left=e-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,e,f){this.sInitialMode=a;this.oIRField=c.$(b);this._assignHTMLObjects(f);this.fOnBeforeUnload=e;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){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&&"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);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){this.oApp.getEditingMode()==this.sMode&&((new o(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 o=function(a){this._o=a};o.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};o.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()}};o.prototype.copy=function(){var a=this.getSelection();return this._o.value.substring(a[0],a[1])};o.prototype.paste=function(a){var b=this._o,d=this.getSelection(),
c=b.value,f=c.substr(0,d[0]),c=c.substr(d[1]);b.value=f+a+c;b=0;"undefined"==typeof document.body.style.maxHeight&&(f=f.match(/\n/gi),b=null!=f?f.length:0);this.setSelection(d[0]+a.length-b)};o.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 e=d.placeStringBookmark();this.oApp.getWYSIWYGDocument().body.innerHTML=this.oApp.getWYSIWYGDocument().body.innerHTML;d.moveToBookmark(e);d.collapseToEnd();d.select();d.removeStringBookmark(e)}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(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){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(){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(){if(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",[]);if(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(){if(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(),f=c.oStart,c=c.oEnd;if(!f.bParentBreak||b.rxBlockContainer.test(f.oLineBreaker.tagName)){a.stopPropagation();a.preventDefault();a=this.oEditingArea.createElement("P");b.moveToBookmark(d);b.setStartBefore(f.oNode);b.surroundContents(a);
b.collapseToEnd();f=this.oEditingArea.createElement("P");b.setEndAfter(c.oNode);b.surroundContents(f);b.removeStringBookmark(d);if(""==a.innerHTML)a.innerHTML="<br>";if(""==f.innerHTML)f.innerHTML="<br>";f.nextSibling&&"BR"==f.nextSibling.tagName&&f.parentNode.removeChild(f.nextSibling);b.selectNodeContents(f);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"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 e,f;for(f in a)e=a[f],"string"==typeof e&&(d.style[f]=e);b.selectNodeContents(d);b.collapseToEnd();b._window.focus();b._window.document.body.focus();b.select();if(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;if(3==a.nodeType)a=a.parentNode;var a=c(a),d,e;for(e in this.oStyle)if(d=this.oStyleMap[e],d.type&&"Value"==d.type)if(d.css)d=a.css(d.css),"fontFamily"==e&&
(d=d.split(/,/)[0]),b[e]=d;else{if(d.command)try{b[e]=this.oDocument.queryCommandState(d.command)}catch(f){}}else if(d.command)try{b[e]=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("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){if("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,e;if(0==a.length)return-1;var f=a.length;0==f?e=-1:(d=this._getLineWrapper(a[0]),e=this._getWrapperLineheight(d));var g=this.oSelection.getStartNode();if(0<e)for(var h=
1;h<f;h++)if(!this._isChildOf(a[h],b)&&a[h]&&(b=this._getLineWrapper(a[h]),b!=d)){curHeight=this._getWrapperLineheight(b);if(curHeight!=e){e=-1;break}d=b}b=this._getLineWrapper(a[f-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 e},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&&"BODY"!=a.tagName;)a=xe.DOMFix.parentNode(a);return!a?!1:!0}thisRef=this;var e=this._getSelectedNodes(!1);if(0!=e.length){var f,g,h=e.length;this.oApp.exec("RECORD_UNDO_BEFORE_ACTION",["LINEHEIGHT"]);g=this._getLineWrapper(e[0]);for(var k=g=b(g,a),j=g,j=1;j<h;j++){try{if(!d(xe.DOMFix.parentNode(e[j])))continue}catch(n){continue}this._isChildOf(e[j],f)||(f=this._getLineWrapper(e[j]),f!=g&&(g=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,k,f||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(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);var a=b.getLineInfo(),d=a.oStart,c=a.oEnd,f,b=null,a=d.oNode;f=d.oLineBreaker;d=c.oNode;c=c.oLineBreaker;this.oSelection.setEndNodes(a,d);f==c&&("P"==f.tagName||"DIV"==f.tagName?
b=f:this.oSelection.setEndNodes(f.firstChild,f.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("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;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=
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,e,c;e=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){c=d;!c&&!b&&(c=e)}else{c=e;!c&&!b&&(c=d)}return c},_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,f=2;f<d.length&&c;f++){d[f].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),f=null;(f=c[b])&&f.nodeType==3&&f.nodeValue.length<d;){d=d-f.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 f=0;f<d.length;f++)b(d[f])&&(c[c.length]=d[f]);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(),f=c.placeStringBookmark();b.lastChild;)this.insertNode(b.lastChild);this.setEndNodes(a,d);c.moveToBookmark(f);c.deleteContents();c.removeStringBookmark(f)}},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 e,f,g=0;g<
d.length;g++){for(var h in a){e=h;f=a[e];typeof f=="string"&&(d[g].style[e]=f)}if(b)for(h in b){e=h;f=b[e];typeof f=="string"&&(e=="class"?c(d[g]).addClass(f):d[g].setAttribute(e,f))}}this.setStartBefore(d[0]);this.setEndAfter(d[d.length-1])}},_getStyleParentNodes:function(a){this._splitTextEndNodesOfTheRange();var b=this.getStartNode(),d=this.getEndNode(),e=this._getNodesInRange(),f=[],g=0,h,k,j,n,m,q=e.length;c(e).filter(function(){return!!this.childNodes.length});for(var l=0;l<q;l++)if((h=e[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){f[g++]=m;continue}}k=this._document.createElement("SPAN");m.insertBefore(k,h);k.appendChild(h);f[g++]=k;a&&k.setAttribute(a,"true")}this.setStartBefore(b);this.setEndAfter(d);return f},_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=f;h=true}else{f=a;d(a.previousSibling);c||b(xe.DOMFix.parentNode(a))}}function d(a){if(a&&!c)if(k.test(a.tagName)){g=a;c=f;h=false}else{if(a.firstChild&&a.tagName!="TABLE")for(var b=a.lastChild;b&&!c;){d(b);b=b.previousSibling}else f=a;c||d(a.previousSibling)}}var c=null,f=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=f;h=true}else{f=a;d(a.nextSibling);c||b(xe.DOMFix.parentNode(a))}}function d(a){if(a&&!c)if(k.test(a.tagName)){g=a;c=f;h=false}else{if(a.firstChild&&a.tagName!="TABLE")for(var b=a.firstChild;b&&!c;){d(b);b=b.nextSibling}else f=a;c||d(a.nextSibling)}}var c=null,f=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),f=c.iOffsetForIE;d.moveToElementText(c.oSelectableNodeForIE);d.collapse(c.bCollapseToStart);d.moveStart("character",f);return d};this._getSelectableNodeAndOffsetForIE=
function(a,b){var d=this._document.body.createTextRange(),c=null,f=null,g=0;if(a.nodeType==3){c=xe.DOMFix.parentNode(a);f=xe.DOMFix.childNodes(c);g=f.length}else{c=a;f=xe.DOMFix.childNodes(c);g=b}for(var h=null,k=0,j=true,n=0;n<g;n++){h=f[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,f=this._document.body.createTextRange(),g=xe.DOMFix.childNodes(d),c=null,h=0,h=0;h<g.length;h++)if(g[h].nodeType!=3){f.moveToElementText(g[h]);
if(f.compareEndPoints("StartToStart",a)>=0)break;c=g[h]}if(h!=0&&g[h-1].nodeType==3){g=this._document.body.createTextRange();f=null;if(c){g.moveToElementText(c);g.collapse(false);f=c.nextSibling}else{g.moveToElementText(d);g.collapse(true);f=d.firstChild}d=a.duplicate();d.setEndPoint("StartToStart",g);for(c=d.text.length;c>f.nodeValue.length&&f.nextSibling;){c=c-f.nodeValue.length;f=f.nextSibling}if(b&&f.nextSibling&&f.nextSibling.nodeType==3&&c==f.nodeValue.length){c=c-f.nodeValue.length;f=f.nextSibling}d=
f}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,f){this.oApp.registerBrowserEvent(a,b,d,c,f)},$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,e,f,g,a=(a||"").toLowerCase().split("+");b=d=e=f=g=false;c.each(a,
function(){var a=""+this;switch(a){case "shift":b=true;case "alt":e=true;case "ctrl":d=true;case "meta":f=true;default:g=a}});if(!g)return"";a=[];b&&a.push("shift");e&&a.push("alt");d&&a.push("ctrl");(f||d&&!b&&!e)&&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,f){if(a==this.oCurrentLayer)this.oApp.exec("HIDE_ACTIVE_LAYER",[]);else{this.oApp.exec("SHOW_ACTIVE_LAYER",
[a,c,f]);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+"([^ ]+)"),e=0;e<b;e++)if(d.test(a[e].className)){var f=RegExp.$1;
this.htUIList[f]==null&&(this.htUIList[f]=c(">*:first-child",a[e]).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,f,g){this.oApp.exec("TOGGLE_ACTIVE_LAYER",[a,"MSG_TOOLBAR_LAYER_SHOWN",[a,b,d,c],f,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,e=this.welToolbarArea.offset().left,e=e+this.toolbarArea.offsetWidth;if(d>e)a.style.left=
e-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,e,f){this.sInitialMode=a;this.oIRField=c.$(b);this._assignHTMLObjects(f);this.fOnBeforeUnload=e;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,f=c.substr(0,d[0]),c=c.substr(d[1]);b.value=f+a+c;b=0;if(typeof document.body.style.maxHeight=="undefined"){f=f.match(/\n/gi);b=f!=null?f.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 e=
d.placeStringBookmark();this.oApp.getWYSIWYGDocument().body.innerHTML=this.oApp.getWYSIWYGDocument().body.innerHTML;d.moveToBookmark(e);d.collapseToEnd();d.select();d.removeStringBookmark(e)}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(),f=c.oStart,c=c.oEnd;if(!f.bParentBreak||b.rxBlockContainer.test(f.oLineBreaker.tagName)){a.stopPropagation();a.preventDefault();a=this.oEditingArea.createElement("P");
b.moveToBookmark(d);b.setStartBefore(f.oNode);b.surroundContents(a);b.collapseToEnd();f=this.oEditingArea.createElement("P");b.setEndAfter(c.oNode);b.surroundContents(f);b.removeStringBookmark(d);if(a.innerHTML=="")a.innerHTML="<br>";if(f.innerHTML=="")f.innerHTML="<br>";f.nextSibling&&f.nextSibling.tagName=="BR"&&f.parentNode.removeChild(f.nextSibling);b.selectNodeContents(f);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 e,f;for(f in a){e=a[f];typeof e=="string"&&(d.style[f]=e)}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,e;for(e in this.oStyle){d=this.oStyleMap[e];if(d.type&&
d.type=="Value")if(d.css){d=a.css(d.css);e=="fontFamily"&&(d=d.split(/,/)[0]);b[e]=d}else{if(d.command)try{b[e]=this.oDocument.queryCommandState(d.command)}catch(f){}}else if(d.command)try{b[e]=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,e;if(a.length==0)return-1;var f=a.length;if(f==0)e=-1;else{d=this._getLineWrapper(a[0]);e=this._getWrapperLineheight(d)}var g=this.oSelection.getStartNode();
if(e>0)for(var h=1;h<f;h++)if(!this._isChildOf(a[h],b)&&a[h]){b=this._getLineWrapper(a[h]);if(b!=d){curHeight=this._getWrapperLineheight(b);if(curHeight!=e){e=-1;break}d=b}}b=this._getLineWrapper(a[f-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 e},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 e=this._getSelectedNodes(false);if(e.length!=0){var f,g,h=e.length;this.oApp.exec("RECORD_UNDO_BEFORE_ACTION",["LINEHEIGHT"]);g=this._getLineWrapper(e[0]);for(var k=g=b(g,a),j=1;j<h;j++){try{if(!d(xe.DOMFix.parentNode(e[j])))continue}catch(n){continue}if(!this._isChildOf(e[j],f)){f=this._getLineWrapper(e[j]);if(f!=g)g=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,k,f||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,f,b=null,a=d.oNode;f=d.oLineBreaker;d=c.oNode;c=c.oLineBreaker;this.oSelection.setEndNodes(a,d);f==c&&(f.tagName=="P"||f.tagName==
"DIV"?b=f:this.oSelection.setEndNodes(f.firstChild,f.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);2>a.length&&(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){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"))}});
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"))}});
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("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};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;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"))}});
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("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(),
f=c.oStart,c=c.oEnd,g=/BODY|TD|LI/i,f=f.bParentBreak&&!g.test(f.oLineBreaker.tagName)?f.oNode.parentNode:f.oNode,c=c.bParentBreak&&!g.test(c.oLineBreaker.tagName)?c.oNode.parentNode:c.oNode;d.setStartBefore(f);d.setEndAfter(c);if(g=this._expandToTableStart(d,c))c=g,d.setEndAfter(g);if(g=this._expandToTableStart(d,f))f=g,d.setStartBefore(g);g=f;for(f=d.commonAncestorContainer;g&&g!=f&&g.parentNode!=f;)g=g.parentNode;oFormattingNode=d._document.createElement(a);if(b)oFormattingNode.className=b;g==f?
f.insertBefore(oFormattingNode,f.firstChild):f.insertBefore(oFormattingNode,g);d.setStartAfter(oFormattingNode);d.setEndAfter(c);d.surroundContents(oFormattingNode);f=oFormattingNode.childNodes;for(g=f.length-1;0<=g;g--)if(3==f[g].nodeType||"BR"==f[g].tagName){for(var h=d._document.createElement("P"),c=f[g].nextSibling;0<=g&&f[g]&&(3==f[g].nodeType||"BR"==f[g].tagName);)h.insertBefore(f[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,e=null,f=!1;b&&!f;){b==c&&(f=!0);if(/TBODY|TFOOT|THEAD|TR/i.test(b.tagName)){e=this._getTableRoot(b);break}b=b.parentNode}return e},_getTableRoot:function(a){for(;a&&"TABLE"!=a.tagName;)a=a.parentNode;return a}});xe.XE_SCharacter=c.Class({name:"XE_SCharacter",
$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(),
f=c.oStart,c=c.oEnd,g=/BODY|TD|LI/i,f=f.bParentBreak&&!g.test(f.oLineBreaker.tagName)?f.oNode.parentNode:f.oNode,c=c.bParentBreak&&!g.test(c.oLineBreaker.tagName)?c.oNode.parentNode:c.oNode;d.setStartBefore(f);d.setEndAfter(c);if(g=this._expandToTableStart(d,c)){c=g;d.setEndAfter(g)}if(g=this._expandToTableStart(d,f)){f=g;d.setStartBefore(g)}g=f;for(f=d.commonAncestorContainer;g&&g!=f&&g.parentNode!=f;)g=g.parentNode;oFormattingNode=d._document.createElement(a);if(b)oFormattingNode.className=b;g==
f?f.insertBefore(oFormattingNode,f.firstChild):f.insertBefore(oFormattingNode,g);d.setStartAfter(oFormattingNode);d.setEndAfter(c);d.surroundContents(oFormattingNode);f=oFormattingNode.childNodes;for(g=f.length-1;g>=0;g--)if(f[g].nodeType==3||f[g].tagName=="BR"){for(var h=d._document.createElement("P"),c=f[g].nextSibling;g>=0&&f[g]&&(f[g].nodeType==3||f[g].tagName=="BR");)h.insertBefore(f[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,e=null,f=false;b&&!f;){b==c&&(f=true);if(/TBODY|TFOOT|THEAD|TR/i.test(b.tagName)){e=this._getTableRoot(b);break}b=b.parentNode}return e},_getTableRoot:function(a){for(;a&&a.tagName!="TABLE";)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,
@ -139,69 +140,73 @@ 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;"BUTTON"==a.tagName&&"LI"==a.parentNode.tagName&&this.oApp.exec("SELECT_SCHARACTER",[a.firstChild.innerHTML])},$ON_SELECT_SCHARACTER:function(a){this.oTextField.value+=
a;if(this.oTextField.createTextRange)a=this.oTextField.createTextRange(),a.collapse(!1),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("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 e=0;e<b;e++)c[e]=document.createElement("LI"),c[e].innerHTML='<button type="button"><span>'+
unescape(this.charSet[a][e])+"</span></button>",this.aSCharList[a].appendChild(c[e])}},_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];if(!(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],e=c.oBookmark[this.oCurStateIdx.nStep];
this.oApp.setIR(c.sContent[this.oCurStateIdx.nStep],!0);var f=this.oApp.getIR();this.bFF&&f==this.sBlankContentsForFF&&(f="");c.sContent[this.oCurStateIdx.nStep]=f;c=this.oApp.getEmptySelection();c.selectionLoaded&&(e?c.moveToXPathBookmark(e):c=this.oApp.getEmptySelection(),c.select())},$ON_DO_RECORD_UNDO_HISTORY:function(a,b,c,e){b=b||!1;c=c||!1;e=e||0;this.oCurStateIdx.nIdx!=this.aUndoHistory.length-1&&(e=1);var f=this.aUndoHistory[this.oCurStateIdx.nIdx],g=this.oApp.getIR(),h=f.sContent[this.oCurStateIdx.nStep];
this.bFF&&g==this.sBlankContentsForFF&&(g="");if(!b)switch(e){case 0:if(Math.abs(h.length-g.length)<this.iMinimumSizeChange)return;break;case 1:if(h==g)return}h=this.oApp.getSelection();e=null;h.selectionLoaded&&(e=h.getXPathBookmark());h={nIdx:this.oCurStateIdx.nIdx,nStep:this.oCurStateIdx.nStep};h.nStep=b?c?0:1:0;if(0==h.nStep&&this.oCurStateIdx.nStep==f.nTotalSteps-1)h.nIdx=this.oCurStateIdx.nIdx+1;this.oApp.exec("DO_RECORD_UNDO_HISTORY_AT",[h,a,g,e])},$ON_DO_RECORD_UNDO_HISTORY_AT:function(a,
b,c,e){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]=e):(b={sAction:b,nTotalSteps:1,sContent:[]},b.sContent[0]=c,b.oBookmark=[],b.oBookmark[0]=e,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;if(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=this.sATagMarker+Math.ceil(1E4*Math.random());this.oApp.exec("EXECCOMMAND",""==a?["unlink"]:["createLink",!1,d+a]);try{this.oSelection.setFromSelection()}catch(e){}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){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;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+=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+=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,e="",e=c.browser.msie?"<td><p></p></td>":c.browser.firefox?"<td><p><br/></p></td>":"<td><p>&nbsp;</p></td>",b='<tr style="background:'+b+'">',f=this.oColumnInput.value,g=0;g<f;g++)b+=e;b+="</tr>\n";e=this.oRowInput.value;a='<table style="background:'+a+'" cellspacing="'+d+'"><tbody>';for(g=0;g<e;g++)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(){"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.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;"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(",");
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=[];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(!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,p)){a=h.length;"br"==g&&(h="");if(!h||"/"!=h.substring(a-1,a))h+="/";return"<"+g+" "+c.trim(h)+">"}b[b.length]={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)}return a},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("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);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();if(0>this.elFormatSelect.selectedIndex)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;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 e=0;b.eq(0).nextAll("td,th").andSelf().filter(".xe_selected_cell").each(function(){e+=d._getSpan(this,"col")});this._getRect(b.eq(0));var f=b.eq(0).parent("tr"),g=b.eq(b.length-1).parent("tr"),h=b.parents("table").eq(0).find("tr"),f=h.index(g.get(0))-h.index(f.get(0))+this._getSpan(b.eq(b.length-1),"row");b.eq(0).attr("colSpan",e).attr("rowSpan",f);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 e=this._getRect(a.eq(0)).top,f=this._getRect(a.eq(a.length-1)).bottom;(a=b.find("td,th").filter(function(){var a=d._getRect(c(this));return!(a.bottom<=e||a.top>=f)})).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;1<f?(l=Math.ceil(f/2),o=f-l,n.push(function(){b.attr("rowSpan",l)}),m.attr("rowSpan",o)):(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;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");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)):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 e=a.eq(0).parent("tr"),
f=this._getRect(e.find(".xe_selected_cell:first")).left,g=this._getRect(e.find(".xe_selected_cell:last")).right;(a=b.find("td,th").filter(function(){var a=d._getRect(c(this));return!(a.right<=f||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){var b=c(a.target).parents().andSelf().filter("td,th,table"),d=this.oApp,e=this;c("td.xe_selected_cell",
this.oApp.getWYSIWYGDocument()).removeClass("xe_selected_cell");this._endSel=this._startSel=null;b.length&&this._isLeftClicked(a.button)&&setTimeout(function(){b=d.getSelection().cloneRange();b.collapseToStart();b=c(b.startContainer).parents().andSelf().filter("td,th").eq(0);if(!b.length)return e._removeAllListener()||!0;e._getRect(e._startSel=b);e._doc.bind("mousemove",e.$FnMouseMove);e._doc.bind("mouseup",e.$FnMouseUp)},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 e=Math.min(this._startSel.rect.top,this._endSel.rect.top),f=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<f)f=a.left;if(a.top<e)e=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<=f||a.left>=h||a.bottom<=e||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,l,o,p,a,b,d,e){function f(){try{var a=n.contentWindow.document;if("about:blank"==a.location)throw"blank";j.registerPlugin(new xe.XE_EditingArea_WYSIWYG(n));j.registerPlugin(new xe.XpressRangeManager(n));j.registerPlugin(new xe.XE_ExecCommand(n));if(d&&!a.body.style.fontFamily)a.body.style.fontFamily=d;if(e&&!a.body.style.fontSize)a.body.style.fontSize=e;j.run()}catch(b){setTimeout(f,0)}}"undefined"==typeof a&&(a="white");"undefined"==typeof b&&(b="xeStyle");"undefined"==
typeof d&&(d="");"undefined"==typeof e&&(e="");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">'),h=jQuery('<textarea rows="10" cols="20" 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[o].value;xFF&&!k&&(k="<br />");k=editorReplacePath(k);a[o].value=k;jQuery("#xpress-editor-"+c).val(k);editorRelKeys[c]=
[];editorRelKeys[c].primary=a[l];editorRelKeys[c].content=a[o];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:205},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.browser.msie&&!jQuery.browser.opera&&j.registerPlugin(new xe.XE_WYSIWYGEnterKey(n));(s=a._saved_doc_title)&&j.registerPlugin(new xe.XE_AutoSave(b,h));f();return j}
function editorGetContentTextarea_xe(c){c=xe.Editors[c]||null;if(!c)return"";c=c.getIR();if(!jQuery.trim(c.replace(/(&nbsp;|<\/?(p|br|span|div)([^>]+)?>)/ig,"")))return"";c=c.replace(/<br ?\/?>$/i,"");if(1024>c.length){var l="#text,A,BR,IMG,EM,STRONG,SPAN,BIG,CITE,CODE,DD,DFN,HR,INS,KBD,LINK,Q,SAMP,SMALL,SUB,SUP,TT".split(","),o=!0,p=jQuery("<div>"+c+"</div>").eq(0).contents();jQuery.each(p,function(){3!=this.nodeType&&-1==jQuery.inArray(this.nodeName,l)&&(o=!1)});o&&(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,e){e=e?e.replace(/ ([A-Z]+?)\=/ig,function(a,b){b=b.toLowerCase();return" "+b+"="}):"";c=c.toLowerCase();b||(b="");return"<"+b+c+e+">"});return c=c.replace("<br>","<br />")}function editorGetIframe(c){return jQuery("iframe#editor_iframe_"+c).get(0)}function editorReplaceHTML(c,l){var l=editorReplacePath(l),o=parseInt(c.id.replace(/^.*_/,""),10);editorRelKeys[o].pasteHTML(l)}
function editorReplacePath(c){return c=c.replace(/\<([^\>\<]*)(src=|href=|url\()("|\')*([^"\'\)]+)("|\'|\))*(\s|>)*/ig,function(c,o,p,a,b,d,e){"url("==p?(a="",d=")"):("undefined"==typeof a&&(a='"'),"undefined"==typeof d&&(d='"'),"undefined"==typeof e&&(e=""));b=jQuery.trim(b).replace(/^\.\//,"");return/^(http\:|https\:|ftp\:|telnet\:|mms\:|mailto\:|\/|\.\.|\#)/i.test(b)?c:"<"+o+p+a+request_uri+b+d+e})}
function editorGetAutoSavedDoc(c){var l=[];l.mid=current_mid;l.editor_sequence=c.getAttribute("editor_sequence");setTimeout(function(){exec_xml("editor","procEditorLoadSavedDocument",l,function(c){editorRelKeys[l.editor_sequence].primary.value=c.document_srl;"object"==typeof uploadSettingObj[l.editor_sequence]&&editorUploadInit(uploadSettingObj[l.editor_sequence],!0)},"error,message,editor_sequence,title,content,document_srl".split(","))},0)}
"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 e=0;e<b;e++){c[e]=document.createElement("LI");
c[e].innerHTML='<button type="button"><span>'+unescape(this.charSet[a][e])+"</span></button>";this.aSCharList[a].appendChild(c[e])}}},_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],e=c.oBookmark[this.oCurStateIdx.nStep];this.oApp.setIR(c.sContent[this.oCurStateIdx.nStep],true);var f=this.oApp.getIR();this.bFF&&f==this.sBlankContentsForFF&&(f="");c.sContent[this.oCurStateIdx.nStep]=f;c=this.oApp.getEmptySelection();if(c.selectionLoaded){e?c.moveToXPathBookmark(e):c=this.oApp.getEmptySelection();c.select()}},$ON_DO_RECORD_UNDO_HISTORY:function(a,b,c,e){b=b||false;c=c||false;e=e||0;this.oCurStateIdx.nIdx!=this.aUndoHistory.length-
1&&(e=1);var f=this.aUndoHistory[this.oCurStateIdx.nIdx],g=this.oApp.getIR(),h=f.sContent[this.oCurStateIdx.nStep];this.bFF&&g==this.sBlankContentsForFF&&(g="");if(!b)switch(e){case 0:if(Math.abs(h.length-g.length)<this.iMinimumSizeChange)return;break;case 1:if(h==g)return}h=this.oApp.getSelection();e=null;h.selectionLoaded&&(e=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==f.nTotalSteps-1)h.nIdx=this.oCurStateIdx.nIdx+
1;this.oApp.exec("DO_RECORD_UNDO_HISTORY_AT",[h,a,g,e])},$ON_DO_RECORD_UNDO_HISTORY_AT:function(a,b,c,e){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]=e}else{b={sAction:b,nTotalSteps:1,sContent:[]};b.sContent[0]=c;b.oBookmark=[];b.oBookmark[0]=e;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(e){}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,e="",e=c.browser.msie?"<td><p></p></td>":c.browser.firefox?"<td><p><br/></p></td>":"<td><p>&nbsp;</p></td>",b='<tr style="background:'+b+'">',f=this.oColumnInput.value,g=0;g<f;g++)b=b+e;b=b+"</tr>\n";e=this.oRowInput.value;
a='<table style="background:'+a+'" cellspacing="'+d+'"><tbody>';for(g=0;g<e;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(!b.length)return"";do{a=b[b.length-1];if(a.tag==g){a.state!="deleted"&&
h.push("</"+a.tag+">");b.pop()}}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 e=0;b.eq(0).nextAll("td,th").andSelf().filter(".xe_selected_cell").each(function(){e=e+d._getSpan(this,"col")});this._getRect(b.eq(0));var f=b.eq(0).parent("tr"),g=b.eq(b.length-1).parent("tr"),h=b.parents("table").eq(0).find("tr"),f=h.index(g.get(0))-h.index(f.get(0))+this._getSpan(b.eq(b.length-1),"row");b.eq(0).attr("colSpan",e).attr("rowSpan",f);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 e=this._getRect(a.eq(0)).top,f=this._getRect(a.eq(a.length-1)).bottom;(a=b.find("td,th").filter(function(){var a=d._getRect(c(this));return!(a.bottom<=e||a.top>=f)})).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 e=a.eq(0).parent("tr"),f=this._getRect(e.find(".xe_selected_cell:first")).left,g=this._getRect(e.find(".xe_selected_cell:last")).right;
(a=b.find("td,th").filter(function(){var a=d._getRect(c(this));return!(a.right<=f||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){var b=c(a.target).parents().andSelf().filter("td,th,table"),d=this.oApp,e=this;c("td.xe_selected_cell",this.oApp.getWYSIWYGDocument()).removeClass("xe_selected_cell");this._endSel=this._startSel=
null;b.length&&this._isLeftClicked(a.button)&&setTimeout(function(){b=d.getSelection().cloneRange();b.collapseToStart();b=c(b.startContainer).parents().andSelf().filter("td,th").eq(0);if(!b.length)return e._removeAllListener()||true;e._getRect(e._startSel=b);e._doc.bind("mousemove",e.$FnMouseMove);e._doc.bind("mouseup",e.$FnMouseUp)},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 e=Math.min(this._startSel.rect.top,this._endSel.rect.top),f=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<f)f=a.left;if(a.top<e)e=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<=f||a.left>=h||a.bottom<=e||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,e){function f(){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);e&&!a.body.style.fontSize&&(a.body.style.fontSize=e);j.run()}catch(b){setTimeout(f,0)}}"undefined"==typeof a&&(a="white");"undefined"==
typeof b&&(b="xeStyle");"undefined"==typeof d&&(d="");"undefined"==typeof e&&(e="");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));
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,
h));f();return j}
function editorGetContentTextarea_xe(c){c=xe.Editors[c]||null;if(!c)return"";c=c.getIR();if(!jQuery.trim(c.replace(/(&nbsp;|<\/?(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,e){e=e?e.replace(/ ([A-Z]+?)\=/ig,function(a,b){b=b.toLowerCase();return" "+b+"="}):"";c=c.toLowerCase();b||(b="");return"<"+b+c+e+">"});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,e){"url("==p?(a="",d=")"):("undefined"==typeof a&&(a='"'),"undefined"==typeof d&&(d='"'),"undefined"==typeof e&&(e=""));b=jQuery.trim(b).replace(/^\.\//,"");return/^(http\:|https\:|ftp\:|telnet\:|mms\:|mailto\:|\/|\.\.|\#)/i.test(b)?c:"<"+l+p+a+request_uri+b+d+e})}
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)}
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(){}});

View file

@ -2,7 +2,7 @@
html,body{height:100%}
body{margin:0;padding:0}
/* NHN (developers@xpressengine.com) */
.xe_content{color:#000;font-size:12px;line-height:1.5}
.xe_content{color:#000;font-size:12px;line-height:1.5;word-break:break-all;word-wrap:break-word}
.xe_content blockquote.q1,
.xe_content blockquote.q2,
.xe_content blockquote.q3,
@ -17,5 +17,5 @@ body{margin:0;padding:0}
.xe_content blockquote.q5{border:2px solid #707070}
.xe_content blockquote.q6{border:1px dashed #707070}
.xe_content blockquote.q7{border:1px dashed #707070;background:#fbfbfb}
.xe_content table .xe_selected_cell{background-color: #d6e9ff}
.xe_content table .xe_selected_cell{background-color:#d6e9ff}
.xe_content p{margin:0}

View file

@ -1,23 +1,19 @@
@charset "utf-8";
/* NHN > UIT Center > Open UI Technology Team > Jeong Chan Myeong(dece24@nhncorp.com) */
html, body { height:100%; background-color:transparent; padding:0; margin:0;}
.xe_content{ color:#000; font-size:12px; line-height:1.5;}
/* NHN (developers@xpressengine.com) */
html, body{height:100%;background-color:transparent;padding:0;margin:0}
.xe_content{color:#000;font-size:12px;line-height:1.5;word-break:break-all;word-wrap:break-word}
.xe_content blockquote.q1,
.xe_content blockquote.q2,
.xe_content blockquote.q3,
.xe_content blockquote.q4,
.xe_content blockquote.q5,
.xe_content blockquote.q6,
.xe_content blockquote.q7{ padding:10px; margin:0 15px; }
.xe_content blockquote.q1{ padding:0 10px; border-left:2px solid #ccc;}
.xe_content blockquote.q2{ padding:0 10px; background:url(./img/bg_qmark.gif) no-repeat left top;}
.xe_content blockquote.q3{ border:1px solid #d9d9d9;}
.xe_content blockquote.q4{ border:1px solid #d9d9d9; background:#fbfbfb;}
.xe_content blockquote.q5{ border:2px solid #707070;}
.xe_content blockquote.q6{ border:1px dashed #707070;}
.xe_content blockquote.q7{ border:1px dashed #707070; background:#fbfbfb;}
.xe_content p { margin:0; padding:0; }
.xe_content blockquote.q7{padding:10px;margin:0 15px}
.xe_content blockquote.q1{padding:0 10px;border-left:2px solid #ccc}
.xe_content blockquote.q2{padding:0 10px;background:url(./img/bg_qmark.gif) no-repeat left top}
.xe_content blockquote.q3{border:1px solid #d9d9d9}
.xe_content blockquote.q4{border:1px solid #d9d9d9;background:#fbfbfb}
.xe_content blockquote.q5{border:2px solid #707070}
.xe_content blockquote.q6{border:1px dashed #707070}
.xe_content blockquote.q7{border:1px dashed #707070;background:#fbfbfb}
.xe_content p{margin:0;padding:0}

View file

@ -1,51 +1,33 @@
@charset "utf-8";
/* NHN > UIT Center > Open UI Platform Team > Jeong Chan Myeong(dece24@nhncorp.com) */
/* xe_content */
.xe_content{ font-size:12px; line-height:1.6; clear:both;}
.xe_content h1{ font-size:24px;}
.xe_content h2{ font-size:20px;}
.xe_content h3{ font-size:18px;}
.xe_content h4{ font-size:16px;}
.xe_content h5{ font-size:14px;}
.xe_content h6{ font-size:12px;}
/* Attached File */
.xe_content dl.attachedFile { margin:1em 0; padding:1em 0; background:#f9f9f9; border:1px solid #eee; }
.xe_content 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;}
.xe_content dl.attachedFile em{ font-size:11px; font-weight:normal; font-style:normal; margin:0 5px;}
.xe_content dl.attachedFile dd{ margin:0; padding:0 2em; color:#8b8b8b; font-size:11px;}
.xe_content dl.attachedFile dd a{ text-decoration:none; color:#0092cf; margin-right:10px;}
@charset "utf-8";
/* NHN (developers@xpressengine.com) */
.xe_content{font-size:12px;line-height:1.6;clear:both}
.xe_content h1{font-size:24px}
.xe_content h2{font-size:20px}
.xe_content h3{font-size:18px}
.xe_content h4{font-size:16px}
.xe_content h5{font-size:14px}
.xe_content h6{font-size:12px}
.xe_content dl.attachedFile {margin:1em 0;padding:1em 0;background:#f9f9f9;border:1px solid #eee;}
.xe_content 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}
.xe_content dl.attachedFile em{font-size:11px;font-weight:normal;font-style:normal;margin:0 5px}
.xe_content dl.attachedFile dd{margin:0;padding:0 2em;color:#8b8b8b;font-size:11px}
.xe_content dl.attachedFile dd a{text-decoration:none;color:#0092cf;margin-right:10px}
.xe_content dl.attachedFile dd a:hover,
.xe_content dl.attachedFile dd a:active,
.xe_content dl.attachedFile dd a:focus{ text-decoration:underline;}
/* Table Of Content */
.xe_content .toc{ background:#fff; border:1px solid #ddd; font-size:14px; line-height:1.6; margin:1em 0; padding:15px;}
.xe_content .toc li{ font-weight:bold; color:#555; margin-left:35px;}
.xe_content dl.attachedFile dd a:focus{text-decoration:underline}
.xe_content .toc{background:#fff;border:1px solid #ddd;font-size:14px;line-height:1.6;margin:1em 0;padding:15px}
.xe_content .toc li{font-weight:bold;color:#555;margin-left:35px}
.xe_content .toc li.toc3{}
.xe_content .toc li.toc4{ margin-left:55px;}
.xe_content .toc li.toc5{ margin-left:75px;}
.xe_content .toc li a{ color:#648ab9; text-decoration:none; font-weight:normal;}
.xe_content .toc li.toc4{margin-left:55px}
.xe_content .toc li.toc5{margin-left:75px}
.xe_content .toc li a{color:#648ab9;text-decoration:none;font-weight:normal}
.xe_content .toc li a:hover,
.xe_content .toc li a:active,
.xe_content .toc li a:focus{ text-decoration:underline;}
/* Object */
.xe_content .toc li a:focus{text-decoration:underline}
.xe_content object,
.xe_content embed{ margin:1em 0;}
/* Horizontal Rule */
.xe_content hr{ display:block; position:static; border-bottom:0; height:1px; overflow:hidden; color:#e2e2e2; clear:both;}
/* Blockquote */
.xe_content 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; }
/* Cite */
.xe_content cite{ display:block; margin:1em 0;}
/* Link */
.xe_content .xe_dr_link p strong{ display:block;}
/* P */
.xe_content p{ margin:1em 0 !important;}
.xe_content embed{margin:1em 0}
.xe_content hr{display:block;position:static;border-bottom:0;height:1px;overflow:hidden;color:#e2e2e2;clear:both}
.xe_content 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;}
.xe_content cite{display:block;margin:1em 0}
.xe_content .xe_dr_link p strong{display:block}
.xe_content p{margin:1em 0 !important}

View file

@ -1,10 +1,7 @@
@charset "utf-8";
/* NHN (developers@xpressengine.com) */
html, body { height:100%; background-color:transparent; padding:0; margin:0;}
/* Editable */
.xe_content.editable { margin-right:8px; }
html, body{height:100%;background-color:transparent;padding:0;margin:0}
.xe_content.editable {margin-right:8px;word-break:break-all;word-wrap:break-word}
.xe_content.editable h1,
.xe_content.editable h2,
.xe_content.editable h3,
@ -16,16 +13,16 @@ html, body { height:100%; background-color:transparent; padding:0; margin:0;}
.xe_content.editable ol,
.xe_content.editable dl,
.xe_content.editable div,
.xe_content.editable code.block{ border:1px dotted #ccc;}
.xe_content.editable h1:before{ content:""; display:block; width:100%; height:9px; margin-bottom:-9px; background-image:url(./img/elementH.gif); background-repeat:no-repeat; background-position:right top;}
.xe_content.editable h2:before{ content:""; display:block; width:100%; height:9px; margin-bottom:-9px; background-image:url(./img/elementH.gif); background-repeat:no-repeat; background-position:right -100px;}
.xe_content.editable h3:before{ content:""; display:block; width:100%; height:9px; margin-bottom:-9px; background-image:url(./img/elementH.gif); background-repeat:no-repeat; background-position:right -200px;}
.xe_content.editable h4:before{ content:""; display:block; width:100%; height:9px; margin-bottom:-9px; background-image:url(./img/elementH.gif); background-repeat:no-repeat; background-position:right -300px;}
.xe_content.editable h5:before{ content:""; display:block; width:100%; height:9px; margin-bottom:-9px; background-image:url(./img/elementH.gif); background-repeat:no-repeat; background-position:right -400px;}
.xe_content.editable h6:before{ content:""; display:block; width:100%; height:9px; margin-bottom:-9px; background-image:url(./img/elementH.gif); background-repeat:no-repeat; background-position:right -500px;}
.xe_content.editable p{ background-image:url(./img/elementP.gif); background-repeat:no-repeat; background-position:right top;}
.xe_content.editable ul{ background-image:url(./img/elementUl.gif); background-repeat:no-repeat; background-position:right top;}
.xe_content.editable ol{ background-image:url(./img/elementOl.gif); background-repeat:no-repeat; background-position:right top;}
.xe_content.editable dl{ background-image:url(./img/elementDl.gif); background-repeat:no-repeat; background-position:right top;}
.xe_content.editable div{ background-image:url(./img/elementDiv.gif); background-repeat:no-repeat; background-position:right top;}
.xe_content.editable code.block{ background-image:url(./img/elementCode.gif); background-repeat:no-repeat; background-position:right top;}
.xe_content.editable code.block{border:1px dotted #ccc}
.xe_content.editable h1:before{content:"";display:block;width:100%;height:9px;margin-bottom:-9px;background-image:url(./img/elementH.gif);background-repeat:no-repeat;background-position:right top}
.xe_content.editable h2:before{content:"";display:block;width:100%;height:9px;margin-bottom:-9px;background-image:url(./img/elementH.gif);background-repeat:no-repeat;background-position:right -100px}
.xe_content.editable h3:before{content:"";display:block;width:100%;height:9px;margin-bottom:-9px;background-image:url(./img/elementH.gif);background-repeat:no-repeat;background-position:right -200px}
.xe_content.editable h4:before{content:"";display:block;width:100%;height:9px;margin-bottom:-9px;background-image:url(./img/elementH.gif);background-repeat:no-repeat;background-position:right -300px}
.xe_content.editable h5:before{content:"";display:block;width:100%;height:9px;margin-bottom:-9px;background-image:url(./img/elementH.gif);background-repeat:no-repeat;background-position:right -400px}
.xe_content.editable h6:before{content:"";display:block;width:100%;height:9px;margin-bottom:-9px;background-image:url(./img/elementH.gif);background-repeat:no-repeat;background-position:right -500px}
.xe_content.editable p{background-image:url(./img/elementP.gif);background-repeat:no-repeat;background-position:right top}
.xe_content.editable ul{background-image:url(./img/elementUl.gif);background-repeat:no-repeat;background-position:right top}
.xe_content.editable ol{background-image:url(./img/elementOl.gif);background-repeat:no-repeat;background-position:right top}
.xe_content.editable dl{background-image:url(./img/elementDl.gif);background-repeat:no-repeat;background-position:right top}
.xe_content.editable div{background-image:url(./img/elementDiv.gif);background-repeat:no-repeat;background-position:right top}
.xe_content.editable code.block{background-image:url(./img/elementCode.gif);background-repeat:no-repeat;background-position:right top}

View file

@ -8,8 +8,7 @@
<title xml:lang="jp">XEデフォルトスタイル(白色背景)</title>
<title xml:lang="tr">XE Varsayılan Form(beyaz renk arkaplan)</title>
<description xml:lang="ko">
XE 기본 문서 서식입니다.
문서 수정중에는 각 요소들이 구분되어 보입니다.
XE 기본 문서 서식입니다. 문서 수정중에는 각 요소들이 구분되어 보입니다.
</description>
<description xml:lang="en">
XE Default Form (white color background)

View file

@ -1,57 +1,41 @@
@charset "utf-8";
/* NHN (developers@xpressengine.com) */
/* xe_content */
.xe_content{ color:#000; font-size:12px;}
.xe_content{color:#000;font-size:12px}
.xe_content blockquote.q1,
.xe_content blockquote.q2,
.xe_content blockquote.q3,
.xe_content blockquote.q4,
.xe_content blockquote.q5,
.xe_content blockquote.q6,
.xe_content blockquote.q7{ padding:10px; margin:0 15px; }
.xe_content blockquote.q1{ padding:0 10px; border-left:2px solid #ccc;}
.xe_content blockquote.q2{ padding:0 10px; background:url(./img/bg_qmark.gif) no-repeat left top;}
.xe_content blockquote.q3{ border:1px solid #d9d9d9;}
.xe_content blockquote.q4{ border:1px solid #d9d9d9; background:#fbfbfb;}
.xe_content blockquote.q5{ border:2px solid #707070;}
.xe_content blockquote.q6{ border:1px dashed #707070;}
.xe_content blockquote.q7{ border:1px dashed #707070; background:#fbfbfb;}
/* Heading */
.xe_content blockquote.q7{padding:10px;margin:0 15px}
.xe_content blockquote.q1{padding:0 10px;border-left:2px solid #ccc}
.xe_content blockquote.q2{padding:0 10px;background:url(./img/bg_qmark.gif) no-repeat left top}
.xe_content blockquote.q3{border:1px solid #d9d9d9}
.xe_content blockquote.q4{border:1px solid #d9d9d9;background:#fbfbfb}
.xe_content blockquote.q5{border:2px solid #707070}
.xe_content blockquote.q6{border:1px dashed #707070}
.xe_content blockquote.q7{border:1px dashed #707070;background:#fbfbfb}
.xe_content h1,
.xe_content h2,
.xe_content h3,
.xe_content h4,
.xe_content h5,
.xe_content h6{ line-height:1.2; clear:both;}
.xe_content h1{ font-size:22px; border-bottom:4px solid #f4f4f4; background-color:#fff; *border-bottom:1px solid #ccc; *zoom:1; *filter:progid:DXImageTransform.Microsoft.dropshadow(OffX='0', OffY='4', Color='#f4f4f4', positive='true');}
.xe_content h1:after{ content:""; display:block; font-size:0; line-height:0; overflow:hidden; height:1px; background:#ccc;}
.xe_content h2{ font-size:20px; border-bottom:3px solid #f4f4f4; background-color:#fff; *border-bottom:1px solid #ccc; *zoom:1; *filter:progid:DXImageTransform.Microsoft.dropshadow(OffX='0', OffY='3', Color='#f4f4f4', positive='true');}
.xe_content h2:after{ content:""; display:block; font-size:0; line-height:0; overflow:hidden; height:1px; background:#ccc;}
.xe_content h3{ font-size:18px; border-bottom:2px solid #f4f4f4; background-color:#fff; *border-bottom:1px solid #ccc; *zoom:1; *filter:progid:DXImageTransform.Microsoft.dropshadow(OffX='0', OffY='2', Color='#f4f4f4', positive='true');}
.xe_content h3:after{ content:""; display:block; font-size:0; line-height:0; overflow:hidden; height:1px; background:#ccc;}
.xe_content h4{ font-size:16px; border-bottom:1px solid #f4f4f4; background-color:#fff; *border-bottom:1px solid #ccc; *zoom:1; *filter:progid:DXImageTransform.Microsoft.dropshadow(OffX='0', OffY='1', Color='#f4f4f4', positive='true');}
.xe_content h4:after{ content:""; display:block; font-size:0; line-height:0; overflow:hidden; height:1px; background:#ccc;}
.xe_content h5{ font-size:14px; border-bottom:1px solid #ccc;}
.xe_content h6{ font-size:12px; border-bottom:1px dotted #ccc;}
/* Blockquote */
.xe_content q{ background-color:#eee;}
/* Cite */
.xe_content cite{ font-style:normal; color:#8b8b8b;}
/* Code */
.xe_content code{ font-family:"Courier New", Monospace; background-color:#fff5d9;}
.xe_content code.block{ position:relative; font-family:"Courier New", Monospace; line-height:1; display:block; padding:12px 15px 12px 15px; background-color:#fff5d9; -moz-border-radius:5px; -webkit-border-radius:5px;}
/* Anchor */
.xe_content a.none {color:#8b8b8b; padding-right:13px; margin-right:2px; background:url(./img/iconNone.gif); background-repeat:no-repeat; background-position:right center;}
.xe_content a.external{ padding-right:13px; margin-right:2px; background-image:url(./img/iconExternal.gif); background-repeat:no-repeat; background-position:right center;}
.xe_content a.blank{ padding-right:13px; margin-right:2px; background-image:url(./img/iconBlank.gif); background-repeat:no-repeat; background-position:right center;}
/* Division */
.xe_content .mpDivision{ border:1px dotted #ccc; padding-left:15px; padding-right:15px; -moz-border-radius:5px; -webkit-border-radius:5px; background:#f4f4f4;}
.xe_content h6{line-height:1.2;clear:both}
.xe_content h1{font-size:22px;border-bottom:4px solid #f4f4f4;background-color:#fff;*border-bottom:1px solid #ccc;*zoom:1;*filter:progid:DXImageTransform.Microsoft.dropshadow(OffX='0', OffY='4', Color='#f4f4f4', positive='true')}
.xe_content h1:after{content:"";display:block;font-size:0;line-height:0;overflow:hidden;height:1px;background:#ccc}
.xe_content h2{font-size:20px;border-bottom:3px solid #f4f4f4;background-color:#fff;*border-bottom:1px solid #ccc;*zoom:1;*filter:progid:DXImageTransform.Microsoft.dropshadow(OffX='0', OffY='3', Color='#f4f4f4', positive='true')}
.xe_content h2:after{content:"";display:block;font-size:0;line-height:0;overflow:hidden;height:1px;background:#ccc}
.xe_content h3{font-size:18px;border-bottom:2px solid #f4f4f4;background-color:#fff;*border-bottom:1px solid #ccc;*zoom:1;*filter:progid:DXImageTransform.Microsoft.dropshadow(OffX='0', OffY='2', Color='#f4f4f4', positive='true')}
.xe_content h3:after{content:"";display:block;font-size:0;line-height:0;overflow:hidden;height:1px;background:#ccc}
.xe_content h4{font-size:16px;border-bottom:1px solid #f4f4f4;background-color:#fff;*border-bottom:1px solid #ccc;*zoom:1;*filter:progid:DXImageTransform.Microsoft.dropshadow(OffX='0', OffY='1', Color='#f4f4f4', positive='true')}
.xe_content h4:after{content:"";display:block;font-size:0;line-height:0;overflow:hidden;height:1px;background:#ccc}
.xe_content h5{font-size:14px;border-bottom:1px solid #ccc}
.xe_content h6{font-size:12px;border-bottom:1px dotted #ccc}
.xe_content q{background-color:#eee}
.xe_content cite{font-style:normal;color:#8b8b8b}
.xe_content code{font-family:"Courier New", Monospace;background-color:#fff5d9}
.xe_content code.block{position:relative;font-family:"Courier New", Monospace;line-height:1;display:block;padding:12px 15px 12px 15px;background-color:#fff5d9;-moz-border-radius:5px;-webkit-border-radius:5px}
.xe_content a.none {color:#8b8b8b;padding-right:13px;margin-right:2px;background:url(./img/iconNone.gif);background-repeat:no-repeat;background-position:right center}
.xe_content a.external{padding-right:13px;margin-right:2px;background-image:url(./img/iconExternal.gif);background-repeat:no-repeat;background-position:right center}
.xe_content a.blank{padding-right:13px;margin-right:2px;background-image:url(./img/iconBlank.gif);background-repeat:no-repeat;background-position:right center}
.xe_content .mpDivision{border:1px dotted #ccc;padding-left:15px;padding-right:15px;-moz-border-radius:5px;-webkit-border-radius:5px;background:#f4f4f4}

View file

@ -1,10 +1,7 @@
@charset "utf-8";
/* NHN (developers@xpressengine.com) */
html, body { height:100%; background-color:transparent; padding:0; margin:0;}
/* Editable */
.xe_content.editable { margin-right:8px; }
html, body{height:100%;background-color:transparent;padding:0;margin:0}
.xe_content.editable{margin-right:8px;word-break:break-all;word-wrap:break-word}
.xe_content.editable h1,
.xe_content.editable h2,
.xe_content.editable h3,
@ -16,18 +13,18 @@ html, body { height:100%; background-color:transparent; padding:0; margin:0;}
.xe_content.editable ol,
.xe_content.editable dl,
.xe_content.editable div,
.xe_content.editable code.block{ border:1px dotted #444;}
.xe_content.editable h1:before{ content:""; display:block; width:100%; height:9px; margin-bottom:-9px; background-image:url(./img/elementH.gif); background-repeat:no-repeat; background-position:right top;}
.xe_content.editable h2:before{ content:""; display:block; width:100%; height:9px; margin-bottom:-9px; background-image:url(./img/elementH.gif); background-repeat:no-repeat; background-position:right -100px;}
.xe_content.editable h3:before{ content:""; display:block; width:100%; height:9px; margin-bottom:-9px; background-image:url(./img/elementH.gif); background-repeat:no-repeat; background-position:right -200px;}
.xe_content.editable h4:before{ content:""; display:block; width:100%; height:9px; margin-bottom:-9px; background-image:url(./img/elementH.gif); background-repeat:no-repeat; background-position:right -300px;}
.xe_content.editable h5:before{ content:""; display:block; width:100%; height:9px; margin-bottom:-9px; background-image:url(./img/elementH.gif); background-repeat:no-repeat; background-position:right -400px;}
.xe_content.editable h6:before{ content:""; display:block; width:100%; height:9px; margin-bottom:-9px; background-image:url(./img/elementH.gif); background-repeat:no-repeat; background-position:right -500px;}
.xe_content.editable p{ background-image:url(./img/elementP.gif); background-repeat:no-repeat; background-position:right top;}
.xe_content.editable ul{ background-image:url(./img/elementUl.gif); background-repeat:no-repeat; background-position:right top;}
.xe_content.editable ol{ background-image:url(./img/elementOl.gif); background-repeat:no-repeat; background-position:right top;}
.xe_content.editable dl{ background-image:url(./img/elementDl.gif); background-repeat:no-repeat; background-position:right top;}
.xe_content.editable div{ background-image:url(./img/elementDiv.gif); background-repeat:no-repeat; background-position:right top;}
.xe_content.editable code.block{ background-image:url(./img/elementCode.gif); background-repeat:no-repeat; background-position:right top;}
.xe_content.editable code.block{border:1px dotted #444}
.xe_content.editable h1:before{content:"";display:block;width:100%;height:9px;margin-bottom:-9px;background-image:url(./img/elementH.gif);background-repeat:no-repeat;background-position:right top}
.xe_content.editable h2:before{content:"";display:block;width:100%;height:9px;margin-bottom:-9px;background-image:url(./img/elementH.gif);background-repeat:no-repeat;background-position:right -100px}
.xe_content.editable h3:before{content:"";display:block;width:100%;height:9px;margin-bottom:-9px;background-image:url(./img/elementH.gif);background-repeat:no-repeat;background-position:right -200px}
.xe_content.editable h4:before{content:"";display:block;width:100%;height:9px;margin-bottom:-9px;background-image:url(./img/elementH.gif);background-repeat:no-repeat;background-position:right -300px}
.xe_content.editable h5:before{content:"";display:block;width:100%;height:9px;margin-bottom:-9px;background-image:url(./img/elementH.gif);background-repeat:no-repeat;background-position:right -400px}
.xe_content.editable h6:before{content:"";display:block;width:100%;height:9px;margin-bottom:-9px;background-image:url(./img/elementH.gif);background-repeat:no-repeat;background-position:right -500px}
.xe_content.editable p{background-image:url(./img/elementP.gif);background-repeat:no-repeat;background-position:right top}
.xe_content.editable ul{background-image:url(./img/elementUl.gif);background-repeat:no-repeat;background-position:right top}
.xe_content.editable ol{background-image:url(./img/elementOl.gif);background-repeat:no-repeat;background-position:right top}
.xe_content.editable dl{background-image:url(./img/elementDl.gif);background-repeat:no-repeat;background-position:right top}
.xe_content.editable div{background-image:url(./img/elementDiv.gif);background-repeat:no-repeat;background-position:right top}
.xe_content.editable code.block{background-image:url(./img/elementCode.gif);background-repeat:no-repeat;background-position:right top}

View file

@ -1,54 +1,41 @@
/* xe_content */
.xe_content{ color:#fff; font-size:12px;}
@charset "utf-8";
/* NHN (developers@xpressengine.com) */
.xe_content{color:#fff;font-size:12px}
.xe_content blockquote.q1,
.xe_content blockquote.q2,
.xe_content blockquote.q3,
.xe_content blockquote.q4,
.xe_content blockquote.q5,
.xe_content blockquote.q6,
.xe_content blockquote.q7{ padding:10px; margin-left:15px; margin-right:15px;}
.xe_content blockquote.q1{ padding:0 10px; border-left:2px solid #ccc;}
.xe_content blockquote.q2{ padding:0 10px; background:url(./img/bg_qmark.gif) no-repeat left top;}
.xe_content blockquote.q3{ border:1px solid #d9d9d9;}
.xe_content blockquote.q4{ border:1px solid #d9d9d9; background:#fbfbfb;}
.xe_content blockquote.q5{ border:2px solid #707070;}
.xe_content blockquote.q6{ border:1px dashed #707070;}
.xe_content blockquote.q7{ border:1px dashed #707070; background:#fbfbfb;}
/* Heading */
.xe_content blockquote.q7{padding:10px;margin-left:15px;margin-right:15px}
.xe_content blockquote.q1{padding:0 10px;border-left:2px solid #ccc}
.xe_content blockquote.q2{padding:0 10px;background:url(./img/bg_qmark.gif) no-repeat left top}
.xe_content blockquote.q3{border:1px solid #d9d9d9}
.xe_content blockquote.q4{border:1px solid #d9d9d9;background:#fbfbfb}
.xe_content blockquote.q5{border:2px solid #707070}
.xe_content blockquote.q6{border:1px dashed #707070}
.xe_content blockquote.q7{border:1px dashed #707070;background:#fbfbfb}
.xe_content h1,
.xe_content h2,
.xe_content h3,
.xe_content h4,
.xe_content h5,
.xe_content h6{ line-height:1.2; clear:both;}
.xe_content h1{ font-size:22px; border-bottom:4px solid #666; background-color:#000; *border-bottom:1px solid #999; *zoom:1; *filter:progid:DXImageTransform.Microsoft.dropshadow(OffX='0', OffY='4', Color='#666666', positive='true');}
.xe_content h1:after{ content:""; display:block; font-size:0; line-height:0; overflow:hidden; height:1px; background:#999;}
.xe_content h2{ font-size:20px; border-bottom:3px solid #666; background-color:#000; *border-bottom:1px solid #999; *zoom:1; *filter:progid:DXImageTransform.Microsoft.dropshadow(OffX='0', OffY='3', Color='#666666', positive='true');}
.xe_content h2:after{ content:""; display:block; font-size:0; line-height:0; overflow:hidden; height:1px; background:#999;}
.xe_content h3{ font-size:18px; border-bottom:2px solid #666; background-color:#000; *border-bottom:1px solid #999; *zoom:1; *filter:progid:DXImageTransform.Microsoft.dropshadow(OffX='0', OffY='2', Color='#666666', positive='true');}
.xe_content h3:after{ content:""; display:block; font-size:0; line-height:0; overflow:hidden; height:1px; background:#999;}
.xe_content h4{ font-size:16px; border-bottom:1px solid #666; background-color:#000; *border-bottom:1px solid #999; *zoom:1; *filter:progid:DXImageTransform.Microsoft.dropshadow(OffX='0', OffY='1', Color='#666666', positive='true');}
.xe_content h4:after{ content:""; display:block; font-size:0; line-height:0; overflow:hidden; height:1px; background:#999;}
.xe_content h5{ font-size:14px; border-bottom:1px solid #666;}
.xe_content h6{ font-size:12px; border-bottom:1px dotted #666;}
/* Blockquote */
.xe_content q { background-color:#666;}
/* Cite */
.xe_content cite { font-style:normal; color:#8b8b8b;}
/* Code */
.xe_content code { font-family:"Courier New", Monospace; background-color:#998F73;}
.xe_content code.block { position:relative; font-family:"Courier New", Monospace; line-height:1; display:block; padding:12px 15px 12px 15px; background-color:#998F73; -moz-border-radius:5px; -webkit-border-radius:5px;}
/* Anchor */
.xe_content a.none { color:#8b8b8b; padding-right:13px; margin-right:2px; background:url(./img/iconNone.gif); background-repeat:no-repeat; background-position:right center;}
.xe_content a.external { padding-right:13px; margin-right:2px; background-image:url(./img/iconExternal.gif); background-repeat:no-repeat; background-position:right center;}
.xe_content a.blank { padding-right:13px; margin-right:2px; background-image:url(./img/iconBlank.gif); background-repeat:no-repeat; background-position:right center;}
/* Division */
.xe_content .mpDivision{ border:1px dotted #999; padding-left:15px; padding-right:15px; -moz-border-radius:5px; -webkit-border-radius:5px; background:#666;}
.xe_content h6{line-height:1.2;clear:both}
.xe_content h1{font-size:22px;border-bottom:4px solid #666;background-color:#000;*border-bottom:1px solid #999;*zoom:1;*filter:progid:DXImageTransform.Microsoft.dropshadow(OffX='0', OffY='4', Color='#666666', positive='true')}
.xe_content h1:after{content:"";display:block;font-size:0;line-height:0;overflow:hidden;height:1px;background:#999}
.xe_content h2{font-size:20px;border-bottom:3px solid #666;background-color:#000;*border-bottom:1px solid #999;*zoom:1;*filter:progid:DXImageTransform.Microsoft.dropshadow(OffX='0', OffY='3', Color='#666666', positive='true')}
.xe_content h2:after{content:"";display:block;font-size:0;line-height:0;overflow:hidden;height:1px;background:#999}
.xe_content h3{font-size:18px;border-bottom:2px solid #666;background-color:#000;*border-bottom:1px solid #999;*zoom:1;*filter:progid:DXImageTransform.Microsoft.dropshadow(OffX='0', OffY='2', Color='#666666', positive='true')}
.xe_content h3:after{content:"";display:block;font-size:0;line-height:0;overflow:hidden;height:1px;background:#999}
.xe_content h4{font-size:16px;border-bottom:1px solid #666;background-color:#000;*border-bottom:1px solid #999;*zoom:1;*filter:progid:DXImageTransform.Microsoft.dropshadow(OffX='0', OffY='1', Color='#666666', positive='true')}
.xe_content h4:after{content:"";display:block;font-size:0;line-height:0;overflow:hidden;height:1px;background:#999}
.xe_content h5{font-size:14px;border-bottom:1px solid #666}
.xe_content h6{font-size:12px;border-bottom:1px dotted #666}
.xe_content q {background-color:#666}
.xe_content cite {font-style:normal;color:#8b8b8b}
.xe_content code {font-family:"Courier New", Monospace;background-color:#998F73}
.xe_content code.block {position:relative;font-family:"Courier New", Monospace;line-height:1;display:block;padding:12px 15px 12px 15px;background-color:#998F73;-moz-border-radius:5px;-webkit-border-radius:5px}
.xe_content a.none {color:#8b8b8b;padding-right:13px;margin-right:2px;background:url(./img/iconNone.gif);background-repeat:no-repeat;background-position:right center}
.xe_content a.external {padding-right:13px;margin-right:2px;background-image:url(./img/iconExternal.gif);background-repeat:no-repeat;background-position:right center}
.xe_content a.blank {padding-right:13px;margin-right:2px;background-image:url(./img/iconBlank.gif);background-repeat:no-repeat;background-position:right center}
.xe_content .mpDivision{border:1px dotted #999;padding-left:15px;padding-right:15px;-moz-border-radius:5px;-webkit-border-radius:5px;background:#666}

View file

@ -80,13 +80,13 @@
<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}" <!--@if($key==$editor_config->content_style||!$editor_config->content_style&&$key=='default')-->checked="checked"<!--@end-->><label for="style_{$key}">{$key}</label>
<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="3" cols="42" class="fontPreview" title="Font Preview">{$lang->font_preview}</textarea>
<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)-->
@ -96,7 +96,7 @@
</li>
<li>
<p class="q"><label for="fontSize">{$lang->guide_choose_font_size_body}</label></p>
<textarea rows="3" cols="42" class="fontPreview" title="Font Preview">{$lang->font_preview}</textarea>
<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>
</ul>

View file

@ -1,50 +1,42 @@
@charset "utf-8";
.xeEditor { }
.xeEditor .optionABC { clear:both; width:100%; border-bottom:1px solid #c2c2c2; overflow:hidden; background:#ffffff url(../images/bgBoardEditorOption.gif) no-repeat -3px bottom;}
.xeEditor .optionABC .selectGroup { white-space:nowrap; display:block; height:21px; margin:0 .5em 0 0; padding-left:1em; float:left;}
.xeEditor .optionABC .buttonGroup { white-space:nowrap; position:relative; display:block; margin:0 .5em 0 0; float:left; height:21px; overflow:hidden; padding-left:2px;}
.xeEditor .optionABC .buttonGroup img { float:left; display:block; margin-left:-1px; cursor:pointer;}
.xeEditor .optionABC{clear:both;width:100%;border-bottom:1px solid #c2c2c2;overflow:hidden;background:#ffffff url(../images/bgBoardEditorOption.gif) no-repeat -3px bottom}
.xeEditor .optionABC .selectGroup{white-space:nowrap;display:block;height:21px;margin:0 .5em 0 0;padding-left:1em;float:left}
.xeEditor .optionABC .buttonGroup{white-space:nowrap;position:relative;display:block;margin:0 .5em 0 0;float:left;height:21px;overflow:hidden;padding-left:2px}
.xeEditor .optionABC .buttonGroup img{float:left;display:block;margin-left:-1px;cursor:pointer}
.xeEditor .optionA,
.xeEditor .optionB,
.xeEditor .optionC { float:left; background:#ffffff url(../images/bgBoardEditorOption.gif) no-repeat left bottom; padding:.5em 0 .5em .7em; overflow:hidden;}
.xeEditor .optionC{float:left;background:#ffffff url(../images/bgBoardEditorOption.gif) no-repeat left bottom;padding:.5em 0 .5em .7em;overflow:hidden}
.xeEditor .optionA *,
.xeEditor .optionB *,
.xeEditor .optionC * { vertical-align:middle;}
.xeEditor .optionA { background-position:-3px bottom; padding-left:0;}
.xeEditor .optionA select option { font-size:.9em; }
.xeEditor .optionDE { width:100%; clear:both; overflow:hidden; background:#f8f8f8; border-bottom:1px solid #e1e1e1; height:29px;}
.xeEditor .optionDE .buttonGroup { white-space:nowrap; position:relative; display:block; float:left; height:21px; overflow:hidden; padding-left:2px;}
.xeEditor .optionDE img { float:left; display:block; margin-right:.5em; cursor:pointer;}
.xeEditor .optionD { padding:.5em 0 .5em .8em; overflow:hidden; float:left; border-right:1px solid #e0e0e0;}
.xeEditor .optionE { padding:4px 0 0 8px; overflow:hidden; border-left:1px solid #ffffff; float:left;}
.xeEditor .editorInfo { background:#fbfbfb; padding:.5em; border:1px solid #e1e1dd; color:#999999; position:relative; margin:5px 20px 0 20px;}
.xeEditor .close { cursor:pointer; position:absolute; top:3px; right:3px; _top:3px; _right:25px;}
.xeEditor .editor_iframe_box { background:#ffffff; clear:both; border:1px solid; border-color:#a6a6a6 #d8d8d8 #d8d8d8 #a6a6a6; padding:.5em; margin:0 20px 0 20px; }
.xeEditor .textAreaDragIndicator { text-align:center; background:url(../images/lineTextAreaDrag.gif) repeat-x left center; padding:5px 0 5px 0; }
.xeEditor .textAreaDragIndicatorBar { background:url(../images/buttonTextAreaDrag.gif) no-repeat center; cursor:move;height:14px;}
.xeEditor .editor_info { clear:both; padding:5px 20px 5px 20px; overflow:hidden;}
.xeEditor .editor_info .editor_option { float:left; color:#888888; }
.xeEditor .editor_info .editor_autosaved_message { color:#888888; float:right; }
.xeEditor .inputTypeTextArea { background:#fbfbfb; padding:1em; width:94%;}
.xeEditor #textAreaDrag {}
.xeEditor .fileAttach { padding:0 1em .5em 1em;}
.xeEditor .fileAttach .preview { padding:5px; width:110px; height:110px; border:1px solid #e1e1dd; background:#fbfbfb; float:left; margin-right:.5em;}
.xeEditor .fileAttach .preview img { width:110px; height:110px; float:left; display:block;}
.xeEditor .fileAttach .fileListArea { float:left; width:50%; margin-right:.7em; padding-bottom:.5em; margin-bottom:1em}
.xeEditor .fileAttach .fileListArea .fileList { overflow:auto; width:100%; height:auto; border:1px solid; border-color:#a6a6a6 #d8d8d8 #d8d8d8 #a6a6a6; margin-bottom:.3em; font-size:11px;}
.xeEditor .fileAttach .fileListArea .fileList option { line-height:100%; padding-left:.5em;}
.xeEditor .fileAttach .fileListArea span.file_attach_info { color:#3f4040; font-size:11px; text-align:left;}
.xeEditor .fileAttach .fileListArea span.file_attach_info strong { color:#ff6600; font-size:11px; font-weight:bold; }
.xeEditor .fileAttach .fileUploadControl { margin-bottom:5px; }
.xeEditor .fileAttach .fileUploadControl .uploaderButton { display:block; cursor:pointer; background:url(../images/buttonTypeBCenter.gif) repeat-x left center; line-height:100%; overflow:visible; color:#3f4040; margin:0 1px; font-size:.9em; white-space:nowrap;}
.xeEditor .fileAttach .fileUploadControl .uploaderButton:hover { text-decoration:none;}
.xeEditor .fileAttach .fileUploadControl .uploaderButton img { vertical-align:middle;}
.xeEditor .fileAttach .fileUploadControl .uploaderButton .leftCap { width:2px; height:21px; background:url(../images/buttonTypeBLeft.gif) no-repeat; margin:0 .3em 0 0; position:relative; left:-1px;}
.xeEditor .fileAttach .fileUploadControl .uploaderButton .rightCap { width:2px; height:21px; background:url(../images/buttonTypeBRight.gif) no-repeat; margin:0 -1px 0 .4em;}
.xeEditor .fileAttach .fileUploadControl .uploaderButton .icon { margin:0 .2em;}
.xeEditor .optionC *{vertical-align:middle}
.xeEditor .optionA{background-position:-3px bottom;padding-left:0}
.xeEditor .optionA select option{font-size:.9em}
.xeEditor .optionDE{width:100%;clear:both;overflow:hidden;background:#f8f8f8;border-bottom:1px solid #e1e1e1;height:29px}
.xeEditor .optionDE .buttonGroup{white-space:nowrap;position:relative;display:block;float:left;height:21px;overflow:hidden;padding-left:2px}
.xeEditor .optionDE img{float:left;display:block;margin-right:.5em;cursor:pointer}
.xeEditor .optionD{padding:.5em 0 .5em .8em;overflow:hidden;float:left;border-right:1px solid #e0e0e0}
.xeEditor .optionE{padding:4px 0 0 8px;overflow:hidden;border-left:1px solid #ffffff;float:left}
.xeEditor .editorInfo{background:#fbfbfb;padding:.5em;border:1px solid #e1e1dd;color:#999999;position:relative;margin:5px 20px 0 20px}
.xeEditor .close{cursor:pointer;position:absolute;top:3px;right:3px;_top:3px;_right:25px}
.xeEditor .editor_iframe_box{background:#ffffff;clear:both;border:1px solid;border-color:#a6a6a6 #d8d8d8 #d8d8d8 #a6a6a6;padding:.5em;margin:0 20px 0 20px}
.xeEditor .textAreaDragIndicator{text-align:center;background:url(../images/lineTextAreaDrag.gif) repeat-x left center;padding:5px 0 5px 0}
.xeEditor .textAreaDragIndicatorBar{background:url(../images/buttonTextAreaDrag.gif) no-repeat center;cursor:move;height:14px}
.xeEditor .editor_info{clear:both;padding:5px 20px 5px 20px;overflow:hidden}
.xeEditor .editor_info .editor_option{float:left;color:#888888}
.xeEditor .editor_info .editor_autosaved_message{color:#888888;float:right}
.xeEditor .iTextArea{background:#fbfbfb;padding:1em;width:94%}
.xeEditor .fileAttach{padding:0 1em .5em 1em}
.xeEditor .fileAttach .preview{padding:5px;width:110px;height:110px;border:1px solid #e1e1dd;background:#fbfbfb;float:left;margin-right:.5em}
.xeEditor .fileAttach .preview img{width:110px;height:110px;float:left;display:block}
.xeEditor .fileAttach .fileListArea{float:left;width:50%;margin-right:.7em;padding-bottom:.5em;margin-bottom:1em}
.xeEditor .fileAttach .fileListArea .fileList{overflow:auto;width:100%;height:auto;border:1px solid;border-color:#a6a6a6 #d8d8d8 #d8d8d8 #a6a6a6;margin-bottom:.3em;font-size:11px}
.xeEditor .fileAttach .fileListArea .fileList option{line-height:100%;padding-left:.5em}
.xeEditor .fileAttach .fileListArea span.file_attach_info{color:#3f4040;font-size:11px;text-align:left}
.xeEditor .fileAttach .fileListArea span.file_attach_info strong{color:#ff6600;font-size:11px;font-weight:bold}
.xeEditor .fileAttach .fileUploadControl{margin-bottom:5px}
.xeEditor .fileAttach .fileUploadControl .uploaderButton{display:block;cursor:pointer;background:url(../images/buttonTypeBCenter.gif) repeat-x left center;line-height:100%;overflow:visible;color:#3f4040;margin:0 1px;font-size:.9em;white-space:nowrap}
.xeEditor .fileAttach .fileUploadControl .uploaderButton:hover{text-decoration:none}
.xeEditor .fileAttach .fileUploadControl .uploaderButton img{vertical-align:middle}
.xeEditor .fileAttach .fileUploadControl .uploaderButton .leftCap{width:2px;height:21px;background:url(../images/buttonTypeBLeft.gif) no-repeat;margin:0 .3em 0 0; position:relative;left:-1px}
.xeEditor .fileAttach .fileUploadControl .uploaderButton .rightCap{width:2px;height:21px;background:url(../images/buttonTypeBRight.gif) no-repeat;margin:0 -1px 0 .4em}
.xeEditor .fileAttach .fileUploadControl .uploaderButton .icon{margin:0 .2em}

View file

@ -253,7 +253,7 @@ function editorSearchComponent(evt) {
// editor_component를 찾지 못했을 경우에 이미지/텍스트/링크의 경우 기본 컴포넌트와 연결
if(!editor_component) {
// 이미지일 경우
if(obj.nodeName == "IMG") {
if(obj.nodeName == "IMG" && !obj.getAttribute("widget")) {
editor_component = "image_link";
editorPrevNode = obj;
}

View file

@ -9,22 +9,25 @@ function getEditorSkinColorList(skin_name,selected_colorset,type,testid){
function resultGetEditorSkinColorList(ret_obj,response_tags, params) {
var selectbox = null;
jQuery(function($){
selectbox = jQuery("#"+params.testid).next('label').next('select');
if(params.testid){
selectbox = $("#"+params.testid).next('label').next('select');
}else{
selectbox = (params.type == 'document') ? $('select[name=sel_editor_colorset]') : $('select[name=sel_comment_editor_colorset]');
}
selectbox.html('');
if(params.type == 'document'){
$("select[name=sel_editor_colorset]").css('display','none');
$("select[name=sel_editor_colorset]").removeAttr('name');
$("select[name=sel_editor_colorset]").hide()
.removeAttr('name');
selectbox.attr('name','sel_editor_colorset');
}else{
$("select[name=sel_comment_editor_colorset]").css('display','none');
$("select[name=sel_comment_editor_colorset]").removeAttr('name');
$("select[name=sel_comment_editor_colorset]").hide()
.removeAttr('name');
selectbox.attr('name','sel_comment_editor_colorset');
}
if(ret_obj['error'] == 0 && ret_obj.colorset){
var it = new Array();
var items = ret_obj['colorset']['item'];
if(typeof(items[0]) == 'undefined'){
it[0] = items;
@ -35,10 +38,10 @@ function resultGetEditorSkinColorList(ret_obj,response_tags, params) {
for(var i=0;i<it.length;i++){
selectbox.append($('<option value="'+it[i].name+'" >'+it[i].title+'</option>'));
}
selectbox.css('display','');
selectbox.show();
}else{
selectbox.css('display','none');
selectbox.innerHTML="";
selectbox.hide();
selectbox.html('');
}
});
}

View file

@ -71,7 +71,7 @@ function start(cfg) {
// Button settings
button_window_mode : 'transparent',
button_placeholder : $span.get(0),
button_placeholder_id : $span.attr('id'),
button_text : null,
button_image_url : request_uri+'common/img/blank.gif',
button_width : width,