mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Now the customcorners (T/F) flag is passed to the
resizeiframe() script. Next-step: perform some extra calculations there to resize the iframe properly under customcorners.
This commit is contained in:
parent
4b82ca47e8
commit
10edb2a075
@ -9,6 +9,14 @@
|
||||
/// We use this globals to be able to generate the proper JavaScripts
|
||||
global $jsarg, $standard_javascript;
|
||||
|
||||
/// Let's know if we are using a customcorners theme. It implies new calculations
|
||||
/// within the resizeiframe function.
|
||||
if (!empty($THEME->customcorners)) {
|
||||
$customcorners = 'true';
|
||||
} else {
|
||||
$customcorners = 'false';
|
||||
}
|
||||
|
||||
/// Load IMS needed JavaScript
|
||||
/// The dummy LMS API hack to stop some SCORM packages giving errors.
|
||||
echo "<script type=\"text/javascript\" src=\"$CFG->wwwroot/mod/resource/type/ims/dummyapi.js\"></script>\n";
|
||||
@ -16,7 +24,7 @@
|
||||
echo " <script type=\"text/javascript\" src=\"$CFG->wwwroot/mod/resource/type/ims/resize.js\"></script>\n";
|
||||
echo " <script type=\"text/javascript\">
|
||||
window.onresize = function() {
|
||||
resizeiframe($jsarg);
|
||||
resizeiframe($jsarg, $customcorners);
|
||||
};
|
||||
window.name='ims-cp-page';
|
||||
|
||||
@ -26,7 +34,7 @@
|
||||
var cfnv = document.getElementById('ims-contentframe-no-nav');
|
||||
|
||||
if (cf || cfnv) {
|
||||
resizeiframe($jsarg);
|
||||
resizeiframe($jsarg, $customcorners);
|
||||
clearInterval(ourInterval);
|
||||
return true;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ function getElementStyle(obj, prop, cssProp) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
function resizeiframe (hasNav) {
|
||||
function resizeiframe (hasNav, customCorners) {
|
||||
var winWidth = 0, winHeight = 0;
|
||||
if( typeof( window.innerWidth ) == 'number' ) {
|
||||
//Non-IE
|
||||
|
Loading…
x
Reference in New Issue
Block a user