From f874e669e02677c74b6befcf9aa7c53f578ed84a Mon Sep 17 00:00:00 2001 From: flyskyko Date: Thu, 24 Nov 2011 02:30:59 +0000 Subject: [PATCH 01/25] issue 1073 when addon mobile option on, error message showed. fix this bug git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9870 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/addon/addon.admin.controller.php | 23 ++++++++++++----------- modules/addon/tpl/addon_list.html | 4 ++-- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/modules/addon/addon.admin.controller.php b/modules/addon/addon.admin.controller.php index 3a3209e7f..2ac45a4dd 100644 --- a/modules/addon/addon.admin.controller.php +++ b/modules/addon/addon.admin.controller.php @@ -20,8 +20,8 @@ **/ function procAddonAdminSaveActivate() { - $pc = Context::get('pc'); - $mobile = Context::get('mobile'); + $pcOnList = Context::get('pc_on'); + $mobileOnList = Context::get('mobile_on'); $fixed = Context::get('fixed'); $site_module_info = Context::get('site_module_info'); @@ -29,13 +29,13 @@ if($site_module_info->site_srl) $site_srl = $site_module_info->site_srl; else $site_srl = 0; - if (!$pc) $pc = array(); - if (!$mobile) $mobile = array(); + if (!$pcOnList) $pcOnList = array(); + if (!$mobileOnList) $mobileOnList = array(); if (!$fixed) $fixed = array(); - if (!is_array($pc)) $pc = array($pc); - if (!is_array($mobile)) $pc = array($mobile); - if (!is_array($fixed)) $pc = array($fixed); + if (!is_array($pcOnList)) $pcOnList = array($pcOnList); + if (!is_array($mobileOnList)) $pcOnList = array($mobileOnList); + if (!is_array($fixed)) $pcOnList = array($fixed); // get current addon info $oModel = &getAdminModel('addon'); @@ -45,13 +45,13 @@ $updateList = array(); foreach($currentAddonList as $addon) { - if ($addon->activated !== in_array($addon->addon_name, $pc)) + if ($addon->activated !== in_array($addon->addon_name, $pcOnList)) { $updateList[] = $addon->addon_name; continue; } - if ($addon->mactivated !== in_array($addon->addon_name, $mobile)) + if ($addon->mactivated !== in_array($addon->addon_name, $mobileOnList)) { $updateList[] = $addon->addon_name; continue; @@ -69,12 +69,12 @@ { unset($args); - if (in_array($targetAddon, $pc)) + if (in_array($targetAddon, $pcOnList)) $args->is_used = 'Y'; else $args->is_used = 'N'; - if (in_array($targetAddon, $mobile)) + if (in_array($targetAddon, $mobileOnList)) $args->is_used_m = 'Y'; else $args->is_used_m = 'N'; @@ -97,6 +97,7 @@ $this->makeCacheFile($site_srl, 'mobile', 'site'); } + $this->setMessage('success_updated', 'info'); if (Context::get('success_return_url')) { $this->setRedirectUrl(Context::get('success_return_url')); diff --git a/modules/addon/tpl/addon_list.html b/modules/addon/tpl/addon_list.html index 79ebb8bc3..faa9ce565 100644 --- a/modules/addon/tpl/addon_list.html +++ b/modules/addon/tpl/addon_list.html @@ -41,8 +41,8 @@ {$addon->path} {$lang->cmd_setup} - - + + {$lang->cmd_delete} From 87e5c89db1a1256ba6d5090420c397dd80f4b7f7 Mon Sep 17 00:00:00 2001 From: ChanMyeong Date: Thu, 24 Nov 2011 02:34:50 +0000 Subject: [PATCH 02/25] Login widget UI fix. When widget code has not colorset, login button is displayed submit(text) type. widgets/login_info/skins/xe_official/login_form.html git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9871 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- widgets/login_info/skins/xe_official/login_form.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widgets/login_info/skins/xe_official/login_form.html b/widgets/login_info/skins/xe_official/login_form.html index de1e866d3..d8f4a4ef8 100644 --- a/widgets/login_info/skins/xe_official/login_form.html +++ b/widgets/login_info/skins/xe_official/login_form.html @@ -27,7 +27,8 @@

- + +

From f748458ecde931be60b6ac8c2626933955f3a8af Mon Sep 17 00:00:00 2001 From: flyskyko Date: Thu, 24 Nov 2011 02:51:33 +0000 Subject: [PATCH 03/25] issue 1064, problem that root of thumbnail image git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9872 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/admin/admin.admin.view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/admin/admin.admin.view.php b/modules/admin/admin.admin.view.php index 634659c4b..a738c66f7 100644 --- a/modules/admin/admin.admin.view.php +++ b/modules/admin/admin.admin.view.php @@ -478,7 +478,7 @@ if (!$layout_info) continue; $layout_parse = explode('.', $layout_info->layout); if (count($layout_parse) == 2){ - $thumb_path = sprintf('./themes/%s/layout/%s/thumbnail.png', $layout_parse[0], $layout_parse[1]); + $thumb_path = sprintf('./themes/%s/layouts/%s/thumbnail.png', $layout_parse[0], $layout_parse[1]); } else{ $thumb_path = './layouts/'.$layout_info->layout.'/thumbnail.png'; From 76eee73aac0b42c165531c135040f6d85a202832 Mon Sep 17 00:00:00 2001 From: ChanMyeong Date: Thu, 24 Nov 2011 10:29:55 +0000 Subject: [PATCH 04/25] #1077 fixed. About colorset display on the admin page. etc. git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9873 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- layouts/user_layout/conf/info.xml | 2 +- modules/admin/lang/lang.xml | 2 ++ modules/layout/tpl/layout_instance_list.html | 2 +- modules/menu/conf/module.xml | 4 ++-- modules/module/tpl/skin_config.html | 9 ++++----- modules/page/m.skins/default/mobile.html | 4 ++-- modules/page/skins/default/content.html | 4 ++-- modules/page/tpl/content.html | 4 ++-- modules/page/tpl/header.html | 4 ++-- modules/page/tpl/mcontent.html | 4 ++-- modules/page/tpl/page_info.html | 2 +- 11 files changed, 21 insertions(+), 20 deletions(-) diff --git a/layouts/user_layout/conf/info.xml b/layouts/user_layout/conf/info.xml index e169ac982..9e7c640c6 100644 --- a/layouts/user_layout/conf/info.xml +++ b/layouts/user_layout/conf/info.xml @@ -14,7 +14,7 @@ 製作者名 -

+ 전역 메뉴 Global Menu グローバルメニュー diff --git a/modules/admin/lang/lang.xml b/modules/admin/lang/lang.xml index ad478950e..e0b3d9b84 100644 --- a/modules/admin/lang/lang.xml +++ b/modules/admin/lang/lang.xml @@ -1029,6 +1029,7 @@ Lütfen son sürümü için indirme linkine tıklayınız.]]> + @@ -1069,6 +1070,7 @@ Lütfen son sürümü için indirme linkine tıklayınız.]]> + diff --git a/modules/layout/tpl/layout_instance_list.html b/modules/layout/tpl/layout_instance_list.html index 5b49f6911..655253aa0 100644 --- a/modules/layout/tpl/layout_instance_list.html +++ b/modules/layout/tpl/layout_instance_list.html @@ -39,5 +39,5 @@ diff --git a/modules/menu/conf/module.xml b/modules/menu/conf/module.xml index 217cb4cf9..c9aea1351 100644 --- a/modules/menu/conf/module.xml +++ b/modules/menu/conf/module.xml @@ -32,12 +32,12 @@ Site Map 사이트맵 + サイトマップ Site Map - Site Map + Site Map Site Map Site Map Site Map - Site Map Site Map Site Map Site Map diff --git a/modules/module/tpl/skin_config.html b/modules/module/tpl/skin_config.html index 052df5823..0949da605 100644 --- a/modules/module/tpl/skin_config.html +++ b/modules/module/tpl/skin_config.html @@ -51,10 +51,9 @@

{$lang->extra_vars}

- - - - + + - + From 235d7816383bbfaec42b2f30d1b57e7f6d4b4d34 Mon Sep 17 00:00:00 2001 From: flyskyko Date: Fri, 25 Nov 2011 02:07:18 +0000 Subject: [PATCH 06/25] xss fix in member module git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9875 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/member/member.controller.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/member/member.controller.php b/modules/member/member.controller.php index d583b228b..8ee4caa71 100644 --- a/modules/member/member.controller.php +++ b/modules/member/member.controller.php @@ -1563,6 +1563,11 @@ if($admin_group->group_srl && in_array($admin_group->group_srl, $group_srl_list)) $_SESSION['is_admin'] = 'Y'; } */ + + // XSS defence + $oSecurity = new Security($this->memberInfo); + $oSecurity->encodeHTML('user_name', 'nick_name', 'address.'); + // Information stored in the session login user Context::set('is_logged', true); Context::set('logged_info', $this->memberInfo); From b09862088a2df55e9a153b4cb0b6e4d2dd71c4c2 Mon Sep 17 00:00:00 2001 From: flyskyko Date: Fri, 25 Nov 2011 02:35:08 +0000 Subject: [PATCH 07/25] xss defence git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9876 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/communication/communication.view.php | 4 ++++ modules/member/member.admin.view.php | 7 ++++--- tests/phpunit.xml | 6 ++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/modules/communication/communication.view.php b/modules/communication/communication.view.php index 802e4eb37..221aa27e4 100644 --- a/modules/communication/communication.view.php +++ b/modules/communication/communication.view.php @@ -55,6 +55,7 @@ // Extract a list $columnList = array('message_srl', 'readed', 'title', 'member.member_srl', 'member.nick_name', 'message.regdate', 'readed_date'); $output = $oCommunicationModel->getMessages($message_type, $columnList); + // set a template file Context::set('total_count', $output->total_count); Context::set('total_page', $output->total_page); @@ -62,6 +63,9 @@ Context::set('message_list', $output->data); Context::set('page_navigation', $output->page_navigation); + $oSecurity = new Security(); + $oSecurity->encodeHTML('message_list..nick_name'); + $this->setTemplateFile('messages'); } diff --git a/modules/member/member.admin.view.php b/modules/member/member.admin.view.php index bafe122a2..9345aaad1 100644 --- a/modules/member/member.admin.view.php +++ b/modules/member/member.admin.view.php @@ -49,7 +49,8 @@ } // retrieve list of groups for each member if($output->data) { - foreach($output->data as $key => $member) { + foreach($output->data as $key => $member) + { $output->data[$key]->group_list = $oMemberModel->getMemberGroups($member->member_srl,0); } } @@ -73,8 +74,8 @@ Context::set('usedIdentifiers', $usedIdentifiers); Context::set('page_navigation', $output->page_navigation); - $security = new Security(); - $security->encodeHTML('member_list..user_name','member_list..group_list..'); + $security = new Security(); + $security->encodeHTML('member_list..user_name', 'member_list..nick_name', 'member_list..group_list..'); $this->setTemplateFile('member_list'); } diff --git a/tests/phpunit.xml b/tests/phpunit.xml index 78ba16f54..036cab0c4 100644 --- a/tests/phpunit.xml +++ b/tests/phpunit.xml @@ -1,4 +1,10 @@ + + + + + + . From 39fd65dc7e696c6cb5376184520dafd47bbd94fa Mon Sep 17 00:00:00 2001 From: flyskyko Date: Fri, 25 Nov 2011 02:42:05 +0000 Subject: [PATCH 08/25] exclude FrontEndFileHandlerTest.php git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9877 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- tests/Bootstrap.php | 1 + tests/classes/context/Context.mock.php | 34 ++++++++++++------- .../frontendfile/FrontEndFileHandlerTest.php | 17 ++++------ tests/phpunit.xml | 1 + 4 files changed, 31 insertions(+), 22 deletions(-) diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php index 4e9aa95d1..12da3030a 100644 --- a/tests/Bootstrap.php +++ b/tests/Bootstrap.php @@ -5,6 +5,7 @@ if(!defined('__XE__')) define('__XE__', true); if(!defined('__ZBXE__')) define('__ZBXE__', true); if(!defined('_XE_PATH_')) define('_XE_PATH_', realpath(dirname(__FILE__).'/../').'/'); +$_SERVER['SCRIPT_NAME'] = '/xe/index.php'; error_reporting(E_ALL & ~E_NOTICE); /** diff --git a/tests/classes/context/Context.mock.php b/tests/classes/context/Context.mock.php index 7b92c994f..f6c3888b8 100644 --- a/tests/classes/context/Context.mock.php +++ b/tests/classes/context/Context.mock.php @@ -8,28 +8,30 @@ if(!defined('MOCK_CONTEXT')) define('MOCK_CONTEXT', 1); class Context { public static $mock_vars = array(); + private static $useCdn = 'N'; + private static $requestUrl = 'http://www.test.com'; public function gets() { $args = func_get_args(); $output = new stdClass; foreach($args as $name) { - $output->{$name} = Context::$mock_vars[$name]; + $output->{$name} = self::$mock_vars[$name]; } return $output; } public function get($name) { - return array_key_exists($name, Context::$mock_vars)?Context::$mock_vars[$name]:''; + return array_key_exists($name, self::$mock_vars)?self::$mock_vars[$name]:''; } public function getRequestVars() { - return Context::$mock_vars; + return self::$mock_vars; } public function set($name, $value) { - Context::$mock_vars[$name] = $value; + self::$mock_vars[$name] = $value; } public function getLangType() { @@ -41,21 +43,29 @@ class Context } public function truncate() { - Context::$mock_vars = array(); + self::$mock_vars = array(); } - public function getDBInfo() { - global $use_cdn; + public static function setUseCdn($useCdn) + { + self::$useCdn = $useCdn != 'Y' ? 'N':'Y'; + } - $dbInfo = new stdClass; - $dbInfo->use_cdn = $use_cdn; + public static function getDBInfo() { + $dbInfo = new stdClass(); + $dbInfo->use_cdn = self::$useCdn; return $dbInfo; } - public function getRequestUrl() { - global $request_url; - return $request_url; + + public static function setRequestUrl($url) + { + self::$requestUrl= $url; + } + + public static function getRequestUrl() { + return self::$requestUrl; } } diff --git a/tests/classes/frontendfile/FrontEndFileHandlerTest.php b/tests/classes/frontendfile/FrontEndFileHandlerTest.php index 67cfde75a..7b5fad97f 100644 --- a/tests/classes/frontendfile/FrontEndFileHandlerTest.php +++ b/tests/classes/frontendfile/FrontEndFileHandlerTest.php @@ -5,16 +5,13 @@ if(!defined('__XE__')) require dirname(__FILE__).'/../../Bootstrap.php'; require_once _XE_PATH_.'classes/handler/Handler.class.php'; require_once _XE_PATH_.'classes/frontendfile/FrontEndFileHandler.class.php'; -$_SERVER['SCRIPT_NAME'] = '/xe/index.php'; class FrontEndFileHandlerTest extends PHPUnit_Framework_TestCase { public function testHandler() { - global $request_url, $use_cdn; - - $request_url = 'http://test.com'; - $use_cdn = 'Y'; + Context::setUseCdn('Y'); + Context::setRequestUrl('http://test.com'); $handler = new FrontEndFileHandler(); @@ -176,7 +173,7 @@ class FrontEndFileHandlerTest extends PHPUnit_Framework_TestCase // CDN(no cdn setting) unset($handler); unset($expected); - $use_cdn = 'N'; + Context::setUseCdn('N'); $handler = new FrontEndFileHandler(); $handler->loadFile(array('./common/css/common.css'), true, 'http://static.xpressengine.com/core/', 'v'); @@ -187,8 +184,8 @@ class FrontEndFileHandlerTest extends PHPUnit_Framework_TestCase // CDN(use ssl) unset($handler); unset($expected); - $use_cdn = 'Y'; - $request_url = 'https://test.com'; + Context::setUseCdn('Y'); + Context::setRequestUrl('https://test.com'); $handler = new FrontEndFileHandler(); $handler->loadFile(array('./common/css/common.css'), true, 'http://static.xpressengine.com/core/', 'v'); @@ -199,8 +196,8 @@ class FrontEndFileHandlerTest extends PHPUnit_Framework_TestCase // external file unset($handler); unset($expected); - $use_cdn = 'Y'; - $request_url = 'http://test.com'; + Context::setUseCdn('Y'); + Context::setRequestUrl('http://test.com'); $handler = new FrontEndFileHandler(); $handler->loadFile(array('http://external.com/css/style2.css')); diff --git a/tests/phpunit.xml b/tests/phpunit.xml index 036cab0c4..3cd98ec13 100644 --- a/tests/phpunit.xml +++ b/tests/phpunit.xml @@ -10,6 +10,7 @@ . ./classes/context/Context.mock.php ./classes/db/ + ./classes/frontendfile/FrontEndFileHandlerTest.php From f572ed8363fb1ca2aa5453a0ac1e604dc9961f9f Mon Sep 17 00:00:00 2001 From: ucorina Date: Fri, 25 Nov 2011 14:44:40 +0000 Subject: [PATCH 09/25] Fix for db mysqli class. git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9878 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/db/DBMysql.class.php | 6 +++++- classes/db/DBMysqli.class.php | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/classes/db/DBMysql.class.php b/classes/db/DBMysql.class.php index d5fe2b462..dafff7aba 100644 --- a/classes/db/DBMysql.class.php +++ b/classes/db/DBMysql.class.php @@ -156,7 +156,7 @@ if(isset($arrayIndexEndValue)) return $output; else return $output[0]; } - mysql_free_result($result); + $this->db_free_result($result); return $output; } @@ -439,6 +439,10 @@ { return mysql_fetch_object($result); } + + function db_free_result(&$result){ + return mysql_free_result($result); + } function getParser(){ return new DBParser('`', '`', $this->prefix); diff --git a/classes/db/DBMysqli.class.php b/classes/db/DBMysqli.class.php index 933fd8c60..fe383b6b4 100644 --- a/classes/db/DBMysqli.class.php +++ b/classes/db/DBMysqli.class.php @@ -112,6 +112,10 @@ { return mysqli_fetch_object($result); } + + function db_free_result(&$result){ + return mysqli_free_result($result); + } } return new DBMysqli; From 7ffb7550903dcd0a8f34484750cafb288868823e Mon Sep 17 00:00:00 2001 From: flyskyko Date: Mon, 28 Nov 2011 08:17:15 +0000 Subject: [PATCH 10/25] issue 486: reset label style git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9879 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/menu/tpl/js/sitemap.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/modules/menu/tpl/js/sitemap.js b/modules/menu/tpl/js/sitemap.js index 96b8c8cd3..47922a606 100644 --- a/modules/menu/tpl/js/sitemap.js +++ b/modules/menu/tpl/js/sitemap.js @@ -85,6 +85,13 @@ $('form.siteMap') htmlBuffer += '/> ' } $('#groupList').html(htmlBuffer); + + // reset label + var checked_labels = []; + editForm.find('label').css('font-weight', ''); + editForm.find('input:checked').each(function(){ + editForm.find('label[for='+this.id+']').css('font-weight', 'bold'); + }); } $('a._delete').click(function() { @@ -116,11 +123,12 @@ $('form.siteMap') editForm.find('input[name=parent_srl]').val(0); editForm.find('input[name=menu_name]').val(''); editForm.find('input[name=cType]').attr('checked', false); - editForm.find('input=[name=create_menu_url]').val(''); - editForm.find('input=[name=select_menu_url]').val(''); - editForm.find('input=[name=menu_url]').val(''); - editForm.find('input=[name=menu_open_window]')[0].checked = true; - editForm.find('input=[name=group_srls\\[\\]]').attr('checked', false); + editForm.find('input[name=create_menu_url]').val(''); + editForm.find('input[name=select_menu_url]').val(''); + editForm.find('input[name=menu_url]').val(''); + editForm.find('input[name=menu_open_window]')[0].checked = true; + editForm.find('input[name=group_srls\\[\\]]').attr('checked', false); + editForm.find('label').css('font-weight', ''); } $('a._add').click(function() From 60f6146e45024d447aa7ae416e6590e64059ef68 Mon Sep 17 00:00:00 2001 From: flyskyko Date: Mon, 28 Nov 2011 09:45:39 +0000 Subject: [PATCH 11/25] issue 126 add type in widgetstyle simple content git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9880 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/widget/widget.controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/widget/widget.controller.php b/modules/widget/widget.controller.php index e2cade4af..39e4c9286 100644 --- a/modules/widget/widget.controller.php +++ b/modules/widget/widget.controller.php @@ -647,7 +647,7 @@ $widgetStyle_info = $oWidgetModel->getWidgetStyleInfo($request_vars->widgetstyle); if(count($widgetStyle_info->extra_var)) { foreach($widgetStyle_info->extra_var as $key=>$val) { - if($val->type =='color' || $val->type =='text' || $val->type =='select' || $val->type =='filebox'){ + if($val->type =='color' || $val->type =='text' || $val->type =='select' || $val->type =='filebox' || $val->type == 'textarea'){ $vars->{$key} = trim($request_vars->{$key}); } } From c2ec25e5b450caab76bd1ba63fe705e6ec4d4251 Mon Sep 17 00:00:00 2001 From: ovclas Date: Tue, 29 Nov 2011 02:29:22 +0000 Subject: [PATCH 12/25] xss defense git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9881 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/admin/admin.admin.view.php | 2 ++ modules/member/member.admin.view.php | 2 +- modules/member/tpl/member_info.html | 12 ++++++------ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/admin/admin.admin.view.php b/modules/admin/admin.admin.view.php index a738c66f7..73a8c480e 100644 --- a/modules/admin/admin.admin.view.php +++ b/modules/admin/admin.admin.view.php @@ -250,6 +250,8 @@ $args->list_count = 5;; $output = $oDocumentModel->getDocumentList($args, false, false, $columnList); Context::set('latestDocumentList', $output->data); + $security = new Security(); + $security->encodeHTML('latestDocumentList..variables.nick_name'); unset($args, $output, $columnList); // Latest Comment diff --git a/modules/member/member.admin.view.php b/modules/member/member.admin.view.php index 9345aaad1..9aee2d108 100644 --- a/modules/member/member.admin.view.php +++ b/modules/member/member.admin.view.php @@ -142,7 +142,7 @@ $security = new Security(); $security->encodeHTML('member_config..'); - $security->encodeHTML('member_info.user_name','member_info.description','member_info.group_list..'); + $security->encodeHTML('memberInfo.user_name', 'memberInfo.nick_name', 'memberInfo.description','memberInfo.group_list..'); $security->encodeHTML('extend_form_list...'); $this->setTemplateFile('member_info'); diff --git a/modules/member/tpl/member_info.html b/modules/member/tpl/member_info.html index 50e6b9c1b..8844a1b76 100644 --- a/modules/member/tpl/member_info.html +++ b/modules/member/tpl/member_info.html @@ -21,19 +21,19 @@ {@$title = $extend_form_list[$formInfo->member_join_form_srl]->column_title} {@$orgValue = $extend_form_list[$formInfo->member_join_form_srl]->value} - {@$value = htmlspecialchars($orgValue[0])} + {@$value = $orgValue[0]} - - {@$value .= htmlspecialchars($orgValue[1])} + {@$value .= $orgValue[1]} - - {@$value .= htmlspecialchars($orgValue[2])} + {@$value .= $orgValue[2]} - {@$value = htmlspecialchars($orgValue[0])}
{@$value .= htmlspecialchars($orgValue[1])} + {@$value = $orgValue[0]}
{@$value .= $orgValue[1]} - {@$value = htmlspecialchars(implode(", ",$orgValue))} + {@$value = implode(", ",$orgValue)} {@$value = zdate($orgValue, "Y-m-d")} - {@$value = nl2br(htmlspecialchars($orgValue))} + {@$value = nl2br($orgValue)} From 77bda9f23e90c4ffd7547022b2134a7df455f8b7 Mon Sep 17 00:00:00 2001 From: ChanMyeong Date: Tue, 29 Nov 2011 03:51:53 +0000 Subject: [PATCH 13/25] #1024 fixed. Admin page. User password input type is 'text'. It sould be 'password' git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9882 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/member/tpl/insert_member.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/member/tpl/insert_member.html b/modules/member/tpl/insert_member.html index 53a161ecc..81d03d177 100644 --- a/modules/member/tpl/insert_member.html +++ b/modules/member/tpl/insert_member.html @@ -36,7 +36,7 @@

{$lang->password} *

- +

  • From bf1520da2bf1029c7f5b2d72bf9228dc97eec265 Mon Sep 17 00:00:00 2001 From: ovclas Date: Tue, 29 Nov 2011 04:18:04 +0000 Subject: [PATCH 14/25] implode array check git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9883 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/page/m.skins/default/mobile.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/page/m.skins/default/mobile.html b/modules/page/m.skins/default/mobile.html index 2ec6369d9..a7ac219fa 100644 --- a/modules/page/m.skins/default/mobile.html +++ b/modules/page/m.skins/default/mobile.html @@ -1,6 +1,6 @@
    제목 : {$oDocument->getTitle()}
    내용 : {$oDocument->getContent()}
    -
    태그 : {implode(',', $oDocument->get('tag_list'))}
    +
    태그 : {implode(',', $oDocument->get('tag_list'))}
    From a0839b5b1fc45f789160cf5739fc69951d927d12 Mon Sep 17 00:00:00 2001 From: ovclas Date: Tue, 29 Nov 2011 05:45:42 +0000 Subject: [PATCH 15/25] xss defense git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9884 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/menu/menu.admin.view.php | 2 +- widgets/content/content.class.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/menu/menu.admin.view.php b/modules/menu/menu.admin.view.php index df7dd8424..0327092a8 100644 --- a/modules/menu/menu.admin.view.php +++ b/modules/menu/menu.admin.view.php @@ -133,7 +133,7 @@ { unset($menu); unset($menuItems); - $value->xml_file = sprintf('./files/cache/menu/%s.xml.php',$value->menu_srl); + //$value->xml_file = sprintf('./files/cache/menu/%s.xml.php',$value->menu_srl); $value->php_file = sprintf('./files/cache/menu/%s.php',$value->menu_srl); if(file_exists($value->php_file)) @include($value->php_file); diff --git a/widgets/content/content.class.php b/widgets/content/content.class.php index a2879e76c..65b7d3bf0 100644 --- a/widgets/content/content.class.php +++ b/widgets/content/content.class.php @@ -251,6 +251,10 @@ $content_items[0]->setFirstThumbnailIdx($first_thumbnail_idx); } + + $oSecurity = new Security($content_items); + $oSecurity->encodeHTML('..variables.title', '..variables.content', '..variables.user_name', '..variables.nick_name'); + return $content_items; } From 3511ca824817af689bc37ad8c83ed3dda8eddf87 Mon Sep 17 00:00:00 2001 From: ChanMyeong Date: Tue, 29 Nov 2011 05:59:53 +0000 Subject: [PATCH 16/25] #990 Fixed. Mobile link font size adjust. git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9885 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/module/ModuleHandler.class.php | 2 +- modules/page/m.skins/default/mobile.html | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/classes/module/ModuleHandler.class.php b/classes/module/ModuleHandler.class.php index 788a3ba30..d31c7eb1d 100644 --- a/classes/module/ModuleHandler.class.php +++ b/classes/module/ModuleHandler.class.php @@ -404,7 +404,7 @@ if($type == "view" && $this->module_info->use_mobile == "Y" && Mobile::isMobileCheckByAgent()) { global $lang; - $footer = ''; + $footer = ''; Context::addHtmlFooter($footer); } diff --git a/modules/page/m.skins/default/mobile.html b/modules/page/m.skins/default/mobile.html index a7ac219fa..097e4d1fd 100644 --- a/modules/page/m.skins/default/mobile.html +++ b/modules/page/m.skins/default/mobile.html @@ -1,6 +1,6 @@ -
    제목 : {$oDocument->getTitle()}
    -
    내용 : {$oDocument->getContent()}
    -
    태그 : {implode(',', $oDocument->get('tag_list'))}
    +
    {$lang->title} : {$oDocument->getTitle()}
    +
    {$lang->content} : {$oDocument->getContent()}
    +
    {$lang->tag} : {implode(',', $oDocument->get('tag_list'))}
    From 967a9b3014d33d23aeb627cd6765f1f7ba4c433a Mon Sep 17 00:00:00 2001 From: ovclas Date: Tue, 29 Nov 2011 06:58:23 +0000 Subject: [PATCH 17/25] issue 987: fixed a bug of list writer git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9886 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/editor/skins/dreditor/js/DrEditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/skins/dreditor/js/DrEditor.js b/modules/editor/skins/dreditor/js/DrEditor.js index 8f4709429..6b0e45f5d 100644 --- a/modules/editor/skins/dreditor/js/DrEditor.js +++ b/modules/editor/skins/dreditor/js/DrEditor.js @@ -1998,7 +1998,7 @@ var ListWriter = xe.createPlugin('ListWriter', { .focus(function(event){ return self.onfocus(seq, event) }); }, new_item : function(returnObj) { - var html = '
  • '; + var html = '
  • '; return returnObj?$(html):html; }, From f26ebab5edbc3771382a03dd07308db308802562 Mon Sep 17 00:00:00 2001 From: ChanMyeong Date: Tue, 29 Nov 2011 07:52:10 +0000 Subject: [PATCH 18/25] #989 Fixed. {$lang->password1} is 'New Password'. {$lang->password2} is 'Retype New Password'. git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9887 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- common/lang/lang.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/lang/lang.xml b/common/lang/lang.xml index 0ee845cbf..50ebf6326 100644 --- a/common/lang/lang.xml +++ b/common/lang/lang.xml @@ -1089,8 +1089,8 @@ - - + + @@ -1103,8 +1103,8 @@ - - + + From 04e69878d00851e580cf74858ddd21c3406a32ad Mon Sep 17 00:00:00 2001 From: ovclas Date: Tue, 29 Nov 2011 08:48:36 +0000 Subject: [PATCH 19/25] xss defense git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9888 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/context/Context.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index fbcdf4f0a..5d4853d80 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -721,6 +721,7 @@ class Context { **/ function _filterRequestVar($key, $val, $do_stripslashes = 1) { if( ($key == 'page' || $key == 'cpage' || substr($key,-3)=='srl')) return !preg_match('/^[0-9,]+$/',$val)?(int)$val:$val; + if($key == 'mid' || $key == 'vid' || $key == 'search_keyword') return htmlspecialchars($val); if(is_array($val) && count($val) ) { foreach($val as $k => $v) { if($do_stripslashes && version_compare(PHP_VERSION, '5.9.0', '<') && get_magic_quotes_gpc()) $v = stripslashes($v); From 9a9324f41f8a50712104a933ee995c1ce82668a8 Mon Sep 17 00:00:00 2001 From: ChanMyeong Date: Tue, 29 Nov 2011 09:22:49 +0000 Subject: [PATCH 20/25] #759 Fixed. IE7 not clickable input. git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9889 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/member/skins/default/css/member.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/member/skins/default/css/member.css b/modules/member/skins/default/css/member.css index 88416f698..eb7c7ff9a 100644 --- a/modules/member/skins/default/css/member.css +++ b/modules/member/skins/default/css/member.css @@ -47,7 +47,7 @@ .xm .form input[type=text], .xm .form input[type=password], .xm .form input[type=file], -.xm .form textarea{position:relative;width:280px;margin:2px 0;border:1px solid #b7b7b7;border-right-color:#e1e1e1;border-bottom-color:#e1e1e1;background:transparent} +.xm .form textarea{position:relative;width:280px;margin:2px 0;border:1px solid #b7b7b7;border-right-color:#e1e1e1;border-bottom-color:#e1e1e1;background:transparent;*background:transparent url(../../../../../common/img/blank.gif);_background:transparent;} .xm .form input[type=text], .xm .form input[type=password], .xm .form input[type=file]{height:22px;line-height:22px;vertical-align:middle;padding:0 4px} From 5a16701a05955cd003ffd1af639287e98009763b Mon Sep 17 00:00:00 2001 From: taggon Date: Wed, 30 Nov 2011 02:28:07 +0000 Subject: [PATCH 21/25] issue 532: Fixed a combobox bug in install pages git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9890 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/install/tpl/config_form.html | 12 +++++++----- modules/install/tpl/css/install.css | 11 ++++++----- modules/install/tpl/introduce.html | 8 +++++--- modules/install/tpl/js/install.js | 18 ++++++++---------- 4 files changed, 26 insertions(+), 23 deletions(-) diff --git a/modules/install/tpl/config_form.html b/modules/install/tpl/config_form.html index ec6615f61..72136b2e3 100644 --- a/modules/install/tpl/config_form.html +++ b/modules/install/tpl/config_form.html @@ -18,11 +18,13 @@
    -
      - -
    • checked="checked" />
    • - -
    +
    +
      + +
    • checked="checked" />
    • + +
    +

    {$lang->about_time_zone}

    diff --git a/modules/install/tpl/css/install.css b/modules/install/tpl/css/install.css index 985ff1eec..8ed52b759 100644 --- a/modules/install/tpl/css/install.css +++ b/modules/install/tpl/css/install.css @@ -75,11 +75,12 @@ html{height:100%;background:url(../img/bgHtml.gif) repeat-x 0 0} .select div.myValue{height:19px;text-indent:8px} .select .ctrl{position:absolute;top:0;right:0;width:18px;height:19px;border:1px solid #999;border-left:1px solid #999;background:#444} .select .arrow{position:absolute;width:0;height:0;top:9px;right:6px;line-height:0;font-size:0;border-top:3px solid #999;border-left:3px solid #444;border-right:3px solid #444} -.select ul{position:absolute;top:20px;left:0;width:100%;list-style:none;border:0;border-top:1px solid #bababa;border-bottom:1px solid #bababa;background:#fff;overflow:auto;height:200px;} -.select ul.aList{display:none} -.select.open ul.aList{display:block} -.select ul.iList{left:-2000%} -.select.open ul.iList{left:0} +.select div.aList, +.select div.iList{display:none;position:absolute;top:20px;left:0;width:100%;border:0;border-top:1px solid #bababa;border-bottom:1px solid #bababa;background:#fff;overflow:auto;height:200px;} +.select.open div.aList{display:block} +.select ul{list-style:none} +.select div.iList{display:none} +.select.open div.iList{display:block} .select li{position:relative;overflow:hidden;white-space:nowrap;height:18px;margin:0 !important;border-left:1px solid #bababa;border-right:1px solid #bababa} .select li input.option{position:absolute;width:100%;height:20px;line-height:20px} .select li label{position:absolute;left:0;top:0;width:100%;text-indent:8px;*text-indent:6px;height:18px;line-height:18px;color:#eee;background:#555;font-weight:normal !important} diff --git a/modules/install/tpl/introduce.html b/modules/install/tpl/introduce.html index 4b3a44bab..89f6e92fd 100644 --- a/modules/install/tpl/introduce.html +++ b/modules/install/tpl/introduce.html @@ -21,9 +21,11 @@
    - +
    + +
    diff --git a/modules/install/tpl/js/install.js b/modules/install/tpl/js/install.js index 1bcd27462..ca38567b5 100644 --- a/modules/install/tpl/js/install.js +++ b/modules/install/tpl/js/install.js @@ -34,9 +34,9 @@ jQuery(function($){ // Common var select_root = $('div.select'); var select_value = $('.myValue'); - var select_a = $('div.select>ul>li>a'); - var select_input = $('div.select>ul>li>input[type=radio]'); - var select_label = $('div.select>ul>li>label'); + var select_a = $('div.select ul>li>a'); + var select_input = $('div.select ul>li>input[type=radio]'); + var select_label = $('div.select ul>li>label'); // Radio Default Value $('div.myValue').each(function(){ @@ -72,20 +72,19 @@ jQuery(function($){ // Set Input function set_label(){ var v = $(this).next('label').text(); - $(this).parents('ul:first').prev('.myValue').text('').append(v); - $(this).parents('ul:first').prev('.myValue').addClass('selected'); + $(this).closest('.select').find('>.myValue').text(v).addClass('selected'); } // Set Anchor function set_anchor(){ var v = $(this).text(); - $(this).parents('ul:first').prev('.myValue').text('').append(v); - $(this).parents('ul:first').prev('.myValue').addClass('selected'); + $(this).closest('.select').find('>.myValue').text(v).addClass('selected'); } // Anchor Focus Out - $('*:not("div.select a")').focus(function(){ - $('.aList').parent('.select').removeClass('open'); + $(window).mousedown(function(evt){ + if($(evt.target).closest('.select').length) return; + $('.aList,.iList').parent('.select').removeClass('open'); }); select_value.click(show_option); @@ -93,5 +92,4 @@ jQuery(function($){ select_a.click(set_anchor).click(hide_option).focus(i_hover).hover(i_hover); select_input.change(set_label).focus(set_label); select_label.hover(i_hover).click(hide_option); - }); From d096ab92e0f690cf20453b7155f57b56446e85c7 Mon Sep 17 00:00:00 2001 From: ovclas Date: Wed, 30 Nov 2011 05:58:45 +0000 Subject: [PATCH 22/25] issue 58 add patch for member extra info (thanks to misol) git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9891 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- addons/member_extra_info/member_extra_info.lib.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/addons/member_extra_info/member_extra_info.lib.php b/addons/member_extra_info/member_extra_info.lib.php index cf6af6c29..8b4e05c3d 100644 --- a/addons/member_extra_info/member_extra_info.lib.php +++ b/addons/member_extra_info/member_extra_info.lib.php @@ -6,13 +6,12 @@ // If member_srl < 0, then return text only in the body $member_srl = $matches[3]; if($member_srl<0) return $matches[5]; + // If member_srl=o(not a member), return the entire body + if(!$member_srl) return $matches[0]; - $site_module_info = Context::get('site_module_info'); $oMemberModel = &getModel('member'); - $group_image = $oMemberModel->getGroupImageMark($member_srl,$site_module_info->site_srl); - // If member_srl=o(not a member), return the entire body $nick_name = $matches[5]; - if(!$member_srl) return $matches[0]; + // If pre-defined data in the global variablesm return it if(!$GLOBALS['_transImageNameList'][$member_srl]->cached) { $GLOBALS['_transImageNameList'][$member_srl]->cached = true; @@ -22,7 +21,12 @@ else $image_name_file = ''; if(file_exists($image_mark_file)) $GLOBALS['_transImageNameList'][$member_srl]->image_mark_file = $image_mark_file; else $image_mark_file = ''; + + $site_module_info = Context::get('site_module_info'); + $group_image = $oMemberModel->getGroupImageMark($member_srl,$site_module_info->site_srl); + $GLOBALS['_transImageNameList'][$member_srl]->group_image = $group_image; } else { + $group_image = $GLOBALS['_transImageNameList'][$member_srl]->group_image; $image_name_file = $GLOBALS['_transImageNameList'][$member_srl]->image_name_file; $image_mark_file = $GLOBALS['_transImageNameList'][$member_srl]->image_mark_file; } From a99f3388180c28829f72745fcf1ff1d42d6f9600 Mon Sep 17 00:00:00 2001 From: ovclas Date: Wed, 30 Nov 2011 06:03:19 +0000 Subject: [PATCH 23/25] remove jQuery in install module git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9892 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/install/tpl/footer.html | 1 - modules/install/tpl/js/jquery-1.5.2.min.js | 16 ---------------- 2 files changed, 17 deletions(-) delete mode 100644 modules/install/tpl/js/jquery-1.5.2.min.js diff --git a/modules/install/tpl/footer.html b/modules/install/tpl/footer.html index 07f966df1..bb5f006dd 100644 --- a/modules/install/tpl/footer.html +++ b/modules/install/tpl/footer.html @@ -1,3 +1,2 @@
    - diff --git a/modules/install/tpl/js/jquery-1.5.2.min.js b/modules/install/tpl/js/jquery-1.5.2.min.js deleted file mode 100644 index f78f96a12..000000000 --- a/modules/install/tpl/js/jquery-1.5.2.min.js +++ /dev/null @@ -1,16 +0,0 @@ -/*! - * jQuery JavaScript Library v1.5.2 - * http://jquery.com/ - * - * Copyright 2011, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Thu Mar 31 15:28:23 2011 -0400 - */ -(function(a,b){function ci(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cf(a){if(!b_[a]){var b=d("<"+a+">").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";b_[a]=c}return b_[a]}function ce(a,b){var c={};d.each(cd.concat.apply([],cd.slice(0,b)),function(){c[this]=a});return c}function b$(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function bZ(){try{return new a.XMLHttpRequest}catch(b){}}function bY(){d(a).unload(function(){for(var a in bW)bW[a](0,1)})}function bS(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f={},g,h,i=e.length,j,k=e[0],l,m,n,o,p;for(g=1;g=0===c})}function P(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function H(a,b){return(a&&a!=="*"?a+".":"")+b.replace(t,"`").replace(u,"&")}function G(a){var b,c,e,f,g,h,i,j,k,l,m,n,o,p=[],q=[],s=d._data(this,"events");if(a.liveFired!==this&&s&&s.live&&!a.target.disabled&&(!a.button||a.type!=="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var t=s.live.slice(0);for(i=0;ic)break;a.currentTarget=f.elem,a.data=f.handleObj.data,a.handleObj=f.handleObj,o=f.handleObj.origHandler.apply(f.elem,arguments);if(o===!1||a.isPropagationStopped()){c=f.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function E(a,c,e){var f=d.extend({},e[0]);f.type=a,f.originalEvent={},f.liveFired=b,d.event.handle.call(c,f),f.isDefaultPrevented()&&e[0].preventDefault()}function y(){return!0}function x(){return!1}function i(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function h(a,c,e){if(e===b&&a.nodeType===1){e=a.getAttribute("data-"+c);if(typeof e==="string"){try{e=e==="true"?!0:e==="false"?!1:e==="null"?null:d.isNaN(e)?g.test(e)?d.parseJSON(e):e:parseFloat(e)}catch(f){}d.data(a,c,e)}else e=b}return e}var c=a.document,d=function(){function G(){if(!d.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(G,1);return}d.ready()}}var d=function(a,b){return new d.fn.init(a,b,g)},e=a.jQuery,f=a.$,g,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,i=/\S/,j=/^\s+/,k=/\s+$/,l=/\d/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=navigator.userAgent,w,x,y,z=Object.prototype.toString,A=Object.prototype.hasOwnProperty,B=Array.prototype.push,C=Array.prototype.slice,D=String.prototype.trim,E=Array.prototype.indexOf,F={};d.fn=d.prototype={constructor:d,init:function(a,e,f){var g,i,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!e&&c.body){this.context=c,this[0]=c.body,this.selector="body",this.length=1;return this}if(typeof a==="string"){g=h.exec(a);if(!g||!g[1]&&e)return!e||e.jquery?(e||f).find(a):this.constructor(e).find(a);if(g[1]){e=e instanceof d?e[0]:e,k=e?e.ownerDocument||e:c,j=m.exec(a),j?d.isPlainObject(e)?(a=[c.createElement(j[1])],d.fn.attr.call(a,e,!0)):a=[k.createElement(j[1])]:(j=d.buildFragment([g[1]],[k]),a=(j.cacheable?d.clone(j.fragment):j.fragment).childNodes);return d.merge(this,a)}i=c.getElementById(g[2]);if(i&&i.parentNode){if(i.id!==g[2])return f.find(a);this.length=1,this[0]=i}this.context=c,this.selector=a;return this}if(d.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return d.makeArray(a,this)},selector:"",jquery:"1.5.2",length:0,size:function(){return this.length},toArray:function(){return C.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var e=this.constructor();d.isArray(a)?B.apply(e,a):d.merge(e,a),e.prevObject=this,e.context=this.context,b==="find"?e.selector=this.selector+(this.selector?" ":"")+c:b&&(e.selector=this.selector+"."+b+"("+c+")");return e},each:function(a,b){return d.each(this,a,b)},ready:function(a){d.bindReady(),x.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(C.apply(this,arguments),"slice",C.call(arguments).join(","))},map:function(a){return this.pushStack(d.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:B,sort:[].sort,splice:[].splice},d.fn.init.prototype=d.fn,d.extend=d.fn.extend=function(){var a,c,e,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i==="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!=="object"&&!d.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;x.resolveWith(c,[d]),d.fn.trigger&&d(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!x){x=d._Deferred();if(c.readyState==="complete")return setTimeout(d.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",y,!1),a.addEventListener("load",d.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",y),a.attachEvent("onload",d.ready);var b=!1;try{b=a.frameElement==null}catch(e){}c.documentElement.doScroll&&b&&G()}}},isFunction:function(a){return d.type(a)==="function"},isArray:Array.isArray||function(a){return d.type(a)==="array"},isWindow:function(a){return a&&typeof a==="object"&&"setInterval"in a},isNaN:function(a){return a==null||!l.test(a)||isNaN(a)},type:function(a){return a==null?String(a):F[z.call(a)]||"object"},isPlainObject:function(a){if(!a||d.type(a)!=="object"||a.nodeType||d.isWindow(a))return!1;if(a.constructor&&!A.call(a,"constructor")&&!A.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a){}return c===b||A.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!=="string"||!b)return null;b=d.trim(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return a.JSON&&a.JSON.parse?a.JSON.parse(b):(new Function("return "+b))();d.error("Invalid JSON: "+b)},parseXML:function(b,c,e){a.DOMParser?(e=new DOMParser,c=e.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),e=c.documentElement,(!e||!e.nodeName||e.nodeName==="parsererror")&&d.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(a){if(a&&i.test(a)){var b=c.head||c.getElementsByTagName("head")[0]||c.documentElement,e=c.createElement("script");d.support.scriptEval()?e.appendChild(c.createTextNode(a)):e.text=a,b.insertBefore(e,b.firstChild),b.removeChild(e)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,e){var f,g=0,h=a.length,i=h===b||d.isFunction(a);if(e){if(i){for(f in a)if(c.apply(a[f],e)===!1)break}else for(;g1?f.call(arguments,0):c,--g||h.resolveWith(h,f.call(b,0))}}var b=arguments,c=0,e=b.length,g=e,h=e<=1&&a&&d.isFunction(a.promise)?a:d.Deferred();if(e>1){for(;c
    {$lang->colorset}
    +
    {$lang->colorset} {@ $_img_info = getImageSize($val->screenshot); $_height = $_img_info[1]+40; $_width = $_img_info[0]+20; $_talign = "center"; } @@ -84,7 +83,7 @@
    {$val->title}
    {$val->title} diff --git a/modules/page/m.skins/default/mobile.html b/modules/page/m.skins/default/mobile.html index 92940b223..2ec6369d9 100644 --- a/modules/page/m.skins/default/mobile.html +++ b/modules/page/m.skins/default/mobile.html @@ -5,8 +5,8 @@ diff --git a/modules/page/skins/default/content.html b/modules/page/skins/default/content.html index 01c640cf8..87699a3db 100644 --- a/modules/page/skins/default/content.html +++ b/modules/page/skins/default/content.html @@ -3,7 +3,7 @@ diff --git a/modules/page/tpl/content.html b/modules/page/tpl/content.html index fb75c500f..0c8801592 100644 --- a/modules/page/tpl/content.html +++ b/modules/page/tpl/content.html @@ -6,10 +6,10 @@ - {$lang->cmd_setup} + {$lang->cmd_setup}... - {$lang->cmd_page_modify} + {$lang->cmd_page_modify}... Mobile diff --git a/modules/page/tpl/header.html b/modules/page/tpl/header.html index 8424024a1..5265f7d07 100644 --- a/modules/page/tpl/header.html +++ b/modules/page/tpl/header.html @@ -6,9 +6,9 @@

    - {$module_info->mid} ({$lang->is_default}) + {$module_info->mid}({$lang->is_default}) | - View + {$lang->view}

    diff --git a/modules/page/tpl/mcontent.html b/modules/page/tpl/mcontent.html index e560ccbd2..07f0428ca 100644 --- a/modules/page/tpl/mcontent.html +++ b/modules/page/tpl/mcontent.html @@ -4,9 +4,9 @@
    - {$lang->cmd_setup} + {$lang->cmd_setup}... - {$lang->cmd_page_modify} + {$lang->cmd_page_modify}... PC

    {$lang->about_mcontent}

    diff --git a/modules/page/tpl/page_info.html b/modules/page/tpl/page_info.html index 6d5f0eacd..da03b6fe3 100644 --- a/modules/page/tpl/page_info.html +++ b/modules/page/tpl/page_info.html @@ -129,7 +129,7 @@
    - {$lang->cmd_page_modify} + {$lang->cmd_page_modify}... {$lang->cmd_list} From 41153188d8334da4eea642e8fb79fcf444880247 Mon Sep 17 00:00:00 2001 From: ChanMyeong Date: Thu, 24 Nov 2011 11:14:30 +0000 Subject: [PATCH 05/25] HTML/CSS cleaning. git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9874 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/module/tpl/skin_config.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/module/tpl/skin_config.html b/modules/module/tpl/skin_config.html index 0949da605..e9ff26ba0 100644 --- a/modules/module/tpl/skin_config.html +++ b/modules/module/tpl/skin_config.html @@ -129,7 +129,7 @@ -

    {nl2br(trim($val->description))}

    +

    {nl2br(trim($val->description))}

    a";var e=b.getElementsByTagName("*"),f=b.getElementsByTagName("a")[0],g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=b.getElementsByTagName("input")[0];if(e&&e.length&&f){d.support={leadingWhitespace:b.firstChild.nodeType===3,tbody:!b.getElementsByTagName("tbody").length,htmlSerialize:!!b.getElementsByTagName("link").length,style:/red/.test(f.getAttribute("style")),hrefNormalized:f.getAttribute("href")==="/a",opacity:/^0.55$/.test(f.style.opacity),cssFloat:!!f.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,deleteExpando:!0,optDisabled:!1,checkClone:!1,noCloneEvent:!0,noCloneChecked:!0,boxModel:null,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableHiddenOffsets:!0,reliableMarginRight:!0},i.checked=!0,d.support.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,d.support.optDisabled=!h.disabled;var j=null;d.support.scriptEval=function(){if(j===null){var b=c.documentElement,e=c.createElement("script"),f="script"+d.now();try{e.appendChild(c.createTextNode("window."+f+"=1;"))}catch(g){}b.insertBefore(e,b.firstChild),a[f]?(j=!0,delete a[f]):j=!1,b.removeChild(e)}return j};try{delete b.test}catch(k){d.support.deleteExpando=!1}!b.addEventListener&&b.attachEvent&&b.fireEvent&&(b.attachEvent("onclick",function l(){d.support.noCloneEvent=!1,b.detachEvent("onclick",l)}),b.cloneNode(!0).fireEvent("onclick")),b=c.createElement("div"),b.innerHTML="";var m=c.createDocumentFragment();m.appendChild(b.firstChild),d.support.checkClone=m.cloneNode(!0).cloneNode(!0).lastChild.checked,d(function(){var a=c.createElement("div"),b=c.getElementsByTagName("body")[0];if(b){a.style.width=a.style.paddingLeft="1px",b.appendChild(a),d.boxModel=d.support.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,d.support.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
    ",d.support.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
    t
    ";var e=a.getElementsByTagName("td");d.support.reliableHiddenOffsets=e[0].offsetHeight===0,e[0].style.display="",e[1].style.display="none",d.support.reliableHiddenOffsets=d.support.reliableHiddenOffsets&&e[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(a.style.width="1px",a.style.marginRight="0",d.support.reliableMarginRight=(parseInt(c.defaultView.getComputedStyle(a,null).marginRight,10)||0)===0),b.removeChild(a).style.display="none",a=e=null}});var n=function(a){var b=c.createElement("div");a="on"+a;if(!b.attachEvent)return!0;var d=a in b;d||(b.setAttribute(a,"return;"),d=typeof b[a]==="function");return d};d.support.submitBubbles=n("submit"),d.support.changeBubbles=n("change"),b=e=f=null}}();var g=/^(?:\{.*\}|\[.*\])$/;d.extend({cache:{},uuid:0,expando:"jQuery"+(d.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?d.cache[a[d.expando]]:a[d.expando];return!!a&&!i(a)},data:function(a,c,e,f){if(d.acceptData(a)){var g=d.expando,h=typeof c==="string",i,j=a.nodeType,k=j?d.cache:a,l=j?a[d.expando]:a[d.expando]&&d.expando;if((!l||f&&l&&!k[l][g])&&h&&e===b)return;l||(j?a[d.expando]=l=++d.uuid:l=d.expando),k[l]||(k[l]={},j||(k[l].toJSON=d.noop));if(typeof c==="object"||typeof c==="function")f?k[l][g]=d.extend(k[l][g],c):k[l]=d.extend(k[l],c);i=k[l],f&&(i[g]||(i[g]={}),i=i[g]),e!==b&&(i[c]=e);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[c]:i}},removeData:function(b,c,e){if(d.acceptData(b)){var f=d.expando,g=b.nodeType,h=g?d.cache:b,j=g?b[d.expando]:d.expando;if(!h[j])return;if(c){var k=e?h[j][f]:h[j];if(k){delete k[c];if(!i(k))return}}if(e){delete h[j][f];if(!i(h[j]))return}var l=h[j][f];d.support.deleteExpando||h!=a?delete h[j]:h[j]=null,l?(h[j]={},g||(h[j].toJSON=d.noop),h[j][f]=l):g&&(d.support.deleteExpando?delete b[d.expando]:b.removeAttribute?b.removeAttribute(d.expando):b[d.expando]=null)}},_data:function(a,b,c){return d.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=d.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),d.fn.extend({data:function(a,c){var e=null;if(typeof a==="undefined"){if(this.length){e=d.data(this[0]);if(this[0].nodeType===1){var f=this[0].attributes,g;for(var i=0,j=f.length;i-1)return!0;return!1},val:function(a){if(!arguments.length){var c=this[0];if(c){if(d.nodeName(c,"option")){var e=c.attributes.value;return!e||e.specified?c.value:c.text}if(d.nodeName(c,"select")){var f=c.selectedIndex,g=[],h=c.options,i=c.type==="select-one";if(f<0)return null;for(var j=i?f:0,k=i?f+1:h.length;j=0;else if(d.nodeName(this,"select")){var f=d.makeArray(e);d("option",this).each(function(){this.selected=d.inArray(d(this).val(),f)>=0}),f.length||(this.selectedIndex=-1)}else this.value=e}})}}),d.extend({attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,e,f){if(!a||a.nodeType===3||a.nodeType===8||a.nodeType===2)return b;if(f&&c in d.attrFn)return d(a)[c](e);var g=a.nodeType!==1||!d.isXMLDoc(a),h=e!==b;c=g&&d.props[c]||c;if(a.nodeType===1){var i=m.test(c);if(c==="selected"&&!d.support.optSelected){var j=a.parentNode;j&&(j.selectedIndex,j.parentNode&&j.parentNode.selectedIndex)}if((c in a||a[c]!==b)&&g&&!i){h&&(c==="type"&&n.test(a.nodeName)&&a.parentNode&&d.error("type property can't be changed"),e===null?a.nodeType===1&&a.removeAttribute(c):a[c]=e);if(d.nodeName(a,"form")&&a.getAttributeNode(c))return a.getAttributeNode(c).nodeValue;if(c==="tabIndex"){var k=a.getAttributeNode("tabIndex");return k&&k.specified?k.value:o.test(a.nodeName)||p.test(a.nodeName)&&a.href?0:b}return a[c]}if(!d.support.style&&g&&c==="style"){h&&(a.style.cssText=""+e);return a.style.cssText}h&&a.setAttribute(c,""+e);if(!a.attributes[c]&&(a.hasAttribute&&!a.hasAttribute(c)))return b;var l=!d.support.hrefNormalized&&g&&i?a.getAttribute(c,2):a.getAttribute(c);return l===null?b:l}h&&(a[c]=e);return a[c]}});var r=/\.(.*)$/,s=/^(?:textarea|input|select)$/i,t=/\./g,u=/ /g,v=/[^\w\s.|`]/g,w=function(a){return a.replace(v,"\\$&")};d.event={add:function(c,e,f,g){if(c.nodeType!==3&&c.nodeType!==8){try{d.isWindow(c)&&(c!==a&&!c.frameElement)&&(c=a)}catch(h){}if(f===!1)f=x;else if(!f)return;var i,j;f.handler&&(i=f,f=i.handler),f.guid||(f.guid=d.guid++);var k=d._data(c);if(!k)return;var l=k.events,m=k.handle;l||(k.events=l={}),m||(k.handle=m=function(a){return typeof d!=="undefined"&&d.event.triggered!==a.type?d.event.handle.apply(m.elem,arguments):b}),m.elem=c,e=e.split(" ");var n,o=0,p;while(n=e[o++]){j=i?d.extend({},i):{handler:f,data:g},n.indexOf(".")>-1?(p=n.split("."),n=p.shift(),j.namespace=p.slice(0).sort().join(".")):(p=[],j.namespace=""),j.type=n,j.guid||(j.guid=f.guid);var q=l[n],r=d.event.special[n]||{};if(!q){q=l[n]=[];if(!r.setup||r.setup.call(c,g,p,m)===!1)c.addEventListener?c.addEventListener(n,m,!1):c.attachEvent&&c.attachEvent("on"+n,m)}r.add&&(r.add.call(c,j),j.handler.guid||(j.handler.guid=f.guid)),q.push(j),d.event.global[n]=!0}c=null}},global:{},remove:function(a,c,e,f){if(a.nodeType!==3&&a.nodeType!==8){e===!1&&(e=x);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=d.hasData(a)&&d._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(e=c.handler,c=c.type);if(!c||typeof c==="string"&&c.charAt(0)==="."){c=c||"";for(h in t)d.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+d.map(m.slice(0).sort(),w).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!e){for(j=0;j=0&&(a.type=f=f.slice(0,-1),a.exclusive=!0),e||(a.stopPropagation(),d.event.global[f]&&d.each(d.cache,function(){var b=d.expando,e=this[b];e&&e.events&&e.events[f]&&d.event.trigger(a,c,e.handle.elem)}));if(!e||e.nodeType===3||e.nodeType===8)return b;a.result=b,a.target=e,c=d.makeArray(c),c.unshift(a)}a.currentTarget=e;var h=d._data(e,"handle");h&&h.apply(e,c);var i=e.parentNode||e.ownerDocument;try{e&&e.nodeName&&d.noData[e.nodeName.toLowerCase()]||e["on"+f]&&e["on"+f].apply(e,c)===!1&&(a.result=!1,a.preventDefault())}catch(j){}if(!a.isPropagationStopped()&&i)d.event.trigger(a,c,i,!0);else if(!a.isDefaultPrevented()){var k,l=a.target,m=f.replace(r,""),n=d.nodeName(l,"a")&&m==="click",o=d.event.special[m]||{};if((!o._default||o._default.call(e,a)===!1)&&!n&&!(l&&l.nodeName&&d.noData[l.nodeName.toLowerCase()])){try{l[m]&&(k=l["on"+m],k&&(l["on"+m]=null),d.event.triggered=a.type,l[m]())}catch(p){}k&&(l["on"+m]=k),d.event.triggered=b}}},handle:function(c){var e,f,g,h,i,j=[],k=d.makeArray(arguments);c=k[0]=d.event.fix(c||a.event),c.currentTarget=this,e=c.type.indexOf(".")<0&&!c.exclusive,e||(g=c.type.split("."),c.type=g.shift(),j=g.slice(0).sort(),h=new RegExp("(^|\\.)"+j.join("\\.(?:.*\\.)?")+"(\\.|$)")),c.namespace=c.namespace||j.join("."),i=d._data(this,"events"),f=(i||{})[c.type];if(i&&f){f=f.slice(0);for(var l=0,m=f.length;l-1?d.map(a.options,function(a){return a.selected}).join("-"):"":a.nodeName.toLowerCase()==="select"&&(c=a.selectedIndex);return c},D=function D(a){var c=a.target,e,f;if(s.test(c.nodeName)&&!c.readOnly){e=d._data(c,"_change_data"),f=C(c),(a.type!=="focusout"||c.type!=="radio")&&d._data(c,"_change_data",f);if(e===b||f===e)return;if(e!=null||f)a.type="change",a.liveFired=b,d.event.trigger(a,arguments[1],c)}};d.event.special.change={filters:{focusout:D,beforedeactivate:D,click:function(a){var b=a.target,c=b.type;(c==="radio"||c==="checkbox"||b.nodeName.toLowerCase()==="select")&&D.call(this,a)},keydown:function(a){var b=a.target,c=b.type;(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&D.call(this,a)},beforeactivate:function(a){var b=a.target;d._data(b,"_change_data",C(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in B)d.event.add(this,c+".specialChange",B[c]);return s.test(this.nodeName)},teardown:function(a){d.event.remove(this,".specialChange");return s.test(this.nodeName)}},B=d.event.special.change.filters,B.focus=B.beforeactivate}c.addEventListener&&d.each({focus:"focusin",blur:"focusout"},function(a,b){function f(a){var c=d.event.fix(a);c.type=b,c.originalEvent={},d.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var e=0;d.event.special[b]={setup:function(){e++===0&&c.addEventListener(a,f,!0)},teardown:function(){--e===0&&c.removeEventListener(a,f,!0)}}}),d.each(["bind","one"],function(a,c){d.fn[c]=function(a,e,f){if(typeof a==="object"){for(var g in a)this[c](g,e,a[g],f);return this}if(d.isFunction(e)||e===!1)f=e,e=b;var h=c==="one"?d.proxy(f,function(a){d(this).unbind(a,h);return f.apply(this,arguments)}):f;if(a==="unload"&&c!=="one")this.one(a,e,f);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},d.attrFn&&(d.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,e,g){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!=="string")return e;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(f.call(n)==="[object Array]")if(u)if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&e.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&e.push(j[t]);else e.push.apply(e,n);else p(n,e);o&&(k(o,h,e,g),k.uniqueSort(e));return e};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b==="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return"text"===c&&(b===c||b===null)},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(f.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length==="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!=="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!=="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

    ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
    ";if(a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(var g=c;g0},closest:function(a,b){var c=[],e,f,g=this[0];if(d.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(e=0,f=a.length;e-1:d(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=N.test(a)?d(a,b||this.context):null;for(e=0,f=this.length;e-1:d.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b)break}}c=c.length>1?d.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a==="string"?d(a,b):d.makeArray(a),e=d.merge(this.get(),c);return this.pushStack(P(c[0])||P(e[0])?e:d.unique(e))},andSelf:function(){return this.add(this.prevObject)}}),d.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return d.dir(a,"parentNode")},parentsUntil:function(a,b,c){return d.dir(a,"parentNode",c)},next:function(a){return d.nth(a,2,"nextSibling")},prev:function(a){return d.nth(a,2,"previousSibling")},nextAll:function(a){return d.dir(a,"nextSibling")},prevAll:function(a){return d.dir(a,"previousSibling")},nextUntil:function(a,b,c){return d.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return d.dir(a,"previousSibling",c)},siblings:function(a){return d.sibling(a.parentNode.firstChild,a)},children:function(a){return d.sibling(a.firstChild)},contents:function(a){return d.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:d.makeArray(a.childNodes)}},function(a,b){d.fn[a]=function(c,e){var f=d.map(this,b,c),g=M.call(arguments);I.test(a)||(e=c),e&&typeof e==="string"&&(f=d.filter(e,f)),f=this.length>1&&!O[a]?d.unique(f):f,(this.length>1||K.test(e))&&J.test(a)&&(f=f.reverse());return this.pushStack(f,a,g.join(","))}}),d.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?d.find.matchesSelector(b[0],a)?[b[0]]:[]:d.find.matches(a,b)},dir:function(a,c,e){var f=[],g=a[c];while(g&&g.nodeType!==9&&(e===b||g.nodeType!==1||!d(g).is(e)))g.nodeType===1&&f.push(g),g=g[c];return f},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var R=/ jQuery\d+="(?:\d+|null)"/g,S=/^\s+/,T=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,U=/<([\w:]+)/,V=/",""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]};Z.optgroup=Z.option,Z.tbody=Z.tfoot=Z.colgroup=Z.caption=Z.thead,Z.th=Z.td,d.support.htmlSerialize||(Z._default=[1,"div
    ","
    "]),d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var c=d(this);c.text(a.call(this,b,c.text()))});if(typeof a!=="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return d.text(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapAll(a.call(this,b))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(d.isFunction(a))return this.each(function(b){d(this).wrapInner(a.call(this,b))});return this.each(function(){var b=d(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,e;(e=this[c])!=null;c++)if(!a||d.filter(a,[e]).length)!b&&e.nodeType===1&&(d.cleanData(e.getElementsByTagName("*")),d.cleanData([e])),e.parentNode&&e.parentNode.removeChild(e);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&d.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return d.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(R,""):null;if(typeof a!=="string"||X.test(a)||!d.support.leadingWhitespace&&S.test(a)||Z[(U.exec(a)||["",""])[1].toLowerCase()])d.isFunction(a)?this.each(function(b){var c=d(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);else{a=a.replace(T,"<$1>");try{for(var c=0,e=this.length;c1&&l0?this.clone(!0):this).get();d(f[h])[b](j),e=e.concat(j)}return this.pushStack(e,a,f.selector)}}),d.extend({clone:function(a,b,c){var e=a.cloneNode(!0),f,g,h;if((!d.support.noCloneEvent||!d.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!d.isXMLDoc(a)){ba(a,e),f=bb(a),g=bb(e);for(h=0;f[h];++h)ba(f[h],g[h])}if(b){_(a,e);if(c){f=bb(a),g=bb(e);for(h=0;f[h];++h)_(f[h],g[h])}}return e},clean:function(a,b,e,f){b=b||c,typeof b.createElement==="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var g=[];for(var h=0,i;(i=a[h])!=null;h++){typeof i==="number"&&(i+="");if(!i)continue;if(typeof i!=="string"||W.test(i)){if(typeof i==="string"){i=i.replace(T,"<$1>");var j=(U.exec(i)||["",""])[1].toLowerCase(),k=Z[j]||Z._default,l=k[0],m=b.createElement("div");m.innerHTML=k[1]+i+k[2];while(l--)m=m.lastChild;if(!d.support.tbody){var n=V.test(i),o=j==="table"&&!n?m.firstChild&&m.firstChild.childNodes:k[1]===""&&!n?m.childNodes:[];for(var p=o.length-1;p>=0;--p)d.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!d.support.leadingWhitespace&&S.test(i)&&m.insertBefore(b.createTextNode(S.exec(i)[0]),m.firstChild),i=m.childNodes}}else i=b.createTextNode(i);i.nodeType?g.push(i):g=d.merge(g,i)}if(e)for(h=0;g[h];h++)!f||!d.nodeName(g[h],"script")||g[h].type&&g[h].type.toLowerCase()!=="text/javascript"?(g[h].nodeType===1&&g.splice.apply(g,[h+1,0].concat(d.makeArray(g[h].getElementsByTagName("script")))),e.appendChild(g[h])):f.push(g[h].parentNode?g[h].parentNode.removeChild(g[h]):g[h]);return g},cleanData:function(a){var b,c,e=d.cache,f=d.expando,g=d.event.special,h=d.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&d.noData[j.nodeName.toLowerCase()])continue;c=j[d.expando];if(c){b=e[c]&&e[c][f];if(b&&b.events){for(var k in b.events)g[k]?d.event.remove(j,k):d.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[d.expando]:j.removeAttribute&&j.removeAttribute(d.expando),delete e[c]}}}});var bd=/alpha\([^)]*\)/i,be=/opacity=([^)]*)/,bf=/-([a-z])/ig,bg=/([A-Z]|^ms)/g,bh=/^-?\d+(?:px)?$/i,bi=/^-?\d/,bj={position:"absolute",visibility:"hidden",display:"block"},bk=["Left","Right"],bl=["Top","Bottom"],bm,bn,bo,bp=function(a,b){return b.toUpperCase()};d.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return d.access(this,a,c,!0,function(a,c,e){return e!==b?d.style(a,c,e):d.css(a,c)})},d.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bm(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0},cssProps:{"float":d.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,e,f){if(a&&a.nodeType!==3&&a.nodeType!==8&&a.style){var g,h=d.camelCase(c),i=a.style,j=d.cssHooks[h];c=d.cssProps[h]||h;if(e===b){if(j&&"get"in j&&(g=j.get(a,!1,f))!==b)return g;return i[c]}if(typeof e==="number"&&isNaN(e)||e==null)return;typeof e==="number"&&!d.cssNumber[h]&&(e+="px");if(!j||!("set"in j)||(e=j.set(a,e))!==b)try{i[c]=e}catch(k){}}},css:function(a,c,e){var f,g=d.camelCase(c),h=d.cssHooks[g];c=d.cssProps[g]||g;if(h&&"get"in h&&(f=h.get(a,!0,e))!==b)return f;if(bm)return bm(a,c,g)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bf,bp)}}),d.curCSS=d.css,d.each(["height","width"],function(a,b){d.cssHooks[b]={get:function(a,c,e){var f;if(c){a.offsetWidth!==0?f=bq(a,b,e):d.swap(a,bj,function(){f=bq(a,b,e)});if(f<=0){f=bm(a,b,b),f==="0px"&&bo&&(f=bo(a,b,b));if(f!=null)return f===""||f==="auto"?"0px":f}if(f<0||f==null){f=a.style[b];return f===""||f==="auto"?"0px":f}return typeof f==="string"?f:f+"px"}},set:function(a,b){if(!bh.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),d.support.opacity||(d.cssHooks.opacity={get:function(a,b){return be.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style;c.zoom=1;var e=d.isNaN(b)?"":"alpha(opacity="+b*100+")",f=c.filter||"";c.filter=bd.test(f)?f.replace(bd,e):c.filter+" "+e}}),d(function(){d.support.reliableMarginRight||(d.cssHooks.marginRight={get:function(a,b){var c;d.swap(a,{display:"inline-block"},function(){b?c=bm(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bn=function(a,c,e){var f,g,h;e=e.replace(bg,"-$1").toLowerCase();if(!(g=a.ownerDocument.defaultView))return b;if(h=g.getComputedStyle(a,null))f=h.getPropertyValue(e),f===""&&!d.contains(a.ownerDocument.documentElement,a)&&(f=d.style(a,e));return f}),c.documentElement.currentStyle&&(bo=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bh.test(d)&&bi.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bm=bn||bo,d.expr&&d.expr.filters&&(d.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!d.support.reliableHiddenOffsets&&(a.style.display||d.css(a,"display"))==="none"},d.expr.filters.visible=function(a){return!d.expr.filters.hidden(a)});var br=/%20/g,bs=/\[\]$/,bt=/\r?\n/g,bu=/#.*$/,bv=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bw=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bx=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,by=/^(?:GET|HEAD)$/,bz=/^\/\//,bA=/\?/,bB=/)<[^<]*)*<\/script>/gi,bC=/^(?:select|textarea)/i,bD=/\s+/,bE=/([?&])_=[^&]*/,bF=/(^|\-)([a-z])/g,bG=function(a,b,c){return b+c.toUpperCase()},bH=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bI=d.fn.load,bJ={},bK={},bL,bM;try{bL=c.location.href}catch(bN){bL=c.createElement("a"),bL.href="",bL=bL.href}bM=bH.exec(bL.toLowerCase())||[],d.fn.extend({load:function(a,c,e){if(typeof a!=="string"&&bI)return bI.apply(this,arguments);if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var g=a.slice(f,a.length);a=a.slice(0,f)}var h="GET";c&&(d.isFunction(c)?(e=c,c=b):typeof c==="object"&&(c=d.param(c,d.ajaxSettings.traditional),h="POST"));var i=this;d.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?d("
    ").append(c.replace(bB,"")).find(g):c)),e&&i.each(e,[c,b,a])}});return this},serialize:function(){return d.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?d.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bC.test(this.nodeName)||bw.test(this.type))}).map(function(a,b){var c=d(this).val();return c==null?null:d.isArray(c)?d.map(c,function(a,c){return{name:b.name,value:a.replace(bt,"\r\n")}}):{name:b.name,value:c.replace(bt,"\r\n")}}).get()}}),d.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){d.fn[b]=function(a){return this.bind(b,a)}}),d.each(["get","post"],function(a,c){d[c]=function(a,e,f,g){d.isFunction(e)&&(g=g||f,f=e,e=b);return d.ajax({type:c,url:a,data:e,success:f,dataType:g})}}),d.extend({getScript:function(a,c){return d.get(a,b,c,"script")},getJSON:function(a,b,c){return d.get(a,b,c,"json")},ajaxSetup:function(a,b){b?d.extend(!0,a,d.ajaxSettings,b):(b=a,a=d.extend(!0,d.ajaxSettings,b));for(var c in {context:1,url:1})c in b?a[c]=b[c]:c in d.ajaxSettings&&(a[c]=d.ajaxSettings[c]);return a},ajaxSettings:{url:bL,isLocal:bx.test(bM[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":d.parseJSON,"text xml":d.parseXML}},ajaxPrefilter:bO(bJ),ajaxTransport:bO(bK),ajax:function(a,c){function v(a,c,l,n){if(r!==2){r=2,p&&clearTimeout(p),o=b,m=n||"",u.readyState=a?4:0;var q,t,v,w=l?bR(e,u,l):b,x,y;if(a>=200&&a<300||a===304){if(e.ifModified){if(x=u.getResponseHeader("Last-Modified"))d.lastModified[k]=x;if(y=u.getResponseHeader("Etag"))d.etag[k]=y}if(a===304)c="notmodified",q=!0;else try{t=bS(e,w),c="success",q=!0}catch(z){c="parsererror",v=z}}else{v=c;if(!c||a)c="error",a<0&&(a=0)}u.status=a,u.statusText=c,q?h.resolveWith(f,[t,c,u]):h.rejectWith(f,[u,c,v]),u.statusCode(j),j=b,s&&g.trigger("ajax"+(q?"Success":"Error"),[u,e,q?t:v]),i.resolveWith(f,[u,c]),s&&(g.trigger("ajaxComplete",[u,e]),--d.active||d.event.trigger("ajaxStop"))}}typeof a==="object"&&(c=a,a=b),c=c||{};var e=d.ajaxSetup({},c),f=e.context||e,g=f!==e&&(f.nodeType||f instanceof d)?d(f):d.event,h=d.Deferred(),i=d._Deferred(),j=e.statusCode||{},k,l={},m,n,o,p,q,r=0,s,t,u={readyState:0,setRequestHeader:function(a,b){r||(l[a.toLowerCase().replace(bF,bG)]=b);return this},getAllResponseHeaders:function(){return r===2?m:null},getResponseHeader:function(a){var c;if(r===2){if(!n){n={};while(c=bv.exec(m))n[c[1].toLowerCase()]=c[2]}c=n[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){r||(e.mimeType=a);return this},abort:function(a){a=a||"abort",o&&o.abort(a),v(0,a);return this}};h.promise(u),u.success=u.done,u.error=u.fail,u.complete=i.done,u.statusCode=function(a){if(a){var b;if(r<2)for(b in a)j[b]=[j[b],a[b]];else b=a[u.status],u.then(b,b)}return this},e.url=((a||e.url)+"").replace(bu,"").replace(bz,bM[1]+"//"),e.dataTypes=d.trim(e.dataType||"*").toLowerCase().split(bD),e.crossDomain==null&&(q=bH.exec(e.url.toLowerCase()),e.crossDomain=q&&(q[1]!=bM[1]||q[2]!=bM[2]||(q[3]||(q[1]==="http:"?80:443))!=(bM[3]||(bM[1]==="http:"?80:443)))),e.data&&e.processData&&typeof e.data!=="string"&&(e.data=d.param(e.data,e.traditional)),bP(bJ,e,c,u);if(r===2)return!1;s=e.global,e.type=e.type.toUpperCase(),e.hasContent=!by.test(e.type),s&&d.active++===0&&d.event.trigger("ajaxStart");if(!e.hasContent){e.data&&(e.url+=(bA.test(e.url)?"&":"?")+e.data),k=e.url;if(e.cache===!1){var w=d.now(),x=e.url.replace(bE,"$1_="+w);e.url=x+(x===e.url?(bA.test(e.url)?"&":"?")+"_="+w:"")}}if(e.data&&e.hasContent&&e.contentType!==!1||c.contentType)l["Content-Type"]=e.contentType;e.ifModified&&(k=k||e.url,d.lastModified[k]&&(l["If-Modified-Since"]=d.lastModified[k]),d.etag[k]&&(l["If-None-Match"]=d.etag[k])),l.Accept=e.dataTypes[0]&&e.accepts[e.dataTypes[0]]?e.accepts[e.dataTypes[0]]+(e.dataTypes[0]!=="*"?", */*; q=0.01":""):e.accepts["*"];for(t in e.headers)u.setRequestHeader(t,e.headers[t]);if(e.beforeSend&&(e.beforeSend.call(f,u,e)===!1||r===2)){u.abort();return!1}for(t in {success:1,error:1,complete:1})u[t](e[t]);o=bP(bK,e,c,u);if(o){u.readyState=1,s&&g.trigger("ajaxSend",[u,e]),e.async&&e.timeout>0&&(p=setTimeout(function(){u.abort("timeout")},e.timeout));try{r=1,o.send(l,v)}catch(y){status<2?v(-1,y):d.error(y)}}else v(-1,"No Transport");return u},param:function(a,c){var e=[],f=function(a,b){b=d.isFunction(b)?b():b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=d.ajaxSettings.traditional);if(d.isArray(a)||a.jquery&&!d.isPlainObject(a))d.each(a,function(){f(this.name,this.value)});else for(var g in a)bQ(g,a[g],c,f);return e.join("&").replace(br,"+")}}),d.extend({active:0,lastModified:{},etag:{}});var bT=d.now(),bU=/(\=)\?(&|$)|\?\?/i;d.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return d.expando+"_"+bT++}}),d.ajaxPrefilter("json jsonp",function(b,c,e){var f=typeof b.data==="string";if(b.dataTypes[0]==="jsonp"||c.jsonpCallback||c.jsonp!=null||b.jsonp!==!1&&(bU.test(b.url)||f&&bU.test(b.data))){var g,h=b.jsonpCallback=d.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2",m=function(){a[h]=i,g&&d.isFunction(i)&&a[h](g[0])};b.jsonp!==!1&&(j=j.replace(bU,l),b.url===j&&(f&&(k=k.replace(bU,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},e.then(m,m),b.converters["script json"]=function(){g||d.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),d.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){d.globalEval(a);return a}}}),d.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),d.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var bV=d.now(),bW,bX;d.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&bZ()||b$()}:bZ,bX=d.ajaxSettings.xhr(),d.support.ajax=!!bX,d.support.cors=bX&&"withCredentials"in bX,bX=b,d.support.ajax&&d.ajaxTransport(function(a){if(!a.crossDomain||d.support.cors){var c;return{send:function(e,f){var g=a.xhr(),h,i;a.username?g.open(a.type,a.url,a.async,a.username,a.password):g.open(a.type,a.url,a.async);if(a.xhrFields)for(i in a.xhrFields)g[i]=a.xhrFields[i];a.mimeType&&g.overrideMimeType&&g.overrideMimeType(a.mimeType),!a.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(i in e)g.setRequestHeader(i,e[i])}catch(j){}g.send(a.hasContent&&a.data||null),c=function(e,i){var j,k,l,m,n;try{if(c&&(i||g.readyState===4)){c=b,h&&(g.onreadystatechange=d.noop,delete bW[h]);if(i)g.readyState!==4&&g.abort();else{j=g.status,l=g.getAllResponseHeaders(),m={},n=g.responseXML,n&&n.documentElement&&(m.xml=n),m.text=g.responseText;try{k=g.statusText}catch(o){k=""}j||!a.isLocal||a.crossDomain?j===1223&&(j=204):j=m.text?200:404}}}catch(p){i||f(-1,p)}m&&f(j,k,m,l)},a.async&&g.readyState!==4?(bW||(bW={},bY()),h=bV++,g.onreadystatechange=bW[h]=c):c()},abort:function(){c&&c(0,1)}}}});var b_={},ca=/^(?:toggle|show|hide)$/,cb=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cc,cd=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];d.fn.extend({show:function(a,b,c){var e,f;if(a||a===0)return this.animate(ce("show",3),a,b,c);for(var g=0,h=this.length;g=0;a--)c[a].elem===this&&(b&&c[a](!0),c.splice(a,1))}),b||this.dequeue();return this}}),d.each({slideDown:ce("show",1),slideUp:ce("hide",1),slideToggle:ce("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){d.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),d.extend({speed:function(a,b,c){var e=a&&typeof a==="object"?d.extend({},a):{complete:c||!c&&b||d.isFunction(a)&&a,duration:a,easing:c&&b||b&&!d.isFunction(b)&&b};e.duration=d.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in d.fx.speeds?d.fx.speeds[e.duration]:d.fx.speeds._default,e.old=e.complete,e.complete=function(){e.queue!==!1&&d(this).dequeue(),d.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig||(b.orig={})}}),d.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(d.fx.step[this.prop]||d.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=d.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function g(a){return e.step(a)}var e=this,f=d.fx;this.startTime=d.now(),this.start=a,this.end=b,this.unit=c||this.unit||(d.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&d.timers.push(g)&&!cc&&(cc=setInterval(f.tick,f.interval))},show:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),d(this.elem).show()},hide:function(){this.options.orig[this.prop]=d.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=d.now(),c=!0;if(a||b>=this.options.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),this.options.curAnim[this.prop]=!0;for(var e in this.options.curAnim)this.options.curAnim[e]!==!0&&(c=!1);if(c){if(this.options.overflow!=null&&!d.support.shrinkWrapBlocks){var f=this.elem,g=this.options;d.each(["","X","Y"],function(a,b){f.style["overflow"+b]=g.overflow[a]})}this.options.hide&&d(this.elem).hide();if(this.options.hide||this.options.show)for(var h in this.options.curAnim)d.style(this.elem,h,this.options.orig[h]);this.options.complete.call(this.elem)}return!1}var i=b-this.startTime;this.state=i/this.options.duration;var j=this.options.specialEasing&&this.options.specialEasing[this.prop],k=this.options.easing||(d.easing.swing?"swing":"linear");this.pos=d.easing[j||k](this.state,i,0,1,this.options.duration),this.now=this.start+(this.end-this.start)*this.pos,this.update();return!0}},d.extend(d.fx,{tick:function(){var a=d.timers;for(var b=0;b
    ";d.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),e=b.firstChild,f=e.firstChild,h=e.nextSibling.firstChild.firstChild,this.doesNotAddBorder=f.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,f.style.position="fixed",f.style.top="20px",this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15,f.style.position=f.style.top="",e.style.overflow="hidden",e.style.position="relative",this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),d.offset.initialize=d.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;d.offset.initialize(),d.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(d.css(a,"marginTop"))||0,c+=parseFloat(d.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var e=d.css(a,"position");e==="static"&&(a.style.position="relative");var f=d(a),g=f.offset(),h=d.css(a,"top"),i=d.css(a,"left"),j=(e==="absolute"||e==="fixed")&&d.inArray("auto",[h,i])>-1,k={},l={},m,n;j&&(l=f.position()),m=j?l.top:parseInt(h,10)||0,n=j?l.left:parseInt(i,10)||0,d.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):f.css(k)}},d.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),e=ch.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(d.css(a,"marginTop"))||0,c.left-=parseFloat(d.css(a,"marginLeft"))||0,e.top+=parseFloat(d.css(b[0],"borderTopWidth"))||0,e.left+=parseFloat(d.css(b[0],"borderLeftWidth"))||0;return{top:c.top-e.top,left:c.left-e.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&(!ch.test(a.nodeName)&&d.css(a,"position")==="static"))a=a.offsetParent;return a})}}),d.each(["Left","Top"],function(a,c){var e="scroll"+c;d.fn[e]=function(c){var f=this[0],g;if(!f)return null;if(c!==b)return this.each(function(){g=ci(this),g?g.scrollTo(a?d(g).scrollLeft():c,a?c:d(g).scrollTop()):this[e]=c});g=ci(f);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:d.support.boxModel&&g.document.documentElement[e]||g.document.body[e]:f[e]}}),d.each(["Height","Width"],function(a,c){var e=c.toLowerCase();d.fn["inner"+c]=function(){return this[0]?parseFloat(d.css(this[0],e,"padding")):null},d.fn["outer"+c]=function(a){return this[0]?parseFloat(d.css(this[0],e,a?"margin":"border")):null},d.fn[e]=function(a){var f=this[0];if(!f)return a==null?null:this;if(d.isFunction(a))return this.each(function(b){var c=d(this);c[e](a.call(this,b,c[e]()))});if(d.isWindow(f)){var g=f.document.documentElement["client"+c];return f.document.compatMode==="CSS1Compat"&&g||f.document.body["client"+c]||g}if(f.nodeType===9)return Math.max(f.documentElement["client"+c],f.body["scroll"+c],f.documentElement["scroll"+c],f.body["offset"+c],f.documentElement["offset"+c]);if(a===b){var h=d.css(f,e),i=parseFloat(h);return d.isNaN(i)?h:i}return this.css(e,typeof a==="string"?a:a+"px")}}),a.jQuery=a.$=d})(window); \ No newline at end of file From b5797f1b786ce1e91225f92fb733d541e17c2385 Mon Sep 17 00:00:00 2001 From: ovclas Date: Wed, 30 Nov 2011 07:23:50 +0000 Subject: [PATCH 24/25] issue 988: close unpaired tags git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9893 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- .../skins/xpresseditor/js/Xpress_Editor.js | 5 +- .../skins/xpresseditor/js/xpresseditor.js | 5 +- .../skins/xpresseditor/js/xpresseditor.min.js | 388 +++++++++--------- 3 files changed, 197 insertions(+), 201 deletions(-) diff --git a/modules/editor/skins/xpresseditor/js/Xpress_Editor.js b/modules/editor/skins/xpresseditor/js/Xpress_Editor.js index 76bb67716..2b979cd9e 100644 --- a/modules/editor/skins/xpresseditor/js/Xpress_Editor.js +++ b/modules/editor/skins/xpresseditor/js/Xpress_Editor.js @@ -5188,8 +5188,8 @@ xe.XE_XHTMLFormatter = $.Class({ return '<'+closing+tag+(attrs?' '+attrs:'')+'>'; }); - /* - if (stack.length) { + + if(stack.length) { var t = ''; do { @@ -5197,7 +5197,6 @@ xe.XE_XHTMLFormatter = $.Class({ if (t.state != 'deleted') sContent += ''; } while(stack.length); } - */ return sContent; }, diff --git a/modules/editor/skins/xpresseditor/js/xpresseditor.js b/modules/editor/skins/xpresseditor/js/xpresseditor.js index 50e5b36e7..f673fef7d 100644 --- a/modules/editor/skins/xpresseditor/js/xpresseditor.js +++ b/modules/editor/skins/xpresseditor/js/xpresseditor.js @@ -5188,8 +5188,8 @@ xe.XE_XHTMLFormatter = $.Class({ return '<'+closing+tag+(attrs?' '+attrs:'')+'>'; }); - /* - if (stack.length) { + + if(stack.length) { var t = ''; do { @@ -5197,7 +5197,6 @@ xe.XE_XHTMLFormatter = $.Class({ if (t.state != 'deleted') sContent += ''; } while(stack.length); } - */ return sContent; }, diff --git a/modules/editor/skins/xpresseditor/js/xpresseditor.min.js b/modules/editor/skins/xpresseditor/js/xpresseditor.min.js index a226c9643..62f108c70 100644 --- a/modules/editor/skins/xpresseditor/js/xpresseditor.min.js +++ b/modules/editor/skins/xpresseditor/js/xpresseditor.min.js @@ -1,138 +1,137 @@ -(function(c){function k(a){function b(a){return function(){return a.apply(this.$this,arguments)}}a=a.prototype;this.prototype.$super={};for(var d in a)a.propertyIsEnumerable(d)&&(typeof this.prototype[d]=="undefined"&&(this.prototype[d]=a[d]),this.prototype.$super[d]=c.isFunction(a[d])?b(a[d]):a[d]);return this}c.extend({Class:function(a){function b(){if(typeof this.$super!="undefined")this.$super.$this=this;c.isFunction(this.$init)&&this.$init.apply(this,arguments)}b.prototype=a;b.constructor=b; -b.extend=k;return b},$:function(a){return typeof a=="string"?a.substring(0,1)=="<"?c(a).get(0):c("#"+a).get(0):a},fnBind:function(a,b){var d=c.makeArray(arguments);d.shift();d.shift();return function(){var f=d.concat(c.makeArray(arguments));return a.apply(b,f)}}});c.browser.nVersion=parseFloat(c.browser.version);if(typeof window.xe=="undefined")window.xe={};xe.XpressCore=c.Class({name:"XpressCore",$init:function(a){a=!a?{}:c.Class({}).extend({oDebugger:null}).extend(a);if(a.oDebugger)this.oDebugger= -a.oDebugger,this.oDebugger.oApp=this;this.commandQueue=[];this.oCommandMap={};this.oDisabledCommand={};this.aPlugins=[];this.appStatus=xe.APP_STATUS.NOT_READY;this.registerPlugin(this)},exec:function(a,b,d){if(this.appStatus==xe.APP_STATUS.NOT_READY)return this.commandQueue[this.commandQueue.length]={msg:a,args:b,event:d},true;this.exec=this._exec;this.exec(a,b,d)},delayedExec:function(a,b,d,f){a=c.fnBind(this.exec,this,a,b,f);setTimeout(a,d)},_exec:function(a,b,d){return(this._exec=this.oDebugger? -this._execWithDebugger:this._execWithoutDebugger).call(this,a,b,d)},_execWithDebugger:function(a,b,d){this.oDebugger.log_MessageStart(a,b);d=this._doExec(a,b,d);this.oDebugger.log_MessageEnd(a,b);return d},_execWithoutDebugger:function(a,b,d){return this._doExec(a,b,d)},_doExec:function(a,b,d){var f=false;if(!this.oDisabledCommand[a]){var c=[];if(b&&b.length)for(var f=b.length,g=0;g=0&&xe.DOMFix.parentNode(a[j])==a[b];)j=this._recurConstructClonedTree(a,j,a[b],n,d,f);p.insertBefore(n,p.firstChild);return j};a[a.length]=xe.DOMFix.parentNode(a[a.length-1]);_recurConstructClonedTree(a,a.length-1,a[a.length-1],b);return{oStartContainer:d,oEndContainer:f}}, +this.oDebugger?this._execMsgStepWithDebugger:this._execMsgStepWithoutDebugger).call(this,a,b,d)},_execMsgStepWithDebugger:function(a,b,d){this.oDebugger.log_MessageStepStart(a,b,d);var f=this._execMsgHandler("$"+a+"_"+b,d);this.oDebugger.log_MessageStepEnd(a,b,d);return f},_execMsgStepWithoutDebugger:function(a,b,d){return this._execMsgHandler("$"+a+"_"+b,d)},_execMsgHandler:function(a,b){this.oCommandMap[a]||this.createCommandMap(a);var d=this.oCommandMap[a],f=d.length;if(0==f)return!0;var c,g=!0; +if(a.match(/^\$(BEFORE|ON|AFTER)_MSG_APP_READY$/))for(var h=0;hd.length)return a;d=this._constructClonedTree(d, +b);if(b=b.firstChild)for(var b=b.firstChild,f;b;)f=b.nextSibling,a.appendChild(b),b=f;d=this._splitTextEndNodes({oStartContainer:d.oStartContainer,iStartOffset:this.startOffset,oEndContainer:d.oEndContainer,iEndOffset:this.endOffset});d.oStartContainer&&d.oStartContainer.previousSibling&&xe.DOMFix.parentNode(d.oStartContainer).removeChild(d.oStartContainer.previousSibling);d.oEndContainer&&d.oEndContainer.nextSibling&&xe.DOMFix.parentNode(d.oEndContainer).removeChild(d.oEndContainer.nextSibling); +return a},_constructClonedTree:function(a,b){var d=null,f=null,c=this.startContainer,g=this.endContainer;_recurConstructClonedTree=function(a,b,j,p){if(0>b)return b;var j=b-1,n=a[b].cloneNode(!1);a[b]==c&&(d=n);for(a[b]==g&&(f=n);0<=j&&xe.DOMFix.parentNode(a[j])==a[b];)j=this._recurConstructClonedTree(a,j,a[b],n,d,f);p.insertBefore(n,p.firstChild);return j};a[a.length]=xe.DOMFix.parentNode(a[a.length-1]);_recurConstructClonedTree(a,a.length-1,a[a.length-1],b);return{oStartContainer:d,oEndContainer:f}}, cloneRange:function(){return this._copyRange(new xe.W3CDOMRange(this._document))},_copyRange:function(a){a.collapsed=this.collapsed;a.commonAncestorContainer=this.commonAncestorContainer;a.endContainer=this.endContainer;a.endOffset=this.endOffset;a.startContainer=this.startContainer;a.startOffset=this.startOffset;a._document=this._document;return a},collapse:function(a){a?(this.endContainer=this.startContainer,this.endOffset=this.startOffset):(this.startContainer=this.endContainer,this.startOffset= this.endOffset);this._updateRangeInfo()},compareBoundaryPoints:function(a,b){switch(a){case xe.W3CDOMRange.START_TO_START:return this._compareEndPoint(this.startContainer,this.startOffset,b.startContainer,b.startOffset);case xe.W3CDOMRange.START_TO_END:return this._compareEndPoint(this.endContainer,this.endOffset,b.startContainer,b.startOffset);case xe.W3CDOMRange.END_TO_END:return this._compareEndPoint(this.endContainer,this.endOffset,b.endContainer,b.endOffset);case xe.W3CDOMRange.END_TO_START:return this._compareEndPoint(this.startContainer, -this.startOffset,b.endContainer,b.endOffset)}},_findBody:function(a){if(!a)return null;for(;a;){if(a.tagName=="BODY")return a;a=xe.DOMFix.parentNode(a)}return null},_compareEndPoint:function(a,b,d,f){if(!a||this._findBody(a)!=this._document.body)a=this._document.body,b=0;if(!d||this._findBody(d)!=this._document.body)d=this._document.body,f=0;var c=this._getCommonAncestorContainer(a,d);if(a!=c){for(;(oTmpNode=xe.DOMFix.parentNode(a))!=c;)a=oTmpNode;b=this._getPosIdx(a)+0.5}if(d!=c){for(;(oTmpNode= -xe.DOMFix.parentNode(d))!=c;)d=oTmpNode;f=this._getPosIdx(d)+0.5}f==-1&&(f=b+1);return ba.nodeValue.length)b=a.nodeValue.length}else if(b>xe.DOMFix.childNodes(a).length)b=xe.DOMFix.childNodes(a).length;return b},setEnd:function(a,b){b=this._endsNodeValidation(a,b);this.endContainer=a;this.endOffset=b;(!this.startContainer||this._compareEndPoint(this.startContainer,this.startOffset,this.endContainer,this.endOffset)!=-1)&&this.collapse(false);this._updateRangeInfo()},setEndAfter:function(a){if(!a)throw Error("INVALID_NODE_TYPE_ERR in setEndAfter");a.tagName=="BODY"? -this.setEnd(a,xe.DOMFix.childNodes(a).length):this.setEnd(xe.DOMFix.parentNode(a),this._getPosIdx(a)+1)},setEndBefore:function(a){if(!a)throw Error("INVALID_NODE_TYPE_ERR in setEndBefore");a.tagName=="BODY"?this.setEnd(a,0):this.setEnd(xe.DOMFix.parentNode(a),this._getPosIdx(a))},setStart:function(a,b){b=this._endsNodeValidation(a,b);this.startContainer=a;this.startOffset=b;(!this.endContainer||this._compareEndPoint(this.startContainer,this.startOffset,this.endContainer,this.endOffset)!=-1)&&this.collapse(true); -this._updateRangeInfo()},setStartAfter:function(a){if(!a)throw Error("INVALID_NODE_TYPE_ERR in setStartAfter");a.tagName=="BODY"?this.setStart(a,xe.DOMFix.childNodes(a).length):this.setStart(xe.DOMFix.parentNode(a),this._getPosIdx(a)+1)},setStartBefore:function(a){if(!a)throw Error("INVALID_NODE_TYPE_ERR in setStartBefore");a.tagName=="BODY"?this.setStart(a,0):this.setStart(xe.DOMFix.parentNode(a),this._getPosIdx(a))},surroundContents:function(a){a.appendChild(this.extractContents());this.insertNode(a); -this.selectNode(a)},toString:function(){var a=this._document.createElement("DIV");a.appendChild(this.cloneContents());return a.textContent||a.innerText||""},_isBlankTextNode:function(a){return a.nodeType==3&&a.nodeValue==""?true:false},_getPosIdx:function(a){for(var b=0,a=a.previousSibling;a;a=a.previousSibling)b++;return b},_updateRangeInfo:function(){this.startContainer?(this.collapsed=this._isCollapsed(this.startContainer,this.startOffset,this.endContainer,this.endOffset),this.commonAncestorContainer= -this._getCommonAncestorContainer(this.startContainer,this.endContainer)):this.init(this._document)},_isCollapsed:function(a,b,d,c){var e=false;if(a==d&&b==c)e=true;else if(a=this._getActualStartNode(a,b),d=this._getActualEndNode(d,c),a=this._getNextNode(this._getPrevNode(a)),d=this._getPrevNode(this._getNextNode(d)),a&&d&&d.tagName!="BODY"&&(this._getNextNode(d)==a||d==a&&this._isBlankTextNode(d)))e=true;return e},_splitTextEndNodesOfTheRange:function(){var a=this._splitTextEndNodes({oStartContainer:this.startContainer, -iStartOffset:this.startOffset,oEndContainer:this.endContainer,iEndOffset:this.endOffset});this.startContainer=a.oStartContainer;this.startOffset=a.iStartOffset;this.endContainer=a.oEndContainer;this.endOffset=a.iEndOffset},_splitTextEndNodes:function(a){a=this._splitStartTextNode(a);return a=this._splitEndTextNode(a)},_splitStartTextNode:function(a){var b=a.oStartContainer,d=a.iStartOffset,c=a.oEndContainer,e=a.iEndOffset;if(!b)return a;if(b.nodeType!=3)return a;if(d==0)return a;if(b.nodeValue.length<= -d)return a;a=b.splitText(d);b==c&&(e-=d,c=a);return{oStartContainer:a,iStartOffset:0,oEndContainer:c,iEndOffset:e}},_splitEndTextNode:function(a){var b=a.oStartContainer,d=a.iStartOffset,c=a.oEndContainer,e=a.iEndOffset;if(!c)return a;if(c.nodeType!=3)return a;if(e>=c.nodeValue.length)return a;if(e==0)return a;c.splitText(e);return{oStartContainer:b,iStartOffset:d,oEndContainer:c,iEndOffset:e}},_getNodesInRange:function(){if(this.collapsed)return[];var a=this._getActualStartNode(this.startContainer, -this.startOffset),b=this._getActualEndNode(this.endContainer,this.endOffset);return this._getNodesBetween(a,b)},_getActualStartNode:function(a,b){var d=a;a.nodeType==3?b>=a.nodeValue.length?(d=this._getNextNode(a),d.tagName=="BODY"&&(d=null)):d=a:b=this.startContainer.nodeValue.length?this._getNextNode(this.startContainer):this.startContainer:this.startOffset>=xe.DOMFix.childNodes(this.startContainer).length? -this._getNextNode(this.startContainer):xe.DOMFix.childNodes(this.startContainer)[this.startOffset]},getEndNode:function(){return this.collapsed?this.getStartNode():this.endContainer.nodeType==3?this.endOffset==0?this._getPrevNode(this.endContainer):this.endContainer:this.endOffset==0?this._getPrevNode(this.endContainer):xe.DOMFix.childNodes(this.endContainer)[this.endOffset-1]},getNodeAroundRange:function(a,b){if(this.collapsed&&this.startContainer&&this.startContainer.nodeType==3)return this.startContainer; -if(!this.collapsed||this.startContainer&&this.startContainer.nodeType==3)return this.getStartNode();var d,c,e;c=this.startOffset>=xe.DOMFix.childNodes(this.startContainer).length?this._getNextNode(this.startContainer):xe.DOMFix.childNodes(this.startContainer)[this.startOffset];d=this.endOffset==0?this._getPrevNode(this.endContainer):xe.DOMFix.childNodes(this.endContainer)[this.endOffset-1];a?(e=d,!e&&!b&&(e=c)):(e=c,!e&&!b&&(e=d));return e},_getXPath:function(a){for(var b="";a&&a.nodeType==1;)b="/"+ -a.tagName+"["+this._getPosIdx4XPath(a)+"]"+b,a=xe.DOMFix.parentNode(a);return b},_getPosIdx4XPath:function(a){for(var b=0,d=a.previousSibling;d;d=d.previousSibling)d.tagName==a.tagName&&b++;return b},_evaluateXPath:function(a,b){for(var a=a.substring(1,a.length-1),d=a.split(/\//),c=b.body,e=2;e-1&&a){for(var c=xe.DOMFix.childNodes(a),e=null;(e=c[b])&&e.nodeType==3&&e.nodeValue.length=0?true:bIncludePartlyIncluded?d==1?false:c==-1?false:true:false},isNodeInRange:function(a,b,d){var c=new xe.XpressRange(this._window);d&&a.firstChild?(c.setStartBefore(a.firstChild),c.setEndAfter(a.lastChild)): -c.selectNode(a);return isRangeInRange(c,b)},pasteHTML:function(a){if(a=="")this.deleteContents();else{var b=this._document.createElement("DIV");b.innerHTML=a;for(var a=b.firstChild,d=b.lastChild,c=this.cloneRange(),e=c.placeStringBookmark();b.lastChild;)this.insertNode(b.lastChild);this.setEndNodes(a,d);c.moveToBookmark(e);c.deleteContents();c.removeStringBookmark(e)}},toString:function(){this.toString=xe.W3CDOMRange.prototype.toString;return this.toString()},toHTMLString:function(){var a=this._document.createElement("DIV"); -a.appendChild(this.cloneContents());return a.innerHTML},findAncestorByTagName:function(a){for(var b=this.commonAncestorContainer;b&&b.tagName!=a;)b=xe.DOMFix.parentNode(b);return b},selectNodeContents:function(a){if(a){var b=a.firstChild?a.firstChild:a,a=a.lastChild?a.lastChild:a;b.nodeType==3?this.setStart(b,0):this.setStartBefore(b);a.nodeType==3?this.setEnd(a,a.nodeValue.length):this.setEndAfter(a)}},styleRange:function(a,b,d){d=this._getStyleParentNodes(d);if(!(d.length<1)){for(var f,e,g=0;g< -d.length;g++){for(var h in a)f=h,e=a[f],typeof e=="string"&&(d[g].style[f]=e);if(b)for(h in b)f=h,e=b[f],typeof e=="string"&&(f=="class"?c(d[g]).addClass(e):d[g].setAttribute(f,e))}this.setStartBefore(d[0]);this.setEndAfter(d[d.length-1])}},_getStyleParentNodes:function(a){this._splitTextEndNodesOfTheRange();for(var b=this.getStartNode(),d=this.getEndNode(),f=this._getNodesInRange(),e=[],g=0,h,l,j,p,n,k=f.length,m=c(f).filter(function(){return!!this.childNodes.length}),o=0;o=0||(a=this.getNodeAroundRange(false,true),b=this.getNodeAroundRange(false,true),a=this._getLineStartInfo(a),b=this._getLineEndInfo(b));return{oStart:a,oEnd:b}}}).extend(xe.W3CDOMRange);xe.SimpleSelection=function(a){this.init=function(a){this._window=a||window;this._document= -this._window.document};this.init(a);c.browser.msie?xe.SimpleSelectionImpl_IE.apply(this):xe.SimpleSelectionImpl_FF.apply(this);this.selectRange=function(a){this.selectNone();this.addRange(a)};this.selectionLoaded=true;if(!this._oSelection)this.selectionLoaded=false};xe.SimpleSelectionImpl_FF=function(){this._oSelection=this._window.getSelection();this.getRangeAt=function(a){try{var b=this._oSelection.getRangeAt(a||0)}catch(d){return new xe.W3CDOMRange(this._document)}return this._FFRange2W3CRange(b)}; -this.addRange=function(a){this._oSelection.addRange(this._W3CRange2FFRange(a))};this.selectNone=function(){this._oSelection.removeAllRanges()};this._FFRange2W3CRange=function(a){var b=new xe.W3CDOMRange(this._document);b.setStart(a.startContainer,a.startOffset);b.setEnd(a.endContainer,a.endOffset);return b};this._W3CRange2FFRange=function(a){var b=this._document.createRange();b.setStart(a.startContainer,a.startOffset);b.setEnd(a.endContainer,a.endOffset);return b}};xe.SimpleSelectionImpl_IE=function(){this._oSelection= -this._document.selection;this.getRangeAt=function(a){a=a||0;if(this._oSelection.type=="Control"){var b=new xe.W3CDOMRange(this._document),d=this._oSelection.createRange().item(a);if(!d||d.ownerDocument!=this._document)return b;b.selectNode(d);return b}else{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;a.nodeType==3?(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=true,k=0;k=0)break;c=g[h]}if(h!=0&&g[h-1].nodeType==3){g=this._document.body.createTextRange();e=null;c?(g.moveToElementText(c),g.collapse(false),e=c.nextSibling):(g.moveToElementText(d),g.collapse(true),e=d.firstChild);d=a.duplicate();d.setEndPoint("StartToStart",g);for(c=d.text.length;c>e.nodeValue.length&&e.nextSibling;)c-=e.nodeValue.length,e=e.nextSibling;if(b&&e.nextSibling&&e.nextSibling.nodeType==3&&c==e.nodeValue.length)c-=e.nodeValue.length,e=e.nextSibling; -d=e}else d=a.parentElement(),c=h;return{oContainer:d,iOffset:c}}};xe.DOMFix=new (c.Class({$init:function(){c.browser.msie||c.browser.opera?(this.childNodes=this._childNodes_Fix,this.parentNode=this._parentNode_Fix):(this.childNodes=this._childNodes_Native,this.parentNode=this._parentNode_Native)},_parentNode_Native:function(a){return a.parentNode},_parentNode_Fix:function(a){if(!a)return a;for(;a.previousSibling;)a=a.previousSibling;return a.parentNode},_childNodes_Native:function(a){return a.childNodes}, -_childNodes_Fix:function(a){var b=null,d=0;if(a){b=[];for(a=a.firstChild;a;)b[d++]=a,a=a.nextSibling}return b}}));xe.DraggableLayer=c.Class({$init:function(a,b){this.oOptions=c.extend({bModal:"false",oHandle:a,iMinX:-999999,iMinY:-999999,iMaxX:999999,iMaxY:999999},b);this.oHandle=this.oOptions.oHandle;a.style.display="block";a.style.position="absolute";a.style.zIndex="9999";this.aBasePosition=this.getBaseOffset(a);a.style.top=this.toInt(c(a).offset().top)-this.aBasePosition.top+"px";a.style.left= -this.toInt(c(a).offset().left)-this.aBasePosition.left+"px";this.$FnMouseDown=c.fnBind(this._mousedown,this,a);this.$FnMouseMove=c.fnBind(this._mousemove,this,a);this.$FnMouseUp=c.fnBind(this._mouseup,this,a);c(this.oHandle).bind("mousedown",this.$FnMouseDown)},_mousedown:function(a,b){if(b.target.tagName!="INPUT")this.MouseOffsetY=b.pageY-this.toInt(a.style.top)-this.aBasePosition.top,this.MouseOffsetX=b.pageX-this.toInt(a.style.left)-this.aBasePosition.left,c(a).bind("mousemove",this.$FnMouseMove), -c(a).bind("mouseup",this.$FnMouseUp)},_mousemove:function(a,b){var d=b.pageY-this.MouseOffsetY-this.aBasePosition.top,c=b.pageX-this.MouseOffsetX-this.aBasePosition.left;if(dthis.oOptions.iMaxY)d=this.oOptions.iMaxY;if(cthis.oOptions.iMaxX)c=this.oOptions.iMaxX;a.style.top=d+"px";a.style.left=c+"px"},_mouseup:function(a){c(a).unbind("mousemove",this.$FnMouseMove);c(a).unbind("mouseup",this.$FnMouseUp)}, -toInt:function(a){return parseInt(a)||0},findNonStatic:function(a){return!a?null:a.tagName=="BODY"?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,true)},$ON_ENABLE_COMMAND:function(a){this.oApp.disableCommand(a,false)},$ON_EXEC_ON_READY_FUNCTION:function(){typeof this.funcOnReady=="function"&&this.funcOnReady()}});xe.Utils=c.Class({name:"Utils",$init:function(){if(c.browser.msie&&c.browser.nVersion==6)try{document.execCommand("BackgroundImageCache",false,true)}catch(a){}},$ON_ATTACH_HOVER_EVENTS:function(a, -b){b=b||"hover";a&&c(a).hover(function(){c(this).addClass(b)},function(){c(this).removeClass(b)})}});xe.XpressRangeManager=c.Class({name:"XpressRangeManager",oWindow:null,$init:function(a){this.oWindow=a||window},$BEFORE_MSG_APP_READY:function(){if(this.oWindow&&this.oWindow.tagName=="IFRAME")this.oWindow=this.oWindow.contentWindow;this.oApp.exec("ADD_APP_PROPERTY",["getSelection",c.fnBind(this.getSelection,this)]);this.oApp.exec("ADD_APP_PROPERTY",["getEmptySelection",c.fnBind(this.getEmptySelection, -this)])},$ON_SET_EDITING_WINDOW:function(a){this.oWindow=a},getEmptySelection:function(){return new xe.XpressRange(this.oWindow)},getSelection:function(){this.oApp.exec("RESTORE_IE_SELECTION",[]);var a=this.getEmptySelection();try{a.setFromSelection()}catch(b){}return a}});xe.Hotkey=c.Class({name:"Hotkey",storage:{},keyhash:{},$init:function(){this.storage={};this.keyhash={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,meta:224,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,left:37,up:38, -right:39,down:40,del:46,comma:188,period:190,slash:191,hyphen:109,equal:61};if(c.browser.msie||c.browser.safari)this.keyhash.hyphen=189,this.keyhash.equal=187,this.keyhash.meta=91},$ON_MSG_APP_READY:function(){c(this.oApp.getWYSIWYGDocument()||document).keydown(c.fnBind(this.keydown,this))},$ON_REGISTER_HOTKEY:function(a,b,d){d||(d=[]);b=c.fnBind(this.oApp.exec,this.oApp,b,d);a=this.normalize(a);if(!a)return false;this.add(a,b)},add:function(a,b){typeof this.storage[a]=="undefined"?this.storage[a]= -[b]:this.storage[a].push(b)},keydown:function(a){var b=[],d=this.keyhash;if(!(c.inArray(a.keyCode,[d.shift,d.ctrl,d.alt,d.meta])>=0)&&(a.shiftKey&&b.push("shift"),a.altKey&&b.push("alt"),a.ctrlKey&&b.push("ctrl"),a.metaKey&&b.push("meta"),b.length&&(b.length==1&&a.metaKey&&(b=["ctrl","meta"]),b.push(a.keyCode),b=b.join("+"),this.storage[b])))return c.each(this.storage[b],function(){this()}),false},normalize:function(a){var b,d,f,e,g,a=(a||"").toLowerCase().split("+");b=d=f=e=g=false;c.each(a,function(){var a= -""+this;switch(a){case "shift":b=true;case "alt":f=true;case "ctrl":d=true;case "meta":e=true;default:g=a}});if(!g)return"";a=[];b&&a.push("shift");f&&a.push("alt");d&&a.push("ctrl");(e||d&&!b&&!f)&&a.push("meta");a.push(this.keyhash[g]||g.toUpperCase().charCodeAt(0));return a.join("+")}});xe.DialogLayerManager=c.Class({name:"DialogLayerManager",aMadeDraggable:null,aOpenedLayers:null,$init:function(){this.aMadeDraggable=[];this.aOpenedLayers=[]},$ON_SHOW_DIALOG_LAYER:function(a,b){a=c.$(a);b=c.$(b)|| -false;if(a&&c.inArray(a,this.aOpenedLayers)==-1)this.oApp.exec("POSITION_DIALOG_LAYER",[a]),this.aOpenedLayers[this.aOpenedLayers.length]=a,c.inArray(a,this.aMadeDraggable)==-1?(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;a>= -0;a--)this.oApp.exec("HIDE_DIALOG_LAYER",[this.aOpenedLayers[a]])},$ON_HIDE_DIALOG_LAYER:function(a){if(a=c.$(a))a.style.display="none";this.aOpenedLayers=c.grep(this.aOpenedLayers,function(b){return b!=a})},$ON_SET_DIALOG_LAYER_POSITION:function(a,b,d){a.style.top=b;a.style.left=d}});xe.ActiveLayerManager=c.Class({name:"ActiveLayerManager",oCurrentLayer:null,$ON_TOGGLE_ACTIVE_LAYER:function(a,b,d,c,e){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;if(a)a.style.display="none",this.oCurrentLayer=null,this.sOnCloseCmd&&this.oApp.exec(this.sOnCloseCmd,this.aOnCloseParam)},$ON_HIDE_CURRENT_ACTIVE_LAYER:function(){this.oApp.exec("HIDE_ACTIVE_LAYER",[])},$ON_EVENT_EDITING_AREA_KEYDOWN:function(){this.oApp.exec("HIDE_ACTIVE_LAYER", -[])},$ON_EVENT_EDITING_AREA_MOUSEDOWN:function(){this.oApp.exec("HIDE_ACTIVE_LAYER",[])}});xe.StringConverterManager=c.Class({name:"StringConverterManager",oConverters:null,$init:function(){this.oConverters={}},$BEFORE_MSG_APP_READY:function(){this.oApp.exec("ADD_APP_PROPERTY",["applyConverter",c.fnBind(this.applyConverter,this)]);this.oApp.exec("ADD_APP_PROPERTY",["addConverter",c.fnBind(this.addConverter,this)])},applyConverter:function(a,b){var d=this.oConverters[a];if(!d)return b;for(var c=0;c< -d.length;c++)b=d[c](b);return b},addConverter:function(a,b){this.oConverters[a]||(this.oConverters[a]=[]);this.oConverters[a][this.oConverters[a].length]=b}});xe.MessageManager=c.Class({name:"MessageManager",oMessageMap:null,$init:function(a){this.oMessageMap=a},$BEFORE_MSG_APP_READY:function(){this.oApp.exec("ADD_APP_PROPERTY",["$MSG",c.fnBind(this.getMessage,this)])},getMessage:function(a){return this.oMessageMap[a]?unescape(this.oMessageMap[a]):a}});xe.XE_Toolbar=c.Class({name:"XE_Toolbar",toolbarArea:null, -toolbarButton:null,uiNameTag:"uiName",sUIClassPrefix:"xpress_xeditor_ui_",aUICmdMap:null,$init:function(a){this.htUIList={};this.aUICmdMap={};this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){a=c.$(a)||document;this.toolbarArea=c(".tool",a).get(0);this.welToolbarArea=c(this.toolbarArea);this.aAllButtons=c("BUTTON",this.toolbarArea).get();for(var a=this.toolbarArea.getElementsByTagName("LI"),b=a.length,d=RegExp(this.sUIClassPrefix+"([^ ]+)"),f=0;f*:first-child",a[f]).get(0))}},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.toolbarArea,"mouseover","EVENT_TOOLBAR_MOUSEOVER",[]);this.oApp.registerBrowserEvent(this.toolbarArea,"mouseout","EVENT_TOOLBAR_MOUSEOUT",[]);this.oApp.exec("ADD_APP_PROPERTY",["getToolbarButtonByUIName",c.fnBind(this.getToolbarButtonByUIName,this)])},$ON_EVENT_TOOLBAR_MOUSEOVER:function(a){a.target.tagName=="BUTTON"&&c(a.target).addClass("hover").parent("span").addClass("hover")}, -$ON_EVENT_TOOLBAR_MOUSEOUT:function(a){a.target.tagName=="BUTTON"&&c(a.target).removeClass("hover").parent("span").removeClass("hover")},$ON_TOGGLE_TOOLBAR_ACTIVE_LAYER:function(a,b,d,c,e,g){this.oApp.exec("TOGGLE_ACTIVE_LAYER",[a,"MSG_TOOLBAR_LAYER_SHOWN",[a,b,d,c],e,g])},$ON_MSG_TOOLBAR_LAYER_SHOWN:function(a,b,d,c){this.oApp.exec("POSITION_TOOLBAR_LAYER",[a,b]);d&&this.oApp.exec(d,c)},$ON_SHOW_TOOLBAR_ACTIVE_LAYER:function(a,b,d,c){this.oApp.exec("SHOW_ACTIVE_LAYER",[a,b,d]);this.oApp.exec("POSITION_TOOLBAR_LAYER", -[a,c])},$ON_ENABLE_UI:function(a){var b=this.htUIList[a];if(b&&(c(b).removeClass("off"),b.disabled=false,b="",this.aUICmdMap[a]))for(var d=0;df)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:false,$init:function(a,b,d,f,e){this.sInitialMode=a;this.oIRField=c.$(b);this._assignHTMLObjects(e);this.fOnBeforeUnload=f;this.oEditingMode={};this.elEditingAreaContainer.style.height=parseInt(d.nHeight||this.elEditingAreaContainer.offsetHeight)+"px";this.nMinHeight=d.nMinHeight||10;this.niMinWidth=d.nMinWidth||10},_assignHTMLObjects:function(a){a= -c.$(a)||document;this.elEditingAreaContainer=c("DIV.xpress_xeditor_editing_area_container",a).get(0);this.elEditingAreaSkipUI=c("A.skip",a).get(0)},$BEFORE_MSG_APP_READY:function(){this.oApp.exec("ADD_APP_PROPERTY",["elEditingAreaContainer",this.elEditingAreaContainer]);this.oApp.exec("ADD_APP_PROPERTY",["getIR",c.fnBind(this.getIR,this)]);this.oApp.exec("ADD_APP_PROPERTY",["setIR",this.setIR]);this.oApp.exec("ADD_APP_PROPERTY",["getEditingMode",c.fnBind(this.getEditingMode,this)])},$ON_MSG_APP_READY:function(){this.oApp.exec("CHANGE_EDITING_MODE", -[this.sInitialMode,true]);this.oApp.exec("LOAD_IR_FIELD",[false]);this.oApp.registerBrowserEvent(this.elEditingAreaSkipUI,"focus","MSG_EDITING_AREA_SIZE_CHANGED",[],50);this.oApp.registerBrowserEvent(this.elEditingAreaSkipUI,"blur","MSG_EDITING_AREA_SIZE_CHANGED",[],50)},$AFTER_MSG_APP_READY:function(){this.oApp.exec("UPDATE_IR_FIELD",[])},$ON_LOAD_IR_FIELD:function(a){this.oApp.setIR(this.oIRField.value,a)},$ON_UPDATE_IR_FIELD:function(){this.oIRField.value=this.oApp.getIR()},$BEFORE_CHANGE_EDITING_MODE:function(a){this._oPrevActivePlugin= -this.oActivePlugin;this.oActivePlugin=this.oEditingMode[a]},$AFTER_CHANGE_EDITING_MODE:function(a,b){this._oPrevActivePlugin&&(this.oApp.exec("SET_IR",[this._oPrevActivePlugin.getIR()]),this.oApp.exec("ENABLE_UI",[this._oPrevActivePlugin.sMode]),this._setEditingAreaDimension());this.oApp.exec("DISABLE_UI",[this.oActivePlugin.sMode]);b||this.oApp.exec("FOCUS",[])},$ON_SET_IS_DIRTY:function(a){this.bIsDirty=a},$ON_FOCUS:function(){this.oActivePlugin&&typeof this.oActivePlugin.setIR=="function"&&this.oActivePlugin.focus()}, -$BEFORE_SET_IR:function(a,b){b||this.oApp.exec("RECORD_UNDO_ACTION",["SET CONTENTS"])},$ON_SET_IR:function(a){this.oActivePlugin&&typeof this.oActivePlugin.setIR=="function"&&this.oActivePlugin.setIR(a)},$AFTER_SET_IR:function(a,b){b||this.oApp.exec("RECORD_UNDO_ACTION",["SET CONTENTS"])},$ON_REGISTER_EDITING_AREA:function(a){this.oEditingMode[a.sMode]=a;this.attachDocumentEvents(a.oEditingArea)},$ON_MSG_EDITING_AREA_RESIZE_STARTED:function(){this.oActivePlugin.elEditingArea.style.display="none"; -this.iStartingHeight=parseInt(this.elEditingAreaContainer.style.height)},$ON_RESIZE_EDITING_AREA:function(a,b){var d=parseInt(a),c=parseInt(b);if(d"]);break;default:return}a.preventDefault();a.stopPropagation()}},$ON_EVENT_EDITING_AREA_KEYUP:function(a){a.keyCode==229||a.keyCode==13||a.altKey||a.ctrlKey||a.keyCode>=33&&a.keyCode<=40||a.keyCode==16||this._recordUndo(a)},$ON_PASTE_HTML:function(a,b){if(this.oApp.getEditingMode()==this.sMode){var d=b||this.oApp.getSelection();d.pasteHTML(a);if(!c.browser.msie){var f=d.placeStringBookmark();this.oApp.getWYSIWYGDocument().body.innerHTML=this.oApp.getWYSIWYGDocument().body.innerHTML; -d.moveToBookmark(f);d.collapseToEnd();d.select();d.removeStringBookmark(f)}this.oApp.exec("RECORD_UNDO_ACTION",["INSERT HTML"])}},$AFTER_MSG_EDITING_AREA_RESIZE_ENDED:function(){this.oApp.exec("REFRESH_WYSIWYG",[])},$ON_RESTORE_IE_SELECTION:function(){if(this._oIERange)this._oIERange.select(),this._oPrevIERange=this._oIERange,this._oIERange=null},initIframe:function(){try{this.doc=this.iframe.contentWindow.document;if(this.doc==null||this.doc.location.href=="about:blank")throw Error("Access denied"); -this._enableWYSIWYG();this.status=xe.PLUGIN_STATUS.READY}catch(a){if(this._nIFrameReadyCount-- >0)setTimeout(c.fnBind(this.initIframe,this),100);else throw"iframe for WYSIWYG editing mode can't be initialized. Please check if the iframe document exists and is also accessable(cross-domain issues). ";}},getIR:function(){var a=this.doc.body.innerHTML;return this.oApp.applyConverter?this.oApp.applyConverter(this.sMode+"_TO_IR",a):a},setIR:function(a){this.doc.body.innerHTML=this.oApp.applyConverter?this.oApp.applyConverter("IR_TO_"+ -this.sMode,a):a;if(c.browser.mozilla&&this.doc.body.innerHTML=="")this.doc.body.innerHTML="
    "},getWindow:function(){return this.iframe.contentWindow},getDocument:function(){return this.iframe.contentWindow.document},focus:function(){},_recordUndo:function(a){if(!(new Date-this.iLastUndoRecorded";if(e.innerHTML=="")e.innerHTML="
    ";e.nextSibling&&e.nextSibling.tagName=="BR"&&e.parentNode.removeChild(e.nextSibling);b.selectNodeContents(e);b.collapseToStart();b.select();this.oApp.exec("CHECK_STYLE_CHANGE",[])}else b.removeStringBookmark(d)}}});xe.XE_WYSIWYGStyler=c.Class({name:"XE_WYSIWYGStyler",$PRECONDITION:function(){return this.oApp.getEditingMode()=="WYSIWYG"},$ON_SET_WYSIWYG_STYLE:function(a){var b=this.oApp.getSelection();if(b.collapsed){var d=this.oApp.getWYSIWYGDocument().createElement("SPAN"); -b.insertNode(d);d.innerHTML=unescape("%uFEFF");var f,e;for(e in a)f=a[e],typeof f=="string"&&(d.style[e]=f);b.selectNodeContents(d);b.collapseToEnd();b._window.focus();b._window.document.body.focus();b.select();if(c.browser.mozilla&&c.browser.nVersion==3)d.innerHTML=""}else this.oApp.exec("RECORD_UNDO_BEFORE_ACTION",["FONT STYLE"]),b.styleRange(a),b._window.focus(),b.select(),this.oApp.exec("RECORD_UNDO_AFTER_ACTION",["FONT STYLE"])}});xe.XE_WYSIWYGStyleGetter=c.Class({name:"XE_WYSIWYGStyleGetter", -hKeyUp:null,getStyleInterval:200,oStyleMap:{fontFamily:{type:"Value",css:"fontFamily"},fontSize:{type:"Value",css:"fontSize"},lineHeight:{type:"Value",css:"lineHeight",converter:function(a,b){return!a.match(/px$/)?a:Math.ceil(parseInt(a)/parseInt(b.fontSize)*10)/10}},bold:{command:"bold"},underline:{command:"underline"},italic:{command:"italic"},lineThrough:{command:"strikethrough"},superscript:{command:"superscript"},subscript:{command:"subscript"},justifyleft:{command:"justifyleft"},justifycenter:{command:"justifycenter"}, -justifyright:{command:"justifyright"},justifyfull:{command:"justifyfull"},orderedlist:{command:"insertorderedlist"},unorderedlist:{command:"insertunorderedlist"}},$init:function(){this.oStyle=this._getBlankStyle()},$PRECONDITION:function(){return this.oApp.getEditingMode()!="WYSIWYG"?false:true},$ON_MSG_APP_READY:function(){this.oDocument=this.oApp.getWYSIWYGDocument();this.oApp.exec("ADD_APP_PROPERTY",["getCurrentStyle",c.fnBind(this.getCurrentStyle,this)])},$ON_EVENT_EDITING_AREA_MOUSEUP:function(){this.hKeyUp&& -clearTimeout(this.hKeyUp);this.oApp.exec("CHECK_STYLE_CHANGE",[])},$ON_EVENT_EDITING_AREA_KEYUP:function(a){if(a.keyCode==8||a.keyCode>=33&&a.keyCode<=40||a.keyCode==45||a.keyCode==46)this.hKeyUp&&clearTimeout(this.hKeyUp),this.hKeyUp=setTimeout(c.fnBind(this.oApp.exec,this.oApp,"CHECK_STYLE_CHANGE",[]),this.getStyleInterval)},$ON_CHECK_STYLE_CHANGE:function(){this._getStyle()},$ON_RESET_STYLE_STATUS:function(){var a=this._getBlankStyle(),b;for(b in a)this.oApp.exec("SET_STYLE_STATUS",[b,a[b]])}, -getCurrentStyle:function(){return this.oStyle},_check_style_change:function(){this.oApp.exec("CHECK_STYLE_CHANGE",[])},_getBlankStyle:function(){var a={},b;for(b in this.oStyleMap)a[b]=this.oStyleMap[b].type=="Value"?"":0;return a},_getStyle:function(){var a=this.oApp.getSelection(),b=a.getNodes(false,function(a){return!a.childNodes||a.childNodes.length==0?true:false}),d,a=b.length==0?this._getStyleOf(a.commonAncestorContainer):this._getStyleOf(b[0]);for(d in a)this.oStyleMap[d].converter&&(a[d]= -this.oStyleMap[d].converter(a[d],a)),this.oStyle[d]!=a[d]&&this.oApp.exec("MSG_STYLE_CHANGED",[d,a[d]]);this.oStyle=a},_getStyleOf:function(a){var b=this._getBlankStyle();if(!a)return b;if(a.nodeType==3)a=a.parentNode;var a=c(a),d,f;for(f in this.oStyle)if(d=this.oStyleMap[f],d.type&&d.type=="Value")if(d.css)d=a.css(d.css),f=="fontFamily"&&(d=d.split(/,/)[0]),b[f]=d;else{if(d.command)try{b[f]=this.oDocument.queryCommandState(d.command)}catch(e){}}else if(d.command)try{b[f]=this.oDocument.queryCommandState(d.command)? -1:0}catch(g){}return b}});xe.XE_FontSizeWithSelectUI=c.Class({name:"XE_FontSizeWithSelectUI",$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elFontSizeSelect=c("SELECT.xpress_xeditor_ui_fontSize_select",a).get(0)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elFontSizeSelect,"change","SET_FONTSIZE_FROM_SELECT_UI");this.elFontSizeSelect.selectedIndex=0},$ON_MSG_STYLE_CHANGED:function(a,b){if(a=="fontSize"&&(this.elFontSizeSelect.value=b,this.elFontSizeSelect.selectedIndex< -0))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(a=="fontFamily"&&(this.elFontNameSelect.value=b.toLowerCase(),this.elFontNameSelect.selectedIndex<0))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(false),b,d,f;if(a.length==0)return-1;var e=a.length;e==0?f=-1:(d=this._getLineWrapper(a[0]),f=this._getWrapperLineheight(d));var g=this.oSelection.getStartNode();if(f>0)for(var h=1;h=0;g--)if(e[g].nodeType==3||e[g].tagName=="BR"){for(var h=d._document.createElement("P"),c=e[g].nextSibling;g>=0&&e[g]&&(e[g].nodeType==3||e[g].tagName=="BR");)h.insertBefore(e[g--],h.firstChild);oFormattingNode.insertBefore(h,c);g++}if(oFormattingNode&&oFormattingNode.parentNode)h=d._document.createElement("P"),h.innerHTML=unescape("
    "),oFormattingNode.parentNode.insertBefore(h,oFormattingNode.nextSibling); -this.oApp.exec("RECORD_UNDO_ACTION",["Block Quote"]);return oFormattingNode},_expandToTableStart:function(a,b){for(var c=a.commonAncestorContainer,f=null,e=false;b&&!e;){b==c&&(e=true);if(/TBODY|TFOOT|THEAD|TR/i.test(b.tagName)){f=this._getTableRoot(b);break}b=b.parentNode}return f},_getTableRoot:function(a){for(;a&&a.tagName!="TABLE";)a=a.parentNode;return a}});xe.XE_SCharacter=c.Class({name:"XE_SCharacter",$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, +this.startOffset,b.endContainer,b.endOffset)}},_findBody:function(a){if(!a)return null;for(;a;){if("BODY"==a.tagName)return a;a=xe.DOMFix.parentNode(a)}return null},_compareEndPoint:function(a,b,d,f){if(!a||this._findBody(a)!=this._document.body)a=this._document.body,b=0;if(!d||this._findBody(d)!=this._document.body)d=this._document.body,f=0;var c=this._getCommonAncestorContainer(a,d);if(a!=c){for(;(oTmpNode=xe.DOMFix.parentNode(a))!=c;)a=oTmpNode;b=this._getPosIdx(a)+0.5}if(d!=c){for(;(oTmpNode= +xe.DOMFix.parentNode(d))!=c;)d=oTmpNode;f=this._getPosIdx(d)+0.5}-1==f&&(f=b+1);return ba.length)){for(var b=a[0].previousSibling;b&&this._isBlankTextNode(b);)b=b.previousSibling;var d,f;b||(d=xe.DOMFix.parentNode(a[0]), +f=0);for(var c=0;ca.nodeValue.length)b=a.nodeValue.length}else if(b>xe.DOMFix.childNodes(a).length)b=xe.DOMFix.childNodes(a).length;return b},setEnd:function(a,b){b=this._endsNodeValidation(a,b);this.endContainer=a;this.endOffset=b;(!this.startContainer||-1!=this._compareEndPoint(this.startContainer,this.startOffset,this.endContainer,this.endOffset))&&this.collapse(!1);this._updateRangeInfo()},setEndAfter:function(a){if(!a)throw Error("INVALID_NODE_TYPE_ERR in setEndAfter");"BODY"==a.tagName? +this.setEnd(a,xe.DOMFix.childNodes(a).length):this.setEnd(xe.DOMFix.parentNode(a),this._getPosIdx(a)+1)},setEndBefore:function(a){if(!a)throw Error("INVALID_NODE_TYPE_ERR in setEndBefore");"BODY"==a.tagName?this.setEnd(a,0):this.setEnd(xe.DOMFix.parentNode(a),this._getPosIdx(a))},setStart:function(a,b){b=this._endsNodeValidation(a,b);this.startContainer=a;this.startOffset=b;(!this.endContainer||-1!=this._compareEndPoint(this.startContainer,this.startOffset,this.endContainer,this.endOffset))&&this.collapse(!0); +this._updateRangeInfo()},setStartAfter:function(a){if(!a)throw Error("INVALID_NODE_TYPE_ERR in setStartAfter");"BODY"==a.tagName?this.setStart(a,xe.DOMFix.childNodes(a).length):this.setStart(xe.DOMFix.parentNode(a),this._getPosIdx(a)+1)},setStartBefore:function(a){if(!a)throw Error("INVALID_NODE_TYPE_ERR in setStartBefore");"BODY"==a.tagName?this.setStart(a,0):this.setStart(xe.DOMFix.parentNode(a),this._getPosIdx(a))},surroundContents:function(a){a.appendChild(this.extractContents());this.insertNode(a); +this.selectNode(a)},toString:function(){var a=this._document.createElement("DIV");a.appendChild(this.cloneContents());return a.textContent||a.innerText||""},_isBlankTextNode:function(a){return 3==a.nodeType&&""==a.nodeValue?!0:!1},_getPosIdx:function(a){for(var b=0,a=a.previousSibling;a;a=a.previousSibling)b++;return b},_updateRangeInfo:function(){this.startContainer?(this.collapsed=this._isCollapsed(this.startContainer,this.startOffset,this.endContainer,this.endOffset),this.commonAncestorContainer= +this._getCommonAncestorContainer(this.startContainer,this.endContainer)):this.init(this._document)},_isCollapsed:function(a,b,d,f){var c=!1;if(a==d&&b==f)c=!0;else if(a=this._getActualStartNode(a,b),d=this._getActualEndNode(d,f),a=this._getNextNode(this._getPrevNode(a)),d=this._getPrevNode(this._getNextNode(d)),a&&d&&"BODY"!=d.tagName&&(this._getNextNode(d)==a||d==a&&this._isBlankTextNode(d)))c=!0;return c},_splitTextEndNodesOfTheRange:function(){var a=this._splitTextEndNodes({oStartContainer:this.startContainer, +iStartOffset:this.startOffset,oEndContainer:this.endContainer,iEndOffset:this.endOffset});this.startContainer=a.oStartContainer;this.startOffset=a.iStartOffset;this.endContainer=a.oEndContainer;this.endOffset=a.iEndOffset},_splitTextEndNodes:function(a){a=this._splitStartTextNode(a);return a=this._splitEndTextNode(a)},_splitStartTextNode:function(a){var b=a.oStartContainer,d=a.iStartOffset,f=a.oEndContainer,c=a.iEndOffset;if(!b)return a;if(3!=b.nodeType)return a;if(0==d)return a;if(b.nodeValue.length<= +d)return a;a=b.splitText(d);b==f&&(c-=d,f=a);return{oStartContainer:a,iStartOffset:0,oEndContainer:f,iEndOffset:c}},_splitEndTextNode:function(a){var b=a.oStartContainer,d=a.iStartOffset,c=a.oEndContainer,e=a.iEndOffset;if(!c)return a;if(3!=c.nodeType)return a;if(e>=c.nodeValue.length)return a;if(0==e)return a;c.splitText(e);return{oStartContainer:b,iStartOffset:d,oEndContainer:c,iEndOffset:e}},_getNodesInRange:function(){if(this.collapsed)return[];var a=this._getActualStartNode(this.startContainer, +this.startOffset),b=this._getActualEndNode(this.endContainer,this.endOffset);return this._getNodesBetween(a,b)},_getActualStartNode:function(a,b){var d=a;3==a.nodeType?b>=a.nodeValue.length?(d=this._getNextNode(a),"BODY"==d.tagName&&(d=null)):d=a:b=this.startContainer.nodeValue.length?this._getNextNode(this.startContainer):this.startContainer:this.startOffset>=xe.DOMFix.childNodes(this.startContainer).length?this._getNextNode(this.startContainer): +xe.DOMFix.childNodes(this.startContainer)[this.startOffset]},getEndNode:function(){return this.collapsed?this.getStartNode():3==this.endContainer.nodeType?0==this.endOffset?this._getPrevNode(this.endContainer):this.endContainer:0==this.endOffset?this._getPrevNode(this.endContainer):xe.DOMFix.childNodes(this.endContainer)[this.endOffset-1]},getNodeAroundRange:function(a,b){if(this.collapsed&&this.startContainer&&3==this.startContainer.nodeType)return this.startContainer;if(!this.collapsed||this.startContainer&& +3==this.startContainer.nodeType)return this.getStartNode();var d,c,e;c=this.startOffset>=xe.DOMFix.childNodes(this.startContainer).length?this._getNextNode(this.startContainer):xe.DOMFix.childNodes(this.startContainer)[this.startOffset];d=0==this.endOffset?this._getPrevNode(this.endContainer):xe.DOMFix.childNodes(this.endContainer)[this.endOffset-1];a?(e=d,!e&&!b&&(e=c)):(e=c,!e&&!b&&(e=d));return e},_getXPath:function(a){for(var b="";a&&1==a.nodeType;)b="/"+a.tagName+"["+this._getPosIdx4XPath(a)+ +"]"+b,a=xe.DOMFix.parentNode(a);return b},_getPosIdx4XPath:function(a){for(var b=0,d=a.previousSibling;d;d=d.previousSibling)d.tagName==a.tagName&&b++;return b},_evaluateXPath:function(a,b){for(var a=a.substring(1,a.length-1),d=a.split(/\//),c=b.body,e=2;e=b&&0<=a?!0:bIncludePartlyIncluded?1==d?!1:-1==c?!1:!0:!1},isNodeInRange:function(a,b,d){var c=new xe.XpressRange(this._window);d&&a.firstChild?(c.setStartBefore(a.firstChild),c.setEndAfter(a.lastChild)): +c.selectNode(a);return isRangeInRange(c,b)},pasteHTML:function(a){if(""==a)this.deleteContents();else{var b=this._document.createElement("DIV");b.innerHTML=a;for(var a=b.firstChild,d=b.lastChild,c=this.cloneRange(),e=c.placeStringBookmark();b.lastChild;)this.insertNode(b.lastChild);this.setEndNodes(a,d);c.moveToBookmark(e);c.deleteContents();c.removeStringBookmark(e)}},toString:function(){this.toString=xe.W3CDOMRange.prototype.toString;return this.toString()},toHTMLString:function(){var a=this._document.createElement("DIV"); +a.appendChild(this.cloneContents());return a.innerHTML},findAncestorByTagName:function(a){for(var b=this.commonAncestorContainer;b&&b.tagName!=a;)b=xe.DOMFix.parentNode(b);return b},selectNodeContents:function(a){if(a){var b=a.firstChild?a.firstChild:a,a=a.lastChild?a.lastChild:a;3==b.nodeType?this.setStart(b,0):this.setStartBefore(b);3==a.nodeType?this.setEnd(a,a.nodeValue.length):this.setEndAfter(a)}},styleRange:function(a,b,d){d=this._getStyleParentNodes(d);if(!(1>d.length)){for(var f,e,g=0;g< +d.length;g++){for(var h in a)f=h,e=a[f],"string"==typeof e&&(d[g].style[f]=e);if(b)for(h in b)f=h,e=b[f],"string"==typeof e&&("class"==f?c(d[g]).addClass(e):d[g].setAttribute(f,e))}this.setStartBefore(d[0]);this.setEndAfter(d[d.length-1])}},_getStyleParentNodes:function(a){this._splitTextEndNodesOfTheRange();for(var b=this.getStartNode(),d=this.getEndNode(),f=this._getNodesInRange(),e=[],g=0,h,l,j,p,n,k=f.length,m=c(f).filter(function(){return!!this.childNodes.length}),o=0;o=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|| +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(dthis.oOptions.iMaxY)d=this.oOptions.iMaxY;if(cthis.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, +!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)); +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; +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, +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;df)a.style.left=f-d-5+"px"}},getToolbarButtonByUIName:function(a){return this.htUIList[a]}});xe.XE_EditingAreaManager=c.Class({name:"XE_EditingAreaManager",oActivePlugin:null,oIRField:null,bIsDirty:!1,$init:function(a,b,d,f,e){this.sInitialMode=a;this.oIRField=c.$(b);this._assignHTMLObjects(e);this.fOnBeforeUnload=f;this.oEditingMode={};this.elEditingAreaContainer.style.height= +parseInt(d.nHeight||this.elEditingAreaContainer.offsetHeight)+"px";this.nMinHeight=d.nMinHeight||10;this.niMinWidth=d.nMinWidth||10},_assignHTMLObjects:function(a){a=c.$(a)||document;this.elEditingAreaContainer=c("DIV.xpress_xeditor_editing_area_container",a).get(0);this.elEditingAreaSkipUI=c("A.skip",a).get(0)},$BEFORE_MSG_APP_READY:function(){this.oApp.exec("ADD_APP_PROPERTY",["elEditingAreaContainer",this.elEditingAreaContainer]);this.oApp.exec("ADD_APP_PROPERTY",["getIR",c.fnBind(this.getIR,this)]); +this.oApp.exec("ADD_APP_PROPERTY",["setIR",this.setIR]);this.oApp.exec("ADD_APP_PROPERTY",["getEditingMode",c.fnBind(this.getEditingMode,this)])},$ON_MSG_APP_READY:function(){this.oApp.exec("CHANGE_EDITING_MODE",[this.sInitialMode,!0]);this.oApp.exec("LOAD_IR_FIELD",[!1]);this.oApp.registerBrowserEvent(this.elEditingAreaSkipUI,"focus","MSG_EDITING_AREA_SIZE_CHANGED",[],50);this.oApp.registerBrowserEvent(this.elEditingAreaSkipUI,"blur","MSG_EDITING_AREA_SIZE_CHANGED",[],50)},$AFTER_MSG_APP_READY:function(){this.oApp.exec("UPDATE_IR_FIELD", +[])},$ON_LOAD_IR_FIELD:function(a){this.oApp.setIR(this.oIRField.value,a)},$ON_UPDATE_IR_FIELD:function(){this.oIRField.value=this.oApp.getIR()},$BEFORE_CHANGE_EDITING_MODE:function(a){this._oPrevActivePlugin=this.oActivePlugin;this.oActivePlugin=this.oEditingMode[a]},$AFTER_CHANGE_EDITING_MODE:function(a,b){this._oPrevActivePlugin&&(this.oApp.exec("SET_IR",[this._oPrevActivePlugin.getIR()]),this.oApp.exec("ENABLE_UI",[this._oPrevActivePlugin.sMode]),this._setEditingAreaDimension());this.oApp.exec("DISABLE_UI", +[this.oActivePlugin.sMode]);b||this.oApp.exec("FOCUS",[])},$ON_SET_IS_DIRTY:function(a){this.bIsDirty=a},$ON_FOCUS:function(){this.oActivePlugin&&"function"==typeof this.oActivePlugin.setIR&&this.oActivePlugin.focus()},$BEFORE_SET_IR:function(a,b){b||this.oApp.exec("RECORD_UNDO_ACTION",["SET CONTENTS"])},$ON_SET_IR:function(a){this.oActivePlugin&&"function"==typeof this.oActivePlugin.setIR&&this.oActivePlugin.setIR(a)},$AFTER_SET_IR:function(a,b){b||this.oApp.exec("RECORD_UNDO_ACTION",["SET CONTENTS"])}, +$ON_REGISTER_EDITING_AREA:function(a){this.oEditingMode[a.sMode]=a;this.attachDocumentEvents(a.oEditingArea)},$ON_MSG_EDITING_AREA_RESIZE_STARTED:function(){this.oActivePlugin.elEditingArea.style.display="none";this.iStartingHeight=parseInt(this.elEditingAreaContainer.style.height)},$ON_RESIZE_EDITING_AREA:function(a,b){var d=parseInt(a),c=parseInt(b);if(d"]);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"]), +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, +"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= +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"))}}); +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", +$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, function(a){return"%u"+a}).split(" ");this.charSet[3]=unescape("3131 3132 3133 3134 3135 3136 3137 3138 3139 313A 313B 313C 313D 313E 313F 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 314A 314B 314C 314D 314E 314F 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 315A 315B 315C 315D 315E 315F 3160 3161 3162 3163 3165 3166 3167 3168 3169 316A 316B 316C 316D 316E 316F 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 317A 317B 317C 317D 317E 317F 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 318A 318B 318C 318D 318E").replace(/(\S{4})/g, @@ -140,72 +139,71 @@ function(a){return"%u"+a}).split(" ");this.charSet[4]=unescape("0391 0392 0393 0 function(a){return"%u"+a}).split(" ");this.charSet[5]=unescape("3041 3042 3043 3044 3045 3046 3047 3048 3049 304A 304B 304C 304D 304E 304F 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 305A 305B 305C 305D 305E 305F 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 306A 306B 306C 306D 306E 306F 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 307A 307B 307C 307D 307E 307F 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 308A 308B 308C 308D 308E 308F 3090 3091 3092 3093 30A1 30A2 30A3 30A4 30A5 30A6 30A7 30A8 30A9 30AA 30AB 30AC 30AD 30AE 30AF 30B0 30B1 30B2 30B3 30B4 30B5 30B6 30B7 30B8 30B9 30BA 30BB 30BC 30BD 30BE 30BF 30C0 30C1 30C2 30C3 30C4 30C5 30C6 30C7 30C8 30C9 30CA 30CB 30CC 30CD 30CE 30CF 30D0 30D1 30D2 30D3 30D4 30D5 30D6 30D7 30D8 30D9 30DA 30DB 30DC 30DD 30DE 30DF 30E0 30E1 30E2 30E3 30E4 30E5 30E6 30E7 30E8 30E9 30EA 30EB 30EC 30ED 30EE 30EF 30F0 30F1 30F2 30F3 30F4 30F5 30F6").replace(/(\S{4})/g, function(a){return"%u"+a}).split(" ")},_assignHTMLObjects:function(a){a=c.$(a)||document;this.elDropdownLayer=c("DIV.xpress_xeditor_sCharacter_layer",a).get(0);this.oTextField=c("INPUT",this.elDropdownLayer).get(0);this.oInsertButton=c("+ BUTTON",this.oTextField).get(0);this.aCloseButton=c("BUTTON.close",this.elDropdownLayer).get();this.aSCharList=c(".list",this.elDropdownLayer).get();a=c(">UL",this.elDropdownLayer).get(0);this.aLabelA=c("A",a).get()},$ON_MSG_APP_READY:function(){var a=c.fnBind(this.oApp.exec, this.oApp,"INSERT_SCHARACTERS",[this.oTextField.value]);c(this.oInsertButton).click(a,this);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 true;try{if(this.oApp.getEditingMode()!= -"WYSIWYG")return false}catch(b){return false}return true},$BEFORE_MSG_APP_READY:function(){this.oApp.exec("DO_RECORD_UNDO_HISTORY_AT",[this.oCurStateIdx,"","",null])},$ON_MSG_APP_READY:function(){this.bFF=c.browser.mozilla;this.oApp.exec("ADD_APP_PROPERTY",["getUndoHistory",c.fnBind(this.getUndoHistory,this)]);this.oApp.exec("ADD_APP_PROPERTY",["getUndoStateIdx",c.fnBind(this.getUndoStateIdx,this)]);this.oApp.exec("REGISTER_UI_EVENT",["undo","click","UNDO"]);this.oApp.exec("REGISTER_UI_EVENT",["redo", -"click","REDO"]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+z","UNDO"]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+y","REDO"])},$ON_UNDO:function(){this.oApp.exec("DO_RECORD_UNDO_HISTORY",["KEYPRESS",false,false,1]);if(this.oCurStateIdx.nIdx!=0){if(this.oCurStateIdx.nStep>0)this.oCurStateIdx.nStep--;else{var a=this.aUndoHistory[this.oCurStateIdx.nIdx];this.oCurStateIdx.nIdx--;a.nTotalSteps>1?this.oCurStateIdx.nStep=0:(a=this.aUndoHistory[this.oCurStateIdx.nIdx],this.oCurStateIdx.nStep=a.nTotalSteps-1)}this.oApp.exec("RESTORE_UNDO_HISTORY", -[this.oCurStateIdx.nIdx,this.oCurStateIdx.nStep]);this.oApp.exec("CHECK_STYLE_CHANGE",[])}},$ON_REDO:function(){if(!(this.oCurStateIdx.nIdx>=this.aUndoHistory.length)){var a=this.aUndoHistory[this.oCurStateIdx.nIdx];if(!(this.oCurStateIdx.nIdx==this.aUndoHistory.length-1&&this.oCurStateIdx.nStep>=a.nTotalSteps-1))this.oCurStateIdx.nStep"+a+"");else{var d=this.sATagMarker+Math.ceil(Math.random()*1E4);this.oApp.exec("EXECCOMMAND",a==""?["unlink"]:["createLink",false,d+a]);try{this.oSelection.setFromSelection()}catch(f){}a= -this.oApp.getWYSIWYGDocument();c(a.body.getElementsByTagName("A")).filter('[href^="'+d+'"]').attr("href",function(){var a=RegExp("^"+d.replace(/([\.\\])/g,"\\$1"),"i");b?c(this).attr("target",b):c(this).removeAttr("target");return this.href.replace(a,"")})}this.oApp.exec("HIDE_ACTIVE_LAYER");setTimeout(c.fnBind(function(){try{this.oSelection.select()}catch(a){}},this),0)},_validateURL:function(a){return/^(http|https|ftp|mailto):(?:\/\/)?((\w|-)+(?:[\.:@](\w|-))+)(?:\/|@)?([^"\?]*?)(?:\?([^\?"]*?))?$/.test(a)}, -$ON_EVENT_XE_HYPERLINK_KEYDOWN:function(a){a.keyCode==13&&(this.oApp.exec("XE_APPLY_HYPERLINK"),a.preventDefault(),a.stopPropagation())}});xe.XE_Table=c.Class({name:"XE_Table",iMinRows:1,iMaxRows:20,iMinColumns:1,iMaxColumns:10,iMinBorderWidth:1,iMaxBorderWidth:10,oSelection:null,$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){var b=null;this.elDropdownLayer=c("DIV.xpress_xeditor_table_layer",a).get(0);this.welDropdownLayer=c(this.elDropdownLayer);b=c("INPUT",this.elDropdownLayer).get(); -this.oRowInput=b[0];this.oColumnInput=b[1];this.oBorderWidthInput=b[2];this.oBorderColorInput=b[3];this.oBGColorInput=b[4];b=c("BUTTON",this.elDropdownLayer).get();this.oButton_AddRow=b[0];this.oButton_RemoveRow=b[1];this.oButton_AddColumn=b[2];this.oButton_RemoveColumn=b[3];this.oButton_IncBorderWidth=b[4];this.oButton_DecBorderWidth=b[5];this.oButton_BorderColorPreview=b[6];this.oButton_BorderColor=b[7];this.oButton_BGColorPreview=b[8];this.oButton_BGColor=b[9];this.oButton_Insert=b[10];this.oButton_Cancel= -b[11];this.oSampleTable=c("TABLE",this.elDropdownLayer).get(0)},$ON_MSG_APP_READY:function(){this.oApp.exec("REGISTER_UI_EVENT",["table","click","ST_TOGGLE_TOOLBAR_LAYER"]);this.oApp.registerBrowserEvent(this.oRowInput,"change","ST_SET_ROW_NUM",[null,0]);this.oApp.registerBrowserEvent(this.oColumnInput,"change","ST_SET_COLUMN_NUM",[null,0]);this.oApp.registerBrowserEvent(this.oBorderWidthInput,"change","ST_SET_BORDER_WIDTH",[null,0]);this.oApp.registerBrowserEvent(this.oButton_AddRow,"click","ST_ADD_ROW"); -this.oApp.registerBrowserEvent(this.oButton_RemoveRow,"click","ST_REMOVE_ROW");this.oApp.registerBrowserEvent(this.oButton_AddColumn,"click","ST_ADD_COLUMN");this.oApp.registerBrowserEvent(this.oButton_RemoveColumn,"click","ST_REMOVE_COLUMN");this.oApp.registerBrowserEvent(this.oButton_IncBorderWidth,"click","ST_INC_BORDER_WIDTH");this.oApp.registerBrowserEvent(this.oButton_DecBorderWidth,"click","ST_DEC_BORDER_WIDTH");this.oApp.registerBrowserEvent(this.oButton_BorderColorPreview,"click","ST_TOGGLE_BORDER_COLOR_LAYER"); -this.oApp.registerBrowserEvent(this.oButton_BGColorPreview,"click","ST_TOGGLE_BGCOLOR_LAYER");this.oApp.registerBrowserEvent(this.oButton_BorderColor,"click","ST_TOGGLE_BORDER_COLOR_LAYER");this.oApp.registerBrowserEvent(this.oButton_BGColor,"click","ST_TOGGLE_BGCOLOR_LAYER");this.oApp.registerBrowserEvent(this.oButton_Insert,"click","ST_INSERT_TABLE");this.oApp.registerBrowserEvent(this.oButton_Cancel,"click","ST_CLOSE");this.oApp.exec("ST_SET_BORDER_COLOR",["#CCCCCC"]);this.oApp.exec("ST_SET_BGCOLOR", -["#FFFFFF"])},$ON_ST_TOGGLE_TOOLBAR_LAYER:function(){this.oApp.exec("RECORD_UNDO_ACTION_FORCED",["KEYPRESS"]);this._showNewTable();this.oApp.exec("TOGGLE_TOOLBAR_ACTIVE_LAYER",[this.elDropdownLayer])},$ON_ST_ADD_ROW:function(){this.oApp.exec("ST_SET_ROW_NUM",[null,1])},$ON_ST_REMOVE_ROW:function(){this.oApp.exec("ST_SET_ROW_NUM",[null,-1])},$ON_ST_ADD_COLUMN:function(){this.oApp.exec("ST_SET_COLUMN_NUM",[null,1])},$ON_ST_REMOVE_COLUMN:function(){this.oApp.exec("ST_SET_COLUMN_NUM",[null,-1])},$ON_ST_SET_ROW_NUM:function(a, -b){a=a||parseInt(this.oRowInput.value);a+=b||0;if(athis.iMaxRows)a=this.iMaxRows;this.oRowInput.value=a;this._showNewTable()},$ON_ST_SET_COLUMN_NUM:function(a,b){a=a||parseInt(this.oColumnInput.value);a+=b||0;if(athis.iMaxColumns)a=this.iMaxColumns;this.oColumnInput.value=a;this._showNewTable()},$ON_ST_INSERT_TABLE:function(){this.oApp.exec("PASTE_HTML",[this._getTableString()]);this.oApp.exec("ST_CLOSE",[])},$ON_ST_CLOSE:function(){this.oApp.exec("HIDE_ACTIVE_LAYER", -[])},$ON_ST_SET_BORDER_WIDTH:function(a,b){a=a||parseInt(this.oBorderWidthInput.value);a+=b||0;if(athis.iMaxBorderWidth)a=this.iMaxBorderWidth;this.oBorderWidthInput.value=a;this._showNewTable()},$ON_ST_INC_BORDER_WIDTH:function(){this.oApp.exec("ST_SET_BORDER_WIDTH",[null,1])},$ON_ST_DEC_BORDER_WIDTH:function(){this.oApp.exec("ST_SET_BORDER_WIDTH",[null,-1])},$ON_ST_TOGGLE_BORDER_COLOR_LAYER:function(){this.welDropdownLayer.hasClass("p1")?this.oApp.exec("ST_HIDE_BORDER_COLOR_LAYER", -[]):this.oApp.exec("ST_SHOW_BORDER_COLOR_LAYER",[])},$ON_ST_SHOW_BORDER_COLOR_LAYER:function(){this.welDropdownLayer.addClass("p1");this.welDropdownLayer.removeClass("p2");this.oApp.exec("SHOW_COLOR_PALETTE",["ST_SET_BORDER_COLOR_FROM_PALETTE",this.elDropdownLayer])},$ON_ST_HIDE_BORDER_COLOR_LAYER:function(){this.welDropdownLayer.removeClass("p1");this.oApp.exec("HIDE_COLOR_PALETTE",[])},$ON_ST_TOGGLE_BGCOLOR_LAYER:function(){this.welDropdownLayer.hasClass("p2")?this.oApp.exec("ST_HIDE_BGCOLOR_LAYER", -[]):this.oApp.exec("ST_SHOW_BGCOLOR_LAYER",[])},$ON_ST_SHOW_BGCOLOR_LAYER:function(){this.welDropdownLayer.removeClass("p1");this.welDropdownLayer.addClass("p2");this.oApp.exec("SHOW_COLOR_PALETTE",["ST_SET_BGCOLOR_FROM_PALETTE",this.elDropdownLayer])},$ON_ST_HIDE_BGCOLOR_LAYER:function(){this.welDropdownLayer.removeClass("p2");this.oApp.exec("HIDE_COLOR_PALETTE",[])},$ON_ST_SET_BORDER_COLOR_FROM_PALETTE:function(a){this.oApp.exec("ST_SET_BORDER_COLOR",[a]);this.oApp.exec("ST_HIDE_BORDER_COLOR_LAYER", -[])},$ON_ST_SET_BORDER_COLOR:function(a){this.oBorderColorInput.value=a;this.oButton_BorderColorPreview.style.backgroundColor=a;this._showNewTable()},$ON_ST_SET_BGCOLOR_FROM_PALETTE:function(a){this.oApp.exec("ST_SET_BGCOLOR",[a]);this.oApp.exec("ST_HIDE_BGCOLOR_LAYER",[])},$ON_ST_SET_BGCOLOR:function(a){this.oBGColorInput.value=a;this.oButton_BGColorPreview.style.backgroundColor=a;this._showNewTable()},_showNewTable:function(){var a=document.createElement("DIV");a.innerHTML=this._getTableString(); -a=a.firstChild;this.oSampleTable.parentNode.insertBefore(a,this.oSampleTable);this.oSampleTable.parentNode.removeChild(this.oSampleTable);this.oSampleTable=a},_getTableString:function(){for(var a=this.oBorderColorInput.value,b=this.oBGColorInput.value,d=this.oBorderWidthInput.value,f="",f=c.browser.msie?"

    ":c.browser.firefox?"


    ":"

     

    ",a='',b='',e=this.oColumnInput.value, -d=0;d\n";f=this.oRowInput.value;a+="";for(d=0;d";a+="
    ";return a}});xe.XE_EditingModeToggler=c.Class({name:"XE_EditingModeToggler",$init:function(a){this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){a=c.$(a)||document;this.elModeToggleButton=c("BUTTON.xpress_xeditor_mode_toggle_button",a).get(0);this.welModeToggleButton=c(this.elModeToggleButton)},$ON_MSG_APP_READY:function(){this.oApp.registerBrowserEvent(this.elModeToggleButton, -"click","EVENT_TOGGLE_EDITING_MODE",[])},$ON_EVENT_TOGGLE_EDITING_MODE:function(){this.oApp.getEditingMode()=="WYSIWYG"?this.oApp.exec("CHANGE_EDITING_MODE",["HTMLSrc"]):this.oApp.exec("CHANGE_EDITING_MODE",["WYSIWYG"])},$ON_CHANGE_EDITING_MODE:function(a){a=="HTMLSrc"?(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;return a=a.replace(regex,function(a,f,e,g){f=f||"";e=e.toLowerCase();g=c.trim(g||"");if(f){g=[];a="";if(!b.length)return"";do a=b.pop(),a.tag==e&&a.state!="deleted"&&g.push("");while(b.length&&a.tag!=e);return g.join("")}else if(c.inArray(e,o)>=0){a=g.length;e=="br"&&(g="");if(!g||g.substring(a-1,a)!="/")g+="/";return"<"+e+" "+c.trim(g)+">"}else b[b.length]={tag:e,state:""};return"<"+f+e+(g?" "+g:"")+">"})},IR_TO:function(a){return a}}); -xe.XE_Extension=c.Class({name:"XE_Extension",seq:"",last_doc:"",$init:function(a,b){this.seq=b;this._assignHTMLObjects(a)},_assignHTMLObjects:function(a){this.elDropdownLayer=c("DIV.xpress_xeditor_extension_layer",a).get(0)},_removeAttrs:function(a){return a},_addEvent:function(){if(this.oApp.getEditingMode()=="WYSIWYG"){var a=this.oApp.getWYSIWYGDocument(),b=this.seq,d=function(){var a=c(this),d=a.attr("editor_component");d&&c.isFunction(openComponent)&&(editorPrevNode=a.get(0),openComponent(d,b))}; -c(a).find("img,div[editor_component]").each(function(){var b=c(this);this.nodeName=="IMG"&&!b.attr("editor_component")&&b.attr("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),typeof editorGetAutoSavedDoc=="function"&&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(this.elFormatSelect.selectedIndex<0)this.elFormatSelect.selectedIndex=0;if(this.elFormatSelect.value!=a.toLowerCase())this.elFormatSelect.selectedIndex=0},$ON_SET_FORMAT_FROM_SELECT_UI:function(){var a=this.elFormatSelect.value;a&&(c.browser.msie&& -(a="<"+a+">"),this.oApp.exec("EXECCOMMAND",["FormatBlock",false,a]),this.oApp.exec("CHECK_STYLE_CHANGE",[]))}});xe.XE_Table=c.Class({_startSel:null,_endSel:null,$ON_MSG_APP_READY:function(){this._doc=c(this.oApp.getWYSIWYGDocument());this.$FnMouseDown=c.fnBind(this._mousedown,this);this.$FnMouseUp=c.fnBind(this._mouseup,this);this.$FnMouseMove=c.fnBind(this._mousemove,this);this._doc.mousedown(this.$FnMouseDown);this._endSel=this._startSel=null;this.oApp.exec("REGISTER_UI_EVENT",["merge_cells","click", -"MERGE_CELLS"]);this.oApp.exec("REGISTER_UI_EVENT",["split_col","click","CELL_SPLIT_BY_COL"]);this.oApp.exec("REGISTER_UI_EVENT",["split_row","click","CELL_SPLIT_BY_ROW"]);this.oApp.exec("REGISTER_HOTKEY",["ctrl+alt+m","MERGE_CELLS"]);this.$super.$ON_MSG_APP_READY()},$ON_MERGE_CELLS:function(){var a="",b=c(".xe_selected_cell",this.oApp.getWYSIWYGDocument()).filter("td,th"),d=this;if(b.length){this.oApp.exec("RECORD_UNDO_ACTION",["Cell:Merge"]);b.each(function(){a+=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;f>1?(m=Math.ceil(f/2),o=f-m,k.push(function(){b.attr("rowSpan",m)}),n.attr("rowSpan",o)):(a.filter(function(){if(b.get(0)== -this)return false;var a=c(this),a=d._getRect(a);return a.bottom<=j.top||a.top>=j.bottom?false:true}).each(function(){var a=c(this),b=d._getSpan(a,"row")+1;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(e>1){var g=Math.ceil(e/2);e-=g;b.attr("colSpan",g);f.attr("colSpan",e)}else{var k=d._getRect(b);a.filter(function(){if(b.get(0)==this)return false;var a=c(this),a=d._getRect(a);return a.right<=k.left||a.left>=k.right?false:true}).each(function(){var a=c(this);a.attr("colSpan",d._getSpan(a,"col")+ -1)});f.attr("colSpan",1)}c.browser.msie?b.after(f.get(0).outerHTML):b.after(f)})}},$ON_CHECK_STYLE_CHANGE:function(){var a=this.oApp,b=this._startSel&&this._startSel.is(".xe_selected_cell")?"ENABLE_UI":"DISABLE_UI";c.each(["merge_cells","split_col","split_row"],function(){a.exec(b,[this])})},_mousedown:function(a){var b=c(a.target).parents().andSelf().filter("td,th,table"),d=this.oApp,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()||true;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.leftg)g=a.bottom}),a=a.filter(":not(.xe_selected_cell)"),b=a.filter(function(){var a=d._getRect(c(this));return a.right<=e||a.left>=h||a.bottom<=f||a.top>=g?false:true}).addClass("xe_selected_cell");while(b.length);c.browser.mozilla||setTimeout(function(){var a=d.oApp.getSelection();d._startSel&&(d._startSel.get(0).firstChild||d._startSel.text(" "),a.selectNode(d._startSel.get(0).firstChild),a.collapseToStart(), -a.select())},0);return false}},_removeAllListener:function(){this._doc.unbind("mousemove",this.$FnMouseMove);this._doc.unbind("mouseup",this.$FnMouseUp)},_isLeftClicked:function(a){return c.browser.msie?!!(a&1):a==0},_getRect:function(a){var b=a.get(0);a.rect={};a.rect.top=b.offsetTop;a.rect.left=b.offsetLeft;a.rect.bottom=a.rect.top+b.offsetHeight;a.rect.right=a.rect.left+b.offsetWidth;return a.rect},_getSpan:function(a,b){var d=parseInt(c(a).attr(b+"span"));return isNaN(d)?1:d}}).extend(xe.XE_Table)})(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(a.location=="about:blank")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)}}typeof a=="undefined"&&(a="white");typeof b=="undefined"&&(b="xeStyle");typeof d=="undefined"&& -(d="");typeof f=="undefined"&&(f="");var g=request_uri+"modules/editor/styles/"+b+"/editor.html",b=jQuery("#xpress-editor-"+c),g=jQuery('