[ace2_inner] init() has replaced setup(), reflect this change in the comments and remove the unused setup()

This commit is contained in:
webzwo0i 2013-12-08 17:25:12 +01:00
parent 020bd3915c
commit e04f46d477

View file

@ -101,13 +101,13 @@ function Ace2Inner(){
apool: new AttribPool() 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) if (undoModule.enabled)
{ {
undoModule.apool = rep.apool; undoModule.apool = rep.apool;
} }
var root, doc; // set in setup() var root, doc; // set in init()
var isEditable = true; var isEditable = true;
var doesWrap = true; var doesWrap = true;
var hasLineNumbers = true; var hasLineNumbers = true;
@ -4768,54 +4768,6 @@ function Ace2Inner(){
else $(elem).removeClass(className); 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() function focus()
{ {
window.focus(); window.focus();