]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-16671 - Move openpopup out of javascript.php and in to javascript-static.js
authortjhunt <tjhunt>
Thu, 25 Sep 2008 03:14:24 +0000 (03:14 +0000)
committertjhunt <tjhunt>
Thu, 25 Sep 2008 03:14:24 +0000 (03:14 +0000)
lib/javascript-static.js
lib/javascript.php

index f76d1a87a8debc30125b3f7edda82fce62dd8b59..48bbb5a07b58b7a3e62d8e69df1d1c3729eb7b90 100644 (file)
@@ -534,3 +534,14 @@ function getElementsByClassName(oElm, strTagName, oClassNames){
     }
     return (arrReturnElements)
 }
+
+function openpopup(url, name, options, fullscreen) {
+    var fullurl = moodle_config.wwwroot + url;
+    var windowobj = window.open(fullurl,name,options);
+    if (fullscreen) {
+        windowobj.moveTo(0,0);
+        windowobj.resizeTo(screen.availWidth,screen.availHeight);
+    }
+    windowobj.focus();
+    return false;
+}
index 03d34fcaa899eb6530e9376c57cc4d08d5189f19..69a273cbb4727c716c76347668391c024734285f 100644 (file)
@@ -30,16 +30,6 @@ setTimeout('fix_column_widths()', 20);
 </script>
 <script type="text/javascript">
 //<![CDATA[
-function openpopup(url,name,options,fullscreen) {
-  fullurl = "<?php echo $CFG->httpswwwroot ?>" + url;
-  windowobj = window.open(fullurl,name,options);
-  if (fullscreen) {
-     windowobj.moveTo(0,0);
-     windowobj.resizeTo(screen.availWidth,screen.availHeight);
-  }
-  windowobj.focus();
-  return false;
-}
 <?php
     echo "function inserttext(text) {\n";
     if (!empty($SESSION->inserttextform)) {