Permalink
Browse files

MDL-28601 SCORM remove old js not used since MDL-22951

  • Loading branch information...
1 parent 3fdc622 commit 02c1f7e25365c09ae3e91a0b938dc0c9b39fc50b @danmarsden danmarsden committed Aug 4, 2011
Showing with 0 additions and 118 deletions.
  1. +0 −118 mod/scorm/rd.js
View
@@ -1,118 +0,0 @@
-<!--
-function attach_resize_event() {
- YAHOO.util.Event.addListener(window, 'resize', scorm_resize);
-}
-
-var prev='';
-var next='';
-function scorm_set_prev(url) {
- prev = url;
-}
-function scorm_set_next(url) {
- next = url;
-}
-
-function scorm_get_element_style(obj, prop, cssProp) {
- var ret = '';
-
- if (obj.currentStyle) {
- ret = obj.currentStyle[prop];
- } else if (document.defaultView && document.defaultView.getComputedStyle) {
- var compStyle = document.defaultView.getComputedStyle(obj, null);
- ret = compStyle.getPropertyValue(cssProp);
- }
-
- if (ret == 'auto') ret = '0';
- return ret;
-}
-
-function scorm_resize () {
- var cwidth = scormplayerdata.cwidth;
- var cheight = scormplayerdata.cheight;
- var winwidth = 0, winheight = 0;
- if( typeof( window.innerWidth ) == 'number' ) {
- //Non-IE
- winwidth = window.innerWidth;
- winheight = window.innerHeight;
- } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
- //IE 6+ in 'standards compliant mode'
- winwidth = document.documentElement.clientWidth;
- winheight = document.documentElement.clientHeight;
- } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
- //IE 4 compatible
- winwidth = document.body.clientWidth;
- winheight = document.body.clientHeight;
- }
-
- var header = document.getElementById('header');
- var content = document.getElementById('region-content');
- var headerheight = 0;
- if (content) {
- headerheight = content.offsetTop;
- }
-
- var footer = document.getElementById('footer');
- var imsnavbar = document.getElementById('tochead');
- var scormtop = document.getElementById('scormtop');
- var footerheight = 0;
- var imsnavheight = 0;
- var scormtopheight = 0;
- if (footer) {
- footerheight = footer.offsetHeight + parseInt(scorm_get_element_style(footer, 'marginTop', 'margin-top')) + parseInt(scorm_get_element_style(footer, 'marginBottom', 'margin-bottom'));
- }
- if (imsnavbar) {
- imsnavheight = imsnavbar.offsetHeight;
- }
- if (scormtop) {
- scormtopheight = scormtop.offsetHeight;
- }
-
- var topmargin = parseInt(scorm_get_element_style(document.getElementsByTagName('body')[0], 'marginTop', 'margin-top'));
- var bottommargin = parseInt(scorm_get_element_style(document.getElementsByTagName('body')[0], 'marginBottom', 'margin-bottom'));
-
- var totalheight = headerheight +
- footerheight +
- scormtopheight+
- topmargin +
- bottommargin+10; // +10 to save a minor vertical scroll always present!
-
- var totalheighttoc = totalheight+imsnavheight;
- // override total height with configured height if it is defined
- if (cheight > 0) {
- winheight = cheight;
- }
- var finalheighttoc = winheight - totalheighttoc;
- if (finalheighttoc <= 0) {
- finalheighttoc = winheight;
- }
- var finalheight = winheight - totalheight;
- if (finalheight <= 0) {
- finalheight = winheight;
- }
- var toctree = document.getElementById('toctree');
- if (toctree != null){
- var toctreeHeight = toctree.offsetHeight;
- document.getElementById('toctree').style.height = finalheighttoc + 'px';
- var scoframe2 = document.getElementById('scoframe1');
- document.getElementById('scormobject').style.height = finalheight + 'px';
- }else{
- document.getElementById('scormobject').style.height = finalheight + 'px';
- document.getElementById('scormpage').style.height = finalheight + 'px';
- }
-
- // resize the content container too to move the footer below the SCORM content
- var contenti3 = document.getElementById('content-i3');
- if (contenti3) {
- contenti3.style.height = (winheight - totalheight + 30) + 'px';
- } else {
- document.getElementById('region-main-box').style.height = (finalheight + 30) + 'px';
- }
- // resize the content container too to move the footer below the SCORM content
- var contenti3 = document.getElementById('content-i3');
- if (contenti3) {
- contenti3.style.height = (finalheight + 30) + 'px';
- } else {
- document.getElementById('region-main-box').style.height = (finalheight + 30) + 'px';
- }
-}
--->

0 comments on commit 02c1f7e

Please sign in to comment.