Skip to content

Commit

Permalink
MDL-16671 - Move openpopup out of javascript.php and in to javascript…
Browse files Browse the repository at this point in the history
…-static.js
  • Loading branch information
tjhunt committed Sep 25, 2008
1 parent 830c58b commit 77241d9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
11 changes: 11 additions & 0 deletions lib/javascript-static.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
10 changes: 0 additions & 10 deletions lib/javascript.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,6 @@
</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)) {
Expand Down

0 comments on commit 77241d9

Please sign in to comment.