Ticket #7659: 7659.patch

File 7659.patch, 3.5 KB (added by kaga, 13 years ago)
  • _dev/msajax.js

     
    44*/
    55
    66// The following script is used in CKEditorControl:OnPreRender
     7if (typeof CKEDITOR != 'undefined' && document.getElementById('{0}'))
     8        document.getElementById('{0}').style.visibility = 'hidden';
     9
    710var CKEditor_Controls = [],
    811        CKEditor_Init = [];
    912
     
    1518        }
    1619        else {
    1720                var e = CKEDITOR.instances[cID];
    18                 if (inUpdatePanel)
     21                if (inUpdatePanel) {
    1922                        e.destroy();
     23                        document.getElementById(d).style.visibility = 'hidden';
     24                }
    2025                else
    2126                        e.updateElement();
    2227        }
  • CKEditor.NET/CKEditorControl.cs

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