Ticket #7851: 7851.patch
File 7851.patch, 2.4 KB (added by , 12 years ago) |
---|
-
CKEditorControl.cs
1035 1035 this.RegisterStartupScript(this.GetType(), this.ClientID + @"_addControl", string.Format(@"CKEditor_Controls.push('{0}'); 1036 1036 ", this.ClientID), true); 1037 1037 string script = string.Empty; 1038 string doPostBackScript = string.Empty; 1039 if (this.AutoPostBack) doPostBackScript = string.Format(@"ckeditor.on('blur', function() {{if(this.checkDirty()){{javascript:setTimeout('__doPostBack(\'{0}\',\'\')',0); }}}});", this.ClientID); 1038 1040 if (this.config.CKEditorEventHandler != null) 1039 1041 foreach (object[] item in this.config.CKEditorEventHandler) 1040 1042 { … … 1047 1049 foreach (string item in this.config.protectedSource) 1048 1050 proSour += @" 1049 1051 ckeditor.config.protectedSource.push( " + item + " );"; 1050 script += string.Format(@"CKEditor_Init.push(function(){{if(typeof CKEDITOR.instances['{0}']!='undefined' || !document.getElementById('{0}')) return;var ckeditor = CKEDITOR.replace('{0}',{1}); {2} }});1051 ", this.ClientID, prepareJSON(), proSour );1052 script += string.Format(@"CKEditor_Init.push(function(){{if(typeof CKEDITOR.instances['{0}']!='undefined' || !document.getElementById('{0}')) return;var ckeditor = CKEDITOR.replace('{0}',{1}); {2} {3}}}); 1053 ", this.ClientID, prepareJSON(), proSour, doPostBackScript); 1052 1054 } 1053 1055 else 1054 script += string.Format(@"CKEditor_Init.push(function(){{if(typeof CKEDITOR.instances['{0}']!='undefined' || !document.getElementById('{0}')) return;CKEDITOR.replace('{0}',{1});}}); 1055 ", this.ClientID, prepareJSON()); 1056 1056 script += string.Format(@"CKEditor_Init.push(function(){{if(typeof CKEDITOR.instances['{0}']!='undefined' || !document.getElementById('{0}')) return;var ckeditor = CKEDITOR.replace('{0}',{1}); {2}}}); 1057 ", this.ClientID, prepareJSON(), doPostBackScript); 1057 1058 bool isInUpdatePanel = false; 1058 1059 Control con = this.Parent; 1059 1060 if (updatePanel != null) … … 1068 1069 } 1069 1070 this.RegisterOnSubmitStatement(this.GetType(), "aspintegrator_Postback" + this.ClientID, string.Format("CKEditor_TextBoxEncode('{0}', {1}); ", this.ClientID, isInUpdatePanel ? 1 : 0)); 1070 1071 this.RegisterStartupScript(this.GetType(), "aspintegratorInitial_" + this.ClientID, script, true); 1072 this.RegisterStartupScript(this.GetType(), "aspintegratorAutoPostBack_" + this.ClientID, script, true); 1071 1073 } 1072 1074 1073 1075 #endregion