diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 5d4853d80..ac46ca5c2 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -1151,9 +1151,13 @@ class Context { * @brief Add the js file * @deprecated **/ - function addJsFile($file, $optimized = false, $targetie = '',$index=0, $type='head', $isRuleset = false) { + function addJsFile($file, $optimized = false, $targetie = '',$index=0, $type='head', $isRuleset = false, $autoPath = null) { if($isRuleset) { + if (strpos($file, '#') !== false){ + $file = str_replace('#', '', $file); + if (!is_readable($file)) $file = $autoPath; + } $validator = new Validator($file); $validator->setCacheDir('files/cache'); $file = $validator->getJsPath(); diff --git a/classes/db/queryparts/condition/ConditionWithoutArgument.class.php b/classes/db/queryparts/condition/ConditionWithoutArgument.class.php index 68ee35103..950235020 100644 --- a/classes/db/queryparts/condition/ConditionWithoutArgument.class.php +++ b/classes/db/queryparts/condition/ConditionWithoutArgument.class.php @@ -3,8 +3,10 @@ class ConditionWithoutArgument extends Condition { function ConditionWithoutArgument($column_name, $argument, $operation, $pipe = ""){ parent::Condition($column_name, $argument, $operation, $pipe); - if(in_array($operation, array('in', 'notin'))) - $this->_value = '('. $argument .')'; + if(in_array($operation, array('in', 'notin'))){ + if(is_array($argument)) $argument = implode($argument, ','); + $this->_value = '('. $argument .')'; + } else $this->_value = $argument; diff --git a/classes/extravar/Extravar.class.php b/classes/extravar/Extravar.class.php index db16ac8ba..7b6101c7a 100644 --- a/classes/extravar/Extravar.class.php +++ b/classes/extravar/Extravar.class.php @@ -199,9 +199,9 @@ // Phone Number case 'tel' : $buff .= - ''. - ''. - ''; + ''. + ''. + ''; break; // textarea @@ -218,7 +218,7 @@ // Temporary ID for labeling $tmp_id = $column_name.'-'.$id_num++; - $buff .='
'; + $buff .=''; } $buff .= ''; break; diff --git a/classes/frontendfile/FrontEndFileHandler.class.php b/classes/frontendfile/FrontEndFileHandler.class.php index b54c8d4b4..90a3ebce4 100644 --- a/classes/frontendfile/FrontEndFileHandler.class.php +++ b/classes/frontendfile/FrontEndFileHandler.class.php @@ -206,7 +206,8 @@ } else { - $fullFilePath = $file->filePath . '/' . $file->fileName; + $noneCache = (is_readable($file->cdnPath.'/'.$file->fileName))?'?'.date('YmdHis', filemtime($file->cdnPath.'/'.$file->fileName)):''; + $fullFilePath = $file->filePath . '/' . $file->fileName.$noneCache; } $result[] = array('file' => $fullFilePath, 'targetie' => $file->targetIe); } diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php index d31c7eb1d..fbd20535e 100644 --- a/classes/module/ModuleHandler.class.php +++ b/classes/module/ModuleHandler.class.php @@ -370,7 +370,7 @@ if(!empty($ruleset)) { $rulesetModule = $forward->module ? $forward->module : $this->module; - $rulesetFile = $oModuleModel->getValidatorFilePath($rulesetModule, $ruleset); + $rulesetFile = $oModuleModel->getValidatorFilePath($rulesetModule, $ruleset, $this->mid); if(!empty($rulesetFile)) { $Validator = new Validator($rulesetFile); diff --git a/classes/template/TemplateHandler.class.php b/classes/template/TemplateHandler.class.php index 6ee48ba09..281801d85 100644 --- a/classes/template/TemplateHandler.class.php +++ b/classes/template/TemplateHandler.class.php @@ -187,7 +187,7 @@ class TemplateHandler { $buff = $this->_parseInline($buff); // include, unload/load, import - $buff = preg_replace_callback('/{(@[\s\S]+?|(?=\$\w+|_{1,2}[A-Z]+|[!\(+-]|\w+(?:\(|::)|\d+|[\'"].*?[\'"]).+?)}|<(!--[#%])?(include|import|(un)?load(?(4)|(?:_js_plugin)?))(?(2)\("([^"]+)")(.*?)(?(2)\)--|\/)>|(\s*)/', array($this, '_parseResource'), $buff); + $buff = preg_replace_callback('/{(@[\s\S]+?|(?=\$\w+|_{1,2}[A-Z]+|[!\(+-]|\w+(?:\(|::)|\d+|[\'"].*?[\'"]).+?)}|<(!--[#%])?(include|import|(un)?load(?(4)|(?:_js_plugin)?))(?(2)\("([^"]+)")(.*?)(?(2)\)--|\/)>|(\s*)/', array($this, '_parseResource'), $buff); // remove block which is a virtual tag and remove comments $buff = preg_replace('@?block\s*>|\s?@is','',$buff); @@ -215,18 +215,30 @@ class TemplateHandler { preg_match('/ruleset="([^"]*?)"/is', $matches[1], $m); if($m[0]) { - $matches[1] = preg_replace('/'.$m[0].'/i', '', $matches[1]); - $matches[2] = ''.$matches[2]; + $matches[1] = preg_replace('/'.addcslashes($m[0], '?$').'/i', '', $matches[1]); if (strpos($m[1],'@') !== false){ $path = str_replace('@', '', $m[1]); $path = './files/ruleset/'.$path.'.xml'; + }else if(strpos($m[1],'#') !== false){ + $fileName = str_replace('#', '', $m[1]); + $fileName = str_replace('', '', $fileName); + $path = '#./files/ruleset/'.$fileName.'.xml'; + + preg_match('@(?:^|\.?/)(modules/[\w-]+)@', $this->path, $mm); + $module_path = $mm[1]; + list($rulsetFile) = explode('.', $fileName); + $autoPath = $module_path.'/ruleset/'.$rulsetFile.'.xml'; + $m[1] = $rulsetFile; }else if(preg_match('@(?:^|\.?/)(modules/[\w-]+)@', $this->path, $mm)) { $module_path = $mm[1]; $path = $module_path.'/ruleset/'.$m[1].'.xml'; } + + $matches[2] = ''.$matches[2]; //assign to addJsFile method for js dynamic recache - $matches[1] = ''.$matches[1]; + $matches[1] = ''.$matches[1]; } } @@ -245,11 +257,15 @@ class TemplateHandler { } // return url generate - if (!preg_match('/no-error-return-url="true"/i', $matches[1])) + if(!preg_match('/no-error-return-url="true"/i', $matches[1])) { preg_match('/]*name="error_return_url"[^>]*>/is', $matches[2], $m3); if(!$m3[0]) $matches[2] = ''.$matches[2]; } + else + { + $matches[1] = preg_replace('/no-error-return-url="true"/i', '', $matches[1]); + } $matches[0] = ''; return implode($matches); @@ -297,7 +313,7 @@ class TemplateHandler { $src = str_replace('/./', '/', $src); // for backward compatibility - $src = preg_replace('@((?:[\w-]+/)+)\1@', '\1', $src); + $src = preg_replace('@/((?:[\w-]+/)+)\1@', '/\1', $src); while(($tmp=preg_replace('@[^/]+/\.\./@', '', $src))!==$src) $src = $tmp; @@ -506,6 +522,7 @@ class TemplateHandler { if($m[7]) { $m[7] = substr($m[7],1); + if(!$m[7]) return '_replaceVar($m[8]).'{ ?>'.$m[9]; if(!preg_match('/^(?:((?:end)?(?:if|switch|for(?:each)?|while)|end)|(else(?:if)?)|(break@)?(case|default)|(break))$/', $m[7], $mm)) return ''; if($mm[1]) { if($mm[1]{0} == 'e') return ''.$m[9]; @@ -560,7 +577,7 @@ class TemplateHandler { **/ function _replaceVar($php) { if(!strlen($php)) return ''; - return preg_replace('@(?$1', $php); + return preg_replace('@(?$1', $php); } } diff --git a/classes/validator/Validator.class.php b/classes/validator/Validator.class.php index aa07afa2e..ac474efcb 100644 --- a/classes/validator/Validator.class.php +++ b/classes/validator/Validator.class.php @@ -421,6 +421,8 @@ class Validator if(preg_match('@(^|/)files/ruleset/\w+\.xml$@i', $this->_xml_path)) $ruleset = '@'.$ruleset; + list($ruleset) = explode('.', $ruleset); + // current language $lang_type = class_exists('Context')?Context::getLangType():'en'; diff --git a/classes/xml/XmlGenerator.class.php b/classes/xml/XmlGenerator.class.php new file mode 100644 index 000000000..5956c2bea --- /dev/null +++ b/classes/xml/XmlGenerator.class.php @@ -0,0 +1,43 @@ +\n"; + + foreach($xml as $nodeName => $nodeItem){ + $buff .= $this->_makexml($nodeItem); + } + return $buff; + } + + function _makexml($node){ + $body = ''; + foreach($node as $key => $value){ + switch($key){ + case 'node_name' : break; + case 'attrs' : { + $attrs = ''; + if (isset($value)){ + foreach($value as $attrName=>$attrValue){ + $attrs .= sprintf(' %s="%s"', $attrName, htmlspecialchars($attrValue)); + } + } + }break; + case 'body' : $body = $value; break; + default : { + if (is_array($value)){ + foreach($value as $idx => $arrNode){ + $body .= $this->_makexml($arrNode); + } + }else if(is_object($value)){ + $body = $this->_makexml($value); + } + } + } + } + return sprintf('<%s%s>%s%s>'."\n", $node->node_name, $attrs, $body, $node->node_name); + } +} + +?> diff --git a/common/img/flvplayer.swf b/common/img/flvplayer.swf index 59b6083c2..2f2ffd703 100644 Binary files a/common/img/flvplayer.swf and b/common/img/flvplayer.swf differ diff --git a/common/js/common.js b/common/js/common.js index 3d7ed4db1..b35e42c50 100644 --- a/common/js/common.js +++ b/common/js/common.js @@ -532,7 +532,9 @@ function doDocumentPreview(obj) { ).appendTo(document.body); dummy_obj = jQuery("#previewDocument")[0]; - } + } else { + dummy_obj = dummy_obj[0]; + } if(dummy_obj) { dummy_obj.content.value = content; @@ -974,4 +976,11 @@ jQuery(function($){ // cancel default action return false; }); + + // date picker default settings + if($.datepicker) { + $.datepicker.setDefaults({ + dateFormat : 'yy-mm-dd' + }); + } }); diff --git a/common/js/plugins/filebox/filebox.js b/common/js/plugins/filebox/filebox.js index 92137822a..a8999253e 100644 --- a/common/js/plugins/filebox/filebox.js +++ b/common/js/plugins/filebox/filebox.js @@ -80,3 +80,32 @@ $.extend(window.XE, {'filebox' : filebox}); }) (jQuery); + +function addRow(ulId){ + var $ = jQuery; + var count = $('#'+ulId).children().length; + var clone = $('#'+ulId).find('li:last-child').prev().clone(); + $('#'+ulId).find('li:last-child').prev().find('.__addBtn').hide(); + + clone.find('input[name^="attribute_name"]').attr("name", "attribute_name"+count).attr('value', '') + .attr("id", "attribute_name"+count) + .prev('label').attr('for', 'attribute_name'+count); + clone.find('input[name^="attribute_value"]').attr("name", "attribute_value"+count).attr('value', '') + .attr("id", "attribute_value"+count) + .prev('label').attr('for', 'attribute_value'+count); + + $('#'+ulId).find('li:last-child').before(clone); +} + +function clearRow(target){ + var $ = jQuery; + var ulTag = $(target).closest('ul'); + var count = ulTag.children().length - 1; + if (count <= 1){ + ulTag.find('li:last-child').prev().find('.__addBtn').show(); + return; + } + + $(target).closest('li').remove(); + ulTag.find('li:last-child').prev().find('.__addBtn').show(); +} diff --git a/common/js/plugins/ui.colorpicker/css/xe_colorpicker.css b/common/js/plugins/ui.colorpicker/css/xe_colorpicker.css index 995e20d19..d2cc6b6c7 100644 --- a/common/js/plugins/ui.colorpicker/css/xe_colorpicker.css +++ b/common/js/plugins/ui.colorpicker/css/xe_colorpicker.css @@ -1,79 +1 @@ -.colorpicker img, .colorpicker div { - behavior: url(iepngfix.htc); -} - - -.xe_colorpicker { - position:absolute; - width:194px; - height:183px; - overflow:hidden; - z-index:100; -} - -.xe_colorpicker .colorpicker { - position:relative; - width:192px; - height:160px; - background-color:white; - border:1px solid silver; -} - -.xe_colorpicker .colortable { - position:absolute; - left : 4px; - top : 4px; - border:1px solid #909090; -} - -.xe_colorpicker .colortable .background { - position:relative; - width:150px; - height:150px; - background:url(../images/colorpicker_overlay.png) no-repeat; - overflow:hidden; -} - -.xe_colorpicker .colortable .indicator { - position:absolute; - width:11px; - height:11px; - background:url(../images/colorpicker_select.gif) no-repeat; -} - -.xe_colorpicker .huebar { - position:absolute; - right : 4px; - top : 4px; - border:1px solid #909090; -} - -.xe_colorpicker .huebar .background { - width:20px; - height:150px; - background:url(../images/colorpicker_huebg.png) repeat-x; -} - -.xe_colorpicker .huebar .indicator { - position:absolute; - width:35px; - height:9px; - left:-3px; - background:transparent url(../images/colorpicker_indic.gif) no-repeat; -} - -.xe_colorpicker .buttons { - position:absolute; - width:194px; - background-color:black; -} - -.xe_colorpicker .buttons button { - width:33%; - color:white; - height:22px; - border:0; - background-color:transparent; - padding:0; - margin:0; -} +.xe_colorpicker{position:absolute;width:194px;height:183px;overflow:hidden;z-index:100}.xe_colorpicker .colorpicker{position:relative;width:192px;height:160px;background-color:white;border:1px solid silver}.xe_colorpicker .colortable{position:absolute;left :4px;top :4px;border:1px solid #909090}.xe_colorpicker .colortable .background{position:relative;width:150px;height:150px;background:url(../images/colorpicker_overlay.png) no-repeat;overflow:hidden}.xe_colorpicker .colortable .indicator{position:absolute;width:11px;height:11px;background:url(../images/colorpicker_select.gif) no-repeat}.xe_colorpicker .huebar{position:absolute;right :4px;top:4px;border:1px solid #909090}.xe_colorpicker .huebar .background{width:20px;height:150px;background:url(../images/colorpicker_huebg.png) repeat-x}.xe_colorpicker .huebar .indicator{position:absolute;width:35px;height:9px;left:-3px;background:transparent url(../images/colorpicker_indic.gif) no-repeat}.xe_colorpicker .buttons{position:absolute;width:194px;background-color:black}.xe_colorpicker .buttons button{width:33%;color:white;height:22px;border:0;background-color:transparent;padding:0;margin:0} \ No newline at end of file diff --git a/common/js/plugins/ui/jquery-ui.css b/common/js/plugins/ui/jquery-ui.css index 8a8c10722..0f1a7e770 100644 --- a/common/js/plugins/ui/jquery-ui.css +++ b/common/js/plugins/ui/jquery-ui.css @@ -1,5 +1,5 @@ /* - * jQuery UI CSS Framework 1.8.12 + * jQuery UI CSS Framework 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. @@ -42,7 +42,7 @@ /* - * jQuery UI CSS Framework 1.8.12 + * jQuery UI CSS Framework 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. @@ -280,20 +280,15 @@ ----------------------------------*/ /* Corner radius */ -.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; } -.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } -.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } -.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } -.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } -.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } -.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } -.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } -.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } +.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; } +.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } /* Overlays */ .ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); } -.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/* - * jQuery UI Resizable 1.8.12 +.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -khtml-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/* + * jQuery UI Resizable 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. @@ -302,12 +297,7 @@ * http://docs.jquery.com/UI/Resizable#theming */ .ui-resizable { position: relative;} -.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; - /* http://bugs.jqueryui.com/ticket/7233 - - Resizable: resizable handles fail to work in IE if transparent and content overlaps - */ - background-image:url(data:); -} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; } .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } @@ -317,7 +307,7 @@ .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* - * jQuery UI Selectable 1.8.12 + * jQuery UI Selectable 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. @@ -327,7 +317,7 @@ */ .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } /* - * jQuery UI Accordion 1.8.12 + * jQuery UI Accordion 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. @@ -346,7 +336,7 @@ .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } .ui-accordion .ui-accordion-content-active { display: block; } /* - * jQuery UI Autocomplete 1.8.12 + * jQuery UI Autocomplete 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. @@ -360,7 +350,7 @@ * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ /* - * jQuery UI Menu 1.8.12 + * jQuery UI Menu 1.8.16 * * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. @@ -399,7 +389,7 @@ margin: -1px; } /* - * jQuery UI Button 1.8.12 + * jQuery UI Button 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. @@ -437,7 +427,7 @@ input.ui-button { padding: .4em 1em; } /* workarounds */ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ /* - * jQuery UI Dialog 1.8.12 + * jQuery UI Dialog 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. @@ -458,7 +448,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } .ui-draggable .ui-dialog-titlebar { cursor: move; } /* - * jQuery UI Slider 1.8.12 + * jQuery UI Slider 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. @@ -481,7 +471,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } .ui-slider-vertical .ui-slider-range-min { bottom: 0; } .ui-slider-vertical .ui-slider-range-max { top: 0; }/* - * jQuery UI Tabs 1.8.12 + * jQuery UI Tabs 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. @@ -499,7 +489,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } .ui-tabs .ui-tabs-hide { display: none !important; } /* - * jQuery UI Datepicker 1.8.12 + * jQuery UI Datepicker 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. @@ -507,7 +497,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad * * http://docs.jquery.com/UI/Datepicker#theming */ -.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; z-index:100 !important} +.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } @@ -539,7 +529,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } -.ui-datepicker-row-break { clear:both; width:100%; } +.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } /* RTL support */ .ui-datepicker-rtl { direction: rtl; } @@ -566,7 +556,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad width: 200px; /*must have*/ height: 200px; /*must have*/ }/* - * jQuery UI Progressbar 1.8.12 + * jQuery UI Progressbar 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. diff --git a/common/js/plugins/ui/jquery-ui.min.js b/common/js/plugins/ui/jquery-ui.min.js index 4370afdae..14c9064f7 100644 --- a/common/js/plugins/ui/jquery-ui.min.js +++ b/common/js/plugins/ui/jquery-ui.min.js @@ -1,5 +1,5 @@ /*! - * jQuery UI 1.8.15 + * jQuery UI 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. @@ -7,407 +7,785 @@ * * http://docs.jquery.com/UI */ -(function(a,c){function d(h,g){var i=h.nodeName.toLowerCase();if("area"===i){g=h.parentNode;i=g.name;if(!h.href||!i||g.nodeName.toLowerCase()!=="map")return false;h=a("img[usemap=#"+i+"]")[0];return!!h&&e(h)}return(/input|select|textarea|button|object/.test(i)?!h.disabled:"a"==i?h.href||g:g)&&e(h)}function e(h){return!a(h).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.ui=a.ui||{};if(!a.ui.version){a.extend(a.ui,{version:"1.8.15", -keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(h,g){return typeof h==="number"?this.each(function(){var i= -this;setTimeout(function(){a(i).focus();g&&g.call(i)},h)}):this._focus.apply(this,arguments)},scrollParent:function(){var h;h=a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this, -"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!h.length?a(document):h},zIndex:function(h){if(h!==c)return this.css("zIndex",h);if(this.length){h=a(this[0]);for(var g;h.length&&h[0]!==document;){g=h.css("position");if(g==="absolute"||g==="relative"||g==="fixed"){g=parseInt(h.css("zIndex"),10);if(!isNaN(g)&&g!==0)return g}h=h.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart": -"mousedown")+".ui-disableSelection",function(h){h.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(h,g){function i(l,o,n,k){a.each(b,function(){o-=parseFloat(a.curCSS(l,"padding"+this,true))||0;if(n)o-=parseFloat(a.curCSS(l,"border"+this+"Width",true))||0;if(k)o-=parseFloat(a.curCSS(l,"margin"+this,true))||0});return o}var b=g==="Width"?["Left","Right"]:["Top","Bottom"],f=g.toLowerCase(),j={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight, -outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+g]=function(l){if(l===c)return j["inner"+g].call(this);return this.each(function(){a(this).css(f,i(this,l)+"px")})};a.fn["outer"+g]=function(l,o){if(typeof l!=="number")return j["outer"+g].call(this,l);return this.each(function(){a(this).css(f,i(this,l,true,o)+"px")})}});a.extend(a.expr[":"],{data:function(h,g,i){return!!a.data(h,i[3])},focusable:function(h){return d(h,!isNaN(a.attr(h,"tabindex")))},tabbable:function(h){var g=a.attr(h, -"tabindex"),i=isNaN(g);return(i||g>=0)&&d(h,!i)}});a(function(){var h=document.body,g=h.appendChild(g=document.createElement("div"));a.extend(g.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=g.offsetHeight===100;a.support.selectstart="onselectstart"in g;h.removeChild(g).style.display="none"});a.extend(a.ui,{plugin:{add:function(h,g,i){h=a.ui[h].prototype;for(var b in i){h.plugins[b]=h.plugins[b]||[];h.plugins[b].push([g,i[b]])}},call:function(h,g,i){if((g=h.plugins[g])&& -h.element[0].parentNode)for(var b=0;b| '+this._get(b,"weekHeader")+" | ":"";for(B=0;B<7;B++){var A=(B+n)%7;G+="=5?' class="ui-datepicker-week-end"':"")+'>'+y[A]+" | "}F+=G+"'+this._get(b,"calculateWeek")(A)+" | ";for(B=0;B<7;B++){var M=z?z.apply(b.input?b.input[0]:null,[A]):[true,""],K=A.getMonth()!=m,O=K&&!N||!M[0]||r&&A"+(K&&!I?" ":O?''+ -A.getDate()+"":''+A.getDate()+"")+" | ";A.setDate(A.getDate()+1);A=this._daylightSavingAdjust(A)}F+=S+""}m++;if(m>11){m=0;v++}F+="
|---|
| '+this._get(a,"weekHeader")+" | ":"";for(t=0;t<7;t++){var r=(t+h)%7;z+="=5?' class="ui-datepicker-week-end"':"")+'>'+q[r]+" | "}y+=z+"'+this._get(a,"calculateWeek")(r)+" | ";for(t=0;t<7;t++){var I=p?p.apply(a.input?a.input[0]:null,[r]):[true,""],F=r.getMonth()!=g,L=F&&!K||!I[0]||k&&r"+(F&&!D?" ":L?''+ +r.getDate()+"":''+r.getDate()+"")+" | ";r.setDate(r.getDate()+1);r=this._daylightSavingAdjust(r)}y+=R+""}g++;if(g>11){g=0;m++}y+="
|---|
| '+this._get(a,"weekHeader")+" | ":"";for(t=0;t<7;t++){var q= -(t+h)%7;B+="=5?' class="ui-datepicker-week-end"':"")+'>'+s[q]+" | "}x+=B+"'+this._get(a,"calculateWeek")(q)+" | ";for(t=0;t<7;t++){var G= -p?p.apply(a.input?a.input[0]:null,[q]):[true,""],C=q.getMonth()!=g,J=C&&!H||!G[0]||k&&q"+(C&&!v?" ":J?''+q.getDate()+"":''+q.getDate()+"")+" | ";q.setDate(q.getDate()+1);q=this._daylightSavingAdjust(q)}x+= -P+""}g++;if(g>11){g=0;m++}x+="
|---|
| '+this._get(a,"weekHeader")+" | ":"";for(t=0;t<7;t++){var r=(t+h)%7;z+="=5?' class="ui-datepicker-week-end"':"")+'>'+q[r]+" | "}y+=z+"'+this._get(a,"calculateWeek")(r)+" | ";for(t=0;t<7;t++){var I=p?p.apply(a.input?a.input[0]:null,[r]):[true,""],F=r.getMonth()!=g,L=F&&!K||!I[0]||k&&r"+(F&&!D?" ":L?''+ +r.getDate()+"":''+r.getDate()+"")+" | ";r.setDate(r.getDate()+1);r=this._daylightSavingAdjust(r)}y+=R+""}g++;if(g>11){g=0;m++}y+="
|---|
- sftp == 'Y')-->checked="checked" /> + sftp == 'Y')-->checked="checked" disabled/> sftp != 'Y')-->checked="checked" />
{$XE_VALIDATOR_ERROR}
- + + +
All({$tCount})
diff --git a/modules/comment/comment.class.php b/modules/comment/comment.class.php
index 7300a3645..e51ab28ed 100644
--- a/modules/comment/comment.class.php
+++ b/modules/comment/comment.class.php
@@ -13,19 +13,8 @@
* @brief implemented if additional tasks are required when installing
**/
function moduleInstall() {
- $oDB = &DB::getInstance();
-
// register the action forward (for using on the admin mode)
$oModuleController = &getController('module');
-
- $oDB->addIndex
- (
- "comments",
- "idx_module_list_order",
- array("module_srl", "list_order"),
- true
- );
-
// 2007. 10. 17 add a trigger to delete comments together with posting deleted
$oModuleController->insertTrigger('document.deleteDocument', 'comment', 'controller', 'triggerDeleteDocumentComments', 'after');
// 2007. 10. 17 add a trigger to delete all of comments together with module deleted
@@ -55,9 +44,6 @@
if(!$oDB->isColumnExists("comments", "blamed_count")) return true;
if(!$oDB->isColumnExists("comment_voted_log", "point")) return true;
- if (!$oDB->isIndexExists("comments", "idx_module_list_order"))
- return true;
-
return false;
}
@@ -94,15 +80,6 @@
if(!$oDB->isColumnExists("comment_voted_log", "point"))
$oDB->addColumn('comment_voted_log', 'point', 'number', 11, 0, true);
- if (!$oDB->isIndexExists("comments", "idx_module_list_order"))
- $oDB->addIndex
- (
- "comments",
- "idx_module_list_order",
- array("module_srl", "list_order"),
- true
- );
-
return new Object(0, 'success_updated');
}
diff --git a/modules/document/document.admin.controller.php b/modules/document/document.admin.controller.php
index a342c27c8..f9d6b1763 100644
--- a/modules/document/document.admin.controller.php
+++ b/modules/document/document.admin.controller.php
@@ -71,26 +71,30 @@
$oFileController = &getController('file');
$files = $oDocument->getUploadedFiles();
- foreach($files as $key => $val) {
- $file_info = array();
- $file_info['tmp_name'] = $val->uploaded_filename;
- $file_info['name'] = $val->source_filename;
- $inserted_file = $oFileController->insertFile($file_info, $module_srl, $obj->document_srl, $val->download_count, true);
- if($inserted_file && $inserted_file->toBool()) {
- // for image/video files
- if($val->direct_download == 'Y') {
- $source_filename = substr($val->uploaded_filename,2);
- $target_filename = substr($inserted_file->get('uploaded_filename'),2);
- $obj->content = str_replace($source_filename, $target_filename, $obj->content);
- // For binary files
- } else {
- $obj->content = str_replace('file_srl='.$val->file_srl, 'file_srl='.$inserted_file->get('file_srl'), $obj->content);
- $obj->content = str_replace('sid='.$val->sid, 'sid='.$inserted_file->get('sid'), $obj->content);
- }
- }
- // Delete an existing file
- $oFileController->deleteFile($val->file_srl);
- }
+ if(is_array($files))
+ {
+ foreach($files as $key => $val)
+ {
+ $file_info = array();
+ $file_info['tmp_name'] = $val->uploaded_filename;
+ $file_info['name'] = $val->source_filename;
+ $inserted_file = $oFileController->insertFile($file_info, $module_srl, $obj->document_srl, $val->download_count, true);
+ if($inserted_file && $inserted_file->toBool()) {
+ // for image/video files
+ if($val->direct_download == 'Y') {
+ $source_filename = substr($val->uploaded_filename,2);
+ $target_filename = substr($inserted_file->get('uploaded_filename'),2);
+ $obj->content = str_replace($source_filename, $target_filename, $obj->content);
+ // For binary files
+ } else {
+ $obj->content = str_replace('file_srl='.$val->file_srl, 'file_srl='.$inserted_file->get('file_srl'), $obj->content);
+ $obj->content = str_replace('sid='.$val->sid, 'sid='.$inserted_file->get('sid'), $obj->content);
+ }
+ }
+ // Delete an existing file
+ $oFileController->deleteFile($val->file_srl);
+ }
+ }
// Set the all files to be valid
$oFileController->setFilesValid($obj->document_srl);
}
diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php
index ccf15730f..6bbbeeeb6 100644
--- a/modules/document/document.controller.php
+++ b/modules/document/document.controller.php
@@ -213,9 +213,16 @@ class documentController extends document {
if(count($extra_keys)) {
foreach($extra_keys as $idx => $extra_item) {
$value = '';
- if(isset($obj->{'extra_vars'.$idx})) $value = trim($obj->{'extra_vars'.$idx});
+ if(isset($obj->{'extra_vars'.$idx})){
+ $tmp = $obj->{'extra_vars'.$idx};
+ if (is_array($tmp))
+ $value = implode('|@|', $tmp);
+ else
+ $value = trim($tmp);
+ }
elseif(isset($obj->{$extra_item->name})) $value = trim($obj->{$extra_item->name});
if(!isset($value)) continue;
+
$this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, $idx, $value, $extra_item->eid);
}
}
@@ -372,7 +379,13 @@ class documentController extends document {
if(count($extra_keys)) {
foreach($extra_keys as $idx => $extra_item) {
$value = '';
- if(isset($obj->{'extra_vars'.$idx})) $value = trim($obj->{'extra_vars'.$idx});
+ if(isset($obj->{'extra_vars'.$idx})){
+ $tmp = $obj->{'extra_vars'.$idx};
+ if (is_array($tmp))
+ $value = implode('|@|', $tmp);
+ else
+ $value = trim($tmp);
+ }
elseif(isset($obj->{$extra_item->name})) $value = trim($obj->{$extra_item->name});
if(!isset($value)) continue;
$this->insertDocumentExtraVar($obj->module_srl, $obj->document_srl, $idx, $value, $extra_item->eid);
@@ -621,6 +634,13 @@ class documentController extends document {
// commit
$oDB->commit();
+ // Clear cache
+ $oCacheHandler = &CacheHandler::getInstance('object');
+ if($oCacheHandler->isSupport())
+ {
+ $oCacheHandler->invalidateGroupKey('documentList');
+ }
+
return $output;
}
diff --git a/modules/document/document.item.php b/modules/document/document.item.php
index 2abef10b5..2ab3a8134 100644
--- a/modules/document/document.item.php
+++ b/modules/document/document.item.php
@@ -98,7 +98,9 @@
return $_SESSION['accessible'][$this->document_srl]==true?true:false;
}
- function allowComment() {
+ function allowComment()
+ {
+ // init write, document is not exists. so allow comment status is true
if(!$this->isExists()) return true;
return $this->get('comment_status') == 'ALLOW' ? true : false;
diff --git a/modules/document/document.model.php b/modules/document/document.model.php
index f638192c7..a4cf03e58 100644
--- a/modules/document/document.model.php
+++ b/modules/document/document.model.php
@@ -157,7 +157,7 @@
// cache controll
$oCacheHandler = &CacheHandler::getInstance('object');
if($oCacheHandler->isSupport()){
- $object_key = 'object:'.$obj->module_srl.'_category_srl:'.$obj->category_srl.'_list_count:'.$obj->list_count.'_search_target:'.$obj->search_target.'_search_keyword:'.$obj->search_keyword.'_page'.$obj->page.'_sort_index:'.$obj->sort_index;
+ $object_key = 'object:'.$obj->module_srl.'_category_srl:'.$obj->category_srl.'_list_count:'.$obj->list_count.'_search_target:'.$obj->search_target.'_search_keyword:'.$obj->search_keyword.'_page'.$obj->page.'_sort_index:'.$obj->sort_index.'_order_type:'.$obj->order_type;
$cache_key = $oCacheHandler->getGroupKey('documentList', $object_key);
$output = $oCacheHandler->get($cache_key);
}
diff --git a/modules/editor/components/image_link/image_link.class.php b/modules/editor/components/image_link/image_link.class.php
index 3fd9e88c2..bd5dec4a6 100644
--- a/modules/editor/components/image_link/image_link.class.php
+++ b/modules/editor/components/image_link/image_link.class.php
@@ -44,6 +44,7 @@
$height = $xml_obj->attrs->height;
$align = $xml_obj->attrs->align;
$alt = $xml_obj->attrs->alt;
+ $title = $xml_obj->attrs->title;
$border = (int)$xml_obj->attrs->border;
$link_url = $xml_obj->attrs->link_url;
$open_window = $xml_obj->attrs->open_window;
@@ -73,7 +74,9 @@
$attr_output = array("src=\"".$src."\"");
if($alt) {
$attr_output[] = "alt=\"".$alt."\"";
- $attr_output[] = "title=\"".$alt."\"";
+ }
+ if($title) {
+ $attr_output[] = "title=\"".$title."\"";
}
if($margin) {
$style = trim(preg_replace('/margin[a-z\-]*[ ]*:[ ]*[0-9 a-z]+(;| )/i','', $style)).';';
diff --git a/modules/editor/components/image_link/tpl/popup.js b/modules/editor/components/image_link/tpl/popup.js
index 8412c8fb7..eb4283e1a 100644
--- a/modules/editor/components/image_link/tpl/popup.js
+++ b/modules/editor/components/image_link/tpl/popup.js
@@ -86,7 +86,6 @@
else if($form.find('#align_middle').attr('checked') == true) align = 'middle';
else if($form.find('#align_right').attr('checked') == true) align = 'right';
-
var width = $form.find('#width').val();
var height = $form.find('#height').val();
@@ -126,13 +125,18 @@
$component.find('img').attr(img_attrs);
$component.find('img').css(img_style);
- text = $component.html();
-
- opener.editorFocus(opener.editorPrevSrl);
-
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
- opener.editorReplaceHTML(iframe_obj, text);
+ try {
+ var prevNode = opener.editorPrevNode;
+ prevNode.parentNode.insertBefore($component.find('img').get(0), prevNode);
+ prevNode.parentNode.removeChild(prevNode);
+ }catch(e){
+ try {
+ text = $component.html();
+ opener.editorReplaceHTML(iframe_obj, text);
+ } catch(ee) { }
+ };
opener.editorFocus(opener.editorPrevSrl);
window.close();
@@ -183,4 +187,4 @@
});
-}) (jQuery);
\ No newline at end of file
+}) (jQuery);
diff --git a/modules/editor/components/multimedia_link/tpl/popup.js b/modules/editor/components/multimedia_link/tpl/popup.js
index 789809dff..b217ba909 100644
--- a/modules/editor/components/multimedia_link/tpl/popup.js
+++ b/modules/editor/components/multimedia_link/tpl/popup.js
@@ -22,6 +22,9 @@ jQuery(function($){
get_by_id('multimedia_'+key).value = val;
});
+ // auto start?
+ get_by_id('multimedia_auto_start').checked = ($node.attr('auto_start') == 'true');
+
})();
$('.btnArea button').click(function(){
@@ -29,7 +32,7 @@ $('.btnArea button').click(function(){
var el_wmode = get_by_id('fo').elements['multimedia_wmode'];
var attrs = {
- alt : get_by_id('multimedia_caption').value,
+ alt : encodeURIComponent(get_by_id('multimedia_caption').value),
width : get_by_id('multimedia_width').value || 400,
height : get_by_id('multimedia_height').value || 400,
wmode : el_wmode.value || el_wmode.options[0].value,
@@ -44,7 +47,7 @@ $('.btnArea button').click(function(){
var html = '
';
- html = html.replace(/(\w+)=""/, function(m0,m1) {
+ html = html.replace(/(\w+)=""/g, function(m0,m1) {
return attrs[m1] ? (m1+'="'+attrs[m1]+'"') : '';
});
diff --git a/modules/editor/components/multimedia_link/tpl/popup.min.js b/modules/editor/components/multimedia_link/tpl/popup.min.js
index 20a71bc7f..c35abf925 100644
--- a/modules/editor/components/multimedia_link/tpl/popup.min.js
+++ b/modules/editor/components/multimedia_link/tpl/popup.min.js
@@ -2,4 +2,4 @@
* popup으로 열렸을 경우 부모창의 위지윅에디터에 select된 멀티미디어 컴포넌트 코드를 체크하여
* 있으면 가져와서 원하는 곳에 삽입
**/
-jQuery(function($){(function(){if(!is_def(opener))return;var $node=$(opener.editorPrevNode).filter('img'),attrs;if(!$node.length)return;attrs={url:$node.attr('multimedia_src'),caption:$node.attr('alt'),width:$node.width()-4,height:$node.height()-4,wmode:$node.attr('wmode')};$.each(attrs,function(key,val){get_by_id('multimedia_'+key).value=val})})();$('.btnArea button').click(function(){if(!is_def(opener))return;var el_wmode=get_by_id('fo').elements['multimedia_wmode'],attrs={alt:get_by_id('multimedia_caption').value,width:get_by_id('multimedia_width').value||400,height:get_by_id('multimedia_height').value||400,wmode:el_wmode.value||el_wmode.options[0].value,auto_start:get_by_id('multimedia_auto_start').checked?'true':'false',multimedia_src:get_by_id('multimedia_url').value.replace(request_uri,'')};if(!attrs.multimedia_src){window.close();return};var html='
';html=html.replace(/(\w+)=""/,function(m0,m1){return attrs[m1]?(m1+'="'+attrs[m1]+'"'):''});opener.editorFocus(opener.editorPrevSrl);var iframe_obj=opener.editorGetIFrame(opener.editorPrevSrl);opener.editorReplaceHTML(iframe_obj,html);opener.editorFocus(opener.editorPrevSrl);window.close()})})
\ No newline at end of file
+jQuery(function($){(function(){if(!is_def(opener))return;var $node=$(opener.editorPrevNode).filter('img'),attrs;if(!$node.length)return;attrs={url:$node.attr('multimedia_src'),caption:$node.attr('alt'),width:$node.width()-4,height:$node.height()-4,wmode:$node.attr('wmode')};$.each(attrs,function(key,val){get_by_id('multimedia_'+key).value=val});get_by_id('multimedia_auto_start').checked=($node.attr('auto_start')=='true')})();$('.btnArea button').click(function(){if(!is_def(opener))return;var el_wmode=get_by_id('fo').elements['multimedia_wmode'],attrs={alt:encodeURIComponent(get_by_id('multimedia_caption').value),width:get_by_id('multimedia_width').value||400,height:get_by_id('multimedia_height').value||400,wmode:el_wmode.value||el_wmode.options[0].value,auto_start:get_by_id('multimedia_auto_start').checked?'true':'false',multimedia_src:get_by_id('multimedia_url').value.replace(request_uri,'')};if(!attrs.multimedia_src){window.close();return};var html='
';html=html.replace(/(\w+)=""/g,function(m0,m1){return attrs[m1]?(m1+'="'+attrs[m1]+'"'):''});opener.editorFocus(opener.editorPrevSrl);var iframe_obj=opener.editorGetIFrame(opener.editorPrevSrl);opener.editorReplaceHTML(iframe_obj,html);opener.editorFocus(opener.editorPrevSrl);window.close()})})
\ No newline at end of file
diff --git a/modules/editor/skins/dreditor/editor.html b/modules/editor/skins/dreditor/editor.html
index bd7860fe1..5a5d7c83d 100644
--- a/modules/editor/skins/dreditor/editor.html
+++ b/modules/editor/skins/dreditor/editor.html
@@ -20,7 +20,7 @@
{@$cookie_tool=explode(',', $_COOKIE['DrEditorToolbar'])}
-{@$default_tool=explode(',', 'hx,txt,material,link,list,quote,img,movie,file,hr,index')}
+{@$default_tool=explode(',', 'hx,txt,'.($material_exists?'material,':'').'link,list,quote,img,movie,file,hr,index');}
{@$external_components=array_keys($drComponentList)}
{@$enable_tool=array_unique(array_merge($cookie_tool, $default_tool, (array)$external_components))}
@@ -479,7 +479,7 @@
=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),e=c.iOffsetForIE;d.moveToElementText(c.oSelectableNodeForIE);d.collapse(c.bCollapseToStart);d.moveStart("character",e);return d};this._getSelectableNodeAndOffsetForIE=function(a,b){var d=this._document.body.createTextRange(), -c=null,e=null,g=0;3==a.nodeType?(c=xe.DOMFix.parentNode(a),e=xe.DOMFix.childNodes(c),g=e.length):(c=a,e=xe.DOMFix.childNodes(c),g=b);for(var h=null,l=0,j=!0,k=0;ke.nodeValue.length&&e.nextSibling;)c-=e.nodeValue.length,e=e.nextSibling;if(b&&e.nextSibling&&3==e.nextSibling.nodeType&&c==e.nodeValue.length)c-=e.nodeValue.length,e=e.nextSibling;d=e}else d=a.parentElement(),c=h;return{oContainer:d,iOffset:c}}};xe.DOMFix=new (c.Class({$init:function(){c.browser.msie|| +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 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.iMaxY)d=this.oOptions.iMaxY;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,e){this.oApp.registerBrowserEvent(a,b,d,c,e)},$ON_DISABLE_COMMAND:function(a){this.oApp.disableCommand(a, +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,f,e,g,a=(a||"").toLowerCase().split("+");b=d=f=e=g=!1;c.each(a,function(){var a=""+this;switch(a){case "shift":b=!0;case "alt":f=!0;case "ctrl":d=!0;case "meta":e=!0;default:g=a}});if(!g)return"";a=[];b&&a.push("shift");f&&a.push("alt");d&&a.push("ctrl");(e||d&&!b&&!f)&&a.push("meta");a.push(this.keyhash[g]||g.toUpperCase().charCodeAt(0)); +(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,e){a==this.oCurrentLayer?this.oApp.exec("HIDE_ACTIVE_LAYER",[]):(this.oApp.exec("SHOW_ACTIVE_LAYER",[a,c,e]),b&&this.oApp.exec(b,d))},$ON_SHOW_ACTIVE_LAYER:function(a,b,d){a=c.$(a);this.sOnCloseCmd=b;this.aOnCloseParam=d;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; +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 *:first-child",a[f]).get(0))}},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.toolbarArea,"mouseover","EVENT_TOOLBAR_MOUSEOVER",[]);this.oApp.registerBrowserEvent(this.toolbarArea,"mouseout","EVENT_TOOLBAR_MOUSEOUT",[]);this.oApp.exec("ADD_APP_PROPERTY", -["getToolbarButtonByUIName",c.fnBind(this.getToolbarButtonByUIName,this)])},$ON_EVENT_TOOLBAR_MOUSEOVER:function(a){"BUTTON"==a.target.tagName&&c(a.target).addClass("hover").parent("span").addClass("hover")},$ON_EVENT_TOOLBAR_MOUSEOUT:function(a){"BUTTON"==a.target.tagName&&c(a.target).removeClass("hover").parent("span").removeClass("hover")},$ON_TOGGLE_TOOLBAR_ACTIVE_LAYER:function(a,b,d,c,e,g){this.oApp.exec("TOGGLE_ACTIVE_LAYER",[a,"MSG_TOOLBAR_LAYER_SHOWN",[a,b,d,c],e,g])},$ON_MSG_TOOLBAR_LAYER_SHOWN:function(a, +this.toolbarArea).get();for(var a=this.toolbarArea.getElementsByTagName("LI"),b=a.length,d=RegExp(this.sUIClassPrefix+"([^ ]+)"),e=0;e*: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 f)a.style.left=f-d-5+"px"}},getToolbarButtonByUIName:function(a){return this.htUIList[a]}});xe.XE_EditingAreaManager=c.Class({name:"XE_EditingAreaManager",oActivePlugin:null,oIRField:null,bIsDirty:!1,$init:function(a,b,d,f,e){this.sInitialMode=a;this.oIRField=c.$(b);this._assignHTMLObjects(e);this.fOnBeforeUnload=f;this.oEditingMode={};this.elEditingAreaContainer.style.height= +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", @@ -84,53 +84,53 @@ $ON_REGISTER_EDITING_AREA:function(a){this.oEditingMode[a.sMode]=a;this.attachDo 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 m(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 m=function(a){this._o=a};m.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};m.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()}};m.prototype.copy=function(){var a=this.getSelection();return this._o.value.substring(a[0],a[1])};m.prototype.paste=function(a){var b=this._o,d=this.getSelection(), -c=b.value,e=c.substr(0,d[0]),c=c.substr(d[1]);b.value=e+a+c;b=0;"undefined"==typeof document.body.style.maxHeight&&(e=e.match(/\n/gi),b=null!=e?e.length:0);this.setSelection(d[0]+a.length-b)};m.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).bind("keydown",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).bind("mousedown",c.fnBind(function(){this._oIERange=null;this._bIERangeReset=!0},this)),c(this.doc.body).bind("beforedeactivate",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)),c(this.doc.body).bind("mouseup",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," "]);break;default:return}a.preventDefault();a.stopPropagation()}},$ON_EVENT_EDITING_AREA_KEYUP:function(a){229==a.keyCode||13==a.keyCode||a.altKey||a.ctrlKey||33<=a.keyCode&&40>=a.keyCode||16==a.keyCode||this._recordUndo(a)},$ON_PASTE_HTML:function(a,b){if(this.oApp.getEditingMode()==this.sMode){var d= -b||this.oApp.getSelection();d.pasteHTML(a);if(!c.browser.msie){var f=d.placeStringBookmark();this.oApp.getWYSIWYGDocument().body.innerHTML=this.oApp.getWYSIWYGDocument().body.innerHTML;d.moveToBookmark(f);d.collapseToEnd();d.select();d.removeStringBookmark(f)}this.oApp.exec("RECORD_UNDO_ACTION",["INSERT HTML"])}},$AFTER_MSG_EDITING_AREA_RESIZE_ENDED:function(){this.oApp.exec("REFRESH_WYSIWYG",[])},$ON_RESTORE_IE_SELECTION:function(){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 "},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,c){this.oEditingArea.execCommand(a,""==b||b?b:!1,""==c||c?c:!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(),c=b.placeStringBookmark(),f=b.getLineInfo(),e=f.oStart,f=f.oEnd;if(!e.bParentBreak||b.rxBlockContainer.test(e.oLineBreaker.tagName)){a.stopPropagation();a.preventDefault();a=this.oEditingArea.createElement("P");b.moveToBookmark(c);b.setStartBefore(e.oNode);b.surroundContents(a); -b.collapseToEnd();e=this.oEditingArea.createElement("P");b.setEndAfter(f.oNode);b.surroundContents(e);b.removeStringBookmark(c);if(""==a.innerHTML)a.innerHTML="
";if(""==e.innerHTML)e.innerHTML="
";e.nextSibling&&"BR"==e.nextSibling.tagName&&e.parentNode.removeChild(e.nextSibling);b.selectNodeContents(e);b.collapseToStart();b.select();this.oApp.exec("CHECK_STYLE_CHANGE",[])}else b.removeStringBookmark(c)}}});xe.XE_WYSIWYGStyler=c.Class({name:"XE_WYSIWYGStyler",$PRECONDITION:function(){return"WYSIWYG"== -this.oApp.getEditingMode()},$ON_SET_WYSIWYG_STYLE:function(a){var b=this.oApp.getSelection();if(b.collapsed){var d=this.oApp.getWYSIWYGDocument().createElement("SPAN");b.insertNode(d);d.innerHTML=unescape("%uFEFF");var f,e;for(e in a)f=a[e],"string"==typeof f&&(d.style[e]=f);b.selectNodeContents(d);b.collapseToEnd();b._window.focus();b._window.document.body.focus();b.select();if(c.browser.mozilla&&3==c.browser.nVersion)d.innerHTML=""}else this.oApp.exec("RECORD_UNDO_BEFORE_ACTION",["FONT STYLE"]), +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,""]);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 "},getWindow:function(){return this.iframe.contentWindow},getDocument:function(){return this.iframe.contentWindow.document},focus:function(){},_recordUndo:function(a){if(!(new Date- +this.iLastUndoRecorded ";if(""==f.innerHTML)f.innerHTML="
";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}),c,a=0==b.length?this._getStyleOf(a.commonAncestorContainer):this._getStyleOf(b[0]);for(c in a)this.oStyleMap[c].converter&&(a[c]=this.oStyleMap[c].converter(a[c],a)),this.oStyle[c]!=a[c]&&this.oApp.exec("MSG_STYLE_CHANGED",[c,a[c]]);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,f;for(f in this.oStyle)if(d=this.oStyleMap[f],d.type&&"Value"==d.type)if(d.css)d=a.css(d.css),"fontFamily"==f&& -(d=d.split(/,/)[0]),b[f]=d;else{if(d.command)try{b[f]=this.oDocument.queryCommandState(d.command)}catch(e){}}else if(d.command)try{b[f]=this.oDocument.queryCommandState(d.command)?1:0}catch(g){}return b}});xe.XE_FontSizeWithSelectUI=c.Class({name:"XE_FontSizeWithSelectUI",$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elFontSizeSelect=c("SELECT.xpress_xeditor_ui_fontSize_select",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elFontSizeSelect, +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,f;if(0==a.length)return-1;var e=a.length;0==e?f=-1:(d=this._getLineWrapper(a[0]),f=this._getWrapperLineheight(d));var g=this.oSelection.getStartNode();if(0this.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= 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),c=b(RegExp.$2),b=b(RegExp.$3),a="#"+a+c+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= +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"))}}); 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 c={backgroundColor:a};if(b)c.color=b;this.oApp.exec("SET_WYSIWYG_STYLE",[c]);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("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"))}}); 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 c=this.oApp.getSelection(),f=c.getLineInfo(), -e=f.oStart,f=f.oEnd,g=/BODY|TD|LI/i,e=e.bParentBreak&&!g.test(e.oLineBreaker.tagName)?e.oNode.parentNode:e.oNode,f=f.bParentBreak&&!g.test(f.oLineBreaker.tagName)?f.oNode.parentNode:f.oNode;c.setStartBefore(e);c.setEndAfter(f);if(g=this._expandToTableStart(c,f))f=g,c.setEndAfter(g);if(g=this._expandToTableStart(c,e))e=g,c.setStartBefore(g);g=e;for(e=c.commonAncestorContainer;g&&g!=e&&g.parentNode!=e;)g=g.parentNode;oFormattingNode=c._document.createElement(a);if(b)oFormattingNode.className=b;g==e? -e.insertBefore(oFormattingNode,e.firstChild):e.insertBefore(oFormattingNode,g);c.setStartAfter(oFormattingNode);c.setEndAfter(f);c.surroundContents(oFormattingNode);e=oFormattingNode.childNodes;for(g=e.length-1;0<=g;g--)if(3==e[g].nodeType||"BR"==e[g].tagName){for(var h=c._document.createElement("P"),f=e[g].nextSibling;0<=g&&e[g]&&(3==e[g].nodeType||"BR"==e[g].tagName);)h.insertBefore(e[g--],h.firstChild);oFormattingNode.insertBefore(h,f);g++}if(oFormattingNode&&oFormattingNode.parentNode)h=c._document.createElement("P"), -h.innerHTML=unescape("
"),oFormattingNode.parentNode.insertBefore(h,oFormattingNode.nextSibling);this.oApp.exec("RECORD_UNDO_ACTION",["Block Quote"]);return oFormattingNode},_expandToTableStart:function(a,b){for(var c=a.commonAncestorContainer,f=null,e=!1;b&&!e;){b==c&&(e=!0);if(/TBODY|TFOOT|THEAD|TR/i.test(b.tagName)){f=this._getTableRoot(b);break}b=b.parentNode}return f},_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("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("
"),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", $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, @@ -138,22 +138,22 @@ function(a){return"%u"+a}).split(" ");this.charSet[3]=unescape("3131 3132 3133 3 function(a){return"%u"+a}).split(" ");this.charSet[4]=unescape("0391 0392 0393 0394 0395 0396 0397 0398 0399 039A 039B 039C 039D 039E 039F 03A0 03A1 03A3 03A4 03A5 03A6 03A7 03A8 03A9 03B1 03B2 03B3 03B4 03B5 03B6 03B7 03B8 03B9 03BA 03BB 03BC 03BD 03BE 03BF 03C0 03C1 03C3 03C4 03C5 03C6 03C7 03C8 03C9 %C6 %D0 0126 0132 013F 0141 %D8 0152 %DE 0166 014A %E6 0111 %F0 0127 I 0133 0138 0140 0142 0142 0153 %DF %FE 0167 014B 0149 0411 0413 0414 0401 0416 0417 0418 0419 041B 041F 0426 0427 0428 0429 042A 042B 042C 042D 042E 042F 0431 0432 0433 0434 0451 0436 0437 0438 0439 043B 043F 0444 0446 0447 0448 0449 044A 044B 044C 044D 044E 044F").replace(/(\S{4})/g, 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);this.oApp.exec("SET_SCHARACTER_LIST",[this.charSet]);for(a=0;a'+ -unescape(this.charSet[a][f])+"",this.aSCharList[a].appendChild(c[f])}},_stopBrowserEvent:function(a,b){c(a).bind(b,function(a){a.stopPropagation();a.preventDefault()})}});xe.XE_UndoRedo=c.Class({name:"XE_UndoRedo",actionHistory:null,oCurStateIdx:null,iMinimumSizeChange:10,sBlankContentsForFF:"
",$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}, +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'+ +unescape(this.charSet[a][e])+"",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:"
",$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.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+"");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(f){}a=this.oApp.getWYSIWYGDocument();c(a.body.getElementsByTagName("A")).filter('[href^="'+ +$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+"");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", @@ -166,44 +166,42 @@ this.iMinBorderWidth;if(a>this.iMaxBorderWidth)a=this.iMaxBorderWidth;this.oBord this.welDropdownLayer.removeClass("p2");this.oApp.exec("SHOW_COLOR_PALETTE",["ST_SET_BORDER_COLOR_FROM_PALETTE",this.elDropdownLayer])},$ON_ST_HIDE_BORDER_COLOR_LAYER:function(){this.welDropdownLayer.removeClass("p1");this.oApp.exec("HIDE_COLOR_PALETTE",[])},$ON_ST_TOGGLE_BGCOLOR_LAYER:function(){this.welDropdownLayer.hasClass("p2")?this.oApp.exec("ST_HIDE_BGCOLOR_LAYER",[]):this.oApp.exec("ST_SHOW_BGCOLOR_LAYER",[])},$ON_ST_SHOW_BGCOLOR_LAYER:function(){this.welDropdownLayer.removeClass("p1");this.welDropdownLayer.addClass("p2"); this.oApp.exec("SHOW_COLOR_PALETTE",["ST_SET_BGCOLOR_FROM_PALETTE",this.elDropdownLayer])},$ON_ST_HIDE_BGCOLOR_LAYER:function(){this.welDropdownLayer.removeClass("p2");this.oApp.exec("HIDE_COLOR_PALETTE",[])},$ON_ST_SET_BORDER_COLOR_FROM_PALETTE:function(a){this.oApp.exec("ST_SET_BORDER_COLOR",[a]);this.oApp.exec("ST_HIDE_BORDER_COLOR_LAYER",[])},$ON_ST_SET_BORDER_COLOR:function(a){this.oBorderColorInput.value=a;this.oButton_BorderColorPreview.style.backgroundColor=a;this._showNewTable()},$ON_ST_SET_BGCOLOR_FROM_PALETTE:function(a){this.oApp.exec("ST_SET_BGCOLOR", [a]);this.oApp.exec("ST_HIDE_BGCOLOR_LAYER",[])},$ON_ST_SET_BGCOLOR:function(a){this.oBGColorInput.value=a;this.oButton_BGColorPreview.style.backgroundColor=a;this._showNewTable()},_showNewTable:function(){var a=document.createElement("DIV");a.innerHTML=this._getTableString();a=a.firstChild;this.oSampleTable.parentNode.insertBefore(a,this.oSampleTable);this.oSampleTable.parentNode.removeChild(this.oSampleTable);this.oSampleTable=a},_getTableString:function(){for(var a=this.oBorderColorInput.value, -b=this.oBGColorInput.value,d=this.oBorderWidthInput.value,f="",f=c.browser.msie?" ":c.browser.firefox?" ":"
",b='
',e=this.oColumnInput.value,g=0;g \n";f=this.oRowInput.value;a=' ';for(g=0;g
"}});xe.XE_EditingModeToggler=c.Class({name:"XE_EditingModeToggler",$init:function(a){this._assignHTMLObjects(a)}, +b=this.oBGColorInput.value,d=this.oBorderWidthInput.value,e="",e=c.browser.msie?"":c.browser.firefox?" ":"
",b='
',f=this.oColumnInput.value,g=0;g \n";e=this.oRowInput.value;a=' ';for(g=0;g
"}});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 o="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,o)){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"<"+ +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.dblclick(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!= +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 f=0;b.eq(0).nextAll("td,th").andSelf().filter(".xe_selected_cell").each(function(){f+=d._getSpan(this,"col")});this._getRect(b.eq(0));var e=b.eq(0).parent("tr"),g=b.eq(b.length-1).parent("tr"),h=b.parents("table").eq(0).find("tr"),e=h.index(g.get(0))-h.index(e.get(0))+this._getSpan(b.eq(b.length-1),"row");b.eq(0).attr("colSpan",f).attr("rowSpan",e);b.slice(1).remove()}}, -$ON_CELL_SPLIT_BY_ROW:function(){var a=c(".xe_selected_cell",this.oApp.getWYSIWYGDocument()).filter("td,th"),b=a.parents("table").eq(0),d=this;if(a.length){this.oApp.exec("RECORD_UNDO_ACTION",["Cell:Split By Row"]);var f=this._getRect(a.eq(0)).top,e=this._getRect(a.eq(a.length-1)).bottom;(a=b.find("td,th").filter(function(){var a=d._getRect(c(this));return!(a.bottom<=f||a.top>=e)})).filter(".xe_selected_cell").each(function(){var b=c(this),e=b.parent("tr"),f=d._getSpan(b,"row"),j=d._getRect(b),k= -[],n=b.clone().html("
"),m=1,o=1;1=j.bottom?!1:!0}).each(function(){var a=c(this),b=d._getSpan(a,"row")+1;k.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(m-1).children("td,th").filter(function(){return d._getRect(c(this)).left> -j.left}),c.browser.msie?e.length?e.eq(0).before(n.get(0).outerHTML):f.eq(m-1).append(n.get(0).outerHTML):e.length?e.slice(0,1).before(n):f.slice(m-1,1).append(n)):e.after(e.clone().empty().append(n));c.each(k,function(){this()})})}},$ON_CELL_SPLIT_BY_COL:function(){var a=c(".xe_selected_cell",this.oApp.getWYSIWYGDocument()).filter("td,th"),b=a.parents("table").slice(0,1),d=this;(new Date).getTime();if(a.length){this.oApp.exec("RECORD_UNDO_ACTION",["Cell:Split By Column"]);var f=a.eq(0).parent("tr"), -e=this._getRect(f.find(".xe_selected_cell:first")).left,g=this._getRect(f.find(".xe_selected_cell:last")).right;(a=b.find("td,th").filter(function(){var a=d._getRect(c(this));return!(a.right<=e||a.left>=g)})).filter(".xe_selected_cell").each(function(){var b=c(this),e=d._getSpan(b,"col"),f=b.clone().html("
");if(1=k.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,f=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 f._removeAllListener()||!0;f._getRect(f._startSel=b);f._doc.bind("mousemove",f.$FnMouseMove);f._doc.bind("mouseup",f.$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 f=Math.min(this._startSel.rect.top,this._endSel.rect.top),e=Math.min(this._startSel.rect.left,this._endSel.rect.left),g=Math.max(this._startSel.rect.bottom,this._endSel.rect.bottom),h=Math.max(this._startSel.rect.right,this._endSel.rect.right), -a=b.parents("table").find("td,th").removeClass("xe_selected_cell"),b=c();do b.each(function(){var a=d._getRect(c(this));if(a.right>h)h=a.right;if(a.left g)g=a.bottom}),a=a.filter(":not(.xe_selected_cell)"),b=a.filter(function(){var a=d._getRect(c(this));return a.right<=e||a.left>=h||a.bottom<=f||a.top>=g?!1:!0}).addClass("xe_selected_cell");while(b.length);c.browser.mozilla||setTimeout(function(){var a=d.oApp.getSelection();d._startSel&&(d._startSel.get(0).firstChild|| +d=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("
"),l=1,o=1;1=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("
");if(1=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 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,k,m,o,a,b,d,f){function e(){try{var a=p.contentWindow.document;if("about:blank"==a.location)throw"blank";j.registerPlugin(new xe.XE_EditingArea_WYSIWYG(p));j.registerPlugin(new xe.XpressRangeManager(p));j.registerPlugin(new xe.XE_ExecCommand(p));if(d&&!a.body.style.fontFamily)a.body.style.fontFamily=d;if(f&&!a.body.style.fontSize)a.body.style.fontSize=f;j.run()}catch(b){setTimeout(e,0)}}"undefined"==typeof a&&(a="white");"undefined"==typeof b&&(b="xeStyle");"undefined"== -typeof d&&(d="");"undefined"==typeof f&&(f="");var g=request_uri+"modules/editor/styles/"+b+"/editor.html",b=jQuery("#xpress-editor-"+c),g=jQuery('