First off, let me thank you for the great job you are doing with the MVC extensions, they are wonderful. I love the improvements you added in Q3.
I noticed this weird behavior with the editor recently. I have a page with a form and multiple editors (>5). The form itself is within a partial page, and the partial page loads the several custom javascript files it requires via the telerik script registrar. Everything works good until I submit the form via Ajax and the partial page is reloaded. Then the browser starts reloading all the custom javascript files, as many times as I have editors on the page. So, if I have 6 editors on the page, and 4 javascript files, I end up with 24 calls to the server to reload all the files!
I noticed the following code in the ajax response, which seems to be the culprit:
if(!jQuery.telerik){ jQuery.ajax({ url:"/Scripts/2011.3.1115/telerik.common.min.js", dataType:"script", cache:false, success:function(){ jQuery.telerik.load(["/Scripts/2011.3.1115/jquery-1.6.4.min.js","/Scripts/jquery.dirtyform.js","/Scripts/jquery.blockUI.js","/Scripts/Custom/jquery.waitForValidResult.js","/Scripts/Custom/Common.js","/Scripts/Custom/FormDirty.js","/Scripts/Custom/Form.js","/Scripts/Custom/HtmlEditor.js","/Scripts/2011.3.1115/telerik.common.min.js","/Scripts/2011.3.1115/telerik.list.min.js","/Scripts/2011.3.1115/telerik.combobox.min.js","/Scripts/2011.3.1115/telerik.draganddrop.min.js","/Scripts/2011.3.1115/telerik.window.min.js","/Scripts/2011.3.1115/telerik.editor.min.js"],function(){ jQuery('#GeneralDataSection_DefaultLocalizedData_ShortDescription').tEditor({style:[{"Text":"No Style","Value":""},{"Text":"Category - Disclaimer","Value":"disclaimer-category"}], fileBrowser:{}, stylesheets:["/Content/puritan.css"], localization:{"bold":"Bold","createLink":"Insert hyperlink","deleteFile":"Are you sure you want to delete \"{0}\"?","directoryNotFound":"A directory with this name was not found.","emptyFolder":"Empty Folder","fontName":"Select font family","fontNameInherit":"(inherited font)","fontSize":"Select font size","fontSizeInherit":"(inherited size)","formatBlock":"Select block type","indent":"Indent","insertHtml":"Insert HTML","insertImage":"Insert image","insertOrderedList":"Insert ordered list","insertUnorderedList":"Insert unordered list","invalidFileType":"The selected file \\\"{0}\\\" is not valid. Supported file types are {1}.","italic":"Italic","justifyCenter":"Center text","justifyFull":"Justify","justifyLeft":"Align text left","justifyRight":"Align text right","orderBy":"Arrange by:","orderByName":"Name","orderBySize":"Size","outdent":"Outdent","overwriteFile":"\u0027A file with name \"{0}\" already exists in the current directory. Do you want to overwrite it?","strikethrough":"Strikethrough","style":"Styles","underline":"Underline","unlink":"Remove hyperlink","uploadFile":"Upload"}}); }); }});}else{ jQuery.telerik.load(["/Scripts/2011.3.1115/jquery-1.6.4.min.js","/Scripts/jquery.dirtyform.js","/Scripts/jquery.blockUI.js","/Scripts/Custom/jquery.waitForValidResult.js","/Scripts/Custom/Common.js","/Scripts/Custom/FormDirty.js","/Scripts/Custom/Form.js","/Scripts/Custom/HtmlEditor.js","/Scripts/2011.3.1115/telerik.common.min.js","/Scripts/2011.3.1115/telerik.list.min.js","/Scripts/2011.3.1115/telerik.combobox.min.js","/Scripts/2011.3.1115/telerik.draganddrop.min.js","/Scripts/2011.3.1115/telerik.window.min.js","/Scripts/2011.3.1115/telerik.editor.min.js"],function(){ jQuery('#GeneralDataSection_DefaultLocalizedData_ShortDescription').tEditor({style:[{"Text":"No Style","Value":""},{"Text":"Category - Disclaimer","Value":"disclaimer-category"}], fileBrowser:{}, stylesheets:["/Content/puritan.css"], localization:{"bold":"Bold","createLink":"Insert hyperlink","deleteFile":"Are you sure you want to delete \"{0}\"?","directoryNotFound":"A directory with this name was not found.","emptyFolder":"Empty Folder","fontName":"Select font family","fontNameInherit":"(inherited font)","fontSize":"Select font size","fontSizeInherit":"(inherited size)","formatBlock":"Select block type","indent":"Indent","insertHtml":"Insert HTML","insertImage":"Insert image","insertOrderedList":"Insert ordered list","insertUnorderedList":"Insert unordered list","invalidFileType":"The selected file \\\"{0}\\\" is not valid. Supported file types are {1}.","italic":"Italic","justifyCenter":"Center text","justifyFull":"Justify","justifyLeft":"Align text left","justifyRight":"Align text right","orderBy":"Arrange by:","orderByName":"Name","orderBySize":"Size","outdent":"Outdent","overwriteFile":"\u0027A file with name \"{0}\" already exists in the current directory. Do you want to overwrite it?","strikethrough":"Strikethrough","style":"Styles","underline":"Underline","unlink":"Remove hyperlink","uploadFile":"Upload"}}); }); }Note that the only files that are loaded seem to be the non-telerik ones. I am guessing the js files might be destined to be loaded within the iframe, but I don't actually need them in there. Is there a way I can disable the loading of these files?
I tried using .ScriptFileNames("") and .ScriptFilesPath("") in the editor builder, to no avail.
Any help or hint would be appreciated.