Re: RTE custom dialog skin

  •  08-22-2013, 1:36 PM

    Re: RTE custom dialog skin

    Hi dfree79,

     

    Has not the event to catch the dialog loaded. The open dialog method is defind in \richtexteditor\scripts\editor.js, maybe you can change the code to match your own requirement.

     

    1. this.ShowXmlDialog=function(url,option)  
    2.     {  
    3.         var dialog;  
    4.           
    5.         if(!option)option={}  
    6.   
    7.         var urlhandler=this.delegate(function(res,err)  
    8.         {  
    9.             if(dialog._jsml_disposed)return;  
    10.               
    11.             if(!res)  
    12.             {  
    13.                 setTimeout(function()  
    14.                 {  
    15.                     if(option.callback)option.callback(res,err);  
    16.                 },1);  
    17.                 dialog.close();  
    18.                 return;  
    19.             }  
    20.               
    21.             dialog.attach_event("closing",function()  
    22.             {  
    23.                 if(option.callback)option.callback(dialog.result);  
    24.             });  
    25.               
    26.             dialog.adjustsize();  
    27.               
    28.             if(option.oncontentload)  
    29.                 option.oncontentload(dialog);  
    30.         });  
    31.         var processinst=this.delegate(function(inst){  
    32.             if(dialog._jsml_disposed)  
    33.                 return;  
    34.             dialog.append_child(inst);  
    35.             inst.invoke_recursive("editor_ready",this);  
    36.         });  
    37.               
    38.         var HandleDialog=this.delegate(function(argdialog)  
    39.         {  
    40.             dialog=argdialog;  
    41.             if(option.ondialogload)  
    42.                 option.ondialogload(dialog);  
    43.             var urlgvars={editor:this,dialog:dialog,option:option};  
    44.             var loadDelay=option.loadDelay||0;  
    45.             if(loadDelay<50)loadDelay=50;  
    46.             this._LoadXmlUrl(url,urlhandler,processinst,urlgvars,option.translator,loadDelay);  
    47.         });  
    48.           
    49.         this._LoadDialog(option,HandleDialog);  
    50.     }  
     

    Regards,

     

    Ken 

View Complete Thread