RadEditorDomInspector.prototype=new RadEditorModuleBase( ); RadEditorDomInspector.prototype.base=RadEditorModuleBase.prototype.constructor; var DOM_INSPECTOR_HORIZONTAL_HEIGHT="\x320px"; var DOM_INSPECTOR_VERTICAL_HEIGHT="8\x30\x70x"; function RadEditorDomInspector(moduleArgs){var theDiv=moduleArgs.Document.createElement("DI\x56"); theDiv.style.paddingTop="\x32p\x78"; if (window.opera){theDiv.style.height=DOM_INSPECTOR_HORIZONTAL_HEIGHT; theDiv.style.lineHeight=DOM_INSPECTOR_HORIZONTAL_HEIGHT; }moduleArgs.ModuleElement=theDiv; this.base(moduleArgs); this.SelectedDomCouple=null; this.RemoveElementString=this.GetLocalizedString("DomI\x6e\x73pect\x6frR\x65mov\x65E\x6ceme\x6et","\x52\x65mov\x65 El\x65men\x74"); }
; RadEditorDomInspector.prototype.OnDispose= function ( ){ this.Clear( ); this.SelectedDomCouple=null; this.SelectedElement=null; };RadEditorDomInspector.prototype.OnRenderHorizontal= function ( ){ this.style.height=DOM_INSPECTOR_HORIZONTAL_HEIGHT; } ; RadEditorDomInspector.prototype.OnRenderVertical= function ( ){ this.style.height=DOM_INSPECTOR_VERTICAL_HEIGHT; } ; RadEditorDomInspector.prototype.OnCreate= function ( ){var selfPointer=this ; this.AttachEventHandler(RadEditorNamespace.RADEVENT_SEL_CHANGED, function ( ){selfPointer.CreatePath( ); } ); var topElem=this.TopElement; topElem.OnRenderVertical=this.OnRenderVertical; topElem.OnRenderHorizontal=this.OnRenderHorizontal; topElem.style.width=this.Editor.Width; topElem.style.height=DOM_INSPECTOR_HORIZONTAL_HEIGHT; } ; RadEditorDomInspector.prototype.CreatePath= function ( ){if (!this.IsEnabled)return; var elem=this.Editor.GetSelectedElement( ); if (!elem)return; var contentArea=this.Editor.ContentArea; if (this.Editor.IsIE && !contentArea.contains(elem))return; var array=[ ]; var counter=0; while (elem!=contentArea && null!=elem){array[counter++]=elem; elem=elem.parentNode; } this.Clear( ); var domCouple=null; var domElement; var isLast= false; for (var i=array.length-1; i>=0; i--){domElement=array[i]; isLast=(0==i) || (null!=this.SelectedElement && domElement==this.SelectedElement); if (domElement && domElement.tagName){isSelected=(0==i) || (null!=this.SelectedElement && domElement==this.SelectedElement); domCouple=this.AddDomCouple(domElement,isSelected); }if (isLast){break; }} this.SelectedElement=null; this.SelectedDomCouple=domCouple; if (this.SelectedDomCouple){var domLink=this.Document.createElement("A"); domLink.innerHTML=this.RemoveElementString; domLink.href="\x6aava\x73cript\x3avoi\x64(0)"; domLink.className="\x44\x6fmP\x61thL\x69nk"; domLink.Parent=this ; domLink.onmousedown=new Function("\x74\x68is\x2ePar\x65nt.R\x65mov\x65\x53el\x65cte\x64El\x65men\x74(\x29;\x72e\x74ur\x6e \x66a\x6cs\x65;"); this.ModuleElement.appendChild(domLink); }} ; RadEditorDomInspector.prototype.AddDomCouple= function (domElement,isSelected){var domLink=this.Document.createElement("\x41"); this.ModuleElement.appendChild(domLink); var empty=this.Document.createElement("\x53P\x41N"); empty.innerHTML="&n\x62s\x70;> "; this.ModuleElement.appendChild(empty); var couple=new DomCouple(domLink,domElement,(isSelected?"Do\x6dP\x61thLi\x6ekSe\x6cect\x65d": ""),isSelected,this ); return couple; } ; RadEditorDomInspector.prototype.Clear= function ( ){if (this.SelectedDomCouple){ this.SelectedDomCouple.Clear( ); }var links=this.ModuleElement.getElementsByTagName("A"); for (i=0; i<links.length; i++){var link=links[i]; link.Parent=null; } this.ModuleElement.innerHTML=""; } ; RadEditorDomInspector.prototype.RemoveSelectedElement= function ( ){if (!this.Editor.IsEditingEnabled( ))return; if (!this.SelectedDomCouple || !this.SelectedDomCouple.DomElement){return; }var elem=this.SelectedDomCouple.DomElement; try {if (elem.tagName=="\x54\104" || elem.tagName=="TH"){ this.Editor.DeleteCell( ); }else if (elem.tagName=="\x54R"){ this.Editor.DeleteRow( ); }else if (elem.tagName=="\x54\x41BLE" || elem.tagName=="TB\x4fD\x59" || elem.tagName=="THEA\x44" || elem.tagName=="\x54\x46OOT" || elem.tagName=="\x45\x4dBE\x44" || elem.tagName=="OBJE\x43\x54" || elem.tagName=="IN\x50U\x54" || elem.tagName=="\x49\x4dG" || elem.tagName=="HR"){var cmd=RadEditorNamespace.RadGenericCommand.New(this.RemoveElementString,this.Editor.ContentWindow); var parentNode=elem.parentNode; parentNode.removeChild(elem); this.Editor.SetFocus( ); this.Editor.ExecuteCommand(cmd); restorePoint.Select( ); this.Editor.SetActive( ); this.Editor.SetFocus( ); }else if (elem.tagName!="\x42\x4fDY"){var restorePoint=RadEditorNamespace.RadCreateRestorePoint(this.Editor.ContentWindow); var parentNode=elem.parentNode; var cmd=RadEditorNamespace.RadGenericCommand.New(this.RemoveElementString,this.Editor.ContentWindow); var newHtml=""; for (var i=0; i<parentNode.childNodes.length; i++){if (elem!=parentNode.childNodes[i]){newHtml+=RadEditorNamespace.Utils.GetOuterHtml(parentNode.childNodes[i]); }else {newHtml+=elem.innerHTML; }}parentNode.innerHTML=newHtml; this.Editor.SetFocus( ); this.Editor.ExecuteCommand(cmd); restorePoint.Select( ); this.Editor.SetActive( ); this.Editor.SetFocus( ); }}catch (ex){} this.Editor.FireEvent(RadEditorNamespace.RADEVENT_SEL_CHANGED,null); } ; RadEditorDomInspector.prototype.SelectElement= function (elem){try { this.SelectedElement=elem; this.Editor.SelectElement(elem); this.SelectedElement=null; }catch (ex){}};function DomCouple(domLink,domElement,className,isSelected,RadEditorDomInspector){ this.RadEditorDomInspector=RadEditorDomInspector; this.DomLink=domLink; this.DomElement=domElement; this.Selected=isSelected; if (domLink){domLink.href="\x6aavas\x63ript\x3avoi\x64(0)\x3b"; domLink.className=className?className: "\x44\x6fmPat\x68Lin\x6b"; domLink.Parent=this ; domLink.onclick=new Function("t\x68i\x73.Pare\x6et.\x53elec\x74El\x65men\x74()\x3b"); domLink.onmouseover=new Function("\x74\x68is\x2ePar\x65nt.\x6fnmo\x75seo\x76er(\x29;"); domLink.onmouseout=new Function("\x74\x68is\x2ePar\x65nt\x2eonm\x6fu\x73eo\x75t()\x3b"); if (domElement!=null){domLink.innerHTML=domElement.tagName; }}}
; DomCouple.prototype.Clear= function ( ){ this.RadEditorDomInspector.SelectedDomCouple=null; this.DomLink.className="DomPa\x74\x68Link"; } ; DomCouple.prototype.onmouseover= function ( ){if (this.Selected)return; try { this.DomElementClass=this.DomElement.className; this.DomElement.className+="\x20R\x61dEDo\x6dMo\x75seOv\x65r"; }catch (e){ ; }} ; DomCouple.prototype.onmouseout= function ( ){if (null!=this.DomElementClass)this.DomElement.className=this.DomElementClass; try {if (""==this.DomElement.className){ this.DomElement.removeAttribute("clas\x73N\x61me",0); this.DomElement.removeAttribute("\x63\x6cas\x73",0); }}catch (e){ ; }} ; DomCouple.prototype.SelectElement= function ( ){ this.onmouseout( ); if (this.RadEditorDomInspector.SelectedDomCouple){ this.RadEditorDomInspector.SelectedDomCouple.Clear( ); } this.DomLink.className="\x44\x6fm\x50athL\x69nk\x53elec\x74e\x64"; this.RadEditorDomInspector.SelectedDomCouple=this ; this.RadEditorDomInspector.SelectElement(this.DomElement); } ;
RadEditorHtmlInspector.prototype=new RadEditorModuleBase( ); RadEditorHtmlInspector.prototype.base=RadEditorModuleBase.prototype.constructor; function RadEditorHtmlInspector(moduleArgs){var txtArea=moduleArgs.Document.createElement("TEXTA\x52\x45A"); moduleArgs.ModuleElement=txtArea; txtArea.style.width="9\x39%"; moduleArgs.ClassName="\x52a\x64ETex\x74Are\x61"; this.base(moduleArgs); this.ModuleElement.setAttribute("r\x6fw\x73","10"); this.ModuleElement.setAttribute("cols","80"); if (!document.all)this.ModuleElement.onclick= function ( ){ this.focus( ); } ; }
; RadEditorHtmlInspector.prototype.OnDispose= function ( ){ this.ModuleElement.onkeyup=null; };RadEditorHtmlInspector.prototype.IsSelChanged= function (keyCode){if (keyCode==32 || keyCode==9 || keyCode==8 || keyCode==46 || keyCode==13){return true; }if (keyCode==190)return true; if (keyCode>47 && keyCode<58)return true; return false; } ; RadEditorHtmlInspector.prototype.OnCreate= function ( ){var selfPointer=this ; this.AttachEventHandler(RadEditorNamespace.RADEVENT_SEL_CHANGED, function ( ){selfPointer.OnSelectionChanged( ); } ); this.AttachEventHandler(RadEditorNamespace.RADEVENT_CALLBACK_STARTED, function ( ){selfPointer.ModuleElement.value=""; } ); this.ModuleElement.onkeyup= function anon(e){if (!e)e=window.event; if (selfPointer.IsSelChanged(e.keyCode)){selfPointer.UpdateContentArea(e); }} ; var oModule=this ; this.TopElement.OnResize= function ( ){var oArea=oModule.ModuleElement; oArea.style.height=(parseInt(oModule.TopElement.offsetHeight)-3)+"px"; oArea.style.width=(parseInt(oModule.TopElement.offsetWidth)-3)+"px"; };} ; RadEditorHtmlInspector.prototype.UpdateContentArea= function (e){if (!this.IsEnabled)return; this.Flag= true; this.Editor.SetHtml(this.ModuleElement.value,this.Localization['\x54yping'], false); this.ModuleElement.focus( ); } ; RadEditorHtmlInspector.prototype.OnSelectionChanged= function ( ){if (this.Flag){ this.Flag= false; return; } this.ModuleElement.value=this.Editor.GetHtml( ); } ;
RadEditorNamespace.RadSpinBox= function (toolArgs){ this.Width=toolArgs.Width?parseInt(toolArgs.Width)+"px": "5\x30px"; this.Title=toolArgs.Title; this.Controller=toolArgs.Controller; this.Name=toolArgs.Name; this.Document=toolArgs.Document; this.SelectedValue=""; this.ClassName="\122adET\x65xtB\x6fx"; };RadEditorNamespace.RadSpinBox.prototype.Dispose= function ( ){ this.Element.onchange=null; this.Element.onkeypress=null; this.Element.onclick=null; this.Element.Parent=null; this.Element=null; } ; RadEditorNamespace.RadSpinBox.prototype.GetTopElement= function ( ){return this.Element; } ; RadEditorNamespace.RadSpinBox.prototype.GetSelectedValue= function ( ){return this.SelectedValue; } ; RadEditorNamespace.RadSpinBox.prototype.SetValue= function (value){ this.Element.value=value; } ; RadEditorNamespace.RadSpinBox.prototype.Create= function ( ){var inputElement=this.Document.createElement("\x49\x4eP\x55T"); inputElement.setAttribute("\x73\x69ze","3"); inputElement.style.width=this.Width; inputElement.className=this.ClassName; inputElement.Parent=this ; var commandName=this.Name; var executeFunction= function (e,elem,isSecondToExecute){if (isSecondToExecute){if (elem.Executed){elem.Executed= false; return RadEditorNamespace.Utils.CancelEvent(e); }}elem.Executed= true; elem.Parent.SelectedValue=elem.value; elem.Parent.Controller.Fire(commandName,elem.Parent); return RadEditorNamespace.Utils.CancelEvent(e); } ; inputElement.onchange= function (e){if (!e)e=window.event; return executeFunction(e,this, true); } ; inputElement.onclick= function (e){ this.focus( ); } ; inputElement.onkeypress= function (e){if (!e)e=window.event; if (e.keyCode==13){return executeFunction(e,this ); }} ; this.Element=inputElement; return this.Element; } ; RadEditorNamespace.RadCheckBox= function (toolArgs){ this.Title=toolArgs.Title; this.Controller=toolArgs.Controller; this.Name=toolArgs.Name; this.Document=toolArgs.Document; this.SelectedValue= false; };RadEditorNamespace.RadCheckBox.prototype.Dispose= function ( ){ this.Element.onclick=null; this.Element.Parent=null; this.Element=null; } ; RadEditorNamespace.RadCheckBox.prototype.GetTopElement= function ( ){return this.Element; } ; RadEditorNamespace.RadCheckBox.prototype.GetSelectedValue= function ( ){return this.SelectedValue; } ; RadEditorNamespace.RadCheckBox.prototype.SetValue= function (value){if (this.Element.checked!=value)this.Element.checked=value; } ; RadEditorNamespace.RadCheckBox.prototype.Create= function ( ){var inputElement=this.Document.createElement("INP\x55\x54"); inputElement.setAttribute("\x74y\x70e","\x43\x48ECKB\x4fX"); inputElement.Parent=this ; inputElement.onclick= function (e){var oP=this.Parent; oP.SelectedValue=!oP.SelectedValue; this.checked=oP.SelectedValue; oP.SelectedValue=this.checked; oP.Controller.Fire(oP.Name,oP); } ; this.Element=inputElement; return this.Element; } ; RadEditorNamespace.RadTargetBox= function (toolArgs){ this.Title=toolArgs.Title; this.Controller=toolArgs.Controller; this.Name=toolArgs.Name; this.Document=toolArgs.Document; this.Width=toolArgs.Width?toolArgs.Width: "95p\x78"; this.TargetList=toolArgs.TargetList; this.SelectedValue=""; };RadEditorNamespace.RadTargetBox.prototype.Dispose= function ( ){ this.Element.onchange=null; this.Element.Parent=null; this.TargetList=null; this.Element=null; } ; RadEditorNamespace.RadTargetBox.prototype.GetTopElement= function ( ){return this.Element; } ; RadEditorNamespace.RadTargetBox.prototype.GetSelectedValue= function ( ){return this.SelectedValue; } ; RadEditorNamespace.RadTargetBox.prototype.SetValue= function (value){var options=this.Element.options; for (var i=0; i<options.length; i++){if (options[i].value==value){ this.Element.selectedIndex=i; return; }} this.Element.selectedIndex=-1; } ; RadEditorNamespace.RadTargetBox.prototype.Create= function ( ){var inputElement=this.Document.createElement("SE\x4c\x45C\x54"); inputElement.className="\x52\x61dE\x44rop\x44own"; inputElement.style.width=this.Width; var targetList=this.TargetList; inputElement.options[0]=new Option("---",""); for (var item in targetList){if (typeof(targetList[item])=="s\x74\x72ing"){inputElement.options[inputElement.options.length]=new Option(targetList[item],item); }}inputElement.Parent=this ; var commandName=this.Name; inputElement.onchange= function ( ){ this.Parent.SelectedValue=this.options[this.selectedIndex].value; this.Parent.Controller.Fire(commandName,this.Parent); } ; this.Element=inputElement; return this.Element; } ; RadEditorNamespace.ATTRIBUTE_INSPECTOR_HORIZONTAL_HEIGHT="\x35\x31p\x78"; RadEditorNodeInspector.prototype=new RadEditorModuleBase( ); RadEditorNodeInspector.prototype.base=RadEditorModuleBase.prototype.constructor; function RadEditorNodeInspector(moduleArgs){var oName=window.opera?"\x53\x50AN": "DI\x56"; moduleArgs.ModuleElement=moduleArgs.Document.createElement(oName); this.base(moduleArgs); this.ArrowDropdownUrl=this.Editor.SkinBasePath+"\x42\x75tton\x73/ar\x72owD\x72opd\x6fwn\x2egif"; this.ArrowIconUrl=this.Editor.SkinBasePath+"Butt\x6fn\x73/arr\x6fwI\x63on.\x67if"; this.IsIE=document.all && !window.opera? true : false; this.Controls= {} ; this.ControlNames= {} ; this.SelectedElement=null; this.SelectedElementString=this.GetLocalizedString("Nod\x65I\x6espec\x74orS\x65lec\x74ed\x45lem\x65nt","\124he \x73ele\x63ted\x20ele\x6dent\x20is "); this.InvalidValueString=this.GetLocalizedString("NodeIn\x73p\x65cto\x72Inv\x61lid\x56al\x75e","Inva\x6ci\x64 val\x75e.\x20Ple\x61se \x65nt\x65r a\x20num\x62er\x2e"); }
; RadEditorNodeInspector.prototype.GetNamedCssForSelectedElement= function (oVal){return this.Editor.GetNamedCssForSelectedElement(oVal); } ; RadEditorNodeInspector.prototype.OnDispose= function ( ){var controls=this.Controls; for (var ctrlName in controls){var ctrl=controls[ctrlName]; if (ctrl.Dispose){ctrl.Dispose( ); }}var mainTable=this.MainPanel; if (mainTable){for (var rowCount=0; rowCount<mainTable.rows.length; rowCount++){var oRow=mainTable.rows[rowCount]; var len=oRow.cells.length; for (var i=0; i<len; i++){var delTd=oRow.cells[0]; delTd.style.display=""; delTd.parentNode.deleteCell(delTd); }}} this.Controls=null; this.MainPanel=null; } ; RadEditorNodeInspectorAttributesArray=[["\x72ows","\x4e\x41ME","\x77i\x64th","\x63e\x6clSpa\x63ing","align","\x68\x72ef","\x76\x61lue","\x63\x6cas\x73Nam\x65",RadEditorNamespace.RADCOMMAND_SET_TABLE_PROPERTIES,RadEditorNamespace.RADCOMMAND_SET_CELL_PROPERTIES,RadEditorNamespace.RADCOMMAND_SET_LINK_PROPERTIES,RadEditorNamespace.RADCOMMAND_SET_IMAGE_PROPERTIES],["\x63o\x6cs","id","\x68\x65ight","actio\x6e","c\x65\x6clPadd\x69ng","b\x6fr\x64erCo\x6cor","\x62\x67C\x6flor","border","\x61\x6ct","\x6e\x6fW\x72ap","t\x61r\x67et","\x74\x69tle"]]; RadEditorNodeInspector.prototype.NodeAttributesArray= {} ; RadEditorNodeInspector.prototype.NodeAttributesArray["TAB\x4c\x45"]=["w\x69d\x74h","ce\x6cl\x53paci\x6eg","bgColo\x72","\x63\x6cas\x73Nam\x65",RadEditorNamespace.RADCOMMAND_SET_TABLE_PROPERTIES,"he\x69g\x68t","\x63\x65llPa\x64din\x67","\x61\x6cign","\x62o\x72der"]; RadEditorNodeInspector.prototype.NodeAttributesArray["\x54\x48"]=RadEditorNodeInspector.prototype.NodeAttributesArray["T\x44"]=["\x77i\x64th","bgC\x6fl\x6fr","clas\x73N\x61me",RadEditorNamespace.RADCOMMAND_SET_CELL_PROPERTIES,"\x68e\x69ght","a\x6c\x69gn","noWr\x61p"]; RadEditorNodeInspector.prototype.NodeAttributesArray["\124R"]=["width","class\x4e\x61me","\x68\x65ig\x68t"]; RadEditorNodeInspector.prototype.NodeAttributesArray["\101"]=["\x68\x72ef","clas\x73\x4eame",RadEditorNamespace.RADCOMMAND_SET_LINK_PROPERTIES,"\164\151\x74le","\x74\x61rget"]; RadEditorNodeInspector.prototype.NodeAttributesArray["\111MG"]=["\x77\x69dt\x68","b\x6f\x72derCo\x6cor","c\x6c\x61ssNam\x65",RadEditorNamespace.RADCOMMAND_SET_IMAGE_PROPERTIES,"height","a\x6ci\x67n","\x62\x6frder","alt"]; RadEditorNodeInspector.prototype.NodeAttributesArray["IN\x50U\x54"]=["NAME","width","he\x69g\x68t","\x69\x64","ti\x74l\x65","\166\141\x6cue","c\x6ca\x73sNam\x65"]; RadEditorNodeInspector.prototype.NodeAttributesArray["\x46\x4fRM"]=["clas\x73N\x61me","\x77\x69dth","\150eight","NAME","\x61\x63tion","id"]; RadEditorNodeInspector.prototype.NodeAttributesArray["\x54\x45XTAR\x45A"]=["\x63\x6cass\x4eame","\x77i\x64th","he\x69g\x68t","\x4e\x41ME","id","\x72\x6fw\x73","cols"]; RadEditorNodeInspector.prototype.OnCreate= function ( ){var selfPointer=this ; this.AttachEventHandler(RadEditorNamespace.RADEVENT_SEL_CHANGED, function ( ){selfPointer.UpdateMainPanel( ); } ); var topElem=this.TopElement; topElem.OnRenderVertical=RadEditorNamespace.AttributeInspector_OnRenderVertical; topElem.OnRenderHorizontal=RadEditorNamespace.AttributeInspector_OnRenderHorizontal; topElem.style.height=RadEditorNamespace.ATTRIBUTE_INSPECTOR_HORIZONTAL_HEIGHT; topElem.style.width=this.Editor.Width; } ; RadEditorNodeInspector.prototype.CreateMainPanel= function ( ){var controls=this.Controls; var controlNames=this.ControlNames; var mainPanelArray=RadEditorNodeInspectorAttributesArray; var mainTable=this.Document.createElement("\x54\x41BL\x45"); mainTable.border=0; mainTable.cellSpacing=0; mainTable.cellPadding=0; for (var rowCount=0; rowCount<mainPanelArray.length; rowCount++){var curRow=mainPanelArray[rowCount]; var oRow=mainTable.insertRow(-1); for (var i=0; i<curRow.length; i++){var item=curRow[i]; var oCell=oRow.insertCell(-1); oCell.style.display="\156one"; oCell.setAttribute("\x63\x6fnt\x72olN\x61me",item); oCell.innerHTML=this.GetLocalizedString(item,item); oCell.className="Ra\x64E\x54oolT\x65xt"; oCell.style.paddingLeft="4\x70\x78"; oCell=oRow.insertCell(-1); oCell.style.display="\x6e\x6fne"; oCell.setAttribute("\x63\x6fntrol\x48ol\x64er",item); var control=this.GetControlByName(item); if (control){controls[item]=control; oCell.appendChild(control.GetTopElement( )); }}}return mainTable; };RadEditorNodeInspector.prototype.UpdateMainPanel= function ( ){if (!this.IsEnabled)return; if (!this.IsMainCreated){ this.MainPanel=this.CreateMainPanel( ); this.MainPanel.style.display="\x6e\x6fne"; this.ModuleElement.appendChild(this.MainPanel); this.IsMainCreated= true; }var oElem=this.Editor.GetSelectedElement( ); if (!oElem || oElem.tagName=="B\x4f\x44Y" || oElem.ownerDocument!=this.Editor.Document){ this.MainPanel.style.display="\x6eo\x6ee"; return; }if (oElem.tagName=="T\x42O\x44Y" && this.Editor.IsOpera){oElem=oElem.parentNode; }var controlRow=this.NodeAttributesArray[oElem.tagName]; if (!controlRow){var oCell=RadEditorNamespace.Utils.GetElementParentByTag(oElem,"\x41"); if (!oCell)oCell=RadEditorNamespace.Utils.GetElementParentByTag(oElem,"\x54D"); if (!oCell)oCell=RadEditorNamespace.Utils.GetElementParentByTag(oElem,"\x54\x48"); if (oCell)oElem=oCell; else { this.MainPanel.style.display="\x6e\x6fne"; return; }}var tagName=null; if (this.SelectedElement){try {tagName=this.SelectedElement.tagName; }catch (e){ ; }}if (!this.SelectedElement || (tagName!=oElem.tagName)){var editor=this.Editor; var cssDocument=this.Editor.GetDocument( ); var cssControl=this.Controls["\x63\x6cas\x73Nam\x65"]; cssControl.IsCreated= false; cssControl.GetDataFunction= function (name){return editor.GetCssClassesByTagName(oElem.tagName,editor.Document); } ; this.Controls["a\x6ci\x67n"].SetTagName(oElem.tagName); } this.SelectedElement=oElem; this.UpdateControlValues(this.SelectedElement); this.MainPanel.style.display=""; } ; RadEditorNodeInspector.prototype.UpdateControlValues= function (oElem){var controlRow=this.NodeAttributesArray[oElem.tagName]; var mainTable=this.MainPanel; var controls=this.Controls; for (var rowCount=0; rowCount<mainTable.rows.length; rowCount++){var oRow=mainTable.rows[rowCount]; for (var i=0; i<oRow.cells.length; i++){var oCell=oRow.cells[i]; var attrName=oCell.getAttribute("con\x74\x72olNa\x6de"); if (attrName){oCell.style.display=this.ArrayValueExists(attrName,controlRow)?"": "\x6eo\x6ee"; }var attrHolder=oCell.getAttribute("\x63\x6fntro\x6cHol\x64er"); if (attrHolder){oCell.style.display=this.ArrayValueExists(attrHolder,controlRow)?"": "\x6e\x6fne"; if ("\156one"==oCell.style.display)continue; var control=controls[attrHolder]; var attr=oElem.getAttribute?oElem.getAttribute(attrHolder): ""; if (attrHolder=="no\x57r\x61p"){control.SetValue(oElem.noWrap); }else if (attrHolder=="\x61\x6cign"){control.SetValue(oElem.getAttribute("a\x6c\x69gn"),oElem.getAttribute("\x76A\x6cign")); }else if (attrHolder=="b\x6f\x72derCo\x6cor" || attrHolder=="\x77\x69dth" || attrHolder=="h\x65\x69ght"){var oVal=oElem.style[attrHolder]; if (!oVal)oVal=oElem.getAttribute(attrHolder); control.SetValue(oVal); }else if ("\x6e\x61me"==attrHolder.toLowerCase( )){control.SetValue(oElem.name); }else if (attr){control.SetValue(attr); }else if (!this.IsIE && "\x63l\x61ssNa\x6de"==attrHolder){var attr=oElem.getAttribute?oElem.getAttribute("cla\x73\x73"): ""; if (attr)control.SetValue(attr); }else {if (control.SetValue)control.SetValue(""); }}}}} ; RadEditorNodeInspector.prototype.Fire= function (commandName,oTool){if (!this.Editor.IsEditingEnabled( ))return; var title=this.GetLocalizedString(commandName,commandName); var oElem=this.SelectedElement; if (commandName==RadEditorNamespace.RADCOMMAND_SET_CELL_PROPERTIES || commandName==RadEditorNamespace.RADCOMMAND_SET_TABLE_PROPERTIES || commandName==RadEditorNamespace.RADCOMMAND_SET_IMAGE_PROPERTIES || commandName==RadEditorNamespace.RADCOMMAND_SET_LINK_PROPERTIES){ this.Editor.Fire(commandName,this ); return; }else if ("a\x6c\x69gn"==commandName){var align=oTool.GetAlign( ); var vAlign=oTool.GetVAlign( ); this.Editor.ExecuteSetAttributeCommand(oElem,"\x61\x6cign",align,title); title=this.GetLocalizedString("\x76A\x6cign","\x76A\x6cign"); this.Editor.ExecuteSetAttributeCommand(oElem,"\x76\x41l\x69gn",vAlign,title); }else if ("\142order\x43olo\x72"==commandName){var selValue=oTool.GetSelectedValue( ); this.Editor.ExecuteSetStyleRuleCommand(this.SelectedElement,"\x62\x6frd\x65rCo\x6cor",selValue,title); }else if ("\x77\x69dth"==commandName || "\x68\x65igh\x74"==commandName){var selValue=oTool.GetSelectedValue( ); if (!this.IsValidAttribValue(selValue)){alert(this.InvalidValueString); return; }function ConvertIntToPixel(oVal){var oNew=""+oVal; if (oNew.indexOf("%")!=-1){return oNew; }else {oNew=parseInt(oNew); if (!isNaN(oNew)){oNew=oNew+"\x70\x78"; return oNew; }}return oVal; }selValue=ConvertIntToPixel(selValue); if (this.SelectedElement.removeAttribute)this.SelectedElement.removeAttribute(commandName); this.Editor.ExecuteSetStyleRuleCommand(this.SelectedElement,commandName,selValue,title); }else {var attribName=commandName; var attribValue=oTool.GetSelectedValue( ); switch (commandName){case RadEditorNamespace.RADCOMMAND_APPLY_CLASS:attribName="\x63\x6cassNa\x6de"; break; case RadEditorNamespace.RADCOMMAND_BACKCOLOR:attribName="\x62\x67C\x6flor"; break; case "\x76a\x6cue":break; case "\x6e\x6fW\x72ap":if (attribValue)attribValue="noW\x72a\x70"; else attribValue=""; break; case "\x62\x6frder":case "cel\x6cS\x70acin\x67":case "\x63\x65ll\x50add\x69ng":if (!this.IsValidAttribValue(attribValue)){alert(this.InvalidValueString); return; }break; case "\x4eA\x4dE":if (!this.IsIE)attribName="name"; } this.Editor.ExecuteSetAttributeCommand(oElem,attribName,attribValue,title); } this.Editor.FireEvent(RadEditorNamespace.RADEVENT_SEL_CHANGED); };RadEditorNodeInspector.prototype.GetSelectedValue= function ( ){return this.SelectedElement; } ; RadEditorNodeInspector.prototype.GetIconUrl= function (fileName){return (this.Editor.SkinBasePath+"Butto\x6e\x73/"+fileName); } ; RadEditorNodeInspector.prototype.ArrayValueExists= function (value,array){for (var i=0; i<array.length; i++){if (array[i]==value)return true; }return false; } ; RadEditorNodeInspector.prototype.IsValidAttribValue= function (value){if (null==value)return false; value=RadEditorNamespace.Utils.Trim(value); if (""==value)return true; var result=parseInt(value); if (isNaN(result)){return false; }return true; } ; RadEditorNodeInspector.prototype.GetControlByName= function (name){var control=null; var theWidth=null; var editor=this.Editor; var oController=this ; var localiz=this.Localization; var getControllerFn= function ( ){return oController; } ; switch (name){case "class\x4e\x61me":var toolArgs= {GetController:getControllerFn,Document: this.Document,Name:RadEditorNamespace.RADCOMMAND_APPLY_CLASS,Title: this.Localization[RadEditorNamespace.RADCOMMAND_APPLY_CLASS],ArrowUrl: this.ArrowDropdownUrl,Width: 80,PopupWidth: 180,PopupHeight: 150,CellSpacing: 2,CellPadding: 2,UseCssArray: false ,ClearStyleString:localiz["\x43\x6cea\x72Sty\x6ce"],PopupIconPath: this.Editor.SkinBasePath+"I\x6dg\x2f" } ; control=RadEditorNamespace.RadCssCombo.New(toolArgs); control.Create( ); break; case "bo\x72d\x65rCol\x6fr":case "\x62\x67Co\x6cor":var toolArgs= {GetController:getControllerFn,Document: this.Document,Name: "\x62o\x72derC\x6flor"==name?"b\x6fr\x64erCo\x6cor":RadEditorNamespace.RADCOMMAND_BACKCOLOR,AddCustomColor:localiz["Add\x43\x75stomC\x6flo\x72"],AddCustomHexColor:localiz["\x41\x64d\x43usto\x6dHex\x43olo\x72"],PromptColor:localiz["P\x72o\x6dptCol\x6fr"],Title: this.GetLocalizedString(name),ArrowUrl: this.ArrowIconUrl,PopupWidth: 120,PopupHeight: 120,CellSpacing: 1,CellPadding: 1,IconUrl: this.GetIconUrl("\x42\x61ck\x43olo\x72.gi\x66"),AllowCustomColors: this.Editor.AllowCustomColors,GetDataFunction:function (name){return editor.GetDataArrayForTool("B\x61c\x6bColo\x72"); }} ; control=RadEditorNamespace.RadColorPicker.New(toolArgs); control.Create( ); break; case "\x61l\x69gn":var toolArgs= {GetController:getControllerFn,Document: this.Document,Name: "a\x6c\x69gn",Title: this.GetLocalizedString("al\x69g\x6e","\141lign"),ArrowUrl: this.ArrowIconUrl,SkinBasePath: this.Editor.SkinBasePath,IconUrl: this.GetIconUrl("\x2e./Img\x2fAli\x67n\x4didd\x6c\x65L\x65ft.\x67if")} ; control=RadEditorNamespace.RadAlignmentSelector.New(toolArgs); control.Create( ); break; case RadEditorNamespace.RADCOMMAND_SET_CELL_PROPERTIES:case RadEditorNamespace.RADCOMMAND_SET_TABLE_PROPERTIES:case RadEditorNamespace.RADCOMMAND_SET_IMAGE_PROPERTIES:case RadEditorNamespace.RADCOMMAND_SET_LINK_PROPERTIES:var toolArgs= {GetController:getControllerFn,Document: this.Document,Name:name,Title: this.Localization[name],IconUrl: this.GetIconUrl(name+".g\x69\x66")} ; control=RadEditorNamespace.RadToolBase.New(toolArgs); control.Create( ); break; case "targe\x74":var targetList= {_blank: this.GetLocalizedString("\x5f\x62lank","\x5f\x62lank"),_self: this.GetLocalizedString("_\x73\x65lf","_sel\x66"),_parent: this.GetLocalizedString("_p\x61\x72ent","_paren\x74"),_top: this.GetLocalizedString("_to\x70","_\x74\x6fp"),_search: this.GetLocalizedString("_sear\x63h","_\x73e\x61rch"),_media: this.GetLocalizedString("_medi\x61","\x5f\x6dedia")} ; var toolArgs= {TargetList:targetList,Controller: this,Document: this.Document,Name:name } ; control=new RadEditorNamespace.RadTargetBox(toolArgs); control.Create( ); break; case "noWra\x70":var toolArgs= {Controller: this,Document: this.Document,Name:name } ; control=new RadEditorNamespace.RadCheckBox(toolArgs); control.Create( ); break; case "href":theWidth=200; case "t\x69t\x6ce":case "\166alue":case "NAME":case "\x61\x63tio\x6e":case "id":if (!theWidth)theWidth=110; default:var toolArgs= {Controller: this,Document: this.Document,Name:name,Title: this.Localization[name],Width:theWidth } ; control=new RadEditorNamespace.RadSpinBox(toolArgs); control.Create( ); }return control; } ; RadEditorNamespace.AttributeInspector_OnRenderHorizontal= function ( ){var table=this.getElementsByTagName("\x54\x41B\x4cE")[0]; var panelRowCount=RadEditorNodeInspectorAttributesArray.length; var currentRowCount=table.rows.length; for (var counter=0; counter<panelRowCount; counter++){var newRow=table.insertRow(table.rows.length); var currentPanelRowCount=RadEditorNodeInspectorAttributesArray[counter].length*2; for (var i=0; i<currentPanelRowCount; i++){var curRow=table.rows[0]; var curCell=curRow.cells[0]; curRow.removeChild(curCell); curRow.parentNode.removeChild(curRow); newRow.appendChild(curCell); }} this.style.display="inlin\x65"; this.style.height=RadEditorNamespace.ATTRIBUTE_INSPECTOR_HORIZONTAL_HEIGHT; };RadEditorNamespace.AttributeInspector_OnRenderVertical= function ( ){var table=this.getElementsByTagName("TAB\x4c\x45")[0]; var rowCount=table.rows.length; for (var i=0; i<rowCount; i++){var curRow=table.rows[0]; var cellCount=curRow.cells.length; for (var j=0; j<cellCount; j++){var cell=curRow.cells[0]; var newRow=table.insertRow(table.rows.length); curRow.removeChild(cell); newRow.appendChild(cell); }curRow.parentNode.removeChild(curRow); } this.style.display="\x62\x6cock"; };
m.prototype=new RadEditorModuleBase( ); m.prototype.base=RadEditorModuleBase.prototype.constructor; function m(moduleArgs){var theDiv=moduleArgs.Document.createElement("DI\x56"); moduleArgs.ModuleElement=theDiv.cloneNode( true); this.base(moduleArgs); this.EnableMaxWidth= false; this.L=this.GetLocalizedString("\x53\x74at\x69sti\x63sWo\x72ds","\x57o\x72ds:"); this.K=this.GetLocalizedString("Stat\x69s\x74icsC\x68ara\x63ter\x73","\x43\x68a\x72acte\x72s:"); }
; m.prototype.OnCreate= function ( ){var selfPointer=this ; this.AttachEventHandler(RadEditorNamespace.RADEVENT_SEL_CHANGED, function ( ){selfPointer.J( ); } ); if (this.Editor.Document.body)this.AttachEventHandler("\x6f\x6eblu\x72", function ( ){selfPointer.J( ); } ); var isEnabled=this.IsEnabled; this.IsEnabled= true; this.J( ); this.IsEnabled=isEnabled; } ; m.prototype.J= function ( ){if (!this.IsEnabled || !this.Editor.Document.body)return; var content=this.Editor.GetText( ); var H=0; var h=0; if (content){G=/[\x21\x2e\x3f\x3b\x2c\x3a\x26\x5f\x2d\x7b\x7d\x5b\x5d\x28\x29\x7e\x23\x27\x22]/g; content=content.replace(G,""); g=/(^\s+)|(\s+$)/g; content=content.replace(g,""); if (content){F=/\s+/; var array=content.split(F); H=array.length; h=content.length; }} this.ModuleElement.innerHTML="\074\x73pa\x6e st\x79le=\x27lin\x65-\x68eig\x68t:\x322px\x27>"+this.L+" "+H+"\x20"+this.K+" "+h+"&n\x62s\x70;\074/s\x70an>"; } ;
if (typeof(RadEditorXhtmlValidatorDocTypes)=="undef\x69\x6e\x65d"){RadEditorXhtmlValidatorDocTypes= { "XHTML\x201\x2e0 S\x74ric\x74": ["\x21\x44OCT\x59PE \x68tml \x50UB\x4cIC\x20\042\x2d//W\x33C/\x2fD\x54D \x58H\x54M\x4c 1\x2e0\x20S\x74r\x69ct\x2f/\x45N\x22 \x22h\x74t\x70:\x2f/\x77w\x77.\x773\x2eo\x72g/\x54R\x2fx\x68t\x6dl\x31/\x44T\x44/\x78h\x74m\x6c1\x2ds\x74r\x69c\x74.d\x74\x64\042", false],"\x58H\x54ML 1\x2e0 T\x72ans\x69ti\x6fnal": ["!D\x4fC\x54YPE \x68tml\x20PUB\x4cIC\x20\042-/\x2fW3C\x2f/D\x54D \x58H\x54ML\x201\x2e0\x20T\x72a\x6esi\x74i\x6fn\x61l/\x2fE\x4e\x22 \x22h\x74tp\x3a/\x2fw\x77w\x2ew\x33.\x6fr\x67/T\x52/\x78h\x74m\x6c1\x2fD\x54D\x2fx\x68t\x6dl\x31-\x74r\x61n\x73i\x74i\x6fn\x61\x6c\x2ed\x74d\x22", false],"XHTM\x4c \x31.1": ["\x21\x44O\x43TYPE\x20htm\x6c PU\x42LI\x43 \042-\x2f/W\x33C//\x44T\x44 \x58HT\x4dL\x201\x2e1\x2f/E\x4e\x22 \042ht\x74p\x3a/\x2fw\x77w\x2ew\x33.\x6fr\x67/\x54R\x2fx\x68t\x6dl1\x31/\x44T\x44/\x78h\x74m\x6c1\x31.\x64t\x64\042", false] } ; }RadEditorXhtmlValidator.prototype=new RadEditorModuleBase( ); RadEditorXhtmlValidator.prototype.base=RadEditorModuleBase.prototype.constructor; function RadEditorXhtmlValidator(moduleArgs){moduleArgs.ModuleElement=moduleArgs.Document.createElement("div"); this.base(moduleArgs); }
; RadEditorXhtmlValidator.prototype.OnCreate= function ( ){ this.CreateHeader( ); this.CreateIframe( ); this.ModuleElement.appendChild(this.Iframe); } ; RadEditorXhtmlValidator.prototype.OnDispose= function ( ){if (this.ValidateButton){ this.ValidateButton.onclick=null; this.ValidateButton=null; }if (this.ToggleCheckbox){ this.ToggleCheckbox.onclick=null; this.ToggleCheckbox=null; } this.ContentField=null; this.DoctypeField=null; this.DoctypeSelect=null; this.ValidateForm=null; RadEditorNamespace.Utils.DetachEventEx(this.Iframe,"load",this.IframeLoadingFun); this.Iframe=null; } ; RadEditorXhtmlValidator.prototype.Validate= function ( ){oFinalContent="\074di\x76>"+this.Editor.getContent( )+"\x3c\x2fdi\x76>"; this.ContentField.value=oFinalContent; this.ShowIframe( true); if (this.ToggleCheckbox && !this.ToggleCheckbox.checked)this.ToggleCheckbox.checked= true; if (this.DoctypeSelect && this.DoctypeSelect.selectedIndex>-1){ this.DoctypeField.value="\074"+this.DoctypeSelect.options[this.DoctypeSelect.selectedIndex].value+">"; } this.ValidateForm.submit( ); } ; RadEditorXhtmlValidator.prototype.ShowIframe= function (toShow){var iframe=this.Iframe; if (toShow){iframe.style.width="99%"; var oHeight=400; iframe.style.height=oHeight+"px"; this.Editor.FixIeHeight(iframe,oHeight); iframe.style.border="\x31\x70x\x20ridg\x65 #\x61aaaa\x61"; }else {iframe.style.width="\060p\x78"; iframe.style.height="\x30\x70x"; iframe.style.border="\x30\x70x r\x69dge\x20#aa\x61aaa"; }} ; RadEditorXhtmlValidator.prototype.CreateIframe= function ( ){var iframe=document.createElement("ifra\x6de"); this.Iframe=iframe; iframe.frameBorder='0'; iframe.src=this.Editor.RadControlsDir+"\x45\x64i\x74or/X\x68tml\x2fXht\x6dlV\x61li\x64ato\x72.a\x73px"; iframe.style.margin="1px"; this.ShowIframe( false); var oModule=this ; var oFun= function ( ){var oDoc=oModule.Iframe.contentWindow.document; oModule.ContentField=oDoc.getElementById("E\x64i\x74orCon\x74en\x74"); oModule.DoctypeField=oDoc.getElementById("\x45\x64ito\x72Doc\x74ype"); oModule.ValidateForm=oDoc.forms["\x52a\x64Edit\x6frXh\x74mlF\x6frm"]; } ; this.IframeLoadingFun=oFun; RadEditorNamespace.Utils.AttachEventEx(iframe,"\x6c\x6fad",this.IframeLoadingFun); iframe=null; } ; RadEditorXhtmlValidator.prototype.CreateHeader= function ( ){var oModule=this ; var oBut=document.createElement("i\x6e\x70ut"); oBut.type="but\x74\x6fn"; oBut.className="R\x61d\x45Xhtml\x42utt\x6fn"; oBut.onclick= function ( ){oModule.Validate( ); oModule.CheckboxChecked= true; };oBut.value=this.GetLocalizedString("Valid\x61t\x65XHT\x4dL","\126alid\x61te \x58HTM\x4c"); var oCheckbox=document.createElement("\x49\x4ePUT"); oCheckbox.setAttribute("\164ype","che\x63k\x62ox"); oCheckbox.style.marginBottom="2p\x78"; this.CheckboxChecked= false; oCheckbox.onclick= function ( ){oModule.CheckboxChecked=!oModule.CheckboxChecked; this.checked=oModule.CheckboxChecked; oModule.ShowIframe(oModule.CheckboxChecked); } ; this.ModuleElement.appendChild(oCheckbox); this.ToggleCheckbox=oCheckbox; var oSpan=document.createElement("\163pan"); oSpan.style.height="16p\x78"; oSpan.onclick=new Function('\x74h\x69s.pr\x65vi\x6fusS\x69bli\x6eg.\x63lic\x6b()'); oSpan.innerHTML=this.GetLocalizedString("\105x\x70andV\x61lid\x61to\x72","\x45\x78pan\x64/Co\x6clap\x73e V\x61l\x69dat\x6fr")+"\x20\x26nbsp\x3b | \x26nbs\x70;"; this.ModuleElement.appendChild(oSpan); var oSpan=document.createElement("\x73\x70an"); oSpan.innerHTML=this.GetLocalizedString("S\x65l\x65ct","\x53\x65le\x63t")+"\072"; this.ModuleElement.appendChild(oSpan); var oSelect=document.createElement("\x73\x65lec\x74"); oSelect.className="\x52\x61dEDro\x70Dow\x6e"; oSelect.style.width="1\x34\x30px"; var doctypeList=RadEditorXhtmlValidatorDocTypes; for (var item in doctypeList){var newOption=new Option(item,doctypeList[item][0]); if (doctypeList[item][1]){newOption.selected= true; }oSelect.options[oSelect.options.length]=newOption; }oSelect.style.display="\x6e\x6fne"; if (this.Editor.IsIE && "\x63\x6fmple\x74e"!=document.readyState){RadEditorNamespace.Utils.AttachEventEx(window,"loa\x64", function ( ){oModule.DoctypeSelect.style.display=""; } ); }else oSelect.style.display=""; this.ModuleElement.appendChild(oSelect); this.ModuleElement.appendChild(oBut); this.ValidateButton=oBut; this.DoctypeSelect=oSelect; oBut=null; oSpan=null; oCheckbox=null; oSelect=null; } ;
function RadEditorModuleBase(moduleArgs){if (!moduleArgs)return; this.Editor=moduleArgs.Editor; this.IsIE=this.Editor.IsIE; this.IsOpera=this.Editor.IsOpera; this.Localization=this.Editor.Localization; this.Document=moduleArgs.Document; this.ModuleElement=moduleArgs.ModuleElement; this.Title=moduleArgs.Title; this.Id=moduleArgs.Id; this.ModuleElement.className=moduleArgs.ClassName?moduleArgs.ClassName: "\122\x61\x64EMod\x75le"; this.TopElement=null; this.EventHandlerQueue= {} ; this.IsCreated= false; this.IsEnabled= false; this.IsDockable=moduleArgs.IsDockable; this.InitialDockingZoneId=moduleArgs.InitialDockingZoneId; this.VisibleDisplay=null; this.EnableMaxWidth= true; }RadEditorModuleBase.prototype.GetTopElement= function ( ){if (!this.IsCreated)this.Create( ); return this.TopElement; } ; RadEditorModuleBase.prototype.SetVisible= function (visible){if (visible && !this.IsEnabled)return; var oElem=this.GetTopElement( ); if (visible){if (oElem.Show){oElem.Show( ); }else oElem.style.display=this.VisibleDisplay; }else {if (oElem.Hide)oElem.Hide( ); else oElem.style.display="n\x6f\x6ee"; }} ; RadEditorModuleBase.prototype.OnModuleResize= function ( ){if (!window.event)return; var src=window.event.srcElement; if (src.tagName!="\x54A\x42LE")return; if (src && null!=src.IsDocked){if (!src.IsDocked( )){src.ShowOverlay( ); }}} ; RadEditorModuleBase.prototype.CreateDockableWrapper= function ( ){var oTable=RadEditorNamespace.Utils.GetPlainTable(document); oTable.insertRow(-1); if (this.IsDockable){oTable.width="10\x30%"; }var oCell=oTable.rows[0].insertCell(-1); oCell.innerHTML="\x3cs\x70an s\x74yl\x65=\047fo\x6e\x74-s\x69ze:\x31px;\x6cin\x65-\x68e\x69gh\x74:\x30p\x78;\x27>&\x6eb\x73p\x3b\074/\x73p\x61n\x3e"; oCell.setAttribute("\x68\x65i\x67ht","\x31\x300%"); oCell.appendChild(this.ModuleElement); if (this.IsDockable && RadEditorNamespace.Docking){var newTable=RadEditorNamespace.Docking.WrapInDockingContainer(oTable,this.IsVertical,RadEditorNamespace.RadEditorModule_RenderHorizontal,RadEditorNamespace.RadEditorModule_RenderVertical,"\122adEMo\x64ule\x54abl\x65","\x52\x61d\x45Modu\x6ceTa\x62le",this.Title); oTable=newTable; } this.VisibleDisplay=this.IsIE && !this.IsOpera?"in\x6ci\x6ee": ""; oTable.className="\122adEMo\x64ule\x54able"; if (!this.IsIE){oTable.setAttribute("\x73\x74yle","floa\x74:\x6ceft"); }if (this.Editor.IsIE && oTable.attachEvent){oTable.attachEvent("\x6fn\x72esiz\x65",RadEditorModuleBase.prototype.OnModuleResize); }return oTable; } ; RadEditorModuleBase.prototype.Dispose= function ( ){for (var i in this.EventHandlerQueue){ this.DetachEventHandler(i); this.EventHandlerQueue[i]=null; } this.EventHandlerQueue=null; try {if (this.OnDispose)this.OnDispose( ); }catch (e){alert("D\x69\x73pose\x20fai\x6ced \x66or\x20"+this.Title+"\x20\x2d "+e.message); }if (this.TopElement){ this.TopElement.OnRenderVertical=null; this.TopElement.OnRenderHorizontal=null; this.TopElement.OnResize=null; this.TopElement.OnUndock=null; this.TopElement.OnDock=null; this.TopElement=null; } this.ModuleElement=null; this.Editor=null; } ; RadEditorModuleBase.prototype.SetEnabled= function (enabled){ this.IsEnabled=enabled; this.SetVisible(enabled); } ; RadEditorModuleBase.prototype.Create= function ( ){ this.TopElement=this.CreateDockableWrapper( ); var module=this ; this.IsCreated= true; if (this.OnCreate){ this.OnCreate( ); }return this.TopElement; } ; RadEditorNamespace.RadEditorModule_RenderHorizontal= function ( ){ this.style.width=""; if (this.OnRenderHorizontal!=null){ this.OnRenderHorizontal( ); }} ; RadEditorNamespace.RadEditorModule_RenderVertical= function ( ){ this.style.width="\x31\x300\x70x"; if (this.OnRenderVertical!=null){ this.OnRenderVertical( ); }} ; RadEditorModuleBase.prototype.GetLocalizedString= function (key,defaultValue){var moduleName=typeof(this ).toString( ); var str=this.Localization[key]; return str!=null?str:defaultValue; } ; RadEditorModuleBase.prototype.AttachEventHandler= function (eventName,eventHandler){ this.EventHandlerQueue[eventName]=eventHandler; this.Editor.AttachEventHandler(eventName,this.EventHandlerQueue[eventName]); } ; RadEditorModuleBase.prototype.DetachEventHandler= function (eventName){ this.Editor.DetachEventHandler(eventName,this.EventHandlerQueue[eventName]); } ; RadEditorModuleBase.prototype.OnCreate= function ( ){} ; RadEditorModuleBase.prototype.OnDispose= function ( ){} ;
RadEditor.prototype.SetModulesVisible= function (setVisible){var modules=this.Modules; for (var count=0; count<modules.length; count++){modules[count].SetVisible(setVisible); }} ; RadEditor.prototype.LoadModules= function (theEditor){var oModuleLength=theEditor.DefaultModulesArray.length; if (oModuleLength>0){for (var i=0; i<oModuleLength; i++){var curModule=theEditor.DefaultModulesArray[i]; var arg=0; var moduleName=curModule[arg++]; var dockingZone=curModule[arg++]; var dockable=curModule[arg++]; var visible=curModule[arg++]; var controlPage=curModule[arg++]; var scriptFile=curModule[arg++]; var params=curModule[arg++]; var id=null; try {theEditor.LoadModule(moduleName,dockingZone,dockable,visible,id); }catch (e){} ; }var attachModuleHandlers= function (editor){editor.AttachEventHandler(RadEditorNamespace.RADEVENT_MODE_CHANGED, function ( ){var setVisible=(editor.Mode==RadEditorNamespace.RADEDITOR_DESIGN_MODE); editor.SetModulesVisible(setVisible); } ); editor.AttachEventHandler(RadEditorNamespace.RADEVENT_SIZE_CHANGED, function ( ){var oLength=editor.Modules.length; for (var i=0; i<oLength; i++){var oModule=editor.Modules[i]; oModule.UpdateDockedSize( ); }} ); } ; attachModuleHandlers(theEditor); }} ; RadEditor.prototype.LoadModule= function (moduleName,dockingZone,dockable,setVisible,id){var localizedName=this.GetLocalizedString(moduleName,moduleName); var moduleArgs= {Editor: this,Document:document,Title:localizedName,Id:id,InitialDockingZoneId:dockingZone,IsDockable:dockable && this.EnableDocking } ; eval("\x76\x61r mo\x64ule\x20= n\x65w "+moduleName+"(mo\x64u\x6ceArg\x73)"); this.Modules[this.Modules.length]=module; var theEditor=this ; if (!module.IsCreated){var topElement=module.Create( ); var parentNode=this.GetDockingZoneById(module.InitialDockingZoneId); parentNode.appendChild(topElement); if (module.IsDockable){theEditor.MakeDockable(topElement); }module.SetEnabled(setVisible); theEditor.ResetSize( ); }module.TopElement.OnUndock= function ( ){module.Editor.ResetSize( ); module.TopElement.style.width=""; module.TopElement.width=""; };module.TopElement.OnDock= function ( ){module.Editor.ResetSize( ); module.UpdateDockedSize( ); };module.UpdateDockedSize= function ( ){var oModule=this ; var toResize= false; if (!oModule.IsDockable){var oElem=oModule.GetTopElement( ); if (oElem && oElem.parentNode && !oModule.Editor.IsZoneVertical(oElem.parentNode)){toResize= true; }}else {var oElem=oModule.GetTopElement( ); if (oElem.IsDocked && oElem.IsDocked( ) && !oElem.IsVertical)toResize= true; }if (toResize && oModule.EnableMaxWidth && oModule.TopElement){var oElem=oModule.TopElement; var oParent=oElem.parentNode; if (oParent && oParent.style.width=="1\x30\x30%"){oElem.parentNode.style.width="\x31\x300%"; }oElem.style.width="1\x30\x30%"; if (oElem.Show && oElem.IsVisible && oElem.IsVisible( ))oElem.Show( ); }};return module; } ; RadEditor.prototype.GetModules= function ( ){return this.Modules; } ;
RadEditorNamespace.RadAlignmentSelector= {New:function (toolArgs){toolArgs.ClassName="\x52adETo\x6flLo\x6eg"; toolArgs.PopupWidth=73; toolArgs.PopupHeight=85; toolArgs.CellSpacing=2; toolArgs.CellPadding=2; toolArgs.PopupClassName="RadA\x6c\x69gnme\x6etSe\x6cect\x6frT\x61bl\x65"; var obj=RadEditorNamespace.RadComboBoxBase.New(toolArgs); RadEditorNamespace.Utils.ExtendObject(obj,this ); obj.TagName=""; obj.ActiveAlignmentArray=null; obj.SelectedTuple=null; obj.NoAlignmentIndex=-1; obj.SkinBasePath=toolArgs.SkinBasePath; obj.ItemsPerRow=3; obj.IsPopupScrollable= false; return obj; } ,ImgAlignment: [["",""],["\x6e\x6fne",""],["",""],["",""],["\164\157\x70",""],["",""],["\x6c\x65ft",""],["abs\x6di\x64dle",""],["\162\151\x67ht",""],["",""],["bot\x74\x6fm",""],["",""]],CellAlignment: [["",""],["\x6e\x6fne",""],["",""],["\x6c\x65ft","to\x70"],["\x63\x65nt\x65r","t\x6fp"],["ri\x67h\x74","\x74\x6fp"],["left","\x6d\x69d\x64le"],["\x63\x65nter","mi\x64d\x6ce"],["right","middle"],["\x6c\x65ft","\x62\x6fttom"],["c\x65n\x74er","bott\x6fm"],["\x72i\x67ht","b\x6ft\x74om"]],TableAlignment: [["",""],["\x6e\x6fne",""],["",""],["l\x65f\x74",""],["\x63\x65nter",""],["\x72i\x67ht",""],["",""],["",""],["",""],["",""],["",""],["",""]],CaptionIEAlignment: [["",""],["\x6e\157\x6ee",""],["",""],["l\x65f\x74","top"],["cent\x65r","\x74\x6fp"],["r\x69g\x68t","top"],["",""],["",""],["",""],["\x6c\x65ft","bot\x74o\x6d"],["\x63\x65nter","botto\x6d"],["\x72\x69ght","\x62\x6ftto\x6d"]],CaptionNSAlignment: [["",""],["\x6e\x6fne",""],["",""],["",""],["","to\x70"],["",""],["",""],["",""],["",""],["",""],["","\x62\x6ftt\x6fm"],["",""]],AlignmentImages: ["\x78\x2egif","\x78\x2egif","x.gi\x66","Ali\x67n\x54opLe\x66t.g\x69f","\x41\x6cignT\x6fpCe\x6eter\x2egi\x66","\x41\x6cig\x6eTop\x52igh\x74.gi\x66","\x41\x6cign\x4didd\x6ceLef\x74.g\x69f","Al\x69g\x6eMidd\x6ceCe\x6eter\x2egi\x66","Align\x4d\x69ddle\x52ig\x68t.gi\x66","\101lign\x42otto\x6dLef\x74.gi\x66","Alig\x6eB\x6fttom\x43ent\x65r.g\x69f","\x41\x6cig\x6eBott\x6fmRi\x67ht.\x67if"],SetTagName:function (tagName){ this.TagName=tagName; this.ActiveAlignmentArray=this.GetLookupTableByTagName(this.TagName); this.OnCellClick(this.NoAlignmentIndex); } ,GetLookupTableByTagName:function (tagName){switch (tagName.toUpperCase( )){case "\x49M\x47":return this.ImgAlignment; case "TAB\x4c\x45":return this.TableAlignment; case "\x54\x44":return this.CellAlignment; case "T\x48":return this.CellAlignment; case "C\x41\x50TION":return (this.IsIE?this.CaptionIEAlignment: this.CaptionNSAlignment); default:return null; }} ,ConfigureAlignmentTable:function (tagName){var table=this.PopupBodyElement; var count=0; for (var i=0; i<table.rows.length; i++){var isRowVisible= false; for (var j=0; j<table.rows[i].cells.length; j++){var cell=table.rows[i].cells[j]; var isCellVisible=this.IsAvailable(count++); cell.style.visibility=isCellVisible?"visib\x6c\x65": "\x68\x69dden"; isRowVisible |= isCellVisible; }if (null!=document.all){table.rows[i].style.display=isRowVisible?"": "none"; }}} ,IsAvailable:function (index){var isVisible= false; if (this.ActiveAlignmentArray){var alignment=this.ActiveAlignmentArray[index]; isVisible=((null!=alignment) && (""!=alignment[0] || ""!=alignment[1])); }return isVisible; } ,SetButtonImage:function (imgFileName){var oElem=this.GetTopElement( ).getElementsByTagName("\x49\x4dG")[0]; oElem.src=this.SkinBasePath+"\x49\x6dg/"+imgFileName; oElem.style.margin="4\x70x"; } ,OnCellClick:function (index){if (index==this.NoAlignmentIndex){ this.SelectedTuple=""; this.SetButtonImage("x.gif"); }else {if (this.ActiveAlignmentArray && 0<=index && index<this.ActiveAlignmentArray.length){ this.SelectedTuple=this.ActiveAlignmentArray[index]; this.SetButtonImage(this.AlignmentImages[index]); if (""!=this.ClientClickString)eval(this.ClientClickString); }}} ,SelectAlignment:function (align,vAlign){align=(""==align || !align)?"\x6e\x6fne":align.toUpperCase( ); vAlign=!vAlign?"":vAlign.toUpperCase( ); if (this.ActiveAlignmentArray){var selIndex=-1; for (i=0; i<this.ActiveAlignmentArray.length; i++){if (this.IsAvailable(i)){var ha=this.ActiveAlignmentArray[i][0].toUpperCase( ); var va=this.ActiveAlignmentArray[i][1].toUpperCase( ); if (-1==selIndex){selIndex=i; }if ((align==ha || align==va) && (vAlign==ha || vAlign==va)){ this.OnCellClick(i); return; }}} this.OnCellClick(selIndex); }} ,SetValue:function (align,vAlign){ this.SelectAlignment(align,vAlign); } ,GetAlign:function ( ){var value=(this.SelectedTuple?this.SelectedTuple[0]: ""); if ("no\x6e\x65"==value){value=""; }return value; } ,GetVAlign:function ( ){var value=(this.SelectedTuple?this.SelectedTuple[1]: ""); if ("none"==value){value=""; }return value; } ,OnBeforeShowPopup:function ( ){if (!this.ItemsCreated){ this.CreateItems( ); this.ItemsCreated= true; } this.ConfigureAlignmentTable(this.TagName); } ,CreateItems:function ( ){var oTable=this.PopupBodyElement; var oRow=null; var curRowItems=0; var arrayLength=this.AlignmentImages.length; for (var i=0; i<arrayLength; i++){if (0==i%this.ItemsPerRow){oRow=oTable.insertRow(-1); curRowItems=0; }curRowItems++; this.AddAlignmentCell(oRow,i); }} ,AddAlignmentCell:function (oRow,index){var oCell=oRow.insertCell(-1); oCell.RadClassOver="Ove\x72"; oCell.RadClassOut=""; oCell.onmouseout=RadEditorNamespace.OnItemMouseOut; oCell.onmouseover=RadEditorNamespace.OnItemMouseOver; var oImg=this.Popup.CreateElement("\x69\x6dg"); oImg.align="\x61\x62sM\x69ddle"; oImg.border="0"; oImg.src=this.SkinBasePath+"\111mg/"+this.AlignmentImages[index]; oCell.appendChild(oImg); this.ConfigureCell(oCell,this,index); return oCell; }} ;

