Index: lib/editor/htmlarea/popups/fullscreen.php
===================================================================
RCS file: /cvsroot/moodle/moodle/lib/editor/htmlarea/popups/Attic/fullscreen.php,v
retrieving revision 1.6.6.2
diff -u -r1.6.6.2 fullscreen.php
--- lib/editor/htmlarea/popups/fullscreen.php	5 Dec 2008 00:57:21 -0000	1.6.6.2
+++ lib/editor/htmlarea/popups/fullscreen.php	23 Mar 2009 01:43:51 -0000
@@ -11,7 +11,8 @@
 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
 <style type="text/css">
 @import url(../htmlarea.css);
-html, body {    margin: 0px; border: 0px; background-color: buttonface; } </style>
+html, body {    margin: 0px; border: 0px; background-color: buttonface; }
+</style>
 
 
 <script type="text/javascript" src="../htmlarea.php?id=<?php p($id); ?>"></script>
@@ -19,30 +20,7 @@
 <script type="text/javascript" src="../dialog.js" charset="utf-8"></script>
 <script type="text/javascript" src="../plugins/TableOperations/table-operations.js" charset="utf-8"></script>
 <script type="text/javascript" src="../plugins/TableOperations/lang/en.js" charset="utf-8"></script>
-<script type="text/javascript">
-// load same scripts that were present in the opener page
-var scripts = opener.document.getElementsByTagName("script");
-var head = document.getElementsByTagName("head")[0];
-for (var i = 0; i < scripts.length; ++i) {
-  var script = scripts[i];
-  if (typeof script.src != "undefined" && /\S/.test(script.src)) {
-    // document.write("<scr" + "ipt type=" + "\"script/javascript\"");
-    // document.write(" src=\"../" + script.src + "\"></scr" + "ipt>");
-    var new_script = document.createElement("script");
-    if (/^https?:/i.test(script.src)) {
-      new_script.src = script.src;
-    } else {
-      new_script.src = "../" + script.src;
-    }
-    if (navigator.appVersion.indexOf("MSIE") == -1  || script.src.indexOf("yui/event/event") == -1) {
-      head.appendChild(new_script);
-    }
-  }
-}
-</script>
-
-<script type="text/javascript">
-
+<script type="text/javascript"> 
 var parent_object  = null;
 var editor         = null;      // to be initialized later [ function init() ]
 
@@ -118,40 +96,40 @@
 \* ---------------------------------------------------------------------- */
 
 function init() {
-  parent_object      = opener.HTMLArea._object;
-  var config         = cloneObject( parent_object.config );
-  config.editorURL   = "../";
-  config.width       = "100%";
-  config.height      = "auto";
-
-  // change maximize button to minimize button
-  config.btnList["popupeditor"] = [ "<?php print_string("minimize","editor");?>", "<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/fullscreen_minimize.gif", true,
-                                    function() { window.close(); } ];
-
-  // generate editor and resize it
-  editor = new HTMLArea("editor", config);
-  editor.registerPlugin(TableOperations);
-  editor.generate();
-  editor._iframe.style.width = "100%";
-  editor._textArea.style.width = "100%";
-  resize_editor();
-
-  // set child window contents and event handlers, after a small delay
-  setTimeout(function() {
-    editor.setHTML(parent_object.getInnerHTML());
-
-    // switch mode if needed
-    if (parent_object._mode == "textmode") { editor.setMode("textmode"); }
-
-    // continuously update parent editor window
-    setInterval(update_parent, 500);
-
-    // setup event handlers FAST FIX IS UNCOMMENT THESE, NOT WORKING!
-    //document.body.onkeypress = _CloseOnEsc;
-    //editor._doc.body.onkeypress = _CloseOnEsc;
-    //editor._textArea.onkeypress = _CloseOnEsc;
-    window.onresize = resize_editor;
-  }, 333);                      // give it some time to meet the new frame
+    parent_object      = opener.HTMLArea._object;
+    var config         = cloneObject( parent_object.config );
+    config.editorURL   = "../";
+    config.width       = "100%";
+    config.height      = "auto";
+
+    // change maximize button to minimize button
+    config.btnList["popupeditor"] = [ "<?php print_string("minimize","editor");?>", "<?php echo $CFG->wwwroot ?>/lib/editor/htmlarea/images/fullscreen_minimize.gif", true,
+        function() { window.close(); } ];
+
+    // generate editor and resize it
+    editor = new HTMLArea("editor", config);
+    editor.registerPlugin(TableOperations);
+    editor.generate();
+    editor._iframe.style.width = "100%";
+    editor._textArea.style.width = "100%";
+    resize_editor();
+
+    // set child window contents and event handlers, after a small delay
+    setTimeout(function() {
+        editor.setHTML(parent_object.getInnerHTML());
+
+        // switch mode if needed
+        if (parent_object._mode == "textmode") { editor.setMode("textmode"); }
+
+        // continuously update parent editor window
+        setInterval(update_parent, 500);
+
+        // setup event handlers FAST FIX IS UNCOMMENT THESE, NOT WORKING!
+        //document.body.onkeypress = _CloseOnEsc;
+        //editor._doc.body.onkeypress = _CloseOnEsc;
+        //editor._textArea.onkeypress = _CloseOnEsc;
+        window.onresize = resize_editor;
+    }, 333);                      // give it some time to meet the new frame
 }
 
 /* ---------------------------------------------------------------------- *\

