svn commit: r578051 [29/31] - in /lenya/branches/revolution/1.3.x/src: java/org/apache/lenya/cms/content/flat/ webapp/lenya/modules/xinha/ webapp/lenya/modules/xinha/contrib/ webapp/lenya/modules/xinha/examples/ webapp/lenya/modules/xinha/images/ webap...

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/TableOperations/table-operations.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/TableOperations/table-operations.js?rev=578051&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/TableOperations/table-operations.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/TableOperations/table-operations.js Fri Sep 21 03:36:30 2007
@@ -0,0 +1,893 @@
+function TableOperations(_1){
+this.editor=_1;
+var _2=_1.config;
+var bl=TableOperations.btnList;
+var _4=this;
+_2.removeToolbarElement(" inserttable toggleborders ");
+var _5=["linebreak","inserttable","toggleborders"];
+for(var i=0;i<bl.length;++i){
+var _7=bl[i];
+if(!_7){
+_5.push("separator");
+}else{
+var id="TO-"+_7[0];
+_2.registerButton(id,HTMLArea._lc(_7[2],"TableOperations"),_1.imgURL(_7[0]+".gif","TableOperations"),false,function(_9,id){
+_4.buttonPress(_9,id);
+},_7[1]);
+_5.push(id);
+}
+}
+_2.toolbar.push(_5);
+if(typeof PopupWin=="undefined"){
+Xinha._loadback(_editor_url+"modules/Dialogs/popupwin.js");
+}
+}
+TableOperations._pluginInfo={name:"TableOperations",version:"1.0",developer:"Mihai Bazon",developer_url:"http://dynarch.com/mishoo/",c_owner:"Mihai Bazon",sponsor:"Zapatec Inc.",sponsor_url:"http://www.bloki.com",license:"htmlArea"};
+TableOperations.prototype._lc=function(_b){
+return HTMLArea._lc(_b,"TableOperations");
+};
+TableOperations.prototype.getClosest=function(_c){
+var _d=this.editor;
+var _e=_d.getAllAncestors();
+var _f=null;
+_c=(""+_c).toLowerCase();
+for(var i=0;i<_e.length;++i){
+var el=_e[i];
+if(el.tagName.toLowerCase()==_c){
+_f=el;
+break;
+}
+}
+return _f;
+};
+TableOperations.prototype.dialogTableProperties=function(){
+var _12=this.getClosest("table");
+var _13=new PopupWin(this.editor,HTMLArea._lc("Table Properties","TableOperations"),function(_14,_15){
+TableOperations.processStyle(_15,_12);
+for(var i in _15){
+if(typeof _15[i]=="function"){
+continue;
+}
+var val=_15[i];
+switch(i){
+case "f_caption":
+if(/\S/.test(val)){
+var _18=_12.getElementsByTagName("caption")[0];
+if(!_18){
+_18=_14.editor._doc.createElement("caption");
+_12.insertBefore(_18,_12.firstChild);
+}
+_18.innerHTML=val;
+}else{
+var _18=_12.getElementsByTagName("caption")[0];
+if(_18){
+_18.parentNode.removeChild(_18);
+}
+}
+break;
+case "f_summary":
+_12.summary=val;
+break;
+case "f_width":
+_12.style.width=(""+val)+_15.f_unit;
+break;
+case "f_align":
+_12.align=val;
+break;
+case "f_spacing":
+_12.cellSpacing=val;
+break;
+case "f_padding":
+_12.cellPadding=val;
+break;
+case "f_borders":
+_12.border=val;
+break;
+case "f_frames":
+_12.frame=val;
+break;
+case "f_rules":
+_12.rules=val;
+break;
+}
+}
+_14.editor.forceRedraw();
+_14.editor.focusEditor();
+_14.editor.updateToolbar();
+var _19=_12.style.borderCollapse;
+_12.style.borderCollapse="collapse";
+_12.style.borderCollapse="separate";
+_12.style.borderCollapse=_19;
+},function(_1a){
+var _1b="";
+var _1c=_12.getElementsByTagName("caption")[0];
+if(_1c){
+_1b=_1c.innerHTML;
+}
+var _1d=_12.summary;
+var _1e=parseInt(_12.style.width);
+isNaN(_1e)&&(_1e="");
+var _1f=/%/.test(_12.style.width)?"percent":"pixels";
+var _20=_12.align;
+var _21=_12.cellSpacing;
+var _22=_12.cellPadding;
+var _23=_12.border;
+var _24=_12.frame;
+var _25=_12.rules;
+function selected(val){
+return val?" selected":"";
+}
+_1a.content.style.width="400px";
+_1a.content.innerHTML=" <div class='title'>"+HTMLArea._lc("Table Properties","TableOperations")+"</div> <table style='width:100%'>   <tr>     <td>       <fieldset><legend>"+HTMLArea._lc("Description","TableOperations")+"</legend>        <table style='width:100%'>         <tr>           <td class='label'>"+HTMLArea._lc("Caption","TableOperations")+":</td>           <td class='value'><input type='text' name='f_caption' value='"+_1b+"'/></td>         </tr><tr>           <td class='label'>"+HTMLArea._lc("Summary","TableOperations")+":</td>           <td class='value'><input type='text' name='f_summary' value='"+_1d+"'/></td>         </tr>        </table>       </fieldset>     </td>   </tr>   <tr><td id='--HA-layout'></td></tr>   <tr>     <td>       <fieldset><legend>"+HTMLArea._lc("Spacing an
 d padding","TableOperations")+"</legend>        <table style='width:100%'> "+"        <tr>           <td class='label'>"+HTMLArea._lc("Spacing","TableOperations")+":</td>           <td><inpu
 t type='text' name='f_spacing' size='5' value='"+_21+"' /> &nbsp;"+HTMLArea._lc("Padding","TableOperations")+":            <input type='text' name='f_padding' size='5' value='"+_22+"' /> &nbsp;&nbsp;"+HTMLArea._lc("pixels","TableOperations")+"          </td>         </tr>        </table>       </fieldset>     </td>   </tr>   <tr>     <td>       <fieldset><legend>"+HTMLArea._lc("Frame and borders","TableOperations")+"</legend>         <table width='100%'>           <tr>             <td class='label'>"+HTMLArea._lc("Borders","TableOperations")+":</td>             <td><input name='f_borders' type='text' size='5' value='"+_23+"' /> &nbsp;&nbsp;"+HTMLArea._lc("pixels","TableOperations")+"</td>           </tr>           <tr>             <td class='label'>"+HTMLArea._lc("Frames","TableOperations
 ")+":</td>             <td>               <select name='f_frames'>                 <option value='void'"+selected(_24=="void")+">"+HTMLArea._lc("No sides","TableOperations")+"</option>      
            <option value='above'"+selected(_24=="above")+">"+HTMLArea._lc("The top side only","TableOperations")+"</option>                 <option value='below'"+selected(_24=="below")+">"+HTMLArea._lc("The bottom side only","TableOperations")+"</option>                 <option value='hsides'"+selected(_24=="hsides")+">"+HTMLArea._lc("The top and bottom sides only","TableOperations")+"</option>                 <option value='vsides'"+selected(_24=="vsides")+">"+HTMLArea._lc("The right and left sides only","TableOperations")+"</option>                 <option value='lhs'"+selected(_24=="lhs")+">"+HTMLArea._lc("The left-hand side only","TableOperations")+"</option>                 <option value='rhs'"+selected(_24=="rhs")+">"+HTMLArea._lc("The right-hand side only","TableOperations")+"</op
 tion>                 <option value='box'"+selected(_24=="box")+">"+HTMLArea._lc("All four sides","TableOperations")+"</option>               </select>             </td>           </tr>     
       <tr>             <td class='label'>"+HTMLArea._lc("Rules","TableOperations")+":</td>             <td>               <select name='f_rules'>                 <option value='none'"+selected(_25=="none")+">"+HTMLArea._lc("No rules","TableOperations")+"</option>                 <option value='rows'"+selected(_25=="rows")+">"+HTMLArea._lc("Rules will appear between rows only","TableOperations")+"</option>                 <option value='cols'"+selected(_25=="cols")+">"+HTMLArea._lc("Rules will appear between columns only","TableOperations")+"</option>                 <option value='all'"+selected(_25=="all")+">"+HTMLArea._lc("Rules will appear between all rows and columns","TableOperations")+"</option>               </select>             </td>           </tr>         </table>       </field
 set>     </td>   </tr>   <tr>     <td id='--HA-style'></td>   </tr> </table> ";
+var _27=TableOperations.createStyleFieldset(_1a.doc,_1a.editor,_12);
+var p=_1a.doc.getElementById("--HA-style");
+p.appendChild(_27);
+var _29=TableOperations.createStyleLayoutFieldset(_1a.doc,_1a.editor,_12);
+p=_1a.doc.getElementById("--HA-layout");
+p.appendChild(_29);
+_1a.modal=true;
+_1a.addButtons("OK","Cancel");
+_1a.showAtElement(_1a.editor._iframe,"c");
+});
+};
+TableOperations.prototype.dialogRowCellProperties=function(_2a){
+var _2b=this.getClosest(_2a?"td":"tr");
+var _2c=this.getClosest("table");
+var _2d=new PopupWin(this.editor,_2a?HTMLArea._lc("Cell Properties","TableOperations"):HTMLArea._lc("Row Properties","TableOperations"),function(_2e,_2f){
+TableOperations.processStyle(_2f,_2b);
+for(var i in _2f){
+if(typeof _2f[i]=="function"){
+continue;
+}
+var val=_2f[i];
+switch(i){
+case "f_align":
+_2b.align=val;
+break;
+case "f_char":
+_2b.ch=val;
+break;
+case "f_valign":
+_2b.vAlign=val;
+break;
+}
+}
+_2e.editor.forceRedraw();
+_2e.editor.focusEditor();
+_2e.editor.updateToolbar();
+var _32=_2c.style.borderCollapse;
+_2c.style.borderCollapse="collapse";
+_2c.style.borderCollapse="separate";
+_2c.style.borderCollapse=_32;
+},function(_33){
+var _34=_2b.align;
+var _35=_2b.vAlign;
+var _36=_2b.ch;
+function selected(val){
+return val?" selected":"";
+}
+_33.content.style.width="400px";
+_33.content.innerHTML=" <div class='title'>"+HTMLArea._lc(_2a?"Cell Properties":"Row Properties","TableOperations")+"</div> <table style='width:100%'>   <tr>     <td id='--HA-layout'> "+"    </td>   </tr>   <tr>     <td id='--HA-style'></td>   </tr> </table> ";
+var _38=TableOperations.createStyleFieldset(_33.doc,_33.editor,_2b);
+var p=_33.doc.getElementById("--HA-style");
+p.appendChild(_38);
+var _3a=TableOperations.createStyleLayoutFieldset(_33.doc,_33.editor,_2b);
+p=_33.doc.getElementById("--HA-layout");
+p.appendChild(_3a);
+_33.modal=true;
+_33.addButtons("OK","Cancel");
+_33.showAtElement(_33.editor._iframe,"c");
+});
+};
+TableOperations.prototype.buttonPress=function(_3b,_3c){
+this.editor=_3b;
+var _3d=HTMLArea.is_gecko?"<br />":"";
+function clearRow(tr){
+var tds=tr.getElementsByTagName("td");
+for(var i=tds.length;--i>=0;){
+var td=tds[i];
+td.rowSpan=1;
+td.innerHTML=_3d;
+}
+}
+function splitRow(td){
+var n=parseInt(""+td.rowSpan);
+var nc=parseInt(""+td.colSpan);
+td.rowSpan=1;
+tr=td.parentNode;
+var itr=tr.rowIndex;
+var trs=tr.parentNode.rows;
+var _47=td.cellIndex;
+while(--n>0){
+tr=trs[++itr];
+var otd=_3b._doc.createElement("td");
+otd.colSpan=td.colSpan;
+otd.innerHTML=_3d;
+tr.insertBefore(otd,tr.cells[_47]);
+}
+_3b.forceRedraw();
+_3b.updateToolbar();
+}
+function splitCol(td){
+var nc=parseInt(""+td.colSpan);
+td.colSpan=1;
+tr=td.parentNode;
+var ref=td.nextSibling;
+while(--nc>0){
+var otd=_3b._doc.createElement("td");
+otd.rowSpan=td.rowSpan;
+otd.innerHTML=_3d;
+tr.insertBefore(otd,ref);
+}
+_3b.forceRedraw();
+_3b.updateToolbar();
+}
+function splitCell(td){
+var nc=parseInt(""+td.colSpan);
+splitCol(td);
+var _4f=td.parentNode.cells;
+var _50=td.cellIndex;
+while(nc-->0){
+splitRow(_4f[_50++]);
+}
+}
+function selectNextNode(el){
+var _52=el.nextSibling;
+while(_52&&_52.nodeType!=1){
+_52=_52.nextSibling;
+}
+if(!_52){
+_52=el.previousSibling;
+while(_52&&_52.nodeType!=1){
+_52=_52.previousSibling;
+}
+}
+if(!_52){
+_52=el.parentNode;
+}
+_3b.selectNodeContents(_52);
+}
+function cellMerge(_53,_54,_55,_56,_57){
+var _58=[];
+var _59=[];
+try{
+for(i=_55;i<_55+_57;i++){
+var row=_53.rows[i];
+for(j=_54;j<_54+_56;j++){
+if(row.cells[j].colSpan>1||row.cells[j].rowSpan>1){
+splitCell(row.cells[j]);
+}
+_59.push(row.cells[j]);
+}
+if(_59.length>0){
+_58.push(_59);
+_59=[];
+}
+}
+}
+catch(e){
+alert("Invalid selection");
+return false;
+}
+var _5b=_58[0][0].parentNode.rowIndex;
+var _5c=_58[_58.length-1][0].parentNode.rowIndex;
+var _5d=_58[_58.length-1][0].rowSpan;
+var _5e="";
+for(i=0;i<_58.length;++i){
+var _59=_58[i];
+for(var j=0;j<_59.length;++j){
+var _60=_59[j];
+_5e+=_60.innerHTML;
+(i||j)&&(_60.parentNode.removeChild(_60));
+}
+}
+var td=_58[0][0];
+td.innerHTML=_5e;
+td.rowSpan=_5c-_5b+_5d;
+var _62=0;
+for(j=0;j<_58[0].length;j++){
+_62+=_58[0][j].colSpan;
+}
+td.colSpan=_62;
+_3b.selectNodeContents(td);
+_3b.forceRedraw();
+_3b.focusEditor();
+}
+switch(_3c){
+case "TO-row-insert-above":
+case "TO-row-insert-under":
+var tr=this.getClosest("tr");
+if(!tr){
+break;
+}
+var otr=tr.cloneNode(true);
+clearRow(otr);
+tr.parentNode.insertBefore(otr,/under/.test(_3c)?tr.nextSibling:tr);
+_3b.forceRedraw();
+_3b.focusEditor();
+break;
+case "TO-row-delete":
+var tr=this.getClosest("tr");
+if(!tr){
+break;
+}
+var par=tr.parentNode;
+if(par.rows.length==1){
+alert(HTMLArea._lc("HTMLArea cowardly refuses to delete the last row in table.","TableOperations"));
+break;
+}
+selectNextNode(tr);
+par.removeChild(tr);
+_3b.forceRedraw();
+_3b.focusEditor();
+_3b.updateToolbar();
+break;
+case "TO-row-split":
+var td=this.getClosest("td");
+if(!td){
+break;
+}
+splitRow(td);
+break;
+case "TO-col-insert-before":
+case "TO-col-insert-after":
+var td=this.getClosest("td");
+if(!td){
+break;
+}
+var _67=td.parentNode.parentNode.rows;
+var _68=td.cellIndex;
+var _69=(td.parentNode.cells.length==_68+1);
+for(var i=_67.length;--i>=0;){
+var tr=_67[i];
+var otd=_3b._doc.createElement("td");
+otd.innerHTML=_3d;
+if(_69&&HTMLArea.is_ie){
+tr.insertBefore(otd);
+}else{
+var ref=tr.cells[_68+(/after/.test(_3c)?1:0)];
+tr.insertBefore(otd,ref);
+}
+}
+_3b.focusEditor();
+break;
+case "TO-col-split":
+var td=this.getClosest("td");
+if(!td){
+break;
+}
+splitCol(td);
+break;
+case "TO-col-delete":
+var td=this.getClosest("td");
+if(!td){
+break;
+}
+var _68=td.cellIndex;
+if(td.parentNode.cells.length==1){
+alert(HTMLArea._lc("HTMLArea cowardly refuses to delete the last column in table.","TableOperations"));
+break;
+}
+selectNextNode(td);
+var _67=td.parentNode.parentNode.rows;
+for(var i=_67.length;--i>=0;){
+var tr=_67[i];
+tr.removeChild(tr.cells[_68]);
+}
+_3b.forceRedraw();
+_3b.focusEditor();
+_3b.updateToolbar();
+break;
+case "TO-cell-split":
+var td=this.getClosest("td");
+if(!td){
+break;
+}
+splitCell(td);
+break;
+case "TO-cell-insert-before":
+case "TO-cell-insert-after":
+var td=this.getClosest("td");
+if(!td){
+break;
+}
+var tr=td.parentNode;
+var otd=_3b._doc.createElement("td");
+otd.innerHTML=_3d;
+tr.insertBefore(otd,/after/.test(_3c)?td.nextSibling:td);
+_3b.forceRedraw();
+_3b.focusEditor();
+break;
+case "TO-cell-delete":
+var td=this.getClosest("td");
+if(!td){
+break;
+}
+if(td.parentNode.cells.length==1){
+alert(HTMLArea._lc("HTMLArea cowardly refuses to delete the last cell in row.","TableOperations"));
+break;
+}
+selectNextNode(td);
+td.parentNode.removeChild(td);
+_3b.forceRedraw();
+_3b.updateToolbar();
+break;
+case "TO-cell-merge":
+var sel=_3b._getSelection();
+if(!HTMLArea.is_ie&&sel.rangeCount>1){
+var _6e=sel.getRangeAt(0);
+var td=_6e.startContainer.childNodes[_6e.startOffset];
+var tr=td.parentNode;
+var _6f=td.cellIndex;
+var _70=tr.rowIndex;
+var _71=0;
+var _72=_70;
+var _73=0;
+var _74=0;
+var td2,tr2;
+for(i=0;i<sel.rangeCount;i++){
+_6e=sel.getRangeAt(i);
+td2=_6e.startContainer.childNodes[_6e.startOffset];
+tr2=td2.parentNode;
+if(tr2.rowIndex!=_72){
+_72=tr2.rowIndex;
+_74=0;
+}
+_74+=td2.colSpan;
+if(_74>_73){
+_73=_74;
+}
+if(tr2.rowIndex+td2.rowSpan-1>_71){
+_71=tr2.rowIndex+td2.rowSpan-1;
+}
+}
+var _76=_71-_70+1;
+var _77=tr.parentNode;
+cellMerge(_77,_6f,_70,_73,_76);
+}else{
+var td=this.getClosest("td");
+if(!td){
+alert(HTMLArea._lc("Please click into some cell","TableOperations"));
+break;
+}
+_3b._popupDialog("plugin://TableOperations/merge_cells.html",function(_78){
+if(!_78){
+return false;
+}
+_73=parseInt(_78["f_cols"],10)+1;
+_76=parseInt(_78["f_rows"],10)+1;
+var tr=td.parentNode;
+var _7a=td.cellIndex;
+var _7b=tr.rowIndex;
+var _7c=tr.parentNode;
+cellMerge(_7c,_7a,_7b,_73,_76);
+},null);
+}
+break;
+case "TO-table-prop":
+this.dialogTableProperties();
+break;
+case "TO-row-prop":
+this.dialogRowCellProperties(false);
+break;
+case "TO-cell-prop":
+this.dialogRowCellProperties(true);
+break;
+default:
+alert("Button ["+_3c+"] not yet implemented");
+}
+};
+TableOperations.btnList=[["table-prop","table","Table properties"],null,["row-prop","tr","Row properties"],["row-insert-above","tr","Insert row before"],["row-insert-under","tr","Insert row after"],["row-delete","tr","Delete row"],["row-split","td[rowSpan!=1]","Split row"],null,["col-insert-before","td","Insert column before"],["col-insert-after","td","Insert column after"],["col-delete","td","Delete column"],["col-split","td[colSpan!=1]","Split column"],null,["cell-prop","td","Cell properties"],["cell-insert-before","td","Insert cell before"],["cell-insert-after","td","Insert cell after"],["cell-delete","td","Delete cell"],["cell-merge","tr","Merge cells"],["cell-split","td[colSpan!=1,rowSpan!=1]","Split cell"]];
+TableOperations.getLength=function(_7d){
+var len=parseInt(_7d);
+if(isNaN(len)){
+len="";
+}
+return len;
+};
+TableOperations.processStyle=function(_7f,_80){
+var _81=_80.style;
+for(var i in _7f){
+if(typeof _7f[i]=="function"){
+continue;
+}
+var val=_7f[i];
+switch(i){
+case "f_st_backgroundColor":
+_81.backgroundColor=val;
+break;
+case "f_st_color":
+_81.color=val;
+break;
+case "f_st_backgroundImage":
+if(/\S/.test(val)){
+_81.backgroundImage="url("+val+")";
+}else{
+_81.backgroundImage="none";
+}
+break;
+case "f_st_borderWidth":
+_81.borderWidth=val;
+break;
+case "f_st_borderStyle":
+_81.borderStyle=val;
+break;
+case "f_st_borderColor":
+_81.borderColor=val;
+break;
+case "f_st_borderCollapse":
+_81.borderCollapse=val?"collapse":"";
+break;
+case "f_st_width":
+if(/\S/.test(val)){
+_81.width=val+_7f["f_st_widthUnit"];
+}else{
+_81.width="";
+}
+break;
+case "f_st_height":
+if(/\S/.test(val)){
+_81.height=val+_7f["f_st_heightUnit"];
+}else{
+_81.height="";
+}
+break;
+case "f_st_textAlign":
+if(val=="char"){
+var ch=_7f["f_st_textAlignChar"];
+if(ch=="\""){
+ch="\\\"";
+}
+_81.textAlign="\""+ch+"\"";
+}else{
+if(val=="-"){
+_81.textAlign="";
+}else{
+_81.textAlign=val;
+}
+}
+break;
+case "f_st_verticalAlign":
+_80.vAlign="";
+if(val=="-"){
+_81.verticalAlign="";
+}else{
+_81.verticalAlign=val;
+}
+break;
+case "f_st_float":
+_81.cssFloat=val;
+break;
+}
+}
+};
+TableOperations.createColorButton=function(doc,_86,_87,_88){
+if(!_87){
+_87="";
+}else{
+if(!/#/.test(_87)){
+_87=HTMLArea._colorToRgb(_87);
+}
+}
+var df=doc.createElement("span");
+var _8a=doc.createElement("input");
+_8a.type="hidden";
+df.appendChild(_8a);
+_8a.name="f_st_"+_88;
+_8a.value=_87;
+var _8b=doc.createElement("span");
+_8b.className="buttonColor";
+df.appendChild(_8b);
+var _8c=doc.createElement("span");
+_8c.className="chooser";
+_8c.style.backgroundColor=_87;
+_8b.appendChild(_8c);
+_8b.onmouseover=function(){
+if(!this.disabled){
+this.className+=" buttonColor-hilite";
+}
+};
+_8b.onmouseout=function(){
+if(!this.disabled){
+this.className="buttonColor";
+}
+};
+_8c.onclick=function(){
+if(this.parentNode.disabled){
+return false;
+}
+_86._popupDialog("select_color.html",function(_8d){
+if(_8d){
+_8c.style.backgroundColor="#"+_8d;
+_8a.value="#"+_8d;
+}
+},_87);
+};
+var _8e=doc.createElement("span");
+_8e.innerHTML="&#x00d7;";
+_8e.className="nocolor";
+_8e.title=HTMLArea._lc("Unset color","TableOperations");
+_8b.appendChild(_8e);
+_8e.onmouseover=function(){
+if(!this.parentNode.disabled){
+this.className+=" nocolor-hilite";
+}
+};
+_8e.onmouseout=function(){
+if(!this.parentNode.disabled){
+this.className="nocolor";
+}
+};
+_8e.onclick=function(){
+_8c.style.backgroundColor="";
+_8a.value="";
+};
+return df;
+};
+TableOperations.createStyleLayoutFieldset=function(doc,_90,el){
+var _92=doc.createElement("fieldset");
+var _93=doc.createElement("legend");
+_92.appendChild(_93);
+_93.innerHTML=HTMLArea._lc("Layout","TableOperations");
+var _94=doc.createElement("table");
+_92.appendChild(_94);
+_94.style.width="100%";
+var _95=doc.createElement("tbody");
+_94.appendChild(_95);
+var _96=el.tagName.toLowerCase();
+var tr,td,input,select,option,options,i;
+if(_96!="td"&&_96!="tr"&&_96!="th"){
+tr=doc.createElement("tr");
+_95.appendChild(tr);
+td=doc.createElement("td");
+td.className="label";
+tr.appendChild(td);
+td.innerHTML=HTMLArea._lc("Float","TableOperations")+":";
+td=doc.createElement("td");
+tr.appendChild(td);
+select=doc.createElement("select");
+td.appendChild(select);
+select.name="f_st_float";
+options=["None","Left","Right"];
+for(var i=0;i<options.length;++i){
+var Val=options[i];
+var val=options[i].toLowerCase();
+option=doc.createElement("option");
+option.innerHTML=HTMLArea._lc(Val,"TableOperations");
+option.value=val;
+option.selected=((""+el.style.cssFloat).toLowerCase()==val);
+select.appendChild(option);
+}
+}
+tr=doc.createElement("tr");
+_95.appendChild(tr);
+td=doc.createElement("td");
+td.className="label";
+tr.appendChild(td);
+td.innerHTML=HTMLArea._lc("Width","TableOperations")+":";
+td=doc.createElement("td");
+tr.appendChild(td);
+input=doc.createElement("input");
+input.type="text";
+input.value=TableOperations.getLength(el.style.width);
+input.size="5";
+input.name="f_st_width";
+input.style.marginRight="0.5em";
+td.appendChild(input);
+select=doc.createElement("select");
+select.name="f_st_widthUnit";
+option=doc.createElement("option");
+option.innerHTML=HTMLArea._lc("percent","TableOperations");
+option.value="%";
+option.selected=/%/.test(el.style.width);
+select.appendChild(option);
+option=doc.createElement("option");
+option.innerHTML=HTMLArea._lc("pixels","TableOperations");
+option.value="px";
+option.selected=/px/.test(el.style.width);
+select.appendChild(option);
+td.appendChild(select);
+select.style.marginRight="0.5em";
+td.appendChild(doc.createTextNode(HTMLArea._lc("Text align","TableOperations")+":"));
+select=doc.createElement("select");
+select.style.marginLeft=select.style.marginRight="0.5em";
+td.appendChild(select);
+select.name="f_st_textAlign";
+options=["Left","Center","Right","Justify","-"];
+if(_96=="td"){
+options.push("Char");
+}
+input=doc.createElement("input");
+input.name="f_st_textAlignChar";
+input.size="1";
+input.style.fontFamily="monospace";
+td.appendChild(input);
+for(var i=0;i<options.length;++i){
+var Val=options[i];
+var val=Val.toLowerCase();
+option=doc.createElement("option");
+option.value=val;
+option.innerHTML=HTMLArea._lc(Val,"TableOperations");
+option.selected=((el.style.textAlign.toLowerCase()==val)||(el.style.textAlign==""&&Val=="-"));
+select.appendChild(option);
+}
+function setCharVisibility(_9b){
+input.style.visibility=_9b?"visible":"hidden";
+if(_9b){
+input.focus();
+input.select();
+}
+}
+select.onchange=function(){
+setCharVisibility(this.value=="char");
+};
+setCharVisibility(select.value=="char");
+tr=doc.createElement("tr");
+_95.appendChild(tr);
+td=doc.createElement("td");
+td.className="label";
+tr.appendChild(td);
+td.innerHTML=HTMLArea._lc("Height","TableOperations")+":";
+td=doc.createElement("td");
+tr.appendChild(td);
+input=doc.createElement("input");
+input.type="text";
+input.value=TableOperations.getLength(el.style.height);
+input.size="5";
+input.name="f_st_height";
+input.style.marginRight="0.5em";
+td.appendChild(input);
+select=doc.createElement("select");
+select.name="f_st_heightUnit";
+option=doc.createElement("option");
+option.innerHTML=HTMLArea._lc("percent","TableOperations");
+option.value="%";
+option.selected=/%/.test(el.style.height);
+select.appendChild(option);
+option=doc.createElement("option");
+option.innerHTML=HTMLArea._lc("pixels","TableOperations");
+option.value="px";
+option.selected=/px/.test(el.style.height);
+select.appendChild(option);
+td.appendChild(select);
+select.style.marginRight="0.5em";
+td.appendChild(doc.createTextNode(HTMLArea._lc("Vertical align","TableOperations")+":"));
+select=doc.createElement("select");
+select.name="f_st_verticalAlign";
+select.style.marginLeft="0.5em";
+td.appendChild(select);
+options=["Top","Middle","Bottom","Baseline","-"];
+for(var i=0;i<options.length;++i){
+var Val=options[i];
+var val=Val.toLowerCase();
+option=doc.createElement("option");
+option.value=val;
+option.innerHTML=HTMLArea._lc(Val,"TableOperations");
+option.selected=((el.style.verticalAlign.toLowerCase()==val)||(el.style.verticalAlign==""&&Val=="-"));
+select.appendChild(option);
+}
+return _92;
+};
+TableOperations.createStyleFieldset=function(doc,_9d,el){
+var _9f=doc.createElement("fieldset");
+var _a0=doc.createElement("legend");
+_9f.appendChild(_a0);
+_a0.innerHTML=HTMLArea._lc("CSS Style","TableOperations");
+var _a1=doc.createElement("table");
+_9f.appendChild(_a1);
+_a1.style.width="100%";
+var _a2=doc.createElement("tbody");
+_a1.appendChild(_a2);
+var tr,td,input,select,option,options,i;
+tr=doc.createElement("tr");
+_a2.appendChild(tr);
+td=doc.createElement("td");
+tr.appendChild(td);
+td.className="label";
+td.innerHTML=HTMLArea._lc("Background","TableOperations")+":";
+td=doc.createElement("td");
+tr.appendChild(td);
+var df=TableOperations.createColorButton(doc,_9d,el.style.backgroundColor,"backgroundColor");
+df.firstChild.nextSibling.style.marginRight="0.5em";
+td.appendChild(df);
+td.appendChild(doc.createTextNode(HTMLArea._lc("Image URL","TableOperations")+": "));
+input=doc.createElement("input");
+input.type="text";
+input.name="f_st_backgroundImage";
+if(el.style.backgroundImage.match(/url\(\s*(.*?)\s*\)/)){
+input.value=RegExp.$1;
+}
+td.appendChild(input);
+tr=doc.createElement("tr");
+_a2.appendChild(tr);
+td=doc.createElement("td");
+tr.appendChild(td);
+td.className="label";
+td.innerHTML=HTMLArea._lc("FG Color","TableOperations")+":";
+td=doc.createElement("td");
+tr.appendChild(td);
+td.appendChild(TableOperations.createColorButton(doc,_9d,el.style.color,"color"));
+input=doc.createElement("input");
+input.style.visibility="hidden";
+input.type="text";
+td.appendChild(input);
+tr=doc.createElement("tr");
+_a2.appendChild(tr);
+td=doc.createElement("td");
+tr.appendChild(td);
+td.className="label";
+td.innerHTML=HTMLArea._lc("Border","TableOperations")+":";
+td=doc.createElement("td");
+tr.appendChild(td);
+var _a5=TableOperations.createColorButton(doc,_9d,el.style.borderColor,"borderColor");
+var btn=_a5.firstChild.nextSibling;
+td.appendChild(_a5);
+btn.style.marginRight="0.5em";
+select=doc.createElement("select");
+var _a7=[];
+td.appendChild(select);
+select.name="f_st_borderStyle";
+options=["none","dotted","dashed","solid","double","groove","ridge","inset","outset"];
+var _a8=el.style.borderStyle;
+(_a8.match(/([^\s]*)\s/))&&(_a8=RegExp.$1);
+for(var i in options){
+if(typeof options[i]=="function"){
+continue;
+}
+var val=options[i];
+option=doc.createElement("option");
+option.value=val;
+option.innerHTML=val;
+(val==_a8)&&(option.selected=true);
+select.appendChild(option);
+}
+select.style.marginRight="0.5em";
+function setBorderFieldsStatus(_ab){
+for(var i=0;i<_a7.length;++i){
+var el=_a7[i];
+el.style.visibility=_ab?"hidden":"visible";
+if(!_ab&&(el.tagName.toLowerCase()=="input")){
+el.focus();
+el.select();
+}
+}
+}
+select.onchange=function(){
+setBorderFieldsStatus(this.value=="none");
+};
+input=doc.createElement("input");
+_a7.push(input);
+input.type="text";
+input.name="f_st_borderWidth";
+input.value=TableOperations.getLength(el.style.borderWidth);
+input.size="5";
+td.appendChild(input);
+input.style.marginRight="0.5em";
+var _ae=doc.createElement("span");
+_ae.innerHTML=HTMLArea._lc("pixels","TableOperations");
+td.appendChild(_ae);
+_a7.push(_ae);
+setBorderFieldsStatus(select.value=="none");
+if(el.tagName.toLowerCase()=="table"){
+tr=doc.createElement("tr");
+_a2.appendChild(tr);
+td=doc.createElement("td");
+td.className="label";
+tr.appendChild(td);
+input=doc.createElement("input");
+input.type="checkbox";
+input.name="f_st_borderCollapse";
+input.id="f_st_borderCollapse";
+var val=(/collapse/i.test(el.style.borderCollapse));
+input.checked=val?1:0;
+td.appendChild(input);
+td=doc.createElement("td");
+tr.appendChild(td);
+var _af=doc.createElement("label");
+_af.htmlFor="f_st_borderCollapse";
+_af.innerHTML=HTMLArea._lc("Collapsed borders","TableOperations");
+td.appendChild(_af);
+}
+return _9f;
+};
+

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/img/ed_template.gif
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/img/ed_template.gif?rev=578051&view=auto
==============================================================================
Binary file - no diff available.

Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/img/ed_template.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/img/layout_01.gif
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/img/layout_01.gif?rev=578051&view=auto
==============================================================================
Binary file - no diff available.

Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/img/layout_01.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/img/layout_02.gif
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/img/layout_02.gif?rev=578051&view=auto
==============================================================================
Binary file - no diff available.

Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/img/layout_02.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/img/layout_03.gif
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/img/layout_03.gif?rev=578051&view=auto
==============================================================================
Binary file - no diff available.

Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/img/layout_03.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/lang/de.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/lang/de.js?rev=578051&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/lang/de.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/lang/de.js Fri Sep 21 03:36:30 2007
@@ -0,0 +1,7 @@
+// I18N constants
+// LANG: "de", ENCODING: UTF-8 | ISO-8859-1
+// Author: Udo Schmal (gocher), http://www.schaffrath-neuemedien.de/, [email protected]
+{
+	"Insert template"          : "Template einfügen",
+	"Cancel"                   : "Abbrechen"
+};
\ No newline at end of file

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/lang/fr.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/lang/fr.js?rev=578051&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/lang/fr.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/lang/fr.js Fri Sep 21 03:36:30 2007
@@ -0,0 +1,6 @@
+// I18N constants
+// LANG: "fr", ENCODING: UTF-8
+{
+  "Insert template": "Insérer un template",
+  "Cancel": "Annulation"
+};
\ No newline at end of file

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/lang/it.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/lang/it.js?rev=578051&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/lang/it.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/lang/it.js Fri Sep 21 03:36:30 2007
@@ -0,0 +1,6 @@
+// I18N constants
+// LANG: "it", ENCODING: UTF-8 | ISO-8859-1
+{
+	"Insert template"           : "Inserisca il template",
+	"Cancel"                    : "Annullamento"
+};
\ No newline at end of file

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/lang/ja.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/lang/ja.js?rev=578051&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/lang/ja.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/lang/ja.js Fri Sep 21 03:36:30 2007
@@ -0,0 +1,6 @@
+// I18N constants
+// LANG: "ja", ENCODING: UTF-8
+{
+	"Insert template"          : "テンプレートの挿入",
+	"Cancel"                   : "中止"
+};
\ No newline at end of file

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/lang/nb.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/lang/nb.js?rev=578051&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/lang/nb.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/lang/nb.js Fri Sep 21 03:36:30 2007
@@ -0,0 +1,7 @@
+// I18N constants
+// LANG: "nb", ENCODING: UTF-8
+// translated: Kim Steinhaug, http://www.steinhaug.com/, [email protected]
+{
+  "Insert template": "Sett inn template",
+  "Cancel": "Avbryt"
+};
\ No newline at end of file

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/popups/template.html
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/popups/template.html?rev=578051&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/popups/template.html (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/popups/template.html Fri Sep 21 03:36:30 2007
@@ -0,0 +1,52 @@
+<html>
+<head>
+<title>Insert template</title>
+  <link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
+  <script type="text/javascript" src="../../../popups/popup.js"></script>
+
+<script type="text/javascript">
+function Init() {
+  __dlg_translate("Template");
+  __dlg_init();
+  window.resizeTo(400, 200);
+  document.getElementById("cancel").focus();
+}
+
+function onOK(sel) {
+  // pass data back to the calling window
+  var param = new Object();
+  param["templ"] = sel;
+  __dlg_close(param);
+  return false;
+}
+
+function onCancel() {
+  __dlg_close(null);
+  return false;
+}
+</script>
+</head>
+
+<body class="dialog" onload="Init()">
+<div class="title">Insert template</div>
+<form>
+  <table border="0" cellspacing="0" cellpadding="5">
+	<tr>
+    <td align="center" valign="top"><a href="javascript:;" onClick="onOK('1');">
+      <img src="../img/layout_01.gif" alt="" width="106" height="68" border="0" /></a>
+    </td>
+    <td align="center" valign="top"><a href="javascript:;" onClick="onOK('2');">
+      <img src="../img/layout_02.gif" alt="" width="106" height="68" border="0" /></a>
+    </td>  
+	  <td align="center" valign="top"><a href="javascript:;" onClick="onOK('3');">
+	    <img src="../img/layout_03.gif" alt="" width="106" height="68" border="0" /></a><br/>
+    </td>
+ 	</tr>
+  </table>
+
+  <div id="buttons">
+    <button type="button" name="cancel" id="cancel" onclick="return onCancel();">Cancel</button>
+  </div>
+</form>
+</body>
+</html>
\ No newline at end of file

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/template.css
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/template.css?rev=578051&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/template.css (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/template.css Fri Sep 21 03:36:30 2007
@@ -0,0 +1,3 @@
+div {
+	border: 1px dotted ActiveBorder;
+}
\ No newline at end of file

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/template.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/template.js?rev=578051&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/template.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/Template/template.js Fri Sep 21 03:36:30 2007
@@ -0,0 +1,91 @@
+function Template(_1){
+this.editor=_1;
+var _2=_1.config;
+var _3=this;
+_2.registerButton({id:"template",tooltip:HTMLArea._lc("Insert template","Template"),image:_1.imgURL("ed_template.gif","Template"),textMode:false,action:function(_4){
+_3.buttonPress(_4);
+}});
+_2.addToolbarElement("template","inserthorizontalrule",1);
+}
+Template._pluginInfo={name:"Template",version:"1.0",developer:"Udo Schmal",developer_url:"http://www.schaffrath-neuemedien.de/",c_owner:"Udo Schmal & Schaffrath NeueMedien",license:"htmlArea"};
+Template.prototype.onGenerate=function(){
+var _5="Template-style";
+var _6=this.editor._doc.getElementById(_5);
+if(_6==null){
+_6=this.editor._doc.createElement("link");
+_6.id=_5;
+_6.rel="stylesheet";
+_6.href=_editor_url+"plugins/Template/template.css";
+this.editor._doc.getElementsByTagName("HEAD")[0].appendChild(_6);
+}
+};
+Template.prototype.buttonPress=function(_7){
+_7._popupDialog("plugin://Template/template",function(_8){
+if(!_8){
+return false;
+}
+var _9=_7._doc.getElementsByTagName("body");
+var _a=_9[0];
+function getElement(x){
+var _c=_7._doc.getElementById(x);
+if(!_c){
+_c=_7._doc.createElement("div");
+_c.id=x;
+_c.innerHTML=x;
+_a.appendChild(_c);
+}
+if(_c.style){
+_c.removeAttribute("style");
+}
+return _c;
+}
+var _d=getElement("content");
+var _e=getElement("menu1");
+var _f=getElement("menu2");
+var _10=getElement("menu3");
+switch(_8["templ"]){
+case "1":
+_e.style.position="absolute";
+_e.style.right="0px";
+_e.style.width="28%";
+_e.style.backgroundColor="#e1ddd9";
+_e.style.padding="2px 20px";
+_d.style.position="absolute";
+_d.style.left="0px";
+_d.style.width="70%";
+_d.style.backgroundColor="#fff";
+_f.style.visibility="hidden";
+_10.style.visibility="hidden";
+break;
+case "2":
+_e.style.position="absolute";
+_e.style.left="0px";
+_e.style.width="28%";
+_e.style.height="100%";
+_e.style.backgroundColor="#e1ddd9";
+_d.style.position="absolute";
+_d.style.right="0px";
+_d.style.width="70%";
+_d.style.backgroundColor="#fff";
+_f.style.visibility="hidden";
+_10.style.visibility="hidden";
+break;
+case "3":
+_e.style.position="absolute";
+_e.style.left="0px";
+_e.style.width="28%";
+_e.style.backgroundColor="#e1ddd9";
+_f.style.position="absolute";
+_f.style.right="0px";
+_f.style.width="28%";
+_f.style.backgroundColor="#e1ddd9";
+_d.style.position="absolute";
+_d.style.right="30%";
+_d.style.width="60%";
+_d.style.backgroundColor="#fff";
+_10.style.visibility="hidden";
+break;
+}
+},null);
+};
+

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/img/unformat.gif
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/img/unformat.gif?rev=578051&view=auto
==============================================================================
Binary file - no diff available.

Propchange: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/img/unformat.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/lang/de.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/lang/de.js?rev=578051&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/lang/de.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/lang/de.js Fri Sep 21 03:36:30 2007
@@ -0,0 +1,12 @@
+// I18N constants
+// LANG: "de", ENCODING: UTF-8 | ISO-8859-1
+{
+  "Page Cleaner": "Seite bereinigen",
+  "Cleaning Area": "Reinigungsbereich",
+  "Selection": "Ausgewählter Bereich",
+  "All": "Alles",
+  "Cleaning options": "Reinigungsoptionen",
+  "Formatting:": "Formatierung:",
+  "All HTML:": "Ganzes HTML:",
+  "Select which types of formatting you would like to remove." : "Wählen Sie aus welche Formatierungen Sie entfernen wollen."
+};

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/lang/fr.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/lang/fr.js?rev=578051&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/lang/fr.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/lang/fr.js Fri Sep 21 03:36:30 2007
@@ -0,0 +1,12 @@
+// I18N constants
+// LANG: "fr", ENCODING: UTF-8
+{
+  "Page Cleaner": "Nettoyeur de page",
+  "Cleaning Area": "Zone de nettoyage",
+  "Selection": "Sélection",
+  "All": "Tout",
+  "Cleaning options": "Options de nettoyage",
+  "Formatting:": "Format",
+  "All HTML:": "Tout le HTML",
+  "Select which types of formatting you would like to remove.": "Sélectionnez quel type de formatage vous voulez supprimer."
+};
\ No newline at end of file

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/lang/ja.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/lang/ja.js?rev=578051&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/lang/ja.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/lang/ja.js Fri Sep 21 03:36:30 2007
@@ -0,0 +1,12 @@
+// I18N constants
+// LANG: "ja", ENCODING: UTF-8
+{
+  "Page Cleaner": "ページクリーナー",
+  "Cleaning Area": "クリーニング領域",
+  "Selection": "選択部分",
+  "All": "すべて",
+  "Cleaning options": "クリーニングオプション",
+  "Formatting:": "書式指定タグ:",
+  "All HTML:": "全HTMLタグ:",
+  "Select which types of formatting you would like to remove.": "削除する書式を選択してください。"
+};
\ No newline at end of file

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/lang/nb.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/lang/nb.js?rev=578051&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/lang/nb.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/lang/nb.js Fri Sep 21 03:36:30 2007
@@ -0,0 +1,13 @@
+// I18N constants
+// LANG: "nb", ENCODING: UTF-8
+// translated: Kim Steinhaug, http://www.steinhaug.com/, [email protected]
+{
+  "Page Cleaner": "Dokumentvasker",
+  "Cleaning Area": "Vaskeområde",
+  "Selection": "Markert område",
+  "All": "Hele dokumentet",
+  "Cleaning options": "Vaskemetoder",
+  "Formatting:": "Formattering:",
+  "All HTML:": "All HTML-kode:",
+  "Select which types of formatting you would like to remove.": "Velg hva slags formattering du ønsker å fjerne."
+};
\ No newline at end of file

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/lang/nl.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/lang/nl.js?rev=578051&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/lang/nl.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/lang/nl.js Fri Sep 21 03:36:30 2007
@@ -0,0 +1,12 @@
+// I18N constants
+// LANG: "nl", ENCODING: UTF-8
+{
+  "Page Cleaner": "Pagina Schoonmaker",
+  "Cleaning Area": "Schoonmaak gebied",
+  "Selection": "Geselecteerde tekst",
+  "All": "Alles",
+  "Cleaning options": "Schoonmaak opties",
+  "Formatting:": "Format",
+  "All HTML:": "Alle html",
+  "Select which types of formatting you would like to remove." : "Selecteer welke types van Formatteren je wilt verwijderen"
+};

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/popups/unformat.html
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/popups/unformat.html?rev=578051&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/popups/unformat.html (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/popups/unformat.html Fri Sep 21 03:36:30 2007
@@ -0,0 +1,85 @@
+<html>
+
+<head>
+<title>Page Cleaner</title>
+<link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
+<script type="text/javascript" src="../../../popups/popup.js"></script>
+<script type="text/javascript">
+
+
+
+UnFormat = window.opener.UnFormat;
+window.resizeTo(300, 100);
+
+var x = opener.screenX + (opener.outerWidth - window.outerWidth) / 2;
+var y = opener.screenY + (opener.outerHeight - window.outerHeight) / 2;
+window.moveTo(x, y);
+
+
+function Init() {
+  __dlg_translate('UnFormat');
+  __dlg_init();
+}
+
+function onOK() {
+  var param = new Object();
+
+  if (document.getElementById('clean_selection').checked) {
+    param["cleaning_area"] = "selection";
+  } else {
+    param["cleaning_area"] = "all";
+  }
+
+  var fields = ["formatting", "html_all"];
+
+  for (var i in fields) {
+    var id = fields[i];
+    var el = document.getElementById(id);
+    if (el.checked)	{param[id] = true;}
+  }
+
+  __dlg_close(param);
+  return false;
+}
+
+function onCancel() {
+  __dlg_close(null);
+  return false;
+}
+
+</script>
+</head>
+
+<body class="Dialog" onload="Init();self.focus();">
+
+<div class="title">Page Cleaner</div>
+
+<form action="" method="get">
+  <fieldset>
+  <legend>Cleaning Area</legend>
+    <span>Selection</span><input type="radio" name="cleaning_area" id="clean_selection" value="selection" checked="checked" />
+    <span>All</span><input type="radio" name="cleaning_area" id="clean_page" value="page" />
+  </fieldset>
+  <br>
+  <fieldset>
+  <legend>Cleaning options</legend>
+    <div class="space"></div>
+    <div class="fr">Formatting:</div>
+    <input type="checkbox" id="formatting" value="" checked />
+    <p />
+    <div class="fr">All HTML:</div>
+    <input type="checkbox" id="html_all" value="" />
+    <p />
+   </fieldset>
+   <br /><br />
+   <p style="text-align:center"><span>Select which types of formatting you would like to remove.</span></p>
+
+<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

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/un-format.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/un-format.js?rev=578051&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/un-format.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/plugins/UnFormat/un-format.js Fri Sep 21 03:36:30 2007
@@ -0,0 +1,65 @@
+// Unormat plugin for HTMLArea
+
+
+function UnFormat(editor) {
+  this.editor = editor;
+  var cfg = editor.config;
+  var self = this;
+
+  cfg.registerButton({
+    id       : "unformat",
+    tooltip  : this._lc("Page Cleaner"),
+    image    : editor.imgURL("unformat.gif", "UnFormat"),
+    textMode : false,
+    action   : function(editor) {
+                 self.buttonPress(editor);
+               }
+  });
+
+  cfg.addToolbarElement("unformat", "killword", 1);
+}
+
+UnFormat._pluginInfo = {
+  name          : "UnFormat",
+  version       : "1.0",
+  license       : "htmlArea"
+};
+
+
+UnFormat.prototype._lc = function(string) {
+  return HTMLArea._lc(string, 'UnFormat');
+};
+
+UnFormat.prototype.buttonPress = function(editor){
+  editor._popupDialog( "plugin://UnFormat/unformat", function( param){
+    if (param) {
+      if (param["cleaning_area"] == "all") {
+        var html = editor._doc.body.innerHTML;
+      } else {
+        var html = editor.getSelectedHTML();
+      }
+
+      if (param["html_all"]== true) {
+        html = html.replace(/<[\!]*?[^<>]*?>/g, ""); 				
+      }
+
+      if (param["formatting"] == true) {
+        html = html.replace(/style="[^"]*"/gi, "");
+        html = html.replace(/<\/?font[^>]*>/gi,"");
+        html = html.replace(/<\/?b>/gi,"");
+        html = html.replace(/<\/?strong[^>]*>/gi,"");
+        html = html.replace(/<\/?i>/gi,"");
+        html = html.replace(/<\/?em[^>]*>/gi,"");
+        html = html.replace(/<\/?u[^>]*>/gi,"");
+        html = html.replace(/<\/?strike[^>]*>/gi,"");
+        html = html.replace(/ align=[^\s|>]*/gi,"");
+        html = html.replace(/ class=[^\s|>]*/gi,"");
+      }
+      if (param["cleaning_area"] == "all") {
+        editor._doc.body.innerHTML = html;
+      } else	{
+        editor.insertHTML(html);
+      }
+    } else { return false; }
+  }, null);
+};
\ No newline at end of file

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/popups/about.html
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/popups/about.html?rev=578051&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/popups/about.html (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/popups/about.html Fri Sep 21 03:36:30 2007
@@ -0,0 +1,296 @@
+<!--
+
+(c) dynarch.com, 2003-2004
+Author: Mihai Bazon, http://dynarch.com/mishoo
+Distributed as part of HTMLArea 3.0
+
+"You are not expected to understand this...  I don't neither."
+
+                      (from The Linux Kernel Source Code,
+                            ./arch/x86_64/ia32/ptrace.c:90)
+
+;-)
+
+-->
+
+<html style="height: 100%">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>About Xinha</title>
+<script type="text/javascript" src="popup.js"></script>
+<script type="text/javascript">
+window.resizeTo(450, 250);
+var TABS = [];
+var CURRENT_TAB = 0;
+var CONTENT_HEIGHT_DIFF = 0;
+var CONTENT_WIDTH_DIFF = 0;
+function selectTab(idx) {
+  var ct = TABS[CURRENT_TAB];
+  ct.className = ct.className.replace(/\s*tab-current\s*/, ' ');
+  ct = TABS[CURRENT_TAB = idx];
+  ct.className += ' tab-current';
+  for (var i = TABS.length; --i >= 0;) {
+    var area = document.getElementById("tab-area-" + i);
+    if (CURRENT_TAB == i) {
+      area.style.display = "block";
+    } else {
+      area.style.display = "none";
+    }
+  }
+  document.body.style.visibility = "hidden";
+  document.body.style.visibility = "visible";
+  document.cookie = "HTMLAREA-ABOUT-TAB=" + idx;
+}
+var editor = null;
+function initDocument() {
+  editor = window.dialogArguments;
+  Xinha = window.opener.Xinha;
+
+  var plugins = document.getElementById("plugins");
+  var j = 0;
+  var html = "<table width='99%' cellpadding='2' cellspacing=2 style='margin-top: 1em; collapse-borders: collapse; border: 1px solid black;'>" +
+    "<thead><tr>" +
+    "<td>Name</td>" +
+    "<td>Developer</td>" +
+    "<td>Sponsored by</td>" +
+    "<td>License</td>" +
+    "</tr></thead><tbody>";
+  for (var i in editor.plugins) {
+    var info = editor.plugins[i];
+    if (typeof info != 'object' || !info.name || typeof info.name !='string')   continue;
+    html += "<tr><td>" + info.name + " v" + info.version + "</td>" +
+            "<td><a href='" + info.developer_url + "' target='_blank' title='Visit developer website'>" +
+      info.developer + "</a></td>" +
+      "<td><a href='" + info.sponsor_url + "' target='_blank' title='Visit sponsor website'>" +
+      info.sponsor + "</a></td>" +
+      "<td>" + info.license + "</td></tr>";
+    ++j;
+  }
+
+  if (j) {
+          html += "</tbody></table>" +
+      "<p>License \"htmlArea\" means that the plugin is distributed under the same terms " +
+      "as Xinha itself.</p>";
+    plugins.innerHTML = "<p>The following plugins have been loaded.</p>" + html;
+  } else {
+    plugins.innerHTML = "<p>No plugins have been loaded</p>";
+  }
+
+  plugins.innerHTML += "<p>User agent reports:<br/>" + navigator.userAgent + "</p>";
+
+  var content = document.getElementById("content");
+  if (window.innerHeight) {
+    CONTENT_HEIGHT_DIFF = window.innerHeight - 250;
+    CONTENT_WIDTH_DIFF = window.innerWidth - content.offsetWidth;
+  } else {
+    CONTENT_HEIGHT_DIFF = document.body.offsetHeight - 250;
+    CONTENT_WIDTH_DIFF = document.body.offsetWidth - 400;
+  }
+  window.onresize();
+  var bar = document.getElementById("tabbar");
+  j = 0;
+  for (var i = bar.firstChild; i; i = i.nextSibling) {
+    TABS.push(i);
+    i.__msh_tab = j;
+    i.onmousedown = function(ev) { selectTab(this.__msh_tab); Xinha._stopEvent(ev || window.event); };
+    var area = document.getElementById("tab-area-" + j);
+    if (/tab-current/.test(i.className)) {
+      CURRENT_TAB = j;
+      area.style.display = "block";
+    } else {
+      area.style.display = "none";
+    }
+    ++j;
+  }
+  if (document.cookie.match(/HTMLAREA-ABOUT-TAB=([0-9]+)/))
+    selectTab(RegExp.$1);
+}
+window.onresize = function() {
+  var content = document.getElementById("content");
+  if (window.innerHeight) {
+    content.style.height = (window.innerHeight - CONTENT_HEIGHT_DIFF) + "px";
+    content.style.width = (window.innerWidth - CONTENT_WIDTH_DIFF) + "px";
+  } else {
+    content.style.height = (document.body.offsetHeight - CONTENT_HEIGHT_DIFF) + "px";
+    //content.style.width = (document.body.offsetWidth - CONTENT_WIDTH_DIFF) + "px";
+  }
+}
+</script>
+<style>
+  html,body,textarea,table
+  { font-family: helvetica,arial,sans-serif;
+    font-size: 11px; padding: 0px; margin: 0px;
+  }
+
+  body { padding: 0px; background: #f5f6f6; color: black; }
+  a:link, a:visited { color: #00f; }
+  a:hover           { color: #f00; }
+  a:active          { color: #f80; }
+  button            { font: 11px; border-width: 1px; background-color:#f5f6f6; color:black; }
+
+  p { margin: 0.5em 0px; }
+
+  #tdheader h1
+  { font: bold 40px "Staccato222 BT", cursive; margin: 0px; padding-left:4px; border-bottom: 1px solid #6a6; }
+  h1 { font: bold 20px; margin: 0px; border-bottom: 1px solid #6a6; }
+  h2 { font: bold 110%; margin: 0.7em 0px; }
+
+  thead {
+    font-weight: bold;
+    background-color: #CCC;
+  }
+
+  thead td { padding-left:4px; }
+
+  .buttons {
+    text-align: right; padding: 3px;
+    background-color: white;
+    border-top: 1px solid #555;
+  }
+
+  #tabbar {
+    position: relative;
+    left: 10px;
+  }
+  .tab {
+    color: #OOO;
+    cursor: pointer;
+    margin-left: -5px;
+    float: left; position: relative;
+    border: 1px solid #555;
+    top: -3px; left: -2px;
+    padding: 2px 10px 3px 10px;
+    border-top: none; background-color: #CCC;
+    -moz-border-radius: 0px 0px 4px 4px;
+    z-index: 0;
+  }
+  .tab-current
+  {
+    color: #000;
+    top: -4px;
+    background-color: #f5f6f6;
+    padding: 3px 10px 4px 10px;
+    z-index: 10;
+  }
+
+  li, ol, ul { margin-top: 0px; margin-bottom: 0px; }
+</style></head>
+<body onload="__dlg_init(); initDocument();"
+><table cellspacing="0" cellpadding="0" style="border-collapse: collapse;
+      width: 100%; height: 100%;">
+
+<tr style="height: 1em"><td id="tdheader">
+
+<h1><img src="../images/xinha_logo.gif" alt="Xinha" /></h1>
+
+</td></tr>
+<tr><td id="tdcontent" style="padding: 0.5em;">
+
+<div style="overflow: auto; height: 250px;" id="content">
+<div id="tab-areas">
+
+<div id="tab-area-0">
+
+  <p>A free WYSIWYG editor replacement for <tt>&lt;textarea&gt;</tt> fields.</p>
+  <p>Visit the <a href="http://xinha.gogo.co.nz/">Xinha Website</a> for more information.</p>
+
+  <p>
+   Use of Xinha is granted by the terms of the htmlArea License (based on BSD license)
+  </p>
+  <p>
+    Xinha was originally based on work by Mihai Bazon which is:
+  </p>
+  <blockquote><pre>Copyright (c) 2003-2004 dynarch.com.
+    Copyright (c) 2002-2003 interactivetools.com, inc.
+    This copyright notice MUST stay intact for use.</pre></blockquote>
+
+</div>
+
+<div id="tab-area-1">
+
+  <p>
+   The development of Xinha would not have been possible without the original work of <a href="http://dynarch.com/">Mihai Bazon</a>, <a href="http://interactivetools.com" target="_blank">InteractiveTools.com</a>, and the many sponsors and contributors from around the world.
+  </p>
+
+</div>
+
+<div id="tab-area-2">
+<pre>htmlArea License (based on BSD license)
+Copyright (c) 2002-2004, interactivetools.com, inc.
+Copyright (c) 2003-2004 dynarch.com
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1) Redistributions of source code must retain the above copyright notice,
+   this list of conditions and the following disclaimer.
+
+2) Redistributions in binary form must reproduce the above copyright notice,
+   this list of conditions and the following disclaimer in the documentation
+   and/or other materials provided with the distribution.
+
+3) Neither the name of interactivetools.com, inc. nor the names of its
+   contributors may be used to endorse or promote products derived from this
+   software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.</pre>
+</div>
+
+<div id="tab-area-3">
+<div id="plugins">
+</div>
+</div>
+
+
+<div id="tab-area-4">
+  <script type="text/javascript">
+    if(window.opener && window.opener.Xinha)
+    {
+      var ver = window.opener.Xinha.version;
+      document.write('<pre>'
+                      + '\nRelease: ' + ver.Release + ' (' + ver.Date + ')'
+                      + '\nHead: ' + ver.Head
+                      + '\nRevision: ' + ver.Revision
+                      + '\nLast Changed By: ' + ver.RevisionBy
+                      + '\n' +
+                      '</pre>');
+    }
+    else
+    {
+      document.write('<pre>Version information unavailable.</pre>');
+    }
+  </script>
+</div>
+
+</div></div>
+
+
+</td></tr>
+<tr style="height: 1em"><td id="tdfooter">
+
+
+<div class="buttons">
+<div id="tabbar"
+><div class="tab tab-current"
+>About</div><div class="tab"
+>Thanks</div><div class="tab"
+>License</div><div class="tab"
+>Plugins</div><div class="tab"
+>Version</div></div>
+<button type="button" onclick="__dlg_close(null);">Close</button>
+</div>
+
+</td></tr></table>
+
+</body></html>

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/popups/blank.html
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/popups/blank.html?rev=578051&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/popups/blank.html (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/popups/blank.html Fri Sep 21 03:36:30 2007
@@ -0,0 +1,2 @@
+<html>
+</html>
\ No newline at end of file

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/popups/editor_help.html
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/popups/editor_help.html?rev=578051&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/popups/editor_help.html (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/popups/editor_help.html Fri Sep 21 03:36:30 2007
@@ -0,0 +1,62 @@
+<html>
+ <head>
+  <title>Editor Help</title>
+  <script type="text/javascript" src="popup.js"></script>
+  <link rel="stylesheet" type="text/css" href="popup.css" />
+
+<script type="text/javascript">
+  window.resizeTo(400, 480);
+Xinha = window.opener.Xinha;
+function Init() {
+  __dlg_translate('Xinha');
+  __dlg_init();
+
+}
+
+
+function onCancel() {
+  __dlg_close(null);
+  return false;
+}
+
+</script>
+</head>
+
+<body class="dialog" onload="Init()">
+<div class="title">Xinha Help</div>
+<table width="100%" style="background: white none repeat scroll 0%;">
+  <thead style="border: 1px solid gray; background: silver none repeat scroll 0%;">
+  <tr>
+    <th colspan="2"> 
+      <span style="text-align:center">Keyboard shortcuts</span><br />
+      <span>The editor provides the following key combinations:</span>
+    </th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr><td>ENTER</td><td><span>new paragraph</span>(&lt;P&gt;)</td></tr>
+  <tr><td>SHIFT-ENTER</td><td><span>insert linebreak</span>(&lt;BR&gt;)</td></tr>
+  <tr><td>CTRL-A</td><td><span>Select all</span></td></tr>
+  <tr><td>CTRL-B</td><td><span>Bold</span></td></tr>
+  <tr><td>CTRL-I</td><td><span>Italic</span></td></tr>
+  <tr><td>CTRL-U</td><td><span>Underline</span></td></tr>
+  <tr><td>CTRL-S</td><td><span>Strikethrough</span></td></tr>
+  <tr><td>CTRL-L</td><td><span>Justify Left</span></td></tr>
+  <tr><td>CTRL-E</td><td><span>Justify Center</span></td></tr>
+  <tr><td>CTRL-R</td><td><span>Justify Right</span></td></tr>
+  <tr><td>CTRL-J</td><td><span>Justify Full</span></td></tr>
+  <tr><td>CTRL-Z</td><td><span>Undoes your last action</span></td></tr>
+  <tr><td>CTRL-Y</td><td><span>Redoes your last action</span></td></tr>
+  <tr><td>CTRL-N</td><td><span>Set format to paragraph</span></td></tr>
+  <tr><td>CTRL-0 (zero)</td><td><span>Clean content pasted from Word</span></td></tr>
+  <tr><td>CTRL-1 .. CTRL-6</td><td><span>Headings</span> (&lt;h1&gt; .. &lt;h6&gt;)</td></tr>
+  <tr><td>CTRL-X</td><td><span>Cut selection</span></td></tr>
+  <tr><td>CTRL-C</td><td><span>Copy selection</span></td></tr>
+  <tr><td>CTRL-V</td><td><span>Paste from clipboard</span></td></tr>
+  </tbody>
+</table>
+<div id="buttons">
+  <button type="button" name="cancel" onclick="return onCancel();">Close</button>
+</div>
+</body>
+</html>
\ No newline at end of file

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/popups/popup.css
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/popups/popup.css?rev=578051&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/popups/popup.css (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/popups/popup.css Fri Sep 21 03:36:30 2007
@@ -0,0 +1,39 @@
+html, body, .dialog {
+  background: ButtonFace;
+  color: ButtonText;
+  font: 11px Tahoma,Verdana,sans-serif;
+  margin: 0px;
+  padding: 0px;
+}
+body { padding: 5px; }
+form { padding: 0px; margin: 0px; }
+form p {
+  margin-top: 5px;
+  margin-bottom: 5px;
+}
+table {
+  font: 11px Tahoma,Verdana,sans-serif;
+}
+select, input, button { font: 11px Tahoma,Verdana,sans-serif; }
+button { width: 70px; }
+table .label { text-align: right; width: 8em; }
+
+.fl { width: 9em; float: left; padding: 2px 5px; text-align: right; }
+.fr { width: 7em; float: left; padding: 2px 5px; text-align: right; }
+fieldset { padding: 0px 10px 5px 5px; }
+.space { padding: 2px; }
+.title { background: #ddf; color: #000; font-weight: bold; font-size: 120%; padding: 3px 10px; margin-bottom: 10px;
+border-bottom: 1px solid black; letter-spacing: 2px;
+}
+.buttonColor {
+  padding: 1px;
+  cursor: default;
+  border: 1px solid;
+  border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight;
+}
+#buttons {
+      margin-top: 1em; 
+      border-top: 1px solid #999;
+      padding: 1em; 
+      text-align: right;
+}
\ No newline at end of file

Added: lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/popups/popup.js
URL: http://svn.apache.org/viewvc/lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/popups/popup.js?rev=578051&view=auto
==============================================================================
--- lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/popups/popup.js (added)
+++ lenya/branches/revolution/1.3.x/src/webapp/lenya/modules/xinha/popups/popup.js Fri Sep 21 03:36:30 2007
@@ -0,0 +1,101 @@
+Xinha=window.opener.Xinha;
+HTMLArea=window.opener.Xinha;
+function getAbsolutePos(el){
+var r={x:el.offsetLeft,y:el.offsetTop};
+if(el.offsetParent){
+var _3=getAbsolutePos(el.offsetParent);
+r.x+=_3.x;
+r.y+=_3.y;
+}
+return r;
+}
+function comboSelectValue(c,_5){
+var _6=c.getElementsByTagName("option");
+for(var i=_6.length;--i>=0;){
+var op=_6[i];
+op.selected=(op.value==_5);
+}
+c.value=_5;
+}
+function __dlg_onclose(){
+opener.Dialog._return(null);
+}
+function __dlg_init(_9,_a){
+__xinha_dlg_init(_a);
+}
+function __xinha_dlg_init(_b){
+if(window.__dlg_init_done){
+return true;
+}
+if(window.opener._editor_skin){
+var _c=document.getElementsByTagName("head")[0];
+var _d=document.createElement("link");
+_d.type="text/css";
+_d.href=window.opener._editor_url+"skins/"+window.opener._editor_skin+"/skin.css";
+_d.rel="stylesheet";
+_c.appendChild(_d);
+}
+window.dialogArguments=opener.Dialog._arguments;
+var _e=Xinha.pageSize(window);
+if(!_b){
+_b={width:_e.x,height:_e.y};
+}
+window.resizeTo(_b.width,_b.height);
+var _f=Xinha.viewportSize(window);
+window.resizeBy(0,_e.y-_f.y);
+if(_b.top&&_b.left){
+window.moveTo(_b.left,_b.top);
+}else{
+if(!Xinha.is_ie){
+var x=opener.screenX+(opener.outerWidth-_b.width)/2;
+var y=opener.screenY+(opener.outerHeight-_b.height)/2;
+}else{
+var x=(self.screen.availWidth-_b.width)/2;
+var y=(self.screen.availHeight-_b.height)/2;
+}
+window.moveTo(x,y);
+}
+Xinha.addDom0Event(document.body,"keypress",__dlg_close_on_esc);
+window.__dlg_init_done=true;
+}
+function __dlg_translate(_12){
+var _13=["input","select","legend","span","option","td","th","button","div","label","a","img"];
+for(var _14=0;_14<_13.length;++_14){
+var _15=document.getElementsByTagName(_13[_14]);
+for(var i=_15.length;--i>=0;){
+var _17=_15[i];
+if(_17.firstChild&&_17.firstChild.data){
+var txt=Xinha._lc(_17.firstChild.data,_12);
+if(txt){
+_17.firstChild.data=txt;
+}
+}
+if(_17.title){
+var txt=Xinha._lc(_17.title,_12);
+if(txt){
+_17.title=txt;
+}
+}
+if(_17.tagName.toLowerCase()=="input"&&(/^(button|submit|reset)$/i.test(_17.type))){
+var txt=Xinha._lc(_17.value,_12);
+if(txt){
+_17.value=txt;
+}
+}
+}
+}
+document.title=Xinha._lc(document.title,_12);
+}
+function __dlg_close(val){
+opener.Dialog._return(val);
+window.close();
+}
+function __dlg_close_on_esc(ev){
+ev||(ev=window.event);
+if(ev.keyCode==27){
+__dlg_close(null);
+return false;
+}
+return true;
+}
+
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.