diff options
author | Simon B @piratpartiet <simonb@redhog.org> | 2010-04-21 10:55:30 +0200 |
---|---|---|
committer | Simon B @piratpartiet <simonb@redhog.org> | 2010-04-21 10:55:30 +0200 |
commit | e794aa43d7977aa58a7ef8704ac212008e0280e9 (patch) | |
tree | 638dd5373f6d1f95d90ff3aa336ba9d4300b9018 /infrastructure | |
parent | 9405fe0a588018bf55b82016c1ae246def1cca19 (diff) | |
download | etherpad-e794aa43d7977aa58a7ef8704ac212008e0280e9.tar.gz etherpad-e794aa43d7977aa58a7ef8704ac212008e0280e9.tar.xz etherpad-e794aa43d7977aa58a7ef8704ac212008e0280e9.zip |
Fix IFRAME bug. Closes #70
Diffstat (limited to 'infrastructure')
-rw-r--r-- | infrastructure/ace/www/ace2_outer.js | 3 | ||||
-rw-r--r-- | infrastructure/ace/www/domline.js | 2 | ||||
-rw-r--r-- | infrastructure/ace/www/linestylefilter.js | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/infrastructure/ace/www/ace2_outer.js b/infrastructure/ace/www/ace2_outer.js index e6d430d..212c159 100644 --- a/infrastructure/ace/www/ace2_outer.js +++ b/infrastructure/ace/www/ace2_outer.js @@ -168,7 +168,7 @@ function Ace2Editor() { var iframeHTML = ["'"+doctype+"<html><head>'"]; - top.plugins.callHook( + plugins.callHook( "aceInitInnerdocbodyHead", {iframeHTML:iframeHTML}); // these lines must conform to a specific format because they are passed by the build script: @@ -203,6 +203,7 @@ function Ace2Editor() { '\x3cscript>', outerScript, '\x3c/script>', '</head><body id="outerdocbody"><div id="sidediv"><!-- --></div><div id="linemetricsdiv">x</div><div id="overlaysdiv"><!-- --></div></body></html>']; + var outerFrame = document.createElement("IFRAME"); outerFrame.frameBorder = 0; // for IE info.frame = outerFrame; diff --git a/infrastructure/ace/www/domline.js b/infrastructure/ace/www/domline.js index 90e9943..016e868 100644 --- a/infrastructure/ace/www/domline.js +++ b/infrastructure/ace/www/domline.js @@ -101,7 +101,7 @@ domline.createDomLine = function(nonEmpty, doesWrap, optBrowser, optDocument) { var extraOpenTags = ""; var extraCloseTags = ""; - (function () { try { return top.plugins; } catch (e) { return plugins; }; })().callHook( + parent.parent.plugins.callHook( "aceCreateDomLine", {domline:domline, cls:cls} ).map(function (modifier) { cls = modifier.cls; diff --git a/infrastructure/ace/www/linestylefilter.js b/infrastructure/ace/www/linestylefilter.js index c163120..341345e 100644 --- a/infrastructure/ace/www/linestylefilter.js +++ b/infrastructure/ace/www/linestylefilter.js @@ -238,7 +238,7 @@ linestylefilter.textAndClassFuncSplitter = function(func, splitPointsOpt) { linestylefilter.getFilterStack = function(lineText, textAndClassFunc, browser) { var func = linestylefilter.getURLFilter(lineText, textAndClassFunc); - var hookFilters = (function () { try { return top.plugins; } catch (e) { return plugins; }; })().callHook( + var hookFilters = parent.parent.plugins.callHook( "aceGetFilterStack", {linestylefilter:linestylefilter, browser:browser}); hookFilters.map(function (hookFilter) { func = hookFilter(lineText, func); |