Type.registerNamespace("Telerik.Web.UI.Editor");
Type.registerNamespace("Telerik.Web.UI.Editor.Modules");
Telerik.Web.UI.Editor.ModulesManager=function(_1){
this._editor=_1;
this._modules=[];
this._onEditorModeChangeDelegate=Function.createDelegate(this,this._onEditorModeChange);
};
Telerik.Web.UI.Editor.ModulesManager.prototype={initialize:function(){
this.createModules();
this._editor.add_modeChange(this._onEditorModeChangeDelegate);
},getModuleByName:function(_2){
for(var i=0;i<this._modules.length;i++){
if(this._modules[i].get_name()==_2){
return this._modules[i];
}
}
return null;
},createModules:function(){
if(!this._editor){
return;
}
var _4=this._editor.get_modulesJSON();
for(var i=0;i<_4.length;i++){
this.createModule(_4[i]);
}
},createModule:function(_6){
if(_6.attributes){
for(var _7 in _6.attributes){
_6[_7.toLowerCase()]=_6.attributes[_7];
}
}
_6["editor"]=this._editor;
var _8=_6["name"];
if(_8){
_6["title"]=this._editor.getLocalizedString(_8);
}
var _9=null;
var _a=null;
try{
_9=eval("Telerik.Web.UI.Editor.Modules."+_8);
}
catch(e){
_a=e;
}
if(!_9){
try{
_9=eval(_8);
}
catch(e){
_a=e;
}
}
if(!_9){
}
if(_9){
var _b=document.createElement("DIV");
var _c=this._getModuleZone(_6["dockingzone"]);
delete _6.dockingzone;
delete _6.dockable;
if(_c){
if(_c.innerHTML=="&nbsp;"){
_c.innerHTML="";
}
_c.appendChild(_b);
}
this._modules[this._modules.length]=$create(_9,_6,null,null,_b);
}
},_getModuleZone:function(_d){
var id=this._editor.get_id();
var _f=$get(id+_d);
if(!_f){
_f=$get(id+"Module");
}
return _f;
},_onEditorModeChange:function(_10,_11){
var _12=Telerik.Web.UI.EditModes;
var _13=_10.get_mode();
this.setModulesVisible((_13==_12.Design));
},setModulesVisible:function(_14){
var _15=this._modules;
if(!this._enabledModules){
this._enabledModules={};
}
for(var i=0;i<_15.length;i++){
var _17=_15[i];
var _18=_17.get_name();
var _19=_14;
if(!_19){
if(_17.get_visible()){
this._enabledModules[_18]=true;
}
}else{
if(this._enabledModules[_18]){
_19=true;
}else{
_19=false;
}
}
_17.set_visible(_19);
}
if(_14){
this._enabledModules=null;
}
},get_modules:function(){
return this._modules;
}};
Telerik.Web.UI.Editor.ModulesManager.registerClass("Telerik.Web.UI.Editor.ModulesManager",null);
Telerik.Web.UI.Editor.Modules.ModuleBase=function(_1a){
Telerik.Web.UI.Editor.Modules.ModuleBase.initializeBase(this,[_1a]);
this._editor=null;
this._name="";
this._visible=true;
this._rendered=false;
this._enableMaxWidth=true;
this._title="";
this._className="rade_module";
this._scriptFile="";
this._attributes={};
this.isSafari=$telerik.isSafari;
this.isIE=$telerik.isIE;
this.isOpera=$telerik.isOpera;
this.isFirefox=$telerik.isFirefox;
};
Telerik.Web.UI.Editor.Modules.ModuleBase.prototype={initialize:function(){
Telerik.Web.UI.Editor.Modules.ModuleBase.callBaseMethod(this,"initialize");
if(this.get_visible()){
this.render();
}
},render:function(){
var _1b=this.get_element();
if(_1b){
_1b.className=this._className;
}
this._rendered=true;
},toggleVisibility:function(){
this.set_visible(!this.get_visible());
},attachEventHandler:function(_1c,_1d){
var _1e=this.get_editor();
if(_1e){
_1e.attachEventHandler(_1c,_1d);
}
},_getLocalizedString:function(_1f,_20){
return this._editor.getLocalizedString(_1f,_20);
},get_editor:function(){
return this._editor;
},set_editor:function(_21){
this._editor=_21;
},get_attributes:function(){
return this._attributes;
},set_attributes:function(_22){
this._attributes=_22;
},get_scriptFile:function(){
return this._scriptFile;
},set_scriptFile:function(_23){
this._scriptFile=_23;
},get_visible:function(){
var _24=this.get_element();
if(!_24){
return false;
}
return (_24.style.display!="none");
},set_visible:function(_25){
if(_25&&!this._rendered){
this.render();
}
var _26=this.get_element();
_26.style.display=_25?"":"none";
},get_title:function(){
return this._title;
},set_title:function(_27){
this._title=_27;
},get_name:function(){
return this._name;
},set_name:function(_28){
this._name=_28;
}};
Telerik.Web.UI.Editor.Modules.ModuleBase.registerClass("Telerik.Web.UI.Editor.Modules.ModuleBase",Sys.UI.Control);
Telerik.Web.UI.Editor.Modules.RadEditorDomInspector=function(_29){
Telerik.Web.UI.Editor.Modules.RadEditorDomInspector.initializeBase(this,[_29]);
};
Telerik.Web.UI.Editor.Modules.RadEditorDomInspector.prototype={initialize:function(){
this._onSelectionChangeDelegate=Function.createDelegate(this,this.showDomPath);
this._editorPathArray=[];
this._removeElementString=this._getLocalizedString("DomInspectorRemoveElement","Remove Element");
Telerik.Web.UI.Editor.Modules.RadEditorDomInspector.callBaseMethod(this,"initialize");
},dispose:function(){
this.clear();
this._registerMouseHandlers(false);
Telerik.Web.UI.Editor.Modules.RadEditorDomInspector.callBaseMethod(this,"dispose");
},render:function(){
Telerik.Web.UI.Editor.Modules.RadEditorDomInspector.callBaseMethod(this,"render");
this.clear();
this.get_editor().add_selectionChange(this._onSelectionChangeDelegate);
this._registerMouseHandlers(true);
this.showDomPath();
},_registerMouseHandlers:function(_2a){
var _2b=this.get_element();
if(true==_2a){
var _2c={click:this._onMouseClick,mouseover:this._onMouseOver,mouseout:this._onMouseOut};
$addHandlers(_2b,_2c,this);
}else{
if(_2b){
$clearHandlers(_2b);
}
}
},_onMouseOver:function(e){
var _2e=this._getReferredEditorElement(e);
if(!_2e||this._isSelectedElement(_2e)){
return;
}
try{
Sys.UI.DomElement.addCssClass(_2e,"RadEDomMouseOver");
}
catch(e){
}
},_onMouseOut:function(e){
var _30=this._getReferredEditorElement(e);
if(!_30){
return;
}
try{
Sys.UI.DomElement.removeCssClass(_30,"RadEDomMouseOver");
if(""==_30.className){
_30.removeAttribute("className",0);
_30.removeAttribute("class",0);
}
}
catch(e){
}
},_onMouseClick:function(e){
var _32=e.target;
if(!_32||_32.tagName!="A"){
return null;
}
if(_32.innerHTML==this._removeElementString){
var _33=this._editorPathArray[0];
this.removeSelectedElement(_33);
}else{
var _33=this._getReferredEditorElement(e);
this.selectElement(_33);
}
return $telerik.cancelRawEvent(e);
},clear:function(){
this.get_element().innerHTML="&nbsp;";
this._editorPathArray=[];
},_createRemoveLink:function(){
var _34=document.createElement("A");
_34.innerHTML=this._removeElementString;
_34.href="javascript:void(0)";
_34.className="rade_module_domlink";
this.get_element().appendChild(_34);
},addDomCouple:function(_35,_36){
if(!_35||!_35.tagName){
return;
}
var _37=this.get_element();
var _38=document.createElement("A");
_38.oncontextmenu=$telerik.cancelRawEvent;
_38.href="javascript:void(0);";
_38.innerHTML=_35.tagName;
_38.className=_36?"rade_module_domlink_selected ":"rade_module_domlink";
_37.appendChild(_38);
var _39=document.createElement("SPAN");
_39.innerHTML="&nbsp;> ";
_37.appendChild(_39);
},_getPathArray:function(_3a,_3b){
var _3c=[];
while(_3a!=_3b&&null!=_3a){
_3c[_3c.length]=_3a;
_3a=_3a.parentNode;
}
return _3c;
},_isSelectedElement:function(_3d){
var _3e=this._editorPathArray;
if(_3e&&_3e[0]==_3d){
return true;
}
},_getReferredEditorElement:function(e){
var _40=e.target;
if(!_40||_40.tagName!="A"){
return null;
}
var _41=this.get_element().getElementsByTagName("A");
var _42=-1;
for(var i=0;i<_41.length;i++){
if(_41[i]==_40){
_42=i;
break;
}
}
if(_42>-1){
var _44=this._editorPathArray.concat([]).reverse();
return _44[_42];
}
},showDomPath:function(){
if(!this.get_visible()){
return;
}
var _45=this.get_editor().getSelectedElement();
if(!_45){
return;
}
var _46=this.get_editor().get_contentArea();
if(this.isIE&&!_46.contains(_45)){
return;
}
this.clear();
this._editorPathArray=this._getPathArray(_45,_46);
var _47=this._editorPathArray;
for(var i=_47.length-1;i>=0;i--){
this.addDomCouple(_47[i],(i==0));
}
if(_47.length>0){
this._createRemoveLink();
}
},selectElement:function(_49){
try{
this._selectedElement=_49;
this.get_editor().selectElement(_49);
this._selectedElement=null;
}
catch(ex){
}
},removeSelectedElement:function(_4a){
try{
if(_4a.tagName=="TD"||_4a.tagName=="TH"){
this.get_editor().fire("DeleteCell");
}else{
if(_4a.tagName=="TR"){
this.get_editor().fire("DeleteRow");
}else{
if(_4a.tagName=="TABLE"||_4a.tagName=="TBODY"||_4a.tagName=="THEAD"||_4a.tagName=="TFOOT"||_4a.tagName=="EMBED"||_4a.tagName=="OBJECT"||_4a.tagName=="INPUT"||_4a.tagName=="IMG"||_4a.tagName=="HR"){
var cmd=new Telerik.Web.UI.Editor.GenericCommand(this._removeElementString,this.get_editor().get_contentWindow());
var _4c=_4a.parentNode;
_4c.removeChild(_4a);
this.get_editor().setFocus();
this.get_editor().executeCommand(cmd);
_4d.select();
this.get_editor().setActive();
this.get_editor().setFocus();
}else{
if(_4a.tagName!="BODY"){
var _4d=this.get_editor().createRestorePoint();
var _4c=_4a.parentNode;
var cmd=new Telerik.Web.UI.Editor.GenericCommand(this._removeElementString,this.get_editor().get_contentWindow());
var _4e="";
for(var i=0;i<_4c.childNodes.length;i++){
if(_4a!=_4c.childNodes[i]){
_4e+=Telerik.Web.UI.Editor.Utils.getOuterHtml(_4c.childNodes[i]);
}else{
_4e+=_4a.innerHTML;
}
}
_4c.innerHTML=_4e;
this.get_editor().setFocus();
this.get_editor().executeCommand(cmd);
_4d.select();
this.get_editor().setActive();
this.get_editor().setFocus();
}
}
}
}
}
catch(ex){
}
this.get_editor().raiseEvent("selectionChange");
}};
Telerik.Web.UI.Editor.Modules.RadEditorDomInspector.registerClass("Telerik.Web.UI.Editor.Modules.RadEditorDomInspector",Telerik.Web.UI.Editor.Modules.ModuleBase);
Telerik.Web.UI.Editor.Modules.RadEditorHtmlInspector=function(_50){
Telerik.Web.UI.Editor.Modules.RadEditorHtmlInspector.initializeBase(this,[_50]);
};
Telerik.Web.UI.Editor.Modules.RadEditorHtmlInspector.prototype={initialize:function(){
this._onSelectionChangedDelegate=Function.createDelegate(this,this._onSelectionChanged);
this._intervalDelegate=Function.createDelegate(this,this.updateEditorContent);
this._textarea=null;
Telerik.Web.UI.Editor.Modules.RadEditorHtmlInspector.callBaseMethod(this,"initialize");
},dispose:function(){
if(this._textarea){
this._textarea.value="";
}
this._clearInterval();
Telerik.Web.UI.Editor.Modules.RadEditorHtmlInspector.callBaseMethod(this,"dispose");
},_clearInterval:function(){
if(this._interval){
window.clearInterval(this._interval);
}
},set_visible:function(_51){
Telerik.Web.UI.Editor.Modules.RadEditorHtmlInspector.callBaseMethod(this,"set_visible",[_51]);
if(_51){
this._interval=window.setInterval(this._intervalDelegate,4000);
this._onSelectionChanged();
}else{
this._clearInterval();
}
},render:function(){
Telerik.Web.UI.Editor.Modules.RadEditorHtmlInspector.callBaseMethod(this,"render");
var _52=document.createElement("TEXTAREA");
_52.style.width="99%";
_52.className="rade_textarea";
_52.setAttribute("rows","10");
_52.setAttribute("cols","80");
this._textarea=_52;
if(!this.isIE){
_52.onclick=new Function("this.focus();");
}
var _53=this.get_element();
_53.appendChild(_52);
this.get_editor().add_selectionChange(this._onSelectionChangedDelegate);
},updateEditorContent:function(){
if(!this.get_visible()){
return;
}
var _54=this._textarea.value;
var _55=this.get_editor().get_document().body.innerHTML;
if(_54==this._oldContent||_54==_55){
return;
}
this._oldContent=_54;
this._updateFlag=true;
this.get_editor().set_html(_54,this._getLocalizedString("Typing"),false);
this._textarea.focus();
},_onSelectionChanged:function(){
if(this._updateFlag){
this._updateFlag=false;
return;
}
this._textarea.value=this.get_editor().get_document().body.innerHTML;
}};
Telerik.Web.UI.Editor.Modules.RadEditorHtmlInspector.registerClass("Telerik.Web.UI.Editor.Modules.RadEditorHtmlInspector",Telerik.Web.UI.Editor.Modules.ModuleBase);
Telerik.Web.UI.Editor.Modules.RadEditorNodeInspector=function(_56){
Telerik.Web.UI.Editor.Modules.RadEditorNodeInspector.initializeBase(this,[_56]);
this._updateMainPanelDelegate=Function.createDelegate(this,this._updateMainPanel);
this._onToolValueSelectedDelegate=Function.createDelegate(this,this._onToolValueSelected);
this._onDropDownBeforeShowDelegate=Function.createDelegate(this,this._onDropDownBeforeShow);
this._tools={};
this._toolNames={};
this._selectedElement=null;
};
Telerik.Web.UI.Editor.Modules.RadEditorNodeInspector.prototype={_nodeAttributesArray:{TABLE:["width","cellSpacing","bgColor","className","SetTableProperties","height","cellPadding","align","border"],TH:["width","bgColor","className","SetCellProperties","height","align","noWrap"],TD:["width","bgColor","className","SetCellProperties","height","align","noWrap"],TR:["width","className","height"],A:["href","className","LinkManager","title","target"],IMG:["width","borderColor","className","SetImageProperties","height","align","border","alt"],INPUT:["NAME","width","height","id","title","value","className"],FORM:["className","width","height","NAME","action","id"],TEXTAREA:["className","width","height","NAME","id","rows","cols"]},_nodeInspectorAttributesArray:[["rows","NAME","width","cellSpacing","align","href","value","className","SetTableProperties","SetCellProperties","LinkManager","SetImageProperties"],["cols","id","height","action","cellPadding","borderColor","bgColor","border","alt","noWrap","title","target"]],initialize:function(){
Telerik.Web.UI.Editor.Modules.RadEditorNodeInspector.callBaseMethod(this,"initialize");
this.get_editor().add_selectionChange(this._updateMainPanelDelegate);
this._invalidValueString=this._getLocalizedString("NodeInspectorInvalidValue","Invalid value. Please enter a number.");
},render:function(){
Telerik.Web.UI.Editor.Modules.RadEditorNodeInspector.callBaseMethod(this,"render");
var _57=this.get_element();
_57.style.height="62px";
},get_skin:function(){
return this._editor.get_skin();
},getNamedCssForSelectedElement:function(_58){
return this.get_editor().getCssArray(_58);
},dispose:function(){
this._tools=[];
this._mainPanel=null;
Telerik.Web.UI.Editor.Modules.RadEditorNodeInspector.callBaseMethod(this,"dispose");
},_createMainPanel:function(){
var _59=this._tools;
var _5a=this._toolNames;
var _5b=this._nodeInspectorAttributesArray;
var _5c=document.createElement("TABLE");
_5c.border=0;
_5c.cellSpacing=0;
_5c.cellPadding=0;
for(var _5d=0;_5d<_5b.length;_5d++){
var _5e=_5b[_5d];
var _5f=_5c.insertRow(-1);
for(var i=0;i<_5e.length;i++){
var _61=_5e[i];
var _62=_5f.insertCell(-1);
_62.style.display="none";
_62.setAttribute("controlName",_61);
_62.innerHTML=this._getLocalizedString(_61,_61)+":";
_62.style.verticalAlign="middle";
_62.align="right";
_62.vAlign="middle";
_62.style.paddingLeft="4px";
_62.style.paddingRight="2px";
_62=_5f.insertCell(-1);
_62.style.display="none";
_62.setAttribute("controlHolder",_61);
var _63=this._getControlByName(_61);
if(_63){
_59[_61]=_63;
var _64=_63.get_element();
if(_64.tagName=="LI"){
var _64=Telerik.Web.UI.EditorButton.createToolWrapper(_63,this.get_skin());
}
_62.appendChild(_64);
}
}
}
return _5c;
},_updateMainPanel:function(){
if(!this.get_visible()){
return;
}
if(!this._isMainCreated){
this._mainPanel=this._createMainPanel();
this._mainPanel.style.display="none";
this.get_element().appendChild(this._mainPanel);
this._isMainCreated=true;
}
var _65=this.get_editor();
var _66=_65.getSelectedElement();
if(!_66||_66.tagName=="BODY"||_66.ownerDocument!=_65.get_document()){
this._mainPanel.style.display="none";
return;
}
if(_66.tagName=="TBODY"&&this.isOpera){
_66=_66.parentNode;
}
var _67=this._nodeAttributesArray[_66.tagName];
if(!_67){
var _68=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_66,"A");
if(!_68){
_68=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_66,"TD");
}
if(!_68){
_68=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_66,"TH");
}
if(_68){
_66=_68;
}else{
this._mainPanel.style.display="none";
return;
}
}
var _69=null;
if(this._selectedElement){
try{
_69=this._selectedElement.tagName;
}
catch(e){
}
}
if(!this._selectedElement||(_69!=_66.tagName)){
var _6a=this.get_editor().get_document();
this._tools["align"].setTagName(_66.tagName);
}
this._selectedElement=_66;
this._updateControlValues(this._selectedElement);
this._mainPanel.style.display="";
},_arrayValueExists:function(_6b,_6c){
return Array.contains(_6c,_6b);
},_issValidAttribValue:function(_6d){
if(null==_6d){
return false;
}
_6d=_6d.trim();
if(""==_6d){
return true;
}
var _6e=parseInt(_6d);
if(isNaN(_6e)){
return false;
}
return true;
},_onDropDownBeforeShow:function(_6f,_70){
var _71=this.get_editor();
var _72=_6f.get_name();
var _73=_6f.get_items();
if(_73&&_73.length>0){
return;
}
var _74=null;
switch(_72){
case "className":
var _75=this._selectedElement;
var _76=_75&&_75.tagName?_75.tagName:"";
_74=_71.getCssArray(_76);
break;
case "target":
_74=[["_blank",this._getLocalizedString("blank","New Window")],["_self",this._getLocalizedString("self","Same Window")],["_parent",this._getLocalizedString("parent","Parent window")],["_top",this._getLocalizedString("top","Top browser window")],["_search",this._getLocalizedString("search","Search pane")],["_media",this._getLocalizedString("media","Media pane")]];
break;
case "bgColor":
case "borderColor":
_74=_71.get_colors();
break;
}
if(_74){
_6f.set_items(_74);
}
},_onToolValueSelected:function(_77,_78){
if(_77){
if(Telerik.Web.UI.EditorDropDown.isInstanceOfType(_77)||Telerik.Web.UI.EditorSpinBox.isInstanceOfType(_77)||Telerik.Web.UI.EditorCheckBox.isInstanceOfType(_77)||Telerik.Web.UI.EditorTextBox.isInstanceOfType(_77)){
this.fire(_77);
}else{
this.get_editor().fire(_77.get_name());
}
}
},executeStyleRuleCommand:function(_79,_7a,_7b,_7c){
var _7d=this.get_editor();
var _7e=new Telerik.Web.UI.Editor.StyleRuleCommand(_7c,_7d.get_contentWindow(),_79,_7a,_7b);
_7d.executeCommand(_7e);
},executeAttributeCommand:function(_7f,_80,_81,_82){
var _83=this.get_editor();
var _84=new Telerik.Web.UI.Editor.AttributeCommand(_82,_83.get_contentWindow(),_7f,_80,_81);
_83.executeCommand(_84);
},_updateControlValues:function(_85){
var _86=this._nodeAttributesArray[_85.tagName];
var _87=this._mainPanel;
var _88=this._tools;
for(var _89=0;_89<_87.rows.length;_89++){
var _8a=_87.rows[_89];
for(var i=0;i<_8a.cells.length;i++){
var _8c=_8a.cells[i];
var _8d=_8c.getAttribute("controlName");
if(_8d){
_8c.style.display=this._arrayValueExists(_8d,_86)?"":"none";
}
var _8e=_8c.getAttribute("controlHolder");
if(_8e){
_8c.style.display=this._arrayValueExists(_8e,_86)?"":"none";
if("none"==_8c.style.display){
continue;
}
var _8f=_88[_8e];
var _90=_85.getAttribute?_85.getAttribute(_8e,2):"";
if(_8e=="noWrap"){
_8f.set_value(_85.noWrap);
}else{
if(_8e=="borderColor"||_8e=="bgColor"){
var _91=_85.style[_8e];
if(!_91){
_91=_85.getAttribute(_8e);
}
_8f.set_color(_91);
}else{
if(_8e=="align"){
_8f.updateValue(_85.getAttribute("align"),_85.getAttribute("vAlign"));
}else{
if(_8e=="target"){
var _91=_85.getAttribute(_8e);
_8f.updateValue(_91);
}else{
if(_8e=="width"||_8e=="height"){
var _91=_85.style[_8e];
if(!_91){
_91=_85.getAttribute(_8e);
}
_8f.set_value(_91);
}else{
if("name"==_8e.toLowerCase()){
_8f.set_value(_85.name);
}else{
if("className"==_8e){
if(!this.isIE){
_90=_85.getAttribute("class");
}
if(!_90){
_90="";
}
_8f.updateValue(_90);
}else{
if(_90&&_8f.set_value){
_8f.set_value(_90);
}else{
if(_8f.set_value){
_8f.set_value("");
}
}
}
}
}
}
}
}
}
}
}
}
},fire:function(_92){
if(!_92){
return;
}
var _93=_92.get_name();
var _94=this.get_editor();
var _95=this._getLocalizedString(_93,_93);
var _96=this._selectedElement;
if("AlignmentSelector"==_93){
var _97=_92.getAlign();
var _98=_92.getVAlign();
this.executeAttributeCommand(_96,"align",_97,_95);
_95=this._getLocalizedString("vAlign","vAlign");
this.executeAttributeCommand(_96,"vAlign",_98,_95);
}else{
if("borderColor"==_93){
var _99=_92.get_selectedItem();
this.executeStyleRuleCommand(this._selectedElement,"borderColor",_99,_95);
}else{
if("width"==_93||"height"==_93){
var _99=_92.get_selectedItem();
if(!this._issValidAttribValue(_99)){
alert(this._invalidValueString);
return;
}
function ConvertIntToPixel(_9a){
var _9b=""+_9a;
if(_9b.indexOf("%")!=-1){
return _9b;
}else{
_9b=parseInt(_9b);
if(!isNaN(_9b)){
_9b=_9b+"px";
return _9b;
}
}
return _9a;
}
_99=ConvertIntToPixel(_99);
if(this._selectedElement.removeAttribute){
this._selectedElement.removeAttribute(_93);
}
this.executeStyleRuleCommand(this._selectedElement,_93,_99,_95);
}else{
var _9c=_93;
var _9d=_92.get_selectedItem();
switch(_93){
case "bgColor":
case "background":
case "className":
case "target":
case "value":
break;
case "noWrap":
if(_9d){
_9d="noWrap";
}else{
_9d="";
}
break;
case "border":
case "cellSpacing":
case "cellPadding":
if(!this._issValidAttribValue(_9d)){
alert(this._invalidValueString);
return;
}
break;
case "NAME":
if(!this.isIE){
_9c="name";
}
}
this.executeAttributeCommand(_96,_9c,_9d,_95);
}
}
}
if(this._selectedElement){
this._updateControlValues(this._selectedElement);
}
},_getControlByName:function(_9e){
var _9f=null;
var _a0={text:this._getLocalizedString(_9e),name:_9e,addClickHandler:true,skin:this.get_skin()};
var _a1={"valueSelected":this._onToolValueSelectedDelegate,"show":this._onDropDownBeforeShowDelegate};
switch(_9e){
case "className":
_a0["text"]=this._getLocalizedString("className");
_9f=Telerik.Web.UI.EditorButton.createTool(_a0,_a1,Telerik.Web.UI.Editor.ApplyClassDropDown);
break;
case "borderColor":
case "bgColor":
_9f=Telerik.Web.UI.EditorButton.createTool(_a0,_a1,Telerik.Web.UI.Editor.ColorPicker);
break;
case "align":
_a0["name"]="AlignmentSelector";
_a0["text"]=this._getLocalizedString("align");
_9f=Telerik.Web.UI.EditorButton.createTool(_a0,_a1,Telerik.Web.UI.Editor.AlignmentSelector);
break;
case "SetCellProperties":
case "SetTableProperties":
case "SetImageProperties":
case "LinkManager":
delete _a1.show;
_9f=Telerik.Web.UI.EditorButton.createTool(_a0,_a1);
break;
case "target":
_a0["sizetofit"]=true;
_9f=Telerik.Web.UI.EditorButton.createTool(_a0,_a1,Telerik.Web.UI.EditorUpdateableDropDown);
break;
case "noWrap":
delete _a1.show;
_9f=Telerik.Web.UI.EditorButton.createTool(_a0,_a1,Telerik.Web.UI.EditorCheckBox,document.createElement("span"));
break;
case "width":
case "height":
case "cellPadding":
case "cellSpacing":
case "rows":
case "cols":
case "border":
delete _a1.show;
_9f=Telerik.Web.UI.EditorButton.createTool(_a0,_a1,Telerik.Web.UI.EditorSpinBox,document.createElement("span"));
break;
default:
delete _a1.show;
if(_9e=="href"){
_a0["width"]="170px";
}
_9f=Telerik.Web.UI.EditorButton.createTool(_a0,_a1,Telerik.Web.UI.EditorTextBox,document.createElement("span"));
}
return _9f;
}};
Telerik.Web.UI.Editor.Modules.RadEditorNodeInspector.registerClass("Telerik.Web.UI.Editor.Modules.RadEditorNodeInspector",Telerik.Web.UI.Editor.Modules.ModuleBase);
Telerik.Web.UI.Editor.Modules.RadEditorStatistics=function(_a2){
Telerik.Web.UI.Editor.Modules.RadEditorStatistics.initializeBase(this,[_a2]);
};
Telerik.Web.UI.Editor.Modules.RadEditorStatistics.prototype={initialize:function(){
this._enableMaxWidth=false;
this._wordsString=this._getLocalizedString("StatisticsWords","Words:");
this._charactersString=this._getLocalizedString("StatisticsCharacters","Characters:");
this._onDoCountDelegate=Function.createDelegate(this,this.doCount);
Telerik.Web.UI.Editor.Modules.RadEditorStatistics.callBaseMethod(this,"initialize");
},render:function(){
Telerik.Web.UI.Editor.Modules.RadEditorStatistics.callBaseMethod(this,"render");
this.get_editor().add_selectionChange(this._onDoCountDelegate);
this.doCount();
},doCount:function(){
if(!this.get_visible()){
return;
}
var _a3=this.get_editor().get_text();
var _a4=0;
var _a5=0;
if(_a3){
var _a6=/[!\.?;,:&_\-\�\{\}\[\]\(\)~#'"]/g;
_a3=_a3.replace(_a6,"");
var _a7=/(^\s+)|(\s+$)/g;
_a3=_a3.replace(_a7,"");
if(_a3){
splitRegX=/\s+/;
var _a8=_a3.split(splitRegX);
_a4=_a8.length;
var _a9=/(\r\n)+/g;
_a3=_a3.replace(_a9,"");
_a5=_a3.length;
}
}
var _aa=this.get_element();
_aa.innerHTML="<span style='line-height:22px'>"+this._wordsString+" "+_a4+" "+this._charactersString+" "+_a5+"&nbsp;</span>";
}};
Telerik.Web.UI.Editor.Modules.RadEditorStatistics.registerClass("Telerik.Web.UI.Editor.Modules.RadEditorStatistics",Telerik.Web.UI.Editor.Modules.ModuleBase);

