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(_1){
Telerik.Web.UI.Editor.Modules.RadEditorDomInspector.initializeBase(this,[_1]);
};
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(_2){
var _3=this.get_element();
if(true==_2){
var _4={click:this._onMouseClick,mouseover:this._onMouseOver,mouseout:this._onMouseOut};
$addHandlers(_3,_4,this);
}else{
if(_3){
$clearHandlers(_3);
}
}
},_onMouseOver:function(e){
var _6=this._getReferredEditorElement(e);
if(!_6||this._isSelectedElement(_6)){
return;
}
try{
Sys.UI.DomElement.addCssClass(_6,"RadEDomMouseOver");
}
catch(e){
}
},_onMouseOut:function(e){
var _8=this._getReferredEditorElement(e);
if(!_8){
return;
}
try{
Sys.UI.DomElement.removeCssClass(_8,"RadEDomMouseOver");
if(""==_8.className){
_8.removeAttribute("className",0);
_8.removeAttribute("class",0);
}
}
catch(e){
}
},_onMouseClick:function(e){
var _a=e.target;
if(!_a||_a.tagName!="A"){
return null;
}
if(_a.innerHTML==this._removeElementString){
var _b=this._editorPathArray[0];
this.removeSelectedElement(_b);
}else{
var _b=this._getReferredEditorElement(e);
this.selectElement(_b);
}
return $telerik.cancelRawEvent(e);
},clear:function(){
this.get_element().innerHTML="&nbsp;";
this._editorPathArray=[];
},_createRemoveLink:function(){
var _c=document.createElement("A");
_c.innerHTML=this._removeElementString;
_c.href="javascript:void(0)";
_c.className="rade_module_domlink";
this.get_element().appendChild(_c);
},addDomCouple:function(_d,_e){
if(!_d||!_d.tagName){
return;
}
var _f=this.get_element();
var _10=document.createElement("A");
_10.oncontextmenu=$telerik.cancelRawEvent;
_10.href="javascript:void(0);";
_10.innerHTML=_d.tagName;
_10.className=_e?"rade_module_domlink_selected ":"rade_module_domlink";
_f.appendChild(_10);
var _11=document.createElement("SPAN");
_11.innerHTML="&nbsp;> ";
_f.appendChild(_11);
},_getPathArray:function(_12,_13){
var _14=[];
while(_12!=_13&&null!=_12){
_14[_14.length]=_12;
_12=_12.parentNode;
}
return _14;
},_isSelectedElement:function(_15){
var _16=this._editorPathArray;
if(_16&&_16[0]==_15){
return true;
}
},_getReferredEditorElement:function(e){
var _18=e.target;
if(!_18||_18.tagName!="A"){
return null;
}
var _19=this.get_element().getElementsByTagName("A");
var _1a=-1;
for(var i=0;i<_19.length;i++){
if(_19[i]==_18){
_1a=i;
break;
}
}
if(_1a>-1){
var _1c=this._editorPathArray.concat([]).reverse();
return _1c[_1a];
}
},showDomPath:function(){
if(!this.get_visible()){
return;
}
var _1d=this.get_editor().getSelectedElement();
if(!_1d){
return;
}
var _1e=this.get_editor().get_contentArea();
if(this.isIE&&!_1e.contains(_1d)){
return;
}
this.clear();
this._editorPathArray=this._getPathArray(_1d,_1e);
var _1f=this._editorPathArray;
for(var i=_1f.length-1;i>=0;i--){
this.addDomCouple(_1f[i],(i==0));
}
if(_1f.length>0){
this._createRemoveLink();
}
},selectElement:function(_21){
try{
this._selectedElement=_21;
this.get_editor().selectElement(_21);
this._selectedElement=null;
}
catch(ex){
}
},removeSelectedElement:function(_22){
try{
if(_22.tagName=="TD"||_22.tagName=="TH"){
this.get_editor().fire("DeleteCell");
}else{
if(_22.tagName=="TR"){
this.get_editor().fire("DeleteRow");
}else{
if(_22.tagName=="TABLE"||_22.tagName=="TBODY"||_22.tagName=="THEAD"||_22.tagName=="TFOOT"||_22.tagName=="EMBED"||_22.tagName=="OBJECT"||_22.tagName=="INPUT"||_22.tagName=="IMG"||_22.tagName=="HR"){
var cmd=new Telerik.Web.UI.Editor.GenericCommand(this._removeElementString,this.get_editor().get_contentWindow());
var _24=_22.parentNode;
_24.removeChild(_22);
this.get_editor().setFocus();
this.get_editor().executeCommand(cmd);
_25.select();
this.get_editor().setActive();
this.get_editor().setFocus();
}else{
if(_22.tagName!="BODY"){
var _25=this.get_editor().createRestorePoint();
var _24=_22.parentNode;
var cmd=new Telerik.Web.UI.Editor.GenericCommand(this._removeElementString,this.get_editor().get_contentWindow());
var _26="";
for(var i=0;i<_24.childNodes.length;i++){
if(_22!=_24.childNodes[i]){
_26+=Telerik.Web.UI.Editor.Utils.getOuterHtml(_24.childNodes[i]);
}else{
_26+=_22.innerHTML;
}
}
_24.innerHTML=_26;
this.get_editor().setFocus();
this.get_editor().executeCommand(cmd);
_25.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(_1){
Telerik.Web.UI.Editor.Modules.RadEditorHtmlInspector.initializeBase(this,[_1]);
};
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(_2){
Telerik.Web.UI.Editor.Modules.RadEditorHtmlInspector.callBaseMethod(this,"set_visible",[_2]);
if(_2){
this._interval=window.setInterval(this._intervalDelegate,4000);
this._onSelectionChanged();
}else{
this._clearInterval();
}
},render:function(){
Telerik.Web.UI.Editor.Modules.RadEditorHtmlInspector.callBaseMethod(this,"render");
var _3=document.createElement("TEXTAREA");
_3.style.width="99%";
_3.className="rade_textarea";
_3.setAttribute("rows","10");
_3.setAttribute("cols","80");
this._textarea=_3;
if(!this.isIE){
_3.onclick=new Function("this.focus();");
}
var _4=this.get_element();
_4.appendChild(_3);
this.get_editor().add_selectionChange(this._onSelectionChangedDelegate);
},updateEditorContent:function(){
if(!this.get_visible()){
return;
}
var _5=this._textarea.value;
var _6=this.get_editor().get_document().body.innerHTML;
if(_5==this._oldContent||_5==_6){
return;
}
this._oldContent=_5;
this._updateFlag=true;
this.get_editor().set_html(_5,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(_1){
Telerik.Web.UI.Editor.Modules.RadEditorNodeInspector.initializeBase(this,[_1]);
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 _2=this.get_element();
_2.style.height="62px";
},get_skin:function(){
return this._editor.get_skin();
},getNamedCssForSelectedElement:function(_3){
return this.get_editor().getCssArray(_3);
},dispose:function(){
this._tools=[];
this._mainPanel=null;
Telerik.Web.UI.Editor.Modules.RadEditorNodeInspector.callBaseMethod(this,"dispose");
},_createMainPanel:function(){
var _4=this._tools;
var _5=this._toolNames;
var _6=this._nodeInspectorAttributesArray;
var _7=document.createElement("TABLE");
_7.border=0;
_7.cellSpacing=0;
_7.cellPadding=0;
for(var _8=0;_8<_6.length;_8++){
var _9=_6[_8];
var _a=_7.insertRow(-1);
for(var i=0;i<_9.length;i++){
var _c=_9[i];
var _d=_a.insertCell(-1);
_d.style.display="none";
_d.setAttribute("controlName",_c);
_d.innerHTML=this._getLocalizedString(_c,_c)+":";
_d.style.verticalAlign="middle";
_d.align="right";
_d.vAlign="middle";
_d.style.paddingLeft="4px";
_d.style.paddingRight="2px";
_d=_a.insertCell(-1);
_d.style.display="none";
_d.setAttribute("controlHolder",_c);
var _e=this._getControlByName(_c);
if(_e){
_4[_c]=_e;
var _f=_e.get_element();
if(_f.tagName=="LI"){
var _f=Telerik.Web.UI.EditorButton.createToolWrapper(_e,this.get_skin());
}
_d.appendChild(_f);
}
}
}
return _7;
},_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 _10=this.get_editor();
var _11=_10.getSelectedElement();
if(!_11||_11.tagName=="BODY"||_11.ownerDocument!=_10.get_document()){
this._mainPanel.style.display="none";
return;
}
if(_11.tagName=="TBODY"&&this.isOpera){
_11=_11.parentNode;
}
var _12=this._nodeAttributesArray[_11.tagName];
if(!_12){
var _13=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_11,"A");
if(!_13){
_13=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_11,"TD");
}
if(!_13){
_13=Telerik.Web.UI.Editor.Utils.getElementParentByTag(_11,"TH");
}
if(_13){
_11=_13;
}else{
this._mainPanel.style.display="none";
return;
}
}
var _14=null;
if(this._selectedElement){
try{
_14=this._selectedElement.tagName;
}
catch(e){
}
}
if(!this._selectedElement||(_14!=_11.tagName)){
var _15=this.get_editor().get_document();
this._tools["align"].setTagName(_11.tagName);
}
this._selectedElement=_11;
this._updateControlValues(this._selectedElement);
this._mainPanel.style.display="";
},_arrayValueExists:function(_16,_17){
return Array.contains(_17,_16);
},_issValidAttribValue:function(_18){
if(null==_18){
return false;
}
_18=_18.trim();
if(""==_18){
return true;
}
var _19=parseInt(_18);
if(isNaN(_19)){
return false;
}
return true;
},_onDropDownBeforeShow:function(_1a,_1b){
var _1c=this.get_editor();
var _1d=_1a.get_name();
var _1e=_1a.get_items();
if(_1e&&_1e.length>0){
return;
}
var _1f=null;
switch(_1d){
case "className":
var _20=this._selectedElement;
var _21=_20&&_20.tagName?_20.tagName:"";
_1f=_1c.getCssArray(_21);
break;
case "target":
_1f=[["_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":
_1f=_1c.get_colors();
break;
}
if(_1f){
_1a.set_items(_1f);
}
},_onToolValueSelected:function(_22,_23){
if(_22){
if(Telerik.Web.UI.EditorDropDown.isInstanceOfType(_22)||Telerik.Web.UI.EditorSpinBox.isInstanceOfType(_22)||Telerik.Web.UI.EditorCheckBox.isInstanceOfType(_22)||Telerik.Web.UI.EditorTextBox.isInstanceOfType(_22)){
this.fire(_22);
}else{
this.get_editor().fire(_22.get_name());
}
}
},executeStyleRuleCommand:function(_24,_25,_26,_27){
var _28=this.get_editor();
var _29=new Telerik.Web.UI.Editor.StyleRuleCommand(_27,_28.get_contentWindow(),_24,_25,_26);
_28.executeCommand(_29);
},executeAttributeCommand:function(_2a,_2b,_2c,_2d){
var _2e=this.get_editor();
var _2f=new Telerik.Web.UI.Editor.AttributeCommand(_2d,_2e.get_contentWindow(),_2a,_2b,_2c);
_2e.executeCommand(_2f);
},_updateControlValues:function(_30){
var _31=this._nodeAttributesArray[_30.tagName];
var _32=this._mainPanel;
var _33=this._tools;
for(var _34=0;_34<_32.rows.length;_34++){
var _35=_32.rows[_34];
for(var i=0;i<_35.cells.length;i++){
var _37=_35.cells[i];
var _38=_37.getAttribute("controlName");
if(_38){
_37.style.display=this._arrayValueExists(_38,_31)?"":"none";
}
var _39=_37.getAttribute("controlHolder");
if(_39){
_37.style.display=this._arrayValueExists(_39,_31)?"":"none";
if("none"==_37.style.display){
continue;
}
var _3a=_33[_39];
var _3b=_30.getAttribute?_30.getAttribute(_39,2):"";
if(_39=="noWrap"){
_3a.set_value(_30.noWrap);
}else{
if(_39=="borderColor"||_39=="bgColor"){
var _3c=_30.style[_39];
if(!_3c){
_3c=_30.getAttribute(_39);
}
_3a.set_color(_3c);
}else{
if(_39=="align"){
_3a.updateValue(_30.getAttribute("align"),_30.getAttribute("vAlign"));
}else{
if(_39=="target"){
var _3c=_30.getAttribute(_39);
_3a.updateValue(_3c);
}else{
if(_39=="width"||_39=="height"){
var _3c=_30.style[_39];
if(!_3c){
_3c=_30.getAttribute(_39);
}
_3a.set_value(_3c);
}else{
if("name"==_39.toLowerCase()){
_3a.set_value(_30.name);
}else{
if("className"==_39){
if(!this.isIE){
_3b=_30.getAttribute("class");
}
if(!_3b){
_3b="";
}
_3a.updateValue(_3b);
}else{
if(_3b&&_3a.set_value){
_3a.set_value(_3b);
}else{
if(_3a.set_value){
_3a.set_value("");
}
}
}
}
}
}
}
}
}
}
}
}
},fire:function(_3d){
if(!_3d){
return;
}
var _3e=_3d.get_name();
var _3f=this.get_editor();
var _40=this._getLocalizedString(_3e,_3e);
var _41=this._selectedElement;
if("AlignmentSelector"==_3e){
var _42=_3d.getAlign();
var _43=_3d.getVAlign();
this.executeAttributeCommand(_41,"align",_42,_40);
_40=this._getLocalizedString("vAlign","vAlign");
this.executeAttributeCommand(_41,"vAlign",_43,_40);
}else{
if("borderColor"==_3e){
var _44=_3d.get_selectedItem();
this.executeStyleRuleCommand(this._selectedElement,"borderColor",_44,_40);
}else{
if("width"==_3e||"height"==_3e){
var _44=_3d.get_selectedItem();
if(!this._issValidAttribValue(_44)){
alert(this._invalidValueString);
return;
}
function ConvertIntToPixel(_45){
var _46=""+_45;
if(_46.indexOf("%")!=-1){
return _46;
}else{
_46=parseInt(_46);
if(!isNaN(_46)){
_46=_46+"px";
return _46;
}
}
return _45;
}
_44=ConvertIntToPixel(_44);
if(this._selectedElement.removeAttribute){
this._selectedElement.removeAttribute(_3e);
}
this.executeStyleRuleCommand(this._selectedElement,_3e,_44,_40);
}else{
var _47=_3e;
var _48=_3d.get_selectedItem();
switch(_3e){
case "bgColor":
case "background":
case "className":
case "target":
case "value":
break;
case "noWrap":
if(_48){
_48="noWrap";
}else{
_48="";
}
break;
case "border":
case "cellSpacing":
case "cellPadding":
if(!this._issValidAttribValue(_48)){
alert(this._invalidValueString);
return;
}
break;
case "NAME":
if(!this.isIE){
_47="name";
}
}
this.executeAttributeCommand(_41,_47,_48,_40);
}
}
}
if(this._selectedElement){
this._updateControlValues(this._selectedElement);
}
},_getControlByName:function(_49){
var _4a=null;
var _4b={text:this._getLocalizedString(_49),name:_49,addClickHandler:true,skin:this.get_skin()};
var _4c={"valueSelected":this._onToolValueSelectedDelegate,"show":this._onDropDownBeforeShowDelegate};
switch(_49){
case "className":
_4b["text"]=this._getLocalizedString("className");
_4a=Telerik.Web.UI.EditorButton.createTool(_4b,_4c,Telerik.Web.UI.Editor.ApplyClassDropDown);
break;
case "borderColor":
case "bgColor":
_4a=Telerik.Web.UI.EditorButton.createTool(_4b,_4c,Telerik.Web.UI.Editor.ColorPicker);
break;
case "align":
_4b["name"]="AlignmentSelector";
_4b["text"]=this._getLocalizedString("align");
_4a=Telerik.Web.UI.EditorButton.createTool(_4b,_4c,Telerik.Web.UI.Editor.AlignmentSelector);
break;
case "SetCellProperties":
case "SetTableProperties":
case "SetImageProperties":
case "LinkManager":
delete _4c.show;
_4a=Telerik.Web.UI.EditorButton.createTool(_4b,_4c);
break;
case "target":
_4b["sizetofit"]=true;
_4a=Telerik.Web.UI.EditorButton.createTool(_4b,_4c,Telerik.Web.UI.EditorUpdateableDropDown);
break;
case "noWrap":
delete _4c.show;
_4a=Telerik.Web.UI.EditorButton.createTool(_4b,_4c,Telerik.Web.UI.EditorCheckBox,document.createElement("span"));
break;
case "width":
case "height":
case "cellPadding":
case "cellSpacing":
case "rows":
case "cols":
case "border":
delete _4c.show;
_4a=Telerik.Web.UI.EditorButton.createTool(_4b,_4c,Telerik.Web.UI.EditorSpinBox,document.createElement("span"));
break;
default:
delete _4c.show;
if(_49=="href"){
_4b["width"]="170px";
}
_4a=Telerik.Web.UI.EditorButton.createTool(_4b,_4c,Telerik.Web.UI.EditorTextBox,document.createElement("span"));
}
return _4a;
}};
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(_1){
Telerik.Web.UI.Editor.Modules.RadEditorStatistics.initializeBase(this,[_1]);
};
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 _2=this.get_editor().get_text();
var _3=0;
var _4=0;
if(_2){
var _5=/[!\.?;,:&_\-\�\{\}\[\]\(\)~#'"]/g;
_2=_2.replace(_5,"");
var _6=/(^\s+)|(\s+$)/g;
_2=_2.replace(_6,"");
if(_2){
splitRegX=/\s+/;
var _7=_2.split(splitRegX);
_3=_7.length;
var _8=/(\r\n)+/g;
_2=_2.replace(_8,"");
_4=_2.length;
}
}
var _9=this.get_element();
_9.innerHTML="<span style='line-height:22px'>"+this._wordsString+" "+_3+" "+this._charactersString+" "+_4+"&nbsp;</span>";
}};
Telerik.Web.UI.Editor.Modules.RadEditorStatistics.registerClass("Telerik.Web.UI.Editor.Modules.RadEditorStatistics",Telerik.Web.UI.Editor.Modules.ModuleBase);;