Bloom.Book.Book.AddJavaScriptForEditing C# (CSharp) Method

AddJavaScriptForEditing() private method

private AddJavaScriptForEditing ( HtmlDom dom ) : void
dom HtmlDom
return void
        private void AddJavaScriptForEditing(HtmlDom dom)
        {
            // BL-117, PH: With the newer xulrunner, javascript code with parenthesis in the URL is not working correctly.

            //dom.AddJavascriptFile("lib/ckeditor/ckeditor.js".ToLocalhost());

            //reviewslog: added this to get the "WebFXTabPane()" working in StyleEditor. Previously tried adding "export" to the function and then importing it
            dom.AddJavascriptFile("lib/tabpane.js".ToLocalhost());

            //reviewslog: four lines are prompted by the qtip "too much recursion" error, which I got on certain pages. The qtip
            //code in question says it is for when jquery-ui is not found. I "solved" this by loading jquery, jquery-ui,
            //and finally qtip into the global space here
            dom.AddJavascriptFile("jquery.min.js".ToLocalhost());
            dom.AddJavascriptFile("modified_libraries/jquery-ui/jquery-ui-1.10.3.custom.min.js".ToLocalhost());
            //			dom.AddJavascriptFile("lib/jquery.qtip.js".ToLocalhost());
            //			dom.AddJavascriptFile("lib/jquery.qtipSecondary.js".ToLocalhost());

            // first tried this as import 'jquery.hotkeys' in bloomEditing, but that didn't work
            //dom.AddJavascriptFile("jquery.hotkeys.js".ToLocalhost());

            dom.AddJavascriptFile("commonBundle.js".ToLocalhost());
            dom.AddJavascriptFile("editablePageBundle.js".ToLocalhost());
            // Add this last because currently its document ready function has to execute AFTER the bootstrap call in bloomEditing.ts,
            // which is compiled into editablePageIFrame.js. The bootstrap function sets CKEDITOR.disableAutoInline = true,
            // which suppresses a document ready function in CKEditor iself from calling inline() on all content editable
            // elements, which we don't want (a) because some content editable elements shouldn't have CKEditor functions, and
            // (b) because it causes crashes when we intentionally do our own inline() calls on the elements where we DO
            // want CKEditor.
            // ReviewSlog: It would be much more robust not to depend on the order in which document ready functions
            // execute, especially if the only control over that is the order of loading files. But I don't know
            // where we can put the CKEDITOR.disableAutoInline = true so that it will reliably execute AFTER CKEDITOR is
            // defined and BEFORE its document ready function.
            dom.AddJavascriptFile("lib/ckeditor/ckeditor.js".ToLocalhost());
        }
Book