cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r558490 [7/33] - in /cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha: ./ images/ images/de/ images/fr/ lang/ modules/ modules/ColorPicker/ modules/CreateLink/ modules/Dialogs/ mo...
Date Sun, 22 Jul 2007 14:51:30 GMT
Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/Dialogs/popupwin.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/Dialogs/popupwin.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/Dialogs/popupwin.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/Dialogs/popupwin.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,119 @@
+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="<html><head><title>"+_2+"</title>\n";
+_9+="<style type=\"text/css\">@import url("+_editor_url+"Xinha.css);</style>\n";
+if(_editor_skin!=""){
+_9+="<style type=\"text/css\">@import url("+_editor_url+"skins/"+_editor_skin+"/skin.css);</style>\n";
+}
+_9+="</head>\n";
+_9+="<body class=\"dialog popupwin\" id=\"--HA-body\"></body></html>";
+_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<els.length;++j){
+var el=els[j];
+var val=el.value;
+if(el.tagName.toLowerCase()=="input"){
+if(el.type=="checkbox"){
+val=el.checked;
+}
+}
+_d[el.name]=val;
+}
+}
+this.handler(this,_d);
+return false;
+};
+PopupWin.prototype.close=function(){
+this.window.close();
+};
+PopupWin.prototype.addButtons=function(){
+var _14=this;
+var div=this.doc.createElement("div");
+this.content.appendChild(div);
+div.id="buttons";
+div.className="buttons";
+for(var i=0;i<arguments.length;++i){
+var btn=arguments[i];
+var _18=this.doc.createElement("button");
+div.appendChild(_18);
+_18.innerHTML=Xinha._lc(btn,"Xinha");
+switch(btn.toLowerCase()){
+case "ok":
+Xinha.addDom0Event(_18,"click",function(){
+_14.callHandler();
+_14.close();
+return false;
+});
+break;
+case "cancel":
+Xinha.addDom0Event(_18,"click",function(){
+_14.close();
+return false;
+});
+break;
+}
+}
+};
+PopupWin.prototype.showAtElement=function(){
+var _19=this;
+setTimeout(function(){
+var w=_19.content.offsetWidth+4;
+var h=_19.content.offsetHeight+4;
+var el=_19.content;
+var s=el.style;
+s.position="absolute";
+s.left=parseInt((w-el.offsetWidth)/2,10)+"px";
+s.top=parseInt((h-el.offsetHeight)/2,10)+"px";
+if(Xinha.is_gecko){
+_19.window.innerWidth=w;
+_19.window.innerHeight=h;
+}else{
+_19.window.resizeTo(w+8,h+70);
+}
+},25);
+};

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/Dialogs/popupwin.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/full-screen.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/full-screen.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/full-screen.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/full-screen.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,135 @@
+function FullScreen(_1,_2){
+this.editor=_1;
+_1._superclean_on=false;
+cfg=_1.config;
+cfg.registerButton("fullscreen",this._lc("Maximize/Minimize Editor"),[_editor_url+cfg.imgURL+"ed_buttons_main.gif",8,0],true,function(e,_4,_5){
+e._fullScreen();
+});
+cfg.addToolbarElement("fullscreen","popupeditor",0);
+}
+FullScreen._pluginInfo={name:"FullScreen",version:"1.0",developer:"James Sleeman",developer_url:"http://www.gogo.co.nz/",c_owner:"Gogo Internet Services",license:"htmlArea",sponsor:"Gogo Internet Services",sponsor_url:"http://www.gogo.co.nz/"};
+FullScreen.prototype._lc=function(_6){
+return Xinha._lc(_6,{url:_editor_url+"modules/FullScreen/lang/",context:"FullScreen"});
+};
+Xinha.prototype._fullScreen=function(){
+var e=this;
+function sizeItUp(){
+if(!e._isFullScreen||e._sizing){
+return false;
+}
+e._sizing=true;
+var _8=Xinha.viewportSize();
+var h=_8.y-e.config.fullScreenMargins[0]-e.config.fullScreenMargins[2];
+var w=_8.x-e.config.fullScreenMargins[1]-e.config.fullScreenMargins[3];
+e.sizeEditor(w+"px",h+"px",true,true);
+e._sizing=false;
+if(e._toolbarObjects.fullscreen){
+e._toolbarObjects.fullscreen.swapImage([_editor_url+cfg.imgURL+"ed_buttons_main.gif",9,0]);
+}
+}
+function sizeItDown(){
+if(e._isFullScreen||e._sizing){
+return false;
+}
+e._sizing=true;
+e.initSize();
+e._sizing=false;
+if(e._toolbarObjects.fullscreen){
+e._toolbarObjects.fullscreen.swapImage([_editor_url+cfg.imgURL+"ed_buttons_main.gif",8,0]);
+}
+}
+function resetScroll(){
+if(e._isFullScreen){
+window.scroll(0,0);
+window.setTimeout(resetScroll,150);
+}
+}
+if(typeof this._isFullScreen=="undefined"){
+this._isFullScreen=false;
+if(e.target!=e._iframe){
+Xinha._addEvent(window,"resize",sizeItUp);
+}
+}
+if(Xinha.is_gecko){
+this.deactivateEditor();
+}
+if(this._isFullScreen){
+this._htmlArea.style.position="";
+if(!Xinha.is_ie){
+this._htmlArea.style.border="";
+}
+try{
+if(Xinha.is_ie&&document.compatMode=="CSS1Compat"){
+var _b=document.getElementsByTagName("html");
+}else{
+var _b=document.getElementsByTagName("body");
+}
+_b[0].style.overflow="";
+}
+catch(e){
+}
+this._isFullScreen=false;
+sizeItDown();
+var _c=this._htmlArea;
+while((_c=_c.parentNode)&&_c.style){
+_c.style.position=_c._xinha_fullScreenOldPosition;
+_c._xinha_fullScreenOldPosition=null;
+}
+if(Xinha.ie_version<7){
+var _d=document.getElementsByTagName("select");
+for(var i=0;i<_d.length;++i){
+_d[i].style.visibility="visible";
+}
+}
+window.scroll(this._unScroll.x,this._unScroll.y);
+}else{
+this._unScroll={x:(window.pageXOffset)?(window.pageXOffset):(document.documentElement)?document.documentElement.scrollLeft:document.body.scrollLeft,y:(window.pageYOffset)?(window.pageYOffset):(document.documentElement)?document.documentElement.scrollTop:document.body.scrollTop};
+var _c=this._htmlArea;
+while((_c=_c.parentNode)&&_c.style){
+_c._xinha_fullScreenOldPosition=_c.style.position;
+_c.style.position="static";
+}
+if(Xinha.ie_version<7){
+var _d=document.getElementsByTagName("select");
+var s,currentEditor;
+for(var i=0;i<_d.length;++i){
+s=_d[i];
+currentEditor=false;
+while(s=s.parentNode){
+if(s==this._htmlArea){
+currentEditor=true;
+break;
+}
+}
+if(!currentEditor&&_d[i].style.visibility!="hidden"){
+_d[i].style.visibility="hidden";
+}
+}
+}
+window.scroll(0,0);
+this._htmlArea.style.position="absolute";
+this._htmlArea.style.zIndex=999;
+this._htmlArea.style.left=e.config.fullScreenMargins[3]+"px";
+this._htmlArea.style.top=e.config.fullScreenMargins[0]+"px";
+if(!Xinha.is_ie){
+this._htmlArea.style.border="none";
+}
+this._isFullScreen=true;
+resetScroll();
+try{
+if(Xinha.is_ie&&document.compatMode=="CSS1Compat"){
+var _b=document.getElementsByTagName("html");
+}else{
+var _b=document.getElementsByTagName("body");
+}
+_b[0].style.overflow="hidden";
+}
+catch(e){
+}
+sizeItUp();
+}
+if(Xinha.is_gecko){
+this.activateEditor();
+}
+this.focusEditor();
+};

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/full-screen.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/de.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/de.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/de.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/de.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,6 @@
+// I18N constants
+// LANG: "de", ENCODING: UTF-8
+// translated: Raimund Meyer xinha@ray-of-light.org
+{
+  "Maximize/Minimize Editor": "Editor maximieren/verkleinern"
+};

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/de.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/fr.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/fr.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/fr.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/fr.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,5 @@
+// I18N constants
+// LANG: "fr", ENCODING: UTF-8
+{
+  "Maximize/Minimize Editor": "Agrandir/Réduire l'éditeur"
+};
\ No newline at end of file

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/fr.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/ja.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/ja.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/ja.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/ja.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,5 @@
+// I18N constants
+// LANG: "ja", ENCODING: UTF-8
+{
+  "Maximize/Minimize Editor": "エディタの最大化/最小化"
+};
\ No newline at end of file

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/ja.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/nb.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/nb.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/nb.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/nb.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,6 @@
+// I18N constants
+// LANG: "nb", ENCODING: UTF-8
+// translated: Kim Steinhaug, http://www.steinhaug.com/, kim@steinhaug.com
+{
+  "Maximize/Minimize Editor": "Maksimer/Minimer WYSIWYG vindu"
+};
\ No newline at end of file

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/nb.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/pl.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/pl.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/pl.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/pl.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,6 @@
+// I18N constants
+// LANG: "pl", ENCODING: UTF-8
+// translated: Krzysztof Kotowicz, koto1sa@o2.pl, http://www.eskot.krakow.pl/portfolio
+{
+  "Maximize/Minimize Editor": "Maksymalizuj/minimalizuj edytor"
+};

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/pl.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/ru.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/ru.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/ru.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/ru.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,6 @@
+// I18N constants
+// LANG: "ru", ENCODING: UTF-8
+// Author: Andrei Blagorazumov, a@fnr.ru
+{
+  "Maximize/Minimize Editor": "Развернуть/Свернуть редактор"
+};
\ No newline at end of file

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/ru.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/sv.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/sv.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/sv.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/sv.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,6 @@
+// I18N constants
+// LANG: "sv" (Swedish), ENCODING: UTF-8
+// translated: Erik Dalén, <dalen@jpl.se>
+{
+  "Maximize/Minimize Editor": "Maximera/Minimera WYSIWYG fönster"
+};

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/FullScreen/lang/sv.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/Gecko/Gecko.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/Gecko/Gecko.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/Gecko/Gecko.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/Gecko/Gecko.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,412 @@
+Gecko._pluginInfo={name:"Gecko",origin:"Xinha Core",version:"$LastChangedRevision: 808 $".replace(/^[^:]*: (.*) \$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.python-hosting.com/trunk/modules/Gecko/Gecko.js $".replace(/^[^:]*: (.*) \$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"};
+function Gecko(_1){
+this.editor=_1;
+_1.Gecko=this;
+}
+Gecko.prototype.onKeyPress=function(ev){
+var _3=this.editor;
+var s=_3.getSelection();
+if(_3.isShortCut(ev)){
+switch(_3.getKey(ev).toLowerCase()){
+case "z":
+if(_3._unLink&&_3._unlinkOnUndo){
+Xinha._stopEvent(ev);
+_3._unLink();
+_3.updateToolbar();
+return true;
+}
+break;
+case "a":
+sel=_3.getSelection();
+sel.removeAllRanges();
+range=_3.createRange();
+range.selectNodeContents(_3._doc.body);
+sel.addRange(range);
+Xinha._stopEvent(ev);
+return true;
+break;
+case "v":
+if(!_3.config.htmlareaPaste){
+return true;
+}
+break;
+}
+}
+switch(_3.getKey(ev)){
+case " ":
+var _5=function(_6,_7){
+var _8=_6.nextSibling;
+if(typeof _7=="string"){
+_7=_3._doc.createElement(_7);
+}
+var a=_6.parentNode.insertBefore(_7,_8);
+Xinha.removeFromParent(_6);
+a.appendChild(_6);
+_8.data=" "+_8.data;
+s.collapse(_8,1);
+_3._unLink=function(){
+var t=a.firstChild;
+a.removeChild(t);
+a.parentNode.insertBefore(t,a);
+Xinha.removeFromParent(a);
+_3._unLink=null;
+_3._unlinkOnUndo=false;
+};
+_3._unlinkOnUndo=true;
+return a;
+};
+if(_3.config.convertUrlsToLinks&&s&&s.isCollapsed&&s.anchorNode.nodeType==3&&s.anchorNode.data.length>3&&s.anchorNode.data.indexOf(".")>=0){
+var _b=s.anchorNode.data.substring(0,s.anchorOffset).search(/\S{4,}$/);
+if(_b==-1){
+break;
+}
+if(_3._getFirstAncestor(s,"a")){
+break;
+}
+var _c=s.anchorNode.data.substring(0,s.anchorOffset).replace(/^.*?(\S*)$/,"$1");
+var _d=_c.match(Xinha.RE_email);
+if(_d){
+var _e=s.anchorNode;
+var _f=_e.splitText(s.anchorOffset);
+var _10=_e.splitText(_b);
+_5(_10,"a").href="mailto:"+_d[0];
+break;
+}
+RE_date=/([0-9]+\.)+/;
+RE_ip=/(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)/;
+var _11=_c.match(Xinha.RE_url);
+if(_11){
+if(RE_date.test(_c)){
+if(!RE_ip.test(_c)){
+break;
+}
+}
+var _12=s.anchorNode;
+var _13=_12.splitText(s.anchorOffset);
+var _14=_12.splitText(_b);
+_5(_14,"a").href=(_11[1]?_11[1]:"http://")+_11[2];
+break;
+}
+}
+break;
+}
+switch(ev.keyCode){
+case 27:
+if(_3._unLink){
+_3._unLink();
+Xinha._stopEvent(ev);
+}
+break;
+break;
+case 8:
+case 46:
+if(!ev.shiftKey&&this.handleBackspace()){
+Xinha._stopEvent(ev);
+}
+default:
+_3._unlinkOnUndo=false;
+if(s.anchorNode&&s.anchorNode.nodeType==3){
+var a=_3._getFirstAncestor(s,"a");
+if(!a){
+break;
+}
+if(!a._updateAnchTimeout){
+if(s.anchorNode.data.match(Xinha.RE_email)&&a.href.match("mailto:"+s.anchorNode.data.trim())){
+var _16=s.anchorNode;
+var _17=function(){
+a.href="mailto:"+_16.data.trim();
+a._updateAnchTimeout=setTimeout(_17,250);
+};
+a._updateAnchTimeout=setTimeout(_17,1000);
+break;
+}
+var m=s.anchorNode.data.match(Xinha.RE_url);
+if(m&&a.href.match(s.anchorNode.data.trim())){
+var _19=s.anchorNode;
+var _1a=function(){
+m=_19.data.match(Xinha.RE_url);
+if(m){
+a.href=(m[1]?m[1]:"http://")+m[2];
+}
+a._updateAnchTimeout=setTimeout(_1a,250);
+};
+a._updateAnchTimeout=setTimeout(_1a,1000);
+}
+}
+}
+break;
+}
+return false;
+};
+Gecko.prototype.handleBackspace=function(){
+var _1b=this.editor;
+setTimeout(function(){
+var sel=_1b.getSelection();
+var _1d=_1b.createRange(sel);
+var SC=_1d.startContainer;
+var SO=_1d.startOffset;
+var EC=_1d.endContainer;
+var EO=_1d.endOffset;
+var _22=SC.nextSibling;
+if(SC.nodeType==3){
+SC=SC.parentNode;
+}
+if(!(/\S/.test(SC.tagName))){
+var p=document.createElement("p");
+while(SC.firstChild){
+p.appendChild(SC.firstChild);
+}
+SC.parentNode.insertBefore(p,SC);
+Xinha.removeFromParent(SC);
+var r=_1d.cloneRange();
+r.setStartBefore(_22);
+r.setEndAfter(_22);
+r.extractContents();
+sel.removeAllRanges();
+sel.addRange(r);
+}
+},10);
+};
+Gecko.prototype.inwardHtml=function(_25){
+_25=_25.replace(/<(\/?)strong(\s|>|\/)/ig,"<$1b$2");
+_25=_25.replace(/<(\/?)em(\s|>|\/)/ig,"<$1i$2");
+_25=_25.replace(/<(\/?)del(\s|>|\/)/ig,"<$1strike$2");
+return _25;
+};
+Gecko.prototype.outwardHtml=function(_26){
+_26=_26.replace(/<script[\s]*src[\s]*=[\s]*['"]chrome:\/\/.*?["']>[\s]*<\/script>/ig,"");
+return _26;
+};
+Gecko.prototype.onExecCommand=function(_27,UI,_29){
+try{
+this.editor._doc.execCommand("useCSS",false,true);
+this.editor._doc.execCommand("styleWithCSS",false,false);
+}
+catch(ex){
+}
+switch(_27){
+case "paste":
+alert(Xinha._lc("The Paste button does not work in Mozilla based web browsers (technical security reasons). Press CTRL-V on your keyboard to paste directly."));
+return true;
+}
+return false;
+};
+Gecko.prototype.onMouseDown=function(ev){
+if(ev.target.tagName.toLowerCase()=="hr"){
+var sel=this.editor.getSelection();
+var _2c=this.editor.createRange(sel);
+_2c.selectNode(ev.target);
+}
+};
+Xinha.prototype.insertNodeAtSelection=function(_2d){
+var sel=this.getSelection();
+var _2f=this.createRange(sel);
+sel.removeAllRanges();
+_2f.deleteContents();
+var _30=_2f.startContainer;
+var pos=_2f.startOffset;
+var _32=_2d;
+switch(_30.nodeType){
+case 3:
+if(_2d.nodeType==3){
+_30.insertData(pos,_2d.data);
+_2f=this.createRange();
+_2f.setEnd(_30,pos+_2d.length);
+_2f.setStart(_30,pos+_2d.length);
+sel.addRange(_2f);
+}else{
+_30=_30.splitText(pos);
+if(_2d.nodeType==11){
+_32=_32.firstChild;
+}
+_30.parentNode.insertBefore(_2d,_30);
+this.selectNodeContents(_32);
+this.updateToolbar();
+}
+break;
+case 1:
+if(_2d.nodeType==11){
+_32=_32.firstChild;
+}
+_30.insertBefore(_2d,_30.childNodes[pos]);
+this.selectNodeContents(_32);
+this.updateToolbar();
+break;
+}
+};
+Xinha.prototype.getParentElement=function(sel){
+if(typeof sel=="undefined"){
+sel=this.getSelection();
+}
+var _34=this.createRange(sel);
+try{
+var p=_34.commonAncestorContainer;
+if(!_34.collapsed&&_34.startContainer==_34.endContainer&&_34.startOffset-_34.endOffset<=1&&_34.startContainer.hasChildNodes()){
+p=_34.startContainer.childNodes[_34.startOffset];
+}
+while(p.nodeType==3){
+p=p.parentNode;
+}
+return p;
+}
+catch(ex){
+return null;
+}
+};
+Xinha.prototype.activeElement=function(sel){
+if((sel===null)||this.selectionEmpty(sel)){
+return null;
+}
+if(!sel.isCollapsed){
+if(sel.anchorNode.childNodes.length>sel.anchorOffset&&sel.anchorNode.childNodes[sel.anchorOffset].nodeType==1){
+return sel.anchorNode.childNodes[sel.anchorOffset];
+}else{
+if(sel.anchorNode.nodeType==1){
+return sel.anchorNode;
+}else{
+return null;
+}
+}
+}
+return null;
+};
+Xinha.prototype.selectionEmpty=function(sel){
+if(!sel){
+return true;
+}
+if(typeof sel.isCollapsed!="undefined"){
+return sel.isCollapsed;
+}
+return true;
+};
+Xinha.prototype.saveSelection=function(){
+return this.createRange(this.getSelection()).cloneRange();
+};
+Xinha.prototype.restoreSelection=function(_38){
+var sel=this.getSelection();
+sel.removeAllRanges();
+sel.addRange(_38);
+};
+Xinha.prototype.selectNodeContents=function(_3a,pos){
+this.focusEditor();
+this.forceRedraw();
+var _3c;
+var _3d=typeof pos=="undefined"?true:false;
+var sel=this.getSelection();
+_3c=this._doc.createRange();
+if(_3d&&_3a.tagName&&_3a.tagName.toLowerCase().match(/table|img|input|textarea|select/)){
+_3c.selectNode(_3a);
+}else{
+_3c.selectNodeContents(_3a);
+}
+sel.removeAllRanges();
+sel.addRange(_3c);
+};
+Xinha.prototype.insertHTML=function(_3f){
+var sel=this.getSelection();
+var _41=this.createRange(sel);
+this.focusEditor();
+var _42=this._doc.createDocumentFragment();
+var div=this._doc.createElement("div");
+div.innerHTML=_3f;
+while(div.firstChild){
+_42.appendChild(div.firstChild);
+}
+var _44=this.insertNodeAtSelection(_42);
+};
+Xinha.prototype.getSelectedHTML=function(){
+var sel=this.getSelection();
+var _46=this.createRange(sel);
+return Xinha.getHTML(_46.cloneContents(),false,this);
+};
+Xinha.prototype.getSelection=function(){
+return this._iframe.contentWindow.getSelection();
+};
+Xinha.prototype.createRange=function(sel){
+this.activateEditor();
+if(typeof sel!="undefined"){
+try{
+return sel.getRangeAt(0);
+}
+catch(ex){
+return this._doc.createRange();
+}
+}else{
+return this._doc.createRange();
+}
+};
+Xinha.prototype.isKeyEvent=function(_48){
+return _48.type=="keypress";
+};
+Xinha.prototype.getKey=function(_49){
+return String.fromCharCode(_49.charCode);
+};
+Xinha.getOuterHTML=function(_4a){
+return (new XMLSerializer()).serializeToString(_4a);
+};
+Xinha.prototype.cc=String.fromCharCode(173);
+Xinha.prototype.setCC=function(_4b){
+try{
+if(_4b=="textarea"){
+var ta=this._textArea;
+var _4d=ta.selectionStart;
+var _4e=ta.value.substring(0,_4d);
+var _4f=ta.value.substring(_4d,ta.value.length);
+if(_4f.match(/^[^<]*>/)){
+var _50=_4f.indexOf(">")+1;
+ta.value=_4e+_4f.substring(0,_50)+this.cc+_4f.substring(_50,_4f.length);
+}else{
+ta.value=_4e+this.cc+_4f;
+}
+}else{
+var sel=this.getSelection();
+sel.getRangeAt(0).insertNode(document.createTextNode(this.cc));
+}
+}
+catch(e){
+}
+};
+Xinha.prototype.findCC=function(_52){
+try{
+var _53=(_52=="textarea")?window:this._iframe.contentWindow;
+if(_53.find(this.cc)){
+if(_52=="textarea"){
+var ta=this._textArea;
+var _55=pos=ta.selectionStart;
+var end=ta.selectionEnd;
+var _57=ta.scrollTop;
+ta.value=ta.value.substring(0,_55)+ta.value.substring(end,ta.value.length);
+ta.selectionStart=pos;
+ta.selectionEnd=pos;
+ta.scrollTop=_57;
+ta.focus();
+}else{
+var sel=this.getSelection();
+sel.getRangeAt(0).deleteContents();
+this._iframe.contentWindow.focus();
+}
+}
+}
+catch(e){
+}
+};
+Xinha.prototype._standardToggleBorders=Xinha.prototype._toggleBorders;
+Xinha.prototype._toggleBorders=function(){
+var _59=this._standardToggleBorders();
+var _5a=this._doc.getElementsByTagName("TABLE");
+for(var i=0;i<_5a.length;i++){
+_5a[i].style.display="none";
+_5a[i].style.display="table";
+}
+return _59;
+};
+Xinha.getDoctype=function(doc){
+var d="";
+if(doc.doctype){
+d+="<!DOCTYPE "+doc.doctype.name+" PUBLIC ";
+d+=doc.doctype.publicId?"\""+doc.doctype.publicId+"\"":"";
+d+=doc.doctype.systemId?" \""+doc.doctype.systemId+"\"":"";
+d+=">";
+}
+return d;
+};

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/Gecko/Gecko.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/Gecko/paraHandlerBest.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/Gecko/paraHandlerBest.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/Gecko/paraHandlerBest.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/Gecko/paraHandlerBest.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,292 @@
+EnterParagraphs._pluginInfo={name:"EnterParagraphs",version:"1.0",developer:"Adam Wright",developer_url:"http://www.hipikat.org/",sponsor:"The University of Western Australia",sponsor_url:"http://www.uwa.edu.au/",license:"htmlArea"};
+EnterParagraphs.prototype._whiteSpace=/^\s*$/;
+EnterParagraphs.prototype._pExclusions=/^(address|blockquote|body|dd|div|dl|dt|fieldset|form|h1|h2|h3|h4|h5|h6|hr|li|noscript|ol|p|pre|table|ul)$/i;
+EnterParagraphs.prototype._pContainers=/^(body|del|div|fieldset|form|ins|map|noscript|object|td|th)$/i;
+EnterParagraphs.prototype._pBreak=/^(address|pre|blockquote)$/i;
+EnterParagraphs.prototype._permEmpty=/^(area|base|basefont|br|col|frame|hr|img|input|isindex|link|meta|param)$/i;
+EnterParagraphs.prototype._elemSolid=/^(applet|br|button|hr|img|input|table)$/i;
+EnterParagraphs.prototype._pifySibling=/^(address|blockquote|del|div|dl|fieldset|form|h1|h2|h3|h4|h5|h6|hr|ins|map|noscript|object|ol|p|pre|table|ul|)$/i;
+EnterParagraphs.prototype._pifyForced=/^(ul|ol|dl|table)$/i;
+EnterParagraphs.prototype._pifyParent=/^(dd|dt|li|td|th|tr)$/i;
+function EnterParagraphs(_1){
+this.editor=_1;
+if(Xinha.is_gecko){
+this.onKeyPress=this.__onKeyPress;
+}
+}
+EnterParagraphs.prototype.name="EnterParagraphs";
+EnterParagraphs.prototype.insertAdjacentElement=function(_2,_3,el){
+if(_3=="BeforeBegin"){
+_2.parentNode.insertBefore(el,_2);
+}else{
+if(_3=="AfterEnd"){
+_2.nextSibling?_2.parentNode.insertBefore(el,_2.nextSibling):_2.parentNode.appendChild(el);
+}else{
+if(_3=="AfterBegin"&&_2.firstChild){
+_2.insertBefore(el,_2.firstChild);
+}else{
+if(_3=="BeforeEnd"||_3=="AfterBegin"){
+_2.appendChild(el);
+}
+}
+}
+}
+};
+EnterParagraphs.prototype.forEachNodeUnder=function(_5,_6,_7,_8){
+var _9,end;
+if(_5.nodeType==11&&_5.firstChild){
+_9=_5.firstChild;
+end=_5.lastChild;
+}else{
+_9=end=_5;
+}
+while(end.lastChild){
+end=end.lastChild;
+}
+return this.forEachNode(_9,end,_6,_7,_8);
+};
+EnterParagraphs.prototype.forEachNode=function(_a,_b,_c,_d,_e){
+var _f=function(_10,_11){
+return (_11=="ltr"?_10.nextSibling:_10.previousSibling);
+};
+var _12=function(_13,_14){
+return (_14=="ltr"?_13.firstChild:_13.lastChild);
+};
+var _15,lookup,fnReturnVal;
+var _16=_e;
+var _17=false;
+while(_15!=_d=="ltr"?_b:_a){
+if(!_15){
+_15=_d=="ltr"?_a:_b;
+}else{
+if(_12(_15,_d)){
+_15=_12(_15,_d);
+}else{
+if(_f(_15,_d)){
+_15=_f(_15,_d);
+}else{
+lookup=_15;
+while(!_f(lookup,_d)&&lookup!=(_d=="ltr"?_b:_a)){
+lookup=lookup.parentNode;
+}
+_15=(_f(lookup,_d)?_f(lookup,_d):lookup);
+}
+}
+}
+_17=(_15==(_d=="ltr"?_b:_a));
+switch(_c){
+case "cullids":
+fnReturnVal=this._fenCullIds(_15,_16);
+break;
+case "find_fill":
+fnReturnVal=this._fenEmptySet(_15,_16,_c,_17);
+break;
+case "find_cursorpoint":
+fnReturnVal=this._fenEmptySet(_15,_16,_c,_17);
+break;
+}
+if(fnReturnVal[0]){
+return fnReturnVal[1];
+}
+if(_17){
+break;
+}
+if(fnReturnVal[1]){
+_16=fnReturnVal[1];
+}
+}
+return false;
+};
+EnterParagraphs.prototype._fenEmptySet=function(_18,_19,_1a,_1b){
+if(!_19&&!_18.firstChild){
+_19=_18;
+}
+if((_18.nodeType==1&&this._elemSolid.test(_18.nodeName))||(_18.nodeType==3&&!this._whiteSpace.test(_18.nodeValue))||(_18.nodeType!=1&&_18.nodeType!=3)){
+switch(_1a){
+case "find_fill":
+return new Array(true,false);
+break;
+case "find_cursorpoint":
+return new Array(true,_18);
+break;
+}
+}
+if(_1b){
+return new Array(true,_19);
+}
+return new Array(false,_19);
+};
+EnterParagraphs.prototype._fenCullIds=function(_1c,_1d,_1e){
+if(_1d.id){
+_1e[_1d.id]?_1d.id="":_1e[_1d.id]=true;
+}
+return new Array(false,_1e);
+};
+EnterParagraphs.prototype.processSide=function(rng,_20){
+var _21=function(_22,_23){
+return (_23=="left"?_22.previousSibling:_22.nextSibling);
+};
+var _24=_20=="left"?rng.startContainer:rng.endContainer;
+var _25=_20=="left"?rng.startOffset:rng.endOffset;
+var _26,start=_24;
+while(start.nodeType==1&&!this._permEmpty.test(start.nodeName)){
+start=(_25?start.lastChild:start.firstChild);
+}
+while(_26=_26?(_21(_26,_20)?_21(_26,_20):_26.parentNode):start){
+if(_21(_26,_20)){
+if(this._pExclusions.test(_21(_26,_20).nodeName)){
+return this.processRng(rng,_20,_26,_21(_26,_20),(_20=="left"?"AfterEnd":"BeforeBegin"),true,false);
+}
+}else{
+if(this._pContainers.test(_26.parentNode.nodeName)){
+return this.processRng(rng,_20,_26,_26.parentNode,(_20=="left"?"AfterBegin":"BeforeEnd"),true,false);
+}else{
+if(this._pExclusions.test(_26.parentNode.nodeName)){
+if(this._pBreak.test(_26.parentNode.nodeName)){
+return this.processRng(rng,_20,_26,_26.parentNode,(_20=="left"?"AfterBegin":"BeforeEnd"),false,(_20=="left"?true:false));
+}else{
+return this.processRng(rng,_20,(_26=_26.parentNode),(_21(_26,_20)?_21(_26,_20):_26.parentNode),(_21(_26,_20)?(_20=="left"?"AfterEnd":"BeforeBegin"):(_20=="left"?"AfterBegin":"BeforeEnd")),false,false);
+}
+}
+}
+}
+}
+};
+EnterParagraphs.prototype.processRng=function(rng,_28,_29,_2a,_2b,_2c,_2d){
+var _2e=_28=="left"?rng.startContainer:rng.endContainer;
+var _2f=_28=="left"?rng.startOffset:rng.endOffset;
+var _30=this.editor;
+var _31=_30._doc.createRange();
+_31.selectNode(_29);
+if(_28=="left"){
+_31.setEnd(_2e,_2f);
+rng.setStart(_31.startContainer,_31.startOffset);
+}else{
+if(_28=="right"){
+_31.setStart(_2e,_2f);
+rng.setEnd(_31.endContainer,_31.endOffset);
+}
+}
+var cnt=_31.cloneContents();
+this.forEachNodeUnder(cnt,"cullids","ltr",this.takenIds,false,false);
+var _33,pifyOffset,fill;
+_33=_28=="left"?(_31.endContainer.nodeType==3?true:false):(_31.startContainer.nodeType==3?false:true);
+pifyOffset=_33?_31.startOffset:_31.endOffset;
+_33=_33?_31.startContainer:_31.endContainer;
+if(this._pifyParent.test(_33.nodeName)&&_33.parentNode.childNodes.item(0)==_33){
+while(!this._pifySibling.test(_33.nodeName)){
+_33=_33.parentNode;
+}
+}
+if(cnt.nodeType==11&&!cnt.firstChild){
+if(_33.nodeName!="BODY"||(_33.nodeName=="BODY"&&pifyOffset!=0)){
+cnt.appendChild(_30._doc.createElement(_33.nodeName));
+}
+}
+fill=this.forEachNodeUnder(cnt,"find_fill","ltr",false);
+if(fill&&this._pifySibling.test(_33.nodeName)&&((pifyOffset==0)||(pifyOffset==1&&this._pifyForced.test(_33.nodeName)))){
+_29=_30._doc.createElement("p");
+_29.innerHTML="&nbsp;";
+if((_28=="left")&&_33.previousSibling){
+return new Array(_33.previousSibling,"AfterEnd",_29);
+}else{
+if((_28=="right")&&_33.nextSibling){
+return new Array(_33.nextSibling,"BeforeBegin",_29);
+}else{
+return new Array(_33.parentNode,(_28=="left"?"AfterBegin":"BeforeEnd"),_29);
+}
+}
+}
+if(fill){
+if(fill.nodeType==3){
+fill=_30._doc.createDocumentFragment();
+}
+if((fill.nodeType==1&&!this._elemSolid.test())||fill.nodeType==11){
+var _34=_30._doc.createElement("p");
+_34.innerHTML="&nbsp;";
+fill.appendChild(_34);
+}else{
+var _34=_30._doc.createElement("p");
+_34.innerHTML="&nbsp;";
+fill.parentNode.insertBefore(parentNode,fill);
+}
+}
+if(fill){
+_29=fill;
+}else{
+_29=(_2c||(cnt.nodeType==11&&!cnt.firstChild))?_30._doc.createElement("p"):_30._doc.createDocumentFragment();
+_29.appendChild(cnt);
+}
+if(_2d){
+_29.appendChild(_30._doc.createElement("br"));
+}
+return new Array(_2a,_2b,_29);
+};
+EnterParagraphs.prototype.isNormalListItem=function(rng){
+var _36,listNode;
+_36=rng.startContainer;
+if((typeof _36.nodeName!="undefined")&&(_36.nodeName.toLowerCase()=="li")){
+listNode=_36;
+}else{
+if((typeof _36.parentNode!="undefined")&&(typeof _36.parentNode.nodeName!="undefined")&&(_36.parentNode.nodeName.toLowerCase()=="li")){
+listNode=_36.parentNode;
+}else{
+return false;
+}
+}
+if(!listNode.previousSibling){
+if(rng.startOffset==0){
+return false;
+}
+}
+return true;
+};
+EnterParagraphs.prototype.__onKeyPress=function(ev){
+if(ev.keyCode==13&&!ev.shiftKey&&this.editor._iframe.contentWindow.getSelection){
+return this.handleEnter(ev);
+}
+};
+EnterParagraphs.prototype.handleEnter=function(ev){
+var _39;
+var sel=this.editor.getSelection();
+var rng=this.editor.createRange(sel);
+if(this.isNormalListItem(rng)){
+return true;
+}
+this.takenIds=new Object();
+var _3c=this.processSide(rng,"left");
+var _3d=this.processSide(rng,"right");
+_39=_3d[2];
+sel.removeAllRanges();
+rng.deleteContents();
+var _3e=this.forEachNodeUnder(_39,"find_cursorpoint","ltr",false,true);
+if(!_3e){
+alert("INTERNAL ERROR - could not find place to put cursor after ENTER");
+}
+if(_3c){
+this.insertAdjacentElement(_3c[0],_3c[1],_3c[2]);
+}
+if(_3d&&_3d.nodeType!=1){
+this.insertAdjacentElement(_3d[0],_3d[1],_3d[2]);
+}
+if((_3e)&&(this._permEmpty.test(_3e.nodeName))){
+var _3f=0;
+while(_3e.parentNode.childNodes.item(_3f)!=_3e){
+_3f++;
+}
+sel.collapse(_3e.parentNode,_3f);
+}else{
+try{
+sel.collapse(_3e,0);
+if(_3e.nodeType==3){
+_3e=_3e.parentNode;
+}
+this.editor.scrollToElement(_3e);
+}
+catch(e){
+}
+}
+this.editor.updateToolbar();
+Xinha._stopEvent(ev);
+return true;
+};

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/Gecko/paraHandlerBest.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/Gecko/paraHandlerDirty.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/Gecko/paraHandlerDirty.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/Gecko/paraHandlerDirty.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/Gecko/paraHandlerDirty.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,115 @@
+EnterParagraphs._pluginInfo={name:"EnterParagraphs",origin:"Xinha Core",version:"$LastChangedRevision: 688 $".replace(/^[^:]*: (.*) \$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.python-hosting.com/trunk/modules/Gecko/paraHandlerDirty.js $".replace(/^[^:]*: (.*) \$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"};
+function EnterParagraphs(_1){
+this.editor=_1;
+}
+EnterParagraphs.prototype.onKeyPress=function(ev){
+if(ev.keyCode==13&&!ev.shiftKey){
+this.dom_checkInsertP();
+Xinha._stopEvent(ev);
+}
+};
+EnterParagraphs.prototype.dom_checkInsertP=function(){
+var _3=this.editor;
+var p,body;
+var _5=_3.getSelection();
+var _6=_3.createRange(_5);
+if(!_6.collapsed){
+_6.deleteContents();
+}
+_3.deactivateEditor();
+var SC=_6.startContainer;
+var SO=_6.startOffset;
+var EC=_6.endContainer;
+var EO=_6.endOffset;
+if(SC==EC&&SC==body&&!SO&&!EO){
+p=_3._doc.createTextNode(" ");
+body.insertBefore(p,body.firstChild);
+_6.selectNodeContents(p);
+SC=_6.startContainer;
+SO=_6.startOffset;
+EC=_6.endContainer;
+EO=_6.endOffset;
+}
+p=_3.getAllAncestors();
+var _b=null;
+body=_3._doc.body;
+for(var i=0;i<p.length;++i){
+if(Xinha.isParaContainer(p[i])){
+break;
+}else{
+if(Xinha.isBlockElement(p[i])&&!(/body|html/i.test(p[i].tagName))){
+_b=p[i];
+break;
+}
+}
+}
+if(!_b){
+var _d=_6.startContainer;
+while(_d.parentNode&&!Xinha.isParaContainer(_d.parentNode)){
+_d=_d.parentNode;
+}
+var _e=_d;
+var _f=_d;
+while(_e.previousSibling){
+if(_e.previousSibling.tagName){
+if(!Xinha.isBlockElement(_e.previousSibling)){
+_e=_e.previousSibling;
+}else{
+break;
+}
+}else{
+_e=_e.previousSibling;
+}
+}
+while(_f.nextSibling){
+if(_f.nextSibling.tagName){
+if(!Xinha.isBlockElement(_f.nextSibling)){
+_f=_f.nextSibling;
+}else{
+break;
+}
+}else{
+_f=_f.nextSibling;
+}
+}
+_6.setStartBefore(_e);
+_6.setEndAfter(_f);
+_6.surroundContents(_3._doc.createElement("p"));
+_b=_6.startContainer.firstChild;
+_6.setStart(SC,SO);
+}
+_6.setEndAfter(_b);
+var r2=_6.cloneRange();
+_5.removeRange(_6);
+var df=r2.extractContents();
+if(df.childNodes.length===0){
+df.appendChild(_3._doc.createElement("p"));
+df.firstChild.appendChild(_3._doc.createElement("br"));
+}
+if(df.childNodes.length>1){
+var nb=_3._doc.createElement("p");
+while(df.firstChild){
+var s=df.firstChild;
+df.removeChild(s);
+nb.appendChild(s);
+}
+df.appendChild(nb);
+}
+if(!(/\S/.test(_b.innerHTML))){
+_b.innerHTML="&nbsp;";
+}
+p=df.firstChild;
+if(!(/\S/.test(p.innerHTML))){
+p.innerHTML="<br />";
+}
+if((/^\s*<br\s*\/?>\s*$/.test(p.innerHTML))&&(/^h[1-6]$/i.test(p.tagName))){
+df.appendChild(_3.convertNode(p,"p"));
+df.removeChild(p);
+}
+var _14=_b.parentNode.insertBefore(df.firstChild,_b.nextSibling);
+_3.activateEditor();
+_5=_3.getSelection();
+_5.removeAllRanges();
+_5.collapse(_14,0);
+_3.scrollToElement(_14);
+};

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/Gecko/paraHandlerDirty.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/GetHtml/DOMwalk.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/GetHtml/DOMwalk.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/GetHtml/DOMwalk.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/GetHtml/DOMwalk.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,182 @@
+function GetHtmlImplementation(_1){
+this.editor=_1;
+}
+GetHtmlImplementation._pluginInfo={name:"GetHtmlImplementation DOMwalk",origin:"Xinha Core",version:"$LastChangedRevision: 821 $".replace(/^[^:]*: (.*) \$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.python-hosting.com/trunk/modules/GetHtml/DOMwalk.js $".replace(/^[^:]*: (.*) \$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"};
+Xinha.getHTML=function(_2,_3,_4){
+try{
+return Xinha.getHTMLWrapper(_2,_3,_4);
+}
+catch(ex){
+alert(Xinha._lc("Your Document is not well formed. Check JavaScript console for details."));
+return _4._iframe.contentWindow.document.body.innerHTML;
+}
+};
+Xinha.emptyAttributes=" checked disabled ismap readonly nowrap compact declare selected defer multiple noresize noshade ";
+Xinha.elGetsNewLine=function(el){
+return (" br meta link title ".indexOf(" "+el.tagName.toLowerCase()+" ")!=-1);
+};
+Xinha.getHTMLWrapper=function(_6,_7,_8,_9){
+var _a="";
+if(!_9){
+_9="";
+}
+switch(_6.nodeType){
+case 10:
+case 6:
+case 12:
+break;
+case 2:
+break;
+case 4:
+_a+=(Xinha.is_ie?("\n"+_9):"")+"<![CDATA["+_6.data+"]]>";
+break;
+case 5:
+_a+="&"+_6.nodeValue+";";
+break;
+case 7:
+_a+=(Xinha.is_ie?("\n"+_9):"")+"<"+"?"+_6.target+" "+_6.data+" ?>";
+break;
+case 1:
+case 11:
+case 9:
+var _b;
+var i;
+var _d=(_6.nodeType==1)?_6.tagName.toLowerCase():"";
+if((_d=="script"||_d=="noscript")&&_8.config.stripScripts){
+break;
+}
+if(_7){
+_7=!(_8.config.htmlRemoveTags&&_8.config.htmlRemoveTags.test(_d));
+}
+if(Xinha.is_ie&&_d=="head"){
+if(_7){
+_a+=(Xinha.is_ie?("\n"+_9):"")+"<head>";
+}
+var _e=RegExp.multiline;
+RegExp.multiline=true;
+var _f=_6.innerHTML.replace(Xinha.RE_tagName,function(str,p1,p2){
+return p1+p2.toLowerCase();
+}).replace(/\s*=\s*(([^'"][^>\s]*)([>\s])|"([^"]+)"|'([^']+)')/g,"=\"$2$4$5\"$3").replace(/<(link|meta)((\s*\S*="[^"]*")*)>/g,"<$1$2 />");
+RegExp.multiline=_e;
+_a+=_f+"\n";
+if(_7){
+_a+=(Xinha.is_ie?("\n"+_9):"")+"</head>";
+}
+break;
+}else{
+if(_7){
+_b=(!(_6.hasChildNodes()||Xinha.needsClosingTag(_6)));
+_a+=((Xinha.isBlockElement(_6)||Xinha.elGetsNewLine(_6))?("\n"+_9):"")+"<"+_6.tagName.toLowerCase();
+var _13=_6.attributes;
+for(i=0;i<_13.length;++i){
+var a=_13.item(i);
+if(typeof a.nodeValue=="object"){
+continue;
+}
+if(_6.tagName.toLowerCase()=="input"&&_6.type.toLowerCase()=="checkbox"&&a.nodeName.toLowerCase()=="value"&&a.nodeValue.toLowerCase()=="on"){
+continue;
+}
+if(!a.specified&&!(_6.tagName.toLowerCase().match(/input|option/)&&a.nodeName=="value")&&!(_6.tagName.toLowerCase().match(/area/)&&a.nodeName.match(/shape|coords/i))){
+continue;
+}
+var _15=a.nodeName.toLowerCase();
+if(/_moz_editor_bogus_node/.test(_15)){
+_a="";
+break;
+}
+if(/(_moz)|(contenteditable)|(_msh)/.test(_15)){
+continue;
+}
+var _16;
+if(Xinha.emptyAttributes.indexOf(" "+_15+" ")!=-1){
+_16=_15;
+}else{
+if(_15!="style"){
+if(typeof _6[a.nodeName]!="undefined"&&_15!="href"&&_15!="src"&&!(/^on/.test(_15))){
+_16=_6[a.nodeName];
+}else{
+_16=a.nodeValue;
+if(Xinha.is_ie&&(_15=="href"||_15=="src")){
+_16=_8.stripBaseURL(_16);
+}
+if(_8.config.only7BitPrintablesInURLs&&(_15=="href"||_15=="src")){
+_16=_16.replace(/([^!-~]+)/g,function(_17){
+return escape(_17);
+});
+}
+}
+}else{
+if(!Xinha.is_ie){
+_16=_6.style.cssText.replace(/rgb\(.*?\)/ig,function(rgb){
+return Xinha._colorToRgb(rgb);
+});
+}
+}
+}
+if(/^(_moz)?$/.test(_16)){
+continue;
+}
+_a+=" "+_15+"=\""+Xinha.htmlEncode(_16)+"\"";
+}
+if(Xinha.is_ie&&_6.style.cssText){
+_a+=" style=\""+_6.style.cssText.toLowerCase()+"\"";
+}
+if(Xinha.is_ie&&_6.tagName.toLowerCase()=="option"&&_6.selected){
+_a+=" selected=\"selected\"";
+}
+if(_a!==""){
+if(_b&&_d=="p"){
+_a+=">&nbsp;</p>";
+}else{
+if(_b){
+_a+=" />";
+}else{
+_a+=">";
+}
+}
+}
+}
+}
+var _19=false;
+if(_d=="script"||_d=="noscript"){
+if(!_8.config.stripScripts){
+if(Xinha.is_ie){
+var _1a="\n"+_6.innerHTML.replace(/^[\n\r]*/,"").replace(/\s+$/,"")+"\n"+_9;
+}else{
+var _1a=(_6.hasChildNodes())?_6.firstChild.nodeValue:"";
+}
+_a+=_1a+"</"+_d+">"+((Xinha.is_ie)?"\n":"");
+}
+}else{
+if(_d=="pre"){
+_a+=((Xinha.is_ie)?"\n":"")+_6.innerHTML.replace(/<br>/g,"\n")+"</"+_d+">";
+}else{
+for(i=_6.firstChild;i;i=i.nextSibling){
+if(!_19&&i.nodeType==1&&Xinha.isBlockElement(i)){
+_19=true;
+}
+_a+=Xinha.getHTMLWrapper(i,true,_8,_9+"  ");
+}
+if(_7&&!_b){
+_a+=(((Xinha.isBlockElement(_6)&&_19)||_d=="head"||_d=="html")?("\n"+_9):"")+"</"+_6.tagName.toLowerCase()+">";
+}
+}
+}
+break;
+case 3:
+if(/^script|noscript|style$/i.test(_6.parentNode.tagName)){
+_a=_6.data;
+}else{
+if(_6.data.trim()==""){
+_a="";
+}else{
+_a=Xinha.htmlEncode(_6.data);
+}
+}
+break;
+case 8:
+_a="<!--"+_6.data+"-->";
+break;
+}
+return _a;
+};

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/GetHtml/DOMwalk.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/GetHtml/TransformInnerHTML.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/GetHtml/TransformInnerHTML.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/GetHtml/TransformInnerHTML.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/GetHtml/TransformInnerHTML.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,142 @@
+function GetHtmlImplementation(_1){
+this.editor=_1;
+}
+GetHtmlImplementation._pluginInfo={name:"GetHtmlImplementation TransformInnerHTML",version:"1.0",developer:"Nelson Bright",developer_url:"http://www.brightworkweb.com/",sponsor:"",sponsor_url:"",license:"htmlArea"};
+HTMLArea.RegExpCache=[new RegExp().compile(/<\s*\/?([^\s\/>]+)[\s*\/>]/gi),new RegExp().compile(/(\s+)_moz[^=>]*=[^\s>]*/gi),new RegExp().compile(/\s*=\s*(([^'"][^>\s]*)([>\s])|"([^"]+)"|'([^']+)')/g),new RegExp().compile(/\/>/g),new RegExp().compile(/<(br|hr|img|input|link|meta|param|embed|area)((\s*\S*="[^"]*")*)>/g),new RegExp().compile(/(checked|compact|declare|defer|disabled|ismap|multiple|no(href|resize|shade|wrap)|readonly|selected)([\s>])/gi),new RegExp().compile(/(="[^']*)'([^'"]*")/),new RegExp().compile(/&(?=[^<]*>)/g),new RegExp().compile(/<\s+/g),new RegExp().compile(/\s+(\/)?>/g),new RegExp().compile(/\s{2,}/g),new RegExp().compile(/\s+([^=\s]+)((="[^"]+")|([\s>]))/g),new RegExp().compile(/\s+contenteditable(=[^>\s\/]*)?/gi),new RegExp().compile(/((href|src)=")([^\s]*)"/g),new RegExp().compile(/<\/?(div|p|h[1-6]|table|tr|td|th|ul|ol|li|blockquote|object|br|hr|img|embed|param|pre|script|html|head|body|meta|link|title|area|input|form|textarea|select|option)[^>]*>
 /g),new RegExp().compile(/<\/(div|p|h[1-6]|table|tr|ul|ol|blockquote|object|html|head|body|script|form|select)( [^>]*)?>/g),new RegExp().compile(/<(div|p|h[1-6]|table|tr|ul|ol|blockquote|object|html|head|body|script|form|select)( [^>]*)?>/g),new RegExp().compile(/<(td|th|li|option|br|hr|embed|param|pre|meta|link|title|area|input|textarea)[^>]*>/g),new RegExp().compile(/(^|<\/(pre|script)>)(\s|[^\s])*?(<(pre|script)[^>]*>|$)/g),new RegExp().compile(/(<pre[^>]*>)([\s\S])*?(<\/pre>)/g),new RegExp().compile(/(^|<!--[\s\S]*?-->)([\s\S]*?)(?=<!--[\s\S]*?-->|$)/g),new RegExp().compile(/\S*=""/g),new RegExp().compile(/<!--[\s\S]*?-->|<\?[\s\S]*?\?>|<\/?\w[^>]*>/g),new RegExp().compile(/(^|<\/script>)[\s\S]*?(<script[^>]*>|$)/g)];
+HTMLArea.prototype.cleanHTML=function(_2){
+var c=HTMLArea.RegExpCache;
+_2=_2.replace(c[0],function(_4){
+return _4.toLowerCase();
+}).replace(c[1]," ").replace(c[12]," ").replace(c[2],"=\"$2$4$5\"$3").replace(c[21]," ").replace(c[11],function(_5,p1,p2){
+return " "+p1.toLowerCase()+p2;
+}).replace(c[3],">").replace(c[9],"$1>").replace(c[5],"$1=\"$1\"$3").replace(c[4],"<$1$2 />").replace(c[6],"$1$2").replace(c[8],"<").replace(c[10]," ");
+if(HTMLArea.is_ie&&c[13].test(_2)){
+_2=_2.replace(c[13],"$1"+this.stripBaseURL(RegExp.$3)+"\"");
+}
+if(this.config.only7BitPrintablesInURLs){
+if(HTMLArea.is_ie){
+c[13].test(_2);
+}
+if(c[13].test(_2)){
+try{
+_2=_2.replace(c[13],"$1"+decodeURIComponent(RegExp.$3).replace(/([^!-~]+)/g,function(_8){
+return escape(_8);
+})+"\"");
+}
+catch(e){
+_2=_2.replace(c[13],"$1"+RegExp.$3.replace(/([^!-~]+)/g,function(_9){
+return escape(_9);
+})+"\"");
+}
+}
+}
+return _2;
+};
+HTMLArea.indent=function(s,_b){
+HTMLArea.__nindent=0;
+HTMLArea.__sindent="";
+HTMLArea.__sindentChar=(typeof _b=="undefined")?"  ":_b;
+var c=HTMLArea.RegExpCache;
+if(HTMLArea.is_gecko){
+s=s.replace(c[19],function(_d){
+return _d.replace(/<br \/>/g,"\n");
+});
+}
+s=s.replace(c[18],function(_e){
+_e=_e.replace(c[20],function(st,$1,$2){
+string=$2.replace(/[\n\r]/gi," ").replace(/\s+/gi," ").replace(c[14],function(str){
+if(str.match(c[16])){
+var s="\n"+HTMLArea.__sindent+str;
+HTMLArea.__sindent+=HTMLArea.__sindentChar;
+++HTMLArea.__nindent;
+return s;
+}else{
+if(str.match(c[15])){
+--HTMLArea.__nindent;
+HTMLArea.__sindent="";
+for(var i=HTMLArea.__nindent;i>0;--i){
+HTMLArea.__sindent+=HTMLArea.__sindentChar;
+}
+return "\n"+HTMLArea.__sindent+str;
+}else{
+if(str.match(c[17])){
+return "\n"+HTMLArea.__sindent+str;
+}
+}
+}
+return str;
+});
+return $1+string;
+});
+return _e;
+});
+s=s.replace(/^\s*/,"").replace(/ +\n/g,"\n").replace(/[\r\n]+<\/script>/g,"\n</script>");
+return s;
+};
+HTMLArea.getHTML=function(_15,_16,_17){
+var _18="";
+var c=HTMLArea.RegExpCache;
+if(_15.nodeType==11){
+var div=document.createElement("div");
+var _1b=_15.insertBefore(div,_15.firstChild);
+for(j=_1b.nextSibling;j;j=j.nextSibling){
+_1b.appendChild(j.cloneNode(true));
+}
+_18+=_1b.innerHTML.replace(c[23],function(_1c){
+_1c=_1c.replace(c[22],function(tag){
+if(/^<[!\?]/.test(tag)){
+return tag;
+}else{
+return _17.cleanHTML(tag);
+}
+});
+return _1c;
+});
+}else{
+var _1e=(_15.nodeType==1)?_15.tagName.toLowerCase():"";
+if(_16){
+_18+="<"+_1e;
+var _1f=_15.attributes;
+for(i=0;i<_1f.length;++i){
+var a=_1f.item(i);
+if(!a.specified){
+continue;
+}
+var _21=a.nodeName.toLowerCase();
+var _22=a.nodeValue;
+_18+=" "+_21+"=\""+_22+"\"";
+}
+_18+=">";
+}
+if(_1e=="html"){
+innerhtml=_17._doc.documentElement.innerHTML;
+}else{
+innerhtml=_15.innerHTML;
+}
+_18+=innerhtml.replace(c[23],function(_23){
+_23=_23.replace(c[22],function(tag){
+if(/^<[!\?]/.test(tag)){
+return tag;
+}else{
+if(!(_17.config.htmlRemoveTags&&_17.config.htmlRemoveTags.test(tag.replace(/<([^\s>\/]+)/,"$1")))){
+return _17.cleanHTML(tag);
+}else{
+return "";
+}
+}
+});
+return _23;
+});
+if(HTMLArea.is_ie){
+_18=_18.replace(/<li( [^>]*)?>/g,"</li><li$1>").replace(/(<(ul|ol)[^>]*>)[\s\n]*<\/li>/g,"$1").replace(/<\/li>([\s\n]*<\/li>)+/g,"</li>");
+}
+if(HTMLArea.is_gecko){
+_18=_18.replace(/<br \/>\n$/,"");
+}
+if(_16){
+_18+="</"+_1e+">";
+}
+_18=HTMLArea.indent(_18);
+}
+return _18;
+};

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/GetHtml/TransformInnerHTML.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InsertImage/insert_image.html
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InsertImage/insert_image.html?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InsertImage/insert_image.html (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InsertImage/insert_image.html Sun Jul 22 07:50:10 2007
@@ -0,0 +1,174 @@
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <title>Insert Image</title>
+
+<script type="text/javascript" src="../../popups/popup.js"></script>
+<link rel="stylesheet" type="text/css" href="../../popups/popup.css" />
+
+<script type="text/javascript">
+
+
+Xinha = window.opener.Xinha;
+function i18n(str) {
+  return (Xinha._lc(str, 'Xinha'));
+}
+
+function Init() {
+  __dlg_translate('Xinha');
+  __dlg_init(null,{width:410,height:400});
+  // Make sure the translated string appears in the drop down. (for gecko)
+  document.getElementById("f_align").selectedIndex = 1;
+  document.getElementById("f_align").selectedIndex = 5;
+  var param = window.dialogArguments;
+  if (param["f_base"]) {
+      document.getElementById("f_base").value = param["f_base"];
+  }
+  document.getElementById("f_url").value    = param["f_url"] ? param["f_url"] : "";
+  document.getElementById("f_alt").value    = param["f_alt"] ? param["f_alt"] : "";
+  document.getElementById("f_border").value = (typeof param["f_border"]!="undefined") ? param["f_border"] : "";
+  document.getElementById("f_align").value  = param["f_align"] ? param["f_align"] : "";
+  document.getElementById("f_vert").value   = (typeof param["f_vert"]!="undefined") ? param["f_vert"] : "";
+  document.getElementById("f_horiz").value  = (typeof param["f_horiz"]!="undefined") ? param["f_horiz"] : "";
+  if (param["f_url"]) {
+      window.ipreview.location.replace(Xinha._resolveRelativeUrl(param.f_base, param.f_url));
+  }
+  document.getElementById("f_url").focus();
+}
+
+function onOK() {
+  var required = {
+    "f_url": i18n("You must enter the URL")
+  };
+  for (var i in required) {
+    var el = document.getElementById(i);
+    if (!el.value) {
+      alert(required[i]);
+      el.focus();
+      return false;
+    }
+  }
+  // pass data back to the calling window
+  var fields = ["f_url", "f_alt", "f_align", "f_border",
+                "f_horiz", "f_vert"];
+  var param = new Object();
+  for (var i in fields) {
+    var id = fields[i];
+    var el = document.getElementById(id);
+    param[id] = el.value;
+  }
+  __dlg_close(param);
+  return false;
+}
+
+function onCancel() {
+  __dlg_close(null);
+  return false;
+}
+
+function onPreview() {
+  var f_url = document.getElementById("f_url");
+  var url = f_url.value;
+  var base = document.getElementById("f_base").value;
+  if (!url) {
+    alert(i18n("You must enter the URL"));
+    f_url.focus();
+    return false;
+  }
+  window.ipreview.location.replace(Xinha._resolveRelativeUrl(base, url));
+  return false;
+}
+</script>
+
+</head>
+
+<body class="dialog" onload="Init()">
+
+<div class="title">Insert Image</div>
+<!--- new stuff --->
+<form action="" method="get">
+<input type="hidden" name="base" id="f_base"/>
+<table border="0" width="100%" style="padding: 0px; margin: 0px">
+  <tbody>
+
+  <tr>
+    <td style="width: 7em; text-align: right">Image URL:</td>
+    <td><input type="text" name="url" id="f_url" style="width:75%"
+      title="Enter the image URL here" />
+      <button name="preview" onclick="return onPreview();"
+      title="Preview the image in a new window">Preview</button>
+    </td>
+  </tr>
+  <tr>
+    <td style="width: 7em; text-align: right">Alternate text:</td>
+    <td><input type="text" name="alt" id="f_alt" style="width:100%"
+      title="For browsers that don't support images" /></td>
+  </tr>
+
+  </tbody>
+</table>
+
+<br />
+
+<fieldset style="float: left; margin-left: 5px;">
+<legend>Layout</legend>
+
+<div class="space"></div>
+
+<div class="fl">Alignment:</div>
+<select size="1" name="align" id="f_align"
+  title="Positioning of this image">
+  <option value=""                             >Not set</option>
+  <option value="left"                         >Left</option>
+  <option value="right"                        >Right</option>
+  <option value="texttop"                      >Texttop</option>
+  <option value="absmiddle"                    >Absmiddle</option>
+  <option value="baseline" selected="1"        >Baseline</option>
+  <option value="absbottom"                    >Absbottom</option>
+  <option value="bottom"                       >Bottom</option>
+  <option value="middle"                       >Middle</option>
+  <option value="top"                          >Top</option>
+</select>
+
+<br />
+
+<div class="fl">Border thickness:</div>
+<input type="text" name="border" id="f_border" size="5"
+title="Leave empty for no border" />
+
+<div class="space"></div>
+
+</fieldset>
+
+<fieldset>
+<legend>Spacing</legend>
+
+<div class="space"></div>
+
+<div class="fr">Horizontal:</div>
+<input type="text" name="horiz" id="f_horiz" size="5"
+title="Horizontal padding" />
+
+<br />
+
+<div class="fr">Vertical:</div>
+<input type="text" name="vert" id="f_vert" size="5"
+title="Vertical padding" />
+
+<div class="space"></div>
+
+</fieldset>
+<br style="clear:all"/>
+<div>
+Image Preview:<br />
+    <iframe name="ipreview" id="ipreview" frameborder="0" style="border : 1px solid gray;" 
+	height="200" width="100%" src="../../popups/blank.html"></iframe>
+</div>
+<div id="buttons">
+<button type="button" name="ok" onclick="return onOK();">OK</button>
+<button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
+</div>
+</form>
+</body>
+</html>
\ No newline at end of file

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InsertImage/insert_image.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InsertImage/insert_image.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InsertImage/insert_image.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InsertImage/insert_image.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InsertImage/insert_image.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,106 @@
+InsertImage._pluginInfo={name:"InsertImage",origin:"Xinha Core",version:"$LastChangedRevision: 733 $".replace(/^[^:]*: (.*) \$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.python-hosting.com/trunk/modules/InsertImage/insert_image.js $".replace(/^[^:]*: (.*) \$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"};
+function InsertImage(_1){
+}
+Xinha.prototype._insertImage=function(_2){
+var _3=this;
+var _4;
+if(typeof _2=="undefined"){
+_2=this.getParentElement();
+if(_2&&_2.tagName.toLowerCase()!="img"){
+_2=null;
+}
+}
+var _5;
+if(typeof _3.config.baseHref!="undefined"&&_3.config.baseHref!==null){
+_5=_3.config.baseHref;
+}else{
+var _6=window.location.toString().split("/");
+_6.pop();
+_5=_6.join("/");
+}
+if(_2){
+_4={f_base:_5,f_url:Xinha.is_ie?_3.stripBaseURL(_2.src):_2.getAttribute("src"),f_alt:_2.alt,f_border:_2.border,f_align:_2.align,f_vert:(_2.vspace!=-1?_2.vspace:""),f_horiz:(_2.hspace!=-1?_2.hspace:""),f_width:_2.width,f_height:_2.height};
+}else{
+_4={f_base:_5,f_url:""};
+}
+Dialog(_3.config.URIs.insert_image,function(_7){
+if(!_7){
+return false;
+}
+var _8=_2;
+if(!_8){
+if(Xinha.is_ie){
+var _9=_3.getSelection();
+var _a=_3.createRange(_9);
+_3._doc.execCommand("insertimage",false,_7.f_url);
+_8=_a.parentElement();
+if(_8.tagName.toLowerCase()!="img"){
+_8=_8.previousSibling;
+}
+}else{
+_8=document.createElement("img");
+_8.src=_7.f_url;
+_3.insertNodeAtSelection(_8);
+if(!_8.tagName){
+_8=_a.startContainer.firstChild;
+}
+}
+}else{
+_8.src=_7.f_url;
+}
+for(var _b in _7){
+var _c=_7[_b];
+switch(_b){
+case "f_alt":
+if(_c){
+_8.alt=_c;
+}else{
+_8.removeAttribute("alt");
+}
+break;
+case "f_border":
+if(_c){
+_8.border=parseInt(_c||"0");
+}else{
+_8.removeAttribute("border");
+}
+break;
+case "f_align":
+if(_c){
+_8.align=_c;
+}else{
+_8.removeAttribute("align");
+}
+break;
+case "f_vert":
+if(_c){
+_8.vspace=parseInt(_c||"0");
+}else{
+_8.removeAttribute("vspace");
+}
+break;
+case "f_horiz":
+if(_c){
+_8.hspace=parseInt(_c||"0");
+}else{
+_8.removeAttribute("hspace");
+}
+break;
+case "f_width":
+if(_c){
+_8.width=parseInt(_c||"0");
+}else{
+_8.removeAttribute("width");
+}
+break;
+case "f_height":
+if(_c){
+_8.height=parseInt(_c||"0");
+}else{
+_8.removeAttribute("height");
+}
+break;
+}
+}
+},_4);
+};

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InsertImage/insert_image.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InsertTable/insert_table.html
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InsertTable/insert_table.html?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InsertTable/insert_table.html (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InsertTable/insert_table.html Sun Jul 22 07:50:10 2007
@@ -0,0 +1,157 @@
+<html>
+
+<head>
+  <title>Insert Table</title>
+
+<script type="text/javascript" src="../../popups/popup.js"></script>
+<link rel="stylesheet" type="text/css" href="../../popups/popup.css" />
+
+<script type="text/javascript">
+
+window.resizeTo(425, 250);
+
+Xinha = window.opener.Xinha;
+function i18n(str) {
+  return (Xinha._lc(str, 'Xinha'));
+}
+
+function Init() {
+  Xinha = window.opener.Xinha; // load the Xinha plugin and lang file
+  __dlg_translate('Xinha');
+  __dlg_init(null, Xinha.is_ie ? null : {width:425,height:250});
+  // Make sure the translated string appears in the drop down. (for gecko)
+  document.getElementById("f_unit").selectedIndex = 1;
+  document.getElementById("f_unit").selectedIndex = 0;
+  document.getElementById("f_align").selectedIndex = 1;
+  document.getElementById("f_align").selectedIndex = 0;
+  document.getElementById("f_rows").focus();
+}
+
+function onOK() {
+  var required = {
+    "f_rows": i18n("You must enter a number of rows"),
+    "f_cols": i18n("You must enter a number of columns")
+  };
+  for (var i in required) {
+    var el = document.getElementById(i);
+    if (!el.value) {
+      alert(required[i]);
+      el.focus();
+      return false;
+    }
+  }
+  var fields = ["f_rows", "f_cols", "f_width", "f_unit", "f_fixed",
+                "f_align", "f_border", "f_spacing", "f_padding"];
+  var param = new Object();
+  for (var i in fields) {
+    var id = fields[i];
+    var el = document.getElementById(id);
+    param[id] = (el.type == "checkbox") ? el.checked : el.value;
+  }
+  __dlg_close(param);
+  return false;
+}
+
+function onCancel() {
+  __dlg_close(null);
+  return false;
+}
+
+</script>
+
+</head>
+
+<body class="dialog" onload="Init()">
+
+<div class="title">Insert Table</div>
+
+<form action="" method="get">
+<table border="0" style="padding: 0px; margin: 0px">
+  <tbody>
+
+  <tr>
+    <td style="width: 4em; text-align: right">Rows:</td>
+    <td><input type="text" name="rows" id="f_rows" size="5" title="Number of rows" value="2" /></td>
+    <td style="width: 4em; text-align: right">Width:</td>
+    <td><input type="text" name="width" id="f_width" size="5" title="Width of the table" value="100" /></td>
+    <td><select size="1" name="unit" id="f_unit" title="Width unit">
+      <option value="%" selected="1"  >Percent</option>
+      <option value="px"              >Pixels</option>
+      <option value="em"              >Em</option>
+    </select></td>
+  </tr>
+  <tr>
+    <td style="width: 4em; text-align: right">Cols:</td>
+    <td><input type="text" name="cols" id="f_cols" size="5" title="Number of columns" value="4" /></td>
+    <td style="text-align: right"><input type="checkbox" checked="checked" name="fixed" id="f_fixed" /></td>
+    <td colspan="2"><label for="f_fixed"
+    >Fixed width columns</label></td>
+  </tr>
+  </tbody>
+</table>
+
+<p />
+
+<fieldset style="float: left; margin-left: 5px;">
+<legend>Layout</legend>
+
+<div class="space"></div>
+
+<div class="fl">Alignment:</div>
+<select size="1" name="align" id="f_align"
+  title="Positioning of this table">
+  <option value="" selected="1"                >Not set</option>
+  <option value="left"                         >Left</option>
+  <option value="right"                        >Right</option>
+  <option value="texttop"                      >Texttop</option>
+  <option value="absmiddle"                    >Absmiddle</option>
+  <option value="baseline"                     >Baseline</option>
+  <option value="absbottom"                    >Absbottom</option>
+  <option value="bottom"                       >Bottom</option>
+  <option value="middle"                       >Middle</option>
+  <option value="top"                          >Top</option>
+</select>
+
+<p />
+
+<div class="fl">Border thickness:</div>
+<input type="text" name="border" id="f_border" size="5" value="1"
+title="Leave empty for no border" />
+<!--
+<p />
+
+<div class="fl">Collapse borders:</div>
+<input type="checkbox" name="collapse" id="f_collapse" />
+-->
+<div class="space"></div>
+
+</fieldset>
+
+<fieldset style="float:right; margin-right: 5px;">
+<legend>Spacing</legend>
+
+<div class="space"></div>
+
+<div class="fr">Cell spacing:</div>
+<input type="text" name="spacing" id="f_spacing" size="5" value="1"
+title="Space between adjacent cells" />
+
+<p />
+
+<div class="fr">Cell padding:</div>
+<input type="text" name="padding" id="f_padding" size="5" value="1"
+title="Space between content and border in cell" />
+
+<div class="space"></div>
+
+</fieldset>
+
+<div style="margin-top: 85px; border-top: 1px solid #999; padding: 2px; text-align: right;">
+<button type="button" name="ok" onclick="return onOK();">OK</button>
+<button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
+</div>
+
+</form>
+
+</body>
+</html>
\ No newline at end of file

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InsertTable/insert_table.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InsertTable/insert_table.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InsertTable/insert_table.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InsertTable/insert_table.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InsertTable/insert_table.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,62 @@
+InsertTable._pluginInfo={name:"InsertTable",origin:"Xinha Core",version:"$LastChangedRevision: 688 $".replace(/^[^:]*: (.*) \$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.python-hosting.com/trunk/modules/InsertTable/insert_table.js $".replace(/^[^:]*: (.*) \$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"};
+function InsertTable(_1){
+}
+Xinha.prototype._insertTable=function(){
+var _2=this.getSelection();
+var _3=this.createRange(_2);
+var _4=this;
+Dialog(_4.config.URIs.insert_table,function(_5){
+if(!_5){
+return false;
+}
+var _6=_4._doc;
+var _7=_6.createElement("table");
+for(var _8 in _5){
+var _9=_5[_8];
+if(!_9){
+continue;
+}
+switch(_8){
+case "f_width":
+_7.style.width=_9+_5.f_unit;
+break;
+case "f_align":
+_7.align=_9;
+break;
+case "f_border":
+_7.border=parseInt(_9,10);
+break;
+case "f_spacing":
+_7.cellSpacing=parseInt(_9,10);
+break;
+case "f_padding":
+_7.cellPadding=parseInt(_9,10);
+break;
+}
+}
+var _a=0;
+if(_5.f_fixed){
+_a=Math.floor(100/parseInt(_5.f_cols,10));
+}
+var _b=_6.createElement("tbody");
+_7.appendChild(_b);
+for(var i=0;i<_5.f_rows;++i){
+var tr=_6.createElement("tr");
+_b.appendChild(tr);
+for(var j=0;j<_5.f_cols;++j){
+var td=_6.createElement("td");
+if(_a){
+td.style.width=_a+"%";
+}
+tr.appendChild(td);
+td.appendChild(_6.createTextNode("\xa0"));
+}
+}
+if(Xinha.is_ie){
+_3.pasteHTML(_7.outerHTML);
+}else{
+_4.insertNodeAtSelection(_7);
+}
+return true;
+},null);
+};

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InsertTable/insert_table.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InternetExplorer/InternetExplorer.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InternetExplorer/InternetExplorer.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InternetExplorer/InternetExplorer.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InternetExplorer/InternetExplorer.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,216 @@
+InternetExplorer._pluginInfo={name:"Internet Explorer",origin:"Xinha Core",version:"$LastChangedRevision: 816 $".replace(/^[^:]*: (.*) \$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.python-hosting.com/trunk/modules/InternetExplorer/InternetExplorer.js $".replace(/^[^:]*: (.*) \$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"};
+function InternetExplorer(_1){
+this.editor=_1;
+_1.InternetExplorer=this;
+}
+InternetExplorer.prototype.onKeyPress=function(ev){
+if(this.editor.isShortCut(ev)){
+switch(this.editor.getKey(ev).toLowerCase()){
+case "n":
+this.editor.execCommand("formatblock",false,"<p>");
+Xinha._stopEvent(ev);
+return true;
+break;
+case "1":
+case "2":
+case "3":
+case "4":
+case "5":
+case "6":
+this.editor.execCommand("formatblock",false,"<h"+this.editor.getKey(ev).toLowerCase()+">");
+Xinha._stopEvent(ev);
+return true;
+break;
+}
+}
+switch(ev.keyCode){
+case 8:
+case 46:
+if(this.handleBackspace()){
+Xinha._stopEvent(ev);
+return true;
+}
+break;
+}
+return false;
+};
+InternetExplorer.prototype.handleBackspace=function(){
+var _3=this.editor;
+var _4=_3.getSelection();
+if(_4.type=="Control"){
+var _5=_3.activeElement(_4);
+Xinha.removeFromParent(_5);
+return true;
+}
+var _6=_3.createRange(_4);
+var r2=_6.duplicate();
+r2.moveStart("character",-1);
+var a=r2.parentElement();
+if(a!=_6.parentElement()&&(/^a$/i.test(a.tagName))){
+r2.collapse(true);
+r2.moveEnd("character",1);
+r2.pasteHTML("");
+r2.select();
+return true;
+}
+};
+InternetExplorer.prototype.inwardHtml=function(_9){
+_9=_9.replace(/<(\/?)del(\s|>|\/)/ig,"<$1strike$2");
+_9=_9.replace(/(&nbsp;)?([\s\S]*?)(<script|<!--)/i,"$2&nbsp;$3");
+return _9;
+};
+InternetExplorer.prototype.outwardHtml=function(_a){
+_a=_a.replace(/&nbsp;(\s*)(<script|<!--)/i,"$1$2");
+return _a;
+};
+Xinha.prototype.insertNodeAtSelection=function(_b){
+this.insertHTML(_b.outerHTML);
+};
+Xinha.prototype.getParentElement=function(_c){
+if(typeof _c=="undefined"){
+_c=this.getSelection();
+}
+var _d=this.createRange(_c);
+switch(_c.type){
+case "Text":
+var _e=_d.parentElement();
+while(true){
+var _f=_d.duplicate();
+_f.moveToElementText(_e);
+if(_f.inRange(_d)){
+break;
+}
+if((_e.nodeType!=1)||(_e.tagName.toLowerCase()=="body")){
+break;
+}
+_e=_e.parentElement;
+}
+return _e;
+case "None":
+return _d.parentElement();
+case "Control":
+return _d.item(0);
+default:
+return this._doc.body;
+}
+};
+Xinha.prototype.activeElement=function(sel){
+if((sel===null)||this.selectionEmpty(sel)){
+return null;
+}
+if(sel.type.toLowerCase()=="control"){
+return sel.createRange().item(0);
+}else{
+var _11=sel.createRange();
+var _12=this.getParentElement(sel);
+if(_12.innerHTML==_11.htmlText){
+return _12;
+}
+return null;
+}
+};
+Xinha.prototype.selectionEmpty=function(sel){
+if(!sel){
+return true;
+}
+return this.createRange(sel).htmlText==="";
+};
+Xinha.prototype.saveSelection=function(){
+return this.createRange(this._getSelection());
+};
+Xinha.prototype.restoreSelection=function(_14){
+_14.select();
+};
+Xinha.prototype.selectNodeContents=function(_15,pos){
+this.focusEditor();
+this.forceRedraw();
+var _17;
+var _18=typeof pos=="undefined"?true:false;
+if(_18&&_15.tagName&&_15.tagName.toLowerCase().match(/table|img|input|select|textarea/)){
+_17=this._doc.body.createControlRange();
+_17.add(_15);
+}else{
+_17=this._doc.body.createTextRange();
+_17.moveToElementText(_15);
+}
+_17.select();
+};
+Xinha.prototype.insertHTML=function(_19){
+this.focusEditor();
+var sel=this.getSelection();
+var _1b=this.createRange(sel);
+_1b.pasteHTML(_19);
+};
+Xinha.prototype.getSelectedHTML=function(){
+var sel=this.getSelection();
+var _1d=this.createRange(sel);
+if(_1d.htmlText){
+return _1d.htmlText;
+}else{
+if(_1d.length>=1){
+return _1d.item(0).outerHTML;
+}
+}
+return "";
+};
+Xinha.prototype.getSelection=function(){
+return this._doc.selection;
+};
+Xinha.prototype.createRange=function(sel){
+return sel.createRange();
+};
+Xinha.prototype.isKeyEvent=function(_1f){
+return _1f.type=="keydown";
+};
+Xinha.prototype.getKey=function(_20){
+return String.fromCharCode(_20.keyCode);
+};
+Xinha.getOuterHTML=function(_21){
+return _21.outerHTML;
+};
+Xinha.prototype.cc=String.fromCharCode(8201);
+Xinha.prototype.setCC=function(_22){
+if(_22=="textarea"){
+var ta=this._textArea;
+var pos=document.selection.createRange();
+pos.collapse();
+pos.text=this.cc;
+var _25=ta.value.indexOf(this.cc);
+var _26=ta.value.substring(0,_25);
+var _27=ta.value.substring(_25+this.cc.length,ta.value.length);
+if(_27.match(/^[^<]*>/)){
+var _28=_27.indexOf(">")+1;
+ta.value=_26+_27.substring(0,_28)+this.cc+_27.substring(_28,_27.length);
+}else{
+ta.value=_26+this.cc+_27;
+}
+}else{
+var sel=this.getSelection();
+var r=sel.createRange();
+if(sel.type=="Control"){
+var _2b=r.item(0);
+_2b.outerHTML+=this.cc;
+}else{
+r.collapse();
+r.text=this.cc;
+}
+}
+};
+Xinha.prototype.findCC=function(_2c){
+var _2d=(_2c=="textarea")?this._textArea:this._doc.body;
+range=_2d.createTextRange();
+if(range.findText(escape(this.cc))){
+range.select();
+range.text="";
+}
+if(range.findText(this.cc)){
+range.select();
+range.text="";
+}
+if(_2c=="textarea"){
+this._textArea.focus();
+}
+};
+Xinha.getDoctype=function(doc){
+return (doc.compatMode=="CSS1Compat")?"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">":"";
+};

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/modules/InternetExplorer/InternetExplorer.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/abbr/de.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/abbr/de.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/abbr/de.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/abbr/de.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,40 @@
+// I18N constants
+// LANG: "de", ENCODING: UTF-8
+// Author: Udo Schmal, <schmal@schaffrath-neuemedien.de>
+//
+// (c) Udo Schmal & Schaffrath NeueMedien 2004
+// Distributed under the same terms as HTMLArea itself.
+// This notice MUST stay intact for use (see license.txt).
+
+{
+  "Abs.": "Absatz",
+  "bspw.": "Beispielsweise",
+  "bzw.": "beziehungsweise",
+  "c/o": "care of / bei, zu Händen von",
+  "ca.": "circa",
+  "d.h.": "das heißt",
+  "d.J.": "des Jahres",
+  "Dr.": "Doktor",
+  "e.V.": "Eingetragener Verein",
+  "eG.": "Eingetragene Genossenschaft",
+  "ehem.": "ehemals",
+  "einschl.": "einschließlich",
+  "etc.": "et cetera / und so weiter",
+  "evtl.": "eventuell",
+  "ff.": "(fort) folgende",
+  "gem.": "gemäß",
+  "inkl.": "inklusive",
+  "max.": "maximal / maximum",
+  "min.": "mindestens / minimum / minimal",
+  "o.g.": "oben genannt",
+  "rd.": "rund",
+  "S.": "Seite",
+  "u.a.": "unter anderem",
+  "u.ä.": "und ähnlich",
+  "usw.": "und so weiter",
+  "vgl.": "vergleiche",
+  "z.B.": "zum Beispiel",
+  "z.T.": "zum Teil",
+  "z.Z.": "zur Zeit",
+  "zzgl.": "zuzüglich"
+};

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/abbr/de.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/abbr/en.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/abbr/en.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/abbr/en.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/abbr/en.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,16 @@
+// I18N constants
+// LANG: "en", ENCODING: UTF-8
+// Author: Udo Schmal, <schmal@schaffrath-neuemedien.de>
+//
+// (c) Udo Schmal & Schaffrath NeueMedien 2004
+// Distributed under the same terms as HTMLArea itself.
+// This notice MUST stay intact for use (see license.txt).
+
+{
+  "ANSI": "American National Standards Institute",  
+  "ASA": "American Standards Association",
+  "ISO": "International Organisation for Standardization",
+  "mime": "Multipurpose Internet Mail Extensions",
+  "UTF": "Unicode Transformation Format",
+  "W3C": "World Wide Web Consortium"
+};

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/abbr/en.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/abbreviation.css
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/abbreviation.css?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/abbreviation.css (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/abbreviation.css Sun Jul 22 07:50:10 2007
@@ -0,0 +1,11 @@
+abbr, acronym, span.abbr {
+  width: 18px;
+  height: 18px;
+	background-image: url(img/ed_abbreviation.gif);	
+	background-repeat: no-repeat;
+	background-position: left top;
+	white-space : nowrap;	
+	cursor: help;
+	border-bottom: 1px dashed #000;
+	padding-left: 19px;
+}
\ No newline at end of file

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/abbreviation.css
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/abbreviation.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/abbreviation.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/abbreviation.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/abbreviation.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,70 @@
+function Abbreviation(_1){
+this.editor=_1;
+var _2=_1.config;
+var _3=this;
+_2.registerButton({id:"abbreviation",tooltip:this._lc("Abbreviation"),image:_1.imgURL("ed_abbreviation.gif","Abbreviation"),textMode:false,action:function(_4){
+_3.buttonPress(_4);
+}});
+_2.addToolbarElement("abbreviation","inserthorizontalrule",1);
+}
+Abbreviation._pluginInfo={name:"Abbreviation",version:"1.0",developer:"Udo Schmal",developer_url:"",sponsor:"L.N.Schaffrath NeueMedien",sponsor_url:"http://www.schaffrath-neuemedien.de/",c_owner:"Udo Schmal & Schaffrath-NeueMedien",license:"htmlArea"};
+Abbreviation.prototype._lc=function(_5){
+return HTMLArea._lc(_5,"Abbreviation");
+};
+Abbreviation.prototype.onGenerate=function(){
+var _6="Abbr-style";
+var _7=this.editor._doc.getElementById(_6);
+if(_7==null){
+_7=this.editor._doc.createElement("link");
+_7.id=_6;
+_7.rel="stylesheet";
+_7.href=_editor_url+"plugins/Abbreviation/abbreviation.css";
+this.editor._doc.getElementsByTagName("HEAD")[0].appendChild(_7);
+}
+};
+Abbreviation.prototype.buttonPress=function(_8,_9,_a){
+var _b=null;
+var _c=_8.getSelectedHTML();
+var _d=_8._getSelection();
+var _e=_8._createRange(_d);
+var _f=_8._activeElement(_d);
+if(!(_f!=null&&_f.tagName.toLowerCase()=="abbr")){
+_f=_8._getFirstAncestor(_d,"abbr");
+}
+if(_f!=null&&_f.tagName.toLowerCase()=="abbr"){
+_b={title:_f.title,text:_f.innerHTML};
+}else{
+_b={title:"",text:_c};
+}
+_8._popupDialog("plugin://Abbreviation/abbreviation",function(_10){
+if(_10){
+var _11=_10["title"];
+if(_11==""||_11==null){
+if(_f){
+var _12=_f.innerHTML;
+_f.parentNode.removeChild(_f);
+_8.insertHTML(_12);
+}
+return;
+}
+try{
+var doc=_8._doc;
+if(!_f){
+_f=doc.createElement("abbr");
+_f.title=_11;
+_f.innerHTML=_c;
+if(HTMLArea.is_ie){
+_e.pasteHTML(_f.outerHTML);
+}else{
+_8.insertNodeAtSelection(_f);
+}
+}else{
+_f.title=_11;
+}
+}
+catch(e){
+}
+}
+},_b);
+};
+

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/abbreviation.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/img/ed_abbreviation.gif
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/img/ed_abbreviation.gif?view=auto&rev=558490
==============================================================================
Binary file - no diff available.

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/img/ed_abbreviation.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/lang/de.js
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/lang/de.js?view=auto&rev=558490
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/lang/de.js (added)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/lang/de.js Sun Jul 22 07:50:10 2007
@@ -0,0 +1,8 @@
+// I18N constants
+// LANG: "de", ENCODING: UTF-8
+// Author: Udo Schmal (gocher), http://www.schaffrath-neuemedien.de/, udo.schmal@t-online.de
+{
+  "Abbreviation": "Abkürzung",
+  "Expansion:": "Erklärung:",
+  "Delete": "Löschen"
+};

Propchange: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/resources/org/apache/cocoon/forms/resources/xinha/plugins/Abbreviation/lang/de.js
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message