diff --git a/ccm-cms/web/assets/xinha/CCMcmsXinhaConfig.js b/ccm-cms/web/assets/xinha/CCMcmsXinhaConfig.js
index af6d40f7f..5ddb0a78d 100644
--- a/ccm-cms/web/assets/xinha/CCMcmsXinhaConfig.js
+++ b/ccm-cms/web/assets/xinha/CCMcmsXinhaConfig.js
@@ -5,11 +5,15 @@
* options. */
/* It is based on the original configuration file XinhaConfig.js (compressed version) */
/* http://svn.xinha.webfactional.com/trunk/examples/XinhaConfig.js */
+_editor_skin = "silva";
+_editor_icons = "Crystal";
xinha_init=null;
xinha_config=null;
xinha_init=xinha_init?xinha_init:function(){
xinha_editors=xinha_editors?xinha_editors:["myTextArea","anotherOne"];
-xinha_plugins=xinha_plugins?xinha_plugins:["CharacterMap","ContextMenu","SmartReplace","Stylist","TableOperations"];
+xinha_plugins=xinha_plugins?xinha_plugins:["CharacterMap","CharCounter",
+ "ContextMenu","DefinitionList","FindReplace","ListType","QuickTag",
+ "SmartReplace","Stylist","TableOperations","UnFormat"];
if(!Xinha.loadPlugins(xinha_plugins,xinha_init)){
return;
}
@@ -22,11 +26,21 @@ xinha_config=xinha_config?xinha_config():new Xinha.Config();
["separator","subscript","superscript"],
["separator","justifyleft","justifycenter","justifyright","justifyfull"],
["separator","insertorderedlist","insertunorderedlist","outdent","indent"],
- ["separator","inserthorizontalrule","createlink"],
- ["separator","undo","redo","selectall"], (Xinha.is_gecko ? [] : ["cut","copy","paste","overwrite"]),
- ["separator","clearfonts","removeformat"],
- ["separator","htmlmode","showhelp","about"]
+ ["separator","createlink"],
+ ["separator","undo","redo","selectall"],
+ (Xinha.is_gecko ? [] : ["cut","copy","paste","overwrite"]),
+ ["separator","killword","clearfonts","removeformat"],
+ ["linebreak","separator","htmlmode","showhelp","about"]
];
+xinha_config.formatblock =
+ {
+ "— format —" : "",
+ "Heading 3": "h3",
+ "Heading 4": "h4",
+ "Heading 5": "h5",
+ "Heading 6": "h6",
+ "Normal" : "p"
+ };
xinha_config.pageStyleSheets=[_editor_url+"examples/full_example.css"];
xinha_editors=Xinha.makeEditors(xinha_editors,xinha_config,xinha_plugins);
diff --git a/ccm-core/web/assets/xinha/CCMcoreXinhaConfig.js b/ccm-core/web/assets/xinha/CCMcoreXinhaConfig.js
index af6d40f7f..5ddb0a78d 100644
--- a/ccm-core/web/assets/xinha/CCMcoreXinhaConfig.js
+++ b/ccm-core/web/assets/xinha/CCMcoreXinhaConfig.js
@@ -5,11 +5,15 @@
* options. */
/* It is based on the original configuration file XinhaConfig.js (compressed version) */
/* http://svn.xinha.webfactional.com/trunk/examples/XinhaConfig.js */
+_editor_skin = "silva";
+_editor_icons = "Crystal";
xinha_init=null;
xinha_config=null;
xinha_init=xinha_init?xinha_init:function(){
xinha_editors=xinha_editors?xinha_editors:["myTextArea","anotherOne"];
-xinha_plugins=xinha_plugins?xinha_plugins:["CharacterMap","ContextMenu","SmartReplace","Stylist","TableOperations"];
+xinha_plugins=xinha_plugins?xinha_plugins:["CharacterMap","CharCounter",
+ "ContextMenu","DefinitionList","FindReplace","ListType","QuickTag",
+ "SmartReplace","Stylist","TableOperations","UnFormat"];
if(!Xinha.loadPlugins(xinha_plugins,xinha_init)){
return;
}
@@ -22,11 +26,21 @@ xinha_config=xinha_config?xinha_config():new Xinha.Config();
["separator","subscript","superscript"],
["separator","justifyleft","justifycenter","justifyright","justifyfull"],
["separator","insertorderedlist","insertunorderedlist","outdent","indent"],
- ["separator","inserthorizontalrule","createlink"],
- ["separator","undo","redo","selectall"], (Xinha.is_gecko ? [] : ["cut","copy","paste","overwrite"]),
- ["separator","clearfonts","removeformat"],
- ["separator","htmlmode","showhelp","about"]
+ ["separator","createlink"],
+ ["separator","undo","redo","selectall"],
+ (Xinha.is_gecko ? [] : ["cut","copy","paste","overwrite"]),
+ ["separator","killword","clearfonts","removeformat"],
+ ["linebreak","separator","htmlmode","showhelp","about"]
];
+xinha_config.formatblock =
+ {
+ "— format —" : "",
+ "Heading 3": "h3",
+ "Heading 4": "h4",
+ "Heading 5": "h5",
+ "Heading 6": "h6",
+ "Normal" : "p"
+ };
xinha_config.pageStyleSheets=[_editor_url+"examples/full_example.css"];
xinha_editors=Xinha.makeEditors(xinha_editors,xinha_config,xinha_plugins);
diff --git a/ccm-core/web/assets/xinha/Xinha.css b/ccm-core/web/assets/xinha/Xinha.css
index 0ea74e15a..7e0e81724 100755
--- a/ccm-core/web/assets/xinha/Xinha.css
+++ b/ccm-core/web/assets/xinha/Xinha.css
@@ -1,273 +1,2 @@
-.htmlarea { background: #fff; }
-.htmlarea td { margin:0;padding:0; }
-
-.htmlarea .toolbarRow {
- width:1px;
-}
-
-.htmlarea .toolbar {
- cursor: default;
- background: ButtonFace;
- padding: 3px;
- border: 1px solid;
- border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
-}
-.htmlarea .toolbar table { margin: 0; font-family: tahoma,verdana,sans-serif; font-size: 11px; }
-.htmlarea .toolbar img { border: none; vertical-align: top; }
-.htmlarea .toolbar .label { padding: 0px 3px; }
-
-.htmlarea .toolbar .button {
- background: ButtonFace;
- color: ButtonText;
- border: 1px solid ButtonFace;
- padding: 1px;
- margin: 0px;
- width: 18px;
- height: 18px;
-}
-.htmlarea .toolbar a.button:hover {
- border: 1px solid;
- border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
-}
-.htmlarea .toolbar a.buttonDisabled:hover {
- border-color: ButtonFace;
-}
-.htmlarea .toolbar .buttonActive,
-.htmlarea .toolbar .buttonPressed
-{
- padding: 2px 0px 0px 2px;
- border: 1px solid;
- border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
-}
-.htmlarea .toolbar .buttonPressed {
- background: ButtonHighlight;
-}
-.htmlarea .toolbar .indicator {
- padding: 0px 3px;
- overflow: hidden;
- width: 20px;
- text-align: center;
- cursor: default;
- border: 1px solid ButtonShadow;
-}
-
-.htmlarea .toolbar .buttonDisabled img {
- filter: gray() alpha(opacity = 25);
- -moz-opacity: 0.25;
- opacity: 0.25;
-}
-
-.htmlarea .toolbar .separator {
- /*position: relative;*/
- margin:0 3px;
- border-left: 1px solid ButtonShadow;
- border-right: 1px solid ButtonHighlight;
- width: 0px;
- height: 18px;
- padding: 0px;
-}
-
-.htmlarea .toolbar .space { width: 5px; }
-
-.htmlarea .toolbar select, .htmlarea .toolbar option { font: 11px Tahoma,Verdana,sans-serif;}
-
-.htmlarea .toolbar select,
-.htmlarea .toolbar select:hover,
-.htmlarea .toolbar select:active {
- position:relative;
- top:-2px;
- margin-bottom:-2px;
- color: ButtonText;
-}
-
-.htmlarea iframe.xinha_iframe, .htmlarea textarea.xinha_textarea
-{
- border: none; /*1px solid;*/
-}
-
-.htmlarea .statusBar {
- border: 1px solid;
- border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
- padding: 2px 4px;
- background-color: ButtonFace;
- color: ButtonText;
- font: 11px Tahoma,Verdana,sans-serif;
- height:16px;
-}
-
-.htmlarea .statusBar .statusBarTree a {
- padding: 2px 5px;
- color: #00f;
-}
-
-.htmlarea .statusBar .statusBarTree a:visited { color: #00f; }
-.htmlarea .statusBar .statusBarTree a:hover {
- background-color: Highlight;
- color: HighlightText;
- padding: 1px 4px;
- border: 1px solid HighlightText;
-}
-
-
-/* popup dialogs */
-
-.dialog {
- color: ButtonText;
- background: ButtonFace;
-}
-
-.dialog .content { padding: 2px; }
-
-.dialog, .dialog button, .dialog input, .dialog select, .dialog textarea, .dialog table {
- font: 11px Tahoma,Verdana,sans-serif;
-}
-
-.dialog table { border-collapse: collapse; }
-
-.dialog .title, .dialog h1
-{
- background: #008;
- color: #ff8;
- border-bottom: 1px solid #000;
- padding: 1px 0px 2px 5px;
- font-size: 12px;
- font-weight: bold;
- cursor: default;
-}
-.dialog h1 { margin:0px;}
-.dialog .title .button {
- float: right;
- border: 1px solid #66a;
- padding: 0px 1px 0px 2px;
- margin-right: 1px;
- color: #fff;
- text-align: center;
-}
-
-.dialog .title .button-hilite { border-color: #88f; background: #44c; }
-
-.dialog button {
- width: 5em;
- padding: 0px;
-}
-
-.dialog .buttonColor {
- width :1em;
- padding: 1px;
- cursor: default;
- border: 1px solid;
- border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
-}
-
-.dialog .buttonColor .chooser, .dialog .buttonColor .nocolor {
- height: 0.6em;
- border: 1px solid;
- padding: 0px 1em;
- border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
-}
-
-.dialog .buttonClick {
- border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
-}
-.dialog .buttonColor-hilite {
- border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
-}
-
-.dialog .buttonColor .nocolor { padding: 0px; }
-.dialog .buttonColor .nocolor-hilite { background-color: #fff; color: #f00; }
-
-.dialog .label { text-align: right; width: 6em; }
-.dialog .value input { width: 100%; }
-.dialog .buttons { text-align: right; padding: 2px 4px 0px 4px; }
-
-.dialog legend { font-weight: bold; }
-.dialog fieldset table { margin: 2px 0px; }
-
-.popupwin {
- padding: 0px;
- margin: 0px;
-}
-
-.popupwin .title {
- background: #fff;
- color: #000;
- font-weight: bold;
- font-size: 120%;
- padding: 3px 10px;
- margin-bottom: 10px;
- border-bottom: 1px solid black;
- letter-spacing: 2px;
-}
-
-form { margin: 0px; border: none; }
-
-
-/** Panels **/
-.htmlarea .panels.top
-{
- border-bottom : 1px solid;
- border-color: ButtonShadow;
-}
-
-.htmlarea .panels.right
-{
- border-left : 1px solid;
- border-color: ButtonShadow;
-}
-
-.htmlarea .panels.left
-{
- border-right : 1px solid;
- border-color: ButtonShadow;
-}
-
-.htmlarea .panels.bottom
-{
- border-top : 1px solid;
- border-color: ButtonShadow;
-}
-
-.htmlarea .panel h1 {
- background: ButtonFace;
- border: 1px solid;
- border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
- margin: 0px;
- padding: 0px;
- font-size:100%;
- font-weight:bold;
- padding: 2px;
- clear:left;
-
-}
-
-.htmlarea .panel { overflow:hidden; }
-.htmlarea .panels.left .panel { border-right:none; border-left:none; }
-.htmlarea .panels.left h1 { border-right:none; }
-.htmlarea .panels.right .panel { border-right:none; border-left:none; }
-.htmlarea .panels.left h1 { border-left:none; }
-.htmlarea { border: 1px solid black; }
-
-.loading
-{
- font-family:sans-serif;
- position:absolute;
- z-index:998;
- text-align:center;
- width:212px;
- padding: 55px 0 5px 0;
- border:2px solid #ccc;
- /* border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;*/
- background: url(images/xinha_logo.gif) no-repeat #fff center 5px;
-}
-.loading_main
-{
- font-size:11px;
- color:#000;
-
-}
-.loading_sub
-{
- font-size:9px;
- color:#666;
- text-align:center;
-}
+/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
+.htmlarea{background:#fff;}.htmlarea td{margin:0;padding:0;}.htmlarea .toolbarRow{width:1px;}.htmlarea .toolbar{cursor:default;background:ButtonFace;padding:3px;border:1px solid;border-color:ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;}.htmlarea .toolbar table{margin:0;font-family:Tahoma,Verdana,sans-serif;font-size:11px;}.htmlarea .toolbar img{border:none;vertical-align:top;}.htmlarea .toolbar .label{padding:0 3px;}.htmlarea .toolbar .button{background:ButtonFace;color:ButtonText;border:1px solid ButtonFace;padding:1px;margin:0;width:18px;height:18px;}.htmlarea .toolbar a.button:hover{border:1px solid;border-color:ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;}.htmlarea .toolbar a.buttonDisabled:hover{border-color:ButtonFace;}.htmlarea .toolbar .buttonActive,.htmlarea .toolbar .buttonPressed{padding:2px 0 0 2px;border:1px solid;border-color:ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;}.htmlarea .toolbar .buttonPressed{background:ButtonHighlight;}.htmlarea .toolbar .indicator{padding:0 3px;overflow:hidden;width:20px;text-align:center;cursor:default;border:1px solid ButtonShadow;}.htmlarea .toolbar .buttonDisabled img{filter:gray() alpha(opacity = 25);-moz-opacity:.25;opacity:.25;}.htmlarea .toolbar .separator{margin:0 3px;border-left:1px solid ButtonShadow;border-right:1px solid ButtonHighlight;width:0;height:18px;padding:0;}.htmlarea .toolbar .space{width:5px;}.htmlarea .toolbar select,.htmlarea .toolbar option{font:11px Tahoma,Verdana,sans-serif;}.htmlarea .toolbar select,.htmlarea .toolbar select:hover,.htmlarea .toolbar select:active{position:relative;top:-2px;margin-bottom:-2px;color:ButtonText;}.htmlarea iframe.xinha_iframe,.htmlarea textarea.xinha_textarea{border:none;}.htmlarea .statusBar{border:1px solid;border-color:ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;padding:2px 4px;background-color:ButtonFace;color:ButtonText;font:11px Tahoma,Verdana,sans-serif;height:16px;overflow:hidden;}.htmlarea .statusBar .statusBarTree a{padding:2px 5px;color:#00f;}.htmlarea .statusBar .statusBarTree a:visited{color:#00f;}.htmlarea .statusBar .statusBarTree a:hover{background-color:Highlight;color:HighlightText;padding:1px 4px;border:1px solid HighlightText;}.statusBarWidgetContainer{background-color:ButtonFace;}.dialog{color:ButtonText;background:ButtonFace;border:1px outset;border-color:WindowFrame;}div.dialog{padding-bottom:10px;border-radius:8px 8px 0 0;-moz-border-radius:8px 8px 0 0;-webkit-border-top-left-radius:8px;-webkit-border-top-right-radius:8px;box-shadow:9px 9px 10px #444;-moz-box-shadow:9px 9px 10px #444;-webkit-box-shadow:9px 9px 10px #444;}div.dialog.modeless{box-shadow:4px 4px 5px #888;-moz-box-shadow:4px 4px 5px #888;-webkit-box-shadow:4px 4px 5px #888;}div.dialog.chrome{-webkit-box-shadow:none!IMPORTANT;}.panels div.dialog.panel{border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;}.xinha_dialog_background{filter:alpha(opacity=0);-moz-opacity:0;opacity:0;border:none;}.xinha_dialog_background_modal_greyout{background-color:#666;filter:alpha(opacity=70)!IMPORTANT;-moz-opacity:.7;opacity:.7;}.xinha_dialog_background_modal{filter:alpha(opacity=0)!IMPORTANT;-moz-opacity:0;opacity:0;border:none;}body.xinha_dialog_background_modal_greyout{filter:alpha(opacity=100)!IMPORTANT;}body.xinha_dialog_background_modal{filter:alpha(opacity=0);}.dialog .content{padding:2px;}.dialog,.dialog button,.dialog input,.dialog select,.dialog textarea,.dialog table{font:11px Tahoma,Verdana,sans-serif;}.dialog table{border-collapse:collapse;}.dialog .title,.dialog h1{background:ActiveCaption;color:CaptionText;border-bottom:1px solid #000;padding:1px 0 2px 5px;font-size:12px;font-weight:bold;cursor:default;letter-spacing:.01em;}.dialog h1{padding-left:22px;margin:0;border-radius:8px 8px 0 0;-moz-border-radius:8px 8px 0 0;-webkit-border-top-left-radius:8px;-webkit-border-top-right-radius:8px;}.panels .dialog.panel h1{-moz-border-radius:0;-webkit-border-radius:0;}.dialog .title .button{float:right;border:1px solid #66a;padding:0 1px 0 2px;margin-right:1px;color:#fff;text-align:center;}.dialog .title .button-hilite{border-color:#88f;background:#44c;}.dialog button{width:5.5em;padding:0;}.dialog .closeButton{padding:0;cursor:default;border:1px solid;border-color:ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;height:11px;width:11px;vertical-align:top;position:absolute;top:3px;right:2px;background-color:ButtonFace;color:ButtonText;font-size:13px;font-family:Tahoma,Verdana,sans-serif;text-align:center;letter-spacing:0;overflow:hidden;}.dialog .buttonColor{width:1em;padding:1px;cursor:default;border:1px solid;border-color:ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;}.dialog .buttonColor .chooser,.dialog .buttonColor .nocolor{height:.6em;border:1px solid;padding:0 1em;border-color:ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;}.dialog .buttonClick{border-color:ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;}.dialog .buttonColor-hilite{border-color:ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;}.dialog .buttonColor .nocolor{padding:0;}.dialog .buttonColor .nocolor-hilite{background-color:#fff;color:#f00;}.dialog .label{text-align:right;width:6em;}.dialog .value input{width:100%;}.dialog legend{font-weight:bold;}.dialog fieldset table{margin:2px 0;}.dialog .buttons{padding:1em;text-align:center;}.dialog .resizeHandle{-moz-appearance:resizer;width:12px;height:12px;border-bottom:2px solid #000;border-right:2px solid #000;cursor:se-resize;}.popupwin{padding:0;margin:0;}.popupwin .title{background:#fff;color:#000;font-weight:bold;font-size:120%;padding:3px 10px;margin-bottom:10px;border-bottom:1px solid black;letter-spacing:2px;}form{margin:0;border:none;}.htmlarea .panels_top{border-bottom:1px solid;border-color:ButtonShadow;}.htmlarea .panels_right{border-left:1px solid;border-color:ButtonShadow;}.htmlarea .panels_left{border-right:1px solid;border-color:ButtonShadow;}.htmlarea .panels_bottom{border-top:1px solid;border-color:ButtonShadow;}.htmlarea .panel h1{clear:left;font-size:.9em;}.htmlarea .panel{overflow:hidden;background-color:white;padding-bottom:0!IMPORTANT;border:none!IMPORTANT;}.htmlarea .panels_left .panel{border-right:none;border-left:none;}.htmlarea .panels_left h1{border-right:none;}.htmlarea .panels_right .panel{border-right:none;border-left:none;}.htmlarea .panels_left h1{border-left:none;}.htmlarea{border:1px solid black;}.loading{font-family:sans-serif;position:absolute;z-index:998;text-align:center;width:212px;padding:55px 0 5px 0;border:2px solid #ccc;background:url(images/xinha_logo.gif) no-repeat #fff center 5px;}.loading_main{font-size:11px;color:#000;}.loading_sub{font-size:9px;color:#666;text-align:center;}.dialog a img{border:0 none transparent;}.dialog fieldset.collapsed{border:0 none transparent;}.dialog fieldset.collapsed form{display:none;}.hidden{display:none;}.placesmanager{width:95%;overflow:auto;}.filemanager{width:95%;height:200px;overflow:auto;background-color:#fff;}.filemanager div.file{min-width:80px;height:100px;position:relative;float:left;border:1px outset #666;margin:4px;}.placesmanager div.file{min-width:60px;height:70px;position:relative;float:left;border:1px outset #666;margin:4px;}.filemanager div.file:hover,.placesmanager div.file:hover{border:1px solid #333;background:#fffff3;}.filemanager div.selected,.filemanager div.selected:hover,.placesmanager div.selected,.placesmanager div.selected:hover{background:#ffffda;border:1px solid #000;}.filemanager .filename{margin:.5em;color:#222;}.filemanager div.selected .filename{color:#000;}.filemanager img.thumb{width:50px;height:50px;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;border:1px solid black;}.filemanager img.icon{width:32px;height:32px;position:absolute;top:50%;left:50%;margin:-16px 0 0 -16px;}.filemanager img.action{width:15px;height:15px;position:absolute;}.filemanager img.delete{bottom:3px;left:20px;}.filemanager img.copy{bottom:3px;left:3px;}
\ No newline at end of file
diff --git a/ccm-core/web/assets/xinha/Xinha.css_uncompr.js b/ccm-core/web/assets/xinha/Xinha.css_uncompr.js
new file mode 100644
index 000000000..d845cf386
--- /dev/null
+++ b/ccm-core/web/assets/xinha/Xinha.css_uncompr.js
@@ -0,0 +1,477 @@
+.htmlarea { background: #fff; }
+.htmlarea td { margin:0;padding:0; }
+
+.htmlarea .toolbarRow {
+ width:1px;
+}
+
+.htmlarea .toolbar {
+ cursor: default;
+ background: ButtonFace;
+ padding: 3px;
+ border: 1px solid;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+}
+.htmlarea .toolbar table { margin: 0; font-family: Tahoma, Verdana,sans-serif; font-size: 11px; }
+.htmlarea .toolbar img { border: none; vertical-align: top; }
+.htmlarea .toolbar .label { padding: 0 3px; }
+
+.htmlarea .toolbar .button {
+ background: ButtonFace;
+ color: ButtonText;
+ border: 1px solid ButtonFace;
+ padding: 1px;
+ margin: 0;
+ width: 18px;
+ height: 18px;
+}
+.htmlarea .toolbar a.button:hover {
+ border: 1px solid;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+}
+.htmlarea .toolbar a.buttonDisabled:hover {
+ border-color: ButtonFace;
+}
+.htmlarea .toolbar .buttonActive,
+.htmlarea .toolbar .buttonPressed
+{
+ padding: 2px 0 0 2px;
+ border: 1px solid;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+}
+.htmlarea .toolbar .buttonPressed {
+ background: ButtonHighlight;
+}
+.htmlarea .toolbar .indicator {
+ padding: 0 3px;
+ overflow: hidden;
+ width: 20px;
+ text-align: center;
+ cursor: default;
+ border: 1px solid ButtonShadow;
+}
+
+.htmlarea .toolbar .buttonDisabled img {
+ filter: gray() alpha(opacity = 25);
+ -moz-opacity: 0.25;
+ opacity: 0.25;
+}
+
+.htmlarea .toolbar .separator {
+ /*position: relative;*/
+ margin:0 3px;
+ border-left: 1px solid ButtonShadow;
+ border-right: 1px solid ButtonHighlight;
+ width: 0;
+ height: 18px;
+ padding: 0;
+}
+
+.htmlarea .toolbar .space { width: 5px; }
+
+.htmlarea .toolbar select, .htmlarea .toolbar option { font: 11px Tahoma,Verdana,sans-serif;}
+
+.htmlarea .toolbar select,
+.htmlarea .toolbar select:hover,
+.htmlarea .toolbar select:active {
+ position:relative;
+ top:-2px;
+ margin-bottom:-2px;
+ color: ButtonText;
+}
+
+.htmlarea iframe.xinha_iframe, .htmlarea textarea.xinha_textarea
+{
+ border: none; /*1px solid;*/
+}
+
+.htmlarea .statusBar {
+ border: 1px solid;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+ padding: 2px 4px;
+ background-color: ButtonFace;
+ color: ButtonText;
+ font: 11px Tahoma,Verdana,sans-serif;
+ height:16px;
+ overflow: hidden;
+}
+
+.htmlarea .statusBar .statusBarTree a {
+ padding: 2px 5px;
+ color: #00f;
+}
+
+.htmlarea .statusBar .statusBarTree a:visited { color: #00f; }
+.htmlarea .statusBar .statusBarTree a:hover {
+ background-color: Highlight;
+ color: HighlightText;
+ padding: 1px 4px;
+ border: 1px solid HighlightText;
+}
+
+.statusBarWidgetContainer {
+ background-color: ButtonFace;
+}
+
+/* popup dialogs */
+
+.dialog {
+ color: ButtonText;
+ background: ButtonFace;
+ border: 1px outset;
+ border-color: WindowFrame;
+}
+div.dialog {
+ padding-bottom:10px;
+ border-radius: 8px 8px 0 0;
+ -moz-border-radius: 8px 8px 0 0;
+ -webkit-border-top-left-radius: 8px;
+ -webkit-border-top-right-radius: 8px;
+
+ box-shadow: 9px 9px 10px #444;
+ -moz-box-shadow: 9px 9px 10px #444;
+ -webkit-box-shadow: 9px 9px 10px #444;
+}
+div.dialog.modeless {
+ box-shadow: 4px 4px 5px #888;
+ -moz-box-shadow: 4px 4px 5px #888;
+ -webkit-box-shadow: 4px 4px 5px #888;
+}
+div.dialog.chrome {
+ -webkit-box-shadow: none !IMPORTANT;
+}
+.panels div.dialog.panel {
+ border-radius:0;
+ -moz-border-radius: 0;
+ -webkit-border-radius:0;
+
+ box-shadow: none;
+ -moz-box-shadow: none;
+ -webkit-box-shadow: none;
+}
+.xinha_dialog_background {
+ filter: alpha(opacity=0);
+ -moz-opacity: 0;
+ opacity: 0;
+ border:none;
+}
+.xinha_dialog_background_modal_greyout {
+ background-color:#666;
+ filter: alpha(opacity=70) !IMPORTANT;
+ -moz-opacity: 0.7;
+ opacity: 0.7;
+}
+.xinha_dialog_background_modal {
+ filter: alpha(opacity=0) !IMPORTANT;
+ -moz-opacity: 0;
+ opacity: 0;
+ border:none;
+}
+body.xinha_dialog_background_modal_greyout {
+ filter: alpha(opacity=100) !IMPORTANT;
+}
+body.xinha_dialog_background_modal {
+ filter: alpha(opacity=0);
+}
+.dialog .content { padding: 2px; }
+
+.dialog, .dialog button, .dialog input, .dialog select, .dialog textarea, .dialog table {
+ font: 11px Tahoma,Verdana,sans-serif;
+}
+
+.dialog table { border-collapse: collapse; }
+
+.dialog .title, .dialog h1
+{
+ background: ActiveCaption;
+ color: CaptionText;
+ border-bottom: 1px solid #000;
+ padding: 1px 0 2px 5px;
+ font-size: 12px;
+ font-weight: bold;
+ cursor: default;
+ letter-spacing: 0.01em;
+}
+.dialog h1 {
+ padding-left:22px;
+ margin:0;
+ border-radius: 8px 8px 0 0;
+ -moz-border-radius: 8px 8px 0 0;
+ -webkit-border-top-left-radius: 8px;
+ -webkit-border-top-right-radius: 8px;
+}
+.panels .dialog.panel h1 {
+ -moz-border-radius: 0;
+ -webkit-border-radius:0;
+}
+
+.dialog .title .button {
+ float: right;
+ border: 1px solid #66a;
+ padding: 0 1px 0 2px;
+ margin-right: 1px;
+ color: #fff;
+ text-align: center;
+}
+
+.dialog .title .button-hilite { border-color: #88f; background: #44c; }
+
+.dialog button {
+ width: 5.5em;
+ padding: 0;
+}
+.dialog .closeButton {
+ padding: 0;
+ cursor: default;
+ border: 1px solid;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+ height : 11px;
+ width : 11px;
+ vertical-align : top;
+ position : absolute;
+ top : 3px;
+ right : 2px;
+ background-color: ButtonFace;
+ color: ButtonText;
+ font-size: 13px;
+ font-family: Tahoma,Verdana,sans-serif;
+ text-align:center;
+ letter-spacing:0;
+ overflow:hidden;
+}
+.dialog .buttonColor {
+ width :1em;
+ padding: 1px;
+ cursor: default;
+ border: 1px solid;
+ border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+}
+
+.dialog .buttonColor .chooser, .dialog .buttonColor .nocolor {
+ height: 0.6em;
+ border: 1px solid;
+ padding: 0 1em;
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+}
+
+.dialog .buttonClick {
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+}
+.dialog .buttonColor-hilite {
+ border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow;
+}
+
+.dialog .buttonColor .nocolor { padding: 0; }
+.dialog .buttonColor .nocolor-hilite { background-color: #fff; color: #f00; }
+
+.dialog .label { text-align: right; width: 6em; }
+.dialog .value input { width: 100%; }
+
+.dialog legend { font-weight: bold; }
+.dialog fieldset table { margin: 2px 0; }
+
+.dialog .buttons {
+
+ padding: 1em;
+ text-align: center;
+}
+.dialog .resizeHandle {
+ -moz-appearance : resizer;
+ width: 12px;
+ height: 12px;
+ border-bottom: 2px solid #000;
+ border-right: 2px solid #000;
+ cursor : se-resize;
+}
+.popupwin {
+ padding: 0;
+ margin: 0;
+}
+
+.popupwin .title {
+ background: #fff;
+ color: #000;
+ font-weight: bold;
+ font-size: 120%;
+ padding: 3px 10px;
+ margin-bottom: 10px;
+ border-bottom: 1px solid black;
+ letter-spacing: 2px;
+}
+
+form { margin: 0; border: none; }
+
+
+/** Panels **/
+.htmlarea .panels_top
+{
+ border-bottom : 1px solid;
+ border-color: ButtonShadow;
+}
+
+.htmlarea .panels_right
+{
+ border-left : 1px solid;
+ border-color: ButtonShadow;
+}
+
+.htmlarea .panels_left
+{
+ border-right : 1px solid;
+ border-color: ButtonShadow;
+}
+
+.htmlarea .panels_bottom
+{
+ border-top : 1px solid;
+ border-color: ButtonShadow;
+}
+
+.htmlarea .panel h1 {
+ clear:left;
+ font-size:0.9em;
+}
+
+.htmlarea .panel {
+ overflow:hidden;
+ background-color:white;
+ padding-bottom:0 !IMPORTANT;
+ border: none !IMPORTANT;
+}
+.htmlarea .panels_left .panel { border-right:none; border-left:none; }
+.htmlarea .panels_left h1 { border-right:none; }
+.htmlarea .panels_right .panel { border-right:none; border-left:none; }
+.htmlarea .panels_left h1 { border-left:none; }
+.htmlarea { border: 1px solid black; }
+
+.loading
+{
+ font-family:sans-serif;
+ position:absolute;
+ z-index:998;
+ text-align:center;
+ width:212px;
+ padding: 55px 0 5px 0;
+ border:2px solid #ccc;
+ /* border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;*/
+ background: url(images/xinha_logo.gif) no-repeat #fff center 5px;
+}
+.loading_main
+{
+ font-size:11px;
+ color:#000;
+
+}
+.loading_sub
+{
+ font-size:9px;
+ color:#666;
+ text-align:center;
+}
+/* Classes for filemanager styles in a dialog. */
+.dialog a img
+{
+border: 0 none transparent;
+}
+
+.dialog fieldset.collapsed {
+border: 0 none transparent;
+}
+
+.dialog fieldset.collapsed form {
+display: none;
+}
+
+.hidden
+{
+display: none;
+}
+
+.placesmanager
+{
+ width: 95%;
+ overflow: auto;
+}
+
+.filemanager
+{
+ width: 95%;
+ height: 200px;
+ overflow: auto;
+ background-color: #fff;
+}
+.filemanager div.file
+{
+ min-width: 80px;
+ height: 100px;
+ position: relative;
+ float: left;
+ border: 1px outset #666;
+ margin: 4px;
+}
+.placesmanager div.file
+{
+ min-width: 60px;
+ height: 70px;
+ position: relative;
+ float: left;
+ border: 1px outset #666;
+ margin: 4px;
+}
+.filemanager div.file:hover,
+.placesmanager div.file:hover
+{
+ border: 1px solid #333;
+ background: #fffff3;
+}
+
+.filemanager div.selected,
+.filemanager div.selected:hover,
+.placesmanager div.selected,
+.placesmanager div.selected:hover
+{
+ background: #ffffda;
+ border: 1px solid #000;
+}
+.filemanager .filename {
+ margin: 0.5em;
+ color: #222;
+}
+.filemanager div.selected .filename {
+ color: #000;
+}
+.filemanager img.thumb
+{
+ width: 50px;
+ height: 50px;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ margin: -25px 0 0 -25px;
+ border: 1px solid black;
+}
+.filemanager img.icon
+{
+ width: 32px;
+ height: 32px;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ margin: -16px 0 0 -16px;
+}
+.filemanager img.action
+{
+ width: 15px;
+ height: 15px;
+ position: absolute;
+}
+.filemanager img.delete
+{
+ bottom: 3px;
+ left: 20px;
+}
+.filemanager img.copy
+{
+ bottom: 3px;
+ left: 3px;
+}
diff --git a/ccm-core/web/assets/xinha/XinhaConfig.js b/ccm-core/web/assets/xinha/XinhaConfig.js
deleted file mode 100644
index ff126d004..000000000
--- a/ccm-core/web/assets/xinha/XinhaConfig.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
-/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */
-/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/examples/XinhaConfig.js */
-xinha_init=null;
-xinha_config=null;
-xinha_init=xinha_init?xinha_init:function(){
-xinha_editors=xinha_editors?xinha_editors:["myTextArea","anotherOne"];
-//xinha_plugins=xinha_plugins?xinha_plugins:["CharacterMap","ContextMenu","SmartReplace","Stylist","Linker","SuperClean","TableOperations"];
-xinha_plugins=xinha_plugins?xinha_plugins:["CharacterMap","ContextMenu","SmartReplace","Stylist","SuperClean","TableOperations"];
-if(!Xinha.loadPlugins(xinha_plugins,xinha_init)){
-return;
-}
-xinha_config=xinha_config?xinha_config():new Xinha.Config();
-xinha_config.pageStyleSheets=[_editor_url+"examples/full_example.css"];
-xinha_editors=Xinha.makeEditors(xinha_editors,xinha_config,xinha_plugins);
-Xinha.startEditors(xinha_editors);
-};
-Xinha.addOnloadHandler(xinha_init);
-
diff --git a/ccm-core/web/assets/xinha/XinhaCore.js b/ccm-core/web/assets/xinha/XinhaCore.js
index 20f8bb7b8..0d5e6154c 100644
--- a/ccm-core/web/assets/xinha/XinhaCore.js
+++ b/ccm-core/web/assets/xinha/XinhaCore.js
@@ -1,13 +1,12 @@
/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
-/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */
-/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/XinhaCore.js */
+/* The URL of the most recent uncompressed version of this file is http://svn.xinha.org/trunk/XinhaCore.js */
/*--------------------------------------------------------------------------
-- Xinha (is not htmlArea) - http://xinha.org
--
-- Use of Xinha is granted by the terms of the htmlArea License (based on
-- BSD license) please read license.txt in this package for details.
--
- -- Copyright (c) 2005-2008 Xinha Developer Team and contributors
+ -- Copyright (c) 2005-2010 Xinha Developer Team and contributors
--
-- Xinha was originally based on work by Mihai Bazon which is:
-- Copyright (c) 2003-2004 dynarch.com.
@@ -15,3801 +14,4 @@
-- This copyright notice MUST stay intact for use.
-------------------------------------------------------------------------*/
-Xinha.version={"Release":"0.95","Head":"$HeadURL:http://svn.xinha.webfactional.com/trunk/XinhaCore.js $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),"Date":"$LastChangedDate:2008-05-01 14:33:36 +0200 (Do, 01 Mai 2008) $".replace(/^[^:]*:\s*([0-9-]*) ([0-9:]*) ([+0-9]*) \((.*)\)\s*\$/,"$4 $2 $3"),"Revision":"$LastChangedRevision:999 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),"RevisionBy":"$LastChangedBy:ray $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1")};
-Xinha._resolveRelativeUrl=function(_1,_2){
-if(_2.match(/^([^:]+\:)?\/\//)){
-return _2;
-}else{
-var b=_1.split("/");
-if(b[b.length-1]==""){
-b.pop();
-}
-var p=_2.split("/");
-if(p[0]=="."){
-p.shift();
-}
-while(p[0]==".."){
-b.pop();
-p.shift();
-}
-return b.join("/")+"/"+p.join("/");
-}
-};
-if(typeof _editor_url=="string"){
-_editor_url=_editor_url.replace(/\x2f*$/,"/");
-if(!_editor_url.match(/^([^:]+\:)?\//)){
-var path=window.location.toString().split("/");
-path.pop();
-_editor_url=Xinha._resolveRelativeUrl(path.join("/"),_editor_url);
-}
-}else{
-alert("WARNING: _editor_url is not set! You should set this variable to the editor files path; it should preferably be an absolute path, like in '/htmlarea/', but it can be relative if you prefer. Further we will try to load the editor files correctly but we'll probably fail.");
-_editor_url="";
-}
-if(typeof _editor_lang=="string"){
-_editor_lang=_editor_lang.toLowerCase();
-}else{
-_editor_lang="en";
-}
-if(typeof _editor_skin!=="string"){
-_editor_skin="";
-}
-var __xinhas=[];
-Xinha.agt=navigator.userAgent.toLowerCase();
-Xinha.is_ie=((Xinha.agt.indexOf("msie")!=-1)&&(Xinha.agt.indexOf("opera")==-1));
-Xinha.ie_version=parseFloat(Xinha.agt.substring(Xinha.agt.indexOf("msie")+5));
-Xinha.is_opera=(Xinha.agt.indexOf("opera")!=-1);
-if(Xinha.is_opera&&Xinha.agt.match(/opera[\/ ]([0-9.]+)/)){
-Xinha.opera_version=parseFloat(RegExp.$1);
-}else{
-Xinha.opera_version=0;
-}
-Xinha.is_khtml=(Xinha.agt.indexOf("khtml")!=-1);
-Xinha.is_webkit=(Xinha.agt.indexOf("applewebkit")!=-1);
-Xinha.webkit_version=parseInt(navigator.appVersion.replace(/.*?AppleWebKit\/([\d]).*?/,"$1"));
-Xinha.is_safari=(Xinha.agt.indexOf("safari")!=-1);
-Xinha.is_mac=(Xinha.agt.indexOf("mac")!=-1);
-Xinha.is_mac_ie=(Xinha.is_ie&&Xinha.is_mac);
-Xinha.is_win_ie=(Xinha.is_ie&&!Xinha.is_mac);
-Xinha.is_gecko=(navigator.product=="Gecko")||Xinha.is_opera;
-Xinha.is_real_gecko=(navigator.product=="Gecko"&&!Xinha.is_webkit);
-Xinha.is_ff3=Xinha.is_real_gecko&&parseInt(navigator.productSub)>=2007121016;
-Xinha.is_ff2=Xinha.is_real_gecko&&parseInt(navigator.productSub)<2007121016;
-Xinha.isRunLocally=document.URL.toLowerCase().search(/^file:/)!=-1;
-Xinha.is_designMode=(typeof document.designMode!="undefined"&&!Xinha.is_ie);
-Xinha.checkSupportedBrowser=function(){
-return Xinha.is_real_gecko||(Xinha.is_opera&&Xinha.opera_version>=9.2)||Xinha.ie_version>=5.5||Xinha.webkit_version>=522;
-};
-Xinha.isSupportedBrowser=Xinha.checkSupportedBrowser();
-if(Xinha.isRunLocally&&Xinha.isSupportedBrowser){
-alert("Xinha *must* be installed on a web server. Locally opened files (those that use the \"file://\" protocol) cannot properly function. Xinha will try to initialize but may not be correctly loaded.");
-}
-function Xinha(_5,_6){
-if(!Xinha.isSupportedBrowser){
-return;
-}
-if(!_5){
-throw new Error("Tried to create Xinha without textarea specified.");
-}
-if(typeof _6=="undefined"){
-this.config=new Xinha.Config();
-}else{
-this.config=_6;
-}
-if(typeof _5!="object"){
-_5=Xinha.getElementById("textarea",_5);
-}
-this._textArea=_5;
-this._textArea.spellcheck=false;
-Xinha.freeLater(this,"_textArea");
-this._initial_ta_size={w:_5.style.width?_5.style.width:(_5.offsetWidth?(_5.offsetWidth+"px"):(_5.cols+"em")),h:_5.style.height?_5.style.height:(_5.offsetHeight?(_5.offsetHeight+"px"):(_5.rows+"em"))};
-if(document.getElementById("loading_"+_5.id)||this.config.showLoading){
-if(!document.getElementById("loading_"+_5.id)){
-Xinha.createLoadingMessage(_5);
-}
-this.setLoadingMessage(Xinha._lc("Constructing object"));
-}
-this._editMode="wysiwyg";
-this.plugins={};
-this._timerToolbar=null;
-this._timerUndo=null;
-this._undoQueue=[this.config.undoSteps];
-this._undoPos=-1;
-this._customUndo=true;
-this._mdoc=document;
-this.doctype="";
-this.__htmlarea_id_num=__xinhas.length;
-__xinhas[this.__htmlarea_id_num]=this;
-this._notifyListeners={};
-var _7={right:{on:true,container:document.createElement("td"),panels:[]},left:{on:true,container:document.createElement("td"),panels:[]},top:{on:true,container:document.createElement("td"),panels:[]},bottom:{on:true,container:document.createElement("td"),panels:[]}};
-for(var i in _7){
-if(!_7[i].container){
-continue;
-}
-_7[i].div=_7[i].container;
-_7[i].container.className="panels "+i;
-Xinha.freeLater(_7[i],"container");
-Xinha.freeLater(_7[i],"div");
-}
-this._panels=_7;
-this._statusBar=null;
-this._statusBarTree=null;
-this._statusBarTextMode=null;
-this._statusBarItems=[];
-this._framework={};
-this._htmlArea=null;
-this._iframe=null;
-this._doc=null;
-this._toolBar=this._toolbar=null;
-this._toolbarObjects={};
-}
-Xinha.onload=function(){
-};
-Xinha.init=function(){
-Xinha.onload();
-};
-Xinha.RE_tagName=/(<\/|<)\s*([^ \t\n>]+)/ig;
-Xinha.RE_doctype=/()\n?/i;
-Xinha.RE_head=/
((.|\n)*?)<\/head>/i;
-Xinha.RE_body=/]*>((.|\n|\r|\t)*?)<\/body>/i;
-Xinha.RE_Specials=/([\/\^$*+?.()|{}[\]])/g;
-Xinha.escapeStringForRegExp=function(_9){
-return _9.replace(Xinha.RE_Specials,"\\$1");
-};
-Xinha.RE_email=/^[_a-z\d\-\.]{3,}@[_a-z\d\-]{2,}(\.[_a-z\d\-]{2,})+$/i;
-Xinha.RE_url=/(https?:\/\/)?(([a-z0-9_]+:[a-z0-9_]+@)?[a-z0-9_-]{2,}(\.[a-z0-9_-]{2,}){2,}(:[0-9]+)?(\/\S+)*)/i;
-Xinha.Config=function(){
-this.version=Xinha.version.Revision;
-this.width="auto";
-this.height="auto";
-this.sizeIncludesBars=true;
-this.sizeIncludesPanels=true;
-this.panel_dimensions={left:"200px",right:"200px",top:"100px",bottom:"100px"};
-this.iframeWidth=null;
-this.statusBar=true;
-this.htmlareaPaste=false;
-this.mozParaHandler="best";
-this.getHtmlMethod="DOMwalk";
-this.undoSteps=20;
-this.undoTimeout=500;
-this.changeJustifyWithDirection=false;
-this.fullPage=false;
-this.pageStyle="";
-this.pageStyleSheets=[];
-this.baseHref=null;
-this.expandRelativeUrl=true;
-this.stripBaseHref=true;
-this.stripSelfNamedAnchors=true;
-this.only7BitPrintablesInURLs=true;
-this.sevenBitClean=false;
-this.specialReplacements={};
-this.inwardHtml=function(_a){
-return _a;
-};
-this.outwardHtml=function(_b){
-return _b;
-};
-this.killWordOnPaste=true;
-this.makeLinkShowsTarget=true;
-this.charSet=(typeof document.characterSet!="undefined")?document.characterSet:document.charset;
-this.browserQuirksMode=null;
-this.imgURL="images/";
-this.popupURL="popups/";
-this.htmlRemoveTags=null;
-this.flowToolbars=true;
-this.toolbarAlign="left";
-this.showLoading=false;
-this.stripScripts=true;
-this.convertUrlsToLinks=true;
-this.colorPickerCellSize="6px";
-this.colorPickerGranularity=18;
-this.colorPickerPosition="bottom,right";
-this.colorPickerWebSafe=false;
-this.colorPickerSaveColors=20;
-this.fullScreen=false;
-this.fullScreenMargins=[0,0,0,0];
-this.toolbar=[["popupeditor"],["separator","formatblock","fontname","fontsize","bold","italic","underline","strikethrough"],["separator","forecolor","hilitecolor","textindicator"],["separator","subscript","superscript"],["linebreak","separator","justifyleft","justifycenter","justifyright","justifyfull"],["separator","insertorderedlist","insertunorderedlist","outdent","indent"],["separator","inserthorizontalrule","createlink","insertimage","inserttable"],["linebreak","separator","undo","redo","selectall","print"],(Xinha.is_gecko?[]:["cut","copy","paste","overwrite","saveas"]),["separator","killword","clearfonts","removeformat","toggleborders","splitblock","lefttoright","righttoleft"],["separator","htmlmode","showhelp","about"]];
-this.fontname={"— font —":"","Arial":"arial,helvetica,sans-serif","Courier New":"courier new,courier,monospace","Georgia":"georgia,times new roman,times,serif","Tahoma":"tahoma,arial,helvetica,sans-serif","Times New Roman":"times new roman,times,serif","Verdana":"verdana,arial,helvetica,sans-serif","impact":"impact","WingDings":"wingdings"};
-this.fontsize={"— size —":"","1 (8 pt)":"1","2 (10 pt)":"2","3 (12 pt)":"3","4 (14 pt)":"4","5 (18 pt)":"5","6 (24 pt)":"6","7 (36 pt)":"7"};
-this.formatblock={"— format —":"","Heading 1":"h1","Heading 2":"h2","Heading 3":"h3","Heading 4":"h4","Heading 5":"h5","Heading 6":"h6","Normal":"p","Address":"address","Formatted":"pre"};
-this.customSelects={};
-this.debug=true;
-this.URIs={"blank":_editor_url+"popups/blank.html","link":_editor_url+"modules/CreateLink/link.html","insert_image":_editor_url+"modules/InsertImage/insert_image.html","insert_table":_editor_url+"modules/InsertTable/insert_table.html","select_color":_editor_url+"popups/select_color.html","about":_editor_url+"popups/about.html","help":_editor_url+"popups/editor_help.html"};
-this.btnList={bold:["Bold",Xinha._lc({key:"button_bold",string:["ed_buttons_main.gif",3,2]},"Xinha"),false,function(e){
-e.execCommand("bold");
-}],italic:["Italic",Xinha._lc({key:"button_italic",string:["ed_buttons_main.gif",2,2]},"Xinha"),false,function(e){
-e.execCommand("italic");
-}],underline:["Underline",Xinha._lc({key:"button_underline",string:["ed_buttons_main.gif",2,0]},"Xinha"),false,function(e){
-e.execCommand("underline");
-}],strikethrough:["Strikethrough",Xinha._lc({key:"button_strikethrough",string:["ed_buttons_main.gif",3,0]},"Xinha"),false,function(e){
-e.execCommand("strikethrough");
-}],subscript:["Subscript",Xinha._lc({key:"button_subscript",string:["ed_buttons_main.gif",3,1]},"Xinha"),false,function(e){
-e.execCommand("subscript");
-}],superscript:["Superscript",Xinha._lc({key:"button_superscript",string:["ed_buttons_main.gif",2,1]},"Xinha"),false,function(e){
-e.execCommand("superscript");
-}],justifyleft:["Justify Left",["ed_buttons_main.gif",0,0],false,function(e){
-e.execCommand("justifyleft");
-}],justifycenter:["Justify Center",["ed_buttons_main.gif",1,1],false,function(e){
-e.execCommand("justifycenter");
-}],justifyright:["Justify Right",["ed_buttons_main.gif",1,0],false,function(e){
-e.execCommand("justifyright");
-}],justifyfull:["Justify Full",["ed_buttons_main.gif",0,1],false,function(e){
-e.execCommand("justifyfull");
-}],orderedlist:["Ordered List",["ed_buttons_main.gif",0,3],false,function(e){
-e.execCommand("insertorderedlist");
-}],unorderedlist:["Bulleted List",["ed_buttons_main.gif",1,3],false,function(e){
-e.execCommand("insertunorderedlist");
-}],insertorderedlist:["Ordered List",["ed_buttons_main.gif",0,3],false,function(e){
-e.execCommand("insertorderedlist");
-}],insertunorderedlist:["Bulleted List",["ed_buttons_main.gif",1,3],false,function(e){
-e.execCommand("insertunorderedlist");
-}],outdent:["Decrease Indent",["ed_buttons_main.gif",1,2],false,function(e){
-e.execCommand("outdent");
-}],indent:["Increase Indent",["ed_buttons_main.gif",0,2],false,function(e){
-e.execCommand("indent");
-}],forecolor:["Font Color",["ed_buttons_main.gif",3,3],false,function(e){
-e.execCommand("forecolor");
-}],hilitecolor:["Background Color",["ed_buttons_main.gif",2,3],false,function(e){
-e.execCommand("hilitecolor");
-}],undo:["Undoes your last action",["ed_buttons_main.gif",4,2],false,function(e){
-e.execCommand("undo");
-}],redo:["Redoes your last action",["ed_buttons_main.gif",5,2],false,function(e){
-e.execCommand("redo");
-}],cut:["Cut selection",["ed_buttons_main.gif",5,0],false,function(e,cmd){
-e.execCommand(cmd);
-}],copy:["Copy selection",["ed_buttons_main.gif",4,0],false,function(e,cmd){
-e.execCommand(cmd);
-}],paste:["Paste from clipboard",["ed_buttons_main.gif",4,1],false,function(e,cmd){
-e.execCommand(cmd);
-}],selectall:["Select all","ed_selectall.gif",false,function(e){
-e.execCommand("selectall");
-}],inserthorizontalrule:["Horizontal Rule",["ed_buttons_main.gif",6,0],false,function(e){
-e.execCommand("inserthorizontalrule");
-}],createlink:["Insert Web Link",["ed_buttons_main.gif",6,1],false,function(e){
-e._createLink();
-}],insertimage:["Insert/Modify Image",["ed_buttons_main.gif",6,3],false,function(e){
-e.execCommand("insertimage");
-}],inserttable:["Insert Table",["ed_buttons_main.gif",6,2],false,function(e){
-e.execCommand("inserttable");
-}],htmlmode:["Toggle HTML Source",["ed_buttons_main.gif",7,0],true,function(e){
-e.execCommand("htmlmode");
-}],toggleborders:["Toggle Borders",["ed_buttons_main.gif",7,2],false,function(e){
-e._toggleBorders();
-}],print:["Print document",["ed_buttons_main.gif",8,1],false,function(e){
-if(Xinha.is_gecko){
-e._iframe.contentWindow.print();
-}else{
-e.focusEditor();
-print();
-}
-}],saveas:["Save as","ed_saveas.gif",false,function(e){
-e.execCommand("saveas",false,"noname.htm");
-}],about:["About this editor",["ed_buttons_main.gif",8,2],true,function(e){
-e.execCommand("about");
-}],showhelp:["Help using editor",["ed_buttons_main.gif",9,2],true,function(e){
-e.execCommand("showhelp");
-}],splitblock:["Split Block","ed_splitblock.gif",false,function(e){
-e._splitBlock();
-}],lefttoright:["Direction left to right",["ed_buttons_main.gif",0,4],false,function(e){
-e.execCommand("lefttoright");
-}],righttoleft:["Direction right to left",["ed_buttons_main.gif",1,4],false,function(e){
-e.execCommand("righttoleft");
-}],overwrite:["Insert/Overwrite","ed_overwrite.gif",false,function(e){
-e.execCommand("overwrite");
-}],wordclean:["MS Word Cleaner",["ed_buttons_main.gif",5,3],false,function(e){
-e._wordClean();
-}],clearfonts:["Clear Inline Font Specifications",["ed_buttons_main.gif",5,4],true,function(e){
-e._clearFonts();
-}],removeformat:["Remove formatting",["ed_buttons_main.gif",4,4],false,function(e){
-e.execCommand("removeformat");
-}],killword:["Clear MSOffice tags",["ed_buttons_main.gif",4,3],false,function(e){
-e.execCommand("killword");
-}]};
-for(var i in this.btnList){
-var btn=this.btnList[i];
-if(typeof btn!="object"){
-continue;
-}
-if(typeof btn[1]!="string"){
-btn[1][0]=_editor_url+this.imgURL+btn[1][0];
-}else{
-btn[1]=_editor_url+this.imgURL+btn[1];
-}
-btn[0]=Xinha._lc(btn[0]);
-}
-};
-Xinha.Config.prototype.registerButton=function(id,_3c,_3d,_3e,_3f,_40){
-var _41;
-if(typeof id=="string"){
-_41=id;
-}else{
-if(typeof id=="object"){
-_41=id.id;
-}else{
-alert("ERROR [Xinha.Config::registerButton]:\ninvalid arguments");
-return false;
-}
-}
-switch(typeof id){
-case "string":
-this.btnList[id]=[_3c,_3d,_3e,_3f,_40];
-break;
-case "object":
-this.btnList[id.id]=[id.tooltip,id.image,id.textMode,id.action,id.context];
-break;
-}
-};
-Xinha.prototype.registerPanel=function(_42,_43){
-if(!_42){
-_42="right";
-}
-this.setLoadingMessage("Register "+_42+" panel ");
-var _44=this.addPanel(_42);
-if(_43){
-_43.drawPanelIn(_44);
-}
-};
-Xinha.Config.prototype.registerDropdown=function(_45){
-this.customSelects[_45.id]=_45;
-};
-Xinha.Config.prototype.hideSomeButtons=function(_46){
-var _47=this.toolbar;
-for(var i=_47.length;--i>=0;){
-var _49=_47[i];
-for(var j=_49.length;--j>=0;){
-if(_46.indexOf(" "+_49[j]+" ")>=0){
-var len=1;
-if(/separator|space/.test(_49[j+1])){
-len=2;
-}
-_49.splice(j,len);
-}
-}
-}
-};
-Xinha.Config.prototype.addToolbarElement=function(id,_4d,_4e){
-var _4f=this.toolbar;
-var a,i,j,o,sid;
-var _51=false;
-var _52=false;
-var _53=0;
-var _54=0;
-var _55=0;
-var _56=false;
-var _57=false;
-if((id&&typeof id=="object")&&(id.constructor==Array)){
-_51=true;
-}
-if((_4d&&typeof _4d=="object")&&(_4d.constructor==Array)){
-_52=true;
-_53=_4d.length;
-}
-if(_51){
-for(i=0;i=0;){
-a.splice(j,0,id[i]);
-}
-}else{
-a[j]=id;
-}
-}else{
-if(_4e<0){
-j=j+_4e+1;
-}else{
-if(_4e>0){
-j=j+_4e;
-}
-}
-if(_51){
-for(i=id.length;--i>=0;){
-a.splice(j,0,id[i]);
-}
-}else{
-a.splice(j,0,id);
-}
-}
-}else{
-_4f[0].splice(0,0,"separator");
-if(_51){
-for(i=id.length;--i>=0;){
-_4f[0].splice(0,0,id[i]);
-}
-}else{
-_4f[0].splice(0,0,id);
-}
-}
-};
-Xinha.Config.prototype.removeToolbarElement=Xinha.Config.prototype.hideSomeButtons;
-Xinha.replaceAll=function(_58){
-var tas=document.getElementsByTagName("textarea");
-for(var i=tas.length;i>0;(new Xinha(tas[--i],_58)).generate()){
-}
-};
-Xinha.replace=function(id,_5c){
-var ta=Xinha.getElementById("textarea",id);
-return ta?(new Xinha(ta,_5c)).generate():null;
-};
-Xinha.prototype._createToolbar=function(){
-this.setLoadingMessage(Xinha._lc("Create Toolbar"));
-var _5e=this;
-var _5f=document.createElement("div");
-this._toolBar=this._toolbar=_5f;
-_5f.className="toolbar";
-_5f.unselectable="1";
-_5f.align=this.config.toolbarAlign;
-Xinha.freeLater(this,"_toolBar");
-Xinha.freeLater(this,"_toolbar");
-var _60=null;
-var _61={};
-this._toolbarObjects=_61;
-this._createToolbar1(_5e,_5f,_61);
-this._htmlArea.appendChild(_5f);
-return _5f;
-};
-Xinha.prototype._setConfig=function(_62){
-this.config=_62;
-};
-Xinha.prototype._addToolbar=function(){
-this._createToolbar1(this,this._toolbar,this._toolbarObjects);
-};
-Xinha._createToolbarBreakingElement=function(){
-var brk=document.createElement("div");
-brk.style.height="1px";
-brk.style.width="1px";
-brk.style.lineHeight="1px";
-brk.style.fontSize="1px";
-brk.style.clear="both";
-return brk;
-};
-Xinha.prototype._createToolbar1=function(_64,_65,_66){
-var _67;
-if(_64.config.flowToolbars){
-_65.appendChild(Xinha._createToolbarBreakingElement());
-}
-function newLine(){
-if(typeof _67!="undefined"&&_67.childNodes.length===0){
-return;
-}
-var _68=document.createElement("table");
-_68.border="0px";
-_68.cellSpacing="0px";
-_68.cellPadding="0px";
-if(_64.config.flowToolbars){
-if(Xinha.is_ie){
-_68.style.styleFloat="left";
-}else{
-_68.style.cssFloat="left";
-}
-}
-_65.appendChild(_68);
-var _69=document.createElement("tbody");
-_68.appendChild(_69);
-_67=document.createElement("tr");
-_69.appendChild(_67);
-_68.className="toolbarRow";
-}
-newLine();
-function setButtonStatus(id,_6b){
-var _6c=this[id];
-var el=this.element;
-if(_6c!=_6b){
-switch(id){
-case "enabled":
-if(_6b){
-Xinha._removeClass(el,"buttonDisabled");
-el.disabled=false;
-}else{
-Xinha._addClass(el,"buttonDisabled");
-el.disabled=true;
-}
-break;
-case "active":
-if(_6b){
-Xinha._addClass(el,"buttonPressed");
-}else{
-Xinha._removeClass(el,"buttonPressed");
-}
-break;
-}
-this[id]=_6b;
-}
-}
-function createSelect(txt){
-var _6f=null;
-var el=null;
-var cmd=null;
-var _72=_64.config.customSelects;
-var _73=null;
-var _74="";
-switch(txt){
-case "fontsize":
-case "fontname":
-case "formatblock":
-_6f=_64.config[txt];
-cmd=txt;
-break;
-default:
-cmd=txt;
-var _75=_72[cmd];
-if(typeof _75!="undefined"){
-_6f=_75.options;
-_73=_75.context;
-if(typeof _75.tooltip!="undefined"){
-_74=_75.tooltip;
-}
-}else{
-alert("ERROR [createSelect]:\nCan't find the requested dropdown definition");
-}
-break;
-}
-if(_6f){
-el=document.createElement("select");
-el.title=_74;
-var obj={name:txt,element:el,enabled:true,text:false,cmd:cmd,state:setButtonStatus,context:_73};
-Xinha.freeLater(obj);
-_66[txt]=obj;
-for(var i in _6f){
-if(typeof (_6f[i])!="string"){
-continue;
-}
-var op=document.createElement("option");
-op.innerHTML=Xinha._lc(i);
-op.value=_6f[i];
-el.appendChild(op);
-}
-Xinha._addEvent(el,"change",function(){
-_64._comboSelected(el,txt);
-});
-}
-return el;
-}
-function createButton(txt){
-var el,btn,obj=null;
-switch(txt){
-case "separator":
-if(_64.config.flowToolbars){
-newLine();
-}
-el=document.createElement("div");
-el.className="separator";
-break;
-case "space":
-el=document.createElement("div");
-el.className="space";
-break;
-case "linebreak":
-newLine();
-return false;
-case "textindicator":
-el=document.createElement("div");
-el.appendChild(document.createTextNode("A"));
-el.className="indicator";
-el.title=Xinha._lc("Current style");
-obj={name:txt,element:el,enabled:true,active:false,text:false,cmd:"textindicator",state:setButtonStatus};
-Xinha.freeLater(obj);
-_66[txt]=obj;
-break;
-default:
-btn=_64.config.btnList[txt];
-}
-if(!el&&btn){
-el=document.createElement("a");
-el.style.display="block";
-el.href="javascript:void(0)";
-el.style.textDecoration="none";
-el.title=btn[0];
-el.className="button";
-el.style.direction="ltr";
-obj={name:txt,element:el,enabled:true,active:false,text:btn[2],cmd:btn[3],state:setButtonStatus,context:btn[4]||null};
-Xinha.freeLater(el);
-Xinha.freeLater(obj);
-_66[txt]=obj;
-el.ondrag=function(){
-return false;
-};
-Xinha._addEvent(el,"mouseout",function(ev){
-if(obj.enabled){
-Xinha._removeClass(el,"buttonActive");
-if(obj.active){
-Xinha._addClass(el,"buttonPressed");
-}
-}
-});
-Xinha._addEvent(el,"mousedown",function(ev){
-if(obj.enabled){
-Xinha._addClass(el,"buttonActive");
-Xinha._removeClass(el,"buttonPressed");
-Xinha._stopEvent(Xinha.is_ie?window.event:ev);
-}
-});
-Xinha._addEvent(el,"click",function(ev){
-ev=Xinha.is_ie?window.event:ev;
-_64.btnClickEvent=ev;
-if(obj.enabled){
-Xinha._removeClass(el,"buttonActive");
-if(Xinha.is_gecko){
-_64.activateEditor();
-}
-obj.cmd(_64,obj.name,obj);
-Xinha._stopEvent(ev);
-}
-});
-var _7e=Xinha.makeBtnImg(btn[1]);
-var img=_7e.firstChild;
-Xinha.freeLater(_7e);
-Xinha.freeLater(img);
-el.appendChild(_7e);
-obj.imgel=img;
-obj.swapImage=function(_80){
-if(typeof _80!="string"){
-img.src=_80[0];
-img.style.position="relative";
-img.style.top=_80[2]?("-"+(18*(_80[2]+1))+"px"):"-18px";
-img.style.left=_80[1]?("-"+(18*(_80[1]+1))+"px"):"-18px";
-}else{
-obj.imgel.src=_80;
-img.style.top="0px";
-img.style.left="0px";
-}
-};
-}else{
-if(!el){
-el=createSelect(txt);
-}
-}
-return el;
-}
-var _81=true;
-for(var i=0;i] button to switch back to WYSIWYG.");
-div.style.display="none";
-this._statusBarTextMode=div;
-Xinha.freeLater(this,"_statusBarTextMode");
-this._statusBar.appendChild(div);
-if(!this.config.statusBar){
-_8e.style.display="none";
-}
-return _8e;
-};
-Xinha.prototype.generate=function(){
-if(!Xinha.isSupportedBrowser){
-return;
-}
-var i;
-var _91=this;
-var url;
-var _93=false;
-var _94=document.getElementsByTagName("link");
-if(!document.getElementById("XinhaCoreDesign")){
-_editor_css=(typeof _editor_css=="string")?_editor_css:"Xinha.css";
-for(i=0;i<_94.length;i++){
-if((_94[i].rel=="stylesheet")&&(_94[i].href==_editor_url+_editor_css)){
-_93=true;
-}
-}
-if(!_93){
-Xinha.loadStyle(_editor_css,null,"XinhaCoreDesign",true);
-}
-}
-if(_editor_skin!==""&&!document.getElementById("XinhaSkin")){
-_93=false;
-for(i=0;i<_94.length;i++){
-if((_94[i].rel=="stylesheet")&&(_94[i].href==_editor_url+"skins/"+_editor_skin+"/skin.css")){
-_93=true;
-}
-}
-if(!_93){
-Xinha.loadStyle("skins/"+_editor_skin+"/skin.css",null,"XinhaSkin");
-}
-}
-if(Xinha.is_ie){
-url=_editor_url+"modules/InternetExplorer/InternetExplorer.js";
-if(!Xinha.loadPlugins([{plugin:"InternetExplorer",url:url}],function(){
-_91.generate();
-})){
-return false;
-}
-_91._browserSpecificPlugin=_91.registerPlugin("InternetExplorer");
-}else{
-if(Xinha.is_webkit){
-url=_editor_url+"modules/WebKit/WebKit.js";
-if(!Xinha.loadPlugins([{plugin:"WebKit",url:url}],function(){
-_91.generate();
-})){
-return false;
-}
-_91._browserSpecificPlugin=_91.registerPlugin("WebKit");
-}else{
-if(Xinha.is_opera){
-url=_editor_url+"modules/Opera/Opera.js";
-if(!Xinha.loadPlugins([{plugin:"Opera",url:url}],function(){
-_91.generate();
-})){
-return false;
-}
-_91._browserSpecificPlugin=_91.registerPlugin("Opera");
-}else{
-if(Xinha.is_gecko){
-url=_editor_url+"modules/Gecko/Gecko.js";
-if(!Xinha.loadPlugins([{plugin:"Gecko",url:url}],function(){
-_91.generate();
-})){
-return false;
-}
-_91._browserSpecificPlugin=_91.registerPlugin("Gecko");
-}
-}
-}
-}
-if(typeof Dialog=="undefined"&&!Xinha._loadback(_editor_url+"modules/Dialogs/dialog.js",this.generate,this)){
-return false;
-}
-if(typeof Xinha.Dialog=="undefined"&&!Xinha._loadback(_editor_url+"modules/Dialogs/inline-dialog.js",this.generate,this)){
-return false;
-}
-url=_editor_url+"modules/FullScreen/full-screen.js";
-if(!Xinha.loadPlugins([{plugin:"FullScreen",url:url}],function(){
-_91.generate();
-})){
-return false;
-}
-url=_editor_url+"modules/ColorPicker/ColorPicker.js";
-if(!Xinha.loadPlugins([{plugin:"ColorPicker",url:url}],function(){
-_91.generate();
-})){
-return false;
-}else{
-if(typeof ColorPicker!="undefined"){
-_91.registerPlugin("ColorPicker");
-}
-}
-var _95=_91.config.toolbar;
-for(i=_95.length;--i>=0;){
-for(var j=_95[i].length;--j>=0;){
-switch(_95[i][j]){
-case "popupeditor":
-_91.registerPlugin("FullScreen");
-break;
-case "insertimage":
-url=_editor_url+"modules/InsertImage/insert_image.js";
-if(typeof Xinha.prototype._insertImage=="undefined"&&!Xinha.loadPlugins([{plugin:"InsertImage",url:url}],function(){
-_91.generate();
-})){
-return false;
-}else{
-if(typeof InsertImage!="undefined"){
-_91.registerPlugin("InsertImage");
-}
-}
-break;
-case "createlink":
-url=_editor_url+"modules/CreateLink/link.js";
-if(typeof Linker=="undefined"&&!Xinha.loadPlugins([{plugin:"CreateLink",url:url}],function(){
-_91.generate();
-})){
-return false;
-}else{
-if(typeof CreateLink!="undefined"){
-_91.registerPlugin("CreateLink");
-}
-}
-break;
-case "inserttable":
-url=_editor_url+"modules/InsertTable/insert_table.js";
-if(!Xinha.loadPlugins([{plugin:"InsertTable",url:url}],function(){
-_91.generate();
-})){
-return false;
-}else{
-if(typeof InsertTable!="undefined"){
-_91.registerPlugin("InsertTable");
-}
-}
-break;
-}
-}
-}
-if(Xinha.is_gecko&&_91.config.mozParaHandler!="built-in"){
-if(!Xinha.loadPlugins([{plugin:"EnterParagraphs",url:_editor_url+"modules/Gecko/paraHandlerBest.js"}],function(){
-_91.generate();
-})){
-return false;
-}
-_91.registerPlugin("EnterParagraphs");
-}
-if(Xinha.ie_version==8){
-this.config.getHtmlMethod="TransformInnerHTML";
-}
-switch(this.config.getHtmlMethod){
-case "TransformInnerHTML":
-var _97=_editor_url+"modules/GetHtml/TransformInnerHTML.js";
-break;
-default:
-var _97=_editor_url+"modules/GetHtml/DOMwalk.js";
-break;
-}
-if(!Xinha.loadPlugins([{plugin:"GetHtmlImplementation",url:_97}],function(){
-_91.generate();
-})){
-return false;
-}else{
-_91.registerPlugin("GetHtmlImplementation");
-}
-this.setLoadingMessage(Xinha._lc("Generate Xinha framework"));
-this._framework={"table":document.createElement("table"),"tbody":document.createElement("tbody"),"tb_row":document.createElement("tr"),"tb_cell":document.createElement("td"),"tp_row":document.createElement("tr"),"tp_cell":this._panels.top.container,"ler_row":document.createElement("tr"),"lp_cell":this._panels.left.container,"ed_cell":document.createElement("td"),"rp_cell":this._panels.right.container,"bp_row":document.createElement("tr"),"bp_cell":this._panels.bottom.container,"sb_row":document.createElement("tr"),"sb_cell":document.createElement("td")};
-Xinha.freeLater(this._framework);
-var fw=this._framework;
-fw.table.border="0";
-fw.table.cellPadding="0";
-fw.table.cellSpacing="0";
-fw.tb_row.style.verticalAlign="top";
-fw.tp_row.style.verticalAlign="top";
-fw.ler_row.style.verticalAlign="top";
-fw.bp_row.style.verticalAlign="top";
-fw.sb_row.style.verticalAlign="top";
-fw.ed_cell.style.position="relative";
-fw.tb_row.appendChild(fw.tb_cell);
-fw.tb_cell.colSpan=3;
-fw.tp_row.appendChild(fw.tp_cell);
-fw.tp_cell.colSpan=3;
-fw.ler_row.appendChild(fw.lp_cell);
-fw.ler_row.appendChild(fw.ed_cell);
-fw.ler_row.appendChild(fw.rp_cell);
-fw.bp_row.appendChild(fw.bp_cell);
-fw.bp_cell.colSpan=3;
-fw.sb_row.appendChild(fw.sb_cell);
-fw.sb_cell.colSpan=3;
-fw.tbody.appendChild(fw.tb_row);
-fw.tbody.appendChild(fw.tp_row);
-fw.tbody.appendChild(fw.ler_row);
-fw.tbody.appendChild(fw.bp_row);
-fw.tbody.appendChild(fw.sb_row);
-fw.table.appendChild(fw.tbody);
-var _99=this._framework.table;
-this._htmlArea=_99;
-Xinha.freeLater(this,"_htmlArea");
-_99.className="htmlarea";
-this._framework.tb_cell.appendChild(this._createToolbar());
-var _9a=document.createElement("iframe");
-_9a.src=this.popupURL(_91.config.URIs.blank);
-_9a.id="XinhaIFrame_"+this._textArea.id;
-this._framework.ed_cell.appendChild(_9a);
-this._iframe=_9a;
-this._iframe.className="xinha_iframe";
-Xinha.freeLater(this,"_iframe");
-var _9b=this._createStatusBar();
-this._framework.sb_cell.appendChild(_9b);
-var _9c=this._textArea;
-_9c.parentNode.insertBefore(_99,_9c);
-_9c.className="xinha_textarea";
-Xinha.removeFromParent(_9c);
-this._framework.ed_cell.appendChild(_9c);
-Xinha.addDom0Event(this._textArea,"click",function(){
-if(Xinha._currentlyActiveEditor!=this){
-_91.updateToolbar();
-}
-return true;
-});
-if(_9c.form){
-Xinha.prependDom0Event(this._textArea.form,"submit",function(){
-_91.firePluginEvent("onBeforeSubmit");
-_91._textArea.value=_91.outwardHtml(_91.getHTML());
-return true;
-});
-var _9d=_9c.value;
-Xinha.prependDom0Event(this._textArea.form,"reset",function(){
-_91.setHTML(_91.inwardHtml(_9d));
-_91.updateToolbar();
-return true;
-});
-if(!_9c.form.xinha_submit){
-try{
-_9c.form.xinha_submit=_9c.form.submit;
-_9c.form.submit=function(){
-this.onsubmit();
-this.xinha_submit();
-};
-}
-catch(ex){
-}
-}
-}
-Xinha.prependDom0Event(window,"unload",function(){
-_91.firePluginEvent("onBeforeUnload");
-_9c.value=_91.outwardHtml(_91.getHTML());
-if(!Xinha.is_ie){
-_99.parentNode.replaceChild(_9c,_99);
-}
-return true;
-});
-_9c.style.display="none";
-_91.initSize();
-this.setLoadingMessage(Xinha._lc("Finishing"));
-_91._iframeLoadDone=false;
-if(Xinha.is_opera){
-_91.initIframe();
-}else{
-Xinha._addEvent(this._iframe,"load",function(e){
-if(!_91._iframeLoadDone){
-_91._iframeLoadDone=true;
-_91.initIframe();
-}
-return true;
-});
-}
-};
-Xinha.prototype.initSize=function(){
-this.setLoadingMessage(Xinha._lc("Init editor size"));
-var _9f=this;
-var _a0=null;
-var _a1=null;
-switch(this.config.width){
-case "auto":
-_a0=this._initial_ta_size.w;
-break;
-case "toolbar":
-_a0=this._toolBar.offsetWidth+"px";
-break;
-default:
-_a0=/[^0-9]/.test(this.config.width)?this.config.width:this.config.width+"px";
-break;
-}
-switch(this.config.height){
-case "auto":
-_a1=this._initial_ta_size.h;
-break;
-default:
-_a1=/[^0-9]/.test(this.config.height)?this.config.height:this.config.height+"px";
-break;
-}
-this.sizeEditor(_a0,_a1,this.config.sizeIncludesBars,this.config.sizeIncludesPanels);
-this.notifyOn("panel_change",function(){
-_9f.sizeEditor();
-});
-};
-Xinha.prototype.sizeEditor=function(_a2,_a3,_a4,_a5){
-if(this._risizing){
-return;
-}
-this._risizing=true;
-this.notifyOf("before_resize",{width:_a2,height:_a3});
-this.firePluginEvent("onBeforeResize",_a2,_a3);
-this._iframe.style.height="100%";
-this._textArea.style.height="100%";
-this._iframe.style.width="";
-this._textArea.style.width="";
-if(_a4!==null){
-this._htmlArea.sizeIncludesToolbars=_a4;
-}
-if(_a5!==null){
-this._htmlArea.sizeIncludesPanels=_a5;
-}
-if(_a2){
-this._htmlArea.style.width=_a2;
-if(!this._htmlArea.sizeIncludesPanels){
-var _a6=this._panels.right;
-if(_a6.on&&_a6.panels.length&&Xinha.hasDisplayedChildren(_a6.div)){
-this._htmlArea.style.width=(this._htmlArea.offsetWidth+parseInt(this.config.panel_dimensions.right,10))+"px";
-}
-var _a7=this._panels.left;
-if(_a7.on&&_a7.panels.length&&Xinha.hasDisplayedChildren(_a7.div)){
-this._htmlArea.style.width=(this._htmlArea.offsetWidth+parseInt(this.config.panel_dimensions.left,10))+"px";
-}
-}
-}
-if(_a3){
-this._htmlArea.style.height=_a3;
-if(!this._htmlArea.sizeIncludesToolbars){
-this._htmlArea.style.height=(this._htmlArea.offsetHeight+this._toolbar.offsetHeight+this._statusBar.offsetHeight)+"px";
-}
-if(!this._htmlArea.sizeIncludesPanels){
-var _a8=this._panels.top;
-if(_a8.on&&_a8.panels.length&&Xinha.hasDisplayedChildren(_a8.div)){
-this._htmlArea.style.height=(this._htmlArea.offsetHeight+parseInt(this.config.panel_dimensions.top,10))+"px";
-}
-var _a9=this._panels.bottom;
-if(_a9.on&&_a9.panels.length&&Xinha.hasDisplayedChildren(_a9.div)){
-this._htmlArea.style.height=(this._htmlArea.offsetHeight+parseInt(this.config.panel_dimensions.bottom,10))+"px";
-}
-}
-}
-_a2=this._htmlArea.offsetWidth;
-_a3=this._htmlArea.offsetHeight;
-var _aa=this._panels;
-var _ab=this;
-var _ac=1;
-function panel_is_alive(pan){
-if(_aa[pan].on&&_aa[pan].panels.length&&Xinha.hasDisplayedChildren(_aa[pan].container)){
-_aa[pan].container.style.display="";
-return true;
-}else{
-_aa[pan].container.style.display="none";
-return false;
-}
-}
-if(panel_is_alive("left")){
-_ac+=1;
-}
-if(panel_is_alive("right")){
-_ac+=1;
-}
-this._framework.tb_cell.colSpan=_ac;
-this._framework.tp_cell.colSpan=_ac;
-this._framework.bp_cell.colSpan=_ac;
-this._framework.sb_cell.colSpan=_ac;
-if(!this._framework.tp_row.childNodes.length){
-Xinha.removeFromParent(this._framework.tp_row);
-}else{
-if(!Xinha.hasParentNode(this._framework.tp_row)){
-this._framework.tbody.insertBefore(this._framework.tp_row,this._framework.ler_row);
-}
-}
-if(!this._framework.bp_row.childNodes.length){
-Xinha.removeFromParent(this._framework.bp_row);
-}else{
-if(!Xinha.hasParentNode(this._framework.bp_row)){
-this._framework.tbody.insertBefore(this._framework.bp_row,this._framework.ler_row.nextSibling);
-}
-}
-if(!this.config.statusBar){
-Xinha.removeFromParent(this._framework.sb_row);
-}else{
-if(!Xinha.hasParentNode(this._framework.sb_row)){
-this._framework.table.appendChild(this._framework.sb_row);
-}
-}
-this._framework.lp_cell.style.width=this.config.panel_dimensions.left;
-this._framework.rp_cell.style.width=this.config.panel_dimensions.right;
-this._framework.tp_cell.style.height=this.config.panel_dimensions.top;
-this._framework.bp_cell.style.height=this.config.panel_dimensions.bottom;
-this._framework.tb_cell.style.height=this._toolBar.offsetHeight+"px";
-this._framework.sb_cell.style.height=this._statusBar.offsetHeight+"px";
-var _ae=_a3-this._toolBar.offsetHeight-this._statusBar.offsetHeight;
-if(panel_is_alive("top")){
-_ae-=parseInt(this.config.panel_dimensions.top,10);
-}
-if(panel_is_alive("bottom")){
-_ae-=parseInt(this.config.panel_dimensions.bottom,10);
-}
-this._iframe.style.height=_ae+"px";
-var _af=_a2;
-if(panel_is_alive("left")){
-_af-=parseInt(this.config.panel_dimensions.left,10);
-}
-if(panel_is_alive("right")){
-_af-=parseInt(this.config.panel_dimensions.right,10);
-}
-var _b0=(this.config.iframeWidth)?parseInt(this.config.iframeWidth,10):null;
-this._iframe.style.width=(_b0&&_b0<_af)?_b0+"px":_af+"px";
-this._textArea.style.height=this._iframe.style.height;
-this._textArea.style.width=this._iframe.style.width;
-this.notifyOf("resize",{width:this._htmlArea.offsetWidth,height:this._htmlArea.offsetHeight});
-this.firePluginEvent("onResize",this._htmlArea.offsetWidth,this._htmlArea.offsetWidth);
-this._risizing=false;
-};
-Xinha.prototype.registerPanel=function(_b1,_b2){
-if(!_b1){
-_b1="right";
-}
-this.setLoadingMessage("Register "+_b1+" panel ");
-var _b3=this.addPanel(_b1);
-if(_b2){
-_b2.drawPanelIn(_b3);
-}
-};
-Xinha.prototype.addPanel=function(_b4){
-var div=document.createElement("div");
-div.side=_b4;
-if(_b4=="left"||_b4=="right"){
-div.style.width=this.config.panel_dimensions[_b4];
-if(this._iframe){
-div.style.height=this._iframe.style.height;
-}
-}
-Xinha.addClasses(div,"panel");
-this._panels[_b4].panels.push(div);
-this._panels[_b4].div.appendChild(div);
-this.notifyOf("panel_change",{"action":"add","panel":div});
-this.firePluginEvent("onPanelChange","add",div);
-return div;
-};
-Xinha.prototype.removePanel=function(_b6){
-this._panels[_b6.side].div.removeChild(_b6);
-var _b7=[];
-for(var i=0;i";
-}else{
-if(_c8.config.browserQuirksMode===true){
-var _ca="";
-}else{
-var _ca=Xinha.getDoctype(document);
-}
-}
-if(!_c8.config.fullPage){
-_c9+=_ca+"\n";
-_c9+="\n";
-_c9+="\n";
-_c9+="\n";
-if(typeof _c8.config.baseHref!="undefined"&&_c8.config.baseHref!==null){
-_c9+="\n";
-}
-_c9+=Xinha.addCoreCSS();
-if(typeof _c8.config.pageStyleSheets!=="undefined"){
-for(var i=0;i<_c8.config.pageStyleSheets.length;i++){
-if(_c8.config.pageStyleSheets[i].length>0){
-_c9+="";
-}
-}
-}
-if(_c8.config.pageStyle){
-_c9+="";
-}
-_c9+="\n";
-_c9+="\n";
-_c9+=_c8.inwardHtml(_c8._textArea.value);
-_c9+="\n";
-_c9+="";
-}else{
-_c9=_c8.inwardHtml(_c8._textArea.value);
-if(_c9.match(Xinha.RE_doctype)){
-_c8.setDoctype(RegExp.$1);
-}
-var _cc=_c9.match(//gi);
-_c9=_c9.replace(/\s*/gi,"");
-_cc?_c9=_c9.replace(/<\/head>/i,_cc.join("\n")+"\n"):null;
-}
-doc.write(_c9);
-doc.close();
-if(this.config.fullScreen){
-this._fullScreen();
-}
-this.setEditorEvents();
-};
-Xinha.prototype.whenDocReady=function(f){
-var e=this;
-if(this._doc&&this._doc.body){
-f();
-}else{
-setTimeout(function(){
-e.whenDocReady(f);
-},50);
-}
-};
-Xinha.prototype.setMode=function(_cf){
-var _d0;
-if(typeof _cf=="undefined"){
-_cf=this._editMode=="textmode"?"wysiwyg":"textmode";
-}
-switch(_cf){
-case "textmode":
-this.firePluginEvent("onBeforeMode","textmode");
-this.setCC("iframe");
-_d0=this.outwardHtml(this.getHTML());
-this.setHTML(_d0);
-this.deactivateEditor();
-this._iframe.style.display="none";
-this._textArea.style.display="";
-if(this.config.statusBar){
-this._statusBarTree.style.display="none";
-this._statusBarTextMode.style.display="";
-}
-this.findCC("textarea");
-this.notifyOf("modechange",{"mode":"text"});
-this.firePluginEvent("onMode","textmode");
-break;
-case "wysiwyg":
-this.firePluginEvent("onBeforeMode","wysiwyg");
-this.setCC("textarea");
-_d0=this.inwardHtml(this.getHTML());
-this.deactivateEditor();
-this.setHTML(_d0);
-this._iframe.style.display="";
-this._textArea.style.display="none";
-this.activateEditor();
-if(this.config.statusBar){
-this._statusBarTree.style.display="";
-this._statusBarTextMode.style.display="none";
-}
-this.findCC("iframe");
-this.notifyOf("modechange",{"mode":"wysiwyg"});
-this.firePluginEvent("onMode","wysiwyg");
-break;
-default:
-alert("Mode <"+_cf+"> not defined!");
-return false;
-}
-this._editMode=_cf;
-};
-Xinha.prototype.setFullHTML=function(_d1){
-var _d2=RegExp.multiline;
-RegExp.multiline=true;
-if(_d1.match(Xinha.RE_doctype)){
-this.setDoctype(RegExp.$1);
-}
-RegExp.multiline=_d2;
-if(0){
-if(_d1.match(Xinha.RE_head)){
-this._doc.getElementsByTagName("head")[0].innerHTML=RegExp.$1;
-}
-if(_d1.match(Xinha.RE_body)){
-this._doc.getElementsByTagName("body")[0].innerHTML=RegExp.$1;
-}
-}else{
-var _d3=this.editorIsActivated();
-if(_d3){
-this.deactivateEditor();
-}
-var _d4=/((.|\n)*?)<\/html>/i;
-_d1=_d1.replace(_d4,"$1");
-this._doc.open("text/html","replace");
-this._doc.write(_d1);
-this._doc.close();
-if(_d3){
-this.activateEditor();
-}
-this.setEditorEvents();
-return true;
-}
-};
-Xinha.prototype.setEditorEvents=function(){
-var _d5=this;
-var doc=this._doc;
-_d5.whenDocReady(function(){
-Xinha._addEvents(doc,["mousedown"],function(){
-_d5.activateEditor();
-return true;
-});
-if(Xinha.is_ie){
-Xinha._addEvent(_d5._doc.getElementsByTagName("html")[0],"click",function(){
-if(_d5._iframe.contentWindow.event.srcElement.tagName.toLowerCase()=="html"){
-var r=_d5._doc.body.createTextRange();
-r.collapse();
-r.select();
-}
-return true;
-});
-}
-Xinha._addEvents(doc,["keydown","keypress","mousedown","mouseup","drag"],function(_d8){
-return _d5._editorEvent(Xinha.is_ie?_d5._iframe.contentWindow.event:_d8);
-});
-for(var i in _d5.plugins){
-var _da=_d5.plugins[i].instance;
-Xinha.refreshPlugin(_da);
-}
-if(typeof _d5._onGenerate=="function"){
-_d5._onGenerate();
-}
-Xinha.addDom0Event(window,"resize",function(e){
-_d5.sizeEditor();
-});
-_d5.removeLoadingMessage();
-});
-};
-Xinha.prototype.registerPlugin=function(){
-if(!Xinha.isSupportedBrowser){
-return;
-}
-var _dc=arguments[0];
-if(_dc===null||typeof _dc=="undefined"||(typeof _dc=="string"&&typeof window[_dc]=="undefined")){
-return false;
-}
-var _dd=[];
-for(var i=1;i=0;){
-ta.value+=" ";
-}
-ta.value+=str+"\n";
-}
-function _dt(root,_108){
-var tag=root.tagName.toLowerCase(),i;
-var ns=Xinha.is_ie?root.scopeName:root.prefix;
-debug(_108,"- "+tag+" ["+ns+"]");
-for(i=root.firstChild;i;i=i.nextSibling){
-if(i.nodeType==1){
-_dt(i,_108+2);
-}
-}
-}
-_dt(this._doc.body,0);
-document.body.appendChild(ta);
-};
-Xinha.getInnerText=function(el){
-var txt="",i;
-for(i=el.firstChild;i;i=i.nextSibling){
-if(i.nodeType==3){
-txt+=i.data;
-}else{
-if(i.nodeType==1){
-txt+=Xinha.getInnerText(i);
-}
-}
-}
-return txt;
-};
-Xinha.prototype._wordClean=function(){
-var _10d=this;
-var _10e={empty_tags:0,mso_class:0,mso_style:0,mso_xmlel:0,orig_len:this._doc.body.innerHTML.length,T:(new Date()).getTime()};
-var _10f={empty_tags:"Empty tags removed: ",mso_class:"MSO class names removed: ",mso_style:"MSO inline style removed: ",mso_xmlel:"MSO XML elements stripped: "};
-function showStats(){
-var txt="Xinha word cleaner stats: \n\n";
-for(var i in _10e){
-if(_10f[i]){
-txt+=_10f[i]+_10e[i]+"\n";
-}
-}
-txt+="\nInitial document length: "+_10e.orig_len+"\n";
-txt+="Final document length: "+_10d._doc.body.innerHTML.length+"\n";
-txt+="Clean-up took "+(((new Date()).getTime()-_10e.T)/1000)+" seconds";
-alert(txt);
-}
-function clearClass(node){
-var newc=node.className.replace(/(^|\s)mso.*?(\s|$)/ig," ");
-if(newc!=node.className){
-node.className=newc;
-if(!(/\S/.test(node.className))){
-node.removeAttribute("className");
-++_10e.mso_class;
-}
-}
-}
-function clearStyle(node){
-var _115=node.style.cssText.split(/\s*;\s*/);
-for(var i=_115.length;--i>=0;){
-if((/^mso|^tab-stops/i.test(_115[i]))||(/^margin\s*:\s*0..\s+0..\s+0../i.test(_115[i]))){
-++_10e.mso_style;
-_115.splice(i,1);
-}
-}
-node.style.cssText=_115.join("; ");
-}
-var _117=null;
-if(Xinha.is_ie){
-_117=function(el){
-el.outerHTML=Xinha.htmlEncode(el.innerText);
-++_10e.mso_xmlel;
-};
-}else{
-_117=function(el){
-var txt=document.createTextNode(Xinha.getInnerText(el));
-el.parentNode.insertBefore(txt,el);
-Xinha.removeFromParent(el);
-++_10e.mso_xmlel;
-};
-}
-function checkEmpty(el){
-if(/^(span|b|strong|i|em|font|div|p)$/i.test(el.tagName)&&!el.firstChild){
-Xinha.removeFromParent(el);
-++_10e.empty_tags;
-}
-}
-function parseTree(root){
-var tag=root.tagName.toLowerCase(),i,next;
-if((Xinha.is_ie&&root.scopeName!="HTML")||(!Xinha.is_ie&&(/:/.test(tag)))){
-_117(root);
-return false;
-}else{
-clearClass(root);
-clearStyle(root);
-for(i=root.firstChild;i;i=next){
-next=i.nextSibling;
-if(i.nodeType==1&&parseTree(i)){
-checkEmpty(i);
-}
-}
-}
-return true;
-}
-parseTree(this._doc.body);
-this.updateToolbar();
-};
-Xinha.prototype._clearFonts=function(){
-var D=this.getInnerHTML();
-if(confirm(Xinha._lc("Would you like to clear font typefaces?"))){
-D=D.replace(/face="[^"]*"/gi,"");
-D=D.replace(/font-family:[^;}"']+;?/gi,"");
-}
-if(confirm(Xinha._lc("Would you like to clear font sizes?"))){
-D=D.replace(/size="[^"]*"/gi,"");
-D=D.replace(/font-size:[^;}"']+;?/gi,"");
-}
-if(confirm(Xinha._lc("Would you like to clear font colours?"))){
-D=D.replace(/color="[^"]*"/gi,"");
-D=D.replace(/([^-])color:[^;}"']+;?/gi,"$1");
-}
-D=D.replace(/(style|class)="\s*"/gi,"");
-D=D.replace(/<(font|span)\s*>/gi,"");
-this.setHTML(D);
-this.updateToolbar();
-};
-Xinha.prototype._splitBlock=function(){
-this._doc.execCommand("formatblock",false,"div");
-};
-Xinha.prototype.forceRedraw=function(){
-this._doc.body.style.visibility="hidden";
-this._doc.body.style.visibility="";
-};
-Xinha.prototype.focusEditor=function(){
-switch(this._editMode){
-case "wysiwyg":
-try{
-if(Xinha._someEditorHasBeenActivated){
-this.activateEditor();
-this._iframe.contentWindow.focus();
-}
-}
-catch(ex){
-}
-break;
-case "textmode":
-try{
-this._textArea.focus();
-}
-catch(e){
-}
-break;
-default:
-alert("ERROR: mode "+this._editMode+" is not defined");
-}
-return this._doc;
-};
-Xinha.prototype._undoTakeSnapshot=function(){
-++this._undoPos;
-if(this._undoPos>=this.config.undoSteps){
-this._undoQueue.shift();
---this._undoPos;
-}
-var take=true;
-var txt=this.getInnerHTML();
-if(this._undoPos>0){
-take=(this._undoQueue[this._undoPos-1]!=txt);
-}
-if(take){
-this._undoQueue[this._undoPos]=txt;
-}else{
-this._undoPos--;
-}
-};
-Xinha.prototype.undo=function(){
-if(this._undoPos>0){
-var txt=this._undoQueue[--this._undoPos];
-if(txt){
-this.setHTML(txt);
-}else{
-++this._undoPos;
-}
-}
-};
-Xinha.prototype.redo=function(){
-if(this._undoPos=0;){
-var el=_129[i];
-if(!el){
-continue;
-}
-var a=document.createElement("a");
-a.href="javascript:void(0)";
-a.el=el;
-a.editor=this;
-this._statusBarItems.push(a);
-Xinha.addDom0Event(a,"click",function(){
-this.blur();
-this.editor.selectNodeContents(this.el);
-this.editor.updateToolbar(true);
-return false;
-});
-Xinha.addDom0Event(a,"contextmenu",function(){
-this.blur();
-var info="Inline style:\n\n";
-info+=this.el.style.cssText.split(/;\s*/).join(";\n");
-alert(info);
-return false;
-});
-var txt=el.tagName.toLowerCase();
-if(typeof el.style!="undefined"){
-a.title=el.style.cssText;
-}
-if(el.id){
-txt+="#"+el.id;
-}
-if(el.className){
-txt+="."+el.className;
-}
-a.appendChild(document.createTextNode(txt));
-this._statusBarTree.appendChild(a);
-if(i!==0){
-this._statusBarTree.appendChild(document.createTextNode(String.fromCharCode(187)));
-}
-Xinha.freeLater(a);
-}
-}
-}
-for(var cmd in this._toolbarObjects){
-var btn=this._toolbarObjects[cmd];
-var _132=true;
-if(typeof (btn.state)!="function"){
-continue;
-}
-if(btn.context&&!text){
-_132=false;
-var _133=btn.context;
-var _134=[];
-if(/(.*)\[(.*?)\]/.test(_133)){
-_133=RegExp.$1;
-_134=RegExp.$2.split(",");
-}
-_133=_133.toLowerCase();
-var _135=(_133=="*");
-for(var k=0;k<_129.length;++k){
-if(!_129[k]){
-continue;
-}
-if(_135||(_129[k].tagName.toLowerCase()==_133)){
-_132=true;
-var _137=null;
-var att=null;
-var comp=null;
-var _13a=null;
-for(var ka=0;ka<_134.length;++ka){
-_137=_134[ka].match(/(.*)(==|!=|===|!==|>|>=|<|<=)(.*)/);
-att=_137[1];
-comp=_137[2];
-_13a=_137[3];
-if(!eval(_129[k][att]+comp+_13a)){
-_132=false;
-break;
-}
-}
-if(_132){
-break;
-}
-}
-}
-}
-btn.state("enabled",(!text||btn.text)&&_132);
-if(typeof cmd=="function"){
-continue;
-}
-var _13c=this.config.customSelects[cmd];
-if((!text||btn.text)&&(typeof _13c!="undefined")){
-_13c.refresh(this);
-continue;
-}
-switch(cmd){
-case "fontname":
-case "fontsize":
-if(!text){
-try{
-var _13d=(""+doc.queryCommandValue(cmd)).toLowerCase();
-if(!_13d){
-btn.element.selectedIndex=0;
-break;
-}
-var _13e=this.config[cmd];
-var _13f=0;
-for(var j in _13e){
-if((j.toLowerCase()==_13d)||(_13e[j].substr(0,_13d.length).toLowerCase()==_13d)){
-btn.element.selectedIndex=_13f;
-throw "ok";
-}
-++_13f;
-}
-btn.element.selectedIndex=0;
-}
-catch(ex){
-}
-}
-break;
-case "formatblock":
-var _141=[];
-for(var _142 in this.config.formatblock){
-if(typeof this.config.formatblock[_142]=="string"){
-_141[_141.length]=this.config.formatblock[_142];
-}
-}
-var _143=this._getFirstAncestor(this.getSelection(),_141);
-if(_143){
-for(var x=0;x<_141.length;x++){
-if(_141[x].toLowerCase()==_143.tagName.toLowerCase()){
-btn.element.selectedIndex=x;
-}
-}
-}else{
-btn.element.selectedIndex=0;
-}
-break;
-case "textindicator":
-if(!text){
-try{
-var _145=btn.element.style;
-_145.backgroundColor=Xinha._makeColor(doc.queryCommandValue(Xinha.is_ie?"backcolor":"hilitecolor"));
-if(/transparent/i.test(_145.backgroundColor)){
-_145.backgroundColor=Xinha._makeColor(doc.queryCommandValue("backcolor"));
-}
-_145.color=Xinha._makeColor(doc.queryCommandValue("forecolor"));
-_145.fontFamily=doc.queryCommandValue("fontname");
-_145.fontWeight=doc.queryCommandState("bold")?"bold":"normal";
-_145.fontStyle=doc.queryCommandState("italic")?"italic":"normal";
-}
-catch(ex){
-}
-}
-break;
-case "htmlmode":
-btn.state("active",text);
-break;
-case "lefttoright":
-case "righttoleft":
-var _146=this.getParentElement();
-while(_146&&!Xinha.isBlockElement(_146)){
-_146=_146.parentNode;
-}
-if(_146){
-btn.state("active",(_146.style.direction==((cmd=="righttoleft")?"rtl":"ltr")));
-}
-break;
-default:
-cmd=cmd.replace(/(un)?orderedlist/i,"insert$1orderedlist");
-try{
-btn.state("active",(!text&&doc.queryCommandState(cmd)));
-}
-catch(ex){
-}
-break;
-}
-}
-if(this._customUndo&&!this._timerUndo){
-this._undoTakeSnapshot();
-var _147=this;
-this._timerUndo=setTimeout(function(){
-_147._timerUndo=null;
-},this.config.undoTimeout);
-}
-this.firePluginEvent("onUpdateToolbar");
-};
-Xinha.getEditor=function(ref){
-for(var i=__xinhas.length;i--;){
-var _14a=__xinhas[i];
-if(_14a&&(_14a._textArea.id==ref||_14a._textArea.name==ref||_14a._textArea==ref)){
-return _14a;
-}
-}
-return null;
-};
-Xinha.prototype.getPluginInstance=function(_14b){
-if(this.plugins[_14b]){
-return this.plugins[_14b].instance;
-}else{
-return null;
-}
-};
-Xinha.prototype.getAllAncestors=function(){
-var p=this.getParentElement();
-var a=[];
-while(p&&(p.nodeType==1)&&(p.tagName.toLowerCase()!="body")){
-a.push(p);
-p=p.parentNode;
-}
-a.push(this._doc.body);
-return a;
-};
-Xinha.prototype._getFirstAncestor=function(sel,_14f){
-var prnt=this.activeElement(sel);
-if(prnt===null){
-try{
-prnt=(Xinha.is_ie?this.createRange(sel).parentElement():this.createRange(sel).commonAncestorContainer);
-}
-catch(ex){
-return null;
-}
-}
-if(typeof _14f=="string"){
-_14f=[_14f];
-}
-while(prnt){
-if(prnt.nodeType==1){
-if(_14f===null){
-return prnt;
-}
-if(_14f.contains(prnt.tagName.toLowerCase())){
-return prnt;
-}
-if(prnt.tagName.toLowerCase()=="body"){
-break;
-}
-if(prnt.tagName.toLowerCase()=="table"){
-break;
-}
-}
-prnt=prnt.parentNode;
-}
-return null;
-};
-Xinha.prototype._getAncestorBlock=function(sel){
-var prnt=(Xinha.is_ie?this.createRange(sel).parentElement:this.createRange(sel).commonAncestorContainer);
-while(prnt&&(prnt.nodeType==1)){
-switch(prnt.tagName.toLowerCase()){
-case "div":
-case "p":
-case "address":
-case "blockquote":
-case "center":
-case "del":
-case "ins":
-case "pre":
-case "h1":
-case "h2":
-case "h3":
-case "h4":
-case "h5":
-case "h6":
-case "h7":
-return prnt;
-case "body":
-case "noframes":
-case "dd":
-case "li":
-case "th":
-case "td":
-case "noscript":
-return null;
-default:
-break;
-}
-}
-return null;
-};
-Xinha.prototype._createImplicitBlock=function(type){
-var sel=this.getSelection();
-if(Xinha.is_ie){
-sel.empty();
-}else{
-sel.collapseToStart();
-}
-var rng=this.createRange(sel);
-};
-Xinha.prototype.surroundHTML=function(_156,_157){
-var html=this.getSelectedHTML();
-this.insertHTML(_156+html+_157);
-};
-Xinha.prototype.hasSelectedText=function(){
-return this.getSelectedHTML()!=="";
-};
-Xinha.prototype._comboSelected=function(el,txt){
-this.focusEditor();
-var _15b=el.options[el.selectedIndex].value;
-switch(txt){
-case "fontname":
-case "fontsize":
-this.execCommand(txt,false,_15b);
-break;
-case "formatblock":
-if(!_15b){
-this.updateToolbar();
-break;
-}
-if(!Xinha.is_gecko||_15b!=="blockquote"){
-_15b="<"+_15b+">";
-}
-this.execCommand(txt,false,_15b);
-break;
-default:
-var _15c=this.config.customSelects[txt];
-if(typeof _15c!="undefined"){
-_15c.action(this);
-}else{
-alert("FIXME: combo box "+txt+" not implemented");
-}
-break;
-}
-};
-Xinha.prototype._colorSelector=function(_15d){
-var _15e=this;
-if(Xinha.is_gecko){
-try{
-_15e._doc.execCommand("useCSS",false,false);
-_15e._doc.execCommand("styleWithCSS",false,true);
-}
-catch(ex){
-}
-}
-var btn=_15e._toolbarObjects[_15d].element;
-var _160;
-if(_15d=="hilitecolor"){
-if(Xinha.is_ie){
-_15d="backcolor";
-_160=Xinha._colorToRgb(_15e._doc.queryCommandValue("backcolor"));
-}else{
-_160=Xinha._colorToRgb(_15e._doc.queryCommandValue("hilitecolor"));
-}
-}else{
-_160=Xinha._colorToRgb(_15e._doc.queryCommandValue("forecolor"));
-}
-var _161=function(_162){
-_15e._doc.execCommand(_15d,false,_162);
-};
-if(Xinha.is_ie){
-var _163=_15e.createRange(_15e.getSelection());
-_161=function(_164){
-_163.select();
-_15e._doc.execCommand(_15d,false,_164);
-};
-}
-var _165=new Xinha.colorPicker({cellsize:_15e.config.colorPickerCellSize,callback:_161,granularity:_15e.config.colorPickerGranularity,websafe:_15e.config.colorPickerWebSafe,savecolors:_15e.config.colorPickerSaveColors});
-_165.open(_15e.config.colorPickerPosition,btn,_160);
-};
-Xinha.prototype.execCommand=function(_166,UI,_168){
-var _169=this;
-this.focusEditor();
-_166=_166.toLowerCase();
-if(this.firePluginEvent("onExecCommand",_166,UI,_168)){
-this.updateToolbar();
-return false;
-}
-switch(_166){
-case "htmlmode":
-this.setMode();
-break;
-case "hilitecolor":
-case "forecolor":
-this._colorSelector(_166);
-break;
-case "createlink":
-this._createLink();
-break;
-case "undo":
-case "redo":
-if(this._customUndo){
-this[_166]();
-}else{
-this._doc.execCommand(_166,UI,_168);
-}
-break;
-case "inserttable":
-this._insertTable();
-break;
-case "insertimage":
-this._insertImage();
-break;
-case "about":
-this._popupDialog(_169.config.URIs.about,null,this);
-break;
-case "showhelp":
-this._popupDialog(_169.config.URIs.help,null,this);
-break;
-case "killword":
-this._wordClean();
-break;
-case "cut":
-case "copy":
-case "paste":
-this._doc.execCommand(_166,UI,_168);
-if(this.config.killWordOnPaste){
-this._wordClean();
-}
-break;
-case "lefttoright":
-case "righttoleft":
-if(this.config.changeJustifyWithDirection){
-this._doc.execCommand((_166=="righttoleft")?"justifyright":"justifyleft",UI,_168);
-}
-var dir=(_166=="righttoleft")?"rtl":"ltr";
-var el=this.getParentElement();
-while(el&&!Xinha.isBlockElement(el)){
-el=el.parentNode;
-}
-if(el){
-if(el.style.direction==dir){
-el.style.direction="";
-}else{
-el.style.direction=dir;
-}
-}
-break;
-case "justifyleft":
-case "justifyright":
-_166.match(/^justify(.*)$/);
-var ae=this.activeElement(this.getSelection());
-if(ae&&ae.tagName.toLowerCase()=="img"){
-ae.align=ae.align==RegExp.$1?"":RegExp.$1;
-}else{
-this._doc.execCommand(_166,UI,_168);
-}
-break;
-default:
-try{
-this._doc.execCommand(_166,UI,_168);
-}
-catch(ex){
-if(this.config.debug){
-alert(ex+"\n\nby execCommand("+_166+");");
-}
-}
-break;
-}
-this.updateToolbar();
-return false;
-};
-Xinha.prototype._editorEvent=function(ev){
-var _16e=this;
-if(typeof _16e._textArea["on"+ev.type]=="function"){
-_16e._textArea["on"+ev.type]();
-}
-if(this.isKeyEvent(ev)){
-if(_16e.firePluginEvent("onKeyPress",ev)){
-return false;
-}
-if(this.isShortCut(ev)){
-this._shortCuts(ev);
-}
-}
-if(ev.type=="mousedown"){
-if(_16e.firePluginEvent("onMouseDown",ev)){
-return false;
-}
-}
-if(_16e._timerToolbar){
-clearTimeout(_16e._timerToolbar);
-}
-_16e._timerToolbar=setTimeout(function(){
-_16e.updateToolbar();
-_16e._timerToolbar=null;
-},250);
-};
-Xinha.prototype._shortCuts=function(ev){
-var key=this.getKey(ev).toLowerCase();
-var cmd=null;
-var _172=null;
-switch(key){
-case "b":
-cmd="bold";
-break;
-case "i":
-cmd="italic";
-break;
-case "u":
-cmd="underline";
-break;
-case "s":
-cmd="strikethrough";
-break;
-case "l":
-cmd="justifyleft";
-break;
-case "e":
-cmd="justifycenter";
-break;
-case "r":
-cmd="justifyright";
-break;
-case "j":
-cmd="justifyfull";
-break;
-case "z":
-cmd="undo";
-break;
-case "y":
-cmd="redo";
-break;
-case "v":
-cmd="paste";
-break;
-case "n":
-cmd="formatblock";
-_172="p";
-break;
-case "0":
-cmd="killword";
-break;
-case "1":
-case "2":
-case "3":
-case "4":
-case "5":
-case "6":
-cmd="formatblock";
-_172="h"+key;
-break;
-}
-if(cmd){
-this.execCommand(cmd,false,_172);
-Xinha._stopEvent(ev);
-}
-};
-Xinha.prototype.convertNode=function(el,_174){
-var _175=this._doc.createElement(_174);
-while(el.firstChild){
-_175.appendChild(el.firstChild);
-}
-return _175;
-};
-Xinha.prototype.scrollToElement=function(e){
-if(!e){
-e=this.getParentElement();
-if(!e){
-return;
-}
-}
-var _177=Xinha.getElementTopLeft(e);
-this._iframe.contentWindow.scrollTo(_177.left,_177.top);
-};
-Xinha.prototype.getEditorContent=function(){
-return this.outwardHtml(this.getHTML());
-};
-Xinha.prototype.setEditorContent=function(html){
-this.setHTML(this.inwardHtml(html));
-};
-Xinha.prototype.getHTML=function(){
-var html="";
-switch(this._editMode){
-case "wysiwyg":
-if(!this.config.fullPage){
-html=Xinha.getHTML(this._doc.body,false,this).trim();
-}else{
-html=this.doctype+"\n"+Xinha.getHTML(this._doc.documentElement,true,this);
-}
-break;
-case "textmode":
-html=this._textArea.value;
-break;
-default:
-alert("Mode <"+this._editMode+"> not defined!");
-return false;
-}
-return html;
-};
-Xinha.prototype.outwardHtml=function(html){
-for(var i in this.plugins){
-var _17c=this.plugins[i].instance;
-if(_17c&&typeof _17c.outwardHtml=="function"){
-html=_17c.outwardHtml(html);
-}
-}
-html=html.replace(/<(\/?)b(\s|>|\/)/ig,"<$1strong$2");
-html=html.replace(/<(\/?)i(\s|>|\/)/ig,"<$1em$2");
-html=html.replace(/<(\/?)strike(\s|>|\/)/ig,"<$1del$2");
-html=html.replace(/(<[^>]*on(click|mouse(over|out|up|down))=['"])if\(window\.parent && window\.parent\.Xinha\)\{return false\}/gi,"$1");
-var _17d=location.href.replace(/(https?:\/\/[^\/]*)\/.*/,"$1")+"/";
-html=html.replace(/https?:\/\/null\//g,_17d);
-html=html.replace(/((href|src|background)=[\'\"])\/+/ig,"$1"+_17d);
-html=this.outwardSpecialReplacements(html);
-html=this.fixRelativeLinks(html);
-if(this.config.sevenBitClean){
-html=html.replace(/[^ -~\r\n\t]/g,function(c){
-return ""+c.charCodeAt(0)+";";
-});
-}
-html=html.replace(/(");
-var _1bd=_1bb.document.getElementById("__ie_onload");
-_1bd.onreadystatechange=function(){
-if(this.readyState=="loaded"){
-this.parentNode.removeChild(_1bd);
-init();
-}
-};
-}else{
-if(/applewebkit|KHTML/i.test(navigator.userAgent)){
-Xinha.onloadTimer=_1bb.setInterval(function(){
-if(/loaded|complete/.test(_1bb.document.readyState)){
-init();
-}
-},10);
-}else{
-_1bb.document.addEventListener("DOMContentLoaded",init,false);
-}
-}
-Xinha._addEvent(_1bb,"load",init);
-};
-Xinha.addDom0Event=function(el,ev,fn){
-Xinha._prepareForDom0Events(el,ev);
-el._xinha_dom0Events[ev].unshift(fn);
-};
-Xinha.prependDom0Event=function(el,ev,fn){
-Xinha._prepareForDom0Events(el,ev);
-el._xinha_dom0Events[ev].push(fn);
-};
-Xinha._prepareForDom0Events=function(el,ev){
-if(typeof el._xinha_dom0Events=="undefined"){
-el._xinha_dom0Events={};
-Xinha.freeLater(el,"_xinha_dom0Events");
-}
-if(typeof el._xinha_dom0Events[ev]=="undefined"){
-el._xinha_dom0Events[ev]=[];
-if(typeof el["on"+ev]=="function"){
-el._xinha_dom0Events[ev].push(el["on"+ev]);
-}
-el["on"+ev]=function(_1c6){
-var a=el._xinha_dom0Events[ev];
-var _1c8=true;
-for(var i=a.length;--i>=0;){
-el._xinha_tempEventHandler=a[i];
-if(el._xinha_tempEventHandler(_1c6)===false){
-el._xinha_tempEventHandler=null;
-_1c8=false;
-break;
-}
-el._xinha_tempEventHandler=null;
-}
-return _1c8;
-};
-Xinha._eventFlushers.push([el,ev]);
-}
-};
-Xinha.prototype.notifyOn=function(ev,fn){
-if(typeof this._notifyListeners[ev]=="undefined"){
-this._notifyListeners[ev]=[];
-Xinha.freeLater(this,"_notifyListeners");
-}
-this._notifyListeners[ev].push(fn);
-};
-Xinha.prototype.notifyOf=function(ev,args){
-if(this._notifyListeners[ev]){
-for(var i=0;i/ig,">");
-str=str.replace(/\xA0/g," ");
-str=str.replace(/\x22/g,""");
-return str;
-};
-Xinha.prototype.stripBaseURL=function(_1d3){
-if(this.config.baseHref===null||!this.config.stripBaseHref){
-return _1d3;
-}
-var _1d4=this.config.baseHref.replace(/^(https?:\/\/[^\/]+)(.*)$/,"$1");
-var _1d5=new RegExp(_1d4);
-return _1d3.replace(_1d5,"");
-};
-String.prototype.trim=function(){
-return this.replace(/^\s+/,"").replace(/\s+$/,"");
-};
-Xinha._makeColor=function(v){
-if(typeof v!="number"){
-return v;
-}
-var r=v&255;
-var g=(v>>8)&255;
-var b=(v>>16)&255;
-return "rgb("+r+","+g+","+b+")";
-};
-Xinha._colorToRgb=function(v){
-if(!v){
-return "";
-}
-var r,g,b;
-function hex(d){
-return (d<16)?("0"+d.toString(16)):d.toString(16);
-}
-if(typeof v=="number"){
-r=v&255;
-g=(v>>8)&255;
-b=(v>>16)&255;
-return "#"+hex(r)+hex(g)+hex(b);
-}
-if(v.substr(0,3)=="rgb"){
-var re=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/;
-if(v.match(re)){
-r=parseInt(RegExp.$1,10);
-g=parseInt(RegExp.$2,10);
-b=parseInt(RegExp.$3,10);
-return "#"+hex(r)+hex(g)+hex(b);
-}
-return null;
-}
-if(v.substr(0,1)=="#"){
-return v;
-}
-return null;
-};
-Xinha.prototype._popupDialog=function(url,_1df,init){
-Dialog(this.popupURL(url),_1df,init);
-};
-Xinha.prototype.imgURL=function(file,_1e2){
-if(typeof _1e2=="undefined"){
-return _editor_url+file;
-}else{
-return _editor_url+"plugins/"+_1e2+"/img/"+file;
-}
-};
-Xinha.prototype.popupURL=function(file){
-var url="";
-if(file.match(/^plugin:\/\/(.*?)\/(.*)/)){
-var _1e5=RegExp.$1;
-var _1e6=RegExp.$2;
-if(!(/\.(html?|php)$/.test(_1e6))){
-_1e6+=".html";
-}
-url=Xinha.getPluginDir(_1e5)+"/popups/"+_1e6;
-}else{
-if(file.match(/^\/.*?/)||file.match(/^https?:\/\//)){
-url=file;
-}else{
-url=_editor_url+this.config.popupURL+file;
-}
-}
-return url;
-};
-Xinha.getElementById=function(tag,id){
-var el,i,objs=document.getElementsByTagName(tag);
-for(i=objs.length;--i>=0&&(el=objs[i]);){
-if(el.id==id){
-return el;
-}
-}
-return null;
-};
-Xinha.prototype._toggleBorders=function(){
-var _1ea=this._doc.getElementsByTagName("TABLE");
-if(_1ea.length!==0){
-if(!this.borders){
-this.borders=true;
-}else{
-this.borders=false;
-}
-for(var i=0;i<_1ea.length;i++){
-if(this.borders){
-Xinha._addClass(_1ea[i],"htmtableborders");
-}else{
-Xinha._removeClass(_1ea[i],"htmtableborders");
-}
-}
-}
-return true;
-};
-Xinha.addCoreCSS=function(html){
-var _1ed="\n";
-if(html&&//i.test(html)){
-return html.replace(//i,""+_1ed);
-}else{
-if(html){
-return _1ed+html;
-}else{
-return _1ed;
-}
-}
-};
-Xinha.prototype.addEditorStylesheet=function(_1ee){
-var _1ef=this._doc.createElement("link");
-_1ef.rel="stylesheet";
-_1ef.type="text/css";
-_1ef.title="XinhaInternalCSS";
-_1ef.href=_1ee;
-this._doc.getElementsByTagName("HEAD")[0].appendChild(_1ef);
-};
-Xinha.stripCoreCSS=function(html){
-return html.replace(/"}e+="\n";e+="\n";e+=b.inwardHtml(b._textArea.value);e+="\n";e+=""}else{e=b.inwardHtml(b._textArea.value);if(e.match(Xinha.RE_doctype)){b.setDoctype(RegExp.$1)}var c=e.match(//gi);e=e.replace(/\s*/gi,"");if(c){e=e.replace(/<\/head>/i,c.join("\n")+"\n")}}g.write(e);g.close();if(this.config.fullScreen){this._fullScreen()}this.setEditorEvents();if((typeof b.config.autofocus!="undefined")&&b.config.autofocus!==false&&((b.config.autofocus==b._textArea.id)||b.config.autofocus==true)){b.activateEditor();b.focusEditor()}};Xinha.prototype.whenDocReady=function(a){var b=this;if(this._doc&&this._doc.body){a()}else{setTimeout(function(){b.whenDocReady(a)},50)}};Xinha.prototype.setMode=function(b){var a;if(typeof b=="undefined"){b=this._editMode=="textmode"?"wysiwyg":"textmode"}switch(b){case"textmode":this.firePluginEvent("onBeforeMode","textmode");this._toolbarObjects.htmlmode.swapImage(this.config.iconList.wysiwygmode);this.setCC("iframe");a=this.outwardHtml(this.getHTML());this.setHTML(a);this.deactivateEditor();this._iframe.style.display="none";this._textArea.style.display="";if(this.config.statusBar){this._statusBarTree.style.display="none";this._statusBarTextMode.style.display=""}this.findCC("textarea");this.notifyOf("modechange",{mode:"text"});this.firePluginEvent("onMode","textmode");break;case"wysiwyg":this.firePluginEvent("onBeforeMode","wysiwyg");this._toolbarObjects.htmlmode.swapImage([this.imgURL("images/ed_buttons_main.png"),7,0]);this.setCC("textarea");a=this.inwardHtml(this.getHTML());this.deactivateEditor();this.setHTML(a);this._iframe.style.display="";this._textArea.style.display="none";this.activateEditor();if(this.config.statusBar){this._statusBarTree.style.display="";this._statusBarTextMode.style.display="none"}this.findCC("iframe");this.notifyOf("modechange",{mode:"wysiwyg"});this.firePluginEvent("onMode","wysiwyg");break;default:alert("Mode <"+b+"> not defined!");return false}this._editMode=b};Xinha.prototype.setFullHTML=function(c){var a=RegExp.multiline;RegExp.multiline=true;if(c.match(Xinha.RE_doctype)){this.setDoctype(RegExp.$1)}RegExp.multiline=a;if(0){if(c.match(Xinha.RE_head)){this._doc.getElementsByTagName("head")[0].innerHTML=RegExp.$1}if(c.match(Xinha.RE_body)){this._doc.getElementsByTagName("body")[0].innerHTML=RegExp.$1}}else{var d=this.editorIsActivated();if(d){this.deactivateEditor()}var b=/((.|\n)*?)<\/html>/i;c=c.replace(b,"$1");this._doc.open("text/html","replace");this._doc.write(c);this._doc.close();if(d){this.activateEditor()}this.setEditorEvents();return true}};Xinha.prototype.setEditorEvents=function(c){var a=this;var b=this._doc;a.whenDocReady(function(){if(!c){Xinha._addEvents(b,["mousedown"],function(){a.activateEditor();return true});if(Xinha.is_ie){Xinha._addEvent(a._doc.getElementsByTagName("html")[0],"click",function(){if(a._iframe.contentWindow.event.srcElement.tagName.toLowerCase()=="html"){var f=a._doc.body.createTextRange();f.collapse();f.select()}return true})}}Xinha._addEvents(b,["keydown","keypress","mousedown","mouseup","drag"],function(f){return a._editorEvent(Xinha.is_ie?a._iframe.contentWindow.event:f)});Xinha._addEvents(b,["dblclick"],function(f){return a._onDoubleClick(Xinha.is_ie?a._iframe.contentWindow.event:f)});if(c){return}for(var e in a.plugins){var d=a.plugins[e].instance;Xinha.refreshPlugin(d)}if(typeof a._onGenerate=="function"){a._onGenerate()}Xinha.addDom0Event(window,"resize",function(f){if(Xinha.ie_version>7&&!window.parent){if(a.execResize){a.sizeEditor();a.execResize=false}else{a.execResize=true}}else{a.sizeEditor()}});a.removeLoadingMessage()})};Xinha.getPluginConstructor=function(a){return Xinha.plugins[a]||window[a]};Xinha.prototype.registerPlugin=function(){if(!Xinha.isSupportedBrowser){return}var a=arguments[0];if(a===null||typeof a=="undefined"||(typeof a=="string"&&Xinha.getPluginConstructor(a)=="undefined")){return false}var b=[];for(var c=1;c=1){if(arguments[a][0].match(/\.css$/i)){b.loadStyle(arguments[a][0],arguments[a][1])}else{b.loadScript(arguments[a][0],arguments[a][1])}}}}}return b};Xinha.prototype.debugTree=function(){var c=document.createElement("textarea");c.style.width="100%";c.style.height="20em";c.value="";function b(d,e){for(;--d>=0;){c.value+=" "}c.value+=e+"\n"}function a(e,h){var d=e.tagName.toLowerCase(),f;var g=Xinha.is_ie?e.scopeName:e.prefix;b(h,"- "+d+" ["+g+"]");for(f=e.firstChild;f;f=f.nextSibling){if(f.nodeType==1){a(f,h+2)}}}a(this._doc.body,0);document.body.appendChild(c)};Xinha.getInnerText=function(c){var a="",b;for(b=c.firstChild;b;b=b.nextSibling){if(b.nodeType==3){a+=b.data}else{if(b.nodeType==1){a+=Xinha.getInnerText(b)}}}return a};Xinha.prototype._wordClean=function(){var b=this;var e={empty_tags:0,cond_comm:0,mso_elmts:0,mso_class:0,mso_style:0,mso_xmlel:0,orig_len:this._doc.body.innerHTML.length,T:new Date().getTime()};var g={empty_tags:"Empty tags removed: ",cond_comm:"Conditional comments removed",mso_elmts:"MSO invalid elements removed",mso_class:"MSO class names removed: ",mso_style:"MSO inline style removed: ",mso_xmlel:"MSO XML elements stripped: "};function f(){var j="Xinha word cleaner stats: \n\n";for(var k in e){if(g[k]){j+=g[k]+e[k]+"\n"}}j+="\nInitial document length: "+e.orig_len+"\n";j+="Final document length: "+b._doc.body.innerHTML.length+"\n";j+="Clean-up took "+((new Date().getTime()-e.T)/1000)+" seconds";alert(j)}function h(j){var k=j.className.replace(/(^|\s)mso.*?(\s|$)/ig," ");if(k!=j.className){j.className=k;if(!/\S/.test(j.className)){j.removeAttribute("className");++e.mso_class}}}function a(k){var l=k.style.cssText.split(/\s*;\s*/);for(var j=l.length;--j>=0;){if(/^mso|^tab-stops/i.test(l[j])||/^margin\s*:\s*0..\s+0..\s+0../i.test(l[j])){++e.mso_style;l.splice(j,1)}}k.style.cssText=l.join("; ")}function c(j){if(("link"==j.tagName.toLowerCase()&&(j.attributes&&/File-List|Edit-Time-Data|themeData|colorSchemeMapping/.test(j.attributes.rel.nodeValue)))||/^(style|meta)$/i.test(j.tagName)){Xinha.removeFromParent(j);++e.mso_elmts;return true}return false}function d(j){if(/^(a|span|b|strong|i|em|font|div|p)$/i.test(j.tagName)&&!j.firstChild){Xinha.removeFromParent(j);++e.empty_tags;return true}return false}function i(j){h(j);a(j);var m;for(var l=j.firstChild;l;l=m){m=l.nextSibling;if(l.nodeType==1&&i(l)){if((Xinha.is_ie&&j.scopeName!="HTML")||(!Xinha.is_ie&&/:/.test(l.tagName))){for(var k=l.childNodes&&l.childNodes.length-1;l.childNodes&&l.childNodes.length&&l.childNodes[k];--k){if(l.nextSibling){l.parentNode.insertBefore(l.childNodes[k],l.nextSibling)}else{l.parentNode.appendChild(l.childNodes[k])}}Xinha.removeFromParent(l);continue}if(d(l)){continue}if(c(l)){continue}}else{if(l.nodeType==8){if(/(\s*\[\s*if\s*(([gl]te?|!)\s*)?(IE|mso)\s*(\d+(\.\d+)?\s*)?\]>)/.test(l.nodeValue)){Xinha.removeFromParent(l);++e.cond_comm}}}}return true}i(this._doc.body);this.updateToolbar()};Xinha.prototype._clearFonts=function(){var a=this.getInnerHTML();if(confirm(Xinha._lc("Would you like to clear font typefaces?"))){a=a.replace(/face="[^"]*"/gi,"");a=a.replace(/font-family:[^;}"']+;?/gi,"")}if(confirm(Xinha._lc("Would you like to clear font sizes?"))){a=a.replace(/size="[^"]*"/gi,"");a=a.replace(/font-size:[^;}"']+;?/gi,"")}if(confirm(Xinha._lc("Would you like to clear font colours?"))){a=a.replace(/color="[^"]*"/gi,"");a=a.replace(/([^\-])color:[^;}"']+;?/gi,"$1")}a=a.replace(/(style|class)="\s*"/gi,"");a=a.replace(/<(font|span)\s*>/gi,"");this.setHTML(a);this.updateToolbar()};Xinha.prototype._splitBlock=function(){this._doc.execCommand("formatblock",false,"div")};Xinha.prototype.forceRedraw=function(){this._doc.body.style.visibility="hidden";this._doc.body.style.visibility=""};Xinha.prototype.focusEditor=function(){switch(this._editMode){case"wysiwyg":try{if(Xinha._someEditorHasBeenActivated){this.activateEditor();this._iframe.contentWindow.focus()}}catch(a){}break;case"textmode":try{this._textArea.focus()}catch(b){}break;default:alert("ERROR: mode "+this._editMode+" is not defined")}return this._doc};Xinha.prototype._undoTakeSnapshot=function(){++this._undoPos;if(this._undoPos>=this.config.undoSteps){this._undoQueue.shift();--this._undoPos}var b=true;var a=this.getInnerHTML();if(this._undoPos>0){b=(this._undoQueue[this._undoPos-1]!=a)}if(b){this._undoQueue[this._undoPos]=a}else{this._undoPos--}};Xinha.prototype.undo=function(){if(this._undoPos>0){var a=this._undoQueue[--this._undoPos];if(a){this.setHTML(a)}else{++this._undoPos}}};Xinha.prototype.redo=function(){if(this._undoPos=0;){var el=ancestors[i];if(!el){continue}var a=document.createElement("a");a.href="javascript:void(0);";a.el=el;a.editor=this;this._statusBarItems.push(a);Xinha.addDom0Event(a,"click",function(){this.blur();this.editor.selectNodeContents(this.el);this.editor.updateToolbar(true);return false});Xinha.addDom0Event(a,"contextmenu",function(){this.blur();var info="Inline style:\n\n";info+=this.el.style.cssText.split(/;\s*/).join(";\n");alert(info);return false});var txt=el.tagName.toLowerCase();switch(txt){case"b":txt="strong";break;case"i":txt="em";break;case"strike":txt="del";break}if(typeof el.style!="undefined"){a.title=el.style.cssText}if(el.id){txt+="#"+el.id}if(el.className){txt+="."+el.className}a.appendChild(document.createTextNode(txt));this._statusBarTree.appendChild(a);if(i!==0){this._statusBarTree.appendChild(document.createTextNode(String.fromCharCode(187)))}Xinha.freeLater(a)}}}for(var cmd in this._toolbarObjects){var btn=this._toolbarObjects[cmd];var inContext=true;if(typeof btn.state!="function"){continue}if(btn.context&&!text){inContext=false;var context=btn.context;var attrs=[];if(/(.*)\[(.*?)\]/.test(context)){context=RegExp.$1;attrs=RegExp.$2.split(",")}context=context.toLowerCase();var match=(context=="*");for(var k=0;k|>=|<|<=)(.*)/);att=contextSplit[1];comp=contextSplit[2];attVal=contextSplit[3];if(!eval(ancestors[k][att]+comp+attVal)){inContext=false;break}}if(inContext){break}}}}btn.state("enabled",(!text||btn.text)&&inContext);if(typeof cmd=="function"){continue}var dropdown=this.config.customSelects[cmd];if((!text||btn.text)&&(typeof dropdown!="undefined")){dropdown.refresh(this);continue}switch(cmd){case"fontname":case"fontsize":if(!text){try{var value=(""+doc.queryCommandValue(cmd)).toLowerCase();if(!value){btn.element.selectedIndex=0;break}var options=this.config[cmd];var sIndex=0;for(var j in options){if((j.toLowerCase()==value)||(options[j].substr(0,value.length).toLowerCase()==value)){btn.element.selectedIndex=sIndex;throw"ok"}++sIndex}btn.element.selectedIndex=0}catch(ex){}}break;case"formatblock":var blocks=[];for(var indexBlock in this.config.formatblock){if(typeof this.config.formatblock[indexBlock]=="string"){blocks[blocks.length]=this.config.formatblock[indexBlock]}}var deepestAncestor=this._getFirstAncestor(this.getSelection(),blocks);if(deepestAncestor){for(var x=0;x"}this.execCommand(a,false,c);break;default:var d=this.config.customSelects[a];if(typeof d!="undefined"){d.action(this,c,b,a)}else{alert("FIXME: combo box "+a+" not implemented")}break}};Xinha.prototype._colorSelector=function(h){var d=this;if(Xinha.is_gecko){try{d._doc.execCommand("useCSS",false,false);d._doc.execCommand("styleWithCSS",false,true)}catch(g){}}var f=d._toolbarObjects[h].element;var c;if(h=="hilitecolor"){if(Xinha.is_ie){h="backcolor";c=Xinha._colorToRgb(d._doc.queryCommandValue("backcolor"))}else{c=Xinha._colorToRgb(d._doc.queryCommandValue("hilitecolor"))}}else{c=Xinha._colorToRgb(d._doc.queryCommandValue("forecolor"))}var b=function(i){d._doc.execCommand(h,false,i)};if(Xinha.is_ie){var a=d.createRange(d.getSelection());b=function(i){a.select();d._doc.execCommand(h,false,i)}}var e=new Xinha.colorPicker({cellsize:d.config.colorPickerCellSize,callback:b,granularity:d.config.colorPickerGranularity,websafe:d.config.colorPickerWebSafe,savecolors:d.config.colorPickerSaveColors});e.open(d.config.colorPickerPosition,f,c)};Xinha.prototype.execCommand=function(h,f,g){var a=this;this.focusEditor();h=h.toLowerCase();if(this.firePluginEvent("onExecCommand",h,f,g)){this.updateToolbar();return false}switch(h){case"htmlmode":this.setMode();break;case"hilitecolor":case"forecolor":this._colorSelector(h);break;case"createlink":this._createLink();break;case"undo":case"redo":if(this._customUndo){this[h]()}else{this._doc.execCommand(h,f,g)}break;case"inserttable":this._insertTable();break;case"insertimage":this._insertImage();break;case"showhelp":this._popupDialog(a.config.URIs.help,null,this);break;case"killword":this._wordClean();break;case"cut":case"copy":case"paste":this._doc.execCommand(h,f,g);if(this.config.killWordOnPaste){this._wordClean()}break;case"lefttoright":case"righttoleft":if(this.config.changeJustifyWithDirection){this._doc.execCommand((h=="righttoleft")?"justifyright":"justifyleft",f,g)}var b=(h=="righttoleft")?"rtl":"ltr";var e=this.getParentElement();while(e&&!Xinha.isBlockElement(e)){e=e.parentNode}if(e){if(e.style.direction==b){e.style.direction=""}else{e.style.direction=b}}break;case"justifyleft":case"justifyright":h.match(/^justify(.*)$/);var d=this.activeElement(this.getSelection());if(d&&d.tagName.toLowerCase()=="img"){d.align=d.align==RegExp.$1?"":RegExp.$1}else{this._doc.execCommand(h,f,g)}break;default:try{this._doc.execCommand(h,f,g)}catch(c){if(this.config.debug){alert(c+"\n\nby execCommand("+h+");")}}break}this.updateToolbar();return false};Xinha.prototype._editorEvent=function(b){var a=this;if(typeof a._textArea["on"+b.type]=="function"){a._textArea["on"+b.type](b)}if(this.isKeyEvent(b)){if(a.firePluginEvent("onKeyPress",b)){return false}if(this.isShortCut(b)){this._shortCuts(b)}}if(b.type=="mousedown"){if(a.firePluginEvent("onMouseDown",b)){return false}}if(a._timerToolbar){clearTimeout(a._timerToolbar)}if(!this.suspendUpdateToolbar){a._timerToolbar=setTimeout(function(){a.updateToolbar();a._timerToolbar=null},250)}};Xinha.prototype._onDoubleClick=function(d){var c=this;var e=Xinha.is_ie?d.srcElement:d.target;var a=e.tagName;var b=e.className;if(a){a=a.toLowerCase();if(b&&(this.config.dblclickList[a+"."+b]!=undefined)){this.config.dblclickList[a+"."+b][0](c,e)}else{if(this.config.dblclickList[a]!=undefined){this.config.dblclickList[a][0](c,e)}}}};Xinha.prototype._shortCuts=function(b){var a=this.getKey(b).toLowerCase();var d=null;var c=null;switch(a){case"b":d="bold";break;case"i":d="italic";break;case"u":d="underline";break;case"s":d="strikethrough";break;case"l":d="justifyleft";break;case"e":d="justifycenter";break;case"r":d="justifyright";break;case"j":d="justifyfull";break;case"z":d="undo";break;case"y":d="redo";break;case"v":d="paste";break;case"n":d="formatblock";c="p";break;case"0":d="killword";break;case"1":case"2":case"3":case"4":case"5":case"6":d="formatblock";c="h"+a;break}if(d){this.execCommand(d,false,c);Xinha._stopEvent(b)}};Xinha.prototype.convertNode=function(a,c){var b=this._doc.createElement(c);while(a.firstChild){b.appendChild(a.firstChild)}return b};Xinha.prototype.scrollToElement=function(b){if(!b){b=this.getParentElement();if(!b){return}}var a=Xinha.getElementTopLeft(b);this._iframe.contentWindow.scrollTo(a.left,a.top)};Xinha.prototype.getEditorContent=function(){return this.outwardHtml(this.getHTML())};Xinha.prototype.setEditorContent=function(a){this.setHTML(this.inwardHtml(a))};Xinha.updateTextareas=function(){var b;for(var a=0;a<__xinhas.length;a++){b=__xinhas[a];b._textArea.value=b.getEditorContent()}};Xinha.prototype.getHTML=function(){var a="";switch(this._editMode){case"wysiwyg":if(!this.config.fullPage){a=Xinha.getHTML(this._doc.body,false,this).trim()}else{a=this.doctype+"\n"+Xinha.getHTML(this._doc.documentElement,true,this)}break;case"textmode":a=this._textArea.value;break;default:alert("Mode <"+this._editMode+"> not defined!");return false}return a};Xinha.prototype.outwardHtml=function(d){for(var c in this.plugins){var a=this.plugins[c].instance;if(a&&typeof a.outwardHtml=="function"){d=a.outwardHtml(d)}}d=d.replace(/<(\/?)b(\s|>|\/)/ig,"<$1strong$2");d=d.replace(/<(\/?)i(\s|>|\/)/ig,"<$1em$2");d=d.replace(/<(\/?)strike(\s|>|\/)/ig,"<$1del$2");d=d.replace(/(<[^>]*on(click|mouse(over|out|up|down))=['"])if\(window\.parent && window\.parent\.Xinha\)\{return false\}/gi,"$1");var b=location.href.replace(/(https?:\/\/[^\/]*)\/.*/,"$1")+"/";d=d.replace(/https?:\/\/null\//g,b);d=d.replace(/((href|src|background)=[\'\"])\/+/ig,"$1"+b);d=this.outwardSpecialReplacements(d);d=this.fixRelativeLinks(d);if(this.config.sevenBitClean){d=d.replace(/[^ -~\r\n\t]/g,function(e){return(e!=Xinha.cc)?""+e.charCodeAt(0)+";":e})}d=d.replace(/(");
-var _22=document.getElementById("__ie_onload");
-_22.onreadystatechange=function(){
-if(this.readyState=="loaded"){
-_21();
-}
-};
-}else{
-if(/WebKit/i.test(navigator.userAgent)){
-Xinha.onloadTimer=setInterval(function(){
-if(/loaded|complete/.test(document.readyState)){
-_21();
-}
-},10);
-}else{
-document.addEventListener("DOMContentLoaded",_21,false);
-}
-}
-};
-
+var Xinha={};if(!window._editor_url){(function(){var scripts=document.getElementsByTagName("script");var this_script=scripts[scripts.length-1];var args=this_script.src.split("?");args=args.length==2?args[1].split("&"):"";for(var index=0;index=9.1)||Xinha.ie_version>=5.5||Xinha.is_safari;Xinha.loadPlugins=function(b,a){if(!Xinha.isSupportedBrowser){return}Xinha.loadStyle(typeof _editor_css=="string"?_editor_css:"Xinha.css","XinhaCoreDesign");Xinha.createLoadingMessages(xinha_editors);var c=Xinha.loadingMessages;Xinha._loadback(_editor_url+"XinhaCore.js",function(){Xinha.removeLoadingMessages(xinha_editors);Xinha.createLoadingMessages(xinha_editors);a()});return false};Xinha._loadback=function(f,e,a,d){var b=!Xinha.is_ie?"onload":"onreadystatechange";var c=document.createElement("script");c.type="text/javascript";c.src=f;if(e){c[b]=function(){if(Xinha.is_ie&&(!(/loaded|complete/.test(window.event.srcElement.readyState)))){return}e.call(a?a:this,d);c[b]=null}}document.getElementsByTagName("head")[0].appendChild(c)};Xinha.getElementTopLeft=function(b){var c=0;var a=0;if(b.offsetParent){c=b.offsetLeft;a=b.offsetTop;while(b=b.offsetParent){c+=b.offsetLeft;a+=b.offsetTop}}return{top:a,left:c}};Xinha.findPosX=function(a){var b=0;if(a.offsetParent){return Xinha.getElementTopLeft(a).left}else{if(a.x){b+=a.x}}return b};Xinha.findPosY=function(b){var a=0;if(b.offsetParent){return Xinha.getElementTopLeft(b).top}else{if(b.y){a+=b.y}}return a};Xinha.createLoadingMessages=function(b){if(Xinha.loadingMessages||!Xinha.isSupportedBrowser){return}Xinha.loadingMessages=[];for(var a=0;a %%V 2>&1
+
+FOR %%V IN (%*) DO del %%V_uncompressed.js
+
+# pause
\ No newline at end of file
diff --git a/ccm-core/web/assets/xinha/contrib/compress.php b/ccm-core/web/assets/xinha/contrib/compress.php
new file mode 100644
index 000000000..e348353b2
--- /dev/null
+++ b/ccm-core/web/assets/xinha/contrib/compress.php
@@ -0,0 +1,99 @@
+
+die("Run this script to batch-compress the current Xinha snapshot. To run the script, open the file and comment out the die() command");
+$repository_url = 'http://svn.xinha.org/trunk';
+$version ='';
+$date = date('r');
+error_reporting(E_ALL);
+ini_set('show_errors',1);
+
+$return = array();
+function scan($dir, $durl = '',$min_size="0")
+{
+ static $seen = array();
+ global $return;
+ $files = array();
+
+ $dir = realpath($dir);
+ if(isset($seen[$dir]))
+ {
+ return $files;
+ }
+ $seen[$dir] = TRUE;
+ $dh = @opendir($dir);
+
+
+ while($dh && ($file = readdir($dh)))
+ {
+ if($file !== '.' && $file !== '..')
+ {
+ $path = realpath($dir . '/' . $file);
+ $url = $durl . '/' . $file;
+
+ if(preg_match("/\.svn|lang/",$path)) continue;
+
+ if(is_dir($path))
+ {
+ scan($path);
+ }
+ elseif(is_file($path))
+ {
+ if(!preg_match("/\.js$/",$path) || filesize($path) < $min_size) continue;
+ $return[] = $path;
+ }
+
+ }
+ }
+ @closedir($dh);
+
+ return $files;
+}
+scan("../");
+$cwd = getcwd();
+
+$root_dir = realpath($cwd.'/..');
+
+print "Processing ".count($return)." files
";
+
+$prefix = "/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */";
+if ($version) $prefix .= "\n/* This file is part of version $version released $date */";
+
+$core_prefix = '
+ /*--------------------------------------------------------------------------
+ -- Xinha (is not htmlArea) - http://xinha.org
+ --
+ -- Use of Xinha is granted by the terms of the htmlArea License (based on
+ -- BSD license) please read license.txt in this package for details.
+ --
+ -- Copyright (c) 2005-2008 Xinha Developer Team and contributors
+ --
+ -- Xinha was originally based on work by Mihai Bazon which is:
+ -- Copyright (c) 2003-2004 dynarch.com.
+ -- Copyright (c) 2002-2003 interactivetools.com, inc.
+ -- This copyright notice MUST stay intact for use.
+ -------------------------------------------------------------------------*/
+';
+foreach ($return as $file)
+{
+ set_time_limit ( 60 );
+ print "Processed $file
";
+ flush();
+ $file_url = $repository_url.str_replace($root_dir,'',$file);
+
+ copy($file,$file."_uncompr.js");
+
+ $file_prefix = $prefix."\n/* The URL of the most recent version of this file is $file_url */";
+
+ exec("echo \"".(preg_match('/XinhaCore.js$/',$file) ? $file_prefix.$core_prefix : $file_prefix)."\" > $file && java -jar ${cwd}/dojo_js_compressor.jar -c ${file}_uncompr.js >> $file 2>&1");
+ if (preg_match('/js: ".*?", line \d+:/',file_get_contents($file)) || preg_match('/sh: java: command not found/', file_get_contents($file)))
+ {
+ unlink($file);
+ rename($file."_uncompr.js",$file);
+ }
+ else
+ {
+ unlink($file."_uncompr.js");
+ }
+
+}
+print "Operation complete."
+?>
diff --git a/ccm-core/web/assets/xinha/contrib/compress_yui.php b/ccm-core/web/assets/xinha/contrib/compress_yui.php
new file mode 100644
index 000000000..3e88cf3b3
--- /dev/null
+++ b/ccm-core/web/assets/xinha/contrib/compress_yui.php
@@ -0,0 +1,107 @@
+
+// This is script that uses the YUI compressor (http://www.julienlecomte.net/blog/2007/08/11/)
+// It yields gradually better results than the dojo comressor, but it produces unreadable code
+//die("Run this script to batch-compress the current Xinha snapshot. To run the script, open the file and comment out the die() command");
+
+$repository_url = 'http://svn.xinha.org/trunk';
+$version ='';
+$date = date('r');
+
+$xinha_root = realpath(dirname(__FILE__).'/..');
+
+error_reporting(E_ALL);
+ini_set('show_errors',1);
+
+$return = array();
+function scan($dir, $durl = '',$min_size="3000")
+{
+ static $seen = array();
+ global $return;
+ $files = array();
+
+ $dir = realpath($dir);
+ if(isset($seen[$dir]))
+ {
+ return $files;
+ }
+ $seen[$dir] = TRUE;
+ $dh = @opendir($dir);
+
+
+ while($dh && ($file = readdir($dh)))
+ {
+ if($file !== '.' && $file !== '..')
+ {
+ $path = realpath($dir . '/' . $file);
+ $url = $durl . '/' . $file;
+
+ if(preg_match("/\.svn|lang/",$path)) continue;
+
+ if(is_dir($path))
+ {
+ scan($path);
+ }
+ elseif(is_file($path))
+ {
+ if(!preg_match("/\.(js|css)$/",$path) || filesize($path) < $min_size) continue;
+ $return[] = $path;
+ }
+
+ }
+ }
+ @closedir($dh);
+
+ return $files;
+}
+
+scan($xinha_root,0);
+
+print "Processing ".count($return)." files
";
+
+$prefix = "/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */";
+if ($version) $prefix .= "\n/* This file is part of version $version released $date */";
+$core_prefix = '
+ /*--------------------------------------------------------------------------
+ -- Xinha (is not htmlArea) - http://xinha.org
+ --
+ -- Use of Xinha is granted by the terms of the htmlArea License (based on
+ -- BSD license) please read license.txt in this package for details.
+ --
+ -- Copyright (c) 2005-'.date('Y').' Xinha Developer Team and contributors
+ --
+ -- Xinha was originally based on work by Mihai Bazon which is:
+ -- Copyright (c) 2003-2004 dynarch.com.
+ -- Copyright (c) 2002-2003 interactivetools.com, inc.
+ -- This copyright notice MUST stay intact for use.
+ -------------------------------------------------------------------------*/
+';
+
+foreach ($return as $file)
+{
+ set_time_limit ( 60 );
+ print "Processing $file\n";
+ flush();
+
+ $file_url = $repository_url.str_replace($xinha_root,'',$file);
+
+ copy($file,$file."_uncompr.js");
+
+ $file_prefix = $prefix."\n/* The URL of the most recent uncompressed version of this file is $file_url */";
+ $ext = preg_replace('/.*?(\.js|\.css)$/','$1',$file);
+
+ file_put_contents($file."_uncompr${ext}", preg_replace('/(\/\/[^\n]*)?(?![*])\\\[\n]/','',file_get_contents($file)));
+
+ passthru("echo \"".(preg_match('/XinhaCore.js$/',$file) ? $file_prefix.$core_prefix : $prefix)."\" > $file && java -jar {$xinha_root}/contrib/yuicompressor-2.4.2.jar --charset UTF-8 ${file}_uncompr${ext} >> $file 2>&1");
+ if (preg_match('/\d+:\d+:syntax error/',file_get_contents($file)) || preg_match('/sh: java: command not found/', file_get_contents($file)))
+ {
+ unlink($file);
+ rename($file."_uncompr${ext}",$file);
+ }
+ else
+ {
+ unlink($file."_uncompr${ext}");
+ }
+
+}
+print "Operation complete."
+?>
diff --git a/ccm-core/web/assets/xinha/contrib/dojo_js_compressor.jar b/ccm-core/web/assets/xinha/contrib/dojo_js_compressor.jar
new file mode 100644
index 000000000..8852aed2b
Binary files /dev/null and b/ccm-core/web/assets/xinha/contrib/dojo_js_compressor.jar differ
diff --git a/ccm-core/web/assets/xinha/contrib/lc_merge_strings.php b/ccm-core/web/assets/xinha/contrib/lc_merge_strings.php
new file mode 100644
index 000000000..9b9f3b4ac
--- /dev/null
+++ b/ccm-core/web/assets/xinha/contrib/lc_merge_strings.php
@@ -0,0 +1,178 @@
+, 2009-08-16
+
+// Distributed under the same terms as Xinha itself.
+// This notice MUST stay intact for use (see license.txt).
+
+// merge-strings.php - merge translation strings from master into
+// individual language files.
+
+
+function usage()
+{
+ print "merge-strings.php - merge translation strings\n";
+ print "Options:\n";
+ print " -l xx Process language xx. Required option\n";
+ print " -m master Master file. Defaults to 'de.js'\n";
+ print " -m base Base directory. Defaults to '..'\n";
+ print " -v Verbose\n";
+ print " -c Tell about files that must be created\n";
+ print " -d Debug. Very noisy\n";
+ exit(1);
+}
+
+// This function taken from the php.net manual page for glob
+
+function rglob($pattern='*', $flags = 0, $path='')
+{
+ $paths=glob($path.'*', GLOB_MARK|GLOB_ONLYDIR|GLOB_NOSORT);
+ $files=glob($path.$pattern, $flags);
+ foreach ($paths as $path)
+ {
+ $files=array_merge($files,rglob($pattern, $flags, $path));
+ }
+ return $files;
+}
+
+error_reporting(E_ALL);
+
+$opts = getopt('l:b:m:cvd');
+
+if ($opts === false) usage;
+// here we should check extra options, but php lacks that functionality
+
+$lang = 'xx'; // The language we process
+$create = 0; // Tell about missing files?
+$verbose = 0; // Log the details to stdout?
+$debug = 0; // ?
+$basedir = '..'; // Base directory to process
+$mastername = 'de.js'; // The best bet on a complete translation file
+
+if (isset($opts['l'])) $lang = $opts['l'];
+else die("Missing -l option\n");
+if (isset($opts['c'])) $create = 1;
+if (isset($opts['v'])) $verbose = 1;
+if (isset($opts['d'])) $debug = 1;
+if (isset($opts['b'])) $basedir = $opts['b'];
+if (isset($opts['m'])) $mastername = $opts['m'];
+
+if (!preg_match('#/$#', $basedir)) $basedir .= '/';
+
+// So, find all the master files
+
+$files = rglob($mastername, 0, $basedir);
+if (count($files) == 0)
+{
+ print "No master files found. Check your -b and -m options!\n";
+ exit(1);
+}
+
+// and process them
+
+$filenum = 0;
+foreach ($files as $masterjs)
+{
+ $langjs = preg_replace("/$mastername/", "$lang.js", $masterjs);
+ $langnew = $langjs.'.new';
+
+ if (!file_exists($langjs))
+ {
+ if ($create) print "Missing file: $langjs\n";
+ continue;
+ }
+
+ // Populate $trans with the strings that must be translated
+
+ $filenum++;
+ $min = fopen($masterjs, "r");
+ $trans = array();
+ $strings = 0;
+ while ($str = fgets($min))
+ {
+ $str = trim($str);
+ if (preg_match('#^ *"([^"]*)" *: *"([^"]*)"(,)? *(//.*)?$#', $str, $m))
+ {
+ if (isset($trans[$m[1]]))
+ {
+ print "Duplicate string in $masterjs: $m[1]\n";
+ continue;
+ }
+ if ($debug) print "Translate: $m[1]\n";
+ $trans[$m[1]] = 1;
+ $strings++;
+ }
+ }
+ fclose($min);
+
+ // Now copy from $lin to $lout while verifying that the strings
+ // are still current.
+ // Break out when we hit the last string in the master (no ','
+ // after the translation.
+
+ $lin = fopen($langjs, "r");
+ $lout = fopen($langnew, "w");
+ $obsolete = 0;
+ $new = 0;
+ $kept = 0;
+ while ($fstr = fgets($lin))
+ {
+ $str = trim($fstr);
+ if (preg_match('#^ *"([^"]*)" *: *"([^"]*)"(,)? *(//.*)?$#', $str, $m))
+ {
+ if (!isset($trans[$m[1]]))
+ {
+ if ($verbose) print "Obsolete: $m[1]\n";
+ $obsolete++;
+ fprintf($lout, " // \"%s\": \"%s\" // OBSOLETE\n", $m[1], $m[2]);
+ }
+ else
+ {
+ if ($debug) print "Keep: $m[1]\n";
+ unset($trans[$m[1]]);
+ $strings--;
+ $kept++;
+ fprintf($lout, " \"%s\": \"%s\"%s\n", $m[1], $m[2], $strings ? ',' : '');
+ }
+ if (!isset($m[3]) || $m[3] != ',')
+ break;
+ }
+ else
+ fprintf($lout, "%s", $fstr);
+ }
+
+ // Add the strings that are missing
+
+ foreach ($trans as $tr => $v)
+ {
+ if ($verbose) print("New: $tr\n");
+ $new++;
+ $strings--;
+ fprintf($lout, " \"%s\": \"%s\"%s // NEW\n", $tr, $tr, $strings ? ',' : '');
+ }
+
+ // And then the final part of $lin
+
+ while ($str = fgets($lin))
+ fprintf($lout, "%s", $str);
+
+ // Clean up, and tell user what happened
+
+ fclose($lin);
+ fclose($lout);
+
+ if ($obsolete == 0 && $new == 0)
+ {
+ if ($verbose) print "$langjs: Unchanged\n";
+ unlink($langnew);
+ }
+ else
+ {
+ print "$langnew: $new new, $obsolete obsoleted, $kept unchanged entries.\n";
+ // rename($langnew, $langjs);
+ }
+}
+
+print "$filenum files processed.\n";
+
+?>
diff --git a/ccm-core/web/assets/xinha/contrib/lc_parse_strings.php b/ccm-core/web/assets/xinha/contrib/lc_parse_strings.php
new file mode 100755
index 000000000..26d3fa647
--- /dev/null
+++ b/ccm-core/web/assets/xinha/contrib/lc_parse_strings.php
@@ -0,0 +1,325 @@
+";
+ while(!feof($fp)) {
+ $data .= fread($fp, 1024);
+ }
+ preg_match_all('#_lc\("([^"]+)"|_lc\(\'([^\']+)\'#', $data, $m);
+ foreach($m[1] as $i) {
+ if(trim(strip_tags($i))=="") continue;
+ $ret[] = $i;
+ }
+ foreach($m[2] as $i) {
+ if(trim(strip_tags($i))=="") continue;
+ $ret[] = $i;
+ }
+ }
+ }
+
+ if($plugin=="TableOperations")
+ {
+ preg_match_all('#options = \\[([^\\]]+)\\];#', $data, $m);
+ foreach($m[1] as $i) {
+ preg_match_all('#"([^"]+)"#', $i, $m1);
+ foreach($m1[1] as $i) {
+ $ret[] = $i;
+ }
+ }
+
+ //["cell-delete", "td", "Delete cell"],
+ preg_match_all('#\\["[^"]+",[ \t]*"[^"]+",[ \t]*"([^"]+)"\\]#', $data, $m);
+ foreach($m[1] as $i) {
+ $ret[] = $i;
+ }
+ }
+
+
+ $files = getFiles("$pluginDir/", "html$");
+ $files = array_merge($files, getFiles("$pluginDir/", "php$"));
+ foreach($files as $file)
+ {
+ $ret = array_merge($ret, parseHtmlFile($file, $plugin));
+ }
+
+ $files = getFiles("$pluginDir/popups/", "html$");
+ foreach($files as $file)
+ {
+ $ret = array_merge($ret, parseHtmlFile($file, $plugin));
+ }
+ $ret = array_unique($ret);
+
+ $langData[$plugin] = $ret;
+}
+
+$plugins = getFiles("../modules/");
+foreach($plugins as $pluginDir) {
+ $plugin = substr($pluginDir, 12);
+ $ret = array();
+ $files = getFiles("$pluginDir/", "js$");
+ foreach($files as $file)
+ {
+ $fp = fopen($file, "r");
+ $data = "";
+ if($fp) {
+ echo "$file open...
";
+ while(!feof($fp)) {
+ $data .= fread($fp, 1024);
+ }
+ preg_match_all('#_lc\("([^"]+)"|_lc\(\'([^\']+)\'#', $data, $m);
+ foreach($m[1] as $i) {
+ if(trim(strip_tags($i))=="") continue;
+ $ret[] = $i;
+ }
+ foreach($m[2] as $i) {
+ if(trim(strip_tags($i))=="") continue;
+ $ret[] = $i;
+ }
+ }
+ }
+ $ret = array_unique($ret);
+ $langData[$plugin] = $ret;
+}
+
+
+foreach($langData as $plugin=>$strings) {
+ if(sizeof($strings)==0) continue;
+
+
+ $data = "// I18N constants\n";
+ $data .= "//\n";
+ $data .= "// LANG: \"base\", ENCODING: UTF-8\n";
+ $data .= "// Author: Translator-Name, \n";
+ $data .= "//\n";
+ $data .= "// Last revision: 06 september 2007\n";
+ $data .= "// Please don´t remove this information\n";
+ $data .= "// If you modify any source, please insert a comment with your name and e-mail\n";
+ $data .= "//\n";
+ $data .= "// Distributed under the same terms as HTMLArea itself.\n";
+ $data .= "// This notice MUST stay intact for use (see license.txt).\n";
+ $data .= "//\n";
+ $data .= "// (Please, remove information below)\n";
+ $data .= "// FOR TRANSLATORS:\n";
+ $data .= "//\n";
+ $data .= "// 1. PLEASE PUT YOUR CONTACT INFO IN THE ABOVE LINE\n";
+ $data .= "// (at least a valid email address)\n";
+ $data .= "//\n";
+ $data .= "// 2. PLEASE TRY TO USE UTF-8 FOR ENCODING;\n";
+ $data .= "// (if this is not possible, please include a comment\n";
+ $data .= "// that states what encoding is necessary.)\n";
+ $data .= "\n";
+ $data .= "{\n";
+ sort($strings);
+ foreach($strings as $string) {
+ $string = str_replace(array('\\', '"'), array('\\\\', '\\"'), $string);
+ $data .= " \"".$string."\": \"\",\n";
+ }
+ $data = substr($data, 0, -2);
+ $data .= "\n";
+ $data .= "}\n";
+
+ if($plugin=="HTMLArea") {
+ $file = "../lang/base.js";
+ $fp = fopen($file, "w");
+ if(!$fp) continue;
+ fwrite($fp, $data);
+ fclose($fp);
+ echo "$file written...
";
+ } elseif (($plugin=="InternetExplorer")||($plugin=="InsertTable")||($plugin=="InsertImage")||($plugin=="GetHtml")||($plugin=="Gecko")||($plugin=="Dialogs")||($plugin=="CreateLink")||($plugin=="ColorPicker")) {
+ $file = "../modules/$plugin/lang/base.js";
+ $fp = fopen($file, "w");
+ if(!$fp) continue;
+ fwrite($fp, $data);
+ fclose($fp);
+ echo "$file written...
";
+ } elseif ($plugin=="FullScreen") {
+ $file = "../modules/$plugin/lang/base.js";
+ $fp = fopen($file, "w");
+ if(!$fp) continue;
+ fwrite($fp, $data);
+ fclose($fp);
+ echo "$file written...
";
+ $file = "../plugins/$plugin/lang/base.js";
+ $fp = fopen($file, "w");
+ if(!$fp) continue;
+ fwrite($fp, $data);
+ fclose($fp);
+ echo "$file written...
";
+ } else {
+ $file = "../plugins/$plugin/lang/base.js";
+ $fp = fopen($file, "w");
+ if(!$fp) continue;
+ fwrite($fp, $data);
+ fclose($fp);
+ echo "$file written...
";
+ }
+}
+
+
+
+
+function parseHtmlFile($file, $plugin="")
+{
+ $ret = array();
+
+ $fp = fopen($file, "r");
+ if(!$fp) {
+ die("invalid fp");
+ }
+ $data = "";
+ while(!feof($fp)) {
+ $data .= fread($fp, 1024);
+ }
+
+ if($plugin=="FormOperations" || $plugin=="SuperClean" || $plugin=="Linker") {
+ //-tags for inline-dialog or panel-dialog based dialogs
+ $elems = array("l10n");
+ } else {
+ $elems = array("title", "input", "select", "legend", "span", "option", "td", "button", "div", "label");
+ }
+ foreach($elems as $elem) {
+ preg_match_all("#<{$elem}[^>]*>([^<^\"]+)$elem>#i", $data, $m);
+ foreach($m[1] as $i) {
+ if(trim(strip_tags($i))=="") continue;
+ if($i=="/") continue;
+ if($plugin=="ImageManager" && preg_match('#^--+$#', $i)) continue; //skip those ------
+ if($plugin=="CharacterMap" && preg_match('#&[a-z0-9]+;#i', trim($i)) || $i=="@") continue;
+ if($plugin=="SpellChecker" && preg_match('#^\'\\.\\$[a-z]+\\.\'$#', $i)) continue;
+ $ret[] = trim($i);
+ }
+ }
+
+ if($plugin=="FormOperations" || $plugin=="SuperClean" || $plugin=="Linker")
+ {
+ //_( for inline-dialog or panel-dialog based dialogs
+ preg_match_all('#"_\(([^"]+)\)"#i', $data, $m);
+ foreach($m[1] as $i) {
+ if(trim($i)=="") continue;
+ $ret[] = $i;
+ }
+ }
+ else
+ {
+ preg_match_all('#title="([^"]+)"#i', $data, $m);
+ foreach($m[1] as $i) {
+ if(trim(strip_tags($i))=="") continue;
+ if(strip_tags($i)==" - ") continue; //skip those - (ImageManager)
+ $ret[] = $i;
+ }
+ }
+ return($ret);
+}
+
+
+function getFiles($rootdirpath, $eregi_match='') {
+ $array = array();
+ if ($dir = @opendir($rootdirpath)) {
+ $array = array();
+ while (($file = readdir($dir)) !== false) {
+ if($file=="." || $file==".." || $file==".svn") continue;
+ if($eregi_match=="")
+ $array[] = $rootdirpath."/".$file;
+ else if(eregi($eregi_match,$file))
+ $array[] = $rootdirpath."/".$file;
+
+ }
+ closedir($dir);
+ }
+ return $array;
+}
+
+
+
+
+
+?>
\ No newline at end of file
diff --git a/ccm-core/web/assets/xinha/contrib/php-xinha.php b/ccm-core/web/assets/xinha/contrib/php-xinha.php
index 392131bd9..6bbdd0e4a 100755
--- a/ccm-core/web/assets/xinha/contrib/php-xinha.php
+++ b/ccm-core/web/assets/xinha/contrib/php-xinha.php
@@ -81,6 +81,11 @@
return "'" . xinha_js_encode($var) . "'";
}
+ if(is_bool($var))
+ {
+ return $var ? 'true': 'false';
+ }
+
if(is_array($var))
{
$useObject = false;
@@ -138,7 +143,7 @@
* if none was passed or a security error was encountered.
*/
- function xinha_read_passed_data()
+ function xinha_read_passed_data($KeyLocation = 'Xinha:BackendKey')
{
if(isset($_REQUEST['backend_data']) && is_array($_REQUEST['backend_data']))
{
@@ -147,6 +152,12 @@
@session_start();
if(!isset($_SESSION[$bk['key_location']])) return NULL;
+ if($KeyLocation !== $bk['key_location'])
+ {
+ trigger_error('Programming Error - please contact the website administrator/programmer to alert them to this problem. A non-default backend key location is being used to pass backend data to Xinha, but the same key location is not being used to receive data. The special backend configuration has been ignored. To resolve this, find where you are using xinha_pass_to_php_backend and remove the non default key, or find the locations where xinha_read_passed_data is used (in Xinha) and add a parameter with the non default key location, or edit contrib/php-xinha.php and change the default key location in both these functions. See: http://trac.xinha.org/ticket/1518', E_USER_ERROR);
+ return NULL;
+ }
+
if($bk['hash'] ===
function_exists('sha1') ?
sha1($_SESSION[$bk['key_location']] . $bk['data'])
diff --git a/ccm-core/web/assets/xinha/contrib/yuicompressor-2.4.2.jar b/ccm-core/web/assets/xinha/contrib/yuicompressor-2.4.2.jar
new file mode 100644
index 000000000..c29470bd0
Binary files /dev/null and b/ccm-core/web/assets/xinha/contrib/yuicompressor-2.4.2.jar differ
diff --git a/ccm-core/web/assets/xinha/examples/ExtendedDemo.html b/ccm-core/web/assets/xinha/examples/ExtendedDemo.html
index b9883bb3d..0c30370b4 100755
--- a/ccm-core/web/assets/xinha/examples/ExtendedDemo.html
+++ b/ccm-core/web/assets/xinha/examples/ExtendedDemo.html
@@ -3,10 +3,10 @@
will localize the text, this is used outside attributes
+ *
+ * @param A function which can take a native (english) string and return a localized version,
+ * OR; A "context" to be used with the standard Xinha._lc() method,
+ * OR; Null - no localization will happen, only native strings will be used.
+ *
+ */
+
+Xinha.DetachedDialog = function( html, localizer, size, options)
+{
+ var fakeeditor =
+ {
+ 'config': new Xinha.Config(),
+ 'scrollPos': Xinha.prototype.scrollPos,
+ '_someEditorHasBeenActivated': false,
+ 'saveSelection': function() { },
+ 'deactivateEditor' : function() { },
+ '_textArea': document.createElement('textarea'),
+ '_iframe' : document.createElement('div'),
+ '_doc' : document,
+ 'hidePanels': function() { },
+ 'showPanels': function() { },
+ '_isFullScreen': false, // maybe not ?
+ 'activateEditor': function() { },
+ 'restoreSelection': function() { },
+ 'updateToolbar': function() { },
+ 'focusEditor': function() { }
+ };
+
+ Xinha.Dialog.initialZ = 100;
+ this.attached = false;
+
+ Xinha.DetachedDialog.parentConstructor.call(this, fakeeditor, html, localizer, size, options);
+}
+
+Xinha.extend(Xinha.DetachedDialog, Xinha.Dialog);
+
+
+Xinha.DetachedDialog.prototype.attachToPanel
+ = function() { return false; }
+
+Xinha.DetachedDialog.prototype.detachFromToPanel
+ = function() { return false; }
+
+
+
diff --git a/ccm-core/web/assets/xinha/modules/Dialogs/XinhaDialog.js b/ccm-core/web/assets/xinha/modules/Dialogs/XinhaDialog.js
new file mode 100644
index 000000000..7d87552a7
--- /dev/null
+++ b/ccm-core/web/assets/xinha/modules/Dialogs/XinhaDialog.js
@@ -0,0 +1,2 @@
+/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
+Xinha.Dialog=function(e,h,k,n,f){var t=this;this.id={};this.r_id={};this.editor=e;this.document=document;this.size=n;this.modal=(f&&f.modal===false)?false:true;this.closable=(f&&f.closable===false)?false:true;this.resizable=(f&&f.resizable===false)?false:true;this.layer=(f&&f.layer)?f.layer:0;this.centered=(f&&f.centered===true)?true:false;this.closeOnEscape=(f&&f.closeOnEscape===true)?true:false;this.rootElem=null;this.captionBar=null;this.main=null;this.background=null;this.centered=null;this.greyout=null;this.buttons=null;this.closer=null;this.icon=null;this.resizer=null;this.initialZ=null;var a=e.config.dialogOptions;if(a){if(typeof a.centered!="undefined"){this.centered=a.centered}if(typeof a.resizable!="undefined"){this.resizable=a.resizable}if(typeof a.closable!="undefined"){this.closable=a.closable}if(typeof a.greyout!="undefined"){this.greyout=a.greyout}if(typeof a.closeOnEscape!="undefined"){this.closeOnEscape=a.closeOnEscape}}var m;if(Xinha.is_ie){m=document.createElement("iframe");m.src="about:blank";m.onreadystatechange=function(){var w=window.event.srcElement.contentWindow.document;if(this.readyState=="complete"&&w&&w.body){var y=w.createElement("div");var p,x=document.styleSheets;for(var s=0;s";w.getElementsByTagName("body")[0].appendChild(y);w.body.className="xinha_dialog_background";if(t.modal){w.body.className+="_modal"}if(t.greyout){w.body.className+="_greyout"}}}}else{m=document.createElement("div")}m.className="xinha_dialog_background";if(this.modal){m.className+="_modal"}if(this.greyout){m.className+="_greyout"}var g=1000;if(!Xinha.Dialog.initialZ){var o=e._htmlArea;while(o){if(o.style&&parseInt(o.style.zIndex,10)>g){g=parseInt(o.style.zIndex,10)}o=o.parentNode}Xinha.Dialog.initialZ=g}g=Xinha.Dialog.initialZ;var l=m.style;l.position="absolute";l.top=0;l.left=0;l.border="none";l.overflow="hidden";l.display="none";l.zIndex=(this.modal?g+25:g+1)+this.layer;document.body.appendChild(m);this.background=m;m=null;Xinha.freeLater(this,"background");var j=document.createElement("div");j.style.position=(Xinha.is_ie||!this.modal)?"absolute":"fixed";j.style.zIndex=(this.modal?g+27:g+3)+this.layer;j.style.display="none";if(!this.modal){Xinha._addEvent(j,"mousedown",function(){Xinha.Dialog.activateModeless(t)})}j.className="dialog"+(this.modal?"":" modeless");if(Xinha.is_chrome){j.className+=" chrome"}document.body.appendChild(j);j.style.paddingBottom="10px";j.style.width=(n&&n.width)?n.width+"px":"";if(n&&n.height){if(Xinha.ie_version<7){j.style.height=n.height+"px"}else{j.style.minHeight=n.height+"px"}}h=this.translateHtml(h,k);var d=document.createElement("div");j.appendChild(d);d.innerHTML=h;this.fixupDOM(d,k);var q=d.removeChild(d.getElementsByTagName("h1")[0]);j.insertBefore(q,d);Xinha._addEvent(q,"mousedown",function(i){t.dragStart(i)});q.style.MozUserSelect="none";q.style.WebkitUserSelect="none";q.unselectable="on";q.onselectstart=function(){return false};this.buttons=document.createElement("div");l=this.buttons.style;l.position="absolute";l.top="0";l.right="2px";j.appendChild(this.buttons);if(this.closable&&this.closeOnEscape){Xinha._addEvent(document,"keypress",function(i){if(i.keyCode==27){if(Xinha.Dialog.activeModeless==t||t.modal){t.hide();return true}}})}this.closer=null;if(this.closable){this.closer=document.createElement("div");this.closer.className="closeButton";this.closer.onmousedown=function(i){this.className="closeButton buttonClick";Xinha._stopEvent(Xinha.getEvent(i));return false};this.closer.onmouseout=function(i){this.className="closeButton";Xinha._stopEvent(Xinha.getEvent(i));return false};this.closer.onmouseup=function(){this.className="closeButton";t.hide();return false};this.buttons.appendChild(this.closer);var v=document.createElement("span");v.className="innerX";v.style.position="relative";v.style.top="-3px";v.appendChild(document.createTextNode("\u00D7"));this.closer.appendChild(v);v=null}this.icon=document.createElement("img");var u=this.icon;u.className="icon";u.src=e.config.iconList.dialogCaption;u.style.position="absolute";u.style.top="3px";u.style.left="2px";u.ondrag=function(){return false};j.appendChild(this.icon);var c=j.getElementsByTagName("*");for(var r=0;rg){n.height=g+"px";if(h.scrollHeight>k){a.main.style.overflowY="auto"}}if(this.size.top&&this.size.left){n.top=parseInt(this.size.top,10)+"px";n.left=parseInt(this.size.left,10)+"px"}else{if(this.editor.btnClickEvent&&!this.centered){var b=this.editor.btnClickEvent;if(n.position=="absolute"){n.top=b.clientY+this.scrollPos.y+"px"}else{n.top=b.clientY+"px"}if(k+h.offsetTop>g){n.top=(n.position=="absolute"?this.scrollPos.y:0)+"px"}if(n.position=="absolute"){n.left=b.clientX+this.scrollPos.x+"px"}else{n.left=b.clientX+"px"}if(f+h.offsetLeft>c){n.left=b.clientX-f+"px";if(h.offsetLeft<0){n.left=0}}this.editor.btnClickEvent=null}else{var j=(g-k)/2;var e=(c-f)/2;n.top=((j>0)?j:0)+"px";n.left=((e>0)?e:0)+"px"}}}this.width=f;this.height=k;if(!m){this.resizeBackground({width:f+"px",height:k+"px"});this.posBackground({top:n.top,left:n.left})}if(typeof l!="undefined"){this.setValues(l)}this.dialogShown=true};Xinha.Dialog.prototype.hide=function(){if(this.attached){this.editor.hidePanel(this.rootElem)}else{Xinha.Dialog.fadeOut(this.rootElem);this.hideBackground();var a=this;if(Xinha.is_ff2&&this.modal){this.editor._textArea.style.display=this._restoreTo[0];this.editor._iframe.style.visibility=this._restoreTo[1];this.editor.showPanels(this._restoreTo[2])}if(!this.editor._isFullScreen&&this.modal){window.scroll(this.scrollPos.x,this.scrollPos.y)}if(Xinha.is_ie&&!this.modal){Xinha._removeEvent(this.editor._doc,"mouseup",a.saveSelection)}if(this.modal){this.editor.suspendUpdateToolbar=false;this.editor.currentModal=null;this.editor.activateEditor()}}if(this.modal){this.editor.restoreSelection(this._lastRange)}this.dialogShown=false;this.editor.updateToolbar();this.editor.focusEditor();return this.getValues()};Xinha.Dialog.prototype.toggle=function(){if(this.rootElem.style.display=="none"){this.show()}else{this.hide()}};Xinha.Dialog.prototype.collapse=function(){if(this.collapsed){this.collapsed=false;this.show()}else{this.main.style.height=0;this.collapsed=true}};Xinha.Dialog.prototype.getElementById=function(a){if(!this.rootElem.parentNode){this.document.body.appendChild(this.rootElem)}return this.document.getElementById(this.id[a]?this.id[a]:a)};Xinha.Dialog.prototype.getElementsByName=function(a){if(!this.rootElem.parentNode){this.document.body.appendChild(this.rootElem)}var b=this.document.getElementsByName(this.id[a]?this.id[a]:a);return Xinha.collectionToArray(b)};Xinha.Dialog.prototype.getElementsByClassName=function(a){return Xinha.getElementsByClassName(this.rootElem,a)};Xinha.Dialog.prototype.dragStart=function(c){if(this.attached||this.dragging){return}if(!this.modal){this.posBackground({top:0,left:0});this.resizeBackground(Xinha.Dialog.calcFullBgSize());this.editor.suspendUpdateToolbar=true}c=Xinha.getEvent(c);var b=this;b.dragging=true;b.scrollPos=b.editor.scrollPos();var a=b.rootElem.style;b.xOffs=c.offsetX||c.layerX;b.yOffs=c.offsetY||c.layerY;b.mouseMove=function(d){b.dragIt(d)};Xinha._addEvent(document,"mousemove",b.mouseMove);if(Xinha.is_ie){Xinha._addEvent(this.background.contentWindow.document,"mousemove",b.mouseMove)}b.mouseUp=function(d){b.dragEnd(d)};Xinha._addEvent(document,"mouseup",b.mouseUp);if(Xinha.is_ie){Xinha._addEvent(this.background.contentWindow.document,"mouseup",b.mouseUp)}};Xinha.Dialog.prototype.dragIt=function(c){var b=this;if(!b.dragging){return false}var d,e,a;if(b.rootElem.style.position=="absolute"){d=(c.clientY+this.scrollPos.y)-b.yOffs+"px";e=(c.clientX+this.scrollPos.x)-b.xOffs+"px";a={top:d,left:e}}else{if(b.rootElem.style.position=="fixed"){d=c.clientY-b.yOffs+"px";e=c.clientX-b.xOffs+"px";a={top:d,left:e}}}b.posDialog(a)};Xinha.Dialog.prototype.dragEnd=function(b){var a=this;if(!this.modal){this.editor.suspendUpdateToolbar=false}if(!a.dragging){return false}a.dragging=false;Xinha._removeEvent(document,"mousemove",a.mouseMove);if(Xinha.is_ie){Xinha._removeEvent(this.background.contentWindow.document,"mousemove",a.mouseMove)}Xinha._removeEvent(document,"mouseup",a.mouseUp);if(Xinha.is_ie){Xinha._removeEvent(this.background.contentWindow.document,"mouseup",a.mouseUp)}var c=a.rootElem.style;a.size.top=c.top;a.size.left=c.left;if(!this.modal){this.sizeBgToDialog()}};Xinha.Dialog.prototype.resizeStart=function(c){var b=this;if(b.resizing){return}b.resizing=true;if(!this.modal){this.editor.suspendUpdateToolbar=true;this.posBackground({top:0,left:0});this.resizeBackground(Xinha.Dialog.calcFullBgSize())}b.scrollPos=b.editor.scrollPos();var a=b.rootElem.style;a.minHeight="";a.overflow="hidden";b.xOffs=parseInt(a.left,10);b.yOffs=parseInt(a.top,10);b.mouseMove=function(d){b.resizeIt(d)};Xinha._addEvent(document,"mousemove",b.mouseMove);if(Xinha.is_ie){Xinha._addEvent(this.background.contentWindow.document,"mousemove",b.mouseMove)}b.mouseUp=function(d){b.resizeEnd(d)};Xinha._addEvent(document,"mouseup",b.mouseUp);if(Xinha.is_ie){Xinha._addEvent(this.background.contentWindow.document,"mouseup",b.mouseUp)}};Xinha.Dialog.prototype.resizeIt=function(c){var b=this;if(!b.resizing){return false}var d,e;if(b.rootElem.style.position=="absolute"){d=c.clientY+b.scrollPos.y;e=c.clientX+b.scrollPos.x}else{d=c.clientY;e=c.clientX}e-=b.xOffs;d-=b.yOffs;var a={};a.width=((e>10)?e:10)+8+"px";a.height=((d>10)?d:10)+"px";b.sizeDialog(a);b.width=b.rootElem.offsetWidth;b.height=b.rootElem.offsetHeight;b.onresize()};Xinha.Dialog.prototype.resizeEnd=function(b){var a=this;a.resizing=false;if(!this.modal){this.editor.suspendUpdateToolbar=false}Xinha._removeEvent(document,"mousemove",a.mouseMove);if(Xinha.is_ie){Xinha._removeEvent(this.background.contentWindow.document,"mouseup",a.mouseUp)}Xinha._removeEvent(document,"mouseup",a.mouseUp);if(Xinha.is_ie){Xinha._removeEvent(this.background.contentWindow.document,"mouseup",a.mouseUp)}a.size.width=a.rootElem.offsetWidth;a.size.height=a.rootElem.offsetHeight;if(!this.modal){this.sizeBgToDialog()}};Xinha.Dialog.prototype.attachToPanel=function(c){var b=this;var d=this.rootElem;var a=this.editor;this.attached=true;this.rootElem.side=c;this.captionBar.ondblclick=function(e){b.detachFromPanel(Xinha.getEvent(e))};d.style.position="static";d.parentNode.removeChild(d);this.background.style.display="none";this.captionBar.style.paddingLeft="3px";this.resizer.style.display="none";if(this.closable){this.closer.style.display="none"}this.icon.style.display="none";if(c=="left"||c=="right"){d.style.width=a.config.panel_dimensions[c]}else{d.style.width=""}Xinha.addClasses(d,"panel");a._panels[c].panels.push(d);a._panels[c].div.appendChild(d);a.notifyOf("panel_change",{action:"add",panel:d})};Xinha.Dialog.prototype.detachFromPanel=function(){var b=this;var c=b.rootElem;var d=c.style;var a=b.editor;b.attached=false;var e=Xinha.getElementTopLeft(c);d.position="absolute";d.top=e.top+"px";d.left=e.left+"px";b.resizer.style.display="";if(b.closable){b.closer.style.display=""}b.icon.style.display="";if(b.size.width){c.style.width=b.size.width+"px"}Xinha.removeClasses(c,"panel");a.removePanel(c);document.body.appendChild(c);b.captionBar.ondblclick=function(){b.attachToPanel(c.side)};this.background.style.display="";this.sizeBgToDialog()};Xinha.Dialog.calcFullBgSize=function(){var b=Xinha.pageSize();var a=Xinha.viewportSize();return{width:(b.x>a.x?b.x:a.x)+"px",height:(b.x>a.y?b.y:a.y)+"px"}};Xinha.Dialog.prototype.sizeBgToDialog=function(){var b=this.rootElem.style;var a=this.background.style;a.top=b.top;a.left=b.left;a.width=b.width;a.height=b.height};Xinha.Dialog.prototype.hideBackground=function(){Xinha.Dialog.fadeOut(this.background)};Xinha.Dialog.prototype.showBackground=function(){Xinha.Dialog.fadeIn(this.background,70)};Xinha.Dialog.prototype.posBackground=function(a){if(this.background.style.display!="none"){this.background.style.top=a.top;this.background.style.left=a.left}};Xinha.Dialog.prototype.resizeBackground=function(a){if(this.background.style.display!="none"){this.background.style.width=a.width;this.background.style.height=a.height}};Xinha.Dialog.prototype.posDialog=function(b){var a=this.rootElem.style;a.left=b.left;a.top=b.top};Xinha.Dialog.prototype.sizeDialog=function(b){var a=this.rootElem.style;a.height=b.height;a.width=b.width;var c=parseInt(b.width,10);var d=parseInt(b.height,10)-this.captionBar.offsetHeight;this.main.style.height=(d>20)?d:20+"px";this.main.style.width=(c>10)?c:10+"px"};Xinha.Dialog.prototype.setValues=function(g){for(var f in g){if(typeof f=="string"){var c=this.getElementsByName(f);if(!c){continue}for(var a=0;a=0){b=d.options[d.selectedIndex]}}break;default:switch(d.type.toLowerCase()){case"radio":if(d.checked){b=d.value}break;case"checkbox":if(b===null){if(this.getElementsByName(this.r_id[d.name]).length>1){b=[]}}if(d.checked){if(b!==null&&typeof b=="object"&&b.push){b.push(d.value)}else{b=d.value}}break;default:b=d.value;break}}e[this.r_id[d.name]]=b}return e};Xinha.Dialog.prototype.setLocalizer=function(b){var a=this;if(typeof b=="function"){a._lc=b}else{if(b){this._lc=function(c){return Xinha._lc(c,b)}}else{this._lc=function(c){return c}}}};Xinha.Dialog.prototype.translateHtml=function(b,c){var a=this;if(c){this.setLocalizer(c)}b=b.replace(/((?:name)|(?:id))=(['"])\[([a-z0-9_]+)\]\2/ig,function(e,f,d,g){return f+"="+d+a.createId(g)+d}).replace(/(.*?)<\/l10n>/ig,function(d,e){return a._lc(e)}).replace(/\="_\((.*?)\)"/g,function(d,e){return'="'+a._lc(e)+'"'});return b};Xinha.Dialog.prototype.fixupDOM=function(j,c){var b=this;if(typeof c!="string"){c="GenericPlugin"}var h=function(m,l){switch(l){case"editor":return _editor_url;case"plugin":return Xinha.getPluginDir(c);case"images":return b.editor.imgURL("images")}};var a=Xinha.collectionToArray(j.getElementsByTagName("img"));for(var g=0;g=0){b.op-=c;Xinha.Dialog.setOpacity(b,d);b.timeOut=setTimeout(function(){Xinha.Dialog.fadeOut(b,a,c)},a)}else{Xinha.Dialog.setOpacity(b,0);b.style.display="none";b.op=0;b.timeOut=null}};
\ No newline at end of file
diff --git a/ccm-core/web/assets/xinha/modules/Dialogs/dialog.js b/ccm-core/web/assets/xinha/modules/Dialogs/dialog.js
index cd267667c..401bd6550 100644
--- a/ccm-core/web/assets/xinha/modules/Dialogs/dialog.js
+++ b/ccm-core/web/assets/xinha/modules/Dialogs/dialog.js
@@ -1,75 +1,2 @@
/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
-/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */
-/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/modules/Dialogs/dialog.js */
-function Dialog(_1,_2,_3){
-if(typeof _3=="undefined"){
-_3=window;
-}
-if(typeof window.showModalDialog=="function"&&!Xinha.is_webkit){
-Dialog._return=function(_4){
-if(typeof _2=="function"){
-_2(_4);
-}
-};
-var r=window.showModalDialog(_1,_3,"dialogheight=300;dialogwidth=400;resizable=yes");
-}else{
-Dialog._geckoOpenModal(_1,_2,_3);
-}
-}
-Dialog._parentEvent=function(ev){
-setTimeout(function(){
-if(Dialog._modal&&!Dialog._modal.closed){
-Dialog._modal.focus();
-}
-},50);
-try{
-if(Dialog._modal&&!Dialog._modal.closed){
-Xinha._stopEvent(ev);
-}
-}
-catch(e){
-}
-};
-Dialog._return=null;
-Dialog._modal=null;
-Dialog._arguments=null;
-Dialog._selection=null;
-Dialog._geckoOpenModal=function(_7,_8,_9){
-var _a=window.open(_7,"hadialog","toolbar=no,menubar=no,personalbar=no,width=10,height=10,"+"scrollbars=no,resizable=yes,modal=yes,dependable=yes");
-Dialog._modal=_a;
-Dialog._arguments=_9;
-function capwin(w){
-Xinha._addEvent(w,"click",Dialog._parentEvent);
-Xinha._addEvent(w,"mousedown",Dialog._parentEvent);
-Xinha._addEvent(w,"focus",Dialog._parentEvent);
-}
-function relwin(w){
-Xinha._removeEvent(w,"click",Dialog._parentEvent);
-Xinha._removeEvent(w,"mousedown",Dialog._parentEvent);
-Xinha._removeEvent(w,"focus",Dialog._parentEvent);
-}
-capwin(window);
-for(var i=0;iSome Text Here will localize the text, this is used outside attributes
+ *
+ * @param A function which can take a native (english) string and return a localized version,
+ * OR; A "context" to be used with the standard Xinha._lc() method,
+ * OR; Null - no localization will happen, only native strings will be used.
+ *
+ */
+
+Xinha.DivDialog = function(rootElem, html, localizer)
+{
+ this.id = { };
+ this.r_id = { }; // reverse lookup id
+ this.document = document;
+
+ this.rootElem = rootElem;
+ this.rootElem.className += ' dialog';
+ this.rootElem.style.display = 'none';
+
+ this.width = this.rootElem.offsetWidth + 'px';
+ this.height = this.rootElem.offsetHeight + 'px';
+
+ this.setLocalizer(localizer);
+ this.rootElem.innerHTML = this.translateHtml(html);
+}
+
+Xinha.extend(Xinha.DivDialog, Xinha.Dialog);
+
+Xinha.DivDialog.prototype.show = function(values)
+{
+ if(typeof values != 'undefined')
+ {
+ this.setValues(values);
+ }
+
+ this.rootElem.style.display = '';
+};
+
+Xinha.DivDialog.prototype.hide = function()
+{
+ this.rootElem.style.display = 'none';
+ return this.getValues();
+};
diff --git a/ccm-core/web/assets/xinha/modules/Dialogs/inline-dialog.js b/ccm-core/web/assets/xinha/modules/Dialogs/inline-dialog.js
deleted file mode 100644
index 2641f1bca..000000000
--- a/ccm-core/web/assets/xinha/modules/Dialogs/inline-dialog.js
+++ /dev/null
@@ -1,207 +0,0 @@
-/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
-/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */
-/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/modules/Dialogs/inline-dialog.js */
-Xinha.Dialog=function(_1,_2,_3){
-this.id={};
-this.r_id={};
-this.editor=_1;
-this.document=document;
-this.rootElem=document.createElement("div");
-this.rootElem.className="dialog";
-this.rootElem.style.position="absolute";
-this.rootElem.style.display="none";
-this.editor._framework.ed_cell.insertBefore(this.rootElem,this.editor._framework.ed_cell.firstChild);
-this.rootElem.style.width=this.width=this.editor._framework.ed_cell.offsetWidth+"px";
-this.rootElem.style.height=this.height=this.editor._framework.ed_cell.offsetHeight+"px";
-var _4=this;
-if(typeof _3=="function"){
-this._lc=_3;
-}else{
-if(_3){
-this._lc=function(_5){
-return Xinha._lc(_5,_3);
-};
-}else{
-this._lc=function(_6){
-return _6;
-};
-}
-}
-_2=_2.replace(/\[([a-z0-9_]+)\]/ig,function(_7,id){
-if(typeof _4.id[id]=="undefined"){
-_4.id[id]=Xinha.uniq("Dialog");
-_4.r_id[_4.id[id]]=id;
-}
-return _4.id[id];
-}).replace(/(.*?)<\/l10n>/ig,function(_9,_a){
-return _4._lc(_a);
-}).replace(/="_\((.*?)\)"/g,function(_b,_c){
-return "=\""+_4._lc(_c)+"\"";
-});
-this.rootElem.innerHTML=_2;
-this.editor.notifyOn("resize",function(e,_e){
-_4.rootElem.style.width=_4.width=_4.editor._framework.ed_cell.offsetWidth+"px";
-_4.rootElem.style.height=_4.height=_4.editor._framework.ed_cell.offsetHeight+"px";
-_4.onresize();
-});
-};
-Xinha.Dialog.prototype.onresize=function(){
-return true;
-};
-Xinha.Dialog.prototype.show=function(_f){
-if(Xinha.is_ie){
-this._lastRange=this.editor._createRange(this.editor._getSelection());
-}
-if(typeof _f!="undefined"){
-this.setValues(_f);
-}
-this._restoreTo=[this.editor._textArea.style.display,this.editor._iframe.style.visibility,this.editor.hidePanels()];
-this.editor._textArea.style.display="none";
-this.editor._iframe.style.visibility="hidden";
-this.rootElem.style.display="";
-};
-Xinha.Dialog.prototype.hide=function(){
-this.rootElem.style.display="none";
-this.editor._textArea.style.display=this._restoreTo[0];
-this.editor._iframe.style.visibility=this._restoreTo[1];
-this.editor.showPanels(this._restoreTo[2]);
-if(Xinha.is_ie){
-this._lastRange.select();
-}
-this.editor.updateToolbar();
-return this.getValues();
-};
-Xinha.Dialog.prototype.toggle=function(){
-if(this.rootElem.style.display=="none"){
-this.show();
-}else{
-this.hide();
-}
-};
-Xinha.Dialog.prototype.setValues=function(_10){
-for(var i in _10){
-var _12=this.getElementsByName(i);
-if(!_12){
-continue;
-}
-for(var x=0;x<_12.length;x++){
-var e=_12[x];
-switch(e.tagName.toLowerCase()){
-case "select":
-for(var j=0;j=0){
-v=i.options[i.selectedIndex];
-}
-}
-break;
-case "textarea":
-case "input":
-default:
-switch(i.type.toLowerCase()){
-case "radio":
-if(i.checked){
-v=i.value;
-break;
-}
-case "checkbox":
-if(v==null){
-if(this.getElementsByName(this.r_id[i.name]).length>1){
-v=new Array();
-}
-}
-if(i.checked){
-if(v!=null&&typeof v=="object"&&v.push){
-v.push(i.value);
-}else{
-v=i.value;
-}
-}
-break;
-default:
-v=i.value;
-break;
-}
-}
-_17[this.r_id[i.name]]=v;
-}
-return _17;
-};
-Xinha.Dialog.prototype.getElementById=function(id){
-return this.document.getElementById(this.id[id]?this.id[id]:id);
-};
-Xinha.Dialog.prototype.getElementsByName=function(_1e){
-return this.document.getElementsByName(this.id[_1e]?this.id[_1e]:_1e);
-};
-
diff --git a/ccm-core/web/assets/xinha/modules/Dialogs/panel-dialog.js b/ccm-core/web/assets/xinha/modules/Dialogs/panel-dialog.js
index 74ac287d9..9d2bbd416 100644
--- a/ccm-core/web/assets/xinha/modules/Dialogs/panel-dialog.js
+++ b/ccm-core/web/assets/xinha/modules/Dialogs/panel-dialog.js
@@ -1,51 +1,77 @@
-/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
-/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */
-/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/modules/Dialogs/panel-dialog.js */
-Xinha.PanelDialog=function(_1,_2,_3,_4){
-this.id={};
-this.r_id={};
-this.editor=_1;
-this.document=document;
-this.rootElem=_1.addPanel(_2);
-var _5=this;
-if(typeof _4=="function"){
-this._lc=_4;
-}else{
-if(_4){
-this._lc=function(_6){
-return Xinha._lc(_6,_4);
-};
-}else{
-this._lc=function(_7){
-return _7;
-};
-}
-}
-_3=_3.replace(/\[([a-z0-9_]+)\]/ig,function(_8,id){
-if(typeof _5.id[id]=="undefined"){
-_5.id[id]=Xinha.uniq("Dialog");
-_5.r_id[_5.id[id]]=id;
-}
-return _5.id[id];
-}).replace(/(.*?)<\/l10n>/ig,function(_a,_b){
-return _5._lc(_b);
-}).replace(/="_\((.*?)\)"/g,function(_c,_d){
-return "=\""+_5._lc(_d)+"\"";
-});
-this.rootElem.innerHTML=_3;
-};
-Xinha.PanelDialog.prototype.show=function(_e){
-this.setValues(_e);
-this.editor.showPanel(this.rootElem);
-};
-Xinha.PanelDialog.prototype.hide=function(){
-this.editor.hidePanel(this.rootElem);
-return this.getValues();
-};
-Xinha.PanelDialog.prototype.onresize=Xinha.Dialog.prototype.onresize;
-Xinha.PanelDialog.prototype.toggle=Xinha.Dialog.prototype.toggle;
-Xinha.PanelDialog.prototype.setValues=Xinha.Dialog.prototype.setValues;
-Xinha.PanelDialog.prototype.getValues=Xinha.Dialog.prototype.getValues;
-Xinha.PanelDialog.prototype.getElementById=Xinha.Dialog.prototype.getElementById;
-Xinha.PanelDialog.prototype.getElementsByName=Xinha.Dialog.prototype.getElementsByName;
+Xinha.PanelDialog = function(editor, side, html, localizer)
+{
+ this.id = { };
+ this.r_id = { }; // reverse lookup id
+ this.editor = editor;
+ this.document = document;
+ this.rootElem = editor.addPanel(side);
+
+ var dialog = this;
+ if(typeof localizer == 'function')
+ {
+ this._lc = localizer;
+ }
+ else if(localizer)
+ {
+ this._lc = function(string)
+ {
+ return Xinha._lc(string,localizer);
+ };
+ }
+ else
+ {
+ this._lc = function(string)
+ {
+ return string;
+ };
+ }
+
+ html = html.replace(/\[([a-z0-9_]+)\]/ig,
+ function(fullString, id)
+ {
+ if(typeof dialog.id[id] == 'undefined')
+ {
+ dialog.id[id] = Xinha.uniq('Dialog');
+ dialog.r_id[dialog.id[id]] = id;
+ }
+ return dialog.id[id];
+ }
+ ).replace(/(.*?)<\/l10n>/ig,
+ function(fullString,translate)
+ {
+ return dialog._lc(translate) ;
+ }
+ ).replace(/="_\((.*?)\)"/g,
+ function(fullString, translate)
+ {
+ return '="' + dialog._lc(translate) + '"';
+ }
+ );
+
+ this.rootElem.innerHTML = html;
+};
+
+Xinha.PanelDialog.prototype.show = function(values)
+{
+ this.setValues(values);
+ this.editor.showPanel(this.rootElem);
+};
+
+Xinha.PanelDialog.prototype.hide = function()
+{
+ this.editor.hidePanel(this.rootElem);
+ return this.getValues();
+};
+
+Xinha.PanelDialog.prototype.onresize = Xinha.Dialog.prototype.onresize;
+
+Xinha.PanelDialog.prototype.toggle = Xinha.Dialog.prototype.toggle;
+
+Xinha.PanelDialog.prototype.setValues = Xinha.Dialog.prototype.setValues;
+
+Xinha.PanelDialog.prototype.getValues = Xinha.Dialog.prototype.getValues;
+
+Xinha.PanelDialog.prototype.getElementById = Xinha.Dialog.prototype.getElementById;
+
+Xinha.PanelDialog.prototype.getElementsByName = Xinha.Dialog.prototype.getElementsByName;
\ No newline at end of file
diff --git a/ccm-core/web/assets/xinha/modules/Dialogs/popupwin.js b/ccm-core/web/assets/xinha/modules/Dialogs/popupwin.js
index 8ec686f26..2baf89e67 100644
--- a/ccm-core/web/assets/xinha/modules/Dialogs/popupwin.js
+++ b/ccm-core/web/assets/xinha/modules/Dialogs/popupwin.js
@@ -1,123 +1,2 @@
/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
-/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */
-/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/modules/Dialogs/popupwin.js */
-function PopupWin(_1,_2,_3,_4){
-this.editor=_1;
-this.handler=_3;
-var _5=window.open("","__ha_dialog","toolbar=no,menubar=no,personalbar=no,width=600,height=600,left=20,top=40,scrollbars=no,resizable=yes");
-this.window=_5;
-var _6=_5.document;
-this.doc=_6;
-var _7=this;
-var _8=document.baseURI||document.URL;
-if(_8&&_8.match(/(.*)\/([^\/]+)/)){
-_8=RegExp.$1+"/";
-}
-if(typeof _editor_url!="undefined"&&!(/^\//.test(_editor_url))&&!(/http:\/\//.test(_editor_url))){
-_8+=_editor_url;
-}else{
-_8=_editor_url;
-}
-if(!(/\/$/.test(_8))){
-_8+="/";
-}
-this.baseURL=_8;
-_6.open();
-var _9=""+_2+"\n";
-_9+="\n";
-if(_editor_skin!=""){
-_9+="\n";
-}
-_9+="\n";
-_9+="";
-_6.write(_9);
-_6.close();
-function init2(){
-var _a=_6.body;
-if(!_a){
-setTimeout(init2,25);
-return false;
-}
-_5.title=_2;
-_6.documentElement.style.padding="0px";
-_6.documentElement.style.margin="0px";
-var _b=_6.createElement("div");
-_b.className="content";
-_7.content=_b;
-_a.appendChild(_b);
-_7.element=_a;
-_4(_7);
-_5.focus();
-}
-init2();
-}
-PopupWin.prototype.callHandler=function(){
-var _c=["input","textarea","select"];
-var _d={};
-for(var ti=_c.length;--ti>=0;){
-var _f=_c[ti];
-var els=this.content.getElementsByTagName(_f);
-for(var j=0;j\n";e+='\n";if(_editor_skin!=""){e+='\n"}e+="\n";e+='