roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gma...@apache.org
Subject svn commit: r1612622 [7/9] - in /roller/trunk/app/src/main: java/org/apache/roller/weblogger/ui/core/plugins/ resources/org/apache/roller/weblogger/config/ resources/sql/ webapp/roller-ui/authoring/editors/ webapp/roller-ui/authoring/editors/xinha-0.95...
Date Tue, 22 Jul 2014 17:35:04 GMT
Added: roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/Gecko/Gecko.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/Gecko/Gecko.js?rev=1612622&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/Gecko/Gecko.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/Gecko/Gecko.js Tue Jul 22 17:35:00 2014
@@ -0,0 +1,471 @@
+/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
+/* The URL of the most recent version of this file is http://svn.xinha.org/trunk/modules/Gecko/Gecko.js */
+Gecko._pluginInfo={name:"Gecko",origin:"Xinha Core",version:"$LastChangedRevision: 1084 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.org/tags/0.96.1/modules/Gecko/Gecko.js $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$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)){
+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(new RegExp("http(s)?://"+Xinha.escapeStringForRegExp(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;
+break;
+case "removeformat":
+var _2a=this.editor;
+var sel=_2a.getSelection();
+var _2c=_2a.saveSelection(sel);
+var _2d=_2a.createRange(sel);
+var els=_2a._doc.body.getElementsByTagName("*");
+var _2f=(_2d.startContainer.nodeType==1)?_2d.startContainer:_2d.startContainer.parentNode;
+var i,el;
+if(sel.isCollapsed){
+_2d.selectNodeContents(_2a._doc.body);
+}
+for(i=0;i<els.length;i++){
+el=els[i];
+if(_2d.isPointInRange(el,0)||(els[i]==_2f&&_2d.startOffset==0)){
+el.removeAttribute("style");
+}
+}
+this.editor._doc.execCommand(_27,UI,_29);
+_2a.restoreSelection(_2c);
+return true;
+break;
+}
+return false;
+};
+Gecko.prototype.onMouseDown=function(ev){
+if(ev.target.tagName.toLowerCase()=="hr"){
+var sel=this.editor.getSelection();
+var _34=this.editor.createRange(sel);
+_34.selectNode(ev.target);
+}
+};
+Xinha.prototype.insertNodeAtSelection=function(_35){
+if(_35.ownerDocument!=this._doc){
+try{
+_35=this._doc.adoptNode(_35);
+}
+catch(e){
+}
+}
+var sel=this.getSelection();
+var _37=this.createRange(sel);
+sel.removeAllRanges();
+_37.deleteContents();
+var _38=_37.startContainer;
+var pos=_37.startOffset;
+var _3a=_35;
+switch(_38.nodeType){
+case 3:
+if(_35.nodeType==3){
+_38.insertData(pos,_35.data);
+_37=this.createRange();
+_37.setEnd(_38,pos+_35.length);
+_37.setStart(_38,pos+_35.length);
+sel.addRange(_37);
+}else{
+_38=_38.splitText(pos);
+if(_35.nodeType==11){
+_3a=_3a.firstChild;
+}
+_38.parentNode.insertBefore(_35,_38);
+this.selectNodeContents(_3a);
+this.updateToolbar();
+}
+break;
+case 1:
+if(_35.nodeType==11){
+_3a=_3a.firstChild;
+}
+_38.insertBefore(_35,_38.childNodes[pos]);
+this.selectNodeContents(_3a);
+this.updateToolbar();
+break;
+}
+};
+Xinha.prototype.getParentElement=function(sel){
+if(typeof sel=="undefined"){
+sel=this.getSelection();
+}
+var _3c=this.createRange(sel);
+try{
+var p=_3c.commonAncestorContainer;
+if(!_3c.collapsed&&_3c.startContainer==_3c.endContainer&&_3c.startOffset-_3c.endOffset<=1&&_3c.startContainer.hasChildNodes()){
+p=_3c.startContainer.childNodes[_3c.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(_40){
+try{
+var sel=this.getSelection();
+sel.removeAllRanges();
+sel.addRange(_40);
+}
+catch(e){
+}
+};
+Xinha.prototype.selectNodeContents=function(_42,_43){
+this.focusEditor();
+this.forceRedraw();
+var _44;
+var _45=typeof _43=="undefined"?true:false;
+var sel=this.getSelection();
+_44=this._doc.createRange();
+if(!_42){
+sel.removeAllRanges();
+return;
+}
+if(_45&&_42.tagName&&_42.tagName.toLowerCase().match(/table|img|input|textarea|select/)){
+_44.selectNode(_42);
+}else{
+_44.selectNodeContents(_42);
+}
+sel.removeAllRanges();
+sel.addRange(_44);
+if(typeof _43!="undefined"){
+if(_43){
+sel.collapse(_44.startContainer,_44.startOffset);
+}else{
+sel.collapse(_44.endContainer,_44.endOffset);
+}
+}
+};
+Xinha.prototype.insertHTML=function(_47){
+var sel=this.getSelection();
+var _49=this.createRange(sel);
+this.focusEditor();
+var _4a=this._doc.createDocumentFragment();
+var div=this._doc.createElement("div");
+div.innerHTML=_47;
+while(div.firstChild){
+_4a.appendChild(div.firstChild);
+}
+var _4c=this.insertNodeAtSelection(_4a);
+};
+Xinha.prototype.getSelectedHTML=function(){
+var sel=this.getSelection();
+if(sel.isCollapsed){
+return "";
+}
+var _4e=this.createRange(sel);
+return Xinha.getHTML(_4e.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(_50){
+return _50.type=="keypress";
+};
+Xinha.prototype.getKey=function(_51){
+return String.fromCharCode(_51.charCode);
+};
+Xinha.getOuterHTML=function(_52){
+return (new XMLSerializer()).serializeToString(_52);
+};
+Xinha.cc=String.fromCharCode(8286);
+Xinha.prototype.setCC=function(_53){
+var cc=Xinha.cc;
+try{
+if(_53=="textarea"){
+var ta=this._textArea;
+var _56=ta.selectionStart;
+var _57=ta.value.substring(0,_56);
+var _58=ta.value.substring(_56,ta.value.length);
+if(_58.match(/^[^<]*>/)){
+var _59=_58.indexOf(">")+1;
+ta.value=_57+_58.substring(0,_59)+cc+_58.substring(_59,_58.length);
+}else{
+ta.value=_57+cc+_58;
+}
+ta.value=ta.value.replace(new RegExp("(&[^"+cc+"]*?)("+cc+")([^"+cc+"]*?;)"),"$1$3$2");
+ta.value=ta.value.replace(new RegExp("(<script[^>]*>[^"+cc+"]*?)("+cc+")([^"+cc+"]*?</script>)"),"$1$3$2");
+ta.value=ta.value.replace(new RegExp("^([^"+cc+"]*)("+cc+")([^"+cc+"]*<body[^>]*>)(.*?)"),"$1$3$2$4");
+}else{
+var sel=this.getSelection();
+sel.getRangeAt(0).insertNode(this._doc.createTextNode(cc));
+}
+}
+catch(e){
+}
+};
+Xinha.prototype.findCC=function(_5b){
+if(_5b=="textarea"){
+var ta=this._textArea;
+var pos=ta.value.indexOf(Xinha.cc);
+if(pos==-1){
+return;
+}
+var end=pos+Xinha.cc.length;
+var _5f=ta.value.substring(0,pos);
+var _60=ta.value.substring(end,ta.value.length);
+ta.value=_5f;
+ta.scrollTop=ta.scrollHeight;
+var _61=ta.scrollTop;
+ta.value+=_60;
+ta.setSelectionRange(pos,pos);
+ta.focus();
+ta.scrollTop=_61;
+}else{
+try{
+var doc=this._doc;
+doc.body.innerHTML=doc.body.innerHTML.replace(new RegExp(Xinha.cc),"<span id=\"XinhaEditingPostion\"></span>");
+var _63=doc.getElementById("XinhaEditingPostion");
+this.selectNodeContents(_63);
+this.scrollToElement(_63);
+_63.parentNode.removeChild(_63);
+this._iframe.contentWindow.focus();
+}
+catch(e){
+}
+}
+};
+Xinha.prototype._standardToggleBorders=Xinha.prototype._toggleBorders;
+Xinha.prototype._toggleBorders=function(){
+var _64=this._standardToggleBorders();
+var _65=this._doc.getElementsByTagName("TABLE");
+for(var i=0;i<_65.length;i++){
+_65[i].style.display="none";
+_65[i].style.display="table";
+}
+return _64;
+};
+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;
+};
+

Added: roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/Gecko/paraHandlerBest.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/Gecko/paraHandlerBest.js?rev=1612622&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/Gecko/paraHandlerBest.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/Gecko/paraHandlerBest.js Tue Jul 22 17:35:00 2014
@@ -0,0 +1,295 @@
+/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
+/* The URL of the most recent version of this file is http://svn.xinha.org/trunk/modules/Gecko/paraHandlerBest.js */
+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,_a;
+if(_5.nodeType==11&&_5.firstChild){
+_9=_5.firstChild;
+_a=_5.lastChild;
+}else{
+_9=_a=_5;
+}
+while(_a.lastChild){
+_a=_a.lastChild;
+}
+return this.forEachNode(_9,_a,_6,_7,_8);
+};
+EnterParagraphs.prototype.forEachNode=function(_b,_c,_d,_e,_f){
+var _10=function(_11,_12){
+return (_12=="ltr"?_11.nextSibling:_11.previousSibling);
+};
+var _13=function(_14,_15){
+return (_15=="ltr"?_14.firstChild:_14.lastChild);
+};
+var _16,_17,_18;
+var _19=_f;
+var _1a=false;
+while(_16!=_e=="ltr"?_c:_b){
+if(!_16){
+_16=_e=="ltr"?_b:_c;
+}else{
+if(_13(_16,_e)){
+_16=_13(_16,_e);
+}else{
+if(_10(_16,_e)){
+_16=_10(_16,_e);
+}else{
+_17=_16;
+while(!_10(_17,_e)&&_17!=(_e=="ltr"?_c:_b)){
+_17=_17.parentNode;
+}
+_16=(_10(_17,_e)?_10(_17,_e):_17);
+}
+}
+}
+_1a=(_16==(_e=="ltr"?_c:_b));
+switch(_d){
+case "cullids":
+_18=this._fenCullIds(_16,_19);
+break;
+case "find_fill":
+_18=this._fenEmptySet(_16,_19,_d,_1a);
+break;
+case "find_cursorpoint":
+_18=this._fenEmptySet(_16,_19,_d,_1a);
+break;
+}
+if(_18[0]){
+return _18[1];
+}
+if(_1a){
+break;
+}
+if(_18[1]){
+_19=_18[1];
+}
+}
+return false;
+};
+EnterParagraphs.prototype._fenEmptySet=function(_1b,_1c,_1d,_1e){
+if(!_1c&&!_1b.firstChild){
+_1c=_1b;
+}
+if((_1b.nodeType==1&&this._elemSolid.test(_1b.nodeName))||(_1b.nodeType==3&&!this._whiteSpace.test(_1b.nodeValue))||(_1b.nodeType!=1&&_1b.nodeType!=3)){
+switch(_1d){
+case "find_fill":
+return new Array(true,false);
+break;
+case "find_cursorpoint":
+return new Array(true,_1b);
+break;
+}
+}
+if(_1e){
+return new Array(true,_1c);
+}
+return new Array(false,_1c);
+};
+EnterParagraphs.prototype._fenCullIds=function(_1f,_20,_21){
+if(_20.id){
+_21[_20.id]?_20.id="":_21[_20.id]=true;
+}
+return new Array(false,_21);
+};
+EnterParagraphs.prototype.processSide=function(rng,_23){
+var _24=function(_25,_26){
+return (_26=="left"?_25.previousSibling:_25.nextSibling);
+};
+var _27=_23=="left"?rng.startContainer:rng.endContainer;
+var _28=_23=="left"?rng.startOffset:rng.endOffset;
+var _29,_2a=_27;
+while(_2a.nodeType==1&&!this._permEmpty.test(_2a.nodeName)){
+_2a=(_28?_2a.lastChild:_2a.firstChild);
+}
+while(_29=_29?(_24(_29,_23)?_24(_29,_23):_29.parentNode):_2a){
+if(_24(_29,_23)){
+if(this._pExclusions.test(_24(_29,_23).nodeName)){
+return this.processRng(rng,_23,_29,_24(_29,_23),(_23=="left"?"AfterEnd":"BeforeBegin"),true,false);
+}
+}else{
+if(this._pContainers.test(_29.parentNode.nodeName)){
+return this.processRng(rng,_23,_29,_29.parentNode,(_23=="left"?"AfterBegin":"BeforeEnd"),true,false);
+}else{
+if(this._pExclusions.test(_29.parentNode.nodeName)){
+if(this._pBreak.test(_29.parentNode.nodeName)){
+return this.processRng(rng,_23,_29,_29.parentNode,(_23=="left"?"AfterBegin":"BeforeEnd"),false,(_23=="left"?true:false));
+}else{
+return this.processRng(rng,_23,(_29=_29.parentNode),(_24(_29,_23)?_24(_29,_23):_29.parentNode),(_24(_29,_23)?(_23=="left"?"AfterEnd":"BeforeBegin"):(_23=="left"?"AfterBegin":"BeforeEnd")),false,false);
+}
+}
+}
+}
+}
+};
+EnterParagraphs.prototype.processRng=function(rng,_2c,_2d,_2e,_2f,_30,_31){
+var _32=_2c=="left"?rng.startContainer:rng.endContainer;
+var _33=_2c=="left"?rng.startOffset:rng.endOffset;
+var _34=this.editor;
+var _35=_34._doc.createRange();
+_35.selectNode(_2d);
+if(_2c=="left"){
+_35.setEnd(_32,_33);
+rng.setStart(_35.startContainer,_35.startOffset);
+}else{
+if(_2c=="right"){
+_35.setStart(_32,_33);
+rng.setEnd(_35.endContainer,_35.endOffset);
+}
+}
+var cnt=_35.cloneContents();
+this.forEachNodeUnder(cnt,"cullids","ltr",this.takenIds,false,false);
+var _37,_38,_39;
+_37=_2c=="left"?(_35.endContainer.nodeType==3?true:false):(_35.startContainer.nodeType==3?false:true);
+_38=_37?_35.startOffset:_35.endOffset;
+_37=_37?_35.startContainer:_35.endContainer;
+if(this._pifyParent.test(_37.nodeName)&&_37.parentNode.childNodes.item(0)==_37){
+while(!this._pifySibling.test(_37.nodeName)){
+_37=_37.parentNode;
+}
+}
+if(cnt.nodeType==11&&!cnt.firstChild){
+if(_37.nodeName!="BODY"||(_37.nodeName=="BODY"&&_38!=0)){
+cnt.appendChild(_34._doc.createElement(_37.nodeName));
+}
+}
+_39=this.forEachNodeUnder(cnt,"find_fill","ltr",false);
+if(_39&&this._pifySibling.test(_37.nodeName)&&((_38==0)||(_38==1&&this._pifyForced.test(_37.nodeName)))){
+_2d=_34._doc.createElement("p");
+_2d.innerHTML="&nbsp;";
+if((_2c=="left")&&_37.previousSibling){
+return new Array(_37.previousSibling,"AfterEnd",_2d);
+}else{
+if((_2c=="right")&&_37.nextSibling){
+return new Array(_37.nextSibling,"BeforeBegin",_2d);
+}else{
+return new Array(_37.parentNode,(_2c=="left"?"AfterBegin":"BeforeEnd"),_2d);
+}
+}
+}
+if(_39){
+if(_39.nodeType==3){
+_39=_34._doc.createDocumentFragment();
+}
+if((_39.nodeType==1&&!this._elemSolid.test())||_39.nodeType==11){
+var _3a=_34._doc.createElement("p");
+_3a.innerHTML="&nbsp;";
+_39.appendChild(_3a);
+}else{
+var _3a=_34._doc.createElement("p");
+_3a.innerHTML="&nbsp;";
+_39.parentNode.insertBefore(parentNode,_39);
+}
+}
+if(_39){
+_2d=_39;
+}else{
+_2d=(_30||(cnt.nodeType==11&&!cnt.firstChild))?_34._doc.createElement("p"):_34._doc.createDocumentFragment();
+_2d.appendChild(cnt);
+}
+if(_31){
+_2d.appendChild(_34._doc.createElement("br"));
+}
+return new Array(_2e,_2f,_2d);
+};
+EnterParagraphs.prototype.isNormalListItem=function(rng){
+var _3c,_3d;
+_3c=rng.startContainer;
+if((typeof _3c.nodeName!="undefined")&&(_3c.nodeName.toLowerCase()=="li")){
+_3d=_3c;
+}else{
+if((typeof _3c.parentNode!="undefined")&&(typeof _3c.parentNode.nodeName!="undefined")&&(_3c.parentNode.nodeName.toLowerCase()=="li")){
+_3d=_3c.parentNode;
+}else{
+return false;
+}
+}
+if(!_3d.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 _40;
+var sel=this.editor.getSelection();
+var rng=this.editor.createRange(sel);
+if(this.isNormalListItem(rng)){
+return true;
+}
+this.takenIds=new Object();
+var _43=this.processSide(rng,"left");
+var _44=this.processSide(rng,"right");
+_40=_44[2];
+sel.removeAllRanges();
+rng.deleteContents();
+var _45=this.forEachNodeUnder(_40,"find_cursorpoint","ltr",false,true);
+if(!_45){
+alert("INTERNAL ERROR - could not find place to put cursor after ENTER");
+}
+if(_43){
+this.insertAdjacentElement(_43[0],_43[1],_43[2]);
+}
+if(_44&&_44.nodeType!=1){
+this.insertAdjacentElement(_44[0],_44[1],_44[2]);
+}
+if((_45)&&(this._permEmpty.test(_45.nodeName))){
+var _46=0;
+while(_45.parentNode.childNodes.item(_46)!=_45){
+_46++;
+}
+sel.collapse(_45.parentNode,_46);
+}else{
+try{
+sel.collapse(_45,0);
+if(_45.nodeType==3){
+_45=_45.parentNode;
+}
+this.editor.scrollToElement(_45);
+}
+catch(e){
+}
+}
+this.editor.updateToolbar();
+Xinha._stopEvent(ev);
+return true;
+};
+

Added: roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/GetHtml/DOMwalk.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/GetHtml/DOMwalk.js?rev=1612622&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/GetHtml/DOMwalk.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/GetHtml/DOMwalk.js Tue Jul 22 17:35:00 2014
@@ -0,0 +1,197 @@
+/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
+/* The URL of the most recent version of this file is http://svn.xinha.org/trunk/modules/GetHtml/DOMwalk.js */
+function GetHtmlImplementation(_1){
+this.editor=_1;
+};
+GetHtmlImplementation._pluginInfo={name:"GetHtmlImplementation DOMwalk",origin:"Xinha Core",version:"$LastChangedRevision: 1185 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.org/tags/0.96.1/modules/GetHtml/DOMwalk.js $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"};
+Xinha.getHTML=function(_2,_3,_4){
+return Xinha.getHTMLWrapper(_2,_3,_4);
+};
+Xinha.emptyAttributes=" checked disabled ismap readonly nowrap compact declare selected defer multiple noresize noshade ";
+Xinha.getHTMLWrapper=function(_5,_6,_7,_8){
+var _9="";
+if(!_8){
+_8="";
+}
+switch(_5.nodeType){
+case 10:
+case 6:
+case 12:
+break;
+case 2:
+break;
+case 4:
+_9+=(Xinha.is_ie?("\n"+_8):"")+"<![CDATA["+_5.data+"]]>";
+break;
+case 5:
+_9+="&"+_5.nodeValue+";";
+break;
+case 7:
+_9+=(Xinha.is_ie?("\n"+_8):"")+"<"+"?"+_5.target+" "+_5.data+" ?>";
+break;
+case 1:
+case 11:
+case 9:
+var _a;
+var i;
+var _c=(_5.nodeType==1)?_5.tagName.toLowerCase():"";
+if((_c=="script"||_c=="noscript")&&_7.config.stripScripts){
+break;
+}
+if(_6){
+_6=!(_7.config.htmlRemoveTags&&_7.config.htmlRemoveTags.test(_c));
+}
+if(Xinha.is_ie&&_c=="head"){
+if(_6){
+_9+=(Xinha.is_ie?("\n"+_8):"")+"<head>";
+}
+var _d=RegExp.multiline;
+RegExp.multiline=true;
+var _e=_5.innerHTML.replace(Xinha.RE_tagName,function(_f,p1,p2){
+return p1+p2.toLowerCase();
+}).replace(/\s*=\s*(([^'"][^>\s]*)([>\s])|"([^"]+)"|'([^']+)')/g,"=\"$2$4$5\"$3").replace(/<(link|meta)((\s*\S*="[^"]*")*)>([\n\r]*)/g,"<$1$2 />\n");
+RegExp.multiline=_d;
+_9+=_e+"\n";
+if(_6){
+_9+=(Xinha.is_ie?("\n"+_8):"")+"</head>";
+}
+break;
+}else{
+if(_6){
+_a=(!(_5.hasChildNodes()||Xinha.needsClosingTag(_5)));
+_9+=((Xinha.isBlockElement(_5))?("\n"+_8):"")+"<"+_5.tagName.toLowerCase();
+var _12=_5.attributes;
+for(i=0;i<_12.length;++i){
+var a=_12.item(i);
+if(Xinha.is_real_gecko&&(_5.tagName.toLowerCase()=="img")&&((a.nodeName.toLowerCase()=="height")||(a.nodeName.toLowerCase()=="width"))){
+if(!_5.complete||_5.naturalWidth===0){
+continue;
+}
+}
+if(typeof a.nodeValue=="object"){
+continue;
+}
+if(_5.tagName.toLowerCase()=="input"&&_5.type.toLowerCase()=="checkbox"&&a.nodeName.toLowerCase()=="value"&&a.nodeValue.toLowerCase()=="on"){
+continue;
+}
+if(!a.specified&&!(_5.tagName.toLowerCase().match(/input|option/)&&a.nodeName=="value")&&!(_5.tagName.toLowerCase().match(/area/)&&a.nodeName.match(/shape|coords/i))){
+continue;
+}
+var _14=a.nodeName.toLowerCase();
+if(/_moz_editor_bogus_node/.test(_14)||(_14=="class"&&a.nodeValue=="webkit-block-placeholder")){
+_9="";
+break;
+}
+if(/(_moz)|(contenteditable)|(_msh)/.test(_14)){
+continue;
+}
+var _15;
+if(Xinha.emptyAttributes.indexOf(" "+_14+" ")!=-1){
+_15=_14;
+}else{
+if(_14!="style"){
+if(typeof _5[a.nodeName]!="undefined"&&_14!="href"&&_14!="src"&&!(/^on/.test(_14))){
+_15=_5[a.nodeName];
+}else{
+_15=a.nodeValue;
+if(_14=="class"){
+_15=_15.replace(/Apple-style-span/,"");
+if(!_15){
+continue;
+}
+}
+if(Xinha.is_ie&&(_14=="href"||_14=="src")){
+_15=_7.stripBaseURL(_15);
+}
+if(_7.config.only7BitPrintablesInURLs&&(_14=="href"||_14=="src")){
+_15=_15.replace(/([^!-~]+)/g,function(_16){
+return escape(_16);
+});
+}
+}
+}else{
+if(!Xinha.is_ie){
+_15=_5.style.cssText.replace(/rgb\(.*?\)/ig,function(rgb){
+return Xinha._colorToRgb(rgb);
+});
+}else{
+if(!_15){
+continue;
+}
+}
+}
+}
+if(/^(_moz)?$/.test(_15)){
+continue;
+}
+_9+=" "+_14+"=\""+Xinha.htmlEncode(_15)+"\"";
+}
+if(Xinha.is_ie&&_5.style.cssText){
+_9+=" style=\""+_5.style.cssText.replace(/(^)?([^:]*):(.*?)(;|$)/g,function(m0,m1,m2,m3,m4){
+return m2.toLowerCase()+":"+m3+m4;
+})+"\"";
+}
+if(Xinha.is_ie&&_5.tagName.toLowerCase()=="option"&&_5.selected){
+_9+=" selected=\"selected\"";
+}
+if(_9!==""){
+if(_a&&_c=="p"){
+_9+=">&nbsp;</p>";
+}else{
+if(_a){
+_9+=" />";
+}else{
+_9+=">";
+}
+}
+}
+}
+}
+var _1d=false;
+if(_c=="script"||_c=="noscript"){
+if(!_7.config.stripScripts){
+if(Xinha.is_ie){
+var _1e="\n"+_5.innerHTML.replace(/^[\n\r]*/,"").replace(/\s+$/,"")+"\n"+_8;
+}else{
+var _1e=(_5.hasChildNodes())?_5.firstChild.nodeValue:"";
+}
+_9+=_1e+"</"+_c+">"+((Xinha.is_ie)?"\n":"");
+}
+}else{
+if(_c=="pre"){
+_9+=((Xinha.is_ie)?"\n":"")+_5.innerHTML.replace(/<br>/g,"\n")+"</"+_c+">";
+}else{
+for(i=_5.firstChild;i;i=i.nextSibling){
+if(!_1d&&i.nodeType==1&&Xinha.isBlockElement(i)){
+_1d=true;
+}
+_9+=Xinha.getHTMLWrapper(i,true,_7,_8+"  ");
+}
+if(_6&&!_a){
+_9+=(((Xinha.isBlockElement(_5)&&_1d)||_c=="head"||_c=="html")?("\n"+_8):"")+"</"+_5.tagName.toLowerCase()+">";
+}
+}
+}
+break;
+case 3:
+if(/^script|noscript|style$/i.test(_5.parentNode.tagName)){
+_9=_5.data;
+}else{
+if(_5.data.trim()==""){
+if(_5.data){
+_9=" ";
+}else{
+_9="";
+}
+}else{
+_9=Xinha.htmlEncode(_5.data);
+}
+}
+break;
+case 8:
+_9="<!--"+_5.data+"-->";
+break;
+}
+return _9;
+};
+

Added: roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/GetHtml/TransformInnerHTML.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/GetHtml/TransformInnerHTML.js?rev=1612622&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/GetHtml/TransformInnerHTML.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/GetHtml/TransformInnerHTML.js Tue Jul 22 17:35:00 2014
@@ -0,0 +1,155 @@
+/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
+/* The URL of the most recent version of this file is http://svn.xinha.org/trunk/modules/GetHtml/TransformInnerHTML.js */
+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"};
+Xinha.RegExpCache=[/<\s*\/?([^\s\/>]+)[\s*\/>]/gi,/(\s+)_moz[^=>]*=[^\s>]*/gi,/\s*=\s*(([^'"][^>\s]*)([>\s])|"([^"]+)"|'([^']+)')/g,/\/>/g,/<(br|hr|img|input|link|meta|param|embed|area)((\s*\S*="[^"]*")*)>/g,/(<\w+\s+(\w*="[^"]*"\s+)*)(checked|compact|declare|defer|disabled|ismap|multiple|no(href|resize|shade|wrap)|readonly|selected)([\s>])/gi,/(="[^']*)'([^'"]*")/,/&(?=(?!(#[0-9]{2,5};|[a-zA-Z0-9]{2,6};|#x[0-9a-fA-F]{2,4};))[^<]*>)/g,/<\s+/g,/\s+(\/)?>/g,/\s{2,}/g,/\s+([^=\s]+)((="[^"]+")|([\s>]))/g,/\s+contenteditable(=[^>\s\/]*)?/gi,/((href|src)=")([^\s]*)"/g,/<\/?(div|p|h[1-6]|table|tr|td|th|ul|ol|li|dl|dt|dd|blockquote|object|br|hr|img|embed|param|pre|script|html|head|body|meta|link|title|area|input|form|textarea|select|option)[^>]*>/g,/<\/(div|p|h[1-6]|table|tr|ul|ol|dl|blockquote|html|head|body|script|form|select)( [^>]*)?>/g,/<(div|p|h[1-6]|table|tr|ul|ol|dl|blockquote|object|html|head|body|script|form|select)( [^>]*)?>/g,/<(td|th|li|dt|dd|option|br|hr|embed|param|pre|meta|l
 ink|title|area|input|textarea)[^>]*>/g,/(^|<\/(pre|script)>)(\s|[^\s])*?(<(pre|script)[^>]*>|$)/g,/(<pre[^>]*>)([\s\S])*?(<\/pre>)/g,/(^|<!--[\s\S]*?-->)([\s\S]*?)(?=<!--[\s\S]*?-->|$)/g,/\S*=""/g,/<!--[\s\S]*?-->|<\?[\s\S]*?\?>|<\/?\w[^>]*>/g,/(^|<\/script>)[\s\S]*?(<script[^>]*>|$)/g];
+var testRE=new RegExp().compile(Xinha.RegExpCache[3]);
+if(typeof testRE!="undefined"){
+for(var i=0;i<Xinha.RegExpCache.length;i++){
+Xinha.RegExpCache[i]=new RegExp().compile(Xinha.RegExpCache[i]);
+}
+}
+Xinha.prototype.cleanHTML=function(_2){
+var c=Xinha.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$3=\"$3\"$5").replace(c[4],"<$1$2 />").replace(c[6],"$1$2").replace(c[7],"&amp;").replace(c[8],"<").replace(c[10]," ");
+if(Xinha.is_ie&&c[13].test(_2)){
+_2=_2.replace(c[13],"$1"+Xinha._escapeDollars(this.stripBaseURL(RegExp.$3))+"\"");
+}
+if(this.config.only7BitPrintablesInURLs){
+if(Xinha.is_ie){
+c[13].test(_2);
+}
+if(c[13].test(_2)){
+try{
+_2=_2.replace(c[13],"$1"+Xinha._escapeDollars(decodeURIComponent(RegExp.$3).replace(/([^!-~]+)/g,function(_8){
+return escape(_8);
+}))+"\"");
+}
+catch(e){
+_2=_2.replace(c[13],Xinha._escapeDollars("$1"+RegExp.$3.replace(/([^!-~]+)/g,function(_9){
+return escape(_9);
+})+"\""));
+}
+}
+}
+return _2;
+};
+Xinha.indent=function(s,_b){
+Xinha.__nindent=0;
+Xinha.__sindent="";
+Xinha.__sindentChar=(typeof _b=="undefined")?"  ":_b;
+var c=Xinha.RegExpCache;
+if(Xinha.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"+Xinha.__sindent+str;
+Xinha.__sindent+=Xinha.__sindentChar;
+++Xinha.__nindent;
+return s;
+}else{
+if(str.match(c[15])){
+--Xinha.__nindent;
+Xinha.__sindent="";
+for(var i=Xinha.__nindent;i>0;--i){
+Xinha.__sindent+=Xinha.__sindentChar;
+}
+return "\n"+Xinha.__sindent+str;
+}else{
+if(str.match(c[17])){
+return "\n"+Xinha.__sindent+str;
+}
+}
+}
+return str;
+});
+return $1+string;
+});
+return _e;
+});
+s=s.replace(/^\s*/,"").replace(/ +\n/g,"\n").replace(/[\r\n]+(\s+)<\/script>/g,"\n$1</script>");
+return s;
+};
+Xinha.getHTML=function(_15,_16,_17){
+var _18="";
+var c=Xinha.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(Xinha.is_ie){
+_18=_18.replace(/<(li|dd|dt)( [^>]*)?>/g,"</$1><$1$2>").replace(/(<[uod]l[^>]*>[\s\S]*?)<\/(li|dd|dt)>/g,"$1").replace(/\s*<\/(li|dd|dt)>(\s*<\/(li|dd|dt)>)+/g,"</$1>").replace(/(<dt[\s>][\s\S]*?)(<\/d[dt]>)+/g,"$1</dt>");
+}
+if(Xinha.is_gecko){
+_18=_18.replace(/<br \/>\n$/,"");
+}
+_18=_18.replace(/\s*(<\/(li|dd|dt)>)/g,"$1");
+if(_16){
+_18+="</"+_1e+">";
+}
+_18=Xinha.indent(_18);
+}
+return _18;
+};
+Xinha._escapeDollars=function(str){
+return str.replace(/\$/g,"$$$$");
+};
+

Added: roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/GetHtml/lang/pt_br.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/GetHtml/lang/pt_br.js?rev=1612622&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/GetHtml/lang/pt_br.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/GetHtml/lang/pt_br.js Tue Jul 22 17:35:00 2014
@@ -0,0 +1,18 @@
+// I18N constants
+//
+// LANG: "pt_br", ENCODING: UTF-8
+// Portuguese Brazilian Translation
+//
+// Author: Marcio Barbosa, <marcio@mpg.com.br>
+// MSN: tomarshall@msn.com - ICQ: 69419933
+// Site: http://www.mpg.com.br
+//
+// Last revision: 06 september 2007
+// Please don´t remove this information
+// If you modify any source, please insert a comment with your name and e-mail
+//
+// Distributed under the same terms as HTMLArea itself.
+// This notice MUST stay intact for use (see license.txt).
+{
+  "Your Document is not well formed. Check JavaScript console for details.": "Seu documento não está formatado corretamente. Verifique os detalhes no console do Javascript."
+}

Added: roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertImage/dialog.html
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertImage/dialog.html?rev=1612622&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertImage/dialog.html (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertImage/dialog.html Tue Jul 22 17:35:00 2014
@@ -0,0 +1,83 @@
+<h1 id="[h1]"><l10n>Insert Image</l10n></h1>
+<!--- new stuff --->
+<form action="" method="get" style="padding-top:10px" id="[inputs]">
+<table border="0" width="95%" style="padding: 0px; margin: 0px">
+  <tbody>
+
+  <tr>
+    <td style="width: 7em; text-align: right"><l10n>Image URL:</l10n></td>
+    <td><input type="text" name="[f_url]" id="[f_url]" style="width:75%"
+      title="_(Enter the image URL here)" />
+      <button id="[preview]" title="_(Preview the image in a new window)"><l10n>Preview</l10n></button>
+    </td>
+  </tr>
+  <tr>
+    <td style="width: 7em; text-align: right"><l10n>Alternate text:</l10n></td>
+    <td><input type="text" name="[f_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><l10n>Layout</l10n></legend>
+
+<div class="space"></div>
+
+<div class="fl"><l10n>Alignment:</l10n></div>
+<select size="1" name="[f_align]" id="[f_align]"
+  title="_(Positioning of this image)">
+  <option value=""                             ><l10n>Not set</l10n></option>
+  <option value="left"                         ><l10n>Left</l10n></option>
+  <option value="right"                        ><l10n>Right</l10n></option>
+  <option value="texttop"                      ><l10n>Texttop</l10n></option>
+  <option value="absmiddle"                    ><l10n>Absmiddle</l10n></option>
+  <option value="baseline"                     ><l10n>Baseline</l10n></option>
+  <option value="absbottom"                    ><l10n>Absbottom</l10n></option>
+  <option value="bottom"                       ><l10n>Bottom</l10n></option>
+  <option value="middle"                       ><l10n>Middle</l10n></option>
+  <option value="top"                          ><l10n>Top</l10n></option>
+</select>
+
+<br />
+
+<div class="fl"><l10n>Border thickness:</l10n></div>
+<input type="text" name="[f_border]" id="[f_border]" size="5"
+title="_(Leave empty for no border)" />
+
+<div class="space"></div>
+
+</fieldset>
+
+<fieldset>
+<legend><l10n>Spacing</l10n></legend>
+
+<div class="space"></div>
+
+<div class="fr"><l10n>Horizontal:</l10n></div>
+<input type="text" name="[f_horiz]" id="[f_horiz]" size="5"
+title="_(Horizontal padding)" />
+
+<br />
+
+<div class="fr"><l10n>Vertical:</l10n></div>
+<input type="text" name="[f_vert]" id="[f_vert]" size="5"
+title="_(Vertical padding)" />
+
+<div class="space"></div>
+
+</fieldset>
+</form>
+<div>
+<l10n>Image Preview:</l10n><br />
+    <iframe id="[ipreview]" frameborder="0" style="border : 1px solid gray;" 
+	height="200" width="100%" src="about:blank"></iframe>
+</div>
+
+<div class="buttons" id="[buttons]">
+  <input type="button" id="[ok]"     value="_(OK)"     />
+  <input type="button" id="[cancel]" value="_(Cancel)" />
+</div>
\ No newline at end of file

Added: roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertImage/insert_image.html
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertImage/insert_image.html?rev=1612622&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertImage/insert_image.html (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertImage/insert_image.html Tue Jul 22 17:35:00 2014
@@ -0,0 +1,173 @@
+<!DOCTYPE html
+     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <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>
+
+<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="selected" >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>
+<div class="space" style="clear:all"></div>
+<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="submit" 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

Added: roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertImage/insert_image.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertImage/insert_image.js?rev=1612622&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertImage/insert_image.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertImage/insert_image.js Tue Jul 22 17:35:00 2014
@@ -0,0 +1,70 @@
+/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
+/* The URL of the most recent version of this file is http://svn.xinha.org/trunk/modules/InsertImage/insert_image.js */
+InsertImage._pluginInfo={name:"InsertImage",origin:"Xinha Core",version:"$LastChangedRevision: 1239 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.org/tags/0.96.1/modules/InsertImage/insert_image.js $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"};
+function InsertImage(_1){
+this.editor=_1;
+var _2=_1.config;
+var _3=this;
+if(typeof _1._insertImage=="undefined"){
+_1._insertImage=function(){
+_3.show();
+};
+}
+};
+InsertImage.prototype._lc=function(_4){
+return Xinha._lc(_4,"Xinha");
+};
+InsertImage.prototype.onGenerateOnce=function(){
+InsertImage.loadAssets();
+};
+InsertImage.loadAssets=function(){
+var _5=InsertImage;
+if(_5.loading){
+return;
+}
+_5.loading=true;
+Xinha._getback(_editor_url+"modules/InsertImage/dialog.html",function(_6){
+_5.html=_6;
+_5.dialogReady=true;
+});
+Xinha._getback(_editor_url+"modules/InsertImage/pluginMethods.js",function(_7){
+eval(_7);
+_5.methodsReady=true;
+});
+};
+InsertImage.prototype.onUpdateToolbar=function(){
+if(!(InsertImage.dialogReady&&InsertImage.methodsReady)){
+this.editor._toolbarObjects.insertimage.state("enabled",false);
+}else{
+this.onUpdateToolbar=null;
+}
+};
+InsertImage.prototype.prepareDialog=function(){
+var _8=this;
+var _9=this.editor;
+var _a=this.dialog=new Xinha.Dialog(_9,InsertImage.html,"Xinha",{width:410});
+_a.getElementById("ok").onclick=function(){
+_8.apply();
+};
+_a.getElementById("cancel").onclick=function(){
+_8.dialog.hide();
+};
+_a.getElementById("preview").onclick=function(){
+var _b=_a.getElementById("f_url");
+var _c=_b.value;
+if(!_c){
+alert(_a._lc("You must enter the URL"));
+_b.focus();
+return false;
+}
+_a.getElementById("ipreview").src=_c;
+return false;
+};
+this.dialog.onresize=function(){
+var _d=parseInt(this.height,10)-this.getElementById("h1").offsetHeight-this.getElementById("buttons").offsetHeight-this.getElementById("inputs").offsetHeight-parseInt(this.rootElem.style.paddingBottom,10);
+this.getElementById("ipreview").style.height=((_d>0)?_d:0)+"px";
+this.getElementById("ipreview").style.width=this.width-2+"px";
+};
+this.dialogReady=true;
+};
+

Added: roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertImage/pluginMethods.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertImage/pluginMethods.js?rev=1612622&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertImage/pluginMethods.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertImage/pluginMethods.js Tue Jul 22 17:35:00 2014
@@ -0,0 +1,113 @@
+/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
+/* The URL of the most recent version of this file is http://svn.xinha.org/trunk/modules/InsertImage/pluginMethods.js */
+InsertImage.prototype.show=function(_1){
+if(!this.dialog){
+this.prepareDialog();
+}
+var _2=this.editor;
+if(typeof _1=="undefined"){
+_1=_2.getParentElement();
+if(_1&&_1.tagName.toLowerCase()!="img"){
+_1=null;
+}
+}
+if(_1){
+function getSpecifiedAttribute(_3,_4){
+var a=_3.attributes;
+for(var i=0;i<a.length;i++){
+if(a[i].nodeName==_4&&a[i].specified){
+return a[i].value;
+}
+}
+return "";
+};
+outparam={f_url:_2.stripBaseURL(_1.getAttribute("src",2)),f_alt:_1.alt,f_border:_1.border,f_align:_1.align,f_vert:getSpecifiedAttribute(_1,"vspace"),f_horiz:getSpecifiedAttribute(_1,"hspace"),f_width:_1.width,f_height:_1.height};
+}else{
+outparam={f_url:"",f_alt:"",f_border:"",f_align:"",f_vert:"",f_horiz:"",f_width:"",f_height:""};
+}
+this.image=_1;
+this.dialog.show(outparam);
+};
+InsertImage.prototype.apply=function(){
+var _7=this.dialog.hide();
+if(!_7.f_url){
+return;
+}
+var _8=this.editor;
+var _9=this.image;
+if(!_9){
+if(Xinha.is_ie){
+var _a=_8.getSelection();
+var _b=_8.createRange(_a);
+_8._doc.execCommand("insertimage",false,_7.f_url);
+_9=_b.parentElement();
+if(_9.tagName.toLowerCase()!="img"){
+_9=_9.previousSibling;
+}
+}else{
+_9=document.createElement("img");
+_9.src=_7.f_url;
+_8.insertNodeAtSelection(_9);
+if(!_9.tagName){
+_9=_b.startContainer.firstChild;
+}
+}
+}else{
+_9.src=_7.f_url;
+}
+for(var _c in _7){
+var _d=_7[_c];
+switch(_c){
+case "f_alt":
+if(_d){
+_9.alt=_d;
+}else{
+_9.removeAttribute("alt");
+}
+break;
+case "f_border":
+if(_d){
+_9.border=parseInt(_d||"0");
+}else{
+_9.removeAttribute("border");
+}
+break;
+case "f_align":
+if(_d.value){
+_9.align=_d.value;
+}else{
+_9.removeAttribute("align");
+}
+break;
+case "f_vert":
+if(_d!=""){
+_9.vspace=parseInt(_d||"0");
+}else{
+_9.removeAttribute("vspace");
+}
+break;
+case "f_horiz":
+if(_d!=""){
+_9.hspace=parseInt(_d||"0");
+}else{
+_9.removeAttribute("hspace");
+}
+break;
+case "f_width":
+if(_d){
+_9.width=parseInt(_d||"0");
+}else{
+_9.removeAttribute("width");
+}
+break;
+case "f_height":
+if(_d){
+_9.height=parseInt(_d||"0");
+}else{
+_9.removeAttribute("height");
+}
+break;
+}
+}
+};
+

Added: roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertTable/dialog.html
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertTable/dialog.html?rev=1612622&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertTable/dialog.html (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertTable/dialog.html Tue Jul 22 17:35:00 2014
@@ -0,0 +1,100 @@
+<h1 id="[h1]"><l10n>Insert Table</l10n></h1>
+<form action="" method="get" style="margin-top:10px">
+<div id="[columns_alert]" style="color:red;display:none"><l10n>You must enter a number of columns</l10n></div>
+<div id="[rows_alert]" style="color:red;display:none"><l10n>You must enter a number of rows</l10n></div>
+
+<table border="0" style="padding: 0px; margin: 0px">
+  <tbody>
+  <tr>
+  <td>
+    <l10n>Caption</l10n>:
+  </td>  
+  <td colspan="4">
+    <input type="text" name="[caption]" id="[caption]" style="width:90%" title="_(Caption for the table)" />
+  </td>
+  </tr>
+  <tr>
+    <td style="width: 4em; text-align: right"><l10n>Rows:</l10n></td>
+    <td><input type="text" name="[rows]" id="[rows]" size="5" title="_(Number of rows)"  /></td>
+    <td style="width: 4em; text-align: right">Width:</td>
+    <td><input type="text" name="[width]" id="[width]" size="5" title="_(Width of the table)" /></td>
+    <td><select size="1" name="[unit]" id="[unit]" title="Width unit">
+      <option value="%"               ><l10n>Percent</l10n></option>
+      <option value="px"              ><l10n>Pixels</l10n></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="[cols]" size="5" title="_(Number of columns)"  /></td>
+    <td style="text-align: right"><input type="checkbox" name="[fixed]" id="[fixed]" value="on" /></td>
+    <td colspan="2"><label
+    ><l10n>Fixed width columns</l10n></label></td>
+  </tr>
+  </tbody>
+</table>
+
+<br />
+
+<fieldset id="[layout_fieldset]" style="float: left; margin-left: 10px;">
+<legend><l10n>Layou</l10n>t</legend>
+
+<div class="space"></div>
+
+<div class="fl"><l10n>Alignment:</l10n></div>
+<select size="1" name="[align]" id="[align]"
+  title="Positioning of this table">
+  <option value=""                             ><l10n>Not set</l10n></option>
+  <option value="left"                         ><l10n>Left</l10n></option>
+  <option value="right"                        ><l10n>Right</l10n></option>
+  <option value="texttop"                      ><l10n>Texttop</l10n></option>
+  <option value="absmiddle"                    ><l10n>Absmiddle</l10n></option>
+  <option value="baseline"                     ><l10n>Baseline</l10n></option>
+  <option value="absbottom"                    ><l10n>Absbottom</l10n></option>
+  <option value="bottom"                       ><l10n>Bottom</l10n></option>
+  <option value="middle"                       ><l10n>Middle</option>
+  <option value="top"                          ><l10n>Top</l10n></option>
+</select>
+
+<br />
+
+<div class="fl"><l10n>Border</l10n></div>
+<input type="text" name="[border]" id="[border]" size="2" title="_(Leave empty for no border)" /> <l10n>Pixels</l10n>
+<select size="1" name="[border_style]" id="[border_style]" title="_(Style of the border)">
+  <option value="solid"   >Solid</option>
+  <option value="dotted"  >Dotted</option>
+  <option value="dashed"  >Dashed</option>
+  <option value="double"  >Double</option>
+  <option value="groove"  >Groove</option>
+  <option value="ridge"   >Ridge</option>
+  <option value="inset"   >Inset</option>
+  <option value="outset"  >outset</option>
+</select>
+<input type="text" size="7" id="[border_color]" name="[border_color]"/>
+<br /><l10n>Collapse borders:</l10n> 
+<input type="checkbox" name="[border_collapse]" id="[border_collapse]" value="on" />
+
+<div class="space"></div>
+
+</fieldset>
+
+<fieldset  id="[spacing_fieldset]">
+<legend><l10n>Spacing</l10n></legend>
+
+<div class="space"></div>
+
+<div class="fr"><l10n>Cell spacing:</l10n></div>
+<input type="text" name="[spacing]" id="[spacing]" size="5" title="_(Space between adjacent cells)" />
+
+<br />
+
+<div class="fr"><l10n>Cell padding:</l10n></div>
+<input type="text" name="[padding]" id="[padding]" size="5" title="_(Space between content and border in cell)" />
+
+
+</fieldset>
+  <div class="buttons" style="clear:left">
+  <input type="button" id="[ok]"     value="_(OK)"     />
+  <input type="button" id="[cancel]" value="_(Cancel)" />
+  </div>
+</form>

Added: roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertTable/insert_table.html
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertTable/insert_table.html?rev=1612622&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertTable/insert_table.html (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertTable/insert_table.html Tue Jul 22 17:35:00 2014
@@ -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="selected"  >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" value="on" /></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="selected"         >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>

Added: roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertTable/insert_table.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertTable/insert_table.js?rev=1612622&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertTable/insert_table.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertTable/insert_table.js Tue Jul 22 17:35:00 2014
@@ -0,0 +1,57 @@
+/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
+/* The URL of the most recent version of this file is http://svn.xinha.org/trunk/modules/InsertTable/insert_table.js */
+InsertTable._pluginInfo={name:"InsertTable",origin:"Xinha Core",version:"$LastChangedRevision: 1085 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.org/tags/0.96.1/modules/InsertTable/insert_table.js $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"};
+function InsertTable(_1){
+this.editor=_1;
+var _2=_1.config;
+var _3=this;
+_1.config.btnList.inserttable[3]=function(){
+_3.show();
+};
+};
+InsertTable.prototype._lc=function(_4){
+return Xinha._lc(_4,"Xinha");
+};
+InsertTable.prototype.onGenerateOnce=function(){
+InsertTable.loadAssets();
+};
+InsertTable.loadAssets=function(){
+var _5=InsertTable;
+if(_5.loading){
+return;
+}
+_5.loading=true;
+Xinha._getback(_editor_url+"modules/InsertTable/dialog.html",function(_6){
+_5.html=_6;
+_5.dialogReady=true;
+});
+Xinha._getback(_editor_url+"modules/InsertTable/pluginMethods.js",function(_7){
+eval(_7);
+_5.methodsReady=true;
+});
+};
+InsertTable.prototype.onUpdateToolbar=function(){
+if(!(InsertTable.dialogReady&&InsertTable.methodsReady)){
+this.editor._toolbarObjects.inserttable.state("enabled",false);
+}else{
+this.onUpdateToolbar=null;
+}
+};
+InsertTable.prototype.prepareDialog=function(){
+var _8=this;
+var _9=this.editor;
+var _a=this.dialog=new Xinha.Dialog(_9,InsertTable.html,"Xinha",{width:400});
+_a.getElementById("ok").onclick=function(){
+_8.apply();
+};
+_a.getElementById("cancel").onclick=function(){
+_8.dialog.hide();
+};
+this.borderColorPicker=new Xinha.colorPicker.InputBinding(_a.getElementById("border_color"));
+this.dialog.onresize=function(){
+this.getElementById("layout_fieldset").style.width=(this.width/2)+50+"px";
+this.getElementById("spacing_fieldset").style.width=(this.width/2)-120+"px";
+};
+this.dialogReady=true;
+};
+

Added: roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertTable/pluginMethods.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertTable/pluginMethods.js?rev=1612622&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertTable/pluginMethods.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InsertTable/pluginMethods.js Tue Jul 22 17:35:00 2014
@@ -0,0 +1,81 @@
+/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
+/* The URL of the most recent version of this file is http://svn.xinha.org/trunk/modules/InsertTable/pluginMethods.js */
+InsertTable.prototype.show=function(_1){
+if(!this.dialog){
+this.prepareDialog();
+}
+var _2=this.editor;
+var _3={"caption":"","rows":"2","cols":"4","width":"100","unit":"%","fixed":"","align":"","border":"1","border_style":"dotted","border_color":"#000000","border_collapse":"on","spacing":"","padding":"5"};
+this.borderColorPicker.setColor("#000000");
+this.dialog.show(_3);
+this.dialog.onresize();
+};
+InsertTable.prototype.apply=function(){
+var _4=this.editor;
+var _5=_4._doc;
+var _6=this.dialog.getValues();
+if(!_6.rows||!_6.cols){
+if(!_6.rows){
+this.dialog.getElementById("rows_alert").style.display="";
+}
+if(!_6.cols){
+this.dialog.getElementById("columns_alert").style.display="";
+}
+return;
+}
+this.dialog.hide();
+var _7=_5.createElement("table");
+for(var _8 in _6){
+var _9=_6[_8];
+if(!_9){
+continue;
+}
+switch(_8){
+case "width":
+_7.style.width=_9+_6.unit.value;
+break;
+case "align":
+_7.align=_9.value;
+break;
+case "border":
+_7.style.border=_9+"px "+_6.border_style.value+" "+_6.border_color;
+break;
+case "border_collapse":
+_7.style.borderCollapse=(_9=="on")?"collapse":"";
+break;
+case "spacing":
+_7.cellSpacing=parseInt(_9,10);
+break;
+case "padding":
+_7.cellPadding=parseInt(_9,10);
+break;
+}
+}
+if(_6.caption){
+var _a=_7.createCaption();
+_a.appendChild(_5.createTextNode(_6.caption));
+}
+var _b=0;
+if(_6.fixed){
+_b=Math.floor(100/parseInt(_6.cols,10));
+}
+var _c=_5.createElement("tbody");
+_7.appendChild(_c);
+for(var i=0;i<_6.rows;++i){
+var tr=_5.createElement("tr");
+_c.appendChild(tr);
+for(var j=0;j<_6.cols;++j){
+var td=_5.createElement("td");
+if(_b&&i===0){
+td.style.width=_b+"%";
+}
+if(_6.border){
+td.style.border=_6.border+"px "+_6.border_style.value+" "+_6.border_color;
+}
+tr.appendChild(td);
+td.appendChild(_5.createTextNode(" "));
+}
+}
+_4.insertNodeAtSelection(_7);
+};
+

Added: roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InternetExplorer/InternetExplorer.js
URL: http://svn.apache.org/viewvc/roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InternetExplorer/InternetExplorer.js?rev=1612622&view=auto
==============================================================================
--- roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InternetExplorer/InternetExplorer.js (added)
+++ roller/trunk/app/src/main/webapp/roller-ui/authoring/editors/xinha-0.96.1/modules/InternetExplorer/InternetExplorer.js Tue Jul 22 17:35:00 2014
@@ -0,0 +1,477 @@
+/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */
+/* The URL of the most recent version of this file is http://svn.xinha.org/trunk/modules/InternetExplorer/InternetExplorer.js */
+InternetExplorer._pluginInfo={name:"Internet Explorer",origin:"Xinha Core",version:"$LastChangedRevision: 1260 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.org/tags/0.96.1/modules/InternetExplorer/InternetExplorer.js $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$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;
+case 9:
+Xinha._stopEvent(ev);
+return true;
+}
+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(/(<script|<!--)/i,"&nbsp;$1");
+_9=_9.replace(/<span[^>]+id="__InsertSpan_Workaround_[a-z]+".*?>([\s\S]*?)<\/span>/i,"$1");
+return _9;
+};
+InternetExplorer.prototype.outwardHtml=function(_a){
+_a=_a.replace(/&nbsp;(\s*)(<script|<!--)/i,"$1$2");
+_a=_a.replace(/<span[^>]+id="__InsertSpan_Workaround_[a-z]+".*?>([\s\S]*?)<\/span>/i,"$1");
+return _a;
+};
+InternetExplorer.prototype.onExecCommand=function(_b,UI,_d){
+switch(_b){
+case "saveas":
+var _e=null;
+var _f=this.editor;
+var _10=document.createElement("iframe");
+_10.src="about:blank";
+_10.style.display="none";
+document.body.appendChild(_10);
+try{
+if(_10.contentDocument){
+_e=_10.contentDocument;
+}else{
+_e=_10.contentWindow.document;
+}
+}
+catch(ex){
+}
+_e.open("text/html","replace");
+var _11="";
+if(_f.config.browserQuirksMode===false){
+var _12="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">";
+}else{
+if(_f.config.browserQuirksMode===true){
+var _12="";
+}else{
+var _12=Xinha.getDoctype(document);
+}
+}
+if(!_f.config.fullPage){
+_11+=_12+"\n";
+_11+="<html>\n";
+_11+="<head>\n";
+_11+="<meta http-equiv=\"Content-Type\" content=\"text/html; charset="+_f.config.charSet+"\">\n";
+if(typeof _f.config.baseHref!="undefined"&&_f.config.baseHref!==null){
+_11+="<base href=\""+_f.config.baseHref+"\"/>\n";
+}
+if(typeof _f.config.pageStyleSheets!=="undefined"){
+for(var i=0;i<_f.config.pageStyleSheets.length;i++){
+if(_f.config.pageStyleSheets[i].length>0){
+_11+="<link rel=\"stylesheet\" type=\"text/css\" href=\""+_f.config.pageStyleSheets[i]+"\">";
+}
+}
+}
+if(_f.config.pageStyle){
+_11+="<style type=\"text/css\">\n"+_f.config.pageStyle+"\n</style>";
+}
+_11+="</head>\n";
+_11+="<body>\n";
+_11+=_f.getEditorContent();
+_11+="</body>\n";
+_11+="</html>";
+}else{
+_11=_f.getEditorContent();
+if(_11.match(Xinha.RE_doctype)){
+_f.setDoctype(RegExp.$1);
+}
+}
+_e.write(_11);
+_e.close();
+_e.execCommand(_b,UI,_d);
+document.body.removeChild(_10);
+return true;
+break;
+case "removeformat":
+var _f=this.editor;
+var sel=_f.getSelection();
+var _15=_f.saveSelection(sel);
+var i,el,els;
+function clean(el){
+if(el.nodeType!=1){
+return;
+}
+el.removeAttribute("style");
+for(var j=0;j<el.childNodes.length;j++){
+clean(el.childNodes[j]);
+}
+if((el.tagName.toLowerCase()=="span"&&!el.attributes.length)||el.tagName.toLowerCase()=="font"){
+el.outerHTML=el.innerHTML;
+}
+};
+if(_f.selectionEmpty(sel)){
+els=_f._doc.body.childNodes;
+for(i=0;i<els.length;i++){
+el=els[i];
+if(el.nodeType!=1){
+continue;
+}
+if(el.tagName.toLowerCase()=="span"){
+newNode=_f.convertNode(el,"div");
+el.parentNode.replaceChild(newNode,el);
+el=newNode;
+}
+clean(el);
+}
+}
+_f._doc.execCommand(_b,UI,_d);
+_f.restoreSelection(_15);
+return true;
+break;
+}
+return false;
+};
+Xinha.prototype.insertNodeAtSelection=function(_1a){
+this.insertHTML(_1a.outerHTML);
+};
+Xinha.prototype.getParentElement=function(sel){
+if(typeof sel=="undefined"){
+sel=this.getSelection();
+}
+var _1c=this.createRange(sel);
+switch(sel.type){
+case "Text":
+var _1d=_1c.parentElement();
+while(true){
+var _1e=_1c.duplicate();
+_1e.moveToElementText(_1d);
+if(_1e.inRange(_1c)){
+break;
+}
+if((_1d.nodeType!=1)||(_1d.tagName.toLowerCase()=="body")){
+break;
+}
+_1d=_1d.parentElement;
+}
+return _1d;
+case "None":
+try{
+return _1c.parentElement();
+}
+catch(e){
+return this._doc.body;
+}
+case "Control":
+return _1c.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 _20=sel.createRange();
+var _21=this.getParentElement(sel);
+if(_21.innerHTML==_20.htmlText){
+return _21;
+}
+return null;
+}
+};
+Xinha.prototype.selectionEmpty=function(sel){
+if(!sel){
+return true;
+}
+return this.createRange(sel).htmlText==="";
+};
+Xinha.prototype.saveSelection=function(sel){
+return this.createRange(sel?sel:this.getSelection());
+};
+Xinha.prototype.restoreSelection=function(_24){
+if(!_24){
+return;
+}
+var _25=null;
+if(_24.parentElement){
+_25=_24.parentElement();
+}else{
+_25=_24.item(0);
+}
+var _26=this.createRange(this.getSelection());
+var _27=null;
+if(_26.parentElement){
+_27=_26.parentElement();
+}else{
+_27=_26.item(0);
+}
+var _28=function(el){
+for(var _2a=el;_2a;_2a=_2a.parentNode){
+if(_2a.tagName.toLowerCase()=="html"){
+return _2a.parentNode;
+}
+}
+return null;
+};
+if(_24.parentElement&&_28(_25)==_28(_27)){
+if(_26.isEqual(_24)){
+return;
+}
+}
+try{
+_24.select();
+}
+catch(e){
+}
+_26=this.createRange(this.getSelection());
+if(_26.parentElement){
+_27=_26.parentElement();
+}else{
+_27=_26.item(0);
+}
+if(_27!=_25){
+var _2b=this.config.selectWorkaround||"VisibleCue";
+switch(_2b){
+case "SimulateClick":
+case "InsertSpan":
+var _2c=_28(_25);
+var _2d=function(_2e){
+var _2f="";
+for(var _30=0;_30<26;++_30){
+_2f+=String.fromCharCode("a".charCodeAt(0)+_30);
+}
+var _31="";
+for(var _30=0;_30<_2e;++_30){
+_31+=_2f.substr(Math.floor(Math.random()*_2f.length+1),1);
+}
+return _31;
+};
+var _32=1;
+var _33="__InsertSpan_Workaround_"+_2d(_32);
+while(_2c.getElementById(_33)){
+_32+=1;
+_33="__InsertSpan_Workaround_"+_2d(_32);
+}
+_24.pasteHTML("<span id=\""+_33+"\"></span>");
+var _34=_2c.getElementById(_33);
+_24.moveToElementText(_34);
+_24.select();
+break;
+case "JustificationHack":
+var _35=String.fromCharCode(1);
+_24.pasteHTML(_35);
+_24.findText(_35,-1);
+_24.select();
+_24.execCommand("JustifyNone");
+_24.pasteHTML("");
+break;
+case "VisibleCue":
+default:
+var _35=String.fromCharCode(1);
+_24.pasteHTML(_35);
+_24.findText(_35,-1);
+_24.select();
+}
+}
+};
+Xinha.prototype.selectNodeContents=function(_36,_37){
+this.focusEditor();
+this.forceRedraw();
+var _38;
+var _39=typeof _37=="undefined"?true:false;
+if(_39&&_36.tagName&&_36.tagName.toLowerCase().match(/table|img|input|select|textarea/)){
+_38=this._doc.body.createControlRange();
+_38.add(_36);
+}else{
+_38=this._doc.body.createTextRange();
+if(3==_36.nodeType){
+if(_36.parentNode){
+_38.moveToElementText(_36.parentNode);
+}else{
+_38.moveToElementText(this._doc.body);
+}
+var _3a=this._doc.body.createTextRange();
+var _3b=0;
+var _3c=_36.previousSibling;
+for(;_3c&&(1!=_3c.nodeType);_3c=_3c.previousSibling){
+if(3==_3c.nodeType){
+_3b+=_3c.nodeValue.length-_3c.nodeValue.split("\r").length-1;
+}
+}
+if(_3c&&(1==_3c.nodeType)){
+_3a.moveToElementText(_3c);
+_38.setEndPoint("StartToEnd",_3a);
+}
+if(_3b){
+_38.moveStart("character",_3b);
+}
+_3b=0;
+_3c=_36.nextSibling;
+for(;_3c&&(1!=_3c.nodeType);_3c=_3c.nextSibling){
+if(3==_3c.nodeType){
+_3b+=_3c.nodeValue.length-_3c.nodeValue.split("\r").length-1;
+if(!_3c.nextSibling){
+_3b+=1;
+}
+}
+}
+if(_3c&&(1==_3c.nodeType)){
+_3a.moveToElementText(_3c);
+_38.setEndPoint("EndToStart",_3a);
+}
+if(_3b){
+_38.moveEnd("character",-_3b);
+}
+if(!_36.nextSibling){
+_38.moveEnd("character",-1);
+}
+}else{
+_38.moveToElementText(_36);
+}
+}
+if(typeof _37!="undefined"){
+_38.collapse(_37);
+if(!_37){
+_38.moveStart("character",-1);
+_38.moveEnd("character",-1);
+}
+}
+_38.select();
+};
+Xinha.prototype.insertHTML=function(_3d){
+this.focusEditor();
+var sel=this.getSelection();
+var _3f=this.createRange(sel);
+_3f.pasteHTML(_3d);
+};
+Xinha.prototype.getSelectedHTML=function(){
+var sel=this.getSelection();
+if(this.selectionEmpty(sel)){
+return "";
+}
+var _41=this.createRange(sel);
+if(_41.htmlText){
+return _41.htmlText;
+}else{
+if(_41.length>=1){
+return _41.item(0).outerHTML;
+}
+}
+return "";
+};
+Xinha.prototype.getSelection=function(){
+return this._doc.selection;
+};
+Xinha.prototype.createRange=function(sel){
+if(!sel){
+sel=this.getSelection();
+}
+return sel.createRange();
+};
+Xinha.prototype.isKeyEvent=function(_43){
+return _43.type=="keydown";
+};
+Xinha.prototype.getKey=function(_44){
+return String.fromCharCode(_44.keyCode);
+};
+Xinha.getOuterHTML=function(_45){
+return _45.outerHTML;
+};
+Xinha.cc=String.fromCharCode(8201);
+Xinha.prototype.setCC=function(_46){
+var cc=Xinha.cc;
+if(_46=="textarea"){
+var ta=this._textArea;
+var pos=document.selection.createRange();
+pos.collapse();
+pos.text=cc;
+var _4a=ta.value.indexOf(cc);
+var _4b=ta.value.substring(0,_4a);
+var _4c=ta.value.substring(_4a+cc.length,ta.value.length);
+if(_4c.match(/^[^<]*>/)){
+var _4d=_4c.indexOf(">")+1;
+ta.value=_4b+_4c.substring(0,_4d)+cc+_4c.substring(_4d,_4c.length);
+}else{
+ta.value=_4b+cc+_4c;
+}
+ta.value=ta.value.replace(new RegExp("(&[^"+cc+"]*?)("+cc+")([^"+cc+"]*?;)"),"$1$3$2");
+ta.value=ta.value.replace(new RegExp("(<script[^>]*>[^"+cc+"]*?)("+cc+")([^"+cc+"]*?</script>)"),"$1$3$2");
+ta.value=ta.value.replace(new RegExp("^([^"+cc+"]*)("+cc+")([^"+cc+"]*<body[^>]*>)(.*?)"),"$1$3$2$4");
+}else{
+var sel=this.getSelection();
+var r=sel.createRange();
+if(sel.type=="Control"){
+var _50=r.item(0);
+_50.outerHTML+=cc;
+}else{
+r.collapse();
+r.text=cc;
+}
+}
+};
+Xinha.prototype.findCC=function(_51){
+var _52=(_51=="textarea")?this._textArea:this._doc.body;
+range=_52.createTextRange();
+if(range.findText(escape(Xinha.cc))){
+range.select();
+range.text="";
+range.select();
+}
+if(range.findText(Xinha.cc)){
+range.select();
+range.text="";
+range.select();
+}
+if(_51=="textarea"){
+this._textArea.focus();
+}
+};
+Xinha.getDoctype=function(doc){
+return (doc.compatMode=="CSS1Compat"&&Xinha.ie_version<8)?"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">":"";
+};
+



Mime
View raw message