Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/Xinha.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/Xinha.css,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/Xinha.css 25 Feb 2007 19:06:05 -0000 1.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/Xinha.css 14 Jun 2007 01:36:53 -0000 1.3 @@ -1,4 +1,5 @@ .htmlarea { background: #fff; } +.htmlarea td { margin:0;padding:0; } .htmlarea .toolbar { cursor: default; @@ -54,7 +55,7 @@ .htmlarea .toolbar .separator { /*position: relative;*/ - margin: 3px; + margin:0 3px; border-left: 1px solid ButtonShadow; border-right: 1px solid ButtonHighlight; width: 0px; @@ -72,6 +73,7 @@ margin-top: 2px; margin-bottom: 1px; color: ButtonText; + height: 17px; } .htmlarea iframe.xinha_iframe, .htmlarea textarea.xinha_textarea @@ -146,23 +148,27 @@ } .dialog .buttonColor { + width :1em; padding: 1px; cursor: default; border: 1px solid; border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; } -.dialog .buttonColor-hilite { - border-color: #000; -} - .dialog .buttonColor .chooser, .dialog .buttonColor .nocolor { height: 0.6em; border: 1px solid; padding: 0px 1em; border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; } +.dialog .buttonClick { + border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; +} +.dialog .buttonColor-hilite { + border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; +} + .dialog .buttonColor .nocolor { padding: 0px; } .dialog .buttonColor .nocolor-hilite { background-color: #fff; color: #f00; } @@ -230,7 +236,7 @@ } -.htmlarea .panel { overflow:auto; } +.htmlarea .panel { overflow:hidden; } .htmlarea .panels.left .panel { border-right:none; border-left:none; } .htmlarea .panels.left h1 { border-right:none; } .htmlarea .panels.right .panel { border-right:none; border-left:none; } Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/XinhaCore.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/XinhaCore.js,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/XinhaCore.js 25 Feb 2007 19:06:05 -0000 1.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/XinhaCore.js 14 Jun 2007 01:36:53 -0000 1.3 @@ -1,4 +1,4 @@ -Xinha.version={"Release":"Trunk","Head":"$HeadURL: http://svn.xinha.python-hosting.com/tags/0.92beta/XinhaCore.js $".replace(/^[^:]*: (.*) \$$/,"$1"),"Date":"$LastChangedDate: 2007-02-22 02:11:56 +0100 (Do, 22 Feb 2007) $".replace(/^[^:]*: ([0-9-]*) ([0-9:]*) ([+0-9]*) \((.*)\) \$/,"$4 $2 $3"),"Revision":"$LastChangedRevision: 757 $".replace(/^[^:]*: (.*) \$$/,"$1"),"RevisionBy":"$LastChangedBy: ray $".replace(/^[^:]*: (.*) \$$/,"$1")}; +Xinha.version={"Release":"0.931","Head":"http://svn.xinha.python-hosting.com/trunk/XinhaCore.js","Date":"2007-05-16","Revision":"819","RevisionBy":"ray"}; Xinha._resolveRelativeUrl=function(_1,_2){ if(_2.match(/^([^:]+\:)?\//)){ return _2; @@ -42,56 +42,59 @@ Xinha.is_ie=((Xinha.agt.indexOf("msie")!=-1)&&(Xinha.agt.indexOf("opera")==-1)); Xinha.ie_version=parseFloat(Xinha.agt.substring(Xinha.agt.indexOf("msie")+5)); Xinha.is_opera=(Xinha.agt.indexOf("opera")!=-1); +Xinha.opera_version=navigator.appVersion.substring(0,navigator.appVersion.indexOf(" "))*1; +Xinha.is_khtml=(Xinha.agt.indexOf("khtml")!=-1); +Xinha.is_safari=(Xinha.agt.indexOf("safari")!=-1); Xinha.is_mac=(Xinha.agt.indexOf("mac")!=-1); Xinha.is_mac_ie=(Xinha.is_ie&&Xinha.is_mac); Xinha.is_win_ie=(Xinha.is_ie&&!Xinha.is_mac); -Xinha.is_gecko=(navigator.product=="Gecko"); +Xinha.is_gecko=(navigator.product=="Gecko"&&!Xinha.is_safari); Xinha.isRunLocally=document.URL.toLowerCase().search(/^file:/)!=-1; -if(Xinha.isRunLocally){ +Xinha.is_designMode=(typeof document.designMode!="undefined"&&!Xinha.is_ie); +Xinha.checkSupportedBrowser=function(){ +if(Xinha.is_gecko){ +if(navigator.productSub<20021201){ +alert("You need at least Mozilla-1.3 Alpha.\nSorry, your Gecko is not supported."); +return false; +} +if(navigator.productSub<20030210){ +alert("Mozilla < 1.3 Beta is not supported!\nI'll try, though, but it might not work."); +} +} +if(Xinha.is_opera){ +alert("Sorry, Opera is not yet supported by Xinha."); +} +return Xinha.is_gecko||(Xinha.is_opera&&Xinha.opera_version>=9.1)||Xinha.ie_version>=5.5; +}; +Xinha.isSupportedBrowser=Xinha.checkSupportedBrowser(); +if(Xinha.isRunLocally&&Xinha.isSupportedBrowser){ alert("Xinha *must* be installed on a web server. Locally opened files (those that use the \"file://\" protocol) cannot properly function. Xinha will try to initialize but may not be correctly loaded."); } function Xinha(_5,_6){ +if(!Xinha.isSupportedBrowser){ +return; +} if(!_5){ throw ("Tried to create Xinha without textarea specified."); } -if(Xinha.checkSupportedBrowser()){ if(typeof _6=="undefined"){ this.config=new Xinha.Config(); }else{ this.config=_6; } -this._htmlArea=null; if(typeof _5!="object"){ _5=Xinha.getElementById("textarea",_5); } this._textArea=_5; this._textArea.spellcheck=false; +Xinha.freeLater(this,"_textArea"); this._initial_ta_size={w:_5.style.width?_5.style.width:(_5.offsetWidth?(_5.offsetWidth+"px"):(_5.cols+"em")),h:_5.style.height?_5.style.height:(_5.offsetHeight?(_5.offsetHeight+"px"):(_5.rows+"em"))}; -if(this.config.showLoading){ -var _7=document.createElement("div"); -_7.id="loading_"+_5.name; -_7.className="loading"; -try{ -_7.style.width=_5.offsetWidth+"px"; +if(document.getElementById("loading_"+_5.id)||this.config.showLoading){ +if(!document.getElementById("loading_"+_5.id)){ +Xinha.createLoadingMessage(_5); } -catch(ex){ -_7.style.width=this._initial_ta_size.w; +this.setLoadingMessage(Xinha._lc("Constructing object")); } -_7.style.left=Xinha.findPosX(_5)+"px"; -_7.style.top=(Xinha.findPosY(_5)+parseInt(this._initial_ta_size.h,10)/2)+"px"; -var _8=document.createElement("div"); -_8.className="loading_main"; -_8.id="loading_main_"+_5.name; -_8.appendChild(document.createTextNode(Xinha._lc("Loading in progress. Please wait !"))); -var _9=document.createElement("div"); -_9.className="loading_sub"; -_9.id="loading_sub_"+_5.name; -_9.appendChild(document.createTextNode(Xinha._lc("Constructing main object"))); -_7.appendChild(_8); -_7.appendChild(_9); -document.body.appendChild(_7); -this.setLoadingMessage("Constructing object"); -} this._editMode="wysiwyg"; this.plugins={}; this._timerToolbar=null; @@ -104,20 +107,28 @@ this.__htmlarea_id_num=__xinhas.length; __xinhas[this.__htmlarea_id_num]=this; this._notifyListeners={}; -var _a={right:{on:true,container:document.createElement("td"),panels:[]},left:{on:true,container:document.createElement("td"),panels:[]},top:{on:true,container:document.createElement("td"),panels:[]},bottom:{on:true,container:document.createElement("td"),panels:[]}}; -for(var i in _a){ -if(!_a[i].container){ +var _7={right:{on:true,container:document.createElement("td"),panels:[]},left:{on:true,container:document.createElement("td"),panels:[]},top:{on:true,container:document.createElement("td"),panels:[]},bottom:{on:true,container:document.createElement("td"),panels:[]}}; +for(var i in _7){ +if(!_7[i].container){ continue; } -_a[i].div=_a[i].container; -_a[i].container.className="panels "+i; -Xinha.freeLater(_a[i],"container"); -Xinha.freeLater(_a[i],"div"); +_7[i].div=_7[i].container; +_7[i].container.className="panels "+i; +Xinha.freeLater(_7[i],"container"); +Xinha.freeLater(_7[i],"div"); } -this._panels=_a; -Xinha.freeLater(this,"_textArea"); +this._panels=_7; +this._statusBar=null; +this._statusBarTree=null; +this._statusBarTextMode=null; +this._statusBarItems=[]; +this._framework={}; +this._htmlArea=null; +this._iframe=null; +this._doc=null; +this._toolBar=this._toolbar=null; +this._toolbarObjects={}; } -} Xinha.onload=function(){ }; Xinha.init=function(){ @@ -128,16 +139,20 @@ Xinha.RE_head=/((.|\n)*?)<\/head>/i; Xinha.RE_body=/]*>((.|\n|\r|\t)*?)<\/body>/i; Xinha.RE_Specials=/([\/\^$*+?.()|{}[\]])/g; -Xinha.RE_email=/[_a-zA-Z\d\-\.]{3,}@[_a-zA-Z\d\-]{2,}(\.[_a-zA-Z\d\-]{2,})+/i; +Xinha.escapeStringForRegExp=function(_9){ +return _9.replace(Xinha.RE_Specials,"\\$1"); +}; +Xinha.RE_email=/[_a-z\d\-\.]{3,}@[_a-z\d\-]{2,}(\.[_a-z\d\-]{2,})+/i; Xinha.RE_url=/(https?:\/\/)?(([a-z0-9_]+:[a-z0-9_]+@)?[a-z0-9_-]{2,}(\.[a-z0-9_-]{2,}){2,}(:[0-9]+)?(\/\S+)*)/i; Xinha.Config=function(){ -var _c=this; +var _a=this; this.version=Xinha.version.Revision; this.width="auto"; this.height="auto"; this.sizeIncludesBars=true; this.sizeIncludesPanels=true; this.panel_dimensions={left:"200px",right:"200px",top:"100px",bottom:"100px"}; +this.iframeWidth=null; this.statusBar=true; this.htmlareaPaste=false; this.mozParaHandler="best"; @@ -157,11 +172,13 @@ this.specialReplacements={}; this.killWordOnPaste=true; this.makeLinkShowsTarget=true; -this.charSet=Xinha.is_gecko?document.characterSet:document.charset; +this.charSet=(typeof document.characterSet!="undefined")?document.characterSet:document.charset; +this.browserQuirksMode=null; this.imgURL="images/"; this.popupURL="popups/"; this.htmlRemoveTags=null; this.flowToolbars=true; +this.toolbarAlign="left"; this.showLoading=false; this.stripScripts=true; this.convertUrlsToLinks=true; @@ -177,9 +194,6 @@ this.fontsize={"— size —":"","1 (8 pt)":"1","2 (10 pt)":"2","3 (12 pt)":"3","4 (14 pt)":"4","5 (18 pt)":"5","6 (24 pt)":"6","7 (36 pt)":"7"}; this.formatblock={"— format —":"","Heading 1":"h1","Heading 2":"h2","Heading 3":"h3","Heading 4":"h4","Heading 5":"h5","Heading 6":"h6","Normal":"p","Address":"address","Formatted":"pre"}; this.customSelects={}; -function cut_copy_paste(e,_e,_f){ -e.execCommand(_e); -} this.debug=true; this.URIs={"blank":"popups/blank.html","link":_editor_url+"modules/CreateLink/link.html","insert_image":_editor_url+"modules/InsertImage/insert_image.html","insert_table":_editor_url+"modules/InsertTable/insert_table.html","select_color":"select_color.html","about":"about.html","help":"editor_help.html"}; this.btnList={bold:["Bold",Xinha._lc({key:"button_bold",string:["ed_buttons_main.gif",3,2]},"Xinha"),false,function(e){ @@ -222,7 +236,13 @@ e.execCommand("undo"); }],redo:["Redoes your last action",["ed_buttons_main.gif",5,2],false,function(e){ e.execCommand("redo"); -}],cut:["Cut selection",["ed_buttons_main.gif",5,0],false,cut_copy_paste],copy:["Copy selection",["ed_buttons_main.gif",4,0],false,cut_copy_paste],paste:["Paste from clipboard",["ed_buttons_main.gif",4,1],false,cut_copy_paste],selectall:["Select all","ed_selectall.gif",false,function(e){ +}],cut:["Cut selection",["ed_buttons_main.gif",5,0],false,function(e,cmd){ +e.execCommand(cmd); +}],copy:["Copy selection",["ed_buttons_main.gif",4,0],false,function(e,cmd){ +e.execCommand(cmd); +}],paste:["Paste from clipboard",["ed_buttons_main.gif",4,1],false,function(e,cmd){ +e.execCommand(cmd); +}],selectall:["Select all","ed_selectall.gif",false,function(e){ e.execCommand("selectall"); }],inserthorizontalrule:["Horizontal Rule",["ed_buttons_main.gif",6,0],false,function(e){ e.execCommand("inserthorizontalrule"); @@ -279,73 +299,73 @@ btn[0]=Xinha._lc(btn[0]); } }; -Xinha.Config.prototype.registerButton=function(id,_3a,_3b,_3c,_3d,_3e){ -var _3f; +Xinha.Config.prototype.registerButton=function(id,_3b,_3c,_3d,_3e,_3f){ +var _40; if(typeof id=="string"){ -_3f=id; +_40=id; }else{ if(typeof id=="object"){ -_3f=id.id; +_40=id.id; }else{ alert("ERROR [Xinha.Config::registerButton]:\ninvalid arguments"); return false; } } switch(typeof id){ case "string": -this.btnList[id]=[_3a,_3b,_3c,_3d,_3e]; +this.btnList[id]=[_3b,_3c,_3d,_3e,_3f]; break; case "object": this.btnList[id.id]=[id.tooltip,id.image,id.textMode,id.action,id.context]; break; } }; -Xinha.prototype.registerPanel=function(_40,_41){ -if(!_40){ -_40="right"; +Xinha.prototype.registerPanel=function(_41,_42){ +if(!_41){ +_41="right"; } -this.setLoadingMessage("Register panel "+_40); -var _42=this.addPanel(_40); -if(_41){ -_41.drawPanelIn(_42); +this.setLoadingMessage("Register "+_41+" panel "); +var _43=this.addPanel(_41); +if(_42){ +_42.drawPanelIn(_43); } }; -Xinha.Config.prototype.registerDropdown=function(_43){ -this.customSelects[_43.id]=_43; +Xinha.Config.prototype.registerDropdown=function(_44){ +this.customSelects[_44.id]=_44; }; -Xinha.Config.prototype.hideSomeButtons=function(_44){ -var _45=this.toolbar; -for(var i=_45.length;--i>=0;){ -var _47=_45[i]; -for(var j=_47.length;--j>=0;){ -if(_44.indexOf(" "+_47[j]+" ")>=0){ +Xinha.Config.prototype.hideSomeButtons=function(_45){ +var _46=this.toolbar; +for(var i=_46.length;--i>=0;){ +var _48=_46[i]; +for(var j=_48.length;--j>=0;){ +if(_45.indexOf(" "+_48[j]+" ")>=0){ var len=1; -if(/separator|space/.test(_47[j+1])){ +if(/separator|space/.test(_48[j+1])){ len=2; } -_47.splice(j,len); +_48.splice(j,len); } } } }; -Xinha.Config.prototype.addToolbarElement=function(id,_4b,_4c){ -var _4d=this.toolbar; +Xinha.Config.prototype.addToolbarElement=function(id,_4c,_4d){ +var _4e=this.toolbar; var a,i,j,o,sid; -var _4f=false; var _50=false; -var _51=0; +var _51=false; var _52=0; var _53=0; -var _54=false; +var _54=0; var _55=false; +var _56=false; if((id&&typeof id=="object")&&(id.constructor==Array)){ -_4f=true; -} -if((_4b&&typeof _4b=="object")&&(_4b.constructor==Array)){ _50=true; -_51=_4b.length; } -if(_4f){ +if((_4c&&typeof _4c=="object")&&(_4c.constructor==Array)){ +_51=true; +_52=_4c.length; +} +if(_50){ for(i=0;i=0;){ a.splice(j,0,id[i]); @@ -405,14 +425,14 @@ a[j]=id; } }else{ -if(_4c<0){ -j=j+_4c+1; +if(_4d<0){ +j=j+_4d+1; }else{ -if(_4c>0){ -j=j+_4c; +if(_4d>0){ +j=j+_4d; } } -if(_4f){ +if(_50){ for(i=id.length;--i>=0;){ a.splice(j,0,id[i]); } @@ -421,44 +441,44 @@ } } }else{ -_4d[0].splice(0,0,"separator"); -if(_4f){ +_4e[0].splice(0,0,"separator"); +if(_50){ for(i=id.length;--i>=0;){ -_4d[0].splice(0,0,id[i]); +_4e[0].splice(0,0,id[i]); } }else{ -_4d[0].splice(0,0,id); +_4e[0].splice(0,0,id); } } }; Xinha.Config.prototype.removeToolbarElement=Xinha.Config.prototype.hideSomeButtons; -Xinha.replaceAll=function(_56){ +Xinha.replaceAll=function(_57){ var tas=document.getElementsByTagName("textarea"); -for(var i=tas.length;i>0;(new Xinha(tas[--i],_56)).generate()){ +for(var i=tas.length;i>0;(new Xinha(tas[--i],_57)).generate()){ } }; -Xinha.replace=function(id,_5a){ +Xinha.replace=function(id,_5b){ var ta=Xinha.getElementById("textarea",id); -return ta?(new Xinha(ta,_5a)).generate():null; +return ta?(new Xinha(ta,_5b)).generate():null; }; Xinha.prototype._createToolbar=function(){ -this.setLoadingMessage("Create Toolbar"); -var _5c=this; -var _5d=document.createElement("div"); -this._toolBar=this._toolbar=_5d; -_5d.className="toolbar"; -_5d.unselectable="1"; +this.setLoadingMessage(Xinha._lc("Create Toolbar")); +var _5d=this; +var _5e=document.createElement("div"); +this._toolBar=this._toolbar=_5e; +_5e.className="toolbar"; +_5e.unselectable="1"; Xinha.freeLater(this,"_toolBar"); Xinha.freeLater(this,"_toolbar"); -var _5e=null; -var _5f={}; -this._toolbarObjects=_5f; -this._createToolbar1(_5c,_5d,_5f); -this._htmlArea.appendChild(_5d); -return _5d; +var _5f=null; +var _60={}; +this._toolbarObjects=_60; +this._createToolbar1(_5d,_5e,_60); +this._htmlArea.appendChild(_5e); +return _5e; }; -Xinha.prototype._setConfig=function(_60){ -this.config=_60; +Xinha.prototype._setConfig=function(_61){ +this.config=_61; }; Xinha.prototype._addToolbar=function(){ this._createToolbar1(this,this._toolbar,this._toolbarObjects); @@ -472,41 +492,41 @@ brk.style.clear="both"; return brk; }; -Xinha.prototype._createToolbar1=function(_62,_63,_64){ -var _65; -if(_62.config.flowToolbars){ -_63.appendChild(Xinha._createToolbarBreakingElement()); +Xinha.prototype._createToolbar1=function(_63,_64,_65){ +var _66; +if(_63.config.flowToolbars){ +_64.appendChild(Xinha._createToolbarBreakingElement()); } function newLine(){ -if(typeof _65!="undefined"&&_65.childNodes.length===0){ +if(typeof _66!="undefined"&&_66.childNodes.length===0){ return; } -var _66=document.createElement("table"); -_66.border="0px"; -_66.cellSpacing="0px"; -_66.cellPadding="0px"; -if(_62.config.flowToolbars){ +var _67=document.createElement("table"); +_67.border="0px"; +_67.cellSpacing="0px"; +_67.cellPadding="0px"; +if(_63.config.flowToolbars){ if(Xinha.is_ie){ -_66.style.styleFloat="left"; +_67.style.styleFloat="left"; }else{ -_66.style.cssFloat="left"; +_67.style.cssFloat="left"; } } -_63.appendChild(_66); -var _67=document.createElement("tbody"); -_66.appendChild(_67); -_65=document.createElement("tr"); -_67.appendChild(_65); -_66.className="toolbarRow"; +_64.appendChild(_67); +var _68=document.createElement("tbody"); +_67.appendChild(_68); +_66=document.createElement("tr"); +_68.appendChild(_66); +_67.className="toolbarRow"; } newLine(); -function setButtonStatus(id,_69){ -var _6a=this[id]; +function setButtonStatus(id,_6a){ +var _6b=this[id]; var el=this.element; -if(_6a!=_69){ +if(_6b!=_6a){ switch(id){ case "enabled": -if(_69){ +if(_6a){ Xinha._removeClass(el,"buttonDisabled"); el.disabled=false; }else{ @@ -515,61 +535,61 @@ } break; case "active": -if(_69){ +if(_6a){ Xinha._addClass(el,"buttonPressed"); }else{ Xinha._removeClass(el,"buttonPressed"); } break; } -this[id]=_69; +this[id]=_6a; } } function createSelect(txt){ -var _6d=null; +var _6e=null; var el=null; var cmd=null; -var _70=_62.config.customSelects; -var _71=null; -var _72=""; +var _71=_63.config.customSelects; +var _72=null; +var _73=""; switch(txt){ case "fontsize": case "fontname": case "formatblock": -_6d=_62.config[txt]; +_6e=_63.config[txt]; cmd=txt; break; default: cmd=txt; -var _73=_70[cmd]; -if(typeof _73!="undefined"){ -_6d=_73.options; -_71=_73.context; -if(typeof _73.tooltip!="undefined"){ -_72=_73.tooltip; +var _74=_71[cmd]; +if(typeof _74!="undefined"){ +_6e=_74.options; +_72=_74.context; +if(typeof _74.tooltip!="undefined"){ +_73=_74.tooltip; } }else{ alert("ERROR [createSelect]:\nCan't find the requested dropdown definition"); } break; } -if(_6d){ +if(_6e){ el=document.createElement("select"); -el.title=_72; -var obj={name:txt,element:el,enabled:true,text:false,cmd:cmd,state:setButtonStatus,context:_71}; +el.title=_73; +var obj={name:txt,element:el,enabled:true,text:false,cmd:cmd,state:setButtonStatus,context:_72}; Xinha.freeLater(obj); -_64[txt]=obj; -for(var i in _6d){ -if(typeof (_6d[i])!="string"){ +_65[txt]=obj; +for(var i in _6e){ +if(typeof (_6e[i])!="string"){ continue; } var op=document.createElement("option"); op.innerHTML=Xinha._lc(i); -op.value=_6d[i]; +op.value=_6e[i]; el.appendChild(op); } Xinha._addEvent(el,"change",function(){ -_62._comboSelected(el,txt); +_63._comboSelected(el,txt); }); } return el; @@ -578,7 +598,7 @@ var el,btn,obj=null; switch(txt){ case "separator": -if(_62.config.flowToolbars){ +if(_63.config.flowToolbars){ newLine(); } el=document.createElement("div"); @@ -598,10 +618,10 @@ el.title=Xinha._lc("Current style"); obj={name:txt,element:el,enabled:true,active:false,text:false,cmd:"textindicator",state:setButtonStatus}; Xinha.freeLater(obj); -_64[txt]=obj; +_65[txt]=obj; break; default: -btn=_62.config.btnList[txt]; +btn=_63.config.btnList[txt]; } if(!el&&btn){ el=document.createElement("a"); @@ -614,7 +634,7 @@ obj={name:txt,element:el,enabled:true,active:false,text:btn[2],cmd:btn[3],state:setButtonStatus,context:btn[4]||null}; Xinha.freeLater(el); Xinha.freeLater(obj); -_64[txt]=obj; +_65[txt]=obj; el.ondrag=function(){ return false; }; @@ -634,27 +654,31 @@ } }); Xinha._addEvent(el,"click",function(ev){ +ev=Xinha.is_ie?window.event:ev; +_63.btnClickEvent=ev; if(obj.enabled){ Xinha._removeClass(el,"buttonActive"); if(Xinha.is_gecko){ -_62.activateEditor(); +_63.activateEditor(); } -obj.cmd(_62,obj.name,obj); -Xinha._stopEvent(Xinha.is_ie?window.event:ev); +obj.cmd(_63,obj.name,obj); +Xinha._stopEvent(ev); } }); -var _7c=Xinha.makeBtnImg(btn[1]); -var img=_7c.firstChild; -el.appendChild(_7c); +var _7d=Xinha.makeBtnImg(btn[1]); +var img=_7d.firstChild; +Xinha.freeLater(_7d); +Xinha.freeLater(img); +el.appendChild(_7d); obj.imgel=img; -obj.swapImage=function(_7e){ -if(typeof _7e!="string"){ -img.src=_7e[0]; +obj.swapImage=function(_7f){ +if(typeof _7f!="string"){ +img.src=_7f[0]; img.style.position="relative"; -img.style.top=_7e[2]?("-"+(18*(_7e[2]+1))+"px"):"-18px"; -img.style.left=_7e[1]?("-"+(18*(_7e[1]+1))+"px"):"-18px"; +img.style.top=_7f[2]?("-"+(18*(_7f[2]+1))+"px"):"-18px"; +img.style.left=_7f[1]?("-"+(18*(_7f[1]+1))+"px"):"-18px"; }else{ -obj.imgel.src=_7e; +obj.imgel.src=_7f; img.style.top="0px"; img.style.left="0px"; } @@ -666,106 +690,106 @@ } return el; } -var _7f=true; +var _80=true; for(var i=0;i=0;){ -for(var j=_90[i].length;--j>=0;){ -switch(_90[i][j]){ +url=_editor_url+"modules/ColorPicker/ColorPicker.js"; +if(typeof ColorPicker=="undefined"&&!document.getElementById(url)){ +Xinha.loadPlugin("ColorPicker",function(){ +_90.generate(); +},url); +return false; +}else{ +if(typeof ColorPicker!="undefined"){ +_90.registerPlugin("ColorPicker"); +} +} +var _92=_90.config.toolbar; +for(i=_92.length;--i>=0;){ +for(var j=_92[i].length;--j>=0;){ +switch(_92[i][j]){ case "popupeditor": -_8f.registerPlugin("FullScreen"); +_90.registerPlugin("FullScreen"); break; case "insertimage": -if(typeof InsertImage=="undefined"&&typeof Xinha.prototype._insertImage=="undefined"){ +url=_editor_url+"modules/InsertImage/insert_image.js"; +if(typeof InsertImage=="undefined"&&typeof Xinha.prototype._insertImage=="undefined"&&!document.getElementById(url)){ Xinha.loadPlugin("InsertImage",function(){ -_8f.generate(); -},_editor_url+"modules/InsertImage/insert_image.js"); +_90.generate(); +},url); return false; }else{ if(typeof InsertImage!="undefined"){ -_8f.registerPlugin("InsertImage"); +_90.registerPlugin("InsertImage"); } } break; case "createlink": -if(typeof CreateLink=="undefined"&&typeof Xinha.prototype._createLink=="undefined"&&typeof Linker=="undefined"){ +url=_editor_url+"modules/CreateLink/link.js"; +if(typeof CreateLink=="undefined"&&typeof Xinha.prototype._createLink=="undefined"&&typeof Linker=="undefined"&&!document.getElementById(url)){ Xinha.loadPlugin("CreateLink",function(){ -_8f.generate(); -},_editor_url+"modules/CreateLink/link.js"); +_90.generate(); +},url); return false; }else{ if(typeof CreateLink!="undefined"){ -_8f.registerPlugin("CreateLink"); +_90.registerPlugin("CreateLink"); } } break; case "inserttable": -if(typeof InsertTable=="undefined"&&typeof Xinha.prototype._insertTable=="undefined"){ +url=_editor_url+"modules/InsertTable/insert_table.js"; +if(typeof InsertTable=="undefined"&&typeof Xinha.prototype._insertTable=="undefined"&&!document.getElementById(url)){ Xinha.loadPlugin("InsertTable",function(){ -_8f.generate(); -},_editor_url+"modules/InsertTable/insert_table.js"); +_90.generate(); +},url); return false; }else{ if(typeof InsertTable!="undefined"){ -_8f.registerPlugin("InsertTable"); +_90.registerPlugin("InsertTable"); } } break; -case "hilitecolor": -case "forecolor": -if(typeof ColorPicker=="undefined"){ -Xinha.loadPlugin("ColorPicker",function(){ -_8f.generate(); -},_editor_url+"modules/ColorPicker/ColorPicker.js"); -return false; -}else{ -if(typeof ColorPicker!="undefined"){ -_8f.registerPlugin("ColorPicker"); } } -break; } -} -} -if(Xinha.is_gecko&&(_8f.config.mozParaHandler=="best"||_8f.config.mozParaHandler=="dirty")){ +if(Xinha.is_gecko&&(_90.config.mozParaHandler=="best"||_90.config.mozParaHandler=="dirty")){ switch(this.config.mozParaHandler){ case "dirty": -var _92=_editor_url+"modules/Gecko/paraHandlerDirty.js"; +var _94=_editor_url+"modules/Gecko/paraHandlerDirty.js"; break; default: -var _92=_editor_url+"modules/Gecko/paraHandlerBest.js"; +var _94=_editor_url+"modules/Gecko/paraHandlerBest.js"; break; } -if(typeof EnterParagraphs=="undefined"){ +if(typeof EnterParagraphs=="undefined"&&!document.getElementById(_94)){ Xinha.loadPlugin("EnterParagraphs",function(){ -_8f.generate(); -},_92); +_90.generate(); +},_94); return false; } -_8f.registerPlugin("EnterParagraphs"); +_90.registerPlugin("EnterParagraphs"); } switch(this.config.getHtmlMethod){ case "TransformInnerHTML": -var _93=_editor_url+"modules/GetHtml/TransformInnerHTML.js"; +var _95=_editor_url+"modules/GetHtml/TransformInnerHTML.js"; break; default: -var _93=_editor_url+"modules/GetHtml/DOMwalk.js"; +var _95=_editor_url+"modules/GetHtml/DOMwalk.js"; break; } -if(typeof GetHtmlImplementation=="undefined"){ +if(typeof GetHtmlImplementation=="undefined"&&!document.getElementById(_95)){ Xinha.loadPlugin("GetHtmlImplementation",function(){ -_8f.generate(); -},_93); +_90.generate(); +},_95); return false; }else{ -_8f.registerPlugin("GetHtmlImplementation"); +_90.registerPlugin("GetHtmlImplementation"); } if(_editor_skin!==""){ -var _94=false; -var _95=document.getElementsByTagName("head")[0]; -var _96=document.getElementsByTagName("link"); -for(i=0;i<_96.length;i++){ -if((_96[i].rel=="stylesheet")&&(_96[i].href==_editor_url+"skins/"+_editor_skin+"/skin.css")){ -_94=true; +var _96=false; +var _97=document.getElementsByTagName("head")[0]; +var _98=document.getElementsByTagName("link"); +for(i=0;i<_98.length;i++){ +if((_98[i].rel=="stylesheet")&&(_98[i].href==_editor_url+"skins/"+_editor_skin+"/skin.css")){ +_96=true; } } -if(!_94){ -var _97=document.createElement("link"); -_97.type="text/css"; -_97.href=_editor_url+"skins/"+_editor_skin+"/skin.css"; -_97.rel="stylesheet"; -_95.appendChild(_97); +if(!_96){ +var _99=document.createElement("link"); +_99.type="text/css"; +_99.href=_editor_url+"skins/"+_editor_skin+"/skin.css"; +_99.rel="stylesheet"; +_97.appendChild(_99); } } +this.setLoadingMessage(Xinha._lc("Generate Xinha framework")); this._framework={"table":document.createElement("table"),"tbody":document.createElement("tbody"),"tb_row":document.createElement("tr"),"tb_cell":document.createElement("td"),"tp_row":document.createElement("tr"),"tp_cell":this._panels.top.container,"ler_row":document.createElement("tr"),"lp_cell":this._panels.left.container,"ed_cell":document.createElement("td"),"rp_cell":this._panels.right.container,"bp_row":document.createElement("tr"),"bp_cell":this._panels.bottom.container,"sb_row":document.createElement("tr"),"sb_cell":document.createElement("td")}; Xinha.freeLater(this._framework); var fw=this._framework; @@ -957,39 +990,46 @@ fw.tbody.appendChild(fw.bp_row); fw.tbody.appendChild(fw.sb_row); fw.table.appendChild(fw.tbody); -var _99=this._framework.table; -this._htmlArea=_99; +var _9b=this._framework.table; +this._htmlArea=_9b; Xinha.freeLater(this,"_htmlArea"); -_99.className="htmlarea"; +_9b.className="htmlarea"; this._framework.tb_cell.appendChild(this._createToolbar()); -var _9a=document.createElement("iframe"); -_9a.src=_editor_url+_8f.config.URIs.blank; -this._framework.ed_cell.appendChild(_9a); -this._iframe=_9a; +var _9c=document.createElement("iframe"); +_9c.src=_editor_url+_90.config.URIs.blank; +_9c.id="XinhaIFrame_"+this._textArea.id; +this._framework.ed_cell.appendChild(_9c); +this._iframe=_9c; this._iframe.className="xinha_iframe"; Xinha.freeLater(this,"_iframe"); -var _9b=this._createStatusBar(); -this._framework.sb_cell.appendChild(_9b); -var _9c=this._textArea; -_9c.parentNode.insertBefore(_99,_9c); -_9c.className="xinha_textarea"; -Xinha.removeFromParent(_9c); -this._framework.ed_cell.appendChild(_9c); -if(_9c.form){ +var _9d=this._createStatusBar(); +this._framework.sb_cell.appendChild(_9d); +var _9e=this._textArea; +_9e.parentNode.insertBefore(_9b,_9e); +_9e.className="xinha_textarea"; +Xinha.removeFromParent(_9e); +this._framework.ed_cell.appendChild(_9e); +Xinha.addDom0Event(this._textArea,"click",function(){ +if(Xinha._currentlyActiveEditor!=this){ +_90.updateToolbar(); +} +return true; +}); +if(_9e.form){ Xinha.prependDom0Event(this._textArea.form,"submit",function(){ -_8f._textArea.value=_8f.outwardHtml(_8f.getHTML()); +_90._textArea.value=_90.outwardHtml(_90.getHTML()); return true; }); -var _9d=_9c.value; +var _9f=_9e.value; Xinha.prependDom0Event(this._textArea.form,"reset",function(){ -_8f.setHTML(_8f.inwardHtml(_9d)); -_8f.updateToolbar(); +_90.setHTML(_90.inwardHtml(_9f)); +_90.updateToolbar(); return true; }); -if(!_9c.form.xinha_submit){ +if(!_9e.form.xinha_submit){ try{ -_9c.form.xinha_submit=_9c.form.submit; -_9c.form.submit=function(){ +_9e.form.xinha_submit=_9e.form.submit; +_9e.form.submit=function(){ this.onsubmit(); this.xinha_submit(); }; @@ -999,113 +1039,132 @@ } } Xinha.prependDom0Event(window,"unload",function(){ -_9c.value=_8f.outwardHtml(_8f.getHTML()); +_9e.value=_90.outwardHtml(_90.getHTML()); +if(!Xinha.is_ie){ +_9b.parentNode.replaceChild(_9e,_9b); +} return true; }); -_9c.style.display="none"; -_8f.initSize(); -_8f._iframeLoadDone=false; +_9e.style.display="none"; +_90.initSize(); +this.setLoadingMessage(Xinha._lc("Finishing")); +_90._iframeLoadDone=false; +if(Xinha.is_opera){ +Xinha._addEvent(this._iframe.contentWindow,"load",function(e){ +if(!_90._iframeLoadDone){ +_90._iframeLoadDone=true; +_90.initIframe(); +} +return true; +}); +}else{ Xinha._addEvent(this._iframe,"load",function(e){ -if(!_8f._iframeLoadDone){ -_8f._iframeLoadDone=true; -_8f.initIframe(); +if(!_90._iframeLoadDone){ +_90._iframeLoadDone=true; +_90.initIframe(); } return true; }); +} }; Xinha.prototype.initSize=function(){ -this.setLoadingMessage("Init editor size"); -var _9f=this; -var _a0=null; -var _a1=null; +this.setLoadingMessage(Xinha._lc("Init editor size")); +var _a2=this; +var _a3=null; +var _a4=null; switch(this.config.width){ case "auto": -_a0=this._initial_ta_size.w; +_a3=this._initial_ta_size.w; break; case "toolbar": -_a0=this._toolBar.offsetWidth+"px"; +_a3=this._toolBar.offsetWidth+"px"; break; default: -_a0=/[^0-9]/.test(this.config.width)?this.config.width:this.config.width+"px"; +_a3=/[^0-9]/.test(this.config.width)?this.config.width:this.config.width+"px"; break; } switch(this.config.height){ case "auto": -_a1=this._initial_ta_size.h; +_a4=this._initial_ta_size.h; break; default: -_a1=/[^0-9]/.test(this.config.height)?this.config.height:this.config.height+"px"; +_a4=/[^0-9]/.test(this.config.height)?this.config.height:this.config.height+"px"; break; } -this.sizeEditor(_a0,_a1,this.config.sizeIncludesBars,this.config.sizeIncludesPanels); +this.sizeEditor(_a3,_a4,this.config.sizeIncludesBars,this.config.sizeIncludesPanels); this.notifyOn("panel_change",function(){ -_9f.sizeEditor(); +_a2.sizeEditor(); }); }; -Xinha.prototype.sizeEditor=function(_a2,_a3,_a4,_a5){ +Xinha.prototype.sizeEditor=function(_a5,_a6,_a7,_a8){ +if(this._risizing){ +return; +} +this._risizing=true; +this.notifyOf("before_resize",{width:_a5,height:_a6}); this._iframe.style.height="100%"; this._textArea.style.height="100%"; this._iframe.style.width=""; this._textArea.style.width=""; -if(_a4!==null){ -this._htmlArea.sizeIncludesToolbars=_a4; +if(_a7!==null){ +this._htmlArea.sizeIncludesToolbars=_a7; } -if(_a5!==null){ -this._htmlArea.sizeIncludesPanels=_a5; +if(_a8!==null){ +this._htmlArea.sizeIncludesPanels=_a8; } -if(_a2){ -this._htmlArea.style.width=_a2; +if(_a5){ +this._htmlArea.style.width=_a5; if(!this._htmlArea.sizeIncludesPanels){ -var _a6=this._panels.right; -if(_a6.on&&_a6.panels.length&&Xinha.hasDisplayedChildren(_a6.div)){ +var _a9=this._panels.right; +if(_a9.on&&_a9.panels.length&&Xinha.hasDisplayedChildren(_a9.div)){ this._htmlArea.style.width=(this._htmlArea.offsetWidth+parseInt(this.config.panel_dimensions.right,10))+"px"; } -var _a7=this._panels.left; -if(_a7.on&&_a7.panels.length&&Xinha.hasDisplayedChildren(_a7.div)){ +var _aa=this._panels.left; +if(_aa.on&&_aa.panels.length&&Xinha.hasDisplayedChildren(_aa.div)){ this._htmlArea.style.width=(this._htmlArea.offsetWidth+parseInt(this.config.panel_dimensions.left,10))+"px"; } } } -if(_a3){ -this._htmlArea.style.height=_a3; +if(_a6){ +this._htmlArea.style.height=_a6; if(!this._htmlArea.sizeIncludesToolbars){ this._htmlArea.style.height=(this._htmlArea.offsetHeight+this._toolbar.offsetHeight+this._statusBar.offsetHeight)+"px"; } if(!this._htmlArea.sizeIncludesPanels){ -var _a8=this._panels.top; -if(_a8.on&&_a8.panels.length&&Xinha.hasDisplayedChildren(_a8.div)){ +var _ab=this._panels.top; +if(_ab.on&&_ab.panels.length&&Xinha.hasDisplayedChildren(_ab.div)){ this._htmlArea.style.height=(this._htmlArea.offsetHeight+parseInt(this.config.panel_dimensions.top,10))+"px"; } -var _a9=this._panels.bottom; -if(_a9.on&&_a9.panels.length&&Xinha.hasDisplayedChildren(_a9.div)){ +var _ac=this._panels.bottom; +if(_ac.on&&_ac.panels.length&&Xinha.hasDisplayedChildren(_ac.div)){ this._htmlArea.style.height=(this._htmlArea.offsetHeight+parseInt(this.config.panel_dimensions.bottom,10))+"px"; } } } -_a2=this._htmlArea.offsetWidth; -_a3=this._htmlArea.offsetHeight; -var _aa=this._panels; -var _ab=this; -var _ac=1; +_a5=this._htmlArea.offsetWidth; +_a6=this._htmlArea.offsetHeight; +var _ad=this._panels; +var _ae=this; +var _af=1; function panel_is_alive(pan){ -if(_aa[pan].on&&_aa[pan].panels.length&&Xinha.hasDisplayedChildren(_aa[pan].container)){ -_aa[pan].container.style.display=""; +if(_ad[pan].on&&_ad[pan].panels.length&&Xinha.hasDisplayedChildren(_ad[pan].container)){ +_ad[pan].container.style.display=""; return true; }else{ -_aa[pan].container.style.display="none"; +_ad[pan].container.style.display="none"; return false; } } if(panel_is_alive("left")){ -_ac+=1; +_af+=1; } if(panel_is_alive("right")){ -_ac+=1; +_af+=1; } -this._framework.tb_cell.colSpan=_ac; -this._framework.tp_cell.colSpan=_ac; -this._framework.bp_cell.colSpan=_ac; -this._framework.sb_cell.colSpan=_ac; +this._framework.tb_cell.colSpan=_af; +this._framework.tp_cell.colSpan=_af; +this._framework.bp_cell.colSpan=_af; +this._framework.sb_cell.colSpan=_af; if(!this._framework.tp_row.childNodes.length){ Xinha.removeFromParent(this._framework.tp_row); }else{ @@ -1133,135 +1192,146 @@ this._framework.bp_cell.style.height=this.config.panel_dimensions.bottom; this._framework.tb_cell.style.height=this._toolBar.offsetHeight+"px"; this._framework.sb_cell.style.height=this._statusBar.offsetHeight+"px"; -var _ae=_a3-this._toolBar.offsetHeight-this._statusBar.offsetHeight; +var _b1=_a6-this._toolBar.offsetHeight-this._statusBar.offsetHeight; if(panel_is_alive("top")){ -_ae-=parseInt(this.config.panel_dimensions.top,10); +_b1-=parseInt(this.config.panel_dimensions.top,10); } if(panel_is_alive("bottom")){ -_ae-=parseInt(this.config.panel_dimensions.bottom,10); +_b1-=parseInt(this.config.panel_dimensions.bottom,10); } -this._iframe.style.height=_ae+"px"; -var _af=_a2; +this._iframe.style.height=_b1+"px"; +var _b2=_a5; if(panel_is_alive("left")){ -_af-=parseInt(this.config.panel_dimensions.left,10); +_b2-=parseInt(this.config.panel_dimensions.left,10); } if(panel_is_alive("right")){ -_af-=parseInt(this.config.panel_dimensions.right,10); +_b2-=parseInt(this.config.panel_dimensions.right,10); } -this._iframe.style.width=_af+"px"; +this._iframe.style.width=_b2+"px"; this._textArea.style.height=this._iframe.style.height; this._textArea.style.width=this._iframe.style.width; this.notifyOf("resize",{width:this._htmlArea.offsetWidth,height:this._htmlArea.offsetHeight}); +this._risizing=false; }; -Xinha.prototype.addPanel=function(_b0){ +Xinha.prototype.registerPanel=function(_b3,_b4){ +if(!_b3){ +_b3="right"; +} +this.setLoadingMessage("Register "+_b3+" panel "); +var _b5=this.addPanel(_b3); +if(_b4){ +_b4.drawPanelIn(_b5); +} +}; +Xinha.prototype.addPanel=function(_b6){ var div=document.createElement("div"); -div.side=_b0; -if(_b0=="left"||_b0=="right"){ -div.style.width=this.config.panel_dimensions[_b0]; +div.side=_b6; +if(_b6=="left"||_b6=="right"){ +div.style.width=this.config.panel_dimensions[_b6]; if(this._iframe){ div.style.height=this._iframe.style.height; } } Xinha.addClasses(div,"panel"); -this._panels[_b0].panels.push(div); -this._panels[_b0].div.appendChild(div); +this._panels[_b6].panels.push(div); +this._panels[_b6].div.appendChild(div); this.notifyOf("panel_change",{"action":"add","panel":div}); return div; }; -Xinha.prototype.removePanel=function(_b2){ -this._panels[_b2.side].div.removeChild(_b2); -var _b3=[]; -for(var i=0;i\n"; -if(typeof _c4.config.baseHref!="undefined"&&_c4.config.baseHref!==null){ -_c5+="\n"; +var _cb=""; +if(_ca.config.browserQuirksMode===false){ +var _cc=""; +}else{ +if(_ca.config.browserQuirksMode===true){ +var _cc=""; +}else{ +var _cc=Xinha.getDoctype(document); } -_c5+=Xinha.addCoreCSS(); -if(_c4.config.pageStyle){ -_c5+=""; } -if(typeof _c4.config.pageStyleSheets!=="undefined"){ -for(var i=0;i<_c4.config.pageStyleSheets.length;i++){ -if(_c4.config.pageStyleSheets[i].length>0){ -_c5+=""; +if(!_ca.config.fullPage){ +_cb+=_cc+"\n"; +_cb+="\n"; +_cb+="\n"; +_cb+="\n"; +if(typeof _ca.config.baseHref!="undefined"&&_ca.config.baseHref!==null){ +_cb+="\n"; } +_cb+=Xinha.addCoreCSS(); +if(_ca.config.pageStyle){ +_cb+=""; } +if(typeof _ca.config.pageStyleSheets!=="undefined"){ +for(var i=0;i<_ca.config.pageStyleSheets.length;i++){ +if(_ca.config.pageStyleSheets[i].length>0){ +_cb+=""; } -_c5+="\n"; -_c5+="\n"; -_c5+=_c4.inwardHtml(_c4._textArea.value); -_c5+="\n"; -_c5+=""; +} +} +_cb+="\n"; +_cb+="\n"; +_cb+=_ca.inwardHtml(_ca._textArea.value); +_cb+="\n"; +_cb+=""; }else{ -_c5=_c4.inwardHtml(_c4._textArea.value); -if(_c5.match(Xinha.RE_doctype)){ -_c4.setDoctype(RegExp.$1); -_c5=_c5.replace(Xinha.RE_doctype,""); +_cb=_ca.inwardHtml(_ca._textArea.value); +if(_cb.match(Xinha.RE_doctype)){ +_ca.setDoctype(RegExp.$1); } -var _c7=_c5.match(//gi); -_c5=_c5.replace(/\s*/gi,""); -_c7?_c5=_c5.replace(/<\/head>/i,_c7.join("\n")+"\n"):null; +var _ce=_cb.match(//gi); +_cb=_cb.replace(/\s*/gi,""); +_ce?_cb=_cb.replace(/<\/head>/i,_ce.join("\n")+"\n"):null; } -doc.write(_c5); +doc.write(_cb); doc.close(); if(this.config.fullScreen){ this._fullScreen(); } this.setEditorEvents(); }; -Xinha.prototype.whenDocReady=function(F){ -var E=this; +Xinha.prototype.whenDocReady=function(f){ +var e=this; if(this._doc&&this._doc.body){ -F(); +f(); }else{ setTimeout(function(){ -E.whenDocReady(F); +e.whenDocReady(f); },50); } }; -Xinha.prototype.setMode=function(_ca){ -var _cb; -if(typeof _ca=="undefined"){ -_ca=this._editMode=="textmode"?"wysiwyg":"textmode"; +Xinha.prototype.setMode=function(_d1){ +var _d2; +if(typeof _d1=="undefined"){ +_d1=this._editMode=="textmode"?"wysiwyg":"textmode"; } -switch(_ca){ +switch(_d1){ case "textmode": this.setCC("iframe"); -_cb=this.outwardHtml(this.getHTML()); -this.setHTML(_cb); +_d2=this.outwardHtml(this.getHTML()); +this.setHTML(_d2); this.deactivateEditor(); this._iframe.style.display="none"; this._textArea.style.display=""; @@ -1404,9 +1482,9 @@ break; case "wysiwyg": this.setCC("textarea"); -_cb=this.inwardHtml(this.getHTML()); +_d2=this.inwardHtml(this.getHTML()); this.deactivateEditor(); -this.setHTML(_cb); +this.setHTML(_d2); this._iframe.style.display=""; this._textArea.style.display="none"; this.activateEditor(); @@ -1418,234 +1496,245 @@ this.findCC("iframe"); break; default: -alert("Mode <"+_ca+"> not defined!"); +alert("Mode <"+_d1+"> not defined!"); return false; } -this._editMode=_ca; +this._editMode=_d1; for(var i in this.plugins){ -var _cd=this.plugins[i].instance; -if(_cd&&typeof _cd.onMode=="function"){ -_cd.onMode(_ca); +var _d4=this.plugins[i].instance; +if(_d4&&typeof _d4.onMode=="function"){ +_d4.onMode(_d1); } } }; -Xinha.prototype.setFullHTML=function(_ce){ -var _cf=RegExp.multiline; +Xinha.prototype.setFullHTML=function(_d5){ +var _d6=RegExp.multiline; RegExp.multiline=true; -if(_ce.match(Xinha.RE_doctype)){ +if(_d5.match(Xinha.RE_doctype)){ this.setDoctype(RegExp.$1); -_ce=_ce.replace(Xinha.RE_doctype,""); } -RegExp.multiline=_cf; +RegExp.multiline=_d6; if(0){ -if(_ce.match(Xinha.RE_head)){ +if(_d5.match(Xinha.RE_head)){ this._doc.getElementsByTagName("head")[0].innerHTML=RegExp.$1; } -if(_ce.match(Xinha.RE_body)){ +if(_d5.match(Xinha.RE_body)){ this._doc.getElementsByTagName("body")[0].innerHTML=RegExp.$1; } }else{ -var _d0=this.editorIsActivated(); -if(_d0){ +var _d7=this.editorIsActivated(); +if(_d7){ this.deactivateEditor(); } -var _d1=/((.|\n)*?)<\/html>/i; -_ce=_ce.replace(_d1,"$1"); +var _d8=/((.|\n)*?)<\/html>/i; +_d5=_d5.replace(_d8,"$1"); this._doc.open("text/html","replace"); -this._doc.write(_ce); +this._doc.write(_d5); this._doc.close(); -if(_d0){ +if(_d7){ this.activateEditor(); } this.setEditorEvents(); return true; } }; Xinha.prototype.setEditorEvents=function(){ -var _d2=this; +var _d9=this; var doc=this._doc; -_d2.whenDocReady(function(){ +_d9.whenDocReady(function(){ Xinha._addEvents(doc,["mousedown"],function(){ -_d2.activateEditor(); +_d9.activateEditor(); return true; }); -Xinha._addEvents(doc,["keydown","keypress","mousedown","mouseup","drag"],function(_d4){ -return _d2._editorEvent(Xinha.is_ie?_d2._iframe.contentWindow.event:_d4); +Xinha._addEvents(doc,["keydown","keypress","mousedown","mouseup","drag"],function(_db){ +return _d9._editorEvent(Xinha.is_ie?_d9._iframe.contentWindow.event:_db); }); -for(var i in _d2.plugins){ -var _d6=_d2.plugins[i].instance; -Xinha.refreshPlugin(_d6); +for(var i in _d9.plugins){ +var _dd=_d9.plugins[i].instance; +Xinha.refreshPlugin(_dd); } -if(typeof _d2._onGenerate=="function"){ -_d2._onGenerate(); +if(typeof _d9._onGenerate=="function"){ +_d9._onGenerate(); } Xinha.addDom0Event(window,"resize",function(e){ -_d2.sizeEditor(); +_d9.sizeEditor(); }); -_d2.removeLoadingMessage(); +_d9.removeLoadingMessage(); }); }; Xinha.prototype.registerPlugin=function(){ -var _d8=arguments[0]; -if(_d8===null||typeof _d8=="undefined"||(typeof _d8=="string"&&eval("typeof "+_d8)=="undefined")){ +if(!Xinha.isSupportedBrowser){ +return; +} +var _df=arguments[0]; +if(_df===null||typeof _df=="undefined"||(typeof _df=="string"&&eval("typeof "+_df)=="undefined")){ return false; } -var _d9=[]; +var _e0=[]; for(var i=1;i=0;){ +function debug(_104,str){ +for(;--_104>=0;){ ta.value+=" "; } ta.value+=str+"\n"; } -function _dt(_fe,_ff){ -var tag=_fe.tagName.toLowerCase(),i; -var ns=Xinha.is_ie?_fe.scopeName:_fe.prefix; -debug(_ff,"- "+tag+" ["+ns+"]"); -for(i=_fe.firstChild;i;i=i.nextSibling){ +function _dt(root,_107){ +var tag=root.tagName.toLowerCase(),i; +var ns=Xinha.is_ie?root.scopeName:root.prefix; +debug(_107,"- "+tag+" ["+ns+"]"); +for(i=root.firstChild;i;i=i.nextSibling){ if(i.nodeType==1){ -_dt(i,_ff+2); +_dt(i,_107+2); } } } @@ -1666,19 +1755,19 @@ return txt; }; Xinha.prototype._wordClean=function(){ -var _104=this; -var _105={empty_tags:0,mso_class:0,mso_style:0,mso_xmlel:0,orig_len:this._doc.body.innerHTML.length,T:(new Date()).getTime()}; -var _106={empty_tags:"Empty tags removed: ",mso_class:"MSO class names removed: ",mso_style:"MSO inline style removed: ",mso_xmlel:"MSO XML elements stripped: "}; +var _10c=this; +var _10d={empty_tags:0,mso_class:0,mso_style:0,mso_xmlel:0,orig_len:this._doc.body.innerHTML.length,T:(new Date()).getTime()}; +var _10e={empty_tags:"Empty tags removed: ",mso_class:"MSO class names removed: ",mso_style:"MSO inline style removed: ",mso_xmlel:"MSO XML elements stripped: "}; function showStats(){ var txt="Xinha word cleaner stats: \n\n"; -for(var i in _105){ -if(_106[i]){ -txt+=_106[i]+_105[i]+"\n"; +for(var i in _10d){ +if(_10e[i]){ +txt+=_10e[i]+_10d[i]+"\n"; } } -txt+="\nInitial document length: "+_105.orig_len+"\n"; -txt+="Final document length: "+_104._doc.body.innerHTML.length+"\n"; -txt+="Clean-up took "+(((new Date()).getTime()-_105.T)/1000)+" seconds"; +txt+="\nInitial document length: "+_10d.orig_len+"\n"; +txt+="Final document length: "+_10c._doc.body.innerHTML.length+"\n"; +txt+="Clean-up took "+(((new Date()).getTime()-_10d.T)/1000)+" seconds"; alert(txt); } function clearClass(node){ @@ -1687,44 +1776,44 @@ node.className=newc; if(!(/\S/.test(node.className))){ node.removeAttribute("className"); -++_105.mso_class; +++_10d.mso_class; } } } function clearStyle(node){ -var _10c=node.style.cssText.split(/\s*;\s*/); -for(var i=_10c.length;--i>=0;){ -if((/^mso|^tab-stops/i.test(_10c[i]))||(/^margin\s*:\s*0..\s+0..\s+0../i.test(_10c[i]))){ -++_105.mso_style; -_10c.splice(i,1); +var _114=node.style.cssText.split(/\s*;\s*/); +for(var i=_114.length;--i>=0;){ +if((/^mso|^tab-stops/i.test(_114[i]))||(/^margin\s*:\s*0..\s+0..\s+0../i.test(_114[i]))){ +++_10d.mso_style; +_114.splice(i,1); } } -node.style.cssText=_10c.join("; "); +node.style.cssText=_114.join("; "); } -var _10e=null; +var _116=null; if(Xinha.is_ie){ -_10e=function(el){ +_116=function(el){ el.outerHTML=Xinha.htmlEncode(el.innerText); -++_105.mso_xmlel; +++_10d.mso_xmlel; }; }else{ -_10e=function(el){ +_116=function(el){ var txt=document.createTextNode(Xinha.getInnerText(el)); el.parentNode.insertBefore(txt,el); Xinha.removeFromParent(el); -++_105.mso_xmlel; +++_10d.mso_xmlel; }; } function checkEmpty(el){ if(/^(span|b|strong|i|em|font|div|p)$/i.test(el.tagName)&&!el.firstChild){ Xinha.removeFromParent(el); -++_105.empty_tags; +++_10d.empty_tags; } } function parseTree(root){ var tag=root.tagName.toLowerCase(),i,next; if((Xinha.is_ie&&root.scopeName!="HTML")||(!Xinha.is_ie&&(/:/.test(tag)))){ -_10e(root); +_116(root); return false; }else{ clearClass(root); @@ -1828,20 +1917,20 @@ } } }; -Xinha.prototype.disableToolbar=function(_11a){ +Xinha.prototype.disableToolbar=function(_122){ if(this._timerToolbar){ clearTimeout(this._timerToolbar); } -if(typeof _11a=="undefined"){ -_11a=[]; +if(typeof _122=="undefined"){ +_122=[]; }else{ -if(typeof _11a!="object"){ -_11a=[_11a]; +if(typeof _122!="object"){ +_122=[_122]; } } for(var i in this._toolbarObjects){ var btn=this._toolbarObjects[i]; -if(_11a.contains(i)){ +if(_122.contains(i)){ continue; } if(typeof (btn.state)!="function"){ @@ -1853,45 +1942,34 @@ Xinha.prototype.enableToolbar=function(){ this.updateToolbar(); }; -if(!Array.prototype.contains){ -Array.prototype.contains=function(_11d){ -var _11e=this; -for(var i=0;i<_11e.length;i++){ -if(_11d==_11e[i]){ -return true; -} -} -return false; -}; -} -if(!Array.prototype.indexOf){ -Array.prototype.indexOf=function(_120){ -var _121=this; -for(var i=0;i<_121.length;i++){ -if(_120==_121[i]){ -return i; -} -} -return null; -}; -} -Xinha.prototype.updateToolbar=function(_123){ +Xinha.prototype.updateToolbar=function(_125){ var doc=this._doc; var text=(this._editMode=="textmode"); -var _126=null; +var _128=null; if(!text){ -_126=this.getAllAncestors(); -if(this.config.statusBar&&!_123){ +_128=this.getAllAncestors(); +if(this.config.statusBar&&!_125){ +while(this._statusBarItems.length){ +var item=this._statusBarItems.pop(); +item.el=null; +item.editor=null; +item.onclick=null; +item.oncontextmenu=null; +item._xinha_dom0Events["click"]=null; +item._xinha_dom0Events["contextmenu"]=null; +item=null; +} this._statusBarTree.innerHTML=Xinha._lc("Path")+": "; -for(var i=_126.length;--i>=0;){ -var el=_126[i]; +for(var i=_128.length;--i>=0;){ +var el=_128[i]; if(!el){ continue; } var a=document.createElement("a"); a.href="javascript:void(0)"; a.el=el; a.editor=this; +this._statusBarItems.push(a); Xinha.addDom0Event(a,"click",function(){ this.blur(); this.editor.selectNodeContents(this.el); @@ -1920,78 +1998,79 @@ if(i!==0){ this._statusBarTree.appendChild(document.createTextNode(String.fromCharCode(187))); } +Xinha.freeLater(a); } } } for(var cmd in this._toolbarObjects){ var btn=this._toolbarObjects[cmd]; -var _12e=true; +var _131=true; if(typeof (btn.state)!="function"){ continue; } if(btn.context&&!text){ -_12e=false; -var _12f=btn.context; -var _130=[]; -if(/(.*)\[(.*?)\]/.test(_12f)){ -_12f=RegExp.$1; -_130=RegExp.$2.split(","); +_131=false; +var _132=btn.context; +var _133=[]; +if(/(.*)\[(.*?)\]/.test(_132)){ +_132=RegExp.$1; +_133=RegExp.$2.split(","); } -_12f=_12f.toLowerCase(); -var _131=(_12f=="*"); -for(var k=0;k<_126.length;++k){ -if(!_126[k]){ +_132=_132.toLowerCase(); +var _134=(_132=="*"); +for(var k=0;k<_128.length;++k){ +if(!_128[k]){ continue; } -if(_131||(_126[k].tagName.toLowerCase()==_12f)){ -_12e=true; -var _133=null; +if(_134||(_128[k].tagName.toLowerCase()==_132)){ +_131=true; +var _136=null; var att=null; var comp=null; -var _136=null; -for(var ka=0;ka<_130.length;++ka){ -_133=_130[ka].match(/(.*)(==|!=|===|!==|>|>=|<|<=)(.*)/); -att=_133[1]; -comp=_133[2]; -_136=_133[3]; -if(!eval(_126[k][att]+comp+_136)){ -_12e=false; +var _139=null; +for(var ka=0;ka<_133.length;++ka){ +_136=_133[ka].match(/(.*)(==|!=|===|!==|>|>=|<|<=)(.*)/); +att=_136[1]; +comp=_136[2]; +_139=_136[3]; +if(!eval(_128[k][att]+comp+_139)){ +_131=false; break; } } -if(_12e){ +if(_131){ break; } } } } -btn.state("enabled",(!text||btn.text)&&_12e); +btn.state("enabled",(!text||btn.text)&&_131); if(typeof cmd=="function"){ continue; } -var _138=this.config.customSelects[cmd]; -if((!text||btn.text)&&(typeof _138!="undefined")){ -_138.refresh(this); +var _13b=this.config.customSelects[cmd]; +if((!text||btn.text)&&(typeof _13b!="undefined")){ +_13b.refresh(this); continue; } switch(cmd){ case "fontname": case "fontsize": if(!text){ try{ -var _139=(""+doc.queryCommandValue(cmd)).toLowerCase(); -if(!_139){ +var _13c=(""+doc.queryCommandValue(cmd)).toLowerCase(); +if(!_13c){ btn.element.selectedIndex=0; break; } -var _13a=this.config[cmd]; -var _13b=0; -for(var j in _13a){ -if((j.toLowerCase()==_139)||(_13a[j].substr(0,_139.length).toLowerCase()==_139)){ -btn.element.selectedIndex=_13b; +var _13d=this.config[cmd]; +var _13e=0; +for(var j in _13d){ +if((j.toLowerCase()==_13c)||(_13d[j].substr(0,_13c.length).toLowerCase()==_13c)){ +btn.element.selectedIndex=_13e; throw "ok"; } -++_13b; +++_13e; } btn.element.selectedIndex=0; } @@ -2000,16 +2079,16 @@ } break; case "formatblock": -var _13d=[]; -for(var _13e in this.config.formatblock){ -if(typeof this.config.formatblock[_13e]=="string"){ -_13d[_13d.length]=this.config.formatblock[_13e]; +var _140=[]; +for(var _141 in this.config.formatblock){ +if(typeof this.config.formatblock[_141]=="string"){ +_140[_140.length]=this.config.formatblock[_141]; } } -var _13f=this._getFirstAncestor(this.getSelection(),_13d); -if(_13f){ -for(var x=0;x<_13d.length;x++){ -if(_13d[x].toLowerCase()==_13f.tagName.toLowerCase()){ +var _142=this._getFirstAncestor(this.getSelection(),_140); +if(_142){ +for(var x=0;x<_140.length;x++){ +if(_140[x].toLowerCase()==_142.tagName.toLowerCase()){ btn.element.selectedIndex=x; } } @@ -2020,15 +2099,15 @@ case "textindicator": if(!text){ try{ -var _141=btn.element.style; -_141.backgroundColor=Xinha._makeColor(doc.queryCommandValue(Xinha.is_ie?"backcolor":"hilitecolor")); -if(/transparent/i.test(_141.backgroundColor)){ -_141.backgroundColor=Xinha._makeColor(doc.queryCommandValue("backcolor")); +var _144=btn.element.style; +_144.backgroundColor=Xinha._makeColor(doc.queryCommandValue(Xinha.is_ie?"backcolor":"hilitecolor")); +if(/transparent/i.test(_144.backgroundColor)){ +_144.backgroundColor=Xinha._makeColor(doc.queryCommandValue("backcolor")); } -_141.color=Xinha._makeColor(doc.queryCommandValue("forecolor")); -_141.fontFamily=doc.queryCommandValue("fontname"); -_141.fontWeight=doc.queryCommandState("bold")?"bold":"normal"; -_141.fontStyle=doc.queryCommandState("italic")?"italic":"normal"; +_144.color=Xinha._makeColor(doc.queryCommandValue("forecolor")); +_144.fontFamily=doc.queryCommandValue("fontname"); +_144.fontWeight=doc.queryCommandState("bold")?"bold":"normal"; +_144.fontStyle=doc.queryCommandState("italic")?"italic":"normal"; } catch(ex){ } @@ -2039,12 +2118,12 @@ break; case "lefttoright": case "righttoleft": -var _142=this.getParentElement(); -while(_142&&!Xinha.isBlockElement(_142)){ -_142=_142.parentNode; +var _145=this.getParentElement(); +while(_145&&!Xinha.isBlockElement(_145)){ +_145=_145.parentNode; } -if(_142){ -btn.state("active",(_142.style.direction==((cmd=="righttoleft")?"rtl":"ltr"))); +if(_145){ +btn.state("active",(_145.style.direction==((cmd=="righttoleft")?"rtl":"ltr"))); } break; default: @@ -2059,9 +2138,9 @@ } if(this._customUndo&&!this._timerUndo){ this._undoTakeSnapshot(); -var _143=this; +var _146=this; this._timerUndo=setTimeout(function(){ -_143._timerUndo=null; +_146._timerUndo=null; },this.config.undoTimeout); } if(0&&Xinha.is_gecko){ @@ -2074,10 +2153,10 @@ } } } -for(var _145 in this.plugins){ -var _146=this.plugins[_145].instance; -if(_146&&typeof _146.onUpdateToolbar=="function"){ -_146.onUpdateToolbar(); +for(var _148 in this.plugins){ +var _149=this.plugins[_148].instance; +if(_149&&typeof _149.onUpdateToolbar=="function"){ +_149.onUpdateToolbar(); } } }; @@ -2091,7 +2170,7 @@ a.push(this._doc.body); return a; }; -Xinha.prototype._getFirstAncestor=function(sel,_14a){ +Xinha.prototype._getFirstAncestor=function(sel,_14d){ var prnt=this.activeElement(sel); if(prnt===null){ try{ @@ -2101,15 +2180,15 @@ return null; } } -if(typeof _14a=="string"){ -_14a=[_14a]; +if(typeof _14d=="string"){ +_14d=[_14d]; } while(prnt){ if(prnt.nodeType==1){ -if(_14a===null){ +if(_14d===null){ return prnt; } -if(_14a.contains(prnt.tagName.toLowerCase())){ +if(_14d.contains(prnt.tagName.toLowerCase())){ return prnt; } if(prnt.tagName.toLowerCase()=="body"){ @@ -2166,101 +2245,101 @@ } var rng=this.createRange(sel); }; -Xinha.prototype.surroundHTML=function(_151,_152){ +Xinha.prototype.surroundHTML=function(_154,_155){ var html=this.getSelectedHTML(); -this.insertHTML(_151+html+_152); +this.insertHTML(_154+html+_155); }; Xinha.prototype.hasSelectedText=function(){ return this.getSelectedHTML()!==""; }; Xinha.prototype._comboSelected=function(el,txt){ this.focusEditor(); -var _156=el.options[el.selectedIndex].value; +var _159=el.options[el.selectedIndex].value; switch(txt){ case "fontname": case "fontsize": -this.execCommand(txt,false,_156); +this.execCommand(txt,false,_159); break; case "formatblock": -if(!_156){ +if(!_159){ this.updateToolbar(); break; } -if(!Xinha.is_gecko||_156!=="blockquote"){ -_156="<"+_156+">"; +if(!Xinha.is_gecko||_159!=="blockquote"){ +_159="<"+_159+">"; } -this.execCommand(txt,false,_156); +this.execCommand(txt,false,_159); break; default: -var _157=this.config.customSelects[txt]; -if(typeof _157!="undefined"){ -_157.action(this); +var _15a=this.config.customSelects[txt]; +if(typeof _15a!="undefined"){ +_15a.action(this); }else{ alert("FIXME: combo box "+txt+" not implemented"); } break; } }; -Xinha.prototype._colorSelector=function(_158){ -var _159=this; +Xinha.prototype._colorSelector=function(_15b){ +var _15c=this; if(Xinha.is_gecko){ try{ -_159._doc.execCommand("useCSS",false,false); -_159._doc.execCommand("styleWithCSS",false,true); +_15c._doc.execCommand("useCSS",false,false); +_15c._doc.execCommand("styleWithCSS",false,true); } catch(ex){ } } -var btn=_159._toolbarObjects[_158].element; -var _15b; -if(_158=="hilitecolor"){ +var btn=_15c._toolbarObjects[_15b].element; +var _15e; +if(_15b=="hilitecolor"){ if(Xinha.is_ie){ -_158="backcolor"; -_15b=Xinha._colorToRgb(_159._doc.queryCommandValue("backcolor")); +_15b="backcolor"; +_15e=Xinha._colorToRgb(_15c._doc.queryCommandValue("backcolor")); }else{ -_15b=Xinha._colorToRgb(_159._doc.queryCommandValue("hilitecolor")); +_15e=Xinha._colorToRgb(_15c._doc.queryCommandValue("hilitecolor")); } }else{ -_15b=Xinha._colorToRgb(_159._doc.queryCommandValue("forecolor")); +_15e=Xinha._colorToRgb(_15c._doc.queryCommandValue("forecolor")); } -var _15c=function(_15d){ -_159._doc.execCommand(_158,false,_15d); +var _15f=function(_160){ +_15c._doc.execCommand(_15b,false,_160); }; if(Xinha.is_ie){ -var _15e=_159.createRange(_159.getSelection()); -_15c=function(_15f){ -_15e.select(); -_159._doc.execCommand(_158,false,_15f); +var _161=_15c.createRange(_15c.getSelection()); +_15f=function(_162){ +_161.select(); +_15c._doc.execCommand(_15b,false,_162); }; } -var _160=new Xinha.colorPicker({cellsize:_159.config.colorPickerCellSize,callback:_15c,granularity:_159.config.colorPickerGranularity,websafe:_159.config.colorPickerWebSafe,savecolors:_159.config.colorPickerSaveColors}); -_160.open(_159.config.colorPickerPosition,btn,_15b); +var _163=new Xinha.colorPicker({cellsize:_15c.config.colorPickerCellSize,callback:_15f,granularity:_15c.config.colorPickerGranularity,websafe:_15c.config.colorPickerWebSafe,savecolors:_15c.config.colorPickerSaveColors}); +_163.open(_15c.config.colorPickerPosition,btn,_15e); }; -Xinha.prototype.execCommand=function(_161,UI,_163){ -var _164=this; +Xinha.prototype.execCommand=function(_164,UI,_166){ +var _167=this; this.focusEditor(); -_161=_161.toLowerCase(); -if(this.firePluginEvent("onExecCommand",_161,UI,_163)){ +_164=_164.toLowerCase(); +if(this.firePluginEvent("onExecCommand",_164,UI,_166)){ this.updateToolbar(); return false; } -switch(_161){ +switch(_164){ case "htmlmode": this.setMode(); break; case "hilitecolor": case "forecolor": -this._colorSelector(_161); +this._colorSelector(_164); break; case "createlink": this._createLink(); break; case "undo": case "redo": if(this._customUndo){ -this[_161](); +this[_164](); }else{ -this._doc.execCommand(_161,UI,_163); +this._doc.execCommand(_164,UI,_166); } break; case "inserttable": @@ -2270,28 +2349,28 @@ this._insertImage(); break; case "about": -this._popupDialog(_164.config.URIs.about,null,this); +this._popupDialog(_167.config.URIs.about,null,this); break; case "showhelp": -this._popupDialog(_164.config.URIs.help,null,this); +this._popupDialog(_167.config.URIs.help,null,this); break; case "killword": this._wordClean(); break; case "cut": case "copy": case "paste": -this._doc.execCommand(_161,UI,_163); +this._doc.execCommand(_164,UI,_166); if(this.config.killWordOnPaste){ this._wordClean(); } break; case "lefttoright": case "righttoleft": if(this.config.changeJustifyWithDirection){ -this._doc.execCommand((_161=="righttoleft")?"justifyright":"justifyleft",UI,_163); +this._doc.execCommand((_164=="righttoleft")?"justifyright":"justifyleft",UI,_166); } -var dir=(_161=="righttoleft")?"rtl":"ltr"; +var dir=(_164=="righttoleft")?"rtl":"ltr"; var el=this.getParentElement(); while(el&&!Xinha.isBlockElement(el)){ el=el.parentNode; @@ -2306,21 +2385,21 @@ break; case "justifyleft": case "justifyright": -_161.match(/^justify(.*)$/); +_164.match(/^justify(.*)$/); var ae=this.activeElement(this.getSelection()); if(ae&&ae.tagName.toLowerCase()=="img"){ ae.align=ae.align==RegExp.$1?"":RegExp.$1; }else{ -this._doc.execCommand(_161,UI,_163); +this._doc.execCommand(_164,UI,_166); } break; default: try{ -this._doc.execCommand(_161,UI,_163); +this._doc.execCommand(_164,UI,_166); } catch(ex){ if(this.config.debug){ -alert(ex+"\n\nby execCommand("+_161+");"); +alert(ex+"\n\nby execCommand("+_164+");"); } } break; @@ -2329,35 +2408,35 @@ return false; }; Xinha.prototype._editorEvent=function(ev){ -var _169=this; -if(typeof _169._textArea["on"+ev.type]=="function"){ -_169._textArea["on"+ev.type](); +var _16c=this; +if(typeof _16c._textArea["on"+ev.type]=="function"){ +_16c._textArea["on"+ev.type](); } if(this.isKeyEvent(ev)){ -if(_169.firePluginEvent("onKeyPress",ev)){ +if(_16c.firePluginEvent("onKeyPress",ev)){ return false; } if(this.isShortCut(ev)){ this._shortCuts(ev); } } if(ev.type=="mousedown"){ -if(_169.firePluginEvent("onMouseDown",ev)){ +if(_16c.firePluginEvent("onMouseDown",ev)){ return false; } } -if(_169._timerToolbar){ -clearTimeout(_169._timerToolbar); +if(_16c._timerToolbar){ +clearTimeout(_16c._timerToolbar); } -_169._timerToolbar=setTimeout(function(){ -_169.updateToolbar(); -_169._timerToolbar=null; +_16c._timerToolbar=setTimeout(function(){ +_16c.updateToolbar(); +_16c._timerToolbar=null; },250); }; Xinha.prototype._shortCuts=function(ev){ var key=this.getKey(ev).toLowerCase(); var cmd=null; -var _16d=null; +var _170=null; switch(key){ case "b": cmd="bold"; @@ -2394,7 +2473,7 @@ break; case "n": cmd="formatblock"; -_16d="p"; +_170="p"; break; case "0": cmd="killword"; @@ -2406,20 +2485,20 @@ case "5": case "6": cmd="formatblock"; -_16d="h"+key; +_170="h"+key; break; } if(cmd){ -this.execCommand(cmd,false,_16d); +this.execCommand(cmd,false,_170); Xinha._stopEvent(ev); } }; -Xinha.prototype.convertNode=function(el,_16f){ -var _170=this._doc.createElement(_16f); +Xinha.prototype.convertNode=function(el,_172){ +var _173=this._doc.createElement(_172); while(el.firstChild){ -_170.appendChild(el.firstChild); +_173.appendChild(el.firstChild); } -return _170; +return _173; }; Xinha.prototype.scrollToElement=function(e){ if(!e){ @@ -2428,15 +2507,21 @@ return; } } -var _172=Xinha.getElementTopLeft(e); -this._iframe.contentWindow.scrollTo(_172.left,_172.top); +var _175=Xinha.getElementTopLeft(e); +this._iframe.contentWindow.scrollTo(_175.left,_175.top); }; +Xinha.prototype.getEditorContent=function(){ +return this.outwardHtml(this.getHTML()); +}; +Xinha.prototype.setEditorContent=function(html){ +this.setHTML(this.inwardHtml(html)); +}; Xinha.prototype.getHTML=function(){ var html=""; switch(this._editMode){ case "wysiwyg": if(!this.config.fullPage){ -html=Xinha.getHTML(this._doc.body,false,this); +html=Xinha.getHTML(this._doc.body,false,this).trim(); }else{ html=this.doctype+"\n"+Xinha.getHTML(this._doc.documentElement,true,this); } @@ -2452,18 +2537,22 @@ }; Xinha.prototype.outwardHtml=function(html){ for(var i in this.plugins){ -var _176=this.plugins[i].instance; -if(_176&&typeof _176.outwardHtml=="function"){ -html=_176.outwardHtml(html); +var _17a=this.plugins[i].instance; +if(_17a&&typeof _17a.outwardHtml=="function"){ +html=_17a.outwardHtml(html); } } html=html.replace(/<(\/?)b(\s|>|\/)/ig,"<$1strong$2"); html=html.replace(/<(\/?)i(\s|>|\/)/ig,"<$1em$2"); html=html.replace(/<(\/?)strike(\s|>|\/)/ig,"<$1del$2"); -html=html.replace("onclick=\"try{if(document.designMode && document.designMode == 'on') return false;}catch(e){} window.open(","onclick=\"window.open("); -var _177=location.href.replace(/(https?:\/\/[^\/]*)\/.*/,"$1")+"/"; -html=html.replace(/https?:\/\/null\//g,_177); -html=html.replace(/((href|src|background)=[\'\"])\/+/ig,"$1"+_177); +html=html.replace(/(<[^>]*onclick=['"])if\(window\.top && window\.top\.Xinha\)\{return false\}/gi,"$1"); +html=html.replace(/(<[^>]*onmouseover=['"])if\(window\.top && window\.top\.Xinha\)\{return false\}/gi,"$1"); +html=html.replace(/(<[^>]*onmouseout=['"])if\(window\.top && window\.top\.Xinha\)\{return false\}/gi,"$1"); +html=html.replace(/(<[^>]*onmousedown=['"])if\(window\.top && window\.top\.Xinha\)\{return false\}/gi,"$1"); +html=html.replace(/(<[^>]*onmouseup=['"])if\(window\.top && window\.top\.Xinha\)\{return false\}/gi,"$1"); +var _17b=location.href.replace(/(https?:\/\/[^\/]*)\/.*/,"$1")+"/"; +html=html.replace(/https?:\/\/null\//g,_17b); +html=html.replace(/((href|src|background)=[\'\"])\/+/ig,"$1"+_17b); html=this.outwardSpecialReplacements(html); html=this.fixRelativeLinks(html); if(this.config.sevenBitClean){ @@ -2479,17 +2568,21 @@ }; Xinha.prototype.inwardHtml=function(html){ for(var i in this.plugins){ -var _17b=this.plugins[i].instance; -if(_17b&&typeof _17b.inwardHtml=="function"){ -html=_17b.inwardHtml(html); +var _17f=this.plugins[i].instance; +if(_17f&&typeof _17f.inwardHtml=="function"){ +html=_17f.inwardHtml(html); } } html=html.replace(/<(\/?)del(\s|>|\/)/ig,"<$1strike$2"); -html=html.replace("onclick=\"window.open(","onclick=\"try{if(document.designMode && document.designMode == 'on') return false;}catch(e){} window.open("); +html=html.replace(/(<[^>]*onclick=["'])/gi,"$1if(window.top && window.top.Xinha){return false}"); +html=html.replace(/(<[^>]*onmouseover=["'])/gi,"$1if(window.top && window.top.Xinha){return false}"); +html=html.replace(/(<[^>]*onmouseout=["'])/gi,"$1if(window.top && window.top.Xinha){return false}"); +html=html.replace(/(<[^>]*onmouseodown=["'])/gi,"$1if(window.top && window.top.Xinha){return false}"); +html=html.replace(/(<[^>]*onmouseup=["'])/gi,"$1if(window.top && window.top.Xinha){return false}"); html=this.inwardSpecialReplacements(html); html=html.replace(/(]*)(javascript)/gi,"$1freezescript"); -var _17c=new RegExp("((href|src|background)=['\"])/+","gi"); -html=html.replace(_17c,"$1"+location.href.replace(/(https?:\/\/[^\/]*)\/.*/,"$1")+"/"); +var _180=new RegExp("((href|src|background)=['\"])/+","gi"); +html=html.replace(_180,"$1"+location.href.replace(/(https?:\/\/[^\/]*)\/.*/,"$1")+"/"); html=this.fixRelativeLinks(html); if(this.config.fullPage){ html=Xinha.addCoreCSS(html); @@ -2503,7 +2596,7 @@ if(typeof from.replace!="function"||typeof to.replace!="function"){ continue; } -var reg=new RegExp(from.replace(Xinha.RE_Specials,"\\$1"),"g"); +var reg=new RegExp(Xinha.escapeStringForRegExp(from),"g"); html=html.replace(reg,to.replace(/\$/g,"$$$$")); } return html; @@ -2515,7 +2608,7 @@ if(typeof from.replace!="function"||typeof to.replace!="function"){ continue; } -var reg=new RegExp(from.replace(Xinha.RE_Specials,"\\$1"),"g"); +var reg=new RegExp(Xinha.escapeStringForRegExp(from),"g"); html=html.replace(reg,to.replace(/\$/g,"$$$$")); } return html; @@ -2534,22 +2627,22 @@ relPath=new RegExp("(.*?)(([^/]*/){"+url_m.length+"})[^/]*$"); base_m=b.match(relPath); absPath=url[2].replace(/(\.\.\/)*/,base_m[1]); -html=html.replace(new RegExp(url[2].replace(Xinha.RE_Specials,"\\$1")),absPath); +html=html.replace(new RegExp(Xinha.escapeStringForRegExp(url[2])),absPath); } } } if(typeof this.config.stripSelfNamedAnchors!="undefined"&&this.config.stripSelfNamedAnchors){ -var _18c=new RegExp(document.location.href.replace(/&/g,"&").replace(Xinha.RE_Specials,"\\$1")+"(#[^'\" ]*)","g"); -html=html.replace(_18c,"$1"); +var _190=new RegExp(Xinha.escapeStringForRegExp(document.location.href.replace(/&/g,"&"))+"(#[^'\" ]*)","g"); +html=html.replace(_190,"$1"); } if(typeof this.config.stripBaseHref!="undefined"&&this.config.stripBaseHref){ -var _18d=null; +var _191=null; if(typeof this.config.baseHref!="undefined"&&this.config.baseHref!==null){ -_18d=new RegExp("((href|src|background)=\")("+this.config.baseHref.replace(Xinha.RE_Specials,"\\$1")+")","g"); +_191=new RegExp("((href|src|background)=\")("+Xinha.escapeStringForRegExp(this.config.baseHref)+")","g"); }else{ -_18d=new RegExp("((href|src|background)=\")("+document.location.href.replace(/^(https?:\/\/[^\/]*)(.*)/,"$1").replace(Xinha.RE_Specials,"\\$1")+")","g"); +_191=new RegExp("((href|src|background)=\")("+Xinha.escapeStringForRegExp(document.location.href.replace(/^(https?:\/\/[^\/]*)(.*)/,"$1"))+")","g"); } -html=html.replace(_18d,"$1"); +html=html.replace(_191,"$1"); } return html; }; @@ -2583,45 +2676,32 @@ } this._textArea.value=html; }; -Xinha.prototype.setDoctype=function(_190){ -this.doctype=_190; +Xinha.prototype.setDoctype=function(_194){ +this.doctype=_194; }; Xinha._object=null; Xinha.cloneObject=function(obj){ if(!obj){ return null; } -var _192={}; +var _196={}; if(obj.constructor.toString().match(/\s*function Array\(/)){ -_192=obj.constructor(); +_196=obj.constructor(); } if(obj.constructor.toString().match(/\s*function Function\(/)){ -_192=obj; +_196=obj; }else{ for(var n in obj){ var node=obj[n]; if(typeof node=="object"){ -_192[n]=Xinha.cloneObject(node); +_196[n]=Xinha.cloneObject(node); }else{ -_192[n]=node; +_196[n]=node; } } } -return _192; +return _196; }; -Xinha.checkSupportedBrowser=function(){ -if(Xinha.is_gecko){ -if(navigator.productSub<20021201){ -alert("You need at least Mozilla-1.3 Alpha.\nSorry, your Gecko is not supported."); -return false; -} -if(navigator.productSub<20030210){ -alert("Mozilla < 1.3 Beta is not supported!\nI'll try, though, but it might not work."); -} -} -return Xinha.is_gecko||Xinha.ie_version>=5.5; -}; -Xinha._eventFlushers=[]; Xinha.flushEvents=function(){ var x=0; var e=Xinha._eventFlushers.pop(); @@ -2643,26 +2723,27 @@ e=Xinha._eventFlushers.pop(); } }; +Xinha._eventFlushers=[]; if(document.addEventListener){ -Xinha._addEvent=function(el,_198,func){ -el.addEventListener(_198,func,true); -Xinha._eventFlushers.push([el,_198,func]); +Xinha._addEvent=function(el,_19c,func){ +el.addEventListener(_19c,func,true); +Xinha._eventFlushers.push([el,_19c,func]); }; -Xinha._removeEvent=function(el,_19b,func){ -el.removeEventListener(_19b,func,true); +Xinha._removeEvent=function(el,_19f,func){ +el.removeEventListener(_19f,func,true); }; Xinha._stopEvent=function(ev){ ev.preventDefault(); ev.stopPropagation(); }; }else{ if(document.attachEvent){ -Xinha._addEvent=function(el,_19f,func){ -el.attachEvent("on"+_19f,func); -Xinha._eventFlushers.push([el,_19f,func]); +Xinha._addEvent=function(el,_1a3,func){ +el.attachEvent("on"+_1a3,func); +Xinha._eventFlushers.push([el,_1a3,func]); }; -Xinha._removeEvent=function(el,_1a2,func){ -el.detachEvent("on"+_1a2,func); +Xinha._removeEvent=function(el,_1a6,func){ +el.detachEvent("on"+_1a6,func); }; Xinha._stopEvent=function(ev){ try{ @@ -2673,10 +2754,10 @@ } }; }else{ -Xinha._addEvent=function(el,_1a6,func){ +Xinha._addEvent=function(el,_1aa,func){ alert("_addEvent is not supported"); }; -Xinha._removeEvent=function(el,_1a9,func){ +Xinha._removeEvent=function(el,_1ad,func){ alert("_removeEvent is not supported"); }; Xinha._stopEvent=function(ev){ @@ -2712,19 +2793,19 @@ if(typeof el["on"+ev]=="function"){ el._xinha_dom0Events[ev].push(el["on"+ev]); } -el["on"+ev]=function(_1bc){ +el["on"+ev]=function(_1c0){ var a=el._xinha_dom0Events[ev]; -var _1be=true; +var _1c2=true; for(var i=a.length;--i>=0;){ el._xinha_tempEventHandler=a[i]; -if(el._xinha_tempEventHandler(_1bc)===false){ +if(el._xinha_tempEventHandler(_1c0)===false){ el._xinha_tempEventHandler=null; -_1be=false; +_1c2=false; break; } el._xinha_tempEventHandler=null; } -return _1be; +return _1c2; }; Xinha._eventFlushers.push([el,ev]); } @@ -2743,35 +2824,6 @@ } } }; -Xinha._removeClass=function(el,_1c6){ -if(!(el&&el.className)){ -return; -} -var cls=el.className.split(" "); -var ar=[]; -for(var i=cls.length;i>0;){ -if(cls[--i]!=_1c6){ -ar[ar.length]=cls[i]; -} -} -el.className=ar.join(" "); -}; -Xinha._addClass=function(el,_1cb){ -Xinha._removeClass(el,_1cb); -el.className+=" "+_1cb; -}; -Xinha._hasClass=function(el,_1cd){ -if(!(el&&el.className)){ -return false; -} -var cls=el.className.split(" "); -for(var i=cls.length;i>0;){ -if(cls[--i]==_1cd){ -return true; -} -} -return false; -}; Xinha._blockTags=" body form textarea fieldset ul ol dl li div "+"p h1 h2 h3 h4 h5 h6 quote pre table thead "+"tbody tfoot tr td th iframe address blockquote "; Xinha.isBlockElement=function(el){ return el&&el.nodeType==1&&(Xinha._blockTags.indexOf(" "+el.tagName.toLowerCase()+" ")!=-1); @@ -2795,13 +2847,13 @@ str=str.replace(/\x22/g,"""); return str; }; -Xinha.prototype.stripBaseURL=function(_1d4){ +Xinha.prototype.stripBaseURL=function(_1cd){ if(this.config.baseHref===null||!this.config.stripBaseHref){ -return _1d4; +return _1cd; } -var _1d5=this.config.baseHref.replace(/^(https?:\/\/[^\/]+)(.*)$/,"$1"); -var _1d6=new RegExp(_1d5); -return _1d4.replace(_1d6,""); +var _1ce=this.config.baseHref.replace(/^(https?:\/\/[^\/]+)(.*)$/,"$1"); +var _1cf=new RegExp(_1ce); +return _1cd.replace(_1cf,""); }; String.prototype.trim=function(){ return this.replace(/^\s+/,"").replace(/\s+$/,""); @@ -2844,25 +2896,25 @@ } return null; }; -Xinha.prototype._popupDialog=function(url,_1e0,init){ -Dialog(this.popupURL(url),_1e0,init); +Xinha.prototype._popupDialog=function(url,_1d9,init){ +Dialog(this.popupURL(url),_1d9,init); }; -Xinha.prototype.imgURL=function(file,_1e3){ -if(typeof _1e3=="undefined"){ +Xinha.prototype.imgURL=function(file,_1dc){ +if(typeof _1dc=="undefined"){ return _editor_url+file; }else{ -return _editor_url+"plugins/"+_1e3+"/img/"+file; +return _editor_url+"plugins/"+_1dc+"/img/"+file; } }; Xinha.prototype.popupURL=function(file){ var url=""; if(file.match(/^plugin:\/\/(.*?)\/(.*)/)){ -var _1e6=RegExp.$1; -var _1e7=RegExp.$2; -if(!(/\.html$/.test(_1e7))){ -_1e7+=".html"; +var _1df=RegExp.$1; +var _1e0=RegExp.$2; +if(!(/\.html$/.test(_1e0))){ +_1e0+=".html"; } -url=_editor_url+"plugins/"+_1e6+"/popups/"+_1e7; +url=_editor_url+"plugins/"+_1df+"/popups/"+_1e0; }else{ if(file.match(/^\/.*?/)){ url=file; @@ -2882,38 +2934,55 @@ return null; }; Xinha.prototype._toggleBorders=function(){ -var _1eb=this._doc.getElementsByTagName("TABLE"); -if(_1eb.length!==0){ +var _1e4=this._doc.getElementsByTagName("TABLE"); +if(_1e4.length!==0){ if(!this.borders){ this.borders=true; }else{ this.borders=false; } -for(var i=0;i<_1eb.length;i++){ +for(var i=0;i<_1e4.length;i++){ if(this.borders){ -Xinha._addClass(_1eb[i],"htmtableborders"); +Xinha._addClass(_1e4[i],"htmtableborders"); }else{ -Xinha._removeClass(_1eb[i],"htmtableborders"); +Xinha._removeClass(_1e4[i],"htmtableborders"); } } } return true; }; Xinha.addCoreCSS=function(html){ -var _1ee="\n"; +var _1e7="\n"; if(html&&//i.test(html)){ -return html.replace(//i,""+_1ee); +return html.replace(//i,""+_1e7); }else{ if(html){ -return _1ee+html; +return _1e7+html; }else{ -return _1ee; +return _1e7; } } }; Xinha.stripCoreCSS=function(html){ return html.replace(/]+title="Xinha Internal CSS"(.|\n)*?<\/style>/i,""); }; +Xinha._removeClass=function(el,_1ea){ +if(!(el&&el.className)){ +return; +} +var cls=el.className.split(" "); +var ar=[]; +for(var i=cls.length;i>0;){ +if(cls[--i]!=_1ea){ +ar[ar.length]=cls[i]; +} +} +el.className=ar.join(" "); +}; +Xinha._addClass=function(el,_1ef){ +Xinha._removeClass(el,_1ef); +el.className+=" "+_1ef; +}; Xinha.addClasses=function(el,_1f1){ if(el!==null){ var _1f2=el.className.trim().split(" "); @@ -2953,44 +3022,56 @@ Xinha.removeClass=Xinha._removeClass; Xinha._addClasses=Xinha.addClasses; Xinha._removeClasses=Xinha.removeClasses; -Xinha._postback=function(url,data,_201){ +Xinha._hasClass=function(el,_200){ +if(!(el&&el.className)){ +return false; +} +var cls=el.className.split(" "); +for(var i=cls.length;i>0;){ +if(cls[--i]==_200){ +return true; +} +} +return false; +}; +Xinha._postback=function(url,data,_205){ var req=null; req=Xinha.getXMLHTTPRequestObject(); -var _203=""; +var _207=""; if(typeof data=="string"){ -_203=data; +_207=data; }else{ if(typeof data=="object"){ for(var i in data){ -_203+=(_203.length?"&":"")+i+"="+encodeURIComponent(data[i]); +_207+=(_207.length?"&":"")+i+"="+encodeURIComponent(data[i]); } } } function callBack(){ if(req.readyState==4){ if(req.status==200||Xinha.isRunLocally&&req.status==0){ -if(typeof _201=="function"){ -_201(req.responseText,req); +if(typeof _205=="function"){ +_205(req.responseText,req); } }else{ -alert("An error has occurred: "+req.statusText); +alert("An error has occurred: "+req.statusText+"\nURL: "+url); } } } req.onreadystatechange=callBack; req.open("POST",url,true); req.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"); -req.send(_203); +req.send(_207); }; -Xinha._getback=function(url,_206){ +Xinha._getback=function(url,_20a){ var req=null; req=Xinha.getXMLHTTPRequestObject(); function callBack(){ if(req.readyState==4){ if(req.status==200||Xinha.isRunLocally&&req.status==0){ -_206(req.responseText,req); +_20a(req.responseText,req); }else{ -alert("An error has occurred: "+req.statusText); +alert("An error has occurred: "+req.statusText+"\nURL: "+url); } } } @@ -3019,55 +3100,93 @@ x.document.write("
"+s+"
"); } } +if(!Array.prototype.contains){ +Array.prototype.contains=function(_212){ +var _213=this; +for(var i=0;i<_213.length;i++){ +if(_212==_213[i]){ +return true; +} +} +return false; +}; +} +if(!Array.prototype.indexOf){ +Array.prototype.indexOf=function(_215){ +var _216=this; +for(var i=0;i<_216.length;i++){ +if(_215==_216[i]){ +return i; +} +} +return null; +}; +} +if(!Array.prototype.append){ +Array.prototype.append=function(a){ +for(var i=0;i>2; enc2=((chr1&3)<<4)|(chr2>>4); enc3=((chr2&15)<<2)|(chr3>>6); @@ -3238,34 +3362,34 @@ enc4=64; } } -_23f=_23f+_23e.charAt(enc1)+_23e.charAt(enc2)+_23e.charAt(enc3)+_23e.charAt(enc4); -}while(i<_23d.length); -return _23f; +_24a=_24a+_249.charAt(enc1)+_249.charAt(enc2)+_249.charAt(enc3)+_249.charAt(enc4); +}while(i<_248.length); +return _24a; }; -Xinha.base64_decode=function(_243){ -var _244="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; -var _245=""; +Xinha.base64_decode=function(_24e){ +var _24f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; +var _250=""; var chr1,chr2,chr3; var enc1,enc2,enc3,enc4; var i=0; -_243=_243.replace(/[^A-Za-z0-9\+\/\=]/g,""); +_24e=_24e.replace(/[^A-Za-z0-9\+\/\=]/g,""); do{ -enc1=_244.indexOf(_243.charAt(i++)); -enc2=_244.indexOf(_243.charAt(i++)); -enc3=_244.indexOf(_243.charAt(i++)); -enc4=_244.indexOf(_243.charAt(i++)); +enc1=_24f.indexOf(_24e.charAt(i++)); +enc2=_24f.indexOf(_24e.charAt(i++)); +enc3=_24f.indexOf(_24e.charAt(i++)); +enc4=_24f.indexOf(_24e.charAt(i++)); chr1=(enc1<<2)|(enc2>>4); chr2=((enc2&15)<<4)|(enc3>>2); chr3=((enc3&3)<<6)|enc4; -_245=_245+String.fromCharCode(chr1); +_250=_250+String.fromCharCode(chr1); if(enc3!=64){ -_245=_245+String.fromCharCode(chr2); +_250=_250+String.fromCharCode(chr2); } if(enc4!=64){ -_245=_245+String.fromCharCode(chr3); +_250=_250+String.fromCharCode(chr3); } -}while(i<_243.length); -return _245; +}while(i<_24e.length); +return _250; }; Xinha.removeFromParent=function(el){ if(!el.parentNode){ @@ -3284,92 +3408,155 @@ } return false; }; -Xinha.viewportSize=function(_24c){ -_24c=(_24c)?_24c:window; +Xinha.viewportSize=function(_257){ +_257=(_257)?_257:window; var x,y; -if(_24c.innerHeight){ -x=_24c.innerWidth; -y=_24c.innerHeight; +if(_257.innerHeight){ +x=_257.innerWidth; +y=_257.innerHeight; }else{ -if(_24c.document.documentElement&&_24c.document.documentElement.clientHeight){ -x=_24c.document.documentElement.clientWidth; -y=_24c.document.documentElement.clientHeight; +if(_257.document.documentElement&&_257.document.documentElement.clientHeight){ +x=_257.document.documentElement.clientWidth; +y=_257.document.documentElement.clientHeight; }else{ -if(_24c.document.body){ -x=_24c.document.body.clientWidth; -y=_24c.document.body.clientHeight; +if(_257.document.body){ +x=_257.document.body.clientWidth; +y=_257.document.body.clientHeight; } } } return {"x":x,"y":y}; }; -Xinha.prototype.scrollPos=function(_24e){ -_24e=(_24e)?_24e:window; +Xinha.pageSize=function(_259){ +_259=(_259)?_259:window; var x,y; -if(_24e.pageYOffset){ -x=_24e.pageXOffset; -y=_24e.pageYOffset; +var _25b=_259.document.body.scrollHeight; +var _25c=_259.document.documentElement.scrollHeight; +if(_25b>_25c){ +x=_259.document.body.scrollWidth; +y=_259.document.body.scrollHeight; }else{ -if(_24e.document.documentElement&&document.documentElement.scrollTop){ -x=_24e.document.documentElement.scrollLeft; -y=_24e.document.documentElement.scrollTop; +x=_259.document.documentElement.scrollWidth; +y=_259.document.documentElement.scrollHeight; +} +return {"x":x,"y":y}; +}; +Xinha.prototype.scrollPos=function(_25d){ +_25d=(_25d)?_25d:window; +var x,y; +if(_25d.pageYOffset){ +x=_25d.pageXOffset; +y=_25d.pageYOffset; }else{ -if(_24e.document.body){ -x=_24e.document.body.scrollLeft; -y=_24e.document.body.scrollTop; +if(_25d.document.documentElement&&document.documentElement.scrollTop){ +x=_25d.document.documentElement.scrollLeft; +y=_25d.document.documentElement.scrollTop; +}else{ +if(_25d.document.body){ +x=_25d.document.body.scrollLeft; +y=_25d.document.body.scrollTop; } } } return {"x":x,"y":y}; }; -Xinha.getElementTopLeft=function(_250){ -var _251={top:0,left:0}; -while(_250){ -_251.top+=_250.offsetTop; -_251.left+=_250.offsetLeft; -if(_250.offsetParent&&_250.offsetParent.tagName.toLowerCase()!="body"){ -_250=_250.offsetParent; -}else{ -_250=null; +Xinha.getElementTopLeft=function(_25f){ +var _260=curtop=0; +if(_25f.offsetParent){ +_260=_25f.offsetLeft; +curtop=_25f.offsetTop; +while(_25f=_25f.offsetParent){ +_260+=_25f.offsetLeft; +curtop+=_25f.offsetTop; } } -return _251; +return {top:curtop,left:_260}; }; Xinha.findPosX=function(obj){ -var _253=0; +var _262=0; if(obj.offsetParent){ return Xinha.getElementTopLeft(obj).left; }else{ if(obj.x){ -_253+=obj.x; +_262+=obj.x; } } -return _253; +return _262; }; Xinha.findPosY=function(obj){ -var _255=0; +var _264=0; if(obj.offsetParent){ return Xinha.getElementTopLeft(obj).top; }else{ if(obj.y){ -_255+=obj.y; +_264+=obj.y; } } -return _255; +return _264; }; -Xinha.prototype.setLoadingMessage=function(_256,_257,_258){ -if(!this.config.showLoading||!document.getElementById("loading_sub_"+this._textArea.name)){ +Xinha.createLoadingMessages=function(_265){ +if(Xinha.loadingMessages||!Xinha.isSupportedBrowser){ return; } -var elt=document.getElementById("loading_sub_"+this._textArea.name); -elt.innerHTML=Xinha._lc(_256,_257,_258); +Xinha.loadingMessages=[]; +for(var i=0;i<_265.length;i++){ +Xinha.loadingMessages.push(Xinha.createLoadingMessage(Xinha.getElementById("textarea",_265[i]))); +} }; -Xinha.prototype.removeLoadingMessage=function(){ -if(!this.config.showLoading||!document.getElementById("loading_"+this._textArea.name)){ +Xinha.createLoadingMessage=function(_267,text){ +if(document.getElementById("loading_"+_267.id)||!Xinha.isSupportedBrowser){ return; } -document.body.removeChild(document.getElementById("loading_"+this._textArea.name)); +var _269=document.createElement("div"); +_269.id="loading_"+_267.id; +_269.className="loading"; +_269.style.left=Xinha.findPosX(_267)+"px"; +_269.style.top=(Xinha.findPosY(_267)+_267.offsetHeight/2)-50+"px"; +_269.style.width=_267.offsetWidth+"px"; +var _26a=document.createElement("div"); +_26a.className="loading_main"; +_26a.id="loading_main_"+_267.id; +_26a.appendChild(document.createTextNode(Xinha._lc("Loading in progress. Please wait!"))); +var _26b=document.createElement("div"); +_26b.className="loading_sub"; +_26b.id="loading_sub_"+_267.id; +text=text?text:Xinha._lc("Constructing object"); +_26b.appendChild(document.createTextNode(text)); +_269.appendChild(_26a); +_269.appendChild(_26b); +document.body.appendChild(_269); +Xinha.freeLater(_269); +Xinha.freeLater(_26a); +Xinha.freeLater(_26b); +return _26b; }; +Xinha.prototype.setLoadingMessage=function(_26c,_26d){ +if(!document.getElementById("loading_sub_"+this._textArea.id)){ +return; +} +document.getElementById("loading_main_"+this._textArea.id).innerHTML=_26d?_26d:Xinha._lc("Loading in progress. Please wait!"); +document.getElementById("loading_sub_"+this._textArea.id).innerHTML=_26c; +}; +Xinha.setLoadingMessage=function(_26e){ +if(!Xinha.loadingMessages){ +return; +} +for(var i=0;i]+)/ig; -HTMLArea.RE_doctype = /()\n?/i; -HTMLArea.RE_head = /((.|\n)*?)<\/head>/i; -HTMLArea.RE_body = /]*>((.|\n|\r|\t)*?)<\/body>/i; -HTMLArea.RE_Specials = /([\/\^$*+?.()|{}[\]])/g; -HTMLArea.RE_email = /[a-z0-9_]{3,}@[a-z0-9_-]{2,}(\.[a-z0-9_-]{2,})+/i; -HTMLArea.RE_url = /(https?:\/\/)?(([a-z0-9_]+:[a-z0-9_]+@)?[a-z0-9_-]{2,}(\.[a-z0-9_-]{2,}){2,}(:[0-9]+)?(\/\S+)*)/i; - -HTMLArea.Config = function () { - var cfg = this; - this.version = HTMLArea.version.Revision; - - // Width and Height - // you may set these as follows - // width = 'auto' -- the width of the original textarea will be used - // width = 'toolbar' -- the width of the toolbar will be used - // width = '' -- use any css measurement, eg width = '75%' - // - // height = 'auto' -- the height of the original textarea - // height = '' -- any css measurement, eg height = '480px' - this.width = "auto"; - this.height = "auto"; - - // the next parameter specifies whether the toolbar should be included - // in the size above, or are extra to it. If false then it's recommended - // to have explicit pixel sizes above (or on your textarea and have auto above) - this.sizeIncludesBars = true; - - // the next parameter specifies whether the panels should be included - // in the size above, or are extra to it. If false then it's recommended - // to have explicit pixel sizes above (or on your textarea and have auto above) - this.sizeIncludesPanels = true; - - // each of the panels has a dimension, for the left/right it's the width - // for the top/bottom it's the height. - // - // WARNING: PANEL DIMENSIONS MUST BE SPECIFIED AS PIXEL WIDTHS - this.panel_dimensions = - { - left: '200px', // Width - right: '200px', - top: '100px', // Height - bottom: '100px' - }; - - // enable creation of a status bar? - this.statusBar = true; - - // intercept ^V and use the HTMLArea paste command - // If false, then passes ^V through to browser editor widget - this.htmlareaPaste = false; - - this.mozParaHandler = 'best'; // set to 'built-in', 'dirty' or 'best' - // built-in: will (may) use 'br' instead of 'p' tags - // dirty : will use p and work good enough for the majority of cases, - // best : works the best, but it's about 12kb worth of javascript - // and will probably be slower than 'dirty'. This is the "EnterParagraphs" - // plugin from "hipikat", rolled in to be part of the core code - - // maximum size of the undo queue - this.undoSteps = 20; - - // the time interval at which undo samples are taken - this.undoTimeout = 500; // 1/2 sec. - - // if true then HTMLArea will retrieve the full HTML, starting with the - // tag. - this.fullPage = false; - - // style included in the iframe document - this.pageStyle = ""; - - // external stylesheets to load (REFERENCE THESE ABSOLUTELY) - this.pageStyleSheets = [ ]; - - // specify a base href for relative links - this.baseHref = null; - - // we can strip the base href out of relative links to leave them relative, reason for this - // especially if you don't specify a baseHref is that mozilla at least (& IE ?) will prefix - // the baseHref to any relative links to make them absolute, which isn't what you want most the time. - this.stripBaseHref = true; - - // and we can strip the url of the editor page from named links (eg ...) - // reason for this is that mozilla at least (and IE ?) prefixes location.href to any - // that don't have a url prefixing them - this.stripSelfNamedAnchors = true; - - // sometimes high-ascii in links can cause problems for servers (basically they don't recognise them) - // so you can use this flag to ensure that all characters other than the normal ascii set (actually - // only ! through ~) are escaped in URLs to % codes - this.only7BitPrintablesInURLs = true; - - // if you are putting the HTML written in Xinha into an email you might want it to be 7-bit - // characters only. This config option (off by default) will convert all characters consuming - // more than 7bits into UNICODE decimal entity references (actually it will convert anything - // below (chr 20) except cr, lf and tab and above (~, chr 7E)) - this.sevenBitClean = false; - - // sometimes we want to be able to replace some string in the html comng in and going out - // so that in the editor we use the "internal" string, and outside and in the source view - // we use the "external" string this is useful for say making special codes for - // your absolute links, your external string might be some special code, say "{server_url}" - // an you say that the internal represenattion of that should be http://your.server/ - this.specialReplacements = { }; // { 'external_string' : 'internal_string' } - - // set to true if you want Word code to be cleaned upon Paste - this.killWordOnPaste = true; - - // enable the 'Target' field in the Make Link dialog - this.makeLinkShowsTarget = true; - - // CharSet of the iframe, default is the charset of the document - this.charSet = HTMLArea.is_gecko ? document.characterSet : document.charset; - - // URL-s - this.imgURL = "images/"; - this.popupURL = "popups/"; - - // remove tags (these have to be a regexp, or null if this functionality is not desired) - this.htmlRemoveTags = null; - - // Turning this on will turn all "linebreak" and "separator" items in your toolbar into soft-breaks, - // this means that if the items between that item and the next linebreak/separator can - // fit on the same line as that which came before then they will, otherwise they will - // float down to the next line. - - // If you put a linebreak and separator next to each other, only the separator will - // take effect, this allows you to have one toolbar that works for both flowToolbars = true and false - // infact the toolbar below has been designed in this way, if flowToolbars is false then it will - // create explictly two lines (plus any others made by plugins) breaking at justifyleft, however if - // flowToolbars is false and your window is narrow enough then it will create more than one line - // even neater, if you resize the window the toolbars will reflow. Niiiice. - - this.flowToolbars = true; - - /** CUSTOMIZING THE TOOLBAR - * ------------------------- - * - * It is recommended that you customize the toolbar contents in an - * external file (i.e. the one calling HTMLArea) and leave this one - * unchanged. That's because when we (InteractiveTools.com) release a - * new official version, it's less likely that you will have problems - * upgrading HTMLArea. - */ - this.toolbar = - [ - ["popupeditor"], - ["separator","formatblock","fontname","fontsize","bold","italic","underline","strikethrough"], - ["separator","forecolor","hilitecolor","textindicator"], - ["separator","subscript","superscript"], - ["linebreak","separator","justifyleft","justifycenter","justifyright","justifyfull"], - ["separator","insertorderedlist","insertunorderedlist","outdent","indent"], - ["separator","inserthorizontalrule","createlink","insertimage","inserttable"], - ["separator","undo","redo","selectall","print"], (HTMLArea.is_gecko ? [] : ["cut","copy","paste","overwrite","saveas"]), - ["separator","killword","clearfonts","removeformat","toggleborders","splitblock","lefttoright", "righttoleft"], - ["separator","htmlmode","showhelp","about"] - ]; - - - this.fontname = { - "— font —": '', - "Arial": 'arial,helvetica,sans-serif', - "Courier New": 'courier new,courier,monospace', - "Georgia": 'georgia,times new roman,times,serif', - "Tahoma": 'tahoma,arial,helvetica,sans-serif', - "Times New Roman": 'times new roman,times,serif', - "Verdana": 'verdana,arial,helvetica,sans-serif', - "impact": 'impact', - "WingDings": 'wingdings' - }; - - this.fontsize = { - "— size —" : "", - "1 (8 pt)" : "1", - "2 (10 pt)": "2", - "3 (12 pt)": "3", - "4 (14 pt)": "4", - "5 (18 pt)": "5", - "6 (24 pt)": "6", - "7 (36 pt)": "7" - }; - - this.formatblock = { - "— format —" : "", - "Heading 1": "h1", - "Heading 2": "h2", - "Heading 3": "h3", - "Heading 4": "h4", - "Heading 5": "h5", - "Heading 6": "h6", - "Normal" : "p", - "Address" : "address", - "Formatted": "pre" - }; - - this.customSelects = {}; - - function cut_copy_paste(e, cmd, obj) { - e.execCommand(cmd); - }; - - this.debug = true; - - this.URIs = { - "blank": "popups/blank.html", - "link": "link.html", - "insert_image": "insert_image.html", - "insert_table": "insert_table.html", - "select_color": "select_color.html", - "about": "about.html", - "help": "editor_help.html" - }; - - - // ADDING CUSTOM BUTTONS: please read below! - // format of the btnList elements is "ID: [ ToolTip, Icon, Enabled in text mode?, ACTION ]" - // - ID: unique ID for the button. If the button calls document.execCommand - // it's wise to give it the same name as the called command. - // - ACTION: function that gets called when the button is clicked. - // it has the following prototype: - // function(editor, buttonName) - // - editor is the HTMLArea object that triggered the call - // - buttonName is the ID of the clicked button - // These 2 parameters makes it possible for you to use the same - // handler for more HTMLArea objects or for more different buttons. - // - ToolTip: tooltip, will be translated below - // - Icon: path to an icon image file for the button - // OR; you can use an 18x18 block of a larger image by supllying an array - // that has three elemtents, the first is the larger image, the second is the column - // the third is the row. The ros and columns numbering starts at 0 but there is - // a header row and header column which have numbering to make life easier. - // See images/buttons_main.gif to see how it's done. - // - Enabled in text mode: if false the button gets disabled for text-only mode; otherwise enabled all the time. - this.btnList = { - bold: [ "Bold", HTMLArea._lc({key: 'button_bold', string: ["ed_buttons_main.gif",3,2]}, 'HTMLArea'), false, function(e) {e.execCommand("bold");} ], - italic: [ "Italic", HTMLArea._lc({key: 'button_italic', string: ["ed_buttons_main.gif",2,2]}, 'HTMLArea'), false, function(e) {e.execCommand("italic");} ], - underline: [ "Underline", HTMLArea._lc({key: 'button_underline', string: ["ed_buttons_main.gif",2,0]}, 'HTMLArea'), false, function(e) {e.execCommand("underline");} ], - strikethrough: [ "Strikethrough", HTMLArea._lc({key: 'button_strikethrough', string: ["ed_buttons_main.gif",3,0]}, 'HTMLArea'), false, function(e) {e.execCommand("strikethrough");} ], - subscript: [ "Subscript", HTMLArea._lc({key: 'button_subscript', string: ["ed_buttons_main.gif",3,1]}, 'HTMLArea'), false, function(e) {e.execCommand("subscript");} ], - superscript: [ "Superscript", HTMLArea._lc({key: 'button_superscript', string: ["ed_buttons_main.gif",2,1]}, 'HTMLArea'), false, function(e) {e.execCommand("superscript");} ], - - justifyleft: [ "Justify Left", ["ed_buttons_main.gif",0,0], false, function(e) {e.execCommand("justifyleft");} ], - justifycenter: [ "Justify Center", ["ed_buttons_main.gif",1,1], false, function(e){e.execCommand("justifycenter");}], - justifyright: [ "Justify Right", ["ed_buttons_main.gif",1,0], false, function(e) {e.execCommand("justifyright");} ], - justifyfull: [ "Justify Full", ["ed_buttons_main.gif",0,1], false, function(e) {e.execCommand("justifyfull");} ], - - - orderedlist: [ "Ordered List", ["ed_buttons_main.gif",0,3], false, function(e) {e.execCommand("insertorderedlist");} ], - unorderedlist: [ "Bulleted List", ["ed_buttons_main.gif",1,3], false, function(e) {e.execCommand("insertunorderedlist");} ], - insertorderedlist: [ "Ordered List", ["ed_buttons_main.gif",0,3], false, function(e) {e.execCommand("insertorderedlist");} ], - insertunorderedlist: [ "Bulleted List", ["ed_buttons_main.gif",1,3], false, function(e) {e.execCommand("insertunorderedlist");} ], - - outdent: [ "Decrease Indent", ["ed_buttons_main.gif",1,2], false, function(e) {e.execCommand("outdent");} ], - indent: [ "Increase Indent",["ed_buttons_main.gif",0,2], false, function(e) {e.execCommand("indent");} ], - forecolor: [ "Font Color", ["ed_buttons_main.gif",3,3], false, function(e) {e.execCommand("forecolor");} ], - hilitecolor: [ "Background Color", ["ed_buttons_main.gif",2,3], false, function(e) {e.execCommand("hilitecolor");} ], - - undo: [ "Undoes your last action", ["ed_buttons_main.gif",4,2], false, function(e) {e.execCommand("undo");} ], - redo: [ "Redoes your last action", ["ed_buttons_main.gif",5,2], false, function(e) {e.execCommand("redo");} ], - cut: [ "Cut selection", ["ed_buttons_main.gif",5,0], false, cut_copy_paste ], - copy: [ "Copy selection", ["ed_buttons_main.gif",4,0], false, cut_copy_paste ], - paste: [ "Paste from clipboard", ["ed_buttons_main.gif",4,1], false, cut_copy_paste ], - selectall: [ "Select all", "ed_selectall.gif", false, function(e) {e.execCommand("selectall");} ], - - - inserthorizontalrule: [ "Horizontal Rule", ["ed_buttons_main.gif",6,0], false, function(e) {e.execCommand("inserthorizontalrule");} ], - createlink: [ "Insert Web Link", ["ed_buttons_main.gif",6,1], false, function(e) {e._createLink();} ], - insertimage: [ "Insert/Modify Image", ["ed_buttons_main.gif",6,3], false, function(e) {e.execCommand("insertimage");} ], - inserttable: [ "Insert Table", ["ed_buttons_main.gif",6,2], false, function(e) {e.execCommand("inserttable");} ], - - - htmlmode: [ "Toggle HTML Source", ["ed_buttons_main.gif",7,0], true, function(e) {e.execCommand("htmlmode");} ], - toggleborders: [ "Toggle Borders", ["ed_buttons_main.gif",7,2], false, function(e) { e._toggleBorders() } ], - print: [ "Print document", ["ed_buttons_main.gif",8,1], false, function(e) {if (HTMLArea.is_gecko) {e._iframe.contentWindow.print();} else {e.focusEditor(); print();}} ], - saveas: [ "Save as", "ed_saveas.gif", false, function(e) {e.execCommand("saveas",false,"noname.htm");} ], - about: [ "About this editor", ["ed_buttons_main.gif",8,2], true, function(e) {e.execCommand("about");} ], - showhelp: [ "Help using editor", ["ed_buttons_main.gif",9,2], true, function(e) {e.execCommand("showhelp");} ], - - splitblock: [ "Split Block", "ed_splitblock.gif", false, function(e) {e._splitBlock();} ], - lefttoright: [ "Direction left to right", ["ed_buttons_main.gif",0,4], false, function(e) {e.execCommand("lefttoright");} ], - righttoleft: [ "Direction right to left", ["ed_buttons_main.gif",1,4], false, function(e) {e.execCommand("righttoleft");} ], - overwrite: [ "Insert/Overwrite", "ed_overwrite.gif", false, function(e) {e.execCommand("overwrite");} ], - - wordclean: [ "MS Word Cleaner", ["ed_buttons_main.gif",5,3], false, function(e) {e._wordClean();} ], - clearfonts: [ "Clear Inline Font Specifications", ["ed_buttons_main.gif",5,4], true, function(e) {e._clearFonts();} ], - removeformat: [ "Remove formatting", ["ed_buttons_main.gif",4,4], false, function(e) {e.execCommand("removeformat");} ], - killword: [ "Clear MSOffice tags", ["ed_buttons_main.gif",4,3], false, function(e) {e.execCommand("killword");} ] - - }; - /* ADDING CUSTOM BUTTONS - * --------------------- - * - * It is recommended that you add the custom buttons in an external - * file and leave this one unchanged. That's because when we - * (InteractiveTools.com) release a new official version, it's less - * likely that you will have problems upgrading HTMLArea. - * - * Example on how to add a custom button when you construct the HTMLArea: - * - * var editor = new HTMLArea("your_text_area_id"); - * var cfg = editor.config; // this is the default configuration - * cfg.btnList["my-hilite"] = - * [ function(editor) { editor.surroundHTML('', ''); }, // action - * "Highlight selection", // tooltip - * "my_hilite.gif", // image - * false // disabled in text mode - * ]; - * cfg.toolbar.push(["linebreak", "my-hilite"]); // add the new button to the toolbar - * - * An alternate (also more convenient and recommended) way to - * accomplish this is to use the registerButton function below. - */ - // initialize tooltips from the I18N module and generate correct image path - for (var i in this.btnList) { - var btn = this.btnList[i]; - if (typeof btn != 'object') continue; // prevent iterating over wrong type - if (typeof btn[1] != 'string') - { - btn[1][0] = _editor_url + this.imgURL + btn[1][0]; - } - else - { - btn[1] = _editor_url + this.imgURL + btn[1]; - } - btn[0] = HTMLArea._lc(btn[0]); //initialize tooltip - } - -}; - -/** Helper function: register a new button with the configuration. It can be - * called with all 5 arguments, or with only one (first one). When called with - * only one argument it must be an object with the following properties: id, - * tooltip, image, textMode, action. Examples: - * - * 1. config.registerButton("my-hilite", "Hilite text", "my-hilite.gif", false, function(editor) {...}); - * 2. config.registerButton({ - * id : "my-hilite", // the ID of your button - * tooltip : "Hilite text", // the tooltip - * image : "my-hilite.gif", // image to be displayed in the toolbar - * textMode : false, // disabled in text mode - * action : function(editor) { // called when the button is clicked - * editor.surroundHTML('', ''); - * }, - * context : "p" // will be disabled if outside a

element - * }); - */ -HTMLArea.Config.prototype.registerButton = function(id, tooltip, image, textMode, action, context) { - var the_id; - if (typeof id == "string") { - the_id = id; - } else if (typeof id == "object") { - the_id = id.id; - } else { - alert("ERROR [HTMLArea.Config::registerButton]:\ninvalid arguments"); - return false; - } - // check for existing id - if (typeof this.customSelects[the_id] != "undefined") { - // alert("WARNING [HTMLArea.Config::registerDropdown]:\nA dropdown with the same ID already exists."); - } - if (typeof this.btnList[the_id] != "undefined") { - // alert("WARNING [HTMLArea.Config::registerDropdown]:\nA button with the same ID already exists."); - } - switch (typeof id) { - case "string": this.btnList[id] = [ tooltip, image, textMode, action, context ]; break; - case "object": this.btnList[id.id] = [ id.tooltip, id.image, id.textMode, id.action, id.context ]; break; - } -}; - -HTMLArea.prototype.registerPanel = function(side, object) -{ - if(!side) side = 'right'; - var panel = this.addPanel(side); - if(object) - { - object.drawPanelIn(panel); - } -}; - -/** The following helper function registers a dropdown box with the editor - * configuration. You still have to add it to the toolbar, same as with the - * buttons. Call it like this: - * - * FIXME: add example - */ -HTMLArea.Config.prototype.registerDropdown = function(object) { - // check for existing id - if (typeof this.customSelects[object.id] != "undefined") { - // alert("WARNING [HTMLArea.Config::registerDropdown]:\nA dropdown with the same ID already exists."); - } - if (typeof this.btnList[object.id] != "undefined") { - // alert("WARNING [HTMLArea.Config::registerDropdown]:\nA button with the same ID already exists."); - } - this.customSelects[object.id] = object; -}; - -/** Call this function to remove some buttons/drop-down boxes from the toolbar. - * Pass as the only parameter a string containing button/drop-down names - * delimited by spaces. Note that the string should also begin with a space - * and end with a space. Example: - * - * config.hideSomeButtons(" fontname fontsize textindicator "); - * - * It's useful because it's easier to remove stuff from the defaul toolbar than - * create a brand new toolbar ;-) - */ -HTMLArea.Config.prototype.hideSomeButtons = function(remove) { - var toolbar = this.toolbar; - for (var i = toolbar.length; --i >= 0;) { - var line = toolbar[i]; - for (var j = line.length; --j >= 0; ) { - if (remove.indexOf(" " + line[j] + " ") >= 0) { - var len = 1; - if (/separator|space/.test(line[j + 1])) { - len = 2; - } - line.splice(j, len); - } - } - } -}; - -/** Helper Function: add buttons/drop-downs boxes with title or separator to the toolbar - * if the buttons/drop-downs boxes doesn't allready exists. - * id: button or selectbox (as array with separator or title) - * where: button or selectbox (as array if the first is not found take the second and so on) - * position: - * -1 = insert button (id) one position before the button (where) - * 0 = replace button (where) by button (id) - * +1 = insert button (id) one position after button (where) - * - * cfg.addToolbarElement(["T[title]", "button_id", "separator"] , ["first_id","second_id"], -1); -*/ - -HTMLArea.Config.prototype.addToolbarElement = function(id, where, position) { - var toolbar = this.toolbar; - var a, i, j, o, sid; - var idIsArray = false; - var whereIsArray = false; - var whereLength = 0; - var whereJ = 0; - var whereI = 0; - var exists = false; - var found = false; - // check if id and where are arrys - if ((id && typeof id == "object") && (id.constructor == Array)) { - idIsArray = true; - } - if ((where && typeof where == "object") && (where.constructor == Array)) { - whereIsArray = true; - whereLength = where.length; - } - - if (idIsArray) { //find the button/select box in input array - for (i = 0; i < id.length; ++i) { - if ((id[i] != "separator") && (id[i].indexOf("T[") != 0)) { - sid = id[i]; - } - } - } else { - sid = id; - } - - for (var i = 0; !exists && !found && i < toolbar.length; ++i) { - a = toolbar[i] - for (j = 0; !found && j < a.length; ++j) { - if (a[i] == sid) { // check if button/select box exists - exists = true; - break; - } - if (whereIsArray) { - for (o = 0; o < whereLength; ++o) { - if(a[j] == where[o]) { - if (o == 0) { - found = true; - j--; - break; - } else { - whereI = i; - whereJ = j; - whereLength = o; - } - } - } - } else { - if (a[j] == where) { // find the position to insert - found = true; - break; - } - } - } - } - - if (!exists) { - if (!found && whereIsArray) { //if check found any other as the first button - if (where.length != whereLength) { - j = whereJ; - a = toolbar[whereI]; - found = true; - } - } - if (found) { - if (position == 0) { // replace the found button - if (idIsArray) { - a[j] = id[id.length-1]; - for (i = id.length-1; --i >= 0;) { - a.splice(j, 0, id[i]); - } - } else { - a[j] = id; - } - } else { // insert before/after the found button - if (position < 0) { - j = j + position + 1; //correct position before - } else if (position > 0) { - j = j + position; //correct posion after - } - if (idIsArray) { - for (i = id.length; --i >= 0;) { - a.splice(j, 0, id[i]); - } - } else { - a.splice(j, 0, id); - } - } - } else { // no button found - toolbar[0].splice(0, 0, "separator"); - if (idIsArray) { - for (i = id.length; --i >= 0;) { - toolbar[0].splice(0, 0, id[i]); - } - } else { - toolbar[0].splice(0, 0, id); - } - } - } -}; - -/** Helper function: replace all TEXTAREA-s in the document with HTMLArea-s. */ -HTMLArea.replaceAll = function(config) { - var tas = document.getElementsByTagName("textarea"); - for (var i = tas.length; i > 0; (new HTMLArea(tas[--i], config)).generate()); -}; - -/** Helper function: replaces the TEXTAREA with the given ID with HTMLArea. */ -HTMLArea.replace = function(id, config) -{ - var ta = HTMLArea.getElementById("textarea", id); - return ta ? (new HTMLArea(ta, config)).generate() : null;; -}; - -// Creates the toolbar and appends it to the _htmlarea -HTMLArea.prototype._createToolbar = function () { - var editor = this; // to access this in nested functions - - var toolbar = document.createElement("div"); - // ._toolbar is for legacy, ._toolBar is better thanks. - this._toolBar = this._toolbar = toolbar; - toolbar.className = "toolbar"; - toolbar.unselectable = "1"; - - HTMLArea.freeLater(this, '_toolBar'); - HTMLArea.freeLater(this, '_toolbar'); - - var tb_row = null; - var tb_objects = new Object(); - this._toolbarObjects = tb_objects; - - this._createToolbar1(editor, toolbar, tb_objects); - this._htmlArea.appendChild(toolbar); - - return toolbar; -}; - - -HTMLArea.prototype._setConfig = function(config) { - this.config = config; -}; - -HTMLArea.prototype._addToolbar = function() { - this._createToolbar1(this, this._toolbar, this._toolbarObjects); -}; - -// separate from previous createToolBar to allow dynamic change of toolbar -HTMLArea.prototype._createToolbar1 = function (editor, toolbar, tb_objects) { - - // This shouldn't be necessary, but IE seems to float outside of the container - // when we float toolbar sections, so we have to clear:both here as well - // as at the end (which we do have to do). - if(editor.config.flowToolbars) - { - var brk = document.createElement('div'); - brk.style.height = - brk.style.width = - brk.style.lineHeight = - brk.style.fontSize = '1px'; - brk.style.clear = 'both'; - toolbar.appendChild(brk); - } - - // creates a new line in the toolbar - function newLine() { - if(typeof tb_row != 'undefined' && tb_row.childNodes.length == 0) return; - - var table = document.createElement("table"); - table.border = "0px"; - table.cellSpacing = "0px"; - table.cellPadding = "0px"; - if(editor.config.flowToolbars) - { - if(HTMLArea.is_ie) - { - table.style.styleFloat = "left"; - } - else - { - table.style.cssFloat = "left"; - } - } - - toolbar.appendChild(table); - // TBODY is required for IE, otherwise you don't see anything - // in the TABLE. - var tb_body = document.createElement("tbody"); - table.appendChild(tb_body); - tb_row = document.createElement("tr"); - tb_body.appendChild(tb_row); - - table.className = 'toolbarRow'; // meh, kinda. - } // END of function: newLine - - // init first line - newLine(); - - // updates the state of a toolbar element. This function is member of - // a toolbar element object (unnamed objects created by createButton or - // createSelect functions below). - function setButtonStatus(id, newval) { - var oldval = this[id]; - var el = this.element; - if (oldval != newval) { - switch (id) { - case "enabled": - if (newval) { - HTMLArea._removeClass(el, "buttonDisabled"); - el.disabled = false; - } else { - HTMLArea._addClass(el, "buttonDisabled"); - el.disabled = true; - } - break; - case "active": - if (newval) { - HTMLArea._addClass(el, "buttonPressed"); - } else { - HTMLArea._removeClass(el, "buttonPressed"); - } - break; - } - this[id] = newval; - } - } // END of function: setButtonStatus - - // this function will handle creation of combo boxes. Receives as - // parameter the name of a button as defined in the toolBar config. - // This function is called from createButton, above, if the given "txt" - // doesn't match a button. - function createSelect(txt) { - var options = null; - var el = null; - var cmd = null; - var customSelects = editor.config.customSelects; - var context = null; - var tooltip = ""; - switch (txt) { - case "fontsize": - case "fontname": - case "formatblock": - // the following line retrieves the correct - // configuration option because the variable name - // inside the Config object is named the same as the - // button/select in the toolbar. For instance, if txt - // == "formatblock" we retrieve config.formatblock (or - // a different way to write it in JS is - // config["formatblock"]. - options = editor.config[txt]; - cmd = txt; - break; - default: - // try to fetch it from the list of registered selects - cmd = txt; - var dropdown = customSelects[cmd]; - if (typeof dropdown != "undefined") { - options = dropdown.options; - context = dropdown.context; - if (typeof dropdown.tooltip != "undefined") { - tooltip = dropdown.tooltip; - } - } else { - alert("ERROR [createSelect]:\nCan't find the requested dropdown definition"); - } - break; - } - if (options) { - el = document.createElement("select"); - el.title = tooltip; - var obj = { - name : txt, // field name - element : el, // the UI element (SELECT) - enabled : true, // is it enabled? - text : false, // enabled in text mode? - cmd : cmd, // command ID - state : setButtonStatus, // for changing state - context : context - }; - - HTMLArea.freeLater(obj); - - tb_objects[txt] = obj; - - for (var i in options) { - if (typeof(options[i]) != 'string') continue; // prevent iterating over wrong type - var op = document.createElement("option"); - op.innerHTML = HTMLArea._lc(i); - op.value = options[i]; - el.appendChild(op); - } - HTMLArea._addEvent(el, "change", function () { - editor._comboSelected(el, txt); - }); - } - return el; - } // END of function: createSelect - - // appends a new button to toolbar - function createButton(txt) { - // the element that will be created - var el = null; - var btn = null; - switch (txt) { - case "separator": - if(editor.config.flowToolbars) newLine(); - el = document.createElement("div"); - el.className = "separator"; - break; - case "space": - el = document.createElement("div"); - el.className = "space"; - break; - case "linebreak": - newLine(); - return false; - case "textindicator": - el = document.createElement("div"); - el.appendChild(document.createTextNode("A")); - el.className = "indicator"; - el.title = HTMLArea._lc("Current style"); - var obj = { - name : txt, // the button name (i.e. 'bold') - element : el, // the UI element (DIV) - enabled : true, // is it enabled? - active : false, // is it pressed? - text : false, // enabled in text mode? - cmd : "textindicator", // the command ID - state : setButtonStatus // for changing state - }; - - HTMLArea.freeLater(obj); - - tb_objects[txt] = obj; - break; - default: - btn = editor.config.btnList[txt]; - } - if (!el && btn) { - el = document.createElement("a"); - el.style.display = 'block'; - el.href = 'javascript:void(0)'; - el.style.textDecoration = 'none'; - el.title = btn[0]; - el.className = "button"; - // let's just pretend we have a button object, and - // assign all the needed information to it. - var obj = { - name : txt, // the button name (i.e. 'bold') - element : el, // the UI element (DIV) - enabled : true, // is it enabled? - active : false, // is it pressed? - text : btn[2], // enabled in text mode? - cmd : btn[3], // the command ID - state : setButtonStatus, // for changing state - context : btn[4] || null // enabled in a certain context? - }; - - HTMLArea.freeLater(obj); - - tb_objects[txt] = obj; - // handlers to emulate nice flat toolbar buttons - HTMLArea._addEvent(el, "mouseout", function () { - if (obj.enabled) with (HTMLArea) { - //_removeClass(el, "buttonHover"); - _removeClass(el, "buttonActive"); - (obj.active) && _addClass(el, "buttonPressed"); - } - }); - - HTMLArea._addEvent(el, "mousedown", function (ev) { - if (obj.enabled) with (HTMLArea) { - _addClass(el, "buttonActive"); - _removeClass(el, "buttonPressed"); - _stopEvent(is_ie ? window.event : ev); - } - }); - // when clicked, do the following: - HTMLArea._addEvent(el, "click", function (ev) { - if (obj.enabled) with (HTMLArea) { - _removeClass(el, "buttonActive"); - //_removeClass(el, "buttonHover"); - if(HTMLArea.is_gecko) - { - editor.activateEditor(); - } - obj.cmd(editor, obj.name, obj); - _stopEvent(is_ie ? window.event : ev); - } - }); - - var i_contain = HTMLArea.makeBtnImg(btn[1]); - var img = i_contain.firstChild; - el.appendChild(i_contain); - - obj.imgel = img; - obj.swapImage = function(newimg) - { - if(typeof newimg != 'string') - { - img.src = newimg[0]; - img.style.position = 'relative'; - img.style.top = newimg[2] ? ('-' + (18 * (newimg[2] + 1)) + 'px') : '-18px'; - img.style.left = newimg[1] ? ('-' + (18 * (newimg[1] + 1)) + 'px') : '-18px'; - } - else - { - obj.imgel.src = newimg; - img.style.top = '0px'; - img.style.left = '0px'; - } - }; - - } else if (!el) { - el = createSelect(txt); - } - - return el; - } - - var first = true; - for (var i = 0; i < this.config.toolbar.length; ++i) { - if (!first) { - // createButton("linebreak"); - } else { - first = false; - } - if(this.config.toolbar[i] == null) this.config.toolbar[i] = ['separator']; - var group = this.config.toolbar[i]; - - for (var j = 0; j < group.length; ++j) - { - var code = group[j]; - if (/^([IT])\[(.*?)\]/.test(code)) - { - // special case, create text label - var l7ed = RegExp.$1 == "I"; // localized? - var label = RegExp.$2; - if (l7ed) { - label = HTMLArea._lc(label); - } - var tb_cell = document.createElement("td"); - tb_row.appendChild(tb_cell); - tb_cell.className = "label"; - tb_cell.innerHTML = label; - } - else if(typeof code != 'function') - { - var tb_element = createButton(code); - - if (tb_element) - { - var tb_cell = document.createElement("td"); - tb_cell.className = 'toolbarElement'; - tb_row.appendChild(tb_cell); - tb_cell.appendChild(tb_element); - } - else if (tb_element == null) - { - alert("FIXME: Unknown toolbar item: " + code); - } - } - } - } - - if(editor.config.flowToolbars) - { - var brk = document.createElement('div'); - brk.style.height = - brk.style.width = - brk.style.lineHeight = - brk.style.fontSize = '1px'; - brk.style.clear = 'both'; - toolbar.appendChild(brk); - } - - return toolbar; -}; - -use_clone_img = false; -HTMLArea.makeBtnImg = function(imgDef, doc) -{ - if(!doc) doc = document; - - if(!doc._htmlareaImgCache) - { - doc._htmlareaImgCache = { }; - HTMLArea.freeLater(doc._htmlareaImgCache); - } - - var i_contain = null; - if(HTMLArea.is_ie && ((!doc.compatMode) || (doc.compatMode && doc.compatMode == "BackCompat"))) - { - i_contain = doc.createElement('span'); - } - else - { - i_contain = doc.createElement('div'); - i_contain.style.position = 'relative'; - } - - i_contain.style.overflow = 'hidden'; - i_contain.style.width = "18px"; - i_contain.style.height = "18px"; - i_contain.className = 'buttonImageContainer'; - - var img = null; - if(typeof imgDef == 'string') - { - if(doc._htmlareaImgCache[imgDef]) - { - img = doc._htmlareaImgCache[imgDef].cloneNode(); - } - else - { - img = doc.createElement("img"); - img.src = imgDef; - img.style.width = "18px"; - img.style.height = "18px"; - if(use_clone_img) - doc._htmlareaImgCache[imgDef] = img.cloneNode(); - } - } - else - { - if(doc._htmlareaImgCache[imgDef[0]]) - { - img = doc._htmlareaImgCache[imgDef[0]].cloneNode(); - } - else - { - img = doc.createElement("img"); - img.src = imgDef[0]; - img.style.position = 'relative'; - if(use_clone_img) - doc._htmlareaImgCache[imgDef[0]] = img.cloneNode(); - } - img.style.top = imgDef[2] ? ('-' + (18 * (imgDef[2] + 1)) + 'px') : '-18px'; - img.style.left = imgDef[1] ? ('-' + (18 * (imgDef[1] + 1)) + 'px') : '-18px'; - } - i_contain.appendChild(img); - return i_contain; -}; - -HTMLArea.prototype._createStatusBar = function() { - var statusbar = document.createElement("div"); - statusbar.className = "statusBar"; - this._statusBar = statusbar; - HTMLArea.freeLater(this, '_statusBar'); - - // statusbar.appendChild(document.createTextNode(HTMLArea._lc("Path") + ": ")); - // creates a holder for the path view - div = document.createElement("span"); - div.className = "statusBarTree"; - div.innerHTML = HTMLArea._lc("Path") + ": "; - this._statusBarTree = div; - HTMLArea.freeLater(this, '_statusBarTree'); - this._statusBar.appendChild(div); - - div = document.createElement("span"); - div.innerHTML = HTMLArea._lc("You are in TEXT MODE. Use the [<>] button to switch back to WYSIWYG."); - div.style.display = "none"; - this._statusBarTextMode = div; - HTMLArea.freeLater(this, '_statusBarTextMode'); - this._statusBar.appendChild(div); - - if (!this.config.statusBar) - { - // disable it... - statusbar.style.display = "none"; - } - - return statusbar; -}; - -// Creates the HTMLArea object and replaces the textarea with it. -HTMLArea.prototype.generate = function () -{ - var editor = this; // we'll need "this" in some nested functions - - if(typeof Dialog == 'undefined') - { - HTMLArea._loadback - (_editor_url + 'dialog.js', function() { editor.generate(); } ); - return false; - } - - if(typeof HTMLArea.Dialog == 'undefined') - { - HTMLArea._loadback - (_editor_url + 'inline-dialog.js', function() { editor.generate(); } ); - return false; - } - - if(typeof PopupWin == 'undefined') - { - HTMLArea._loadback - (_editor_url + 'popupwin.js', function() { editor.generate(); } ); - return false; - } - - if(_editor_skin != "") { - var found=false; - var head = document.getElementsByTagName("head")[0]; - var links = document.getElementsByTagName("link"); - for(var i = 0; i= 0;) { - for (var j = toolbar[i].length; --j >= 0; ) { - if (toolbar[i][j]=="popupeditor") { - if(typeof FullScreen == "undefined") { - HTMLArea.loadPlugin("FullScreen", function() { editor.generate(); } ); - return false; - } - editor.registerPlugin('FullScreen'); - } - } - } - - // If this is gecko, set up the paragraph handling now - if(HTMLArea.is_gecko) - { - switch(editor.config.mozParaHandler) - { - case 'best': - { - if(typeof EnterParagraphs == 'undefined') - { - HTMLArea.loadPlugin("EnterParagraphs", function() { editor.generate(); } ); - return false; - } - editor.registerPlugin('EnterParagraphs'); - } - break; - - case 'dirty' : - case 'built-in': - default : - { - // See _editorEvent - } - break; - } - } - - // create the editor framework, yah, table layout I know, but much easier - // to get it working correctly this way, sorry about that, patches welcome. - - this._framework = - { - 'table' :document.createElement('table'), - 'tbody' :document.createElement('tbody'), // IE will not show the table if it doesn't have a tbody! - 'tb_row' :document.createElement('tr'), - 'tb_cell' :document.createElement('td'), // Toolbar - - 'tp_row' :document.createElement('tr'), - 'tp_cell' :this._panels.top.container, // top panel - - 'ler_row' :document.createElement('tr'), - 'lp_cell' :this._panels.left.container, // left panel - 'ed_cell' :document.createElement('td'), // editor - 'rp_cell' :this._panels.right.container, // right panel - - 'bp_row' :document.createElement('tr'), - 'bp_cell' :this._panels.bottom.container,// bottom panel - - 'sb_row' :document.createElement('tr'), - 'sb_cell' :document.createElement('td') // status bar - - }; - - HTMLArea.freeLater(this._framework); - - var fw = this._framework; - fw.table.border="0"; - fw.table.cellPadding="0"; - fw.table.cellSpacing="0"; - - fw.tb_row.style.verticalAlign = 'top'; - fw.tp_row.style.verticalAlign = 'top'; - fw.ler_row.style.verticalAlign= 'top'; - fw.bp_row.style.verticalAlign = 'top'; - fw.sb_row.style.verticalAlign = 'top'; - fw.ed_cell.style.position = 'relative'; - - // Put the cells in the rows set col & rowspans - // note that I've set all these so that all panels are showing - // but they will be redone in sizeEditor() depending on which - // panels are shown. It's just here to clarify how the thing - // is put togethor. - fw.tb_row.appendChild(fw.tb_cell); fw.tb_cell.colSpan = 3; - - fw.tp_row.appendChild(fw.tp_cell); fw.tp_cell.colSpan = 3; - - fw.ler_row.appendChild(fw.lp_cell); - fw.ler_row.appendChild(fw.ed_cell); - fw.ler_row.appendChild(fw.rp_cell); - - fw.bp_row.appendChild(fw.bp_cell); fw.bp_cell.colSpan = 3; - - fw.sb_row.appendChild(fw.sb_cell); fw.sb_cell.colSpan = 3; - - // Put the rows in the table body - fw.tbody.appendChild(fw.tb_row); // Toolbar - fw.tbody.appendChild(fw.tp_row); // Left, Top, Right panels - fw.tbody.appendChild(fw.ler_row); // Editor/Textarea - fw.tbody.appendChild(fw.bp_row); // Bottom panel - fw.tbody.appendChild(fw.sb_row); // Statusbar - - // and body in the table - fw.table.appendChild(fw.tbody); - - var htmlarea = this._framework.table; - this._htmlArea = htmlarea; - HTMLArea.freeLater(this, '_htmlArea'); - htmlarea.className = "htmlarea"; - - // create the toolbar and put in the area - var toolbar = this._createToolbar(); - this._framework.tb_cell.appendChild(toolbar); - - // create the IFRAME & add to container - var iframe = document.createElement("iframe"); - iframe.src = _editor_url + editor.config.URIs["blank"]; - this._framework.ed_cell.appendChild(iframe); - this._iframe = iframe; - this._iframe.className = 'xinha_iframe'; - HTMLArea.freeLater(this, '_iframe'); - - // creates & appends the status bar - var statusbar = this._createStatusBar(); - this._framework.sb_cell.appendChild(statusbar); - - // insert Xinha before the textarea. - var textarea = this._textArea; - textarea.parentNode.insertBefore(htmlarea, textarea); - textarea.className = 'xinha_textarea'; - - // extract the textarea and insert it into the htmlarea - HTMLArea.removeFromParent(textarea); - this._framework.ed_cell.appendChild(textarea); - - - // Set up event listeners for saving the iframe content to the textarea - if (textarea.form) - { - // onsubmit get the HTMLArea content and update original textarea. - HTMLArea.prependDom0Event - ( - this._textArea.form, - 'submit', - function() {editor._textArea.value = editor.outwardHtml(editor.getHTML()); return true;} - ); - - var initialTAContent = textarea.value; - - // onreset revert the HTMLArea content to the textarea content - HTMLArea.prependDom0Event - ( - this._textArea.form, - 'reset', - function() { editor.setHTML(editor.inwardHtml(initialTAContent)); editor.updateToolbar(); return true; } - ); - } - - // add a handler for the "back/forward" case -- on body.unload we save - // the HTML content into the original textarea. - HTMLArea.prependDom0Event(window, 'unload', function() {textarea.value = editor.outwardHtml(editor.getHTML()); return true; }); - - // Hide textarea - textarea.style.display = "none"; - - // Initalize size - editor.initSize(); - - // Add an event to initialize the iframe once loaded. - editor._iframeLoadDone = false; - HTMLArea._addEvent - ( - this._iframe, - 'load', - function(e) - { - if(! editor._iframeLoadDone) - { - editor._iframeLoadDone = true; - editor.initIframe(); - } - return true; - } - ); - -}; - - - /** - * Size the editor according to the INITIAL sizing information. - * config.width - * The width may be set via three ways - * auto = the width is inherited from the original textarea - * toolbar = the width is set to be the same size as the toolbar - * = the width is an explicit size (any CSS measurement, eg 100em should be fine) - * - * config.height - * auto = the height is inherited from the original textarea - * = an explicit size measurement (again, CSS measurements) - * - * config.sizeIncludesBars - * true = the tool & status bars will appear inside the width & height confines - * false = the tool & status bars will appear outside the width & height confines - * - */ - - HTMLArea.prototype.initSize = function() - { - var editor = this; - - var width = null; - var height = null; - switch(this.config.width) - { - case 'auto': - { - width = this._initial_ta_size.w; - } - break; - - case 'toolbar': - { - width = this._toolBar.offsetWidth + 'px'; - } - break; - - default : - { - width = /[^0-9]/.test(this.config.width) ? this.config.width : this.config.width + 'px'; - } - break; - } - - switch(this.config.height) - { - case 'auto': - { - height = this._initial_ta_size.h; - } - break; - - default : - { - height = /[^0-9]/.test(this.config.height) ? this.config.height : this.config.height + 'px'; - } - break; - } - - this.sizeEditor(width, height, this.config.sizeIncludesBars, this.config.sizeIncludesPanels); - - HTMLArea.addDom0Event(window, 'resize', function(e) { editor.sizeEditor(); }); - - this.notifyOn('panel_change',function(){editor.sizeEditor();}); - }; - - /** - * Size the editor to a specific size, or just refresh the size (when window resizes for example) - * @param width optional width (CSS specification) - * @param height optional height (CSS specification) - * @param includingBars optional boolean to indicate if the size should include or exclude tool & status bars - */ - - HTMLArea.prototype.sizeEditor = function(width, height, includingBars, includingPanels) - { - - // We need to set the iframe & textarea to 100% height so that the htmlarea - // isn't "pushed out" when we get it's height, so we can change them later. - this._iframe.style.height = '100%'; - this._textArea.style.height = '100%'; - this._iframe.style.width = ''; - this._textArea.style.width = ''; - - if(includingBars != null) this._htmlArea.sizeIncludesToolbars = includingBars; - if(includingPanels != null) this._htmlArea.sizeIncludesPanels = includingPanels; - - if(width != null) - { - this._htmlArea.style.width = width; - if(!this._htmlArea.sizeIncludesPanels) - { - // Need to add some for l & r panels - var panel = this._panels.right; - if(panel.on && panel.panels.length && HTMLArea.hasDisplayedChildren(panel.div)) - { - this._htmlArea.style.width = this._htmlArea.offsetWidth + parseInt(this.config.panel_dimensions.right); - } - - var panel = this._panels.left; - if(panel.on && panel.panels.length && HTMLArea.hasDisplayedChildren(panel.div)) - { - this._htmlArea.style.width = this._htmlArea.offsetWidth + parseInt(this.config.panel_dimensions.left); - } - } - } - - if(height != null) - { - this._htmlArea.style.height = height; - if(!this._htmlArea.sizeIncludesToolbars) - { - // Need to add some for toolbars - this._htmlArea.style.height = this._htmlArea.offsetHeight + this._toolbar.offsetHeight + this._statusBar.offsetHeight; - } - - if(!this._htmlArea.sizeIncludesPanels) - { - // Need to add some for l & r panels - var panel = this._panels.top; - if(panel.on && panel.panels.length && HTMLArea.hasDisplayedChildren(panel.div)) - { - this._htmlArea.style.height = this._htmlArea.offsetHeight + parseInt(this.config.panel_dimensions.top); - } - - var panel = this._panels.bottom; - if(panel.on && panel.panels.length && HTMLArea.hasDisplayedChildren(panel.div)) - { - this._htmlArea.style.height = this._htmlArea.offsetHeight + parseInt(this.config.panel_dimensions.bottom); - } - } - } - - // At this point we have this._htmlArea.style.width & this._htmlArea.style.height - // which are the size for the OUTER editor area, including toolbars and panels - // now we size the INNER area and position stuff in the right places. - width = this._htmlArea.offsetWidth; - height = this._htmlArea.offsetHeight; - - // Set colspan for toolbar, and statusbar, rowspan for left & right panels, and insert panels to be displayed - // into thier rows - var panels = this._panels; - var editor = this; - var col_span = 1; - - function panel_is_alive(pan) - { - if(panels[pan].on && panels[pan].panels.length && HTMLArea.hasDisplayedChildren(panels[pan].container)) - { - panels[pan].container.style.display = ''; - return true; - } - - // Otherwise make sure it's been removed from the framework - else - { - panels[pan].container.style.display='none'; - return false; - } - } - - if(panel_is_alive('left')) - { - col_span += 1; - } - - if(panel_is_alive('top')) - { - // NOP - } - - if(panel_is_alive('right')) - { - col_span += 1; - } - - if(panel_is_alive('bottom')) - { - // NOP - } - - this._framework.tb_cell.colSpan = col_span; - this._framework.tp_cell.colSpan = col_span; - this._framework.bp_cell.colSpan = col_span; - this._framework.sb_cell.colSpan = col_span; - - // Put in the panel rows, top panel goes above editor row - if(!this._framework.tp_row.childNodes.length) - { - HTMLArea.removeFromParent(this._framework.tp_row); - } - else - { - if(!HTMLArea.hasParentNode(this._framework.tp_row)) - { - this._framework.tbody.insertBefore(this._framework.tp_row, this._framework.ler_row); - } - } - - // bp goes after the editor - if(!this._framework.bp_row.childNodes.length) - { - HTMLArea.removeFromParent(this._framework.bp_row); - } - else - { - if(!HTMLArea.hasParentNode(this._framework.bp_row)) - { - this._framework.tbody.insertBefore(this._framework.bp_row, this._framework.ler_row.nextSibling); - } - } - - // finally if the statusbar is on, insert it - if(!this.config.statusBar) - { - HTMLArea.removeFromParent(this._framework.sb_row); - } - else - { - if(!HTMLArea.hasParentNode(this._framework.sb_row)) - { - this._framework.table.appendChild(this._framework.sb_row); - } - } - - // Size and set colspans, link up the framework - this._framework.lp_cell.style.width = this.config.panel_dimensions.left; - this._framework.rp_cell.style.width = this.config.panel_dimensions.right; - this._framework.tp_cell.style.height = this.config.panel_dimensions.top; - this._framework.bp_cell.style.height = this.config.panel_dimensions.bottom; - this._framework.tb_cell.style.height = this._toolBar.offsetHeight + 'px'; - this._framework.sb_cell.style.height = this._statusBar.offsetHeight + 'px'; - - var edcellheight = height - this._toolBar.offsetHeight - this._statusBar.offsetHeight; - if(panel_is_alive('top')) edcellheight -= parseInt(this.config.panel_dimensions.top); - if(panel_is_alive('bottom')) edcellheight -= parseInt(this.config.panel_dimensions.bottom);; - this._iframe.style.height = edcellheight + 'px'; - - var edcellwidth = width; - if(panel_is_alive('left')) edcellwidth -= parseInt(this.config.panel_dimensions.left); - if(panel_is_alive('right')) edcellwidth -= parseInt(this.config.panel_dimensions.right); - this._iframe.style.width = edcellwidth + 'px'; - - this._textArea.style.height = this._iframe.style.height; - this._textArea.style.width = this._iframe.style.width; - - this.notifyOf('resize', {width:this._htmlArea.offsetWidth, height:this._htmlArea.offsetHeight}); - }; - - HTMLArea.prototype.addPanel = function(side) - { - var div = document.createElement('div'); - div.side = side; - if(side == 'left' || side == 'right') - { - div.style.width = this.config.panel_dimensions[side]; - } - HTMLArea.addClasses(div, 'panel'); - this._panels[side].panels.push(div); - this._panels[side].div.appendChild(div); - - this.notifyOf('panel_change', {'action':'add','panel':div}); - - return div; - }; - - HTMLArea.prototype.removePanel = function(panel) - { - this._panels[panel.side].div.removeChild(panel); - var clean = [ ]; - for(var i = 0; i < this._panels[panel.side].panels.length; i++) - { - if(this._panels[panel.side].panels[i] != panel) - { - clean.push(this._panels[panel.side].panels[i]); - } - } - this._panels[panel.side].panels = clean; - this.notifyOf('panel_change', {'action':'remove','panel':panel}); - }; - - HTMLArea.prototype.hidePanel = function(panel) - { - if(panel) - { - panel.style.display = 'none'; - this.notifyOf('panel_change', {'action':'hide','panel':panel}); - } - }; - - HTMLArea.prototype.showPanel = function(panel) - { - if(panel) - { - panel.style.display = ''; - this.notifyOf('panel_change', {'action':'show','panel':panel}); - } - }; - - HTMLArea.prototype.hidePanels = function(sides) - { - if(typeof sides == 'undefined') - { - sides = ['left','right','top','bottom']; - } - - var reShow = []; - for(var i = 0; i < sides.length;i++) - { - if(this._panels[sides[i]].on) - { - reShow.push(sides[i]); - this._panels[sides[i]].on = false; - } - } - this.notifyOf('panel_change', {'action':'multi_hide','sides':sides}); - }; - - HTMLArea.prototype.showPanels = function(sides) - { - if(typeof sides == 'undefined') - { - sides = ['left','right','top','bottom']; - } - - var reHide = []; - for(var i = 0; i < sides.length;i++) - { - if(!this._panels[sides[i]].on) - { - reHide.push(sides[i]); - this._panels[sides[i]].on = true; - } - } - this.notifyOf('panel_change', {'action':'multi_show','sides':sides}); - }; - - HTMLArea.objectProperties = function(obj) - { - var props = [ ]; - for(var x in obj) - { - props[props.length] = x; - } - return props; - }; - - /* - * EDITOR ACTIVATION NOTES: - * when a page has multiple Xinha editors, ONLY ONE should be activated at any time (this is mostly to - * work around a bug in Mozilla, but also makes some sense). No editor should be activated or focused - * automatically until at least one editor has been activated through user action (by mouse-clicking in - * the editor). - */ - - HTMLArea.prototype.editorIsActivated = function() { - try { - if (HTMLArea.is_gecko) return (this._doc.designMode == 'on'); - else return (this._doc.body.contentEditable); - } catch (e) - { - return false; - } - }; - - HTMLArea._someEditorHasBeenActivated = false; - HTMLArea._currentlyActiveEditor = false; - HTMLArea.prototype.activateEditor = function() - { - // We only want ONE editor at a time to be active - if(HTMLArea._currentlyActiveEditor) - { - if(HTMLArea._currentlyActiveEditor == this) return true; - HTMLArea._currentlyActiveEditor.deactivateEditor(); - } - - if (HTMLArea.is_gecko && this._doc.designMode != 'on') - { - try - { - // cannot set design mode if no display - if (this._iframe.style.display == 'none') - { - this._iframe.style.display = ''; - this._doc.designMode = 'on'; - this._iframe.style.display = 'none'; - } - else - { - this._doc.designMode = 'on'; - } - } catch (e) {} - } - else if(!HTMLArea.is_gecko && this._doc.body.contentEditable != true) - { - this._doc.body.contentEditable = true; - } - - // We need to know that at least one editor on the page has been activated - // this is because we will not focus any editor until an editor has been activated - HTMLArea._someEditorHasBeenActivated = true; - HTMLArea._currentlyActiveEditor = this; - - var editor = this; - this.enableToolbar(); - }; - - HTMLArea.prototype.deactivateEditor = function() - { - // If the editor isn't active then the user shouldn't use the toolbar - this.disableToolbar(); - - if (HTMLArea.is_gecko && this._doc.designMode != 'off') - { - try {this._doc.designMode = 'off';} catch (e) {} - } - else if(!HTMLArea.is_gecko && this._doc.body.contentEditable != false) - { - this._doc.body.contentEditable = false; - } - - if(HTMLArea._currentlyActiveEditor != this) - { - // We just deactivated an editor that wasn't marked as the currentlyActiveEditor - - return; // I think this should really be an error, there shouldn't be a situation where - // an editor is deactivated without first being activated. but it probably won't - // hurt anything. - } - - HTMLArea._currentlyActiveEditor = false; - }; - - HTMLArea.prototype.initIframe = function() - { - this.disableToolbar(); - var doc = null; - var editor = this; - try - { - if (editor._iframe.contentDocument) - { - this._doc = editor._iframe.contentDocument; - } - else - { - this._doc = editor._iframe.contentWindow.document; - } - doc = this._doc; - if (!doc) { // try later - if (HTMLArea.is_gecko) { - setTimeout(function() { editor.initIframe()}, 50); - return false; - } else { - alert("ERROR: IFRAME can't be initialized."); - } - } - } - catch(e) - { // try later - setTimeout(function() { editor.initIframe()}, 50); - } - - HTMLArea.freeLater(this, '_doc'); - - doc.open("text/html","replace"); - - if (!editor.config.fullPage) { - var html = "\n"; - html += "\n"; - html += "\n"; - if(typeof editor.config.baseHref != 'undefined' && editor.config.baseHref != null) - { - html += "\n"; - } - html += "\n"; - html += "\n"; - - if(editor.config.pageStyle) - { - html += ""; - } - - if(typeof editor.config.pageStyleSheets !== 'undefined') - { - for(style_i = 0; style_i < editor.config.pageStyleSheets.length; style_i++) - { - if(editor.config.pageStyleSheets[style_i].length > 0) - html += ""; - //html += "\n"; - } - } - html += "\n"; - html += "\n"; - html += editor.inwardHtml(editor._textArea.value); - html += "\n"; - html += ""; - } else { - var html = editor.inwardHtml(editor._textArea.value); - if (html.match(HTMLArea.RE_doctype)) { - editor.setDoctype(RegExp.$1); - html = html.replace(HTMLArea.RE_doctype, ""); - } - } - doc.write(html); - doc.close(); - - this.setEditorEvents(); - }; - -/** Delay a function until the document is ready for operations. See ticket:547 */ -HTMLArea.prototype.whenDocReady = function(doFunction) -{ - var editor = this; - - if(!this._doc.body) - { - setTimeout(function() {editor.whenDocReady(doFunction)}, 50); - } - else - { - doFunction(); - } -} - -// Switches editor mode; parameter can be "textmode" or "wysiwyg". If no -// parameter was passed this function toggles between modes. -HTMLArea.prototype.setMode = function(mode) { - if (typeof mode == "undefined") { - mode = ((this._editMode == "textmode") ? "wysiwyg" : "textmode"); - } - switch (mode) { - case "textmode": - { - var html = this.outwardHtml(this.getHTML()); - this.setHTML(html); - - // Hide the iframe - this.deactivateEditor(); - this._iframe.style.display = 'none'; - this._textArea.style.display = ''; - - if (this.config.statusBar) - { - this._statusBarTree.style.display = "none"; - this._statusBarTextMode.style.display = ""; - } - - this.notifyOf('modechange', {'mode':'text'}); - break; - } - - case "wysiwyg": - { - var html = this.inwardHtml(this.getHTML()); - this.deactivateEditor(); - this.setHTML(html); - this._iframe.style.display = ''; - this._textArea.style.display = "none"; - this.activateEditor(); - if (this.config.statusBar) - { - this._statusBarTree.style.display = ""; - this._statusBarTextMode.style.display = "none"; - } - - this.notifyOf('modechange', {'mode':'wysiwyg'}); - break; - } - - default: - { - alert("Mode <" + mode + "> not defined!"); - return false; - } - } - this._editMode = mode; - - for (var i in this.plugins) { - var plugin = this.plugins[i].instance; - if (plugin && typeof plugin.onMode == "function") plugin.onMode(mode); - } -}; - -HTMLArea.prototype.setFullHTML = function(html) { - var save_multiline = RegExp.multiline; - RegExp.multiline = true; - if (html.match(HTMLArea.RE_doctype)) { - this.setDoctype(RegExp.$1); - html = html.replace(HTMLArea.RE_doctype, ""); - } - RegExp.multiline = save_multiline; - if (!HTMLArea.is_ie) { - if (html.match(HTMLArea.RE_head)) - this._doc.getElementsByTagName("head")[0].innerHTML = RegExp.$1; - if (html.match(HTMLArea.RE_body)) - this._doc.getElementsByTagName("body")[0].innerHTML = RegExp.$1; - } else { - var reac = this.editorIsActivated(); - if(reac) this.deactivateEditor(); - var html_re = /((.|\n)*?)<\/html>/i; - html = html.replace(html_re, "$1"); - this._doc.open("text/html","replace"); - - this._doc.write(html); - this._doc.close(); - if(reac) this.activateEditor(); - this.setEditorEvents(); - return true; - } -}; - -HTMLArea.prototype.setEditorEvents = function() { - var editor=this; - var doc=this._doc; - editor.whenDocReady( - function() { - // if we have multiple editors some bug in Mozilla makes some lose editing ability - HTMLArea._addEvents - ( - doc, - ["mousedown"], - function() { editor.activateEditor(); return true; } - ); - - // intercept some events; for updating the toolbar & keyboard handlers - HTMLArea._addEvents - (doc, ["keydown", "keypress", "mousedown", "mouseup", "drag"], - function (event) { - return editor._editorEvent(HTMLArea.is_ie ? editor._iframe.contentWindow.event : event); - }); - - // check if any plugins have registered refresh handlers - for (var i in editor.plugins) { - var plugin = editor.plugins[i].instance; - HTMLArea.refreshPlugin(plugin); - }; - - // specific editor initialization - if(typeof editor._onGenerate == "function") { - editor._onGenerate(); - } - } - ); -}; - -/*************************************************** - * Category: PLUGINS - ***************************************************/ - -// Create the specified plugin and register it with this HTMLArea -// return the plugin created to allow refresh when necessary -HTMLArea.prototype.registerPlugin = function() { - var plugin = arguments[0]; - - // We can only register plugins that have been succesfully loaded - if - ( - plugin == null - || typeof plugin == 'undefined' - || (typeof plugin == 'string' && eval('typeof ' + plugin) == 'undefined') - ) return false; - - var args = []; - for (var i = 1; i < arguments.length; ++i) - args.push(arguments[i]); - return this.registerPlugin2(plugin, args); -}; - -// this is the variant of the function above where the plugin arguments are -// already packed in an array. Externally, it should be only used in the -// full-screen editor code, in order to initialize plugins with the same -// parameters as in the opener window. -HTMLArea.prototype.registerPlugin2 = function(plugin, args) { - if (typeof plugin == "string") - plugin = eval(plugin); - if (typeof plugin == "undefined") { - /* FIXME: This should never happen. But why does it do? */ - return false; - } - var obj = new plugin(this, args); - if (obj) { - var clone = {}; - var info = plugin._pluginInfo; - for (var i in info) - clone[i] = info[i]; - clone.instance = obj; - clone.args = args; - this.plugins[plugin._pluginInfo.name] = clone; - return obj; - } else - alert("Can't register plugin " + plugin.toString() + "."); -}; - -// static function that loads the required plugin and lang file, based on the -// language loaded already for HTMLArea. You better make sure that the plugin -// _has_ that language, otherwise shit might happen ;-) -HTMLArea.getPluginDir = function(pluginName) { - return _editor_url + "plugins/" + pluginName; -}; - -HTMLArea.loadPlugin = function(pluginName, callback) { - // Might already be loaded - if(eval('typeof ' + pluginName) != 'undefined') - { - if(callback) - { - callback(pluginName); - } - return true; - } - - var dir = this.getPluginDir(pluginName); - var plugin = pluginName.replace(/([a-z])([A-Z])([a-z])/g, - function (str, l1, l2, l3) { - return l1 + "-" + l2.toLowerCase() + l3; - }).toLowerCase() + ".js"; - var plugin_file = dir + "/" + plugin; - - if(callback) - { - HTMLArea._loadback(plugin_file, function() { callback(pluginName); }); - } - else - { - document.write(""); - } - return false; -}; - -HTMLArea._pluginLoadStatus = { }; -HTMLArea.loadPlugins = function(plugins, callbackIfNotReady) -{ - // Rip the ones that are loaded and look for ones that have failed - var retVal = true; - var nuPlugins = HTMLArea.cloneObject(plugins); - while(nuPlugins.length) - { - var p = nuPlugins.pop(); - if(typeof HTMLArea._pluginLoadStatus[p] == 'undefined') - { - // Load it - HTMLArea._pluginLoadStatus[p] = 'loading'; - HTMLArea.loadPlugin(p, - function(plugin) - { - if(eval('typeof ' + plugin) != 'undefined') - { - HTMLArea._pluginLoadStatus[plugin] = 'ready'; - } - else - { - // Actually, this won't happen, because if the script fails - // it will throw an exception preventing the callback from - // running. This will leave it always in the "loading" state - // unfortunatly that means we can't fail plugins gracefully - // by just skipping them. - HTMLArea._pluginLoadStatus[plugin] = 'failed'; - } - } - ); - retVal = false; - } - else - { - switch(HTMLArea._pluginLoadStatus[p]) - { - case 'failed': - case 'ready' : - break; - - case 'loading': - default : - retVal = false; - break; - } - } - } - - if(retVal) return true; // All done, just return - - // Waiting on plugins to load, return false now and come back a bit later - // if we have to callback - if(callbackIfNotReady) - { - setTimeout(function() { if(HTMLArea.loadPlugins(plugins, callbackIfNotReady)) callbackIfNotReady(); }, 150); - } - return retVal; -}; - -// refresh plugin by calling onGenerate or onGenerateOnce method. -HTMLArea.refreshPlugin = function(plugin) { - if (plugin && typeof plugin.onGenerate == "function") - plugin.onGenerate(); - if (plugin && typeof plugin.onGenerateOnce == "function") { - plugin.onGenerateOnce(); - plugin.onGenerateOnce = null; - } -}; - -HTMLArea.loadStyle = function(style, plugin) { - var url = _editor_url || ''; - if (typeof plugin != "undefined") { - url += "plugins/" + plugin + "/"; - } - url += style; - if (/^\//.test(style)) - url = style; - var head = document.getElementsByTagName("head")[0]; - var link = document.createElement("link"); - link.rel = "stylesheet"; - link.href = url; - head.appendChild(link); - //document.write(""); -}; -HTMLArea.loadStyle(typeof _editor_css == "string" ? _editor_css : "htmlarea.css"); - -/*************************************************** - * Category: EDITOR UTILITIES - ***************************************************/ - -HTMLArea.prototype.debugTree = function() { - var ta = document.createElement("textarea"); - ta.style.width = "100%"; - ta.style.height = "20em"; - ta.value = ""; - function debug(indent, str) { - for (; --indent >= 0;) - ta.value += " "; - ta.value += str + "\n"; - } - function _dt(root, level) { - var tag = root.tagName.toLowerCase(), i; - var ns = HTMLArea.is_ie ? root.scopeName : root.prefix; - debug(level, "- " + tag + " [" + ns + "]"); - for (i = root.firstChild; i; i = i.nextSibling) - if (i.nodeType == 1) - _dt(i, level + 2); - } - _dt(this._doc.body, 0); - document.body.appendChild(ta); -}; - -HTMLArea.getInnerText = function(el) { - var txt = '', i; - for (i = el.firstChild; i; i = i.nextSibling) { - if (i.nodeType == 3) - txt += i.data; - else if (i.nodeType == 1) - txt += HTMLArea.getInnerText(i); - } - return txt; -}; - -HTMLArea.prototype._wordClean = function() { - var - editor = this, - stats = { - empty_tags : 0, - mso_class : 0, - mso_style : 0, - mso_xmlel : 0, - orig_len : this._doc.body.innerHTML.length, - T : (new Date()).getTime() - }, - stats_txt = { - empty_tags : "Empty tags removed: ", - mso_class : "MSO class names removed: ", - mso_style : "MSO inline style removed: ", - mso_xmlel : "MSO XML elements stripped: " - }; - function showStats() { - var txt = "HTMLArea word cleaner stats: \n\n"; - for (var i in stats) - if (stats_txt[i]) - txt += stats_txt[i] + stats[i] + "\n"; - txt += "\nInitial document length: " + stats.orig_len + "\n"; - txt += "Final document length: " + editor._doc.body.innerHTML.length + "\n"; - txt += "Clean-up took " + (((new Date()).getTime() - stats.T) / 1000) + " seconds"; - alert(txt); - } - function clearClass(node) { - var newc = node.className.replace(/(^|\s)mso.*?(\s|$)/ig, ' '); - if (newc != node.className) { - node.className = newc; - if (!/\S/.test(node.className)) { - node.removeAttribute("className"); - ++stats.mso_class; - } - } - } - function clearStyle(node) { - var declarations = node.style.cssText.split(/\s*;\s*/); - for (var i = declarations.length; --i >= 0;) - if (/^mso|^tab-stops/i.test(declarations[i]) || - /^margin\s*:\s*0..\s+0..\s+0../i.test(declarations[i])) { - ++stats.mso_style; - declarations.splice(i, 1); - } - node.style.cssText = declarations.join("; "); - } - if (HTMLArea.is_ie) - { - function stripTag(el) - { - el.outerHTML = HTMLArea.htmlEncode(el.innerText); - ++stats.mso_xmlel; - } - } - else - { - function stripTag(el) - { - var txt = document.createTextNode(HTMLArea.getInnerText(el)); - el.parentNode.insertBefore(txt, el); - HTMLArea.removeFromParent(el); - ++stats.mso_xmlel; - } - } - function checkEmpty(el) { - if (/^(a|span|b|strong|i|em|font)$/i.test(el.tagName) && - !el.firstChild) { - HTMLArea.removeFromParent(el); - ++stats.empty_tags; - } - } - function parseTree(root) { - var tag = root.tagName.toLowerCase(), i, next; - if ((HTMLArea.is_ie && root.scopeName != 'HTML') || (!HTMLArea.is_ie && /:/.test(tag))) { - stripTag(root); - return false; - } else { - clearClass(root); - clearStyle(root); - for (i = root.firstChild; i; i = next) { - next = i.nextSibling; - if (i.nodeType == 1 && parseTree(i)) - checkEmpty(i); - } - } - return true; - } - parseTree(this._doc.body); - // showStats(); - // this.debugTree(); - // this.setHTML(this.getHTML()); - // this.setHTML(this.getInnerHTML()); - // this.forceRedraw(); - this.updateToolbar(); -}; - -HTMLArea.prototype._clearFonts = function() { - var D = this.getInnerHTML(); - - if(confirm(HTMLArea._lc("Would you like to clear font typefaces?"))) - { - D = D.replace(/face="[^"]*"/gi, ''); - D = D.replace(/font-family:[^;}"']+;?/gi, ''); - } - - if(confirm(HTMLArea._lc("Would you like to clear font sizes?"))) - { - D = D.replace(/size="[^"]*"/gi, ''); - D = D.replace(/font-size:[^;}"']+;?/gi, ''); - } - - if(confirm(HTMLArea._lc("Would you like to clear font colours?"))) - { - D = D.replace(/color="[^"]*"/gi, ''); - D = D.replace(/([^-])color:[^;}"']+;?/gi, '$1'); - } - - D = D.replace(/(style|class)="\s*"/gi, ''); - D = D.replace(/<(font|span)\s*>/gi, ''); - this.setHTML(D); - this.updateToolbar(); -}; - -HTMLArea.prototype._splitBlock = function() -{ - this._doc.execCommand('formatblock', false, 'div'); -}; - -HTMLArea.prototype.forceRedraw = function() { - this._doc.body.style.visibility = "hidden"; - this._doc.body.style.visibility = "visible"; - // this._doc.body.innerHTML = this.getInnerHTML(); -}; - -// focuses the iframe window. returns a reference to the editor document. -HTMLArea.prototype.focusEditor = function() { - switch (this._editMode) { - // notice the try { ... } catch block to avoid some rare exceptions in FireFox - // (perhaps also in other Gecko browsers). Manual focus by user is required in - // case of an error. Somebody has an idea? - case "wysiwyg" : - try - { - // We don't want to focus the field unless at least one field has been activated. - if(HTMLArea._someEditorHasBeenActivated) - { - this.activateEditor(); // Ensure *this* editor is activated - this._iframe.contentWindow.focus(); // and focus it - } - } catch (e) {} break; - case "textmode": try { this._textArea.focus() } catch (e) {} break; - default : alert("ERROR: mode " + this._editMode + " is not defined"); - } - return this._doc; -}; - -// takes a snapshot of the current text (for undo) -HTMLArea.prototype._undoTakeSnapshot = function() { - ++this._undoPos; - if (this._undoPos >= this.config.undoSteps) { - // remove the first element - this._undoQueue.shift(); - --this._undoPos; - } - // use the fasted method (getInnerHTML); - var take = true; - var txt = this.getInnerHTML(); - if (this._undoPos > 0) - take = (this._undoQueue[this._undoPos - 1] != txt); - if (take) { - this._undoQueue[this._undoPos] = txt; - } else { - this._undoPos--; - } -}; - -HTMLArea.prototype.undo = function() { - if (this._undoPos > 0) { - var txt = this._undoQueue[--this._undoPos]; - if (txt) this.setHTML(txt); - else ++this._undoPos; - } -}; - -HTMLArea.prototype.redo = function() { - if (this._undoPos < this._undoQueue.length - 1) { - var txt = this._undoQueue[++this._undoPos]; - if (txt) this.setHTML(txt); - else --this._undoPos; - } -}; - -HTMLArea.prototype.disableToolbar = function(except) -{ - if(this._timerToolbar) clearTimeout(this._timerToolbar); - if(typeof except == 'undefined') - { - except = [ ]; - } - else if(typeof except != 'object') - { - except = [except]; - } - - for (var i in this._toolbarObjects) - { - var btn = this._toolbarObjects[i]; - if(except.contains(i)) - { - continue; - } - if (typeof(btn.state) != 'function') continue; // prevent iterating over wrong type - btn.state("enabled", false); - } -}; - -HTMLArea.prototype.enableToolbar = function() -{ - this.updateToolbar(); -}; - -if(!Array.prototype.contains) -{ - Array.prototype.contains = function(needle) - { - var haystack = this; - for(var i = 0; i < haystack.length; i++) - { - if(needle == haystack[i]) return true; - } - - return false; - }; -} - -if(!Array.prototype.indexOf) -{ - Array.prototype.indexOf = function(needle) - { - var haystack = this; - for(var i = 0; i < haystack.length; i++) - { - if(needle == haystack[i]) return i; - } - - return null; - }; -} - - -// updates enabled/disable/active state of the toolbar elements -HTMLArea.prototype.updateToolbar = function(noStatus) { - var doc = this._doc; - var text = (this._editMode == "textmode"); - var ancestors = null; - if (!text) { - ancestors = this.getAllAncestors(); - if (this.config.statusBar && !noStatus) { - this._statusBarTree.innerHTML = HTMLArea._lc("Path") + ": "; // clear - for (var i = ancestors.length; --i >= 0;) { - var el = ancestors[i]; - if (!el) { - // hell knows why we get here; this - // could be a classic example of why - // it's good to check for conditions - // that are impossible to happen ;-) - continue; - } - var a = document.createElement("a"); - a.href = "javascript:void(0)"; - a.el = el; - a.editor = this; - HTMLArea.addDom0Event(a, 'click', function() { - this.blur(); - this.editor.selectNodeContents(this.el); - this.editor.updateToolbar(true); - return false; - }); - HTMLArea.addDom0Event(a, 'contextmenu', function() { - // TODO: add context menu here - this.blur(); - var info = "Inline style:\n\n"; - info += this.el.style.cssText.split(/;\s*/).join(";\n"); - alert(info); - return false; - }); - var txt = el.tagName.toLowerCase(); - a.title = el.style.cssText; - if (el.id) { - txt += "#" + el.id; - } - if (el.className) { - txt += "." + el.className; - } - a.appendChild(document.createTextNode(txt)); - this._statusBarTree.appendChild(a); - if (i != 0) { - this._statusBarTree.appendChild(document.createTextNode(String.fromCharCode(0xbb))); - } - } - } - } - - for (var i in this._toolbarObjects) { - var btn = this._toolbarObjects[i]; - var cmd = i; - var inContext = true; - if (typeof(btn.state) != 'function') continue; // prevent iterating over wrong type - if (btn.context && !text) { - inContext = false; - var context = btn.context; - var attrs = []; - if (/(.*)\[(.*?)\]/.test(context)) { - context = RegExp.$1; - attrs = RegExp.$2.split(","); - } - context = context.toLowerCase(); - var match = (context == "*"); - for (var k = 0; k < ancestors.length; ++k) { - if (!ancestors[k]) { - // the impossible really happens. - continue; - } - if (match || (ancestors[k].tagName.toLowerCase() == context)) { - inContext = true; - for (var ka = 0; ka < attrs.length; ++ka) { - if (!eval("ancestors[k]." + attrs[ka])) { - inContext = false; - break; - } - } - if (inContext) { - break; - } - } - } - } - btn.state("enabled", (!text || btn.text) && inContext); - if (typeof cmd == "function") { - continue; - } - // look-it-up in the custom dropdown boxes - var dropdown = this.config.customSelects[cmd]; - if ((!text || btn.text) && (typeof dropdown != "undefined")) { - dropdown.refresh(this); - continue; - } - switch (cmd) - { - case "fontname": - case "fontsize": - { - if (!text) try { - var value = ("" + doc.queryCommandValue(cmd)).toLowerCase(); - if (!value) { - btn.element.selectedIndex = 0; - break; - } - - // HACK -- retrieve the config option for this - // combo box. We rely on the fact that the - // variable in config has the same name as - // button name in the toolbar. - var options = this.config[cmd]; - var k = 0; - for (var j in options) - { - // FIXME: the following line is scary. - if ((j.toLowerCase() == value) || (options[j].substr(0, value.length).toLowerCase() == value)) - { - btn.element.selectedIndex = k; - throw "ok"; - } - ++k; - } - btn.element.selectedIndex = 0; - } catch(e) {}; - } - break; - - // It's better to search for the format block by tag name from the - // current selection upwards, because IE has a tendancy to return - // things like 'heading 1' for 'h1', which breaks things if you want - // to call your heading blocks 'header 1'. Stupid MS. - case "formatblock" : - { - var blocks = [ ]; - for(var i in this.config['formatblock']) - { - if (typeof(this.config['formatblock'][i]) == 'string') // prevent iterating over wrong type - { - blocks[blocks.length] = this.config['formatblock'][i]; - } - } - - var deepestAncestor = this._getFirstAncestor(this._getSelection(), blocks); - if(deepestAncestor) - { - for(var x= 0; x < blocks.length; x++) - { - if(blocks[x].toLowerCase() == deepestAncestor.tagName.toLowerCase()) - { - btn.element.selectedIndex = x; - } - } - } - else - { - btn.element.selectedIndex = 0; - } - } - break; - - case "textindicator": - if (!text) { - try {with (btn.element.style) { - backgroundColor = HTMLArea._makeColor( - doc.queryCommandValue(HTMLArea.is_ie ? "backcolor" : "hilitecolor")); - if (/transparent/i.test(backgroundColor)) { - // Mozilla - backgroundColor = HTMLArea._makeColor(doc.queryCommandValue("backcolor")); - } - color = HTMLArea._makeColor(doc.queryCommandValue("forecolor")); - fontFamily = doc.queryCommandValue("fontname"); - fontWeight = doc.queryCommandState("bold") ? "bold" : "normal"; - fontStyle = doc.queryCommandState("italic") ? "italic" : "normal"; - }} catch (e) { - // alert(e + "\n\n" + cmd); - } - } - break; - case "htmlmode": btn.state("active", text); break; - case "lefttoright": - case "righttoleft": - var el = this.getParentElement(); - while (el && !HTMLArea.isBlockElement(el)) - el = el.parentNode; - if (el) - btn.state("active", (el.style.direction == ((cmd == "righttoleft") ? "rtl" : "ltr"))); - break; - default: - cmd = cmd.replace(/(un)?orderedlist/i, "insert$1orderedlist"); - try { - btn.state("active", (!text && doc.queryCommandState(cmd))); - } catch (e) {} - } - } - // take undo snapshots - if (this._customUndo && !this._timerUndo) { - this._undoTakeSnapshot(); - var editor = this; - this._timerUndo = setTimeout(function() { - editor._timerUndo = null; - }, this.config.undoTimeout); - } - - // Insert a space in certain locations, this is just to make editing a little - // easier (to "get out of" tags), it's not essential. - // TODO: Make this work for IE? - // TODO: Perhaps should use a plain space character, I'm not sure. - // OK, I've disabled this temporarily, to be honest, I can't rightly remember what the - // original problem was I was trying to solve with it. I think perhaps that EnterParagraphs - // might solve the problem, whatever the hell it was. I'm going senile, I'm sure. - if(0 && HTMLArea.is_gecko) - { - var s = this._getSelection(); - // If the last character in the last text node of the parent tag - // and the parent tag is not a block tag - if(s && s.isCollapsed && s.anchorNode - && s.anchorNode.parentNode.tagName.toLowerCase() != 'body' - && s.anchorNode.nodeType == 3 && s.anchorOffset == s.anchorNode.length - && ! - ( s.anchorNode.parentNode.nextSibling - && s.anchorNode.parentNode.nextSibling.nodeType == 3 - ) - && !HTMLArea.isBlockElement(s.anchorNode.parentNode) - ) - { - // Insert hair-width-space after the close tag if there isn't another text node on the other side - // It could also work with zero-width-space (\u200B) but I don't like it so much. - // Perhaps this won't work well in various character sets and we should use plain space (20)? - try - { - s.anchorNode.parentNode.parentNode.insertBefore - (this._doc.createTextNode('\t'), s.anchorNode.parentNode.nextSibling); - } - catch(e) - { - // Disregard - } - } - } - - // check if any plugins have registered refresh handlers - for (var i in this.plugins) { - var plugin = this.plugins[i].instance; - if (plugin && typeof plugin.onUpdateToolbar == "function") - plugin.onUpdateToolbar(); - } - - -}; - -/** Returns a node after which we can insert other nodes, in the current - * selection. The selection is removed. It splits a text node, if needed. - */ -if (!HTMLArea.is_ie) -{ - HTMLArea.prototype.insertNodeAtSelection = function(toBeInserted) - { - var sel = this._getSelection(); - var range = this._createRange(sel); - // remove the current selection - sel.removeAllRanges(); - range.deleteContents(); - var node = range.startContainer; - var pos = range.startOffset; - switch (node.nodeType) - { - case 3: // Node.TEXT_NODE - // we have to split it at the caret position. - if (toBeInserted.nodeType == 3) - { - // do optimized insertion - node.insertData(pos, toBeInserted.data); - range = this._createRange(); - range.setEnd(node, pos + toBeInserted.length); - range.setStart(node, pos + toBeInserted.length); - sel.addRange(range); - } - else - { - node = node.splitText(pos); - var selnode = toBeInserted; - if (toBeInserted.nodeType == 11 /* Node.DOCUMENT_FRAGMENT_NODE */) - { - selnode = selnode.firstChild; - } - node.parentNode.insertBefore(toBeInserted, node); - this.selectNodeContents(selnode); - this.updateToolbar(); - } - break; - case 1: // Node.ELEMENT_NODE - var selnode = toBeInserted; - if (toBeInserted.nodeType == 11 /* Node.DOCUMENT_FRAGMENT_NODE */) - { - selnode = selnode.firstChild; - } - node.insertBefore(toBeInserted, node.childNodes[pos]); - this.selectNodeContents(selnode); - this.updateToolbar(); - break; - } - }; -} -else -{ - HTMLArea.prototype.insertNodeAtSelection = function(toBeInserted) - { - return null; // this function not yet used for IE - }; -} - -// Returns the deepest node that contains both endpoints of the selection. -if (HTMLArea.is_ie) -{ - HTMLArea.prototype.getParentElement = function(sel) - { - if(typeof sel == 'undefined') - { - sel = this._getSelection(); - } - var range = this._createRange(sel); - switch (sel.type) - { - case "Text": - // try to circumvent a bug in IE: - // the parent returned is not always the real parent element - var parent = range.parentElement(); - while (true) - { - var TestRange = range.duplicate(); - TestRange.moveToElementText(parent); - if (TestRange.inRange(range)) - { - break; - } - if ((parent.nodeType != 1) || (parent.tagName.toLowerCase() == 'body')) - { - break; - } - parent = parent.parentElement; - } - return parent; - case "None": - // It seems that even for selection of type "None", - // there _is_ a parent element and it's value is not - // only correct, but very important to us. MSIE is - // certainly the buggiest browser in the world and I - // wonder, God, how can Earth stand it? - return range.parentElement(); - case "Control": - return range.item(0); - default: - return this._doc.body; - } - }; -} -else -{ - HTMLArea.prototype.getParentElement = function(sel) - { - if(typeof sel == 'undefined') - { - sel = this._getSelection(); - } - var range = this._createRange(sel); - try - { - var p = range.commonAncestorContainer; - if (!range.collapsed && range.startContainer == range.endContainer && - range.startOffset - range.endOffset <= 1 && range.startContainer.hasChildNodes()) - { - p = range.startContainer.childNodes[range.startOffset]; - } - /* - alert(range.startContainer + ":" + range.startOffset + "\n" + - range.endContainer + ":" + range.endOffset); - */ - while (p.nodeType == 3) - { - p = p.parentNode; - } - return p; - } - catch (e) - { - return null; - } - }; -} - -// Returns an array with all the ancestor nodes of the selection. -HTMLArea.prototype.getAllAncestors = function() { - var p = this.getParentElement(); - var a = []; - while (p && (p.nodeType == 1) && (p.tagName.toLowerCase() != 'body')) { - a.push(p); - p = p.parentNode; - } - a.push(this._doc.body); - return a; -}; - -// Returns the deepest ancestor of the selection that is of the current type -HTMLArea.prototype._getFirstAncestor = function(sel, types) -{ - var prnt = this._activeElement(sel); - if(prnt == null) - { - try - { - prnt = (HTMLArea.is_ie ? this._createRange(sel).parentElement() : this._createRange(sel).commonAncestorContainer); - } - catch(e) - { - return null; - } - } - - if(typeof types == 'string') - { - types = [types]; - } - - while(prnt) - { - if(prnt.nodeType == 1) - { - if(types == null) return prnt; - if(types.contains(prnt.tagName.toLowerCase())) - { - - return prnt; - } - if(prnt.tagName.toLowerCase() == 'body') break; - if(prnt.tagName.toLowerCase() == 'table') break; - } - prnt = prnt.parentNode; - } - - return null; -}; - -/** - * Returns the selected element, if any. That is, - * the element that you have last selected in the "path" - * at the bottom of the editor, or a "control" (eg image) - * - * @returns null | element - */ -if(HTMLArea.is_ie) -{ - HTMLArea.prototype._activeElement = function(sel) - { - if((sel == null) || this._selectionEmpty(sel)) - { - return null; - } - - if(sel.type.toLowerCase() == "control") - { - return sel.createRange().item(0); - } - else - { - // If it's not a control, then we need to see if - // the selection is the _entire_ text of a parent node - // (this happens when a node is clicked in the tree) - var range = sel.createRange(); - var p_elm = this.getParentElement(sel); - if(p_elm.innerHTML == range.htmlText) - { - return p_elm; - } - /* - if(p_elm) - { - var p_rng = this._doc.body.createTextRange(); - p_rng.moveToElementText(p_elm); - if(p_rng.isEqual(range)) - { - return p_elm; - } - } - - if(range.parentElement()) - { - var prnt_range = this._doc.body.createTextRange(); - prnt_range.moveToElementText(range.parentElement()); - if(prnt_range.isEqual(range)) - { - return range.parentElement(); - } - } - */ - return null; - } - }; -} -else -{ - HTMLArea.prototype._activeElement = function(sel) - { - if((sel == null) || this._selectionEmpty(sel)) - { - return null; - } - - // For Mozilla we just see if the selection is not collapsed (something is selected) - // and that the anchor (start of selection) is an element. This might not be totally - // correct, we possibly should do a simlar check to IE? - 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 sel.anchorNode.parentNode; - } - } - return null; - }; -} - -if(HTMLArea.is_ie) -{ - HTMLArea.prototype._selectionEmpty = function(sel) - { - if(!sel) - { - return true; - } - - return this._createRange(sel).htmlText == ''; - }; -} -else -{ - HTMLArea.prototype._selectionEmpty = function(sel) - { - if(!sel) - { - return true; - } - - if(typeof sel.isCollapsed != 'undefined') - { - return sel.isCollapsed; - } - - return true; - }; -} - -HTMLArea.prototype._getAncestorBlock = function(sel) -{ - // Scan upwards to find a block level element that we can change or apply to - var prnt = (HTMLArea.is_ie ? this._createRange(sel).parentElement : this._createRange(sel).commonAncestorContainer); - - while(prnt && (prnt.nodeType == 1)) - { - switch(prnt.tagName.toLowerCase()) - { - case 'div' : - case 'p' : - case 'address' : - case 'blockquote' : - case 'center' : - case 'del' : - case 'ins' : - case 'pre' : - case 'h1' : - case 'h2' : - case 'h3' : - case 'h4' : - case 'h5' : - case 'h6' : - case 'h7' : - // Block Element - return prnt; - - case 'body' : - case 'noframes' : - case 'dd' : - case 'li' : - case 'th' : - case 'td' : - case 'noscript' : - // Halting element (stop searching) - return null; - - default : - // Keep lookin - break; - } - } - - return null; -}; - -HTMLArea.prototype._createImplicitBlock = function(type) -{ - // expand it until we reach a block element in either direction - // then wrap the selection in a block and return - var sel = this._getSelection(); - if(HTMLArea.is_ie) - { - sel.empty(); - } - else - { - sel.collapseToStart(); - } - - var rng = this._createRange(sel); - - // Expand UP - - // Expand DN -}; - -HTMLArea.prototype._formatBlock = function(block_format) -{ - var ancestors = this.getAllAncestors(); - var apply_to = null; - - // Block format can be a tag followed with class defs - // eg div.blue.left - var target_tag = null; - var target_classNames = [ ]; - - if(block_format.indexOf('.') >= 0) - { - target_tag = block_format.substr(0, block_format.indexOf('.')).toLowerCase();; - - target_classNames = block_format.substr(block_format.indexOf('.'), block_format.length - block_format.indexOf('.')).replace(/\./g, '').replace(/^\s*/, '').replace(/\s*$/, '').split(' '); - } - else - { - target_tag = block_format.toLowerCase(); - } - - var sel = this._getSelection(); - var rng = this._createRange(sel); - var apply_to = null; - - if(HTMLArea.is_gecko) - { - if(sel.isCollapsed) - { - // With no selection we want to apply to the whole contents of the ancestor block - apply_to = this._getAncestorBlock(sel); - if(apply_to == null) - { - // If there wasn't an ancestor, make one. - apply_to = this._createImplicitBlock(sel, target_tag); - } - } - else - { - // With a selection it's more tricky - switch(target_tag) - { - - case 'h1' : - case 'h2' : - case 'h3' : - case 'h4' : - case 'h5' : - case 'h6' : - case 'h7' : - apply_to = [ ]; - var search_tags = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'h7']; - for(var y = 0; y < search_tags.length; y++) - { - var headers = this._doc.getElementsByTagName(search_tag[y]); - for(var x = 0; x < headers.length; x++) - { - if(sel.containsNode(headers[x])) - { - apply_to[apply_to.length] = headers[x]; - } - } - } - if(apply_to.length > 0) break; - // If there wern't any in the selection drop through - case 'div' : - apply_to = this._doc.createElement(target_tag); - apply_to.appendChild(rng.extractContents()); - rng.insertNode(apply_to); - break; - - case 'p' : - case 'center' : - case 'pre' : - case 'ins' : - case 'del' : - case 'blockquote' : - case 'address' : - apply_to = [ ]; - var paras = this._doc.getElementsByTagName(target_tag); - for(var x = 0; x < paras.length; x++) - { - if(sel.containsNode(paras[x])) - { - apply_to[apply_to.length] = paras[x]; - } - } - - if(apply_to.length == 0) - { - sel.collapseToStart(); - return this._formatBlock(block_format); - } - break; - } - } - } - -}; - -// Selects the contents inside the given node -if (HTMLArea.is_ie) -{ - HTMLArea.prototype.selectNodeContents = function(node, pos) - { - this.focusEditor(); - this.forceRedraw(); - var range; - var collapsed = typeof pos == "undefined" ? true : false; - // Tables and Images get selected as "objects" rather than the text contents - if(collapsed && node.tagName && node.tagName.toLowerCase().match(/table|img|input|select|textarea/)) - { - range = this._doc.body.createControlRange(); - range.add(node); - } - else - { - range = this._doc.body.createTextRange(); - range.moveToElementText(node); - //(collapsed) && range.collapse(pos); - } - range.select(); - }; -} -else -{ - HTMLArea.prototype.selectNodeContents = function(node, pos) - { - this.focusEditor(); - this.forceRedraw(); - var range; - var collapsed = typeof pos == "undefined" ? true : false; - var sel = this._getSelection(); - range = this._doc.createRange(); - // Tables and Images get selected as "objects" rather than the text contents - if(collapsed && node.tagName && node.tagName.toLowerCase().match(/table|img|input|textarea|select/)) - { - range.selectNode(node); - } - else - { - range.selectNodeContents(node); - //(collapsed) && range.collapse(pos); - } - sel.removeAllRanges(); - sel.addRange(range); - }; -} - -/** Call this function to insert HTML code at the current position. It deletes - * the selection, if any. - */ -if (HTMLArea.is_ie) -{ - HTMLArea.prototype.insertHTML = function(html) - { - var sel = this._getSelection(); - var range = this._createRange(sel); - this.focusEditor(); - range.pasteHTML(html); - }; -} -else -{ - HTMLArea.prototype.insertHTML = function(html) - { - var sel = this._getSelection(); - var range = this._createRange(sel); - this.focusEditor(); - // construct a new document fragment with the given HTML - var fragment = this._doc.createDocumentFragment(); - var div = this._doc.createElement("div"); - div.innerHTML = html; - while (div.firstChild) - { - // the following call also removes the node from div - fragment.appendChild(div.firstChild); - } - // this also removes the selection - var node = this.insertNodeAtSelection(fragment); - }; -} - -/** - * Call this function to surround the existing HTML code in the selection with - * your tags. FIXME: buggy! This function will be deprecated "soon". - */ -HTMLArea.prototype.surroundHTML = function(startTag, endTag) { - var html = this.getSelectedHTML(); - // the following also deletes the selection - this.insertHTML(startTag + html + endTag); -}; - -/// Retrieve the selected block -if (HTMLArea.is_ie) -{ - HTMLArea.prototype.getSelectedHTML = function() - { - var sel = this._getSelection(); - var range = this._createRange(sel); - return range.htmlText; - }; -} -else -{ - HTMLArea.prototype.getSelectedHTML = function() - { - var sel = this._getSelection(); - var range = this._createRange(sel); - return HTMLArea.getHTML(range.cloneContents(), false, this); - }; -} - -/// Return true if we have some selection -HTMLArea.prototype.hasSelectedText = function() { - // FIXME: come _on_ mishoo, you can do better than this ;-) - return this.getSelectedHTML() != ''; -}; - -HTMLArea.prototype._createLink = function(link) { - var editor = this; - var outparam = null; - if (typeof link == "undefined") { - link = this.getParentElement(); - if (link) { - while (link && !/^a$/i.test(link.tagName)) - link = link.parentNode; - } - } - if (!link) { - var sel = editor._getSelection(); - var range = editor._createRange(sel); - var compare = 0; - if (HTMLArea.is_ie) { - if(sel.type == "Control") - { - compare = range.length; - } - else - { - compare = range.compareEndPoints("StartToEnd", range); - } - } else { - compare = range.compareBoundaryPoints(range.START_TO_END, range); - } - if (compare == 0) { - alert(HTMLArea._lc("You need to select some text before creating a link")); - return; - } - outparam = { - f_href : '', - f_title : '', - f_target : '', - f_usetarget : editor.config.makeLinkShowsTarget - }; - } else - outparam = { - f_href : HTMLArea.is_ie ? editor.stripBaseURL(link.href) : link.getAttribute("href"), - f_title : link.title, - f_target : link.target, - f_usetarget : editor.config.makeLinkShowsTarget - }; - this._popupDialog(editor.config.URIs["link"], function(param) { - if (!param) - return false; - var a = link; - if (!a) try { - editor._doc.execCommand("createlink", false, param.f_href); - a = editor.getParentElement(); - var sel = editor._getSelection(); - var range = editor._createRange(sel); - if (!HTMLArea.is_ie) { - a = range.startContainer; - if (!/^a$/i.test(a.tagName)) { - a = a.nextSibling; - if (a == null) - a = range.startContainer.parentNode; - } - } - } catch(e) {} - else { - var href = param.f_href.trim(); - editor.selectNodeContents(a); - if (href == "") { - editor._doc.execCommand("unlink", false, null); - editor.updateToolbar(); - return false; - } - else { - a.href = href; - } - } - if (!(a && /^a$/i.test(a.tagName))) - return false; - a.target = param.f_target.trim(); - a.title = param.f_title.trim(); - editor.selectNodeContents(a); - editor.updateToolbar(); - }, outparam); -}; - -// Called when the user clicks on "InsertImage" button. If an image is already -// there, it will just modify it's properties. -HTMLArea.prototype._insertImage = function(image) { - var editor = this; // for nested functions - var outparam = null; - if (typeof image == "undefined") { - image = this.getParentElement(); - if (image && !/^img$/i.test(image.tagName)) - image = null; - } - if (image) outparam = { - f_base : editor.config.baseHref, - f_url : HTMLArea.is_ie ? editor.stripBaseURL(image.src) : image.getAttribute("src"), - f_alt : image.alt, - f_border : image.border, - f_align : image.align, - f_vert : image.vspace, - f_horiz : image.hspace - }; - this._popupDialog(editor.config.URIs["insert_image"], function(param) { - if (!param) { // user must have pressed Cancel - return false; - } - var img = image; - if (!img) { - if (HTMLArea.is_ie) { - var sel = editor._getSelection(); - var range = editor._createRange(sel); - editor._doc.execCommand("insertimage", false, param.f_url); - img = range.parentElement(); - // wonder if this works... - if (img.tagName.toLowerCase() != "img") { - img = img.previousSibling; - } - } else { - img = document.createElement('img'); - img.src = param.f_url; - editor.insertNodeAtSelection(img); - if (!img.tagName) { - // if the cursor is at the beginning of the document - img = range.startContainer.firstChild; - } - } - } else { - img.src = param.f_url; - } - - for (var field in param) { - var value = param[field]; - switch (field) { - case "f_alt" : img.alt = value; break; - case "f_border" : img.border = parseInt(value || "0"); break; - case "f_align" : img.align = value; break; - case "f_vert" : img.vspace = parseInt(value || "0"); break; - case "f_horiz" : img.hspace = parseInt(value || "0"); break; - } - } - }, outparam); -}; - -// Called when the user clicks the Insert Table button -HTMLArea.prototype._insertTable = function() { - var sel = this._getSelection(); - var range = this._createRange(sel); - var editor = this; // for nested functions - this._popupDialog(editor.config.URIs["insert_table"], function(param) { - if (!param) { // user must have pressed Cancel - return false; - } - var doc = editor._doc; - // create the table element - var table = doc.createElement("table"); - // assign the given arguments - - for (var field in param) { - var value = param[field]; - if (!value) { - continue; - } - switch (field) { - case "f_width" : table.style.width = value + param["f_unit"]; break; - case "f_align" : table.align = value; break; - case "f_border" : table.border = parseInt(value); break; - case "f_spacing" : table.cellSpacing = parseInt(value); break; - case "f_padding" : table.cellPadding = parseInt(value); break; - } - } - var cellwidth = 0; - if (param.f_fixed) - cellwidth = Math.floor(100 / parseInt(param.f_cols)); - var tbody = doc.createElement("tbody"); - table.appendChild(tbody); - for (var i = 0; i < param["f_rows"]; ++i) { - var tr = doc.createElement("tr"); - tbody.appendChild(tr); - for (var j = 0; j < param["f_cols"]; ++j) { - var td = doc.createElement("td"); - if (cellwidth) - td.style.width = cellwidth + "%"; - tr.appendChild(td); - // Browsers like to see something inside the cell ( ). - td.appendChild(doc.createTextNode('\u00a0')); - } - } - if (HTMLArea.is_ie) { - range.pasteHTML(table.outerHTML); - } else { - // insert the table - editor.insertNodeAtSelection(table); - } - return true; - }, null); -}; - -/*************************************************** - * Category: EVENT HANDLERS - ***************************************************/ - -// el is reference to the SELECT object -// txt is the name of the select field, as in config.toolbar -HTMLArea.prototype._comboSelected = function(el, txt) { - this.focusEditor(); - var value = el.options[el.selectedIndex].value; - switch (txt) { - case "fontname": - case "fontsize": this.execCommand(txt, false, value); break; - case "formatblock": - // (HTMLArea.is_ie) && (value = "<" + value + ">"); - if(!HTMLArea.is_gecko || value !== 'blockquote') { value = "<" + value + ">";} - this.execCommand(txt, false, value); - break; - default: - // try to look it up in the registered dropdowns - var dropdown = this.config.customSelects[txt]; - if (typeof dropdown != "undefined") { - dropdown.action(this); - } else { - alert("FIXME: combo box " + txt + " not implemented"); - } - } -}; - -// the execCommand function (intercepts some commands and replaces them with -// our own implementation) -HTMLArea.prototype.execCommand = function(cmdID, UI, param) { - var editor = this; // for nested functions - this.focusEditor(); - cmdID = cmdID.toLowerCase(); - if (HTMLArea.is_gecko) try { this._doc.execCommand('useCSS', false, true); } catch (e) {}; //switch useCSS off (true=off) - switch (cmdID) { - case "htmlmode" : this.setMode(); break; - case "hilitecolor": - (HTMLArea.is_ie) && (cmdID = "backcolor"); - if (HTMLArea.is_gecko) try { editor._doc.execCommand('useCSS', false, false); } catch (e) {};//switch on useCSS (mozilla bug #279330) - case "forecolor": - this._popupDialog(editor.config.URIs["select_color"], function(color) { - if (color) { // selection not canceled - editor._doc.execCommand(cmdID, false, "#" + color); - } - }, HTMLArea._colorToRgb(this._doc.queryCommandValue(cmdID))); - break; - case "createlink": - this._createLink(); - break; - case "undo": - case "redo": - if (this._customUndo) - this[cmdID](); - else - this._doc.execCommand(cmdID, UI, param); - break; - case "inserttable": this._insertTable(); break; - case "insertimage": this._insertImage(); break; - case "about" : this._popupDialog(editor.config.URIs["about"], null, this); break; - case "showhelp" : this._popupDialog(editor.config.URIs["help"], null, this); break; - - case "killword": this._wordClean(); break; - - case "cut": - case "copy": - case "paste": - try { - this._doc.execCommand(cmdID, UI, param); - if (this.config.killWordOnPaste) - this._wordClean(); - } catch (e) { - if (HTMLArea.is_gecko) { - alert(HTMLArea._lc("The Paste button does not work in Mozilla based web browsers (technical security reasons). Press CTRL-V on your keyboard to paste directly.")); - } - } - break; - case "lefttoright": - case "righttoleft": - var dir = (cmdID == "righttoleft") ? "rtl" : "ltr"; - var el = this.getParentElement(); - while (el && !HTMLArea.isBlockElement(el)) - el = el.parentNode; - if (el) { - if (el.style.direction == dir) - el.style.direction = ""; - else - el.style.direction = dir; - } - break; - default: try { this._doc.execCommand(cmdID, UI, param); } - catch(e) { if (this.config.debug) { alert(e + "\n\nby execCommand(" + cmdID + ");"); } } - } - - this.updateToolbar(); - return false; -}; - -/** A generic event handler for things that happen in the IFRAME's document. - * This function also handles key bindings. */ -HTMLArea.prototype._editorEvent = function(ev) { - var editor = this; - var keyEvent = (HTMLArea.is_ie && ev.type == "keydown") || (!HTMLArea.is_ie && ev.type == "keypress"); - - //call events of textarea - if(typeof editor._textArea['on'+ev.type] == "function") { - editor._textArea['on'+ev.type](); - } - - if(HTMLArea.is_gecko && keyEvent && ev.ctrlKey && this._unLink && this._unlinkOnUndo) - { - if(String.fromCharCode(ev.charCode).toLowerCase() == 'z') - { - HTMLArea._stopEvent(ev); - this._unLink(); - editor.updateToolbar(); - return; - } - } - - if (keyEvent) - { - for (var i in editor.plugins) - { - var plugin = editor.plugins[i].instance; - if (plugin && typeof plugin.onKeyPress == "function") - if (plugin.onKeyPress(ev)) - return false; - } - } - - if (keyEvent && ev.ctrlKey && !ev.altKey) - { - var sel = null; - var range = null; - var key = String.fromCharCode(HTMLArea.is_ie ? ev.keyCode : ev.charCode).toLowerCase(); - var cmd = null; - var value = null; - switch (key) { - case 'a': - if (!HTMLArea.is_ie) { - // KEY select all - sel = this._getSelection(); - sel.removeAllRanges(); - range = this._createRange(); - range.selectNodeContents(this._doc.body); - sel.addRange(range); - HTMLArea._stopEvent(ev); - } - break; - - // simple key commands follow - - case 'b': cmd = "bold"; break; - case 'i': cmd = "italic"; break; - case 'u': cmd = "underline"; break; - case 's': cmd = "strikethrough"; break; - case 'l': cmd = "justifyleft"; break; - case 'e': cmd = "justifycenter"; break; - case 'r': cmd = "justifyright"; break; - case 'j': cmd = "justifyfull"; break; - case 'z': cmd = "undo"; break; - case 'y': cmd = "redo"; break; - case 'v': if (HTMLArea.is_ie || editor.config.htmlareaPaste) { cmd = "paste"; } break; - case 'n': cmd = "formatblock"; value = HTMLArea.is_ie ? "

" : "p"; break; - - case '0': cmd = "killword"; break; - - // headings - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - cmd = "formatblock"; - value = "h" + key; - if (HTMLArea.is_ie) - value = "<" + value + ">"; - break; - } - if (cmd) { - // execute simple command - this.execCommand(cmd, false, value); - HTMLArea._stopEvent(ev); - } - } - else if (keyEvent) - { - - // IE's textRange and selection object is woefully inadequate, - // which means this fancy stuff is gecko only sorry :-| - // Die Bill, Die. (IE supports it somewhat nativly though) - if(HTMLArea.is_gecko) - { - var s = editor._getSelection() - var autoWrap = function (textNode, tag) - { - var rightText = textNode.nextSibling; - if(typeof tag == 'string') tag = editor._doc.createElement(tag); - var a = textNode.parentNode.insertBefore(tag, rightText); - HTMLArea.removeFromParent(textNode); - a.appendChild(textNode); - rightText.data = ' ' + rightText.data; - - if(HTMLArea.is_ie) - { - var r = editor._createRange(s); - s.moveToElementText(rightText); - s.move('character', 1); - } - else - { - s.collapse(rightText, 1); - } - HTMLArea._stopEvent(ev); - - editor._unLink = function() - { - var t = a.firstChild; - a.removeChild(t); - a.parentNode.insertBefore(t, a); - HTMLArea.removeFromParent(a); - editor._unLink = null; - editor._unlinkOnUndo = false; - } - editor._unlinkOnUndo = true; - - return a; - }; - - switch(ev.which) - { - // Space, see if the text just typed looks like a URL, or email address - // and link it appropriatly - case 32: - { - if(s && s.isCollapsed && s.anchorNode.nodeType == 3 && s.anchorNode.data.length > 3 && s.anchorNode.data.indexOf('.') >= 0) - { - var midStart = s.anchorNode.data.substring(0,s.anchorOffset).search(/\S{4,}$/); - if(midStart == -1) break; - - if(this._getFirstAncestor(s, 'a')) - { - break; // already in an anchor - } - - var matchData = s.anchorNode.data.substring(0,s.anchorOffset).replace(/^.*?(\S*)$/, '$1'); - - var m = matchData.match(HTMLArea.RE_email); - if(m) - { - var leftText = s.anchorNode; - var rightText = leftText.splitText(s.anchorOffset); - var midText = leftText.splitText(midStart); - - autoWrap(midText, 'a').href = 'mailto:' + m[0]; - break; - } - - var m = matchData.match(HTMLArea.RE_url); - if(m) - { - var leftText = s.anchorNode; - var rightText = leftText.splitText(s.anchorOffset); - var midText = leftText.splitText(midStart); - autoWrap(midText, 'a').href = (m[1] ? m[1] : 'http://') + m[2]; - break; - } - } - - } - break; - - default : - { - if(ev.keyCode == 27 || (this._unlinkOnUndo && ev.ctrlKey && ev.which == 122) ) - { - if(this._unLink) - { - this._unLink(); - HTMLArea._stopEvent(ev); - } - break; - } - else if(ev.which || ev.keyCode == 8 || ev.keyCode == 46) - { - this._unlinkOnUndo = false; - - if(s.anchorNode && s.anchorNode.nodeType == 3) - { - // See if we might be changing a link - var a = this._getFirstAncestor(s, 'a'); - if(!a) break; // not an anchor - if(!a._updateAnchTimeout) - { - if( s.anchorNode.data.match(HTMLArea.RE_email) - && (a.href.match('mailto:' + s.anchorNode.data.trim())) - ) - { - var textNode = s.anchorNode; - var fn = function() - { - a.href = 'mailto:' + textNode.data.trim(); - a._updateAnchTimeout = setTimeout(fn, 250); - } - a._updateAnchTimeout = setTimeout(fn, 250); - break; - } - - var m = s.anchorNode.data.match(HTMLArea.RE_url); - if(m && a.href.match(s.anchorNode.data.trim()) ) - { - var textNode = s.anchorNode; - var fn = function() - { - var m = textNode.data.match(HTMLArea.RE_url); - a.href = (m[1] ? m[1] : 'http://') + m[2]; - a._updateAnchTimeout = setTimeout(fn, 250); - } - a._updateAnchTimeout = setTimeout(fn, 250); - } - } - } - - } - } - break; - } - } - - // other keys here - switch (ev.keyCode) - { - case 13: // KEY enter - if (HTMLArea.is_gecko && !ev.shiftKey && this.config.mozParaHandler == 'dirty' ) - { - this.dom_checkInsertP(); - HTMLArea._stopEvent(ev); - } - break; - case 8: // KEY backspace - case 46: // KEY delete - if ((HTMLArea.is_gecko && !ev.shiftKey) || HTMLArea.is_ie) - { - if (this.checkBackspace()) - { - HTMLArea._stopEvent(ev); - } - } - break; - } - } - - // update the toolbar state after some time - if (editor._timerToolbar) { - clearTimeout(editor._timerToolbar); - } - editor._timerToolbar = setTimeout(function() { - editor.updateToolbar(); - editor._timerToolbar = null; - }, 250); -}; - -HTMLArea.prototype.convertNode = function(el, newTagName) { - var newel = this._doc.createElement(newTagName); - while (el.firstChild) - newel.appendChild(el.firstChild); - return newel; -}; - -if(HTMLArea.is_ie) -{ - // this function is for IE - HTMLArea.prototype.checkBackspace = function() - { - var sel = this._getSelection(); - if(sel.type == 'Control') - { - var elm = this._activeElement(sel); - HTMLArea.removeFromParent(elm); - return true; - } - - // This bit of code preseves links when you backspace over the - // endpoint of the link in IE. Without it, if you have something like - // link_here | - // where | is the cursor, and backspace over the last e, then the link - // will de-link, which is a bit tedious - var range = this._createRange(sel); - var r2 = range.duplicate(); - r2.moveStart("character", -1); - var a = r2.parentElement(); - if (a != range.parentElement() && - /^a$/i.test(a.tagName)) - { - r2.collapse(true); - r2.moveEnd("character", 1); - r2.pasteHTML(''); - r2.select(); - return true; - } - }; -} -else -{ - // this function is for DOM - HTMLArea.prototype.checkBackspace = function() - { - var self = this; - setTimeout(function() - { - var sel = self._getSelection(); - var range = self._createRange(sel); - var SC = range.startContainer; - var SO = range.startOffset; - var EC = range.endContainer; - var EO = range.endOffset; - var newr = 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); - HTMLArea.removeFromParent(SC); - var r = range.cloneRange(); - r.setStartBefore(newr); - r.setEndAfter(newr); - r.extractContents(); - sel.removeAllRanges(); - sel.addRange(r); - } - }, 10); - }; -} - -/** The idea here is - * 1. See if we are in a block element - * 2. If we are not, then wrap the current "block" of text into a paragraph - * 3. Now that we have a block element, select all the text between the insertion point - * and just AFTER the end of the block - * eg

The quick |brown fox jumped over the lazy dog.

| - * --------------------------------------- - * 4. Extract that from the document, making - *

The quick

- * and a document fragment with - *

brown fox jumped over the lazy dog.

- * 5. Reinsert it just after the block element - *

The quick

brown fox jumped over the lazy dog.

- * - * Along the way, allow inserting blank paragraphs, which will look like


- */ - -HTMLArea.prototype.dom_checkInsertP = function() { - - // Get the insertion point, we'll scrub any highlighted text the user wants rid of while we are there. - var sel = this._getSelection(); - var range = this._createRange(sel); - if (!range.collapsed) - { - range.deleteContents(); - } - this.deactivateEditor(); - //sel.removeAllRanges(); - //sel.addRange(range); - - var SC = range.startContainer; - var SO = range.startOffset; - var EC = range.endContainer; - var EO = range.endOffset; - - // If the insertion point is character 0 of the - // document, then insert a space character that we will wrap into a paragraph - // in a bit. - if (SC == EC && SC == body && !SO && !EO) - { - p = this._doc.createTextNode(" "); - body.insertBefore(p, body.firstChild); - range.selectNodeContents(p); - SC = range.startContainer; - SO = range.startOffset; - EC = range.endContainer; - EO = range.endOffset; - } - - // See if we are in a block element, if so, great. - var p = this.getAllAncestors(); - - var block = null; - var body = this._doc.body; - for (var i = 0; i < p.length; ++i) - { - if(HTMLArea.isParaContainer(p[i])) - { - break; - } - else if (HTMLArea.isBlockElement(p[i]) && !/body|html/i.test(p[i].tagName)) - { - block = p[i]; - break; - } - } - - // If not in a block element, we'll have to turn some stuff into a paragraph - if (!block) - { - // We want to wrap as much stuff as possible into the paragraph in both directions - // from the insertion point. We start with the start container and walk back up to the - // node just before any of the paragraph containers. - var wrap = range.startContainer; - while(wrap.parentNode && !HTMLArea.isParaContainer(wrap.parentNode)) - { - wrap = wrap.parentNode; - } - var start = wrap; - var end = wrap; - - // Now we walk up the sibling list until we hit the top of the document - // or an element that we shouldn't put in a p (eg other p, div, ul, ol, table) - while(start.previousSibling) - { - if(start.previousSibling.tagName) - { - if(!HTMLArea.isBlockElement(start.previousSibling)) - { - start = start.previousSibling; - } - else - { - break; - } - } - else - { - start = start.previousSibling; - } - } - - // Same down the list - while(end.nextSibling) - { - if(end.nextSibling.tagName) - { - if(!HTMLArea.isBlockElement(end.nextSibling)) - { - end = end.nextSibling; - } - else - { - break; - } - } - else - { - end = end.nextSibling; - } - } - - // Select the entire block - range.setStartBefore(start); - range.setEndAfter(end); - - // Make it a paragraph - range.surroundContents(this._doc.createElement('p')); - - // Which becomes the block element - block = range.startContainer.firstChild; - - // And finally reset the insertion point to where it was originally - range.setStart(SC, SO); - } - - // The start point is the insertion point, so just move the end point to immediatly - // after the block - range.setEndAfter(block); - - // Extract the range, to split the block - // If we just did range.extractContents() then Mozilla does wierd stuff - // with selections, but if we clone, then remove the original range and extract - // the clone, it's quite happy. - var r2 = range.cloneRange(); - sel.removeRange(range); - var df = r2.extractContents(); - - if(df.childNodes.length == 0) - { - df.appendChild(this._doc.createElement('p')); - df.firstChild.appendChild(this._doc.createElement('br')); - } - - if(df.childNodes.length > 1) - { - var nb = this._doc.createElement('p'); - while(df.firstChild) - { - var s = df.firstChild; - df.removeChild(s); - nb.appendChild(s); - } - df.appendChild(nb); - } - - // If the original block is empty, put a nsbp in it. - if (!/\S/.test(block.innerHTML)) - block.innerHTML = " "; - - p = df.firstChild; - if (!/\S/.test(p.innerHTML)) - p.innerHTML = "
"; - - // If the new block is empty and it's a heading, make it a paragraph - // note, the new block is empty when you are hitting enter at the end of the existing block - if (/^\s*\s*$/.test(p.innerHTML) && /^h[1-6]$/i.test(p.tagName)) - { - df.appendChild(this.convertNode(p, "p")); - df.removeChild(p); - } - - var newblock = block.parentNode.insertBefore(df.firstChild, block.nextSibling); - - // Select the range (to set the insertion) - // collapse to the start of the new block - // (remember the block might be


, so if we collapsed to the end the
would be noticable) - - //range.selectNode(newblock.firstChild); - //range.collapse(true); - - this.activateEditor(); - - var sel = this._getSelection(); - sel.removeAllRanges(); - sel.collapse(newblock,0); - - // scroll into view - this.scrollToElement(newblock); - - //this.forceRedraw(); - -}; - -HTMLArea.prototype.scrollToElement = function(e) -{ - if(HTMLArea.is_gecko) - { - var top = 0; - var left = 0; - while(e) - { - top += e.offsetTop; - left += e.offsetLeft; - if(e.offsetParent && e.offsetParent.tagName.toLowerCase() != 'body') - { - e = e.offsetParent; - } - else - { - e = null; - } - } - this._iframe.contentWindow.scrollTo(left, top); - } -}; - -// retrieve the HTML -HTMLArea.prototype.getHTML = function() { - var html = ''; - switch (this._editMode) { - case "wysiwyg" : - { - if (!this.config.fullPage) - html = HTMLArea.getHTML(this._doc.body, false, this); - else - html = this.doctype + "\n" + HTMLArea.getHTML(this._doc.documentElement, true, this); - break; - } - case "textmode" : - { - html = this._textArea.value; - break; - } - default : - { - alert("Mode <" + mode + "> not defined!"); - return false; - } - } - return html; -}; - -HTMLArea.prototype.outwardHtml = function(html) -{ - html = html.replace(/<(\/?)b(\s|>|\/)/ig, "<$1strong$2"); - html = html.replace(/<(\/?)i(\s|>|\/)/ig, "<$1em$2"); - html = html.replace(/<(\/?)strike(\s|>|\/)/ig, "<$1del$2"); - - // replace window.open to that any clicks won't open a popup in designMode - html = html.replace("onclick=\"try{if(document.designMode && document.designMode == 'on') return false;}catch(e){} window.open(", "onclick=\"window.open("); - - // Figure out what our server name is, and how it's referenced - var serverBase = location.href.replace(/(https?:\/\/[^\/]*)\/.*/, '$1') + '/'; - - // IE puts this in can't figure out why - html = html.replace(/https?:\/\/null\//g, serverBase); - - // Make semi-absolute links to be truely absolute - // we do this just to standardize so that special replacements knows what - // to expect - html = html.replace(/((href|src|background)=[\'\"])\/+/ig, '$1' + serverBase); - - html = this.outwardSpecialReplacements(html); - - html = this.fixRelativeLinks(html); - - if(this.config.sevenBitClean) - { - html = html.replace(/[^ -~\r\n\t]/g, function(c){ return '&#'+c.charCodeAt(0)+';';}); - } - - // ticket:56, the "greesemonkey" plugin for Firefox adds this junk, - // so we strip it out. Original submitter gave a plugin, but that's - // a bit much just for this IMHO - james - if(HTMLArea.is_gecko) - { - html = html.replace(/[\s]*<\/script>/ig, ''); - } - - return html; -}; - -HTMLArea.prototype.inwardHtml = function(html) -{ - // Midas uses b and i instead of strong and em, um, hello, - // mozilla, this is the 21st century calling! - if (HTMLArea.is_gecko) { - html = html.replace(/<(\/?)strong(\s|>|\/)/ig, "<$1b$2"); - html = html.replace(/<(\/?)em(\s|>|\/)/ig, "<$1i$2"); - } - - // Both IE and Gecko use strike instead of del (#523) - html = html.replace(/<(\/?)del(\s|>|\/)/ig, "<$1strike$2"); - - - // replace window.open to that any clicks won't open a popup in designMode - html = html.replace("onclick=\"window.open(", "onclick=\"try{if(document.designMode && document.designMode == 'on') return false;}catch(e){} window.open("); - - html = this.inwardSpecialReplacements(html); - - // For IE's sake, make any URLs that are semi-absolute (="/....") to be - // truely absolute - var nullRE = new RegExp('((href|src|background)=[\'"])/+', 'gi'); - html = html.replace(nullRE, '$1' + location.href.replace(/(https?:\/\/[^\/]*)\/.*/, '$1') + '/'); - - html = this.fixRelativeLinks(html); - return html; -}; - -HTMLArea.prototype.outwardSpecialReplacements = function(html) -{ - for(var i in this.config.specialReplacements) - { - var from = this.config.specialReplacements[i]; - var to = i; - if (typeof(from.replace) != 'function' || typeof(to.replace) != 'function') continue; // prevent iterating over wrong type - // alert('out : ' + from + '=>' + to); - var reg = new RegExp(from.replace(HTMLArea.RE_Specials, '\\$1'), 'g'); - html = html.replace(reg, to.replace(/\$/g, '$$$$')); - //html = html.replace(from, to); - } - return html; -}; - -HTMLArea.prototype.inwardSpecialReplacements = function(html) -{ - // alert("inward"); - for(var i in this.config.specialReplacements) - { - var from = i; - var to = this.config.specialReplacements[i]; - - if (typeof(from.replace) != 'function' || typeof(to.replace) != 'function') continue; // prevent iterating over wrong type - // alert('in : ' + from + '=>' + to); - // - // html = html.replace(reg, to); - // html = html.replace(from, to); - var reg = new RegExp(from.replace(HTMLArea.RE_Specials, '\\$1'), 'g'); - html = html.replace(reg, to.replace(/\$/g, '$$$$')); // IE uses doubled dollar signs to escape backrefs, also beware that IE also implements $& $_ and $' like perl. - } - return html; -}; - - -HTMLArea.prototype.fixRelativeLinks = function(html) -{ - - if(typeof this.config.stripSelfNamedAnchors != 'undefined' && this.config.stripSelfNamedAnchors) - { - var stripRe = new RegExp(document.location.href.replace(HTMLArea.RE_Specials, '\\$1') + '(#[^\'" ]*)', 'g'); - html = html.replace(stripRe, '$1'); - } - - - if(typeof this.config.stripBaseHref != 'undefined' && this.config.stripBaseHref) - { - var baseRe = null - if(typeof this.config.baseHref != 'undefined' && this.config.baseHref != null) - { - baseRe = new RegExp(this.config.baseHref.replace(HTMLArea.RE_Specials, '\\$1'), 'g'); - } - else - { - baseRe = new RegExp(document.location.href.replace(/([^\/]*\/?)$/, '').replace(HTMLArea.RE_Specials, '\\$1'), 'g'); - } - - html = html.replace(baseRe, ''); - } - - if(HTMLArea.is_ie) - { - // This is now done in inward & outward - // Don't know why but IE is doing this (putting http://null/ on links?! - // alert(html); - // var nullRE = new RegExp('https?:\/\/null\/', 'g'); - // html = html.replace(nullRE, location.href.replace(/(https?:\/\/[^\/]*\/).*/, '$1')); - // alert(html); - } - - return html; -}; - -// retrieve the HTML (fastest version, but uses innerHTML) -HTMLArea.prototype.getInnerHTML = function() { - if(!this._doc.body) return ''; - switch (this._editMode) { - case "wysiwyg" : - if (!this.config.fullPage) - // return this._doc.body.innerHTML; - html = this._doc.body.innerHTML; - else - html = this.doctype + "\n" + this._doc.documentElement.innerHTML; - break; - case "textmode" : - html = this._textArea.value; - break; - default : - alert("Mode <" + mode + "> not defined!"); - return false; - } - - return html; -}; - -// completely change the HTML inside -HTMLArea.prototype.setHTML = function(html) { - if (!this.config.fullPage) - { - this._doc.body.innerHTML = html; - } - else - { - this.setFullHTML(html); - } - this._textArea.value = html; -}; - -// sets the given doctype (useful when config.fullPage is true) -HTMLArea.prototype.setDoctype = function(doctype) { - this.doctype = doctype; -}; - -/*************************************************** - * Category: UTILITY FUNCTIONS - ***************************************************/ - -// variable used to pass the object to the popup editor window. -HTMLArea._object = null; - -// function that returns a clone of the given object -HTMLArea.cloneObject = function(obj) { - if (!obj) return null; - var newObj = new Object; - - // check for array objects - if (obj.constructor.toString().match( /\s*function Array\(/ )) { - newObj = obj.constructor(); - } - - // check for function objects (as usual, IE is fucked up) - if (obj.constructor.toString().match( /\s*function Function\(/ )) { - newObj = obj; // just copy reference to it - } else for (var n in obj) { - var node = obj[n]; - if (typeof node == 'object') { newObj[n] = HTMLArea.cloneObject(node); } - else { newObj[n] = node; } - } - - return newObj; -}; - -// FIXME!!! this should return false for IE < 5.5 -HTMLArea.checkSupportedBrowser = function() { - if (HTMLArea.is_gecko) { - if (navigator.productSub < 20021201) { - alert("You need at least Mozilla-1.3 Alpha.\n" + - "Sorry, your Gecko is not supported."); - return false; - } - if (navigator.productSub < 20030210) { - alert("Mozilla < 1.3 Beta is not supported!\n" + - "I'll try, though, but it might not work."); - } - } - return HTMLArea.is_gecko || HTMLArea.is_ie; -}; - -// selection & ranges - -// returns the current selection object -if (HTMLArea.is_ie) -{ - HTMLArea.prototype._getSelection = function() - { - return this._doc.selection; - }; -} -else -{ - HTMLArea.prototype._getSelection = function() - { - return this._iframe.contentWindow.getSelection(); - }; -} - -// returns a range for the current selection -if (HTMLArea.is_ie) -{ - HTMLArea.prototype._createRange = function(sel) - { - return sel.createRange(); - }; -} -else -{ - HTMLArea.prototype._createRange = function(sel) - { - this.activateEditor(); - if (typeof sel != "undefined") - { - try - { - return sel.getRangeAt(0); - } - catch(e) - { - return this._doc.createRange(); - } - } - else - { - return this._doc.createRange(); - } - }; -} - -// event handling - -/** Event Flushing - * To try and work around memory leaks in the rather broken - * garbage collector in IE, HTMLArea.flushEvents can be called - * onunload, it will remove any event listeners (that were added - * through _addEvent(s)) and clear any DOM-0 events. - */ -HTMLArea._eventFlushers = [ ]; -HTMLArea.flushEvents = function() -{ - var x = 0; - var e = null; - while(e = HTMLArea._eventFlushers.pop()) - { - try - { - if(e.length == 3) - { - HTMLArea._removeEvent(e[0], e[1], e[2]); - x++; - } - else if (e.length == 2) - { - e[0]['on' + e[1]] = null; - e[0]._xinha_dom0Events[e[1]] = null; - x++; - } - } - catch(e) - { - // Do Nothing - } - } - - /* - // This code is very agressive, and incredibly slow in IE, so I've disabled it. - - if(document.all) - { - for(var i = 0; i < document.all.length; i++) - { - for(var j in document.all[i]) - { - if(/^on/.test(j) && typeof document.all[i][j] == 'function') - { - document.all[i][j] = null; - x++; - } - } - } - } - */ - - // alert('Flushed ' + x + ' events.'); -}; - -if (document.addEventListener) -{ - HTMLArea._addEvent = function(el, evname, func) - { - el.addEventListener(evname, func, true); - HTMLArea._eventFlushers.push([el, evname, func]); - }; - HTMLArea._removeEvent = function(el, evname, func) - { - el.removeEventListener(evname, func, true); - }; - HTMLArea._stopEvent = function(ev) - { - ev.preventDefault(); - ev.stopPropagation(); - }; -} -else if (document.attachEvent) -{ - HTMLArea._addEvent = function(el, evname, func) - { - el.attachEvent("on" + evname, func); - HTMLArea._eventFlushers.push([el, evname, func]); - }; - HTMLArea._removeEvent = function(el, evname, func) - { - el.detachEvent("on" + evname, func); - }; - HTMLArea._stopEvent = function(ev) - { - try - { - ev.cancelBubble = true; - ev.returnValue = false; - } - catch(e) - { - // Perhaps we could try here to stop the window.event - // window.event.cancelBubble = true; - // window.event.returnValue = false; - } - }; -} -else -{ - HTMLArea._addEvent = function(el, evname, func) - { - alert('_addEvent is not supported'); - }; - HTMLArea._removeEvent = function(el, evname, func) - { - alert('_removeEvent is not supported'); - }; - HTMLArea._stopEvent = function(ev) - { - alert('_stopEvent is not supported'); - }; -} - -HTMLArea._addEvents = function(el, evs, func) { - for (var i = evs.length; --i >= 0;) { - HTMLArea._addEvent(el, evs[i], func); - } -}; - -HTMLArea._removeEvents = function(el, evs, func) { - for (var i = evs.length; --i >= 0;) { - HTMLArea._removeEvent(el, evs[i], func); - } -}; - -/** - * Adds a standard "DOM-0" event listener to an element. - * The DOM-0 events are those applied directly as attributes to - * an element - eg element.onclick = stuff; - * - * By using this function instead of simply overwriting any existing - * DOM-0 event by the same name on the element it will trigger as well - * as the existing ones. Handlers are triggered one after the other - * in the order they are added. - * - * Remember to return true/false from your handler, this will determine - * whether subsequent handlers will be triggered (ie that the event will - * continue or be canceled). - * - */ - -HTMLArea.addDom0Event = function(el, ev, fn) -{ - HTMLArea._prepareForDom0Events(el, ev); - el._xinha_dom0Events[ev].unshift(fn); -}; - - -/** - * See addDom0Event, the difference is that handlers registered using - * prependDom0Event will be triggered before existing DOM-0 events of the - * same name on the same element. - */ - -HTMLArea.prependDom0Event = function(el, ev, fn) -{ - HTMLArea._prepareForDom0Events(el, ev); - el._xinha_dom0Events[ev].push(fn); -}; - -/** - * Prepares an element to receive more than one DOM-0 event handler - * when handlers are added via addDom0Event and prependDom0Event. - */ -HTMLArea._prepareForDom0Events = function(el, ev) -{ - // Create a structure to hold our lists of event handlers - if(typeof el._xinha_dom0Events == 'undefined') - { - el._xinha_dom0Events = { }; - HTMLArea.freeLater(el, '_xinha_dom0Events'); - } - - // Create a list of handlers for this event type - if(typeof el._xinha_dom0Events[ev] == 'undefined') - { - el._xinha_dom0Events[ev] = [ ]; - if(typeof el['on'+ev] == 'function') - { - el._xinha_dom0Events[ev].push(el['on'+ev]); - } - - // Make the actual event handler, which runs through - // each of the handlers in the list and executes them - // in the correct context. - el['on'+ev] = function(event) - { - var a = el._xinha_dom0Events[ev]; - // call previous submit methods if they were there. - var allOK = true; - for (var i = a.length; --i >= 0;) - { - // We want the handler to be a member of the form, not the array, so that "this" will work correctly - el._xinha_tempEventHandler = a[i]; - if(el._xinha_tempEventHandler(event) == false) - { - el._xinha_tempEventHandler = null; - allOK = false; - break; - } - el._xinha_tempEventHandler = null; - } - return allOK; - }; - - HTMLArea._eventFlushers.push([el, ev]); - } -}; - -HTMLArea.prototype.notifyOn = function(ev, fn) -{ - if(typeof this._notifyListeners[ev] == 'undefined') - { - this._notifyListeners[ev] = [ ]; - HTMLArea.freeLater(this, '_notifyListeners'); - } - - this._notifyListeners[ev].push(fn); -}; - -HTMLArea.prototype.notifyOf = function(ev, args) -{ - - if(this._notifyListeners[ev]) - { - - for(var i = 0; i < this._notifyListeners[ev].length; i++) - { - this._notifyListeners[ev][i](ev, args); - } - } -}; - - -HTMLArea._removeClass = function(el, className) { - if (!(el && el.className)) { - return; - } - var cls = el.className.split(" "); - var ar = new Array(); - for (var i = cls.length; i > 0;) { - if (cls[--i] != className) { - ar[ar.length] = cls[i]; - } - } - el.className = ar.join(" "); -}; - -HTMLArea._addClass = function(el, className) { - // remove the class first, if already there - HTMLArea._removeClass(el, className); - el.className += " " + className; -}; - -HTMLArea._hasClass = function(el, className) { - if (!(el && el.className)) { - return false; - } - var cls = el.className.split(" "); - for (var i = cls.length; i > 0;) { - if (cls[--i] == className) { - return true; - } - } - return false; -}; - -HTMLArea._blockTags = " body form textarea fieldset ul ol dl li div " + -"p h1 h2 h3 h4 h5 h6 quote pre table thead " + -"tbody tfoot tr td th iframe address blockquote"; -HTMLArea.isBlockElement = function(el) { - return el && el.nodeType == 1 && (HTMLArea._blockTags.indexOf(" " + el.tagName.toLowerCase() + " ") != -1); -}; - -HTMLArea._paraContainerTags = " body td th caption fieldset div"; -HTMLArea.isParaContainer = function(el) -{ - return el && el.nodeType == 1 && (HTMLArea._paraContainerTags.indexOf(" " + el.tagName.toLowerCase() + " ") != -1); -}; - -// These are all the tags for which the end tag is not optional or -// forbidden, taken from the list at: -// http://www.w3.org/TR/REC-html40/index/elements.html -HTMLArea._closingTags = " a abbr acronym address applet b bdo big blockquote button caption center cite code del dfn dir div dl em fieldset font form frameset h1 h2 h3 h4 h5 h6 i iframe ins kbd label legend map menu noframes noscript object ol optgroup pre q s samp script select small span strike strong style sub sup table textarea title tt u ul var "; - -HTMLArea.needsClosingTag = function(el) { - return el && el.nodeType == 1 && (HTMLArea._closingTags.indexOf(" " + el.tagName.toLowerCase() + " ") != -1); -}; - -// performs HTML encoding of some given string -HTMLArea.htmlEncode = function(str) { - if(typeof str.replace == 'undefined') str = str.toString(); - // we don't need regexp for that, but.. so be it for now. - str = str.replace(/&/ig, "&"); - str = str.replace(//ig, ">"); - str = str.replace(/\xA0/g, " "); // Decimal 160, non-breaking-space - str = str.replace(/\x22/g, """); - // \x22 means '"' -- we use hex reprezentation so that we don't disturb - // JS compressors (well, at least mine fails.. ;) - return str; -}; - -// Retrieves the HTML code from the given node. This is a replacement for -// getting innerHTML, using standard DOM calls. -// Wrapper catch a Mozilla-Exception with non well formed html source code -HTMLArea.getHTML = function(root, outputRoot, editor){ - try{ - return HTMLArea.getHTMLWrapper(root,outputRoot,editor); - } - catch(e){ - alert(HTMLArea._lc('Your Document is not well formed. Check JavaScript console for details.')); - return editor._iframe.contentWindow.document.body.innerHTML; - } -}; - -HTMLArea.getHTMLWrapper = function(root, outputRoot, editor, indent) { - var html = ""; - if(!indent) indent = ''; - - switch (root.nodeType) { - case 10:// Node.DOCUMENT_TYPE_NODE - case 6: // Node.ENTITY_NODE - case 12:// Node.NOTATION_NODE - // this all are for the document type, probably not necessary - break; - - case 2: // Node.ATTRIBUTE_NODE - // Never get here, this has to be handled in the ELEMENT case because - // of IE crapness requring that some attributes are grabbed directly from - // the attribute (nodeValue doesn't return correct values), see - //http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&selm=3porgu4mc4ofcoa1uqkf7u8kvv064kjjb4%404ax.com - // for information - break; - - case 4: // Node.CDATA_SECTION_NODE - // Mozilla seems to convert CDATA into a comment when going into wysiwyg mode, - // don't know about IE - html += (HTMLArea.is_ie ? ('\n' + indent) : '') + '' ; - break; - - case 5: // Node.ENTITY_REFERENCE_NODE - html += '&' + root.nodeValue + ';'; - break; - - case 7: // Node.PROCESSING_INSTRUCTION_NODE - // PI's don't seem to survive going into the wysiwyg mode, (at least in moz) - // so this is purely academic - html += (HTMLArea.is_ie ? ('\n' + indent) : '') + ''; - break; - - - case 1: // Node.ELEMENT_NODE - case 11: // Node.DOCUMENT_FRAGMENT_NODE - case 9: // Node.DOCUMENT_NODE - { - var closed; - var i; - var root_tag = (root.nodeType == 1) ? root.tagName.toLowerCase() : ''; - if (outputRoot) - outputRoot = !(editor.config.htmlRemoveTags && editor.config.htmlRemoveTags.test(root_tag)); - if (HTMLArea.is_ie && root_tag == "head") { - if (outputRoot) - html += (HTMLArea.is_ie ? ('\n' + indent) : '') + ""; - // lowercasize - var save_multiline = RegExp.multiline; - RegExp.multiline = true; - var txt = root.innerHTML.replace(HTMLArea.RE_tagName, function(str, p1, p2) { - return p1 + p2.toLowerCase(); - }); - RegExp.multiline = save_multiline; - html += txt + '\n'; - if (outputRoot) - html += (HTMLArea.is_ie ? ('\n' + indent) : '') + ""; - break; - } else if (outputRoot) { - closed = (!(root.hasChildNodes() || HTMLArea.needsClosingTag(root))); - html += (HTMLArea.is_ie && HTMLArea.isBlockElement(root) ? ('\n' + indent) : '') + "<" + root.tagName.toLowerCase(); - var attrs = root.attributes; - for (i = 0; i < attrs.length; ++i) { - var a = attrs.item(i); - if (!a.specified && !(root.tagName.toLowerCase().match(/input|option/) && a.nodeName == 'value')) { - continue; - } - var name = a.nodeName.toLowerCase(); - if (/_moz_editor_bogus_node/.test(name)) { - html = ""; - break; - } - if (/(_moz)|(contenteditable)|(_msh)/.test(name)) { - // avoid certain attributes - continue; - } - var value; - if (name != "style") { - // IE5.5 reports 25 when cellSpacing is - // 1; other values might be doomed too. - // For this reason we extract the - // values directly from the root node. - // I'm starting to HATE JavaScript - // development. Browser differences - // suck. - // - // Using Gecko the values of href and src are converted to absolute links - // unless we get them using nodeValue() - if (typeof root[a.nodeName] != "undefined" && name != "href" && name != "src" && !/^on/.test(name)) { - value = root[a.nodeName]; - } else { - value = a.nodeValue; - // IE seems not willing to return the original values - it converts to absolute - // links using a.nodeValue, a.value, a.stringValue, root.getAttribute("href") - // So we have to strip the baseurl manually :-/ - if (HTMLArea.is_ie && (name == "href" || name == "src")) { - value = editor.stripBaseURL(value); - } - - // High-ascii (8bit) characters in links seem to cause problems for some sites, - // while this seems to be consistent with RFC 3986 Section 2.4 - // because these are not "reserved" characters, it does seem to - // cause links to international resources not to work. See ticket:167 - - // IE always returns high-ascii characters un-encoded in links even if they - // were supplied as % codes (it unescapes them when we pul the value from the link). - - // Hmmm, very strange if we use encodeURI here, or encodeURIComponent in place - // of escape below, then the encoding is wrong. I mean, completely. - // Nothing like it should be at all. Using escape seems to work though. - // It's in both browsers too, so either I'm doing something wrong, or - // something else is going on? - - if(editor.config.only7BitPrintablesInURLs && (name == "href" || name == "src")) - { - value = value.replace(/([^!-~]+)/g, function(match) { return escape(match); }); - } - } - } else { // IE fails to put style in attributes list - // FIXME: cssText reported by IE is UPPERCASE - value = root.style.cssText; - } - if (/^(_moz)?$/.test(value)) { - // Mozilla reports some special tags - // here; we don't need them. - continue; - } - html += " " + name + '="' + HTMLArea.htmlEncode(value) + '"'; - } - if (html != "") { - if(closed && root_tag=="p") { - //never use

as empty paragraphs won't be visible - html += "> 

"; - } else if(closed) { - html += " />"; - } else { - html += ">"; - } - } - } - var containsBlock = false; - for (i = root.firstChild; i; i = i.nextSibling) { - if(!containsBlock && i.nodeType == 1 && HTMLArea.isBlockElement(i)) containsBlock = true; - html += HTMLArea.getHTMLWrapper(i, true, editor, indent + ' '); - } - if (outputRoot && !closed) { - html += (HTMLArea.is_ie && HTMLArea.isBlockElement(root) && containsBlock ? ('\n' + indent) : '') + ""; - } - break; - } - case 3: // Node.TEXT_NODE - html = /^script|style$/i.test(root.parentNode.tagName) ? root.data : HTMLArea.htmlEncode(root.data); - break; - - case 8: // Node.COMMENT_NODE - html = ""; - break; - } - return html; -}; - -/** @see getHTMLWrapper (search for "value = a.nodeValue;") */ - -HTMLArea.prototype.stripBaseURL = function(string) -{ - if(this.config.baseHref==null || !this.config.stripBaseHref) - { - return(string); - } - var baseurl = this.config.baseHref; - - // strip host-part of URL which is added by MSIE to links relative to server root - baseurl = baseurl.replace(/^(https?:\/\/[^\/]+)(.*)$/, '$1'); - basere = new RegExp(baseurl); - return string.replace(basere, ""); -}; - -String.prototype.trim = function() { - return this.replace(/^\s+/, '').replace(/\s+$/, ''); -}; - -// creates a rgb-style color from a number -HTMLArea._makeColor = function(v) { - if (typeof v != "number") { - // already in rgb (hopefully); IE doesn't get here. - return v; - } - // IE sends number; convert to rgb. - var r = v & 0xFF; - var g = (v >> 8) & 0xFF; - var b = (v >> 16) & 0xFF; - return "rgb(" + r + "," + g + "," + b + ")"; -}; - -// returns hexadecimal color representation from a number or a rgb-style color. -HTMLArea._colorToRgb = function(v) { - if (!v) - return ''; - - // returns the hex representation of one byte (2 digits) - function hex(d) { - return (d < 16) ? ("0" + d.toString(16)) : d.toString(16); - } - - if (typeof v == "number") { - // we're talking to IE here - var r = v & 0xFF; - var g = (v >> 8) & 0xFF; - var b = (v >> 16) & 0xFF; - return "#" + hex(r) + hex(g) + hex(b); - } - - if (v.substr(0, 3) == "rgb") { - // in rgb(...) form -- Mozilla - var re = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/; - if (v.match(re)) { - var r = parseInt(RegExp.$1); - var g = parseInt(RegExp.$2); - var b = parseInt(RegExp.$3); - return "#" + hex(r) + hex(g) + hex(b); - } - // doesn't match RE?! maybe uses percentages or float numbers - // -- FIXME: not yet implemented. - return null; - } - - if (v.substr(0, 1) == "#") { - // already hex rgb (hopefully :D ) - return v; - } - - // if everything else fails ;) - return null; -}; - -// modal dialogs for Mozilla (for IE we're using the showModalDialog() call). - -// receives an URL to the popup dialog and a function that receives one value; -// this function will get called after the dialog is closed, with the return -// value of the dialog. -HTMLArea.prototype._popupDialog = function(url, action, init) { - Dialog(this.popupURL(url), action, init); -}; - -// paths - -HTMLArea.prototype.imgURL = function(file, plugin) { - if (typeof plugin == "undefined") - return _editor_url + file; - else - return _editor_url + "plugins/" + plugin + "/img/" + file; -}; - -HTMLArea.prototype.popupURL = function(file) { - var url = ""; - if (file.match(/^plugin:\/\/(.*?)\/(.*)/)) { - var plugin = RegExp.$1; - var popup = RegExp.$2; - if (!/\.html$/.test(popup)) - popup += ".html"; - url = _editor_url + "plugins/" + plugin + "/popups/" + popup; - } else if(file.match(/^\/.*?/)) - url = file; - else - url = _editor_url + this.config.popupURL + file; - return url; -}; - -/** - * FIX: Internet Explorer returns an item having the _name_ equal to the given - * id, even if it's not having any id. This way it can return a different form - * field even if it's not a textarea. This workarounds the problem by - * specifically looking to search only elements having a certain tag name. - */ -HTMLArea.getElementById = function(tag, id) { - var el, i, objs = document.getElementsByTagName(tag); - for (i = objs.length; --i >= 0 && (el = objs[i]);) - if (el.id == id) - return el; - return null; -}; - - -/** Use some CSS trickery to toggle borders on tables */ - -HTMLArea.prototype._toggleBorders = function() -{ - tables = this._doc.getElementsByTagName('TABLE'); - if(tables.length != 0) - { - if(!this.borders) - { - name = "bordered"; - this.borders = true; - } - else - { - name = ""; - this.borders = false; - } - - for (var ix=0;ix < tables.length;ix++) - { - if(this.borders) - { - // flashing the display forces moz to listen (JB:18-04-2005) - #102 - if(HTMLArea.is_gecko) - { - tables[ix].style.display="none"; - tables[ix].style.display="table"; - } - HTMLArea._addClass(tables[ix], 'htmtableborders'); - } - else - { - HTMLArea._removeClass(tables[ix], 'htmtableborders'); - } - } - } - return true; -}; - - -HTMLArea.addClasses = function(el, classes) - { - if(el != null) - { - var thiers = el.className.trim().split(' '); - var ours = classes.split(' '); - for(var x = 0; x < ours.length; x++) - { - var exists = false; - for(var i = 0; exists == false && i < thiers.length; i++) - { - if(thiers[i] == ours[x]) - { - exists = true; - } - } - if(exists == false) - { - thiers[thiers.length] = ours[x]; - } - } - el.className = thiers.join(' ').trim(); - } - }; - -HTMLArea.removeClasses = function(el, classes) -{ - var existing = el.className.trim().split(); - var new_classes = [ ]; - var remove = classes.trim().split(); - - for(var i = 0; i < existing.length; i++) - { - var found = false; - for(var x = 0; x < remove.length && !found; x++) - { - if(existing[i] == remove[x]) - { - found = true; - } - } - if(!found) - { - new_classes[new_classes.length] = existing[i]; - } - } - return new_classes.join(' '); -}; - -/** Alias these for convenience */ -HTMLArea.addClass = HTMLArea._addClass; -HTMLArea.removeClass = HTMLArea._removeClass; -HTMLArea._addClasses = HTMLArea.addClasses; -HTMLArea._removeClasses = HTMLArea.removeClasses; - -/** Use XML HTTPRequest to post some data back to the server and do something - * with the response (asyncronously!), this is used by such things as the tidy functions - */ -HTMLArea._postback = function(url, data, handler) -{ - var req = null; - if(HTMLArea.is_ie) - { - req = new ActiveXObject("Microsoft.XMLHTTP"); - } - else - { - req = new XMLHttpRequest(); - } - - var content = ''; - for(var i in data) - { - content += (content.length ? '&' : '') + i + '=' + encodeURIComponent(data[i]); - } - - function callBack() - { - if(req.readyState == 4) - { - if(req.status == 200) - { - if(typeof handler == 'function') - handler(req.responseText, req); - } - else - { - alert('An error has occurred: ' + req.statusText); - } - } - } - - req.onreadystatechange = callBack; - - req.open('POST', url, true); - req.setRequestHeader - ( - 'Content-Type', - 'application/x-www-form-urlencoded; charset=UTF-8' - ); - //alert(content); - req.send(content); -}; - -HTMLArea._getback = function(url, handler) -{ - var req = null; - if(HTMLArea.is_ie) - { - req = new ActiveXObject("Microsoft.XMLHTTP"); - } - else - { - req = new XMLHttpRequest(); - } - - function callBack() - { - if(req.readyState == 4) - { - if(req.status == 200) - { - handler(req.responseText, req); - } - else - { - alert('An error has occurred: ' + req.statusText); - } - } - } - - req.onreadystatechange = callBack; - req.open('GET', url, true); - req.send(null); -}; - -HTMLArea._geturlcontent = function(url) -{ - var req = null; - if(HTMLArea.is_ie) - { - req = new ActiveXObject("Microsoft.XMLHTTP"); - } - else - { - req = new XMLHttpRequest(); - } - - // Synchronous! - req.open('GET', url, false); - req.send(null); - if(req.status == 200) - { - return req.responseText; - } - else - { - return ''; - } - -}; - -/** - * Unless somebody already has, make a little function to debug things - */ -if(typeof dump == 'undefined') -{ - function dump(o) { - var s = ''; - for (var prop in o) { - s += prop + ' = ' + o[prop] + '\n'; - } - - x = window.open("", "debugger"); - x.document.write('
' + s + '
'); - } -} - - -HTMLArea.arrayContainsArray = function(a1, a2) -{ - var all_found = true; - for(var x = 0; x < a2.length; x++) - { - var found = false; - for(var i = 0; i < a1.length; i++) - { - if(a1[i] == a2[x]) - { - found = true; - break; - } - } - if(!found) - { - all_found = false; - break; - } - } - return all_found; -}; - -HTMLArea.arrayFilter = function(a1, filterfn) -{ - var new_a = [ ]; - for(var x = 0; x < a1.length; x++) - { - if(filterfn(a1[x])) - new_a[new_a.length] = a1[x]; - } - - return new_a; -}; - -HTMLArea.uniq_count = 0; -HTMLArea.uniq = function(prefix) -{ - return prefix + HTMLArea.uniq_count++; -}; - -/** New language handling functions **/ - - -/** Load a language file. - * This function should not be used directly, HTMLArea._lc will use it when necessary. - * @param context Case sensitive context name, eg 'HTMLArea', 'TableOperations', ... - */ -HTMLArea._loadlang = function(context) -{ - if(typeof _editor_lcbackend == "string") - { - //use backend - var url = _editor_lcbackend; - url = url.replace(/%lang%/, _editor_lang); - url = url.replace(/%context%/, context); - } - else - { - //use internal files - if(context != 'HTMLArea') { - var url = _editor_url+"plugins/"+context+"/lang/"+_editor_lang+".js"; - } else { - var url = _editor_url+"lang/"+_editor_lang+".js"; - } - } - - var lang; - var langData = HTMLArea._geturlcontent(url); - if(langData != "") { - try { - eval('lang = ' + langData); - } catch(Error) { - alert('Error reading Language-File ('+url+'):\n'+Error.toString()); - lang = { } - } - } else { - lang = { }; - } - - return lang; -}; - -/** Return a localised string. - * @param string English language string - * @param context Case sensitive context name, eg 'HTMLArea' (default), 'TableOperations'... - * @param replace Replace $variables in String, eg {foo: 'replaceText'} ($foo in string will be replaced) - */ -HTMLArea._lc = function(string, context, replace) -{ - var ret; - if(_editor_lang == "en") - { - if(typeof string == 'object' && string.string) { - ret = string.string; - } else { - ret = string; - } - } - else - { - if(typeof HTMLArea._lc_catalog == 'undefined') - { - HTMLArea._lc_catalog = [ ]; - } - - if(typeof context == 'undefined') - { - context = 'HTMLArea'; - } - - if(typeof HTMLArea._lc_catalog[context] == 'undefined') - { - HTMLArea._lc_catalog[context] = HTMLArea._loadlang(context); - } - - var key; - if(typeof string == 'object' && string.key) - { - key = string.key; - } - else if(typeof string == 'object' && string.string) - { - key = string.string; - } - else - { - key = string; - } - - if(typeof HTMLArea._lc_catalog[context][key] == 'undefined') - { - if(context=='HTMLArea') - { - // Indicate it's untranslated - if(typeof string == 'object' && string.string) { - ret = string.string; - } else { - ret = string; - } - } - else - { - //if string is not found and context is not HTMLArea try if it is in HTMLArea - return HTMLArea._lc(string, 'HTMLArea', replace); - } - } - else - { - ret = HTMLArea._lc_catalog[context][key]; - } - } - - if(typeof string == 'object' && string.replace) - { - replace = string.replace; - } - if(typeof replace != "undefined") - { - for(var i in replace) - { - ret = ret.replace('$'+i, replace[i]); - } - } - - return ret; -}; - -HTMLArea.hasDisplayedChildren = function(el) -{ - var children = el.childNodes; - for(var i =0; i < children.length;i++) - { - if(children[i].tagName) - { - if(children[i].style.display != 'none') - { - return true; - } - } - } - return false; -}; - - -HTMLArea._loadback = function(src, callback) -{ - var head = document.getElementsByTagName("head")[0]; - var evt = HTMLArea.is_ie ? "onreadystatechange" : "onload"; - - var script = document.createElement("script"); - script.type = "text/javascript"; - script.src = src; - script[evt] = function() - { - if(HTMLArea.is_ie && !/loaded|complete/.test(window.event.srcElement.readyState)) return; - callback(); - } - head.appendChild(script); -}; - -HTMLArea.collectionToArray = function(collection) -{ - var array = [ ]; - for(var i = 0; i < collection.length; i++) - { - array.push(collection.item(i)); - } - return array; -}; - -if(!Array.prototype.append) -{ - Array.prototype.append = function(a) - { - for(var i = 0; i> 2; - enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); - enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); - enc4 = chr3 & 63; - - if (isNaN(chr2)) { - enc3 = enc4 = 64; - } else if (isNaN(chr3)) { - enc4 = 64; - } - - output = output + keyStr.charAt(enc1) + keyStr.charAt(enc2) + - keyStr.charAt(enc3) + keyStr.charAt(enc4); - } while (i < input.length); - - return output; -}; - -/** Utility function to base64_decode some arbitrary data, uses the builtin atob() if it exists (Moz) */ - -HTMLArea.base64_decode =function(input) -{ - var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - var output = ""; - var chr1, chr2, chr3; - var enc1, enc2, enc3, enc4; - var i = 0; - - // remove all characters that are not A-Z, a-z, 0-9, +, /, or = - input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - - do { - enc1 = keyStr.indexOf(input.charAt(i++)); - enc2 = keyStr.indexOf(input.charAt(i++)); - enc3 = keyStr.indexOf(input.charAt(i++)); - enc4 = keyStr.indexOf(input.charAt(i++)); - - chr1 = (enc1 << 2) | (enc2 >> 4); - chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); - chr3 = ((enc3 & 3) << 6) | enc4; - - output = output + String.fromCharCode(chr1); - - if (enc3 != 64) { - output = output + String.fromCharCode(chr2); - } - if (enc4 != 64) { - output = output + String.fromCharCode(chr3); - } - } while (i < input.length); - - return output; -}; - -HTMLArea.removeFromParent = function(el) -{ - if(!el.parentNode) return; - var pN = el.parentNode; - pN.removeChild(el); - return el; -}; - -HTMLArea.hasParentNode = function(el) -{ - if(el.parentNode) - { - // When you remove an element from the parent in IE it makes the parent - // of the element a document fragment. Moz doesn't. - if(el.parentNode.nodeType == 11) - { - return false; - } - return true; - } - - return false; -}; - -if(HTMLArea.is_ie) -{ - HTMLArea.getOuterHTML = function(element) - { - return element.outerHTML; - }; -} -else -{ - HTMLArea.getOuterHTML = function(element) - { - return (new XMLSerializer()).serializeToString(element); - }; -} - -HTMLArea.toFree = [ ]; -HTMLArea.freeLater = function(obj,prop) -{ - HTMLArea.toFree.push({o:obj,p:prop}); -}; - -HTMLArea.free = function(obj, prop) -{ - if(obj && !prop) - { - for(var p in obj) - { - HTMLArea.free(obj, p); - } - } - else if (obj) - { - try{ obj[prop] = null; } catch(e){ } - } -}; - -/** IE's Garbage Collector is broken very badly. We will do our best to - * do it's job for it, but we can't be perfect. - */ - -HTMLArea.collectGarbageForIE = function() -{ - HTMLArea.flushEvents(); - for(var x = 0; x < HTMLArea.toFree.length; x++) - { - if(!HTMLArea.toFree[x].o) alert("What is " + x + ' ' + HTMLArea.toFree[x].o); - HTMLArea.free(HTMLArea.toFree[x].o, HTMLArea.toFree[x].p); - } -}; - -HTMLArea.init(); -HTMLArea.addDom0Event(window,'unload',HTMLArea.collectGarbageForIE); - + + /*--------------------------------------:noTabs=true:tabSize=2:indentSize=2:-- + -- COMPATABILITY FILE + -- htmlarea.js is now XinhaCore.js + -- + -- $HeadURL: http://svn.xinha.python-hosting.com/trunk/htmlarea.js $ + -- $LastChangedDate: 2007-01-15 15:28:57 +0100 (Mo, 15 Jan 2007) $ + -- $LastChangedRevision: 659 $ + -- $LastChangedBy: gogo $ + --------------------------------------------------------------------------*/ + +if ( typeof _editor_url == "string" ) +{ + // Leave exactly one backslash at the end of _editor_url + _editor_url = _editor_url.replace(/\x2f*$/, '/'); +} +else +{ + alert("WARNING: _editor_url is not set! You should set this variable to the editor files path; it should preferably be an absolute path, like in '/htmlarea/', but it can be relative if you prefer. Further we will try to load the editor files correctly but we'll probably fail."); + _editor_url = ''; +} + +document.write(''); \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/release-notes.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/release-notes.txt,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/release-notes.txt 25 Feb 2007 19:06:05 -0000 1.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/release-notes.txt 14 Jun 2007 01:36:53 -0000 1.3 @@ -5,6 +5,41 @@ Release History +Xinha 0.93 + - fixed Ticket #967 Font Color Picker stops working after using one of ImageManager, ExtendedFileManager, FullPage, or HorizontalRule + - fixed Ticket #965 When switching between Xinhas in the same page, in textmode toolbar stays disabled + - fixwd Ticket #963 DOMwalk IE: head tag attributes without quotes and closing slash + - Ticket #962 DOMwalk Mozilla: improved source indentation + - fixed Ticket #957 If item in in xinha_editors is not a textarea: skip gracefully + - fixed Ticket #900: catch an fatal error that occured sometimes when switching between modes in fullpage mode in Mozilla + - fixed Ticket #969 DOMwalk Gecko: line breaks rendered as
s inside
 blocks
+ - fixed Ticket #976 Loading message misplaced in IE7
+ - fixed Ticket #977 TableOperations toolbar off-place in ext_example.html
+ - fixed Ticket #978 defining a padding for s in global css affects Xinha framework
+ - Ticket #979 improve checking for non-supported browsers
+ - fixed Ticket #934 SuperClean plugin returns just quotation when executed on localhost
+ - Ticket #929 Save changes on page unload fixed for Mozilla 
+ - fixed Ticket #980 ImageManager color format bug
+ - fixed Ticket #981 No doctype in iframe content document/ editor always in quirks mode
+ - fixed Ticket #543 Stylist Panel overflow broken
+ - Ticket #983 added id for iframe
+ - fixed Ticket #984 !ExtendedFileManager produces php warning
+ - optimized icon file size
+ - fixed !JavaScript error in !ImageManager/!ExtendedFileManager image editor
+ - Ticket #908* Prompts broken in IE7: fixed for EFM, !ImageManager & !TableOperations
+ - Fixes for TableOperations, tickets #82, #908*, #912 and #947
+ - fixed Ticket #998* whitespace added before and/or after content (in non-fullpage mode)
+ - fixed slow unloading in Mozilla
+ - Fix focus problem when switching from html to wysiwyg in Gecko. See ticket #900.
+ - fixed toolbar floating issue
+ - fixed #1003 HTML length limited to 1024 characters with plugin CharCounter
+ - Ticket #1000 new public methods for getting/setting editor content
+ - fixed #735 - IE eating scripts and comments at the beginning of pages.
+ - Added new config variables to set iframe width if less than editor width (ticket:322) and set alignment of toolbar buttons.
+ - added Basque translation for XinhaCore
+ - prevent an error if server is set to parse .js files as PHP
+ - Ticket #127 plugin HtmlEntities: Entities.js  file corrupt
+
 Xinha 0.92beta
  - fixed Ticket #831 stop empty anchors from being removed
  - Make htmlarea.js just load XinhaCore.js instead of being a copy of it.
Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/Newbie.html
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/Newbie.html,v
diff -u
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/Newbie.html	14 Jun 2007 01:36:53 -0000	1.1
@@ -0,0 +1,22 @@
+
+
+
+  Xinha Newbie Guide
+  
+  
+  
+  
+  
+
+
+
+
+ +
+ + \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/XinhaConfig.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/XinhaConfig.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/XinhaConfig.js 14 Jun 2007 01:36:53 -0000 1.1 @@ -0,0 +1,17 @@ +xinha_editors=null; +xinha_init=null; +xinha_config=null; +xinha_plugins=null; +xinha_init=xinha_init?xinha_init:function(){ +xinha_editors=xinha_editors?xinha_editors:["myTextArea","anotherOne"]; +xinha_plugins=xinha_plugins?xinha_plugins:["CharacterMap","ContextMenu","ListType","Stylist","Linker","SuperClean","TableOperations"]; +if(!Xinha.loadPlugins(xinha_plugins,xinha_init)){ +return; +} +xinha_config=xinha_config?xinha_config():new Xinha.Config(); +xinha_config.pageStyleSheets=[_editor_url+"examples/full_example.css"]; +xinha_editors=Xinha.makeEditors(xinha_editors,xinha_config,xinha_plugins); +Xinha.startEditors(xinha_editors); +}; +Xinha._addEvent(window,"load",xinha_init); + Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/custom.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/custom.css,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/custom.css 25 Feb 2007 19:06:05 -0000 1.4 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/custom.css 14 Jun 2007 01:36:53 -0000 1.5 @@ -3,7 +3,7 @@ -- when the CSS plugin is included in an auto-generated example. -- @TODO Make this CSS more useful. -- - -- $HeadURL: http://svn.xinha.python-hosting.com/tags/0.92beta/examples/custom.css $ + -- $HeadURL: http://svn.xinha.python-hosting.com/trunk/examples/custom.css $ -- $LastChangedDate: 2007-01-19 23:24:36 +0100 (Fr, 19 Jan 2007) $ -- $LastChangedRevision: 677 $ -- $LastChangedBy: ray $ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/dynamic.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/dynamic.css,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/dynamic.css 25 Feb 2007 19:06:05 -0000 1.4 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/dynamic.css 14 Jun 2007 01:36:53 -0000 1.5 @@ -3,7 +3,7 @@ -- when the DynamicCSS plugin is included in an auto-generated example. -- @TODO Make this CSS more useful. -- - -- $HeadURL: http://svn.xinha.python-hosting.com/tags/0.92beta/examples/dynamic.css $ + -- $HeadURL: http://svn.xinha.python-hosting.com/trunk/examples/dynamic.css $ -- $LastChangedDate: 2007-01-19 23:24:36 +0100 (Fr, 19 Jan 2007) $ -- $LastChangedRevision: 677 $ -- $LastChangedBy: ray $ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/ext_example-body.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/ext_example-body.html,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/ext_example-body.html 25 Feb 2007 19:06:05 -0000 1.5 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/examples/ext_example-body.html 14 Jun 2007 01:36:53 -0000 1.6 @@ -3,7 +3,7 @@ "; +_a=""; break; } -return _9; +return _a; }; Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InsertImage/insert_image.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InsertImage/insert_image.js,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InsertImage/insert_image.js 25 Feb 2007 19:06:07 -0000 1.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InsertImage/insert_image.js 14 Jun 2007 01:36:54 -0000 1.3 @@ -1,4 +1,4 @@ -InsertImage._pluginInfo={name:"InsertImage",origin:"Xinha Core",version:"$LastChangedRevision: 733 $".replace(/^[^:]*: (.*) \$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.python-hosting.com/tags/0.92beta/modules/InsertImage/insert_image.js $".replace(/^[^:]*: (.*) \$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"}; +InsertImage._pluginInfo={name:"InsertImage",origin:"Xinha Core",version:"$LastChangedRevision: 733 $".replace(/^[^:]*: (.*) \$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.python-hosting.com/trunk/modules/InsertImage/insert_image.js $".replace(/^[^:]*: (.*) \$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"}; function InsertImage(_1){ } Xinha.prototype._insertImage=function(_2){ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InternetExplorer/InternetExplorer.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InternetExplorer/InternetExplorer.js,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InternetExplorer/InternetExplorer.js 25 Feb 2007 19:06:08 -0000 1.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/InternetExplorer/InternetExplorer.js 14 Jun 2007 01:36:55 -0000 1.3 @@ -1,4 +1,4 @@ -InternetExplorer._pluginInfo={name:"Internet Explorer",origin:"Xinha Core",version:"$LastChangedRevision: 737 $".replace(/^[^:]*: (.*) \$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.python-hosting.com/tags/0.92beta/modules/InternetExplorer/InternetExplorer.js $".replace(/^[^:]*: (.*) \$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"}; +InternetExplorer._pluginInfo={name:"Internet Explorer",origin:"Xinha Core",version:"$LastChangedRevision: 816 $".replace(/^[^:]*: (.*) \$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.python-hosting.com/trunk/modules/InternetExplorer/InternetExplorer.js $".replace(/^[^:]*: (.*) \$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"}; function InternetExplorer(_1){ this.editor=_1; _1.InternetExplorer=this; @@ -56,50 +56,55 @@ }; InternetExplorer.prototype.inwardHtml=function(_9){ _9=_9.replace(/<(\/?)del(\s|>|\/)/ig,"<$1strike$2"); +_9=_9.replace(/( )?([\s\S]*?)(=1){ -return _1b.item(0).outerHTML; +if(_1d.length>=1){ +return _1d.item(0).outerHTML; } } return ""; @@ -148,46 +159,46 @@ Xinha.prototype.createRange=function(sel){ return sel.createRange(); }; -Xinha.prototype.isKeyEvent=function(_1d){ -return _1d.type=="keydown"; +Xinha.prototype.isKeyEvent=function(_1f){ +return _1f.type=="keydown"; }; -Xinha.prototype.getKey=function(_1e){ -return String.fromCharCode(_1e.keyCode); +Xinha.prototype.getKey=function(_20){ +return String.fromCharCode(_20.keyCode); }; -Xinha.getOuterHTML=function(_1f){ -return _1f.outerHTML; +Xinha.getOuterHTML=function(_21){ +return _21.outerHTML; }; Xinha.prototype.cc=String.fromCharCode(8201); -Xinha.prototype.setCC=function(_20){ -if(_20=="textarea"){ +Xinha.prototype.setCC=function(_22){ +if(_22=="textarea"){ var ta=this._textArea; var pos=document.selection.createRange(); pos.collapse(); pos.text=this.cc; -var _23=ta.value.indexOf(this.cc); -var _24=ta.value.substring(0,_23); -var _25=ta.value.substring(_23+this.cc.length,ta.value.length); -if(_25.match(/^[^<]*>/)){ -var _26=_25.indexOf(">")+1; -ta.value=_24+_25.substring(0,_26)+this.cc+_25.substring(_26,_25.length); +var _25=ta.value.indexOf(this.cc); +var _26=ta.value.substring(0,_25); +var _27=ta.value.substring(_25+this.cc.length,ta.value.length); +if(_27.match(/^[^<]*>/)){ +var _28=_27.indexOf(">")+1; +ta.value=_26+_27.substring(0,_28)+this.cc+_27.substring(_28,_27.length); }else{ -ta.value=_24+this.cc+_25; +ta.value=_26+this.cc+_27; } }else{ var sel=this.getSelection(); var r=sel.createRange(); if(sel.type=="Control"){ -var _29=r.item(0); -_29.outerHTML+=this.cc; +var _2b=r.item(0); +_2b.outerHTML+=this.cc; }else{ r.collapse(); r.text=this.cc; } } }; -Xinha.prototype.findCC=function(_2a){ -var _2b=(_2a=="textarea")?this._textArea:this._doc.body; -range=_2b.createTextRange(); +Xinha.prototype.findCC=function(_2c){ +var _2d=(_2c=="textarea")?this._textArea:this._doc.body; +range=_2d.createTextRange(); if(range.findText(escape(this.cc))){ range.select(); range.text=""; @@ -196,8 +207,11 @@ range.select(); range.text=""; } -if(_2a=="textarea"){ +if(_2c=="textarea"){ this._textArea.focus(); } }; +Xinha.getDoctype=function(doc){ +return (doc.compatMode=="CSS1Compat")?"":""; +}; Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharCounter/char-counter.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharCounter/char-counter.js,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharCounter/char-counter.js 25 Feb 2007 19:06:09 -0000 1.5 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharCounter/char-counter.js 14 Jun 2007 01:36:55 -0000 1.6 @@ -3,15 +3,14 @@ this._Chars=0; this._Words=0; this._HTML=0; -this.maxHTML=1024; this.onKeyPress=this.__onKeyPress; } -HTMLArea.Config.prototype.CharCounter={"showChar":true,"showWord":true,"showHtml":true,"separator":" | "}; -CharCounter._pluginInfo={name:"CharCounter",version:"1.3",developer:"Udo Schmal",developer_url:"http://www.schaffrath-neuemedien.de",sponsor:"L.N.Schaffrath NeueMedien",sponsor_url:"http://www.schaffrath-neuemedien.de",c_owner:"Udo Schmal & L.N.Schaffrath NeueMedien",license:"htmlArea"}; +HTMLArea.Config.prototype.CharCounter={"showChar":true,"showWord":true,"showHtml":true,"separator":" | ","maxHTML":-1}; +CharCounter._pluginInfo={name:"CharCounter",version:"1.31",developer:"Udo Schmal",developer_url:"http://www.schaffrath-neuemedien.de",sponsor:"L.N.Schaffrath NeueMedien",sponsor_url:"http://www.schaffrath-neuemedien.de",c_owner:"Udo Schmal & L.N.Schaffrath NeueMedien",license:"htmlArea"}; CharCounter.prototype._lc=function(_2){ return HTMLArea._lc(_2,"CharCounter"); }; -CharCounter.prototype.onGenerate=function(){ +CharCounter.prototype.onGenerateOnce=function(){ var _3=this; if(this.charCount==null){ var _4=document.createElement("span"); @@ -36,9 +35,9 @@ }; CharCounter.prototype.__onKeyPress=function(ev){ if((ev.keyCode!=8)&&(ev.keyCode!=46)){ -if(this.maxHTML!=-1){ +if(this.editor.config.CharCounter.maxHTML!=-1){ var _7=this.editor.getHTML(); -if(_7.length>=this.maxHTML){ +if(_7.length>=this.editor.config.CharCounter.maxHTML){ HTMLArea._stopEvent(ev); return true; } Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharacterMap/character-map.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharacterMap/character-map.js,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharacterMap/character-map.js 25 Feb 2007 19:06:09 -0000 1.5 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharacterMap/character-map.js 14 Jun 2007 01:36:55 -0000 1.6 @@ -63,5 +63,6 @@ return false; }; _e._CharacterMap.appendChild(a); +a=null; }; Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharacterMap/lang/fr.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharacterMap/lang/fr.js,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharacterMap/lang/fr.js 2 Nov 2005 08:55:58 -0000 1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/CharacterMap/lang/fr.js 14 Jun 2007 01:36:55 -0000 1.2 @@ -1,6 +1,6 @@ // I18N constants // LANG: "fr", ENCODING: UTF-8 { - "Insert special character": "Insérer caractère spécial", + "Insert special character": "Insérer un caractère spécial", "Cancel": "Annuler" }; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Equation/example.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Equation/example.html,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Equation/example.html 2 Feb 2007 21:04:51 -0000 1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Equation/example.html 14 Jun 2007 01:36:55 -0000 1.2 @@ -22,14 +22,14 @@

Add this to the head section of your document:

 
-  <!-- This block is optional configuration --<
+  <!-- This block is optional configuration -->
   <script type="text/javascript">
     var mathcolor = "black"; // You may change the color of the formulae (default: red)
     var showasciiformulaonhover = false; // helps students learn ASCIIMath, set to false if you like  (default:true)
     var mathfontfamily = "Arial"; //and the font (default: serif, which is good I think)
   </script>
-  <!-- THIS LOADS THE ACTUAL SCRIPT --<
-  <script type="text/javascript" src="ASCIIMathML.js"></script>
+  <!-- THIS LOADS THE ACTUAL SCRIPT, PLEASE ADJUST THE URL --<
+  <script type="text/javascript" src="/xinha/plugins/Equation/ASCIIMathML.js"></script>
 
 
 
Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/editor.php =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/editor.php,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/editor.php 2 Feb 2007 21:04:51 -0000 1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/editor.php 14 Jun 2007 01:36:55 -0000 1.2 @@ -72,7 +72,7 @@ - + + @@ -261,7 +261,7 @@ Border Color - + Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/prompt.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/prompt.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/prompt.html 14 Jun 2007 01:36:55 -0000 1.1 @@ -0,0 +1,92 @@ + + + + + + + + + + +
Please enter value
+
+
+ + +
+
+
+ + +
+
+ + \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/EditorContent.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/EditorContent.js,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/EditorContent.js 25 Feb 2007 19:06:13 -0000 1.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/EditorContent.js 14 Jun 2007 01:36:56 -0000 1.3 @@ -432,6 +432,18 @@ } } function setMarker(nx,ny,nw,nh){ +if(isNaN(nx)){ +nx=0; +} +if(isNaN(ny)){ +ny=0; +} +if(isNaN(nw)){ +nw=0; +} +if(isNaN(nh)){ +nh=0; +} if(ant==null){ ant=MM_findObj("ant"); } Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/images.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/images.js,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/images.js 25 Feb 2007 19:06:13 -0000 1.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/images.js 14 Jun 2007 01:36:56 -0000 1.3 @@ -17,58 +17,72 @@ } function renameFile(_b){ var _c=_b.replace(/.*%2F/,"").replace(/\..*$/,""); -var _d=prompt(i18n("Please enter new name for this file..."),_c); -if(_d==""||_d==null||_d==_c){ +var _d=function(_e){ +if(_e==""||_e==null||_e==_c){ alert(i18n("Cancelled rename.")); return false; } -var _e=window.top.document.getElementById("manager_mode").value; -var _f=window.top.document.getElementById("dirPath"); -var dir=_f.options[_f.selectedIndex].value; -_f=window.top.document.getElementById("viewtype"); -var _11=_f.options[_f.selectedIndex].value; -location.href=_backend_url+"__function=images&mode="+_e+"&dir="+dir+"&rename="+_b+"&renameTo="+_d+"&viewtype="+_11; +var _f=window.top.document.getElementById("manager_mode").value; +var _10=window.top.document.getElementById("dirPath"); +var dir=_10.options[_10.selectedIndex].value; +_10=window.top.document.getElementById("viewtype"); +var _12=_10.options[_10.selectedIndex].value; +location.href=_backend_url+"__function=images&mode="+_f+"&dir="+dir+"&rename="+_b+"&renameTo="+_e+"&viewtype="+_12; +}; +if(Xinha.ie_version>6){ +popupPrompt(i18n("Please enter new name for this file..."),_c,_d,i18n("Rename")); +}else{ +var _13=prompt(i18n("Please enter new name for this file..."),_c); +_d(_13); } -function renameDir(_12){ -var _13=prompt(i18n("Please enter new name for this folder..."),_12); -if(_13==""||_13==null||_13==_12){ +} +function renameDir(_14){ +function rename(_15){ +if(_15==""||_15==null||_15==_14){ alert(i18n("Cancelled rename.")); return false; } -var _14=window.top.document.getElementById("manager_mode").value; -var _15=window.top.document.getElementById("dirPath"); -var dir=_15.options[_15.selectedIndex].value; -_15=window.top.document.getElementById("viewtype"); -var _17=_15.options[_15.selectedIndex].value; -location.href=_backend_url+"__function=images&mode="+_14+"&dir="+dir+"&rename="+_12+"&renameTo="+_13+"&viewtype="+_17; +var _16=window.top.document.getElementById("manager_mode").value; +var _17=window.top.document.getElementById("dirPath"); +var dir=_17.options[_17.selectedIndex].value; +_17=window.top.document.getElementById("viewtype"); +var _19=_17.options[_17.selectedIndex].value; +location.href=_backend_url+"__function=images&mode="+_16+"&dir="+dir+"&rename="+_14+"&renameTo="+_15+"&viewtype="+_19; } -function copyFile(_18,_19){ -var _1a=window.top.document.getElementById("dirPath"); -var dir=_1a.options[_1a.selectedIndex].value; -window.top.pasteButton({"dir":dir,"file":_18,"action":_19+"File"}); +if(Xinha.ie_version>6){ +popupPrompt(i18n("Please enter new name for this folder..."),_14,rename,i18n("Rename")); +}else{ +var _1a=prompt(i18n("Please enter new name for this folder..."),_14); +rename(_1a); } -function copyDir(_1c,_1d){ -var _1e=window.top.document.getElementById("dirPath"); -var dir=_1e.options[_1e.selectedIndex].value; -window.top.pasteButton({"dir":dir,"file":_1c,"action":_1d+"Dir"}); } -function paste(_20){ -var _21=window.top.document.getElementById("manager_mode").value; -var _22=window.top.document.getElementById("dirPath"); -var dir=_22.options[_22.selectedIndex].value; -_22=window.top.document.getElementById("viewtype"); -var _24=_22.options[_22.selectedIndex].value; -location.href=_backend_url+"__function=images&mode="+_21+"&dir="+dir+"&paste="+_20.action+"&srcdir="+_20.dir+"&file="+_20.file+"&viewtype="+_24; +function copyFile(_1b,_1c){ +var _1d=window.top.document.getElementById("dirPath"); +var dir=_1d.options[_1d.selectedIndex].value; +window.top.pasteButton({"dir":dir,"file":_1b,"action":_1c+"File"}); } -function updateDir(_25){ -var _26=window.top.document.getElementById("manager_mode").value; -document.cookie="EFMStartDir"+_26+"="+_25; -var _27=window.top.document.getElementById("dirPath"); -if(_27){ -for(var i=0;i<_27.length;i++){ -var _29=_27.options[i].text; -if(_29==_25){ -_27.selectedIndex=i; +function copyDir(_1f,_20){ +var _21=window.top.document.getElementById("dirPath"); +var dir=_21.options[_21.selectedIndex].value; +window.top.pasteButton({"dir":dir,"file":_1f,"action":_20+"Dir"}); +} +function paste(_23){ +var _24=window.top.document.getElementById("manager_mode").value; +var _25=window.top.document.getElementById("dirPath"); +var dir=_25.options[_25.selectedIndex].value; +_25=window.top.document.getElementById("viewtype"); +var _27=_25.options[_25.selectedIndex].value; +location.href=_backend_url+"__function=images&mode="+_24+"&dir="+dir+"&paste="+_23.action+"&srcdir="+_23.dir+"&file="+_23.file+"&viewtype="+_27; +} +function updateDir(_28){ +var _29=window.top.document.getElementById("manager_mode").value; +document.cookie="EFMStartDir"+_29+"="+_28; +var _2a=window.top.document.getElementById("dirPath"); +if(_2a){ +for(var i=0;i<_2a.length;i++){ +var _2c=_2a.options[i].text; +if(_2c==_28){ +_2a.selectedIndex=i; showMessage("Loading"); break; } @@ -77,152 +91,152 @@ } function emptyProperties(){ toggleImageProperties(false); -var _2a=window.top.document; -_2a.getElementById("f_url").value=""; -_2a.getElementById("f_alt").value=""; -_2a.getElementById("f_title").value=""; -_2a.getElementById("f_width").value=""; -_2a.getElementById("f_margin").value=""; -_2a.getElementById("f_height").value=""; -_2a.getElementById("f_padding").value=""; -_2a.getElementById("f_border").value=""; -_2a.getElementById("f_borderColor").value=""; -_2a.getElementById("f_backgroundColor").value=""; +var _2d=window.top.document; +_2d.getElementById("f_url").value=""; +_2d.getElementById("f_alt").value=""; +_2d.getElementById("f_title").value=""; +_2d.getElementById("f_width").value=""; +_2d.getElementById("f_margin").value=""; +_2d.getElementById("f_height").value=""; +_2d.getElementById("f_padding").value=""; +_2d.getElementById("f_border").value=""; +_2d.getElementById("f_borderColor").value=""; +_2d.getElementById("f_backgroundColor").value=""; } function toggleImageProperties(val){ -var _2c=window.top.document; +var _2f=window.top.document; if(val==true){ -_2c.getElementById("f_width").value=""; -_2c.getElementById("f_margin").value=""; -_2c.getElementById("f_height").value=""; -_2c.getElementById("f_padding").value=""; -_2c.getElementById("f_border").value=""; -_2c.getElementById("f_borderColor").value=""; -_2c.getElementById("f_backgroundColor").value=""; +_2f.getElementById("f_width").value=""; +_2f.getElementById("f_margin").value=""; +_2f.getElementById("f_height").value=""; +_2f.getElementById("f_padding").value=""; +_2f.getElementById("f_border").value=""; +_2f.getElementById("f_borderColor").value=""; +_2f.getElementById("f_backgroundColor").value=""; } -_2c.getElementById("f_width").disabled=val; -_2c.getElementById("f_margin").disabled=val; -_2c.getElementById("f_height").disabled=val; -_2c.getElementById("f_padding").disabled=val; -_2c.getElementById("f_align").disabled=val; -_2c.getElementById("f_border").disabled=val; -_2c.getElementById("f_borderColor").value=""; -_2c.getElementById("f_backgroundColor").value=""; -_2c.getElementById("constrain_prop").disabled=val; +_2f.getElementById("f_width").disabled=val; +_2f.getElementById("f_margin").disabled=val; +_2f.getElementById("f_height").disabled=val; +_2f.getElementById("f_padding").disabled=val; +_2f.getElementById("f_align").disabled=val; +_2f.getElementById("f_border").disabled=val; +_2f.getElementById("f_borderColor").value=""; +_2f.getElementById("f_backgroundColor").value=""; +_2f.getElementById("constrain_prop").disabled=val; } -function selectImage(_2d,alt,_2f,_30){ -var _31=window.top.document; -if(_31.getElementById("manager_mode").value=="image"){ -var obj=_31.getElementById("f_url"); -obj.value=_2d; -obj=_31.getElementById("f_alt"); +function selectImage(_30,alt,_32,_33){ +var _34=window.top.document; +if(_34.getElementById("manager_mode").value=="image"){ +var obj=_34.getElementById("f_url"); +obj.value=_30; +obj=_34.getElementById("f_alt"); obj.value=alt; -obj=_31.getElementById("f_title"); +obj=_34.getElementById("f_title"); obj.value=alt; -if(_2f==0&&_30==0){ +if(_32==0&&_33==0){ toggleImageProperties(true); }else{ toggleImageProperties(false); -var obj=_31.getElementById("f_width"); -obj.value=_2f; -var obj=_31.getElementById("f_height"); -obj.value=_30; -var obj=_31.getElementById("orginal_width"); -obj.value=_2f; -var obj=_31.getElementById("orginal_height"); -obj.value=_30; +var obj=_34.getElementById("f_width"); +obj.value=_32; +var obj=_34.getElementById("f_height"); +obj.value=_33; +var obj=_34.getElementById("orginal_width"); +obj.value=_32; +var obj=_34.getElementById("orginal_height"); +obj.value=_33; update_selected(); } }else{ -if(_31.getElementById("manager_mode").value=="link"){ -var obj=_31.getElementById("f_href"); -obj.value=_2d; -var obj=_31.getElementById("f_title"); +if(_34.getElementById("manager_mode").value=="link"){ +var obj=_34.getElementById("f_href"); +obj.value=_30; +var obj=_34.getElementById("f_title"); obj.value=alt; } } return false; } var _current_selected=null; function update_selected(){ -var _33=window.top.document; +var _36=window.top.document; if(_current_selected){ _current_selected.className=_current_selected.className.replace(/(^| )active( |$)/,"$1$2"); _current_selected=null; } -var _34=_33.getElementById("f_url").value; -var _35=_33.getElementById("dirPath"); -var _36=_35.options[_35.selectedIndex].text; -var dRe=new RegExp("^("+_36.replace(/([\/\^$*+?.()|{}[\]])/g,"\\$1")+")([^/]*)$"); -if(dRe.test(_34)){ -var _38=document.getElementById("holder_"+asc2hex(RegExp.$2)); -if(_38){ -_current_selected=_38; -_38.className+=" active"; +var _37=_36.getElementById("f_url").value; +var _38=_36.getElementById("dirPath"); +var _39=_38.options[_38.selectedIndex].text; +var dRe=new RegExp("^("+_39.replace(/([\/\^$*+?.()|{}[\]])/g,"\\$1")+")([^/]*)$"); +if(dRe.test(_37)){ +var _3b=document.getElementById("holder_"+asc2hex(RegExp.$2)); +if(_3b){ +_current_selected=_3b; +_3b.className+=" active"; } } -showPreview(_34); +showPreview(_37); } function asc2hex(str){ -var _3a=""; +var _3d=""; for(var i=0;i0&&!_f.test(_e.f_url)&&typeof _e.baseHref=="string"){ +_e.f_url=_e.baseHref+_e.f_url; } -var _17=window.dialogArguments.param; -if(manager_mode=="image"&&_17){ -var _18=new RegExp("^https?://"); -if(_17.f_url.length>0&&!_18.test(_17.f_url)&&typeof _17.baseHref=="string"){ -_17.f_url=_17.baseHref+_17.f_url; -} -var _19=new RegExp("(https?://[^/]*)?"+base_url.replace(/\/$/,"")); -_17.f_url=_17.f_url.replace(_19,""); +var _10=new RegExp("(https?://[^/]*)?"+base_url.replace(/\/$/,"")); +_e.f_url=_e.f_url.replace(_10,""); var rd=(_resized_dir)?_resized_dir.replace(Xinha.RE_Specials,"\\$1")+"/":""; var rp=_resized_prefix.replace(Xinha.RE_Specials,"\\$1"); -var _1c=new RegExp("^(.*/)"+rd+rp+"_([0-9]+)x([0-9]+)_([^/]+)$"); -var _1d=_17.f_url.match(_1c); -if(_1c.test(_17.f_url)){ -_17.f_url=RegExp.$1+RegExp.$4; -_17.f_width=RegExp.$2; -_17.f_height=RegExp.$3; +var _13=new RegExp("^(.*/)"+rd+rp+"_([0-9]+)x([0-9]+)_([^/]+)$"); +var _14=_e.f_url.match(_13); +if(_13.test(_e.f_url)){ +_e.f_url=RegExp.$1+RegExp.$4; +_e.f_width=RegExp.$2; +_e.f_height=RegExp.$3; } -document.getElementById("f_url").value=_17["f_url"]; -document.getElementById("f_alt").value=_17["f_alt"]; -document.getElementById("f_title").value=_17["f_title"]; -document.getElementById("f_border").value=_17["f_border"]; -document.getElementById("f_width").value=_17["f_width"]; -document.getElementById("f_height").value=_17["f_height"]; -document.getElementById("f_margin").value=_17["f_margin"]; -document.getElementById("f_padding").value=_17["f_padding"]; -document.getElementById("f_borderColor").value=_17["f_borderColor"]; -document.getElementById("f_backgroundColor").value=_17["f_backgroundColor"]; -setAlign(_17["f_align"]); +document.getElementById("f_url").value=_e["f_url"]; +document.getElementById("f_alt").value=_e["f_alt"]; +document.getElementById("f_title").value=_e["f_title"]; +document.getElementById("f_border").value=_e["f_border"]; +document.getElementById("f_width").value=_e["f_width"]; +document.getElementById("f_height").value=_e["f_height"]; +document.getElementById("f_margin").value=_e["f_margin"]; +document.getElementById("f_padding").value=_e["f_padding"]; +document.getElementById("f_borderColor").value=_e["f_borderColor"]; +document.getElementById("f_backgroundColor").value=_e["f_backgroundColor"]; +setAlign(_e["f_align"]); document.getElementById("f_url").focus(); -document.getElementById("orginal_width").value=_17["f_width"]; -document.getElementById("orginal_height").value=_17["f_height"]; -var _1c=new RegExp("^(.*/)([^/]+)$"); -if(_1c.test(_17["f_url"])){ +document.getElementById("orginal_width").value=_e["f_width"]; +document.getElementById("orginal_height").value=_e["f_height"]; +var _13=new RegExp("^(.*/)([^/]+)$"); +if(_13.test(_e["f_url"])){ changeDir(RegExp.$1); -var _1e=document.getElementById("dirPath"); -for(var i=0;i<_1e.options.length;i++){ -if(_1e.options[i].value==encodeURIComponent(RegExp.$1)){ -_1e.options[i].selected=true; +var _15=document.getElementById("dirPath"); +for(var i=0;i<_15.options.length;i++){ +if(_15.options[i].value==encodeURIComponent(RegExp.$1)){ +_15.options[i].selected=true; break; } } } -document.getElementById("f_preview").src=_backend_url+"__function=thumbs&img="+_17.f_url; +document.getElementById("f_preview").src=_backend_url+"__function=thumbs&img="+_e.f_url; }else{ -if(manager_mode=="link"&&_17){ -var _20=document.getElementById("f_target"); -var _21=true; -var _18=new RegExp("^https?://"); -if(_17.f_href.length>0&&!_18.test(_17.f_href)&&typeof _17.baseHref=="string"){ -_17.f_href=_17.baseHref+_17.f_href; +if(manager_mode=="link"&&_e){ +var _17=document.getElementById("f_target"); +var _18=true; +var _f=new RegExp("^https?://"); +if(_e.f_href.length>0&&!_f.test(_e.f_href)&&typeof _e.baseHref=="string"){ +_e.f_href=_e.baseHref+_e.f_href; } -var _22=new RegExp("(https?://[^/]*)?"+base_url.replace(/\/$/,"")); -_17.f_href=_17.f_href.replace(_22,""); -var _23; -var _1c=new RegExp("^(.*/)([^/]+)$"); -if(_1c.test(_17["f_href"])){ -_23=RegExp.$1; +var _19=new RegExp("(https?://[^/]*)?"+base_url.replace(/\/$/,"")); +_e.f_href=_e.f_href.replace(_19,""); +var _1a; +var _13=new RegExp("^(.*/)([^/]+)$"); +if(_13.test(_e["f_href"])){ +_1a=RegExp.$1; }else{ -_23=document.cookie.match(/EFMStartDirlink=(.*?)(;|$)/); -if(_23){ -_23=_23[1]; +_1a=document.cookie.match(/EFMStartDirlink=(.*?)(;|$)/); +if(_1a){ +_1a=_1a[1]; } } -if(_23){ -changeDir(_23); -var _1e=document.getElementById("dirPath"); -for(var i=0;i<_1e.options.length;i++){ -if(_1e.options[i].value==encodeURIComponent(RegExp.$1)){ -_1e.options[i].selected=true; +if(_1a){ +changeDir(_1a); +var _15=document.getElementById("dirPath"); +for(var i=0;i<_15.options.length;i++){ +if(_15.options[i].value==encodeURIComponent(RegExp.$1)){ +_15.options[i].selected=true; break; } } } -if(_17){ -if(typeof _17["f_usetarget"]!="undefined"){ -_21=_17["f_usetarget"]; +if(_e){ +if(typeof _e["f_usetarget"]!="undefined"){ +_18=_e["f_usetarget"]; } -if(typeof _17["f_href"]!="undefined"){ -document.getElementById("f_href").value=_17["f_href"]; -document.getElementById("f_title").value=_17["f_title"]; -comboSelectValue(_20,_17["f_target"]); -if(_20.value!=_17.f_target){ +if(typeof _e["f_href"]!="undefined"){ +document.getElementById("f_href").value=_e["f_href"]; +document.getElementById("f_title").value=_e["f_title"]; +comboSelectValue(_17,_e["f_target"]); +if(_17.value!=_e.f_target){ var opt=document.createElement("option"); -opt.value=_17.f_target; +opt.value=_e.f_target; opt.innerHTML=opt.value; -_20.appendChild(opt); +_17.appendChild(opt); opt.selected=true; } } } -if(!_21){ +if(!_18){ document.getElementById("f_target_label").style.visibility="hidden"; document.getElementById("f_target").style.visibility="hidden"; document.getElementById("f_other_target").style.visibility="hidden"; } var opt=document.createElement("option"); opt.value="_other"; opt.innerHTML=i18n("Other"); -_20.appendChild(opt); -_20.onchange=onTargetChanged; +_17.appendChild(opt); +_17.onchange=onTargetChanged; document.getElementById("f_href").focus(); }else{ -if(!_17){ -var _23=document.cookie.match(new RegExp("EFMStartDir"+manager_mode+"=(.*?)(;|$)")); -if(_23){ -_23=_23[1]; -changeDir(_23); -var _1e=document.getElementById("dirPath"); -for(var i=0;i<_1e.options.length;i++){ -if(_1e.options[i].value==encodeURIComponent(_23)){ -_1e.options[i].selected=true; +if(!_e){ +var _1a=document.cookie.match(new RegExp("EFMStartDir"+manager_mode+"=(.*?)(;|$)")); +if(_1a){ +_1a=_1a[1]; +changeDir(_1a); +var _15=document.getElementById("dirPath"); +for(var i=0;i<_15.options.length;i++){ +if(_15.options[i].value==encodeURIComponent(_1a)){ +_15.options[i].selected=true; break; } } } } } } +if(manager_mode=="image"&&typeof Xinha.colorPicker!="undefined"&&document.getElementById("f_backgroundColor")){ +var _1c={cellsize:_d.config.colorPickerCellSize,granularity:_d.config.colorPickerGranularity,websafe:_d.config.colorPickerWebSafe,savecolors:_d.config.colorPickerSaveColors}; +new Xinha.colorPicker.InputBinding(document.getElementById("f_backgroundColor"),_1c); +new Xinha.colorPicker.InputBinding(document.getElementById("f_borderColor"),_1c); +} }; -function pasteButton(_25){ -var _26=document.getElementById("pasteBtn"); -if(!_26.firstChild){ +function pasteButton(_1d){ +var _1e=document.getElementById("pasteBtn"); +if(!_1e.firstChild){ var a=document.createElement("a"); a.href="javascript:void(0);"; var img=document.createElement("img"); img.src=window.opener._editor_url+"plugins/ExtendedFileManager/img/edit_paste.gif"; img.alt=i18n("Paste"); a.appendChild(img); -_26.appendChild(a); +_1e.appendChild(a); } -_26.onclick=function(){ +_1e.onclick=function(){ if(typeof imgManager!="undefined"){ -imgManager.paste(_25); +imgManager.paste(_1d); } -if(_25.action=="moveFile"||_25.action=="moveDir"){ +if(_1d.action=="moveFile"||_1d.action=="moveDir"){ this.onclick=null; this.removeChild(this.firstChild); } }; -switch(_25.action){ +switch(_1d.action){ case "copyFile": -_26.firstChild.title=i18n("Copy \"$file="+_25.file+"$\" from \"$dir="+decodeURIComponent(_25.dir)+"$\" here"); +_1e.firstChild.title=i18n("Copy \"$file="+_1d.file+"$\" from \"$dir="+decodeURIComponent(_1d.dir)+"$\" here"); break; case "copyDir": -_26.firstChild.title=i18n("Copy folder \"$file="+_25.file+"$\" from \"$dir="+decodeURIComponent(_25.dir)+"$\" here"); +_1e.firstChild.title=i18n("Copy folder \"$file="+_1d.file+"$\" from \"$dir="+decodeURIComponent(_1d.dir)+"$\" here"); break; case "moveFile": -_26.firstChild.title=i18n("Move \"$file="+_25.file+"$\" from \"$dir="+decodeURIComponent(_25.dir)+"$\" here"); +_1e.firstChild.title=i18n("Move \"$file="+_1d.file+"$\" from \"$dir="+decodeURIComponent(_1d.dir)+"$\" here"); break; break; case "moveDir": -_26.firstChild.title=i18n("Move folder \"$file="+_25.file+"$\" from \"$dir="+decodeURIComponent(_25.dir)+"$\" here"); +_1e.firstChild.title=i18n("Move folder \"$file="+_1d.file+"$\" from \"$dir="+decodeURIComponent(_1d.dir)+"$\" here"); break; } } @@ -224,174 +208,181 @@ } function onOK(){ if(manager_mode=="image"){ -var _29=["f_url","f_alt","f_title","f_align","f_border","f_margin","f_padding","f_height","f_width","f_borderColor","f_backgroundColor"]; -var _2a=new Object(); -for(var i in _29){ -var id=_29[i]; +var _21=["f_url","f_alt","f_title","f_align","f_border","f_margin","f_padding","f_height","f_width","f_borderColor","f_backgroundColor"]; +var _22=new Object(); +for(var i in _21){ +var id=_21[i]; var el=document.getElementById(id); if(id=="f_url"&&el.value.indexOf("://")<0&&el.value){ -_2a[id]=makeURL(base_url,el.value); +_22[id]=makeURL(base_url,el.value); }else{ -_2a[id]=el.value; +_22[id]=el.value; } } -var _2e={w:document.getElementById("orginal_width").value,h:document.getElementById("orginal_height").value}; -if((_2e.w!=_2a.f_width)||(_2e.h!=_2a.f_height)){ -var _2f=Xinha._geturlcontent(window.opener._editor_url+"plugins/ExtendedFileManager/"+_backend_url+"&__function=resizer&img="+encodeURIComponent(document.getElementById("f_url").value)+"&width="+_2a.f_width+"&height="+_2a.f_height); -_2f=eval(_2f); -if(_2f){ -_2a.f_url=makeURL(base_url,_2f); +var _26={w:document.getElementById("orginal_width").value,h:document.getElementById("orginal_height").value}; +if((_26.w!=_22.f_width)||(_26.h!=_22.f_height)){ +var _27=Xinha._geturlcontent(window.opener._editor_url+"plugins/ExtendedFileManager/"+_backend_url+"&__function=resizer&img="+encodeURIComponent(document.getElementById("f_url").value)+"&width="+_22.f_width+"&height="+_22.f_height); +_27=eval(_27); +if(_27){ +_22.f_url=makeURL(base_url,_27); } } -__dlg_close(_2a); +__dlg_close(_22); return false; }else{ if(manager_mode=="link"){ -var _30={}; -for(var i in _30){ +var _28={}; +for(var i in _28){ var el=document.getElementById(i); if(!el.value){ -alert(_30[i]); +alert(_28[i]); el.focus(); return false; } } -var _29=["f_href","f_title","f_target"]; -var _2a=new Object(); -for(var i in _29){ -var id=_29[i]; +var _21=["f_href","f_title","f_target"]; +var _22=new Object(); +for(var i in _21){ +var id=_21[i]; var el=document.getElementById(id); if(id=="f_href"&&el.value.indexOf("://")<0){ -_2a[id]=makeURL(base_url,el.value); +_22[id]=makeURL(base_url,el.value); }else{ -_2a[id]=el.value; +_22[id]=el.value; } } -if(_2a.f_target=="_other"){ -_2a.f_target=document.getElementById("f_other_target").value; +if(_22.f_target=="_other"){ +_22.f_target=document.getElementById("f_other_target").value; } -__dlg_close(_2a); +__dlg_close(_22); return false; } } } -function makeURL(_31,_32){ -if(_31.substring(_31.length-1)!="/"){ -_31+="/"; +function makeURL(_29,_2a){ +if(_29.substring(_29.length-1)!="/"){ +_29+="/"; } -if(_32.charAt(0)=="/"){ +if(_2a.charAt(0)=="/"){ } -_32=_32.substring(1); -return _31+_32; +_2a=_2a.substring(1); +return _29+_2a; } -function updateDir(_33){ -var _34=_33.options[_33.selectedIndex].value; -changeDir(_34); +function updateDir(_2b){ +var _2c=_2b.options[_2b.selectedIndex].value; +changeDir(_2c); } function goUpDir(){ -var _35=document.getElementById("dirPath"); -var _36=_35.options[_35.selectedIndex].text; -if(_36.length<2){ +var _2d=document.getElementById("dirPath"); +var _2e=_2d.options[_2d.selectedIndex].text; +if(_2e.length<2){ return false; } -var _37=_36.split("/"); -var _38=""; -for(var i=0;i<_37.length-2;i++){ -_38+=_37[i]+"/"; +var _2f=_2e.split("/"); +var _30=""; +for(var i=0;i<_2f.length-2;i++){ +_30+=_2f[i]+"/"; } -for(var i=0;i<_35.length;i++){ -var _3a=_35.options[i].text; -if(_3a==_38){ -_35.selectedIndex=i; -var _3b=_35.options[i].value; -changeDir(_3b); +for(var i=0;i<_2d.length;i++){ +var _32=_2d.options[i].text; +if(_32==_30){ +_2d.selectedIndex=i; +var _33=_2d.options[i].value; +changeDir(_33); break; } } } -function changeDir(_3c){ +function changeDir(_34){ if(typeof imgManager!="undefined"){ -imgManager.changeDir(_3c); +imgManager.changeDir(_34); } } function updateView(){ refresh(); } -function toggleConstrains(_3d){ -var _3e=document.getElementById("imgLock"); -var _3d=document.getElementById("constrain_prop"); -if(_3d.checked){ -_3e.src="img/locked.gif"; +function toggleConstrains(_35){ +var _36=document.getElementById("imgLock"); +var _35=document.getElementById("constrain_prop"); +if(_35.checked){ +_36.src="img/locked.gif"; checkConstrains("width"); }else{ -_3e.src="img/unlocked.gif"; +_36.src="img/unlocked.gif"; } } -function checkConstrains(_3f){ -var _40=document.getElementById("constrain_prop"); -if(_40.checked){ +function checkConstrains(_37){ +var _38=document.getElementById("constrain_prop"); +if(_38.checked){ var obj=document.getElementById("orginal_width"); -var _42=parseInt(obj.value); +var _3a=parseInt(obj.value); var obj=document.getElementById("orginal_height"); -var _43=parseInt(obj.value); -var _44=document.getElementById("f_width"); -var _45=document.getElementById("f_height"); -var _46=parseInt(_44.value); -var _47=parseInt(_45.value); -if(_42>0&&_43>0){ -if(_3f=="width"&&_46>0){ -_45.value=parseInt((_46/_42)*_43); +var _3b=parseInt(obj.value); +var _3c=document.getElementById("f_width"); +var _3d=document.getElementById("f_height"); +var _3e=parseInt(_3c.value); +var _3f=parseInt(_3d.value); +if(_3a>0&&_3b>0){ +if(_37=="width"&&_3e>0){ +_3d.value=parseInt((_3e/_3a)*_3b); } -if(_3f=="height"&&_47>0){ -_44.value=parseInt((_47/_43)*_42); +if(_37=="height"&&_3f>0){ +_3c.value=parseInt((_3f/_3b)*_3a); } } } } -function showMessage(_48){ -var _49=document.getElementById("message"); -var _4a=document.getElementById("messages"); -if(_49.firstChild){ -_49.removeChild(_49.firstChild); +function showMessage(_40){ +var _41=document.getElementById("message"); +var _42=document.getElementById("messages"); +if(_41.firstChild){ +_41.removeChild(_41.firstChild); } -_49.appendChild(document.createTextNode(i18n(_48))); -_4a.style.display="block"; +_41.appendChild(document.createTextNode(i18n(_40))); +_42.style.display="block"; } -function addEvent(obj,_4c,fn){ +function addEvent(obj,_44,fn){ if(obj.addEventListener){ -obj.addEventListener(_4c,fn,true); +obj.addEventListener(_44,fn,true); return true; }else{ if(obj.attachEvent){ -var r=obj.attachEvent("on"+_4c,fn); +var r=obj.attachEvent("on"+_44,fn); return r; }else{ return false; } } } function doUpload(){ -var _4f=document.getElementById("uploadForm"); -if(_4f){ +var _47=document.getElementById("uploadForm"); +if(_47){ showMessage("Uploading"); } } function refresh(){ -var _50=document.getElementById("dirPath"); -updateDir(_50); +var _48=document.getElementById("dirPath"); +updateDir(_48); } function newFolder(){ -var _51=prompt(i18n("Please enter name for new folder..."),i18n("Untitled")); -var _52=document.getElementById("dirPath"); -var dir=_52.options[_52.selectedIndex].value; -if(_51==thumbdir){ +function createFolder(_49){ +var _4a=document.getElementById("dirPath"); +var dir=_4a.options[_4a.selectedIndex].value; +if(_49==thumbdir){ alert(i18n("Invalid folder name, please choose another folder name.")); return false; } -if(_51&&_51!=""&&typeof imgManager!="undefined"){ -imgManager.newFolder(dir,encodeURI(_51)); +if(_49&&_49!=""&&typeof imgManager!="undefined"){ +imgManager.newFolder(dir,encodeURI(_49)); } } +if(Xinha.ie_version>6){ +popupPrompt(i18n("Please enter name for new folder..."),i18n("Untitled"),createFolder,i18n("New Folder")); +}else{ +var _4c=prompt(i18n("Please enter name for new folder..."),i18n("Untitled")); +createFolder(_4c); +} +} function resize(){ var win=Xinha.viewportSize(window); document.getElementById("imgManager").style.height=parseInt(win.y-130-offsetForInputs,10)+"px"; Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/popup.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/popup.js,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/popup.js 25 Feb 2007 19:06:13 -0000 1.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/assets/popup.js 14 Jun 2007 01:36:56 -0000 1.3 @@ -46,4 +46,20 @@ function __dlg_close(val) { opener.Dialog._return(val); window.close(); +} + +function popupPrompt( prompt, value, handler, title) +{ + + Dialog("prompt.html", function(param) + { + if (!param) // user must have pressed Cancel + { + return false; + } + else + { + handler (param.value); + } + }, {prompt:prompt,value:value,title:title}); } \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/lang/de.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/lang/de.js,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/lang/de.js 2 Feb 2007 21:04:54 -0000 1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ExtendedFileManager/lang/de.js 14 Jun 2007 01:36:56 -0000 1.2 @@ -88,7 +88,7 @@ "Image Size": "Bildgröße", "Other" : "Andere...", "Rename": "Umbenennen", - "Please enter new name for this file...": "Bite neuen Namen für diese Datei eingeben...", + "Please enter new name for this file...": "Bitte neuen Namen für diese Datei eingeben...", "Unable to rename file. File of the same name already exists or\nfolder doesn't have write permission.": "Umbenennen nicht möglich. Evtl. Dateiname schon vorhanden oder keine Schreibrechte.", "Cancelled rename.": "Umbenennen abgebrochen.", 'File "$file" successfully uploaded.': 'Datei "$file" erfolgreich hochgeladen.', Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/HtmlEntities/Entities.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/HtmlEntities/Entities.js,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/HtmlEntities/Entities.js 25 Feb 2007 19:06:17 -0000 1.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/HtmlEntities/Entities.js 14 Jun 2007 01:36:56 -0000 1.3 @@ -1,1197 +1,204 @@ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 2: missing ; before statement -js: "¡" : "¡", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 3: syntax error -js: "¢" : "¢", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 4: syntax error -js: "£" : "£", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 5: syntax error -js: "¤" : "¤", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 6: syntax error -js: "¥" : "¥", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 7: syntax error -js: "¦" : "¦", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 8: syntax error -js: "§" : "§", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 9: syntax error -js: "¨" : "¨", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 10: syntax error -js: "©" : "©", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 11: syntax error -js: "ª" : "ª", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 12: syntax error -js: "«" : "«", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 13: syntax error -js: "¬" : "¬", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 14: syntax error -js: "®" : "®", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 15: syntax error -js: "¯" : "¯", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 16: syntax error -js: "°" : "°", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 17: syntax error -js: "±" : "±", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 18: syntax error -js: "²" : "²", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 19: syntax error -js: "³" : "³", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 20: syntax error -js: "´" : "´", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 21: syntax error -js: "µ" : "µ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 22: syntax error -js: "¶" : "¶", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 23: syntax error -js: "·" : "·", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 24: syntax error -js: "¸" : "¸", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 25: syntax error -js: "¹" : "¹", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 26: syntax error -js: "º" : "º", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 27: syntax error -js: "»" : "»", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 28: syntax error -js: "¼" : "¼", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 29: syntax error -js: "½" : "½", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 30: syntax error -js: "¾" : "¾", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 31: syntax error -js: "¿" : "¿", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 32: syntax error -js: "À" : "À", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 33: syntax error -js: "Á" : "�?", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 34: syntax error -js: "Â" : "Â", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 35: syntax error -js: "Ã" : "Ã", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 36: syntax error -js: "Ä" : "Ä", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 37: syntax error -js: "Å" : "Å", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 38: syntax error -js: "Æ" : "Æ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 39: syntax error -js: "Ç" : "Ç", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 40: syntax error -js: "È" : "È", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 41: syntax error -js: "É" : "É", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 42: syntax error -js: "Ê" : "Ê", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 43: syntax error -js: "Ë" : "Ë", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 44: syntax error -js: "Ì" : "Ì", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 45: syntax error -js: "Í" : "�?", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 46: syntax error -js: "Î" : "Î", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 47: syntax error -js: "Ï" : "�?", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 48: syntax error -js: "Ð" : "�?", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 49: syntax error -js: "Ñ" : "Ñ", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 50: syntax error -js: "Ò" : "Ò", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 51: syntax error -js: "Ó" : "Ó", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 52: syntax error -js: "Ô" : "Ô", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 53: syntax error -js: "Õ" : "Õ", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 54: syntax error -js: "Ö" : "Ö", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 55: syntax error -js: "×" : "×", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 56: syntax error -js: "Ø" : "Ø", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 57: syntax error -js: "Ù" : "Ù", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 58: syntax error -js: "Ú" : "Ú", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 59: syntax error -js: "Û" : "Û", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 60: syntax error -js: "Ü" : "Ü", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 61: syntax error -js: "Ý" : "�?", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 62: syntax error -js: "Þ" : "Þ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 63: syntax error -js: "ß" : "ß", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 64: syntax error -js: "à" : "à", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 65: syntax error -js: "á" : "á", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 66: syntax error -js: "â" : "â", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 67: syntax error -js: "ã" : "ã", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 68: syntax error -js: "ä" : "ä", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 69: syntax error -js: "å" : "å", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 70: syntax error -js: "æ" : "æ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 71: syntax error -js: "ç" : "ç", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 72: syntax error -js: "è" : "è", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 73: syntax error -js: "é" : "é", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 74: syntax error -js: "ê" : "ê", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 75: syntax error -js: "ë" : "ë", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 76: syntax error -js: "ì" : "ì", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 77: syntax error -js: "í" : "í", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 78: syntax error -js: "î" : "î", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 79: syntax error -js: "ï" : "ï", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 80: syntax error -js: "ð" : "ð", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 81: syntax error -js: "ñ" : "ñ", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 82: syntax error -js: "ò" : "ò", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 83: syntax error -js: "ó" : "ó", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 84: syntax error -js: "ó" : "ó", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 85: syntax error -js: "ô" : "ô", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 86: syntax error -js: "õ" : "õ", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 87: syntax error -js: "ö" : "ö", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 88: syntax error -js: "÷" : "÷", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 89: syntax error -js: "ø" : "ø", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 90: syntax error -js: "ù" : "ù", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 91: syntax error -js: "ú" : "ú", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 92: syntax error -js: "û" : "û", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 93: syntax error -js: "ü" : "ü", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 94: syntax error -js: "ý" : "ý", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 95: syntax error -js: "þ" : "þ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 96: syntax error -js: "ÿ" : "ÿ", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 97: syntax error -js: "ƒ" : "ƒ", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 98: syntax error -js: "Α" : "Α", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 99: syntax error -js: "Β" : "Β", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 100: syntax error -js: "Γ" : "Γ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 101: syntax error -js: "Δ" : "Δ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 102: syntax error -js: "Ε" : "Ε", -js: .............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 103: syntax error -js: "Ζ" : "Ζ", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 104: syntax error -js: "Η" : "Η", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 105: syntax error -js: "Θ" : "Θ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 106: syntax error -js: "Ι" : "Ι", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 107: syntax error -js: "Κ" : "Κ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 108: syntax error -js: "Λ" : "Λ", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 109: syntax error -js: "Μ" : "Μ", -js: ........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 110: syntax error -js: "Ν" : "�?", -js: ........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 111: syntax error -js: "Ξ" : "Ξ", -js: ........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 112: syntax error -js: "Ο" : "Ο ", -js: .............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 113: syntax error -js: "Π" : "Π", -js: ........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 114: syntax error -js: "Ρ" : "Ρ", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 115: syntax error -js: "Σ" : "Σ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 116: syntax error -js: "Τ" : "Τ", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 117: syntax error -js: "Υ" : "Υ", -js: .............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 118: syntax error -js: "Φ" : "Φ", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 119: syntax error -js: "Χ" : "Χ", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 120: syntax error -js: "Ψ" : "Ψ", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 121: syntax error -js: "Ω" : "Ω", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 122: syntax error -js: "α" : "α", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 123: syntax error -js: "β" : "β", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 124: syntax error -js: "γ" : "γ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 125: syntax error -js: "δ" : "δ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 126: syntax error -js: "ε" : "ε", -js: .............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 127: syntax error -js: "ζ" : "ζ", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 128: syntax error -js: "η" : "η", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 129: syntax error -js: "θ" : "θ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 130: syntax error -js: "ι" : "ι", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 131: syntax error -js: "κ" : "κ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 132: syntax error -js: "λ" : "λ", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 133: syntax error -js: "μ" : "μ", -js: ........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 134: syntax error -js: "ν" : "ν", -js: ........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 135: syntax error -js: "ξ" : "ξ", -js: ........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 136: syntax error -js: "ο" : "ο", -js: .............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 137: syntax error -js: "π" : "π", -js: ........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 138: syntax error -js: "ρ" : "�?", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 139: syntax error -js: "ς" : "ς", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 140: syntax error -js: "σ" : "σ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 141: syntax error -js: "τ" : "τ", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 142: syntax error -js: "υ" : "υ", -js: .............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 143: syntax error -js: "φ" : "φ", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 144: syntax error -js: "ω" : "ω", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 145: syntax error -js: "•" : "•", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 146: syntax error -js: "…" : "…", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 147: syntax error -js: "′" : "′", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 148: syntax error -js: "″" : "″", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 149: syntax error -js: "‾" : "‾", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 150: syntax error -js: "⁄" : "�?�", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 151: syntax error -js: "™" : "™", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 152: syntax error -js: "←" : "�?", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 153: syntax error -js: "↑" : "↑", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 154: syntax error -js: "→" : "→", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 155: syntax error -js: "↓" : "↓", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 156: syntax error -js: "↔" : "↔", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 157: syntax error -js: "⇒" : "⇒", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 158: syntax error -js: "∂" : "∂", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 159: syntax error -js: "∏" : "�?", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 160: syntax error -js: "∑" : "∑", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 161: syntax error -js: "−" : "−", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 162: syntax error -js: "√" : "√", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 163: syntax error -js: "∞" : "∞", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 164: syntax error -js: "∩" : "∩", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 165: syntax error -js: "∫" : "∫", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 166: syntax error -js: "≈" : "≈", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 167: syntax error -js: "≠" : "≠", -js: ........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 168: syntax error -js: "≡" : "≡", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 169: syntax error -js: "≤" : "≤", -js: ........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 170: syntax error -js: "≥" : "≥", -js: ........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 171: syntax error -js: "◊" : "◊", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 172: syntax error -js: "♠" : "♠", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 173: syntax error -js: "♣" : "♣", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 174: syntax error -js: "♥" : "♥", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 175: syntax error -js: "♦" : "♦", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 176: syntax error -js: "Œ" : "Œ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 177: syntax error -js: "œ" : "œ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 178: syntax error -js: "Š" : "Š", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 179: syntax error -js: "š" : "š", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 180: syntax error -js: "Ÿ" : "Ÿ", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 181: syntax error -js: "ˆ" : "ˆ", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 182: syntax error -js: "˜" : "˜", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 183: syntax error -js: "–" : "–", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 184: syntax error -js: "—" : "—", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 185: syntax error -js: "‘" : "‘", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 186: syntax error -js: "’" : "’", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 187: syntax error -js: "‚" : "‚", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 188: syntax error -js: "“" : "“", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 189: syntax error -js: "”" : "�?", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 190: syntax error -js: "„" : "„", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 191: syntax error -js: "†" : "†", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 192: syntax error -js: "‡" : "‡", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 193: syntax error -js: "‰" : "‰", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 194: syntax error -js: "‹" : "‹", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 195: syntax error -js: "›" : "›", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 196: syntax error -js: "€" : "€", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 201: syntax error -js: " " : "\xA0", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 202: syntax error -js: "≤" : String.fromCharCode(0x2264), -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 203: syntax error -js: "≥" : String.fromCharCode(0x2265) -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 204: missing } in compound statement -js: } -js: ^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 1: Compilation produced 199 syntax errors. -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 2: missing ; before statement -js: "¡" : "¡", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 3: syntax error -js: "¢" : "¢", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 4: syntax error -js: "£" : "£", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 5: syntax error -js: "¤" : "¤", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 6: syntax error -js: "¥" : "¥", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 7: syntax error -js: "¦" : "¦", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 8: syntax error -js: "§" : "§", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 9: syntax error -js: "¨" : "¨", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 10: syntax error -js: "©" : "©", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 11: syntax error -js: "ª" : "ª", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 12: syntax error -js: "«" : "«", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 13: syntax error -js: "¬" : "¬", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 14: syntax error -js: "®" : "®", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 15: syntax error -js: "¯" : "¯", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 16: syntax error -js: "°" : "°", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 17: syntax error -js: "±" : "±", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 18: syntax error -js: "²" : "²", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 19: syntax error -js: "³" : "³", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 20: syntax error -js: "´" : "´", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 21: syntax error -js: "µ" : "µ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 22: syntax error -js: "¶" : "¶", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 23: syntax error -js: "·" : "·", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 24: syntax error -js: "¸" : "¸", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 25: syntax error -js: "¹" : "¹", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 26: syntax error -js: "º" : "º", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 27: syntax error -js: "»" : "»", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 28: syntax error -js: "¼" : "¼", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 29: syntax error -js: "½" : "½", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 30: syntax error -js: "¾" : "¾", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 31: syntax error -js: "¿" : "¿", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 32: syntax error -js: "À" : "À", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 33: syntax error -js: "Á" : "�?", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 34: syntax error -js: "Â" : "Â", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 35: syntax error -js: "Ã" : "Ã", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 36: syntax error -js: "Ä" : "Ä", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 37: syntax error -js: "Å" : "Å", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 38: syntax error -js: "Æ" : "Æ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 39: syntax error -js: "Ç" : "Ç", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 40: syntax error -js: "È" : "È", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 41: syntax error -js: "É" : "É", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 42: syntax error -js: "Ê" : "Ê", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 43: syntax error -js: "Ë" : "Ë", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 44: syntax error -js: "Ì" : "Ì", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 45: syntax error -js: "Í" : "�?", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 46: syntax error -js: "Î" : "Î", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 47: syntax error -js: "Ï" : "�?", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 48: syntax error -js: "Ð" : "�?", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 49: syntax error -js: "Ñ" : "Ñ", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 50: syntax error -js: "Ò" : "Ò", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 51: syntax error -js: "Ó" : "Ó", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 52: syntax error -js: "Ô" : "Ô", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 53: syntax error -js: "Õ" : "Õ", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 54: syntax error -js: "Ö" : "Ö", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 55: syntax error -js: "×" : "×", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 56: syntax error -js: "Ø" : "Ø", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 57: syntax error -js: "Ù" : "Ù", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 58: syntax error -js: "Ú" : "Ú", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 59: syntax error -js: "Û" : "Û", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 60: syntax error -js: "Ü" : "Ü", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 61: syntax error -js: "Ý" : "�?", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 62: syntax error -js: "Þ" : "Þ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 63: syntax error -js: "ß" : "ß", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 64: syntax error -js: "à" : "à", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 65: syntax error -js: "á" : "á", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 66: syntax error -js: "â" : "â", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 67: syntax error -js: "ã" : "ã", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 68: syntax error -js: "ä" : "ä", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 69: syntax error -js: "å" : "å", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 70: syntax error -js: "æ" : "æ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 71: syntax error -js: "ç" : "ç", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 72: syntax error -js: "è" : "è", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 73: syntax error -js: "é" : "é", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 74: syntax error -js: "ê" : "ê", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 75: syntax error -js: "ë" : "ë", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 76: syntax error -js: "ì" : "ì", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 77: syntax error -js: "í" : "í", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 78: syntax error -js: "î" : "î", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 79: syntax error -js: "ï" : "ï", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 80: syntax error -js: "ð" : "ð", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 81: syntax error -js: "ñ" : "ñ", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 82: syntax error -js: "ò" : "ò", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 83: syntax error -js: "ó" : "ó", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 84: syntax error -js: "ó" : "ó", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 85: syntax error -js: "ô" : "ô", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 86: syntax error -js: "õ" : "õ", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 87: syntax error -js: "ö" : "ö", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 88: syntax error -js: "÷" : "÷", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 89: syntax error -js: "ø" : "ø", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 90: syntax error -js: "ù" : "ù", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 91: syntax error -js: "ú" : "ú", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 92: syntax error -js: "û" : "û", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 93: syntax error -js: "ü" : "ü", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 94: syntax error -js: "ý" : "ý", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 95: syntax error -js: "þ" : "þ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 96: syntax error -js: "ÿ" : "ÿ", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 97: syntax error -js: "ƒ" : "ƒ", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 98: syntax error -js: "Α" : "Α", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 99: syntax error -js: "Β" : "Β", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 100: syntax error -js: "Γ" : "Γ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 101: syntax error -js: "Δ" : "Δ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 102: syntax error -js: "Ε" : "Ε", -js: .............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 103: syntax error -js: "Ζ" : "Ζ", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 104: syntax error -js: "Η" : "Η", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 105: syntax error -js: "Θ" : "Θ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 106: syntax error -js: "Ι" : "Ι", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 107: syntax error -js: "Κ" : "Κ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 108: syntax error -js: "Λ" : "Λ", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 109: syntax error -js: "Μ" : "Μ", -js: ........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 110: syntax error -js: "Ν" : "�?", -js: ........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 111: syntax error -js: "Ξ" : "Ξ", -js: ........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 112: syntax error -js: "Ο" : "Ο ", -js: .............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 113: syntax error -js: "Π" : "Π", -js: ........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 114: syntax error -js: "Ρ" : "Ρ", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 115: syntax error -js: "Σ" : "Σ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 116: syntax error -js: "Τ" : "Τ", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 117: syntax error -js: "Υ" : "Υ", -js: .............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 118: syntax error -js: "Φ" : "Φ", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 119: syntax error -js: "Χ" : "Χ", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 120: syntax error -js: "Ψ" : "Ψ", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 121: syntax error -js: "Ω" : "Ω", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 122: syntax error -js: "α" : "α", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 123: syntax error -js: "β" : "β", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 124: syntax error -js: "γ" : "γ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 125: syntax error -js: "δ" : "δ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 126: syntax error -js: "ε" : "ε", -js: .............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 127: syntax error -js: "ζ" : "ζ", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 128: syntax error -js: "η" : "η", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 129: syntax error -js: "θ" : "θ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 130: syntax error -js: "ι" : "ι", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 131: syntax error -js: "κ" : "κ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 132: syntax error -js: "λ" : "λ", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 133: syntax error -js: "μ" : "μ", -js: ........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 134: syntax error -js: "ν" : "ν", -js: ........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 135: syntax error -js: "ξ" : "ξ", -js: ........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 136: syntax error -js: "ο" : "ο", -js: .............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 137: syntax error -js: "π" : "π", -js: ........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 138: syntax error -js: "ρ" : "�?", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 139: syntax error -js: "ς" : "ς", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 140: syntax error -js: "σ" : "σ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 141: syntax error -js: "τ" : "τ", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 142: syntax error -js: "υ" : "υ", -js: .............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 143: syntax error -js: "φ" : "φ", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 144: syntax error -js: "ω" : "ω", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 145: syntax error -js: "•" : "•", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 146: syntax error -js: "…" : "…", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 147: syntax error -js: "′" : "′", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 148: syntax error -js: "″" : "″", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 149: syntax error -js: "‾" : "‾", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 150: syntax error -js: "⁄" : "�?�", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 151: syntax error -js: "™" : "™", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 152: syntax error -js: "←" : "�?", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 153: syntax error -js: "↑" : "↑", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 154: syntax error -js: "→" : "→", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 155: syntax error -js: "↓" : "↓", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 156: syntax error -js: "↔" : "↔", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 157: syntax error -js: "⇒" : "⇒", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 158: syntax error -js: "∂" : "∂", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 159: syntax error -js: "∏" : "�?", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 160: syntax error -js: "∑" : "∑", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 161: syntax error -js: "−" : "−", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 162: syntax error -js: "√" : "√", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 163: syntax error -js: "∞" : "∞", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 164: syntax error -js: "∩" : "∩", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 165: syntax error -js: "∫" : "∫", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 166: syntax error -js: "≈" : "≈", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 167: syntax error -js: "≠" : "≠", -js: ........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 168: syntax error -js: "≡" : "≡", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 169: syntax error -js: "≤" : "≤", -js: ........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 170: syntax error -js: "≥" : "≥", -js: ........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 171: syntax error -js: "◊" : "◊", -js: .........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 172: syntax error -js: "♠" : "♠", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 173: syntax error -js: "♣" : "♣", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 174: syntax error -js: "♥" : "♥", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 175: syntax error -js: "♦" : "♦", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 176: syntax error -js: "Œ" : "Œ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 177: syntax error -js: "œ" : "œ", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 178: syntax error -js: "Š" : "Š", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 179: syntax error -js: "š" : "š", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 180: syntax error -js: "Ÿ" : "Ÿ", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 181: syntax error -js: "ˆ" : "ˆ", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 182: syntax error -js: "˜" : "˜", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 183: syntax error -js: "–" : "–", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 184: syntax error -js: "—" : "—", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 185: syntax error -js: "‘" : "‘", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 186: syntax error -js: "’" : "’", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 187: syntax error -js: "‚" : "‚", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 188: syntax error -js: "“" : "“", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 189: syntax error -js: "”" : "�?", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 190: syntax error -js: "„" : "„", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 191: syntax error -js: "†" : "†", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 192: syntax error -js: "‡" : "‡", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 193: syntax error -js: "‰" : "‰", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 194: syntax error -js: "‹" : "‹", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 195: syntax error -js: "›" : "›", -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 196: syntax error -js: "€" : "€", -js: ..........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 201: syntax error -js: " " : "\xA0", -js: ...........^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 202: syntax error -js: "≤" : String.fromCharCode(0x2264), -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 203: syntax error -js: "≥" : String.fromCharCode(0x2265) -js: ............^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 204: missing } in compound statement -js: } -js: ^ -js: "C:\Programme\xampp\htdocs\x\0.92beta\plugins\HtmlEntities\Entities.js_uncompr.js", line 1: Compilation produced 199 syntax errors. -null +{ +"¡" : "¡", +"¢" : "¢", +"£" : "£", +"¤" : "¤", +"¥" : "¥", +"¦" : "¦", +"§" : "§", +"¨" : "¨", +"©" : "©", +"ª" : "ª", +"«" : "«", +"¬" : "¬", +"®" : "®", +"¯" : "¯", +"°" : "°", +"±" : "±", +"²" : "²", +"³" : "³", +"´" : "´", +"µ" : "µ", +"¶" : "¶", +"·" : "·", +"¸" : "¸", +"¹" : "¹", +"º" : "º", +"»" : "»", +"¼" : "¼", +"½" : "½", +"¾" : "¾", +"¿" : "¿", +"À" : "À", +"Á" : "Á", +"Â" : "Â", +"Ã" : "Ã", +"Ä" : "Ä", +"Å" : "Å", +"Æ" : "Æ", +"Ç" : "Ç", +"È" : "È", +"É" : "É", +"Ê" : "Ê", +"Ë" : "Ë", +"Ì" : "Ì", +"Í" : "Í", +"Î" : "Î", +"Ï" : "Ï", +"Ð" : "Ð", +"Ñ" : "Ñ", +"Ò" : "Ò", +"Ó" : "Ó", +"Ô" : "Ô", +"Õ" : "Õ", +"Ö" : "Ö", +"×" : "×", +"Ø" : "Ø", +"Ù" : "Ù", +"Ú" : "Ú", +"Û" : "Û", +"Ü" : "Ü", +"Ý" : "Ý", +"Þ" : "Þ", +"ß" : "ß", +"à" : "à", +"á" : "á", +"â" : "â", +"ã" : "ã", +"ä" : "ä", +"å" : "å", +"æ" : "æ", +"ç" : "ç", +"è" : "è", +"é" : "é", +"ê" : "ê", +"ë" : "ë", +"ì" : "ì", +"í" : "í", +"î" : "î", +"ï" : "ï", +"ð" : "ð", +"ñ" : "ñ", +"ò" : "ò", +"ó" : "ó", +"ó" : "ó", +"ô" : "ô", +"õ" : "õ", +"ö" : "ö", +"÷" : "÷", +"ø" : "ø", +"ù" : "ù", +"ú" : "ú", +"û" : "û", +"ü" : "ü", +"ý" : "ý", +"þ" : "þ", +"ÿ" : "ÿ", +"ƒ" : "ƒ", +"Α" : "Α", +"Β" : "Β", +"Γ" : "Γ", +"Δ" : "Δ", +"Ε" : "Ε", +"Ζ" : "Ζ", +"Η" : "Η", +"Θ" : "Θ", +"Ι" : "Ι", +"Κ" : "Κ", +"Λ" : "Λ", +"Μ" : "Μ", +"Ν" : "Ν", +"Ξ" : "Ξ", +"Ο" : "Ο ", +"Π" : "Π", +"Ρ" : "Ρ", +"Σ" : "Σ", +"Τ" : "Τ", +"Υ" : "Υ", +"Φ" : "Φ", +"Χ" : "Χ", +"Ψ" : "Ψ", +"Ω" : "Ω", +"α" : "α", +"β" : "β", +"γ" : "γ", +"δ" : "δ", +"ε" : "ε", +"ζ" : "ζ", +"η" : "η", +"θ" : "θ", +"ι" : "ι", +"κ" : "κ", +"λ" : "λ", +"μ" : "μ", +"ν" : "ν", +"ξ" : "ξ", +"ο" : "ο", +"π" : "π", +"ρ" : "ρ", +"ς" : "ς", +"σ" : "σ", +"τ" : "τ", +"υ" : "υ", +"φ" : "φ", +"ω" : "ω", +"•" : "•", +"…" : "…", +"′" : "′", +"″" : "″", +"‾" : "‾", +"⁄" : "⁄", +"™" : "™", +"←" : "←", +"↑" : "↑", +"→" : "→", +"↓" : "↓", +"↔" : "↔", +"⇒" : "⇒", +"∂" : "∂", +"∏" : "∏", +"∑" : "∑", +"−" : "−", +"√" : "√", +"∞" : "∞", +"∩" : "∩", +"∫" : "∫", +"≈" : "≈", +"≠" : "≠", +"≡" : "≡", +"≤" : "≤", +"≥" : "≥", +"◊" : "◊", +"♠" : "♠", +"♣" : "♣", +"♥" : "♥", +"♦" : "♦", +"Œ" : "Œ", +"œ" : "œ", +"Š" : "Š", +"š" : "š", +"Ÿ" : "Ÿ", +"ˆ" : "ˆ", +"˜" : "˜", +"–" : "–", +"—" : "—", +"‘" : "‘", +"’" : "’", +"‚" : "‚", +"“" : "“", +"”" : "”", +"„" : "„", +"†" : "†", +"‡" : "‡", +"‰" : "‰", +"‹" : "‹", +"›" : "›", +"€" : "€", + + // \x22 means '"' -- we use hex reprezentation so that we don't disturb + // JS compressors (well, at least mine fails.. ;) + + " " : "\xA0", + "≤" : String.fromCharCode(0x2264), + "≥" : String.fromCharCode(0x2265) +} Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/image-manager.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/image-manager.js,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/image-manager.js 25 Feb 2007 19:06:18 -0000 1.5 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/image-manager.js 14 Jun 2007 01:36:56 -0000 1.6 @@ -32,92 +32,111 @@ _4.f_border=shortSize(_4.f_border); _4.f_padding=shortSize(_4.f_padding); _4.f_margin=shortSize(_4.f_margin); +function convertToHex(_9){ +if(typeof _9=="string"&&/, /.test.color){ +_9=_9.replace(/, /,","); } -var _9=_3.config.ImageManager.backend+"__function=manager"; +if(typeof _9=="string"&&/ /.test.color){ +var _a=_9.split(" "); +var _b=""; +for(var i=0;i<_a.length;i++){ +_b+=Xinha._colorToRgb(_a[i]); +if(i+1<_a.length){ +_b+=" "; +} +} +return _b; +} +return Xinha._colorToRgb(_9); +} +_4.f_backgroundColor=convertToHex(_4.f_backgroundColor); +_4.f_borderColor=convertToHex(_4.f_borderColor); +} +var _d=_3.config.ImageManager.backend+"__function=manager"; if(_3.config.ImageManager.backend_config!=null){ -_9+="&backend_config="+encodeURIComponent(_3.config.ImageManager.backend_config); -_9+="&backend_config_hash="+encodeURIComponent(_3.config.ImageManager.backend_config_hash); -_9+="&backend_config_secret_key_location="+encodeURIComponent(_3.config.ImageManager.backend_config_secret_key_location); +_d+="&backend_config="+encodeURIComponent(_3.config.ImageManager.backend_config); +_d+="&backend_config_hash="+encodeURIComponent(_3.config.ImageManager.backend_config_hash); +_d+="&backend_config_secret_key_location="+encodeURIComponent(_3.config.ImageManager.backend_config_secret_key_location); } if(_3.config.ImageManager.backend_data!=null){ for(var i in _3.config.ImageManager.backend_data){ -_9+="&"+i+"="+encodeURIComponent(_3.config.ImageManager.backend_data[i]); +_d+="&"+i+"="+encodeURIComponent(_3.config.ImageManager.backend_data[i]); } } -Dialog(_9,function(_b){ -if(!_b){ +Dialog(_d,function(_f){ +if(!_f){ return false; } -var _c=_2; -if(!_c){ +var img=_2; +if(!img){ if(HTMLArea.is_ie){ -var _d=_3._getSelection(); -var _e=_3._createRange(_d); -_3._doc.execCommand("insertimage",false,_b.f_url); -_c=_e.parentElement(); -if(_c.tagName.toLowerCase()!="img"){ -_c=_c.previousSibling; +var sel=_3._getSelection(); +var _12=_3._createRange(sel); +_3._doc.execCommand("insertimage",false,_f.f_url); +img=_12.parentElement(); +if(img.tagName.toLowerCase()!="img"){ +img=img.previousSibling; } }else{ -_c=document.createElement("img"); -_c.src=_b.f_url; -_3.insertNodeAtSelection(_c); +img=document.createElement("img"); +img.src=_f.f_url; +_3.insertNodeAtSelection(img); } }else{ -_c.src=_b.f_url; +img.src=_f.f_url; } -for(field in _b){ -var _f=_b[field]; +for(field in _f){ +var _13=_f[field]; switch(field){ case "f_alt": -_c.alt=_f; +img.alt=_13; break; case "f_border": -if(_f.length){ -_c.style.borderWidth=/[^0-9]/.test(_f)?_f:(parseInt(_f)+"px"); -if(_c.style.borderWidth&&!_c.style.borderStyle){ -_c.style.borderStyle="solid"; +if(_13.length){ +img.style.borderWidth=/[^0-9]/.test(_13)?_13:(parseInt(_13)+"px"); +if(img.style.borderWidth&&!img.style.borderStyle){ +img.style.borderStyle="solid"; } }else{ -_c.style.borderWidth=""; -_c.style.borderStyle=""; +img.style.borderWidth=""; +img.style.borderStyle=""; } break; case "f_borderColor": -_c.style.borderColor=_f; +img.style.borderColor=_13; break; case "f_backgroundColor": -_c.style.backgroundColor=_f; +img.style.backgroundColor=_13; break; case "f_padding": -if(_f.length){ -_c.style.padding=/[^0-9]/.test(_f)?_f:(parseInt(_f)+"px"); +if(_13.length){ +img.style.padding=/[^0-9]/.test(_13)?_13:(parseInt(_13)+"px"); }else{ -_c.style.padding=""; +img.style.padding=""; } break; case "f_margin": -if(_f.length){ -_c.style.margin=/[^0-9]/.test(_f)?_f:(parseInt(_f)+"px"); +if(_13.length){ +img.style.margin=/[^0-9]/.test(_13)?_13:(parseInt(_13)+"px"); }else{ -_c.style.margin=""; +img.style.margin=""; } break; case "f_align": -_c.align=_f; +img.align=_13; break; case "f_width": -if(!isNaN(parseInt(_f))){ -_c.width=parseInt(_f); +if(!isNaN(parseInt(_13))){ +img.width=parseInt(_13); }else{ -_c.width=""; +img.width=""; } break; case "f_height": -if(!isNaN(parseInt(_f))){ -_c.height=parseInt(_f); +if(!isNaN(parseInt(_13))){ +img.height=parseInt(_13); }else{ -_c.height=""; +img.height=""; } break; } Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/manager.php =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/manager.php,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/manager.php 25 Feb 2007 19:06:18 -0000 1.5 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/manager.php 14 Jun 2007 01:36:56 -0000 1.6 @@ -144,7 +144,7 @@ Color: - + @@ -172,7 +172,7 @@ Color: - + Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/EditorContent.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/EditorContent.js,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/EditorContent.js 25 Feb 2007 19:06:18 -0000 1.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/EditorContent.js 14 Jun 2007 01:36:56 -0000 1.3 @@ -432,6 +432,18 @@ } } function setMarker(nx,ny,nw,nh){ +if(isNaN(nx)){ +nx=0; +} +if(isNaN(ny)){ +ny=0; +} +if(isNaN(nw)){ +nw=0; +} +if(isNaN(nh)){ +nh=0; +} if(ant==null){ ant=MM_findObj("ant"); } Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/manager.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/manager.css,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/manager.css 2 Feb 2007 21:04:59 -0000 1.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/manager.css 14 Jun 2007 01:36:56 -0000 1.3 @@ -21,9 +21,26 @@ table { margin-top:10px; } th, td { padding-right:3px; text-align:left; font-family:small-caption,helvetica,sans-serif; } + .buttonColor { - padding: 1px; + width :1em; + margin-left: 2px; cursor: default; +} + +.buttonColor .chooser, .buttonColor .nocolor { + height: 0.6em; border: 1px solid; + padding: 0px 1em; border-color: ButtonHighlight ButtonShadow ButtonShadow ButtonHighlight; -} \ No newline at end of file +} + +.buttonColor .buttonClick { + border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; +} +.buttonColor .buttonColor-hilite { + border-color: ButtonShadow ButtonHighlight ButtonHighlight ButtonShadow; +} + +.buttonColor .nocolor { padding: 0px; } +.buttonColor .nocolor-hilite { background-color: #fff; color: #f00; } Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/manager.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/manager.js,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/manager.js 25 Feb 2007 19:06:18 -0000 1.5 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/ImageManager/assets/manager.js 14 Jun 2007 01:36:57 -0000 1.6 @@ -15,212 +15,212 @@ __dlg_translate("ImageManager"); document.getElementById("f_align").selectedIndex=1; document.getElementById("f_align").selectedIndex=0; -var _5=document.getElementById("bgCol_pick"); -var _6=document.getElementById("f_backgroundColor"); -var _7=new Xinha.colorPicker({cellsize:"5px",callback:function(_8){ -_6.value=_8; -}}); -_5.onclick=function(){ -_7.open("top,right",_6); -}; -var _9=document.getElementById("bdCol_pick"); -var _a=document.getElementById("f_borderColor"); -var _b=new Xinha.colorPicker({cellsize:"5px",callback:function(_c){ -_a.value=_c; -}}); -_9.onclick=function(){ -_b.open("top,right",_a); -}; -var _d=document.getElementById("uploadForm"); -if(_d){ -_d.target="imgManager"; +var _5=document.getElementById("uploadForm"); +if(_5){ +_5.target="imgManager"; } -var _e=window.dialogArguments; -if(_e){ -var _f=new RegExp("(https?://[^/]*)?"+base_url.replace(/\/$/,"")); -_e.f_url=_e.f_url.replace(_f,""); +var _6=window.dialogArguments; +if(_6){ +var _7=new RegExp("(https?://[^/]*)?"+base_url.replace(/\/$/,"")); +_6.f_url=_6.f_url.replace(_7,""); var rd=(_resized_dir)?_resized_dir.replace(Xinha.RE_Specials,"\\$1")+"/":""; var rp=_resized_prefix.replace(Xinha.RE_Specials,"\\$1"); -var _12=new RegExp("^(.*/)"+rd+rp+"_([0-9]+)x([0-9]+)_([^/]+)$"); -if(_12.test(_e.f_url)){ -_e.f_url=RegExp.$1+RegExp.$4; -_e.f_width=RegExp.$2; -_e.f_height=RegExp.$3; +var _a=new RegExp("^(.*/)"+rd+rp+"_([0-9]+)x([0-9]+)_([^/]+)$"); +if(_a.test(_6.f_url)){ +_6.f_url=RegExp.$1+RegExp.$4; +_6.f_width=RegExp.$2; +_6.f_height=RegExp.$3; } -for(var id in _e){ +for(var id in _6){ if(id=="f_align"){ continue; } if(document.getElementById(id)){ -document.getElementById(id).value=_e[id]; +document.getElementById(id).value=_6[id]; } } -document.getElementById("orginal_width").value=_e["f_width"]; -document.getElementById("orginal_height").value=_e["f_height"]; -setAlign(_e["f_align"]); -var _12=new RegExp("^(.*/)([^/]+)$"); -if(_12.test(_e["f_url"])){ +document.getElementById("orginal_width").value=_6["f_width"]; +document.getElementById("orginal_height").value=_6["f_height"]; +setAlign(_6["f_align"]); +var _a=new RegExp("^(.*/)([^/]+)$"); +if(_a.test(_6["f_url"])){ changeDir(RegExp.$1); -var _14=document.getElementById("dirPath"); -for(var i=0;i<_14.options.length;i++){ -if(_14.options[i].value==encodeURIComponent(RegExp.$1)){ -_14.options[i].selected=true; +var _c=document.getElementById("dirPath"); +for(var i=0;i<_c.options.length;i++){ +if(_c.options[i].value==encodeURIComponent(RegExp.$1)){ +_c.options[i].selected=true; break; } } } -document.getElementById("f_preview").src=_backend_url+"__function=thumbs&img="+_e.f_url; +document.getElementById("f_preview").src=_backend_url+"__function=thumbs&img="+_6.f_url; } +new Xinha.colorPicker.InputBinding(document.getElementById("f_backgroundColor")); +new Xinha.colorPicker.InputBinding(document.getElementById("f_borderColor")); document.getElementById("f_alt").focus(); }; function onCancel(){ __dlg_close(null); return false; } function onOK(){ -var _16=["f_url","f_alt","f_align","f_width","f_height","f_padding","f_margin","f_border","f_borderColor","f_backgroundColor"]; -var _17=new Object(); -for(var i in _16){ -var id=_16[i]; +var _e=["f_url","f_alt","f_align","f_width","f_height","f_padding","f_margin","f_border","f_borderColor","f_backgroundColor"]; +var _f=new Object(); +for(var i in _e){ +var id=_e[i]; var el=document.getElementById(id); if(id=="f_url"&&el.value.indexOf("://")<0){ if(el.value==""){ alert(i18n("No Image selected.")); return (false); } -_17[id]=makeURL(base_url,el.value); +_f[id]=makeURL(base_url,el.value); }else{ if(el){ -_17[id]=el.value; +_f[id]=el.value; }else{ -alert("Missing "+_16[i]); +alert("Missing "+_e[i]); } } } -var _1b={w:document.getElementById("orginal_width").value,h:document.getElementById("orginal_height").value}; -if((_1b.w!=_17.f_width)||(_1b.h!=_17.f_height)){ -var _1c=HTMLArea._geturlcontent(_backend_url+"&__function=resizer&img="+encodeURIComponent(document.getElementById("f_url").value)+"&width="+_17.f_width+"&height="+_17.f_height); -_1c=eval(_1c); -if(_1c){ -_17.f_url=makeURL(base_url,_1c); +var _13={w:document.getElementById("orginal_width").value,h:document.getElementById("orginal_height").value}; +if((_13.w!=_f.f_width)||(_13.h!=_f.f_height)){ +var _14=HTMLArea._geturlcontent(_backend_url+"&__function=resizer&img="+encodeURIComponent(document.getElementById("f_url").value)+"&width="+_f.f_width+"&height="+_f.f_height); +_14=eval(_14); +if(_14){ +_f.f_url=makeURL(base_url,_14); } } -__dlg_close(_17); +__dlg_close(_f); return false; } -function makeURL(_1d,_1e){ -if(_1d.substring(_1d.length-1)!="/"){ -_1d+="/"; +function makeURL(_15,_16){ +if(_15.substring(_15.length-1)!="/"){ +_15+="/"; } -if(_1e.charAt(0)=="/"){ +if(_16.charAt(0)=="/"){ } -_1e=_1e.substring(1); -return _1d+_1e; +_16=_16.substring(1); +return _15+_16; } -function updateDir(_1f){ -var _20=_1f.options[_1f.selectedIndex].value; -changeDir(_20); +function updateDir(_17){ +var _18=_17.options[_17.selectedIndex].value; +changeDir(_18); } function goUpDir(){ -var _21=document.getElementById("dirPath"); -var _22=_21.options[_21.selectedIndex].text; -if(_22.length<2){ +var _19=document.getElementById("dirPath"); +var _1a=_19.options[_19.selectedIndex].text; +if(_1a.length<2){ return false; } -var _23=_22.split("/"); -var _24=""; -for(var i=0;i<_23.length-2;i++){ -_24+=_23[i]+"/"; +var _1b=_1a.split("/"); +var _1c=""; +for(var i=0;i<_1b.length-2;i++){ +_1c+=_1b[i]+"/"; } -for(var i=0;i<_21.length;i++){ -var _26=_21.options[i].text; -if(_26==_24){ -_21.selectedIndex=i; -var _27=_21.options[i].value; -changeDir(_27); +for(var i=0;i<_19.length;i++){ +var _1e=_19.options[i].text; +if(_1e==_1c){ +_19.selectedIndex=i; +var _1f=_19.options[i].value; +changeDir(_1f); break; } } } -function changeDir(_28){ +function changeDir(_20){ if(typeof imgManager!="undefined"){ -imgManager.changeDir(_28); +imgManager.changeDir(_20); } } -function toggleConstrains(_29){ -var _2a=document.getElementById("imgLock"); -var _29=document.getElementById("constrain_prop"); -if(_29.checked){ -_2a.src="img/locked.gif"; +function toggleConstrains(_21){ +var _22=document.getElementById("imgLock"); +var _21=document.getElementById("constrain_prop"); +if(_21.checked){ +_22.src="img/locked.gif"; checkConstrains("width"); }else{ -_2a.src="img/unlocked.gif"; +_22.src="img/unlocked.gif"; } } -function checkConstrains(_2b){ -var _2c=document.getElementById("constrain_prop"); -if(_2c.checked){ +function checkConstrains(_23){ +var _24=document.getElementById("constrain_prop"); +if(_24.checked){ var obj=document.getElementById("orginal_width"); -var _2e=parseInt(obj.value); +var _26=parseInt(obj.value); var obj=document.getElementById("orginal_height"); -var _2f=parseInt(obj.value); -var _30=document.getElementById("f_width"); -var _31=document.getElementById("f_height"); -var _32=parseInt(_30.value); -var _33=parseInt(_31.value); -if(_2e>0&&_2f>0){ -if(_2b=="width"&&_32>0){ -_31.value=parseInt((_32/_2e)*_2f); +var _27=parseInt(obj.value); +var _28=document.getElementById("f_width"); +var _29=document.getElementById("f_height"); +var _2a=parseInt(_28.value); +var _2b=parseInt(_29.value); +if(_26>0&&_27>0){ +if(_23=="width"&&_2a>0){ +_29.value=parseInt((_2a/_26)*_27); } -if(_2b=="height"&&_33>0){ -_30.value=parseInt((_33/_2f)*_2e); +if(_23=="height"&&_2b>0){ +_28.value=parseInt((_2b/_27)*_26); } } } } -function showMessage(_34){ -var _35=document.getElementById("message"); -var _36=document.getElementById("messages"); -if(_35.firstChild){ -_35.removeChild(_35.firstChild); +function showMessage(_2c){ +var _2d=document.getElementById("message"); +var _2e=document.getElementById("messages"); +if(_2d.firstChild){ +_2d.removeChild(_2d.firstChild); } -_35.appendChild(document.createTextNode(i18n(_34))); -_36.style.display=""; +_2d.appendChild(document.createTextNode(i18n(_2c))); +_2e.style.display=""; } -function addEvent(obj,_38,fn){ +function addEvent(obj,_30,fn){ if(obj.addEventListener){ -obj.addEventListener(_38,fn,true); +obj.addEventListener(_30,fn,true); return true; }else{ if(obj.attachEvent){ -var r=obj.attachEvent("on"+_38,fn); +var r=obj.attachEvent("on"+_30,fn); return r; }else{ return false; } } } function doUpload(){ -var _3b=document.getElementById("uploadForm"); -if(_3b){ +var _33=document.getElementById("uploadForm"); +if(_33){ showMessage("Uploading"); } } function refresh(){ -var _3c=document.getElementById("dirPath"); -updateDir(_3c); +var _34=document.getElementById("dirPath"); +updateDir(_34); } function newFolder(){ -var _3d=prompt(i18n("Please enter name for new folder..."),i18n("Untitled")); -var _3e=document.getElementById("dirPath"); -var dir=_3e.options[_3e.selectedIndex].value; -if(_3d==thumbdir){ +function createFolder(_35){ +var _36=document.getElementById("dirPath"); +var dir=_36.options[_36.selectedIndex].value; +if(_35==thumbdir){ alert(i18n("Invalid folder name, please choose another folder name.")); return false; } -if(_3d&&_3d!=""&&typeof imgManager!="undefined"){ -imgManager.newFolder(dir,encodeURI(_3d)); +if(_35&&_35!=""&&typeof imgManager!="undefined"){ +imgManager.newFolder(dir,encodeURI(_35)); } } +if(Xinha.ie_version>6){ +Dialog("newFolder.html",function(_38){ +if(!_38){ +return false; +}else{ +var _39=_38["f_foldername"]; +createFolder(_39); +} +},null); +}else{ +var _3a=prompt(i18n("Please enter name for new folder..."),i18n("Untitled")); +createFolder(_3a); +} +} addEvent(window,"load",init); Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/linker.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/Attic/linker.js,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/linker.js 25 Feb 2007 19:06:27 -0000 1.5 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Linker/linker.js 14 Jun 2007 01:36:57 -0000 1.6 @@ -85,7 +85,7 @@ if(_17.p_height){ _17.p_options.push("height="+_17.p_height); } -atr.onclick="try{if(document.designMode && document.designMode == 'on') return false;}catch(e){} window.open(this.href, '"+(_17.p_name.replace(/[^a-z0-9_]/i,"_"))+"', '"+_17.p_options.join(",")+"');return false;"; +atr.onclick="if(window.top && window.top.Xinha){return false}window.open(this.href, '"+(_17.p_name.replace(/[^a-z0-9_]/i,"_"))+"', '"+_17.p_options.join(",")+"');return false;"; } } }else{ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SaveSubmit/lang/fr.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SaveSubmit/lang/fr.js,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SaveSubmit/lang/fr.js 14 Jun 2007 01:36:57 -0000 1.1 @@ -0,0 +1,8 @@ +// I18N constants +// LANG: "fr", ENCODING: UTF-8 +{ + "Save": "Enregistrer", + "Saving...": "Enregistrement...", + "in progress": "en cours", + "Ready": "Prêt" +}; \ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SmartReplace/dialog.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SmartReplace/dialog.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SmartReplace/dialog.html 14 Jun 2007 01:36:57 -0000 1.1 @@ -0,0 +1,17 @@ +

SmartReplace Settings

+
+ + + + + + + + + +
Enable automatic replacements
Convert all quotes and dashes in the current document
+
+ + +
+
\ No newline at end of file Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SmartReplace/smart-replace.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SmartReplace/smart-replace.js,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SmartReplace/smart-replace.js 25 Feb 2007 19:06:31 -0000 1.2 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SmartReplace/smart-replace.js 14 Jun 2007 01:36:57 -0000 1.3 @@ -2,19 +2,19 @@ this.editor=_1; var _2=_1.config; var _3=this; -_2.registerButton({id:"smartreplace",tooltip:this._lc("SmartReplace"),image:_editor_url+"plugins/SmartReplace/img/smartquotes.gif",textMode:false,action:function(_4){ -_3.dialog(_4); +_2.registerButton({id:"smartreplace",tooltip:this._lc("SmartReplace"),image:_editor_url+"plugins/SmartReplace/img/smartquotes.gif",textMode:false,action:function(e,_5,_6){ +_3.buttonPress(null,_6); }}); _2.addToolbarElement("smartreplace","htmlmode",1); } SmartReplace._pluginInfo={name:"SmartReplace",version:"1.0",developer:"Raimund Meyer",developer_url:"http://rheinauf.de",c_owner:"Raimund Meyer",sponsor:"",sponsor_url:"",license:"htmlArea"}; -SmartReplace.prototype._lc=function(_5){ -return Xinha._lc(_5,"SmartReplace"); +SmartReplace.prototype._lc=function(_7){ +return Xinha._lc(_7,"SmartReplace"); }; Xinha.Config.prototype.SmartReplace={"defaultActive":true,"quotes":null}; -SmartReplace.prototype.toggleActivity=function(_6){ -if(typeof _6!="undefined"){ -this.active=_6; +SmartReplace.prototype.toggleActivity=function(_8){ +if(typeof _8!="undefined"){ +this.active=_8; }else{ this.active=this.active?false:true; } @@ -26,21 +26,21 @@ SmartReplace.prototype.onGenerate=function(){ this.active=this.editor.config.SmartReplace.defaultActive; this.editor._toolbarObjects.smartreplace.state("active",this.active); -var _7=this; -Xinha._addEvents(_7.editor._doc,["keypress"],function(_8){ -return _7.keyEvent(Xinha.is_ie?_7.editor._iframe.contentWindow.event:_8); +var _9=this; +Xinha._addEvents(_9.editor._doc,["keypress"],function(_a){ +return _9.keyEvent(Xinha.is_ie?_9.editor._iframe.contentWindow.event:_a); }); -var _9=this.editor.config.SmartReplace.quotes; -if(_9&&typeof _9=="object"){ -this.openingQuotes=_9[0]; -this.closingQuotes=_9[1]; -this.openingQuote=_9[2]; -this.closingQuote=_9[3]; +var _b=this.editor.config.SmartReplace.quotes; +if(_b&&typeof _b=="object"){ +this.openingQuotes=_b[0]; +this.closingQuotes=_b[1]; +this.openingQuote=_b[2]; +this.closingQuote=_b[3]; }else{ this.openingQuotes=this._lc("OpeningDoubleQuotes"); +this.closingQuote=this._lc("ClosingSingleQuote"); this.closingQuotes=this._lc("ClosingDoubleQuotes"); this.openingQuote=this._lc("OpeningSingleQuote"); -this.closingQuote=this._lc("ClosingSingleQuote"); } if(this.openingQuotes=="OpeningDoubleQuotes"){ this.openingQuotes=String.fromCharCode(8220); @@ -53,59 +53,59 @@ if(!this.active){ return true; } -var _b=this.editor; -var _c=Xinha.is_ie?ev.keyCode:ev.charCode; -var _d=String.fromCharCode(_c); -if(_c==32){ +var _d=this.editor; +var _e=Xinha.is_ie?ev.keyCode:ev.charCode; +var _f=String.fromCharCode(_e); +if(_e==32){ return this.smartDash(); } -if(_d=="\""||_d=="'"){ +if(_f=="\""||_f=="'"){ Xinha._stopEvent(ev); -return this.smartQuotes(_d); +return this.smartQuotes(_f); } return true; }; -SmartReplace.prototype.smartQuotes=function(_e){ -if(_e=="'"){ -var _f=this.openingQuote; -var _10=this.closingQuote; +SmartReplace.prototype.smartQuotes=function(_10){ +if(_10=="'"){ +var _11=this.openingQuote; +var _12=this.closingQuote; }else{ -var _f=this.openingQuotes; -var _10=this.closingQuotes; +var _11=this.openingQuotes; +var _12=this.closingQuotes; } -var _11=this.editor; -var sel=_11.getSelection(); +var _13=this.editor; +var sel=_13.getSelection(); if(Xinha.is_ie){ -var r=_11.createRange(sel); +var r=_13.createRange(sel); if(r.text!==""){ r.text=""; } r.moveStart("character",-1); if(r.text.match(/\S/)){ r.moveStart("character",+1); -r.text=_10; +r.text=_12; }else{ r.moveStart("character",+1); -r.text=_f; +r.text=_11; } }else{ if(!sel.isCollapsed){ -_11.insertNodeAtSelection(document.createTextNode("")); +_13.insertNodeAtSelection(document.createTextNode("")); } if(sel.anchorOffset>0){ sel.extend(sel.anchorNode,sel.anchorOffset-1); } if(sel.toString().match(/\S/)){ sel.collapse(sel.anchorNode,sel.anchorOffset); -_11.insertNodeAtSelection(document.createTextNode(_10)); +_13.insertNodeAtSelection(document.createTextNode(_12)); }else{ sel.collapse(sel.anchorNode,sel.anchorOffset); -_11.insertNodeAtSelection(document.createTextNode(_f)); +_13.insertNodeAtSelection(document.createTextNode(_11)); } } }; SmartReplace.prototype.smartDash=function(){ -var _14=this.editor; +var _16=this.editor; var sel=this.editor.getSelection(); if(Xinha.is_ie){ var r=this.editor.createRange(sel); @@ -122,30 +122,107 @@ } }; SmartReplace.prototype.replaceAll=function(){ -var _17=[""",String.fromCharCode(8220),String.fromCharCode(8221),String.fromCharCode(8222),String.fromCharCode(187),String.fromCharCode(171)]; -var _18=["'",String.fromCharCode(8216),String.fromCharCode(8217),String.fromCharCode(8218),String.fromCharCode(8250),String.fromCharCode(8249)]; -var _19=this.editor.getHTML(); -var _1a=new RegExp("(\\s|^|>)("+_17.join("|")+")(\\S)","g"); -_19=_19.replace(_1a,"$1"+this.openingQuotes+"$3"); -var _1b=new RegExp("(\\s|^|>)("+_18.join("|")+")(\\S)","g"); -_19=_19.replace(_1b,"$1"+this.openingQuote+"$3"); -var _1c=new RegExp("(\\S)("+_17.join("|")+")","g"); -_19=_19.replace(_1c,"$1"+this.closingQuotes); -var _1d=new RegExp("(\\S)("+_18.join("|")+")","g"); -_19=_19.replace(_1d,"$1"+this.closingQuote); -var _1e=new RegExp("( | )(-)( | )","g"); -_19=_19.replace(_1e," "+String.fromCharCode(8211)+" "); -this.editor.setHTML(_19); +var _19=[""",String.fromCharCode(8220),String.fromCharCode(8221),String.fromCharCode(8222),String.fromCharCode(187),String.fromCharCode(171)]; +var _1a=["'",String.fromCharCode(8216),String.fromCharCode(8217),String.fromCharCode(8218),String.fromCharCode(8250),String.fromCharCode(8249)]; +var _1b=this.editor.getHTML(); +var _1c=new RegExp("(\\s|^|>)("+_19.join("|")+")(\\S)","g"); +_1b=_1b.replace(_1c,"$1"+this.openingQuotes+"$3"); +var _1d=new RegExp("(\\s|^|>)("+_1a.join("|")+")(\\S)","g"); +_1b=_1b.replace(_1d,"$1"+this.openingQuote+"$3"); +var _1e=new RegExp("(\\S)("+_19.join("|")+")","g"); +_1b=_1b.replace(_1e,"$1"+this.closingQuotes); +var _1f=new RegExp("(\\S)("+_1a.join("|")+")","g"); +_1b=_1b.replace(_1f,"$1"+this.closingQuote); +var _20=new RegExp("( | )(-)( | )","g"); +_1b=_1b.replace(_20," "+String.fromCharCode(8211)+" "); +this.editor.setHTML(_1b); }; SmartReplace.prototype.dialog=function(){ -var _1f=this; -var _20=function(_21){ -_1f.toggleActivity(_21.enable); -if(_21.convert){ -_1f.replaceAll(); +var _21=this; +var _22=function(_23){ +_21.toggleActivity(_23.enable); +if(_23.convert){ +_21.replaceAll(); } }; -var _22=this; -Dialog(_editor_url+"plugins/SmartReplace/popups/dialog.html",_20,_22); +var _24=this; +Dialog(_editor_url+"plugins/SmartReplace/popups/dialog.html",_22,_24); }; +SmartReplace.prototype.buttonPress=function(_25,obj){ +var _27=this; +if(this._dialog.dialog.rootElem.style.display!="none"){ +return this._dialog.hide(); +} +var _28=function(){ +var _29=_27._dialog.hide(); +_27.toggleActivity((_29.enable)?true:false); +if(_29.convert){ +_27.replaceAll(); +_27._dialog.dialog.getElementById("convert").checked=false; +} +}; +var _2a={enable:_27.active?"on":"",convert:""}; +this._dialog.show(_2a,_28); +}; +SmartReplace.prototype.onGenerateOnce=function(){ +if(!this._dialog){ +this._dialog=new SmartReplace.Dialog(this); +} +}; +SmartReplace.Dialog=function(_2b){ +this.Dialog_nxtid=0; +this.mainPluginObject=_2b; +this.id={}; +this.ready=false; +this.files=false; +this.html=false; +this.dialog=false; +this._prepareDialog(); +}; +SmartReplace.Dialog.prototype._prepareDialog=function(){ +var _2c=this; +var _2d=this.mainPluginObject.editor; +if(this.html==false){ +Xinha._getback(_editor_url+"plugins/SmartReplace/dialog.html",function(_2e){ +_2c.html=_2e; +_2c._prepareDialog(); +}); +return; +} +this.dialog=new Xinha.Dialog(_2d,this.html,"SmartReplace"); +this.ready=true; +}; +SmartReplace.Dialog.prototype._lc=SmartReplace.prototype._lc; +SmartReplace.Dialog.prototype.show=function(_2f,ok,_31){ +if(!this.ready){ +var _32=this; +window.setTimeout(function(){ +_32.show(_2f,ok,_31); +},100); +return; +} +var _33=this.dialog; +var _32=this; +if(ok){ +this.dialog.getElementById("ok").onclick=ok; +}else{ +this.dialog.getElementById("ok").onclick=function(){ +_32.hide(); +}; +} +if(_31){ +this.dialog.getElementById("cancel").onclick=_31; +}else{ +this.dialog.getElementById("cancel").onclick=function(){ +_32.hide(); +}; +} +this.mainPluginObject.editor.disableToolbar(["fullscreen","smartreplace"]); +this.dialog.show(_2f); +this.dialog.onresize(); +}; +SmartReplace.Dialog.prototype.hide=function(){ +this.mainPluginObject.editor.enableToolbar(); +return this.dialog.hide(); +}; Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Stylist/stylist.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Stylist/Attic/stylist.js,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Stylist/stylist.js 25 Feb 2007 19:06:32 -0000 1.4 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/Stylist/stylist.js 14 Jun 2007 01:36:57 -0000 1.5 @@ -1,9 +1,9 @@ -HTMLArea.Config.prototype.css_style={}; -HTMLArea.Config.prototype.stylistLoadStylesheet=function(_1,_2){ +Xinha.Config.prototype.css_style={}; +Xinha.Config.prototype.stylistLoadStylesheet=function(_1,_2){ if(!_2){ _2={}; } -var _3=HTMLArea.ripStylesFromCSSFile(_1); +var _3=Xinha.ripStylesFromCSSFile(_1); for(var i in _3){ if(_2[i]){ this.css_style[i]=_2[i]; @@ -13,11 +13,11 @@ } this.pageStyleSheets[this.pageStyleSheets.length]=_1; }; -HTMLArea.Config.prototype.stylistLoadStyles=function(_5,_6){ +Xinha.Config.prototype.stylistLoadStyles=function(_5,_6){ if(!_6){ _6={}; } -var _7=HTMLArea.ripStylesFromCSSString(_5); +var _7=Xinha.ripStylesFromCSSString(_5); for(var i in _7){ if(_6[i]){ this.css_style[i]=_6[i]; @@ -27,11 +27,11 @@ } this.pageStyle+=_5; }; -HTMLArea.prototype._fillStylist=function(){ +Xinha.prototype._fillStylist=function(){ if(!this._stylist){ return false; } -this._stylist.innerHTML="

"+HTMLArea._lc("Styles","Stylist")+"

"; +this.plugins.Stylist.instance.main.innerHTML=""; var _9=true; var _a=this._getSelection(); var _b=this._activeElement(_a); @@ -114,11 +114,11 @@ _13.style.background="Highlight"; _13.style.color="HighlightText"; } -this._stylist.appendChild(_13); +this.plugins.Stylist.instance.main.appendChild(_13); } } }; -HTMLArea.prototype._stylistAddClasses=function(el,tag,_17){ +Xinha.prototype._stylistAddClasses=function(el,tag,_17){ if(el=="new"){ this.insertHTML("<"+tag+" class=\""+_17+"\">"+this.getSelectedHTML()+""); }else{ @@ -130,22 +130,22 @@ }else{ _18._stylist_usedToBe=[{"tagName":el.tagName,"className":el.getAttribute("class")}]; } -HTMLArea.addClasses(_18,_17); +Xinha.addClasses(_18,_17); }else{ -HTMLArea._addClasses(el,_17); +Xinha._addClasses(el,_17); } } this.focusEditor(); this.updateToolbar(); }; -HTMLArea.prototype._stylistRemoveClasses=function(_19,_1a){ +Xinha.prototype._stylistRemoveClasses=function(_19,_1a){ for(var x=0;x<_1a.length;x++){ this._stylistRemoveClassesFull(_1a[x],_19); } this.focusEditor(); this.updateToolbar(); }; -HTMLArea.prototype._stylistRemoveClassesFull=function(el,_1d){ +Xinha.prototype._stylistRemoveClassesFull=function(el,_1d){ if(el!=null){ var _1e=el.className.trim().split(" "); var _1f=[]; @@ -163,13 +163,13 @@ } if(_1f.length==0&&el._stylist_usedToBe&&el._stylist_usedToBe.length>0&&el._stylist_usedToBe[el._stylist_usedToBe.length-1].className!=null){ var _24=el._stylist_usedToBe[el._stylist_usedToBe.length-1]; -var _25=HTMLArea.arrayFilter(_24.className.trim().split(" "),function(c){ +var _25=Xinha.arrayFilter(_24.className.trim().split(" "),function(c){ if(c==null||c.trim()==""){ return false; } return true; }); -if((_1f.length==0)||(HTMLArea.arrayContainsArray(_1f,_25)&&HTMLArea.arrayContainsArray(_25,_1f))){ +if((_1f.length==0)||(Xinha.arrayContainsArray(_1f,_25)&&Xinha.arrayContainsArray(_25,_1f))){ el=this.switchElementTag(el,_24.tagName); _1f=_25; }else{ @@ -188,13 +188,13 @@ } } }; -HTMLArea.prototype.switchElementTag=function(el,tag){ +Xinha.prototype.switchElementTag=function(el,tag){ var _2b=el.parentNode; var _2c=this._doc.createElement(tag); -if(HTMLArea.is_ie||el.hasAttribute("id")){ +if(Xinha.is_ie||el.hasAttribute("id")){ _2c.setAttribute("id",el.getAttribute("id")); } -if(HTMLArea.is_ie||el.hasAttribute("style")){ +if(Xinha.is_ie||el.hasAttribute("style")){ _2c.setAttribute("style",el.getAttribute("style")); } var _2d=el.childNodes; @@ -207,10 +207,10 @@ this.selectNodeContents(_2c); return _2c; }; -HTMLArea.prototype._getAncestorsClassNames=function(sel){ +Xinha.prototype._getAncestorsClassNames=function(sel){ var _30=this._activeElement(sel); if(_30==null){ -_30=(HTMLArea.is_ie?this._createRange(sel).parentElement():this._createRange(sel).commonAncestorContainer); +_30=(Xinha.is_ie?this._createRange(sel).parentElement():this._createRange(sel).commonAncestorContainer); } var _31=[]; while(_30){ @@ -230,12 +230,12 @@ } return _31; }; -HTMLArea.prototype._ancestorsWithClasses=function(sel,tag,_36){ +Xinha.prototype._ancestorsWithClasses=function(sel,tag,_36){ var _37=[]; var _38=this._activeElement(sel); if(_38==null){ try{ -_38=(HTMLArea.is_ie?this._createRange(sel).parentElement():this._createRange(sel).commonAncestorContainer); +_38=(Xinha.is_ie?this._createRange(sel).parentElement():this._createRange(sel).commonAncestorContainer); } catch(e){ return _37; @@ -275,11 +275,11 @@ } return _37; }; -HTMLArea.ripStylesFromCSSFile=function(URL){ -var css=HTMLArea._geturlcontent(URL); -return HTMLArea.ripStylesFromCSSString(css); +Xinha.ripStylesFromCSSFile=function(URL){ +var css=Xinha._geturlcontent(URL); +return Xinha.ripStylesFromCSSString(css); }; -HTMLArea.ripStylesFromCSSString=function(css){ +Xinha.ripStylesFromCSSString=function(css){ RE_comment=/\/\*(.|\r|\n)*?\*\//g; RE_rule=/\{(.|\r|\n)*?\}/g; css=css.replace(RE_comment,""); @@ -295,29 +295,69 @@ }; function Stylist(_43,_44){ this.editor=_43; -_43._stylist=null; -_43._stylist=_43.addPanel("right"); -HTMLArea.addClass(_43._stylist,"stylist"); var _45=this; -_43.notifyOn("modechange",function(e,_47){ -switch(_47.mode){ +} +Stylist._pluginInfo={name:"Stylist",version:"1.0",developer:"James Sleeman",developer_url:"http://www.gogo.co.nz/",c_owner:"Gogo Internet Services",license:"HTMLArea",sponsor:"Gogo Internet Services",sponsor_url:"http://www.gogo.co.nz/"}; +Stylist.prototype.onGenerateOnce=function(){ +var _46=this.editor; +var _47=this; +if(typeof _46.config.css_style!="undefined"&&Xinha.objectProperties(_46.config.css_style).length!=0){ +_46._stylist=null; +_46._stylist=_46.addPanel("right"); +Xinha.addClass(_46._stylist,"stylist"); +this.caption=document.createElement("h1"); +this.caption.innerHTML=Xinha._lc("Styles","Stylist"); +_46._stylist.appendChild(this.caption); +this.main=document.createElement("div"); +this.main.style.overflow="auto"; +this.main.style.height=this.editor._framework.ed_cell.offsetHeight-this.caption.offsetHeight+"px"; +_46._stylist.appendChild(this.main); +Xinha.freeLater(this,"caption"); +Xinha.freeLater(this,"main"); +_46.notifyOn("modechange",function(e,_49){ +switch(_49.mode){ case "text": -_43.hidePanel(_43._stylist); +_46.hidePanel(_46._stylist); break; case "wysiwyg": -_43.showPanel(_43._stylist); +_46.showPanel(_46._stylist); break; } }); +_46.notifyOn("panel_change",function(e,_4b){ +switch(_4b.action){ +case "show": +var _4c=_47.main.offsetHeight-_4b.panel.offsetHeight; +_47.main.style.height=((_4c>0)?_47.main.offsetHeight-_4b.panel.offsetHeight:0)+"px"; +_46._stylist.style.height=_47.caption.offsetHeight+"px"; +_46.sizeEditor(); +break; +case "hide": +_47.resize(); +break; } -Stylist._pluginInfo={name:"Stylist",version:"1.0",developer:"James Sleeman",developer_url:"http://www.gogo.co.nz/",c_owner:"Gogo Internet Services",license:"htmlArea",sponsor:"Gogo Internet Services",sponsor_url:"http://www.gogo.co.nz/"}; -Stylist.prototype.onGenerateOnce=function(){ -var _48=this.editor; -if(typeof _48.config.css_style=="undefined"||HTMLArea.objectProperties(_48.config.css_style).length==0){ -_48.removePanel(_48._stylist); -_48._stylist=null; +}); +_46.notifyOn("before_resize",function(){ +_46._stylist.style.height=_47.caption.offsetHeight+"px"; +}); +_46.notifyOn("resize",function(){ +_47.resize(); +}); } }; +Stylist.prototype.resize=function(){ +var _4d=this.editor; +var _4e=_4d._stylist.parentNode; +var _4f=_4e.offsetHeight; +for(var i=0;i<_4e.childNodes.length;++i){ +if(_4e.childNodes[i]==_4d._stylist||!_4e.childNodes[i].offsetHeight){ +continue; +} +_4f-=_4e.childNodes[i].offsetHeight; +} +_4d._stylist.style.height=_4f+"px"; +this.main.style.height=_4f-this.caption.offsetHeight+"px"; +}; Stylist.prototype.onUpdateToolbar=function(){ if(this.editor._stylist){ if(this._timeoutID){ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SuperClean/tidy.php =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SuperClean/tidy.php,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SuperClean/tidy.php 25 Feb 2007 19:06:32 -0000 1.3 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/SuperClean/tidy.php 14 Jun 2007 01:36:57 -0000 1.4 @@ -115,7 +115,7 @@ $content = ob_get_contents(); ob_end_clean(); - if(!strlen($content)) + if(strlen($content) < 4) { // Tidy on the local machine failed, try a post $res_1 Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/table-operations.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/table-operations.js,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/table-operations.js 25 Feb 2007 19:06:33 -0000 1.5 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/table-operations.js 14 Jun 2007 01:36:58 -0000 1.6 @@ -247,6 +247,52 @@ } _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": @@ -289,17 +335,17 @@ if(!td){ break; } -var _57=td.parentNode.parentNode.rows; -var _58=td.cellIndex; -var _59=(td.parentNode.cells.length==_58+1); -for(var i=_57.length;--i>=0;){ -var tr=_57[i]; +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(_59&&HTMLArea.is_ie){ +if(_69&&HTMLArea.is_ie){ tr.insertBefore(otd); }else{ -var ref=tr.cells[_58+(/after/.test(_3c)?1:0)]; +var ref=tr.cells[_68+(/after/.test(_3c)?1:0)]; tr.insertBefore(otd,ref); } } @@ -317,16 +363,16 @@ if(!td){ break; } -var _58=td.cellIndex; +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 _57=td.parentNode.parentNode.rows; -for(var i=_57.length;--i>=0;){ -var tr=_57[i]; -tr.removeChild(tr.cells[_58]); +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(); @@ -368,79 +414,56 @@ break; case "TO-cell-merge": var sel=_3b._getSelection(); -var _5e,i=0; -var _57=[]; -var row=null; -var _60=null; -if(!HTMLArea.is_ie){ -try{ -if(sel.rangeCount<2){ -alert(HTMLArea._lc("Please select the cells you want to merge.","TableOperations")); -break; +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_73){ +_73=_74; } -_60.push(td); +if(tr2.rowIndex+td2.rowSpan-1>_71){ +_71=tr2.rowIndex+td2.rowSpan-1; } } -catch(e){ -} -_57.push(_60); +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; } -var tr=td.parentElement; -var _61=prompt(HTMLArea._lc("How many columns would you like to merge?","TableOperations"),2); -if(!_61){ -break; +_3b._popupDialog("plugin://TableOperations/merge_cells.html",function(_78){ +if(!_78){ +return false; } -var _62=prompt(HTMLArea._lc("How many rows would you like to merge?","TableOperations"),2); -if(!_62){ -break; +_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); } -var _63=td.cellIndex; -while(_62-->0){ -td=tr.cells[_63]; -_60=[td]; -for(var i=1;i<_61;++i){ -td=td.nextSibling; -if(!td){ break; -} -_60.push(td); -} -_57.push(_60); -tr=tr.nextSibling; -if(!tr){ -break; -} -} -} -var _64=""; -for(i=0;i<_57.length;++i){ -var _60=_57[i]; -for(var j=0;j<_60.length;++j){ -var _66=_60[j]; -_64+=_66.innerHTML; -(i||j)&&(_66.parentNode.removeChild(_66)); -} -} -var td=_57[0][0]; -td.innerHTML=_64; -td.rowSpan=_57.length; -td.colSpan=_57[0].length; -_3b.selectNodeContents(td); -_3b.forceRedraw(); -_3b.focusEditor(); -break; case "TO-table-prop": this.dialogTableProperties(); break; @@ -455,167 +478,167 @@ } }; 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(_67){ -var len=parseInt(_67); +TableOperations.getLength=function(_7d){ +var len=parseInt(_7d); if(isNaN(len)){ len=""; } return len; }; -TableOperations.processStyle=function(_69,_6a){ -var _6b=_6a.style; -for(var i in _69){ -if(typeof _69[i]=="function"){ +TableOperations.processStyle=function(_7f,_80){ +var _81=_80.style; +for(var i in _7f){ +if(typeof _7f[i]=="function"){ continue; } -var val=_69[i]; +var val=_7f[i]; switch(i){ case "f_st_backgroundColor": -_6b.backgroundColor=val; +_81.backgroundColor=val; break; case "f_st_color": -_6b.color=val; +_81.color=val; break; case "f_st_backgroundImage": if(/\S/.test(val)){ -_6b.backgroundImage="url("+val+")"; +_81.backgroundImage="url("+val+")"; }else{ -_6b.backgroundImage="none"; +_81.backgroundImage="none"; } break; case "f_st_borderWidth": -_6b.borderWidth=val; +_81.borderWidth=val; break; case "f_st_borderStyle": -_6b.borderStyle=val; +_81.borderStyle=val; break; case "f_st_borderColor": -_6b.borderColor=val; +_81.borderColor=val; break; case "f_st_borderCollapse": -_6b.borderCollapse=val?"collapse":""; +_81.borderCollapse=val?"collapse":""; break; case "f_st_width": if(/\S/.test(val)){ -_6b.width=val+_69["f_st_widthUnit"]; +_81.width=val+_7f["f_st_widthUnit"]; }else{ -_6b.width=""; +_81.width=""; } break; case "f_st_height": if(/\S/.test(val)){ -_6b.height=val+_69["f_st_heightUnit"]; +_81.height=val+_7f["f_st_heightUnit"]; }else{ -_6b.height=""; +_81.height=""; } break; case "f_st_textAlign": if(val=="char"){ -var ch=_69["f_st_textAlignChar"]; +var ch=_7f["f_st_textAlignChar"]; if(ch=="\""){ ch="\\\""; } -_6b.textAlign="\""+ch+"\""; +_81.textAlign="\""+ch+"\""; }else{ if(val=="-"){ -_6b.textAlign=""; +_81.textAlign=""; }else{ -_6b.textAlign=val; +_81.textAlign=val; } } break; case "f_st_verticalAlign": -_6a.vAlign=""; +_80.vAlign=""; if(val=="-"){ -_6b.verticalAlign=""; +_81.verticalAlign=""; }else{ -_6b.verticalAlign=val; +_81.verticalAlign=val; } break; case "f_st_float": -_6b.cssFloat=val; +_81.cssFloat=val; break; } } }; -TableOperations.createColorButton=function(doc,_70,_71,_72){ -if(!_71){ -_71=""; +TableOperations.createColorButton=function(doc,_86,_87,_88){ +if(!_87){ +_87=""; }else{ -if(!/#/.test(_71)){ -_71=HTMLArea._colorToRgb(_71); +if(!/#/.test(_87)){ +_87=HTMLArea._colorToRgb(_87); } } var df=doc.createElement("span"); -var _74=doc.createElement("input"); -_74.type="hidden"; -df.appendChild(_74); -_74.name="f_st_"+_72; -_74.value=_71; -var _75=doc.createElement("span"); -_75.className="buttonColor"; -df.appendChild(_75); -var _76=doc.createElement("span"); -_76.className="chooser"; -_76.style.backgroundColor=_71; -_75.appendChild(_76); -_75.onmouseover=function(){ +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"; } }; -_75.onmouseout=function(){ +_8b.onmouseout=function(){ if(!this.disabled){ this.className="buttonColor"; } }; -_76.onclick=function(){ +_8c.onclick=function(){ if(this.parentNode.disabled){ return false; } -_70._popupDialog("select_color.html",function(_77){ -if(_77){ -_76.style.backgroundColor="#"+_77; -_74.value="#"+_77; +_86._popupDialog("select_color.html",function(_8d){ +if(_8d){ +_8c.style.backgroundColor="#"+_8d; +_8a.value="#"+_8d; } -},_71); +},_87); }; -var _78=doc.createElement("span"); -_78.innerHTML="×"; -_78.className="nocolor"; -_78.title=HTMLArea._lc("Unset color","TableOperations"); -_75.appendChild(_78); -_78.onmouseover=function(){ +var _8e=doc.createElement("span"); +_8e.innerHTML="×"; +_8e.className="nocolor"; +_8e.title=HTMLArea._lc("Unset color","TableOperations"); +_8b.appendChild(_8e); +_8e.onmouseover=function(){ if(!this.parentNode.disabled){ this.className+=" nocolor-hilite"; } }; -_78.onmouseout=function(){ +_8e.onmouseout=function(){ if(!this.parentNode.disabled){ this.className="nocolor"; } }; -_78.onclick=function(){ -_76.style.backgroundColor=""; -_74.value=""; +_8e.onclick=function(){ +_8c.style.backgroundColor=""; +_8a.value=""; }; return df; }; -TableOperations.createStyleLayoutFieldset=function(doc,_7a,el){ -var _7c=doc.createElement("fieldset"); -var _7d=doc.createElement("legend"); -_7c.appendChild(_7d); -_7d.innerHTML=HTMLArea._lc("Layout","TableOperations"); -var _7e=doc.createElement("table"); -_7c.appendChild(_7e); -_7e.style.width="100%"; -var _7f=doc.createElement("tbody"); -_7e.appendChild(_7f); -var _80=el.tagName.toLowerCase(); +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(_80!="td"&&_80!="tr"&&_80!="th"){ +if(_96!="td"&&_96!="tr"&&_96!="th"){ tr=doc.createElement("tr"); -_7f.appendChild(tr); +_95.appendChild(tr); td=doc.createElement("td"); td.className="label"; tr.appendChild(td); @@ -637,7 +660,7 @@ } } tr=doc.createElement("tr"); -_7f.appendChild(tr); +_95.appendChild(tr); td=doc.createElement("td"); td.className="label"; tr.appendChild(td); @@ -671,7 +694,7 @@ td.appendChild(select); select.name="f_st_textAlign"; options=["Left","Center","Right","Justify","-"]; -if(_80=="td"){ +if(_96=="td"){ options.push("Char"); } input=doc.createElement("input"); @@ -688,9 +711,9 @@ option.selected=((el.style.textAlign.toLowerCase()==val)||(el.style.textAlign==""&&Val=="-")); select.appendChild(option); } -function setCharVisibility(_85){ -input.style.visibility=_85?"visible":"hidden"; -if(_85){ +function setCharVisibility(_9b){ +input.style.visibility=_9b?"visible":"hidden"; +if(_9b){ input.focus(); input.select(); } @@ -700,7 +723,7 @@ }; setCharVisibility(select.value=="char"); tr=doc.createElement("tr"); -_7f.appendChild(tr); +_95.appendChild(tr); td=doc.createElement("td"); td.className="label"; tr.appendChild(td); @@ -743,28 +766,28 @@ option.selected=((el.style.verticalAlign.toLowerCase()==val)||(el.style.verticalAlign==""&&Val=="-")); select.appendChild(option); } -return _7c; +return _92; }; -TableOperations.createStyleFieldset=function(doc,_87,el){ -var _89=doc.createElement("fieldset"); -var _8a=doc.createElement("legend"); -_89.appendChild(_8a); -_8a.innerHTML=HTMLArea._lc("CSS Style","TableOperations"); -var _8b=doc.createElement("table"); -_89.appendChild(_8b); -_8b.style.width="100%"; -var _8c=doc.createElement("tbody"); -_8b.appendChild(_8c); +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"); -_8c.appendChild(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,_87,el.style.backgroundColor,"backgroundColor"); +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")+": ")); @@ -776,37 +799,37 @@ } td.appendChild(input); tr=doc.createElement("tr"); -_8c.appendChild(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,_87,el.style.color,"color")); +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"); -_8c.appendChild(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 _8f=TableOperations.createColorButton(doc,_87,el.style.borderColor,"borderColor"); -var btn=_8f.firstChild.nextSibling; -td.appendChild(_8f); +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 _91=[]; +var _a7=[]; td.appendChild(select); select.name="f_st_borderStyle"; options=["none","dotted","dashed","solid","double","groove","ridge","inset","outset"]; -var _92=el.style.borderStyle; -(_92.match(/([^\s]*)\s/))&&(_92=RegExp.$1); +var _a8=el.style.borderStyle; +(_a8.match(/([^\s]*)\s/))&&(_a8=RegExp.$1); for(var i in options){ if(typeof options[i]=="function"){ continue; @@ -815,15 +838,15 @@ option=doc.createElement("option"); option.value=val; option.innerHTML=val; -(val==_92)&&(option.selected=true); +(val==_a8)&&(option.selected=true); select.appendChild(option); } select.style.marginRight="0.5em"; -function setBorderFieldsStatus(_95){ -for(var i=0;i<_91.length;++i){ -var el=_91[i]; -el.style.visibility=_95?"hidden":"visible"; -if(!_95&&(el.tagName.toLowerCase()=="input")){ +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(); } @@ -833,21 +856,21 @@ setBorderFieldsStatus(this.value=="none"); }; input=doc.createElement("input"); -_91.push(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 _98=doc.createElement("span"); -_98.innerHTML=HTMLArea._lc("pixels","TableOperations"); -td.appendChild(_98); -_91.push(_98); +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"); -_8c.appendChild(tr); +_a2.appendChild(tr); td=doc.createElement("td"); td.className="label"; tr.appendChild(td); @@ -860,11 +883,11 @@ td.appendChild(input); td=doc.createElement("td"); tr.appendChild(td); -var _99=doc.createElement("label"); -_99.htmlFor="f_st_borderCollapse"; -_99.innerHTML=HTMLArea._lc("Collapsed borders","TableOperations"); -td.appendChild(_99); +var _af=doc.createElement("label"); +_af.htmlFor="f_st_borderCollapse"; +_af.innerHTML=HTMLArea._lc("Collapsed borders","TableOperations"); +td.appendChild(_af); } -return _89; +return _9f; }; Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/popups/merge_cells.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/popups/merge_cells.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/plugins/TableOperations/popups/merge_cells.html 14 Jun 2007 01:36:58 -0000 1.1 @@ -0,0 +1,65 @@ + + + + + Merge Cells + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + +
+
Merge Cells
+
+ Merge current cell with: +
Cells to the right, and
Cells down
+
+ + +
+
+ + + Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/popups/popup.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/popups/popup.js,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/popups/popup.js 25 Feb 2007 19:06:34 -0000 1.6 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/popups/popup.js 14 Jun 2007 01:36:58 -0000 1.7 @@ -27,7 +27,7 @@ if(window.__dlg_init_done){ return true; } -if(window.opener._editor_skin!=""){ +if(window.opener._editor_skin){ var _c=document.getElementsByTagName("head")[0]; var _d=document.createElement("link"); _d.type="text/css"; @@ -36,14 +36,13 @@ _c.appendChild(_d); } window.dialogArguments=opener.Dialog._arguments; -var _e=document.body; +var _e=Xinha.pageSize(window); if(!_b){ -var _f=Xinha.viewportSize(window); -_b={width:_f.x,height:_e.scrollHeight}; +_b={width:_e.x,height:_e.y}; } window.resizeTo(_b.width,_b.height); var _f=Xinha.viewportSize(window); -window.resizeBy(0,_e.scrollHeight-_f.y); +window.resizeBy(0,_e.y-_f.y); if(_b.top&&_b.left){ window.moveTo(_b.left,_b.top); }else{ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/silva/skin.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/silva/skin.css,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/silva/skin.css 2 Feb 2007 21:05:08 -0000 1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/silva/skin.css 14 Jun 2007 01:36:58 -0000 1.2 @@ -19,22 +19,30 @@ { margin-top:0px; margin-bottom:0px; - border:1px solid transparent; + border:1px solid #F1F1F1; padding:0px; -moz-border-radius:15px; margin:4px; height:20px; } +/* hack: IE6 does not know border-color: transparent;*/ +html > body .htmlarea .toolbarRow { + border-color: transparent; +} .htmlarea .toolbar .button { width:18px; height:18px; padding:1px 2px 2px 1px ; - border: solid transparent; + border: solid #F1F1F1; border-width:1px; } +html > body .htmlarea .toolbar .button { + border-color: transparent; +} + .buttonImageContainer { position:relative; @@ -110,7 +118,8 @@ } .dialog { - background: url(dialog.jpg) #f0f0f0 no-repeat; + /* background: url(dialog.jpg) #f0f0f0 no-repeat; */ + background-color: #f0f0f0; } body.dialog { padding-top:0; @@ -135,7 +144,7 @@ font-weight:400; } .dialog .title { - margin:5px -5px; + } .dialog button{ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/silva/statusbar.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/silva/statusbar.png,v diff -u -r1.1 -r1.2 Binary files differ Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/silva/toolbar.png =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/skins/silva/toolbar.png,v diff -u -r1.1 -r1.2 Binary files differ