From e04f46d4775037d712c5fa07dedda58e443b43d2 Mon Sep 17 00:00:00 2001 From: webzwo0i Date: Sun, 8 Dec 2013 17:25:12 +0100 Subject: [PATCH] [ace2_inner] init() has replaced setup(), reflect this change in the comments and remove the unused setup() --- src/static/js/ace2_inner.js | 52 ++----------------------------------- 1 file changed, 2 insertions(+), 50 deletions(-) diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index ec842285..9391e4ed 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -101,13 +101,13 @@ function Ace2Inner(){ apool: new AttribPool() }; - // lines, alltext, alines, and DOM are set up in setup() + // lines, alltext, alines, and DOM are set up in init() if (undoModule.enabled) { undoModule.apool = rep.apool; } - var root, doc; // set in setup() + var root, doc; // set in init() var isEditable = true; var doesWrap = true; var hasLineNumbers = true; @@ -4768,54 +4768,6 @@ function Ace2Inner(){ else $(elem).removeClass(className); } - function setup() - { - doc = document; // defined as a var in scope outside - inCallStackIfNecessary("setup", function() - { - var body = doc.getElementById("innerdocbody"); - root = body; // defined as a var in scope outside - if (browser.mozilla) addClass(root, "mozilla"); - if (browser.safari) addClass(root, "safari"); - if (browser.msie) addClass(root, "msie"); - if (browser.msie) - { - // cache CSS background images - try - { - doc.execCommand("BackgroundImageCache", false, true); - } - catch (e) - { /* throws an error in some IE 6 but not others! */ - } - } - setClassPresence(root, "authorColors", true); - setClassPresence(root, "doesWrap", doesWrap); - - initDynamicCSS(); - - enforceEditability(); - - // set up dom and rep - while (root.firstChild) root.removeChild(root.firstChild); - var oneEntry = createDomLineEntry(""); - doRepLineSplice(0, rep.lines.length(), [oneEntry]); - insertDomLines(null, [oneEntry.domInfo], null); - rep.alines = Changeset.splitAttributionLines( - Changeset.makeAttribution("\n"), "\n"); - - bindTheEventHandlers(); - - }); - - scheduler.setTimeout(function() - { - parent.readyFunc(); // defined in code that sets up the inner iframe - }, 0); - - isSetUp = true; - } - function focus() { window.focus();