Ticket #8089: 8089_update.patch

File 8089_update.patch, 3.7 KB (added by kaga, 13 years ago)
  • _dev/msajax.js

     
    1616        }
    1717        else {
    1818                var e = CKEDITOR.instances[cID];
    19                 if (inUpdatePanel && Page_IsValid) {
     19                if (inUpdatePanel && (typeof Page_IsValid == 'undefined' || Page_IsValid))
     20                {
    2021                        e.destroy();
    2122                        control = document.getElementById(cID);
    2223                        if (control)
  • CKEditor.NET/CKEditorControl.cs

     
    10321032                        // Sys.Application.add_load does not work on browsers != IE
    10331033                        // http://msdn.microsoft.com/en-us/library/bb386417.aspx
    10341034                        // Check _dev/msajax.js for an uncompressed version (available in CKEditor.Net downloaded from SVN).
    1035                         scriptInit += @"var CKEditor_Controls=[],CKEditor_Init=[];function CKEditor_TextBoxEncode(d,e){var f;if(typeof CKEDITOR=='undefined'||typeof CKEDITOR.instances[d]=='undefined'){f=document.getElementById(d);if(f)f.value=f.value.replace(/</g,'&lt;').replace(/>/g,'&gt;');}else{var g=CKEDITOR.instances[d];if(e && Page_IsValid){g.destroy();f=document.getElementById(d);if(f)f.style.visibility='hidden';}else g.updateElement();}};(function(){if(typeof CKEDITOR!='undefined'){var d=document.getElementById('" + this.ClientID + @"');if(d)d.style.visibility='hidden';}var e=function(){var f=CKEditor_Controls,g=CKEditor_Init,h=window.pageLoad,i=function(){for(var j=f.length;j--;){var k=document.getElementById(f[j]);if(k&&k.value&&(k.value.indexOf('<')==-1||k.value.indexOf('>')==-1))k.value=k.value.replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&amp;/g,'&');}if(typeof CKEDITOR!='undefined')for(var j=0;j<g.length;j++)g[j].call(this);};window.pageLoad=function(j,k){if(k.get_isPartialLoad())setTimeout(i,0);if(h&&typeof h=='function')h.call(this,j,k);};setTimeout(i,0);};if(typeof Sys != 'undefined' && typeof Sys.Application != 'undefined') Sys.Application.add_load(e); if(window.addEventListener)window.addEventListener('load',e,false);else if(window.attachEvent)window.attachEvent('onload',e);})();";
     1035                        scriptInit += @"var CKEditor_Controls=[],CKEditor_Init=[];function CKEditor_TextBoxEncode(d,e){var f;if(typeof CKEDITOR=='undefined'||typeof CKEDITOR.instances[d]=='undefined'){f=document.getElementById(d);if(f)f.value=f.value.replace(/</g,'&lt;').replace(/>/g,'&gt;');}else{var g=CKEDITOR.instances[d];if(e && (typeof Page_IsValid=='undefined' || Page_IsValid)){g.destroy();f=document.getElementById(d);if(f)f.style.visibility='hidden';}else g.updateElement();}};(function(){if(typeof CKEDITOR!='undefined'){var d=document.getElementById('" + this.ClientID + @"');if(d)d.style.visibility='hidden';}var e=function(){var f=CKEditor_Controls,g=CKEditor_Init,h=window.pageLoad,i=function(){for(var j=f.length;j--;){var k=document.getElementById(f[j]);if(k&&k.value&&(k.value.indexOf('<')==-1||k.value.indexOf('>')==-1))k.value=k.value.replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&amp;/g,'&');}if(typeof CKEDITOR!='undefined')for(var j=0;j<g.length;j++)g[j].call(this);};window.pageLoad=function(j,k){if(k.get_isPartialLoad())setTimeout(i,0);if(h&&typeof h=='function')h.call(this,j,k);};setTimeout(i,0);};if(typeof Sys != 'undefined' && typeof Sys.Application != 'undefined') Sys.Application.add_load(e); if(window.addEventListener)window.addEventListener('load',e,false);else if(window.attachEvent)window.attachEvent('onload',e);})();";
    10361036                        this.RegisterStartupScript(this.GetType(), "CKEditorForNet", scriptInit, true);
    10371037                        this.RegisterStartupScript(this.GetType(), this.ClientID + @"_addControl", string.Format(@"CKEditor_Controls.push('{0}');
    10381038", this.ClientID), true);
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy