Merge branch 'w13_MDL-38673_m25_flowplayer' of git://github.com/skodak/moodle
authorDamyon Wiese <damyon@moodle.com>
Tue, 26 Mar 2013 08:11:47 +0000 (16:11 +0800)
committerDamyon Wiese <damyon@moodle.com>
Tue, 26 Mar 2013 08:11:47 +0000 (16:11 +0800)
1  2 
lib/javascript-static.js
lib/thirdpartylibs.xml

diff --combined lib/javascript-static.js
@@@ -1063,46 -1063,34 +1063,46 @@@ function findChildNodes(start, tagName
  }
  
  function unmaskPassword(id) {
 -  var pw = document.getElementById(id);
 -  var chb = document.getElementById(id+'unmask');
 -
 -  try {
 -    // first try IE way - it can not set name attribute later
 -    if (chb.checked) {
 -      var newpw = document.createElement('<input type="text" autocomplete="off" name="'+pw.name+'">');
 -    } else {
 -      var newpw = document.createElement('<input type="password" autocomplete="off" name="'+pw.name+'">');
 -    }
 -    newpw.attributes['class'].nodeValue = pw.attributes['class'].nodeValue;
 -  } catch (e) {
 -    var newpw = document.createElement('input');
 -    newpw.setAttribute('autocomplete', 'off');
 -    newpw.setAttribute('name', pw.name);
 -    if (chb.checked) {
 -      newpw.setAttribute('type', 'text');
 -    } else {
 -      newpw.setAttribute('type', 'password');
 +    var pw = document.getElementById(id);
 +    var chb = document.getElementById(id+'unmask');
 +
 +    // MDL-30438 - The capability to changing the value of input type is not supported by IE8 or lower.
 +    // Replacing existing child with a new one, removed all yui properties for the node.  Therefore, this
 +    // functionality won't work in IE8 or lower.
 +    // This is a temporary fixed to allow other browsers to function properly.
 +    if (Y.UA.ie == 0 || Y.UA.ie >= 9) {
 +        if (chb.checked) {
 +            pw.type = "text";
 +        } else {
 +            pw.type = "password";
 +        }
 +    } else {  //IE Browser version 8 or lower
 +        try {
 +            // first try IE way - it can not set name attribute later
 +            if (chb.checked) {
 +              var newpw = document.createElement('<input type="text" autocomplete="off" name="'+pw.name+'">');
 +            } else {
 +              var newpw = document.createElement('<input type="password" autocomplete="off" name="'+pw.name+'">');
 +            }
 +            newpw.attributes['class'].nodeValue = pw.attributes['class'].nodeValue;
 +        } catch (e) {
 +            var newpw = document.createElement('input');
 +            newpw.setAttribute('autocomplete', 'off');
 +            newpw.setAttribute('name', pw.name);
 +            if (chb.checked) {
 +              newpw.setAttribute('type', 'text');
 +            } else {
 +              newpw.setAttribute('type', 'password');
 +            }
 +            newpw.setAttribute('class', pw.getAttribute('class'));
 +        }
 +        newpw.id = pw.id;
 +        newpw.size = pw.size;
 +        newpw.onblur = pw.onblur;
 +        newpw.onchange = pw.onchange;
 +        newpw.value = pw.value;
 +        pw.parentNode.replaceChild(newpw, pw);
      }
 -    newpw.setAttribute('class', pw.getAttribute('class'));
 -  }
 -  newpw.id = pw.id;
 -  newpw.size = pw.size;
 -  newpw.onblur = pw.onblur;
 -  newpw.onchange = pw.onchange;
 -  newpw.value = pw.value;
 -  pw.parentNode.replaceChild(newpw, pw);
  }
  
  function filterByParent(elCollection, parentFinder) {
@@@ -1839,9 -1827,9 +1839,9 @@@ M.util.load_flowplayer = function() 
              for(var i=0; i<M.util.video_players.length; i++) {
                  var video = M.util.video_players[i];
                  if (video.width > 0 && video.height > 0) {
-                     var src = {src: M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.14.swf', width: video.width, height: video.height};
+                     var src = {src: M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.16.swf', width: video.width, height: video.height};
                  } else {
-                     var src = M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.14.swf';
+                     var src = M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.16.swf';
                  }
                  flowplayer(video.id, src, {
                      plugins: {controls: controls},
                      controls.height = 25;
                      controls.time = true;
                  }
-                 flowplayer(audio.id, M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.14.swf', {
+                 flowplayer(audio.id, M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.16.swf', {
                      plugins: {controls: controls, audio: {url: M.cfg.wwwroot + '/lib/flowplayer/flowplayer.audio-3.2.10.swf'}},
                      clip: {url: audio.fileurl, provider: "audio", autoPlay: false}
                  });
          }
  
          if (M.cfg.jsrev == -1) {
-             var jsurl = M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.11.js';
+             var jsurl = M.cfg.wwwroot + '/lib/flowplayer/flowplayer-3.2.12.js';
          } else {
-             var jsurl = M.cfg.wwwroot + '/lib/javascript.php?jsfile=/lib/flowplayer/flowplayer-3.2.11.min.js&rev=' + M.cfg.jsrev;
+             var jsurl = M.cfg.wwwroot + '/lib/javascript.php?jsfile=/lib/flowplayer/flowplayer-3.2.12.min.js&rev=' + M.cfg.jsrev;
          }
          var fileref = document.createElement('script');
          fileref.setAttribute('type','text/javascript');
diff --combined lib/thirdpartylibs.xml
@@@ -95,7 -95,7 +95,7 @@@
      <location>flowplayer</location>
      <name>Flowplayer</name>
      <license>GPL</license>
-     <version>3.2.14</version>
+     <version>3.2.16</version>
      <licenseversion>3</licenseversion>
    </library>
    <library>
      <location>tcpdf</location>
      <name>TCPDF</name>
      <license>LGPL</license>
 -    <version>5.9.181</version>
 +    <version>5.9.209</version>
      <licenseversion>3</licenseversion>
    </library>
    <library>
      <version>3.9.0</version>
      <licenseversion></licenseversion>
    </library>
 +  <library>
 +    <location>jquery</location>
 +    <name>jQuery</name>
 +    <license>MIT</license>
 +    <version>1.9.1</version>
 +    <licenseversion></licenseversion>
 +  </library>
 +  <library>
 +    <location>jquery</location>
 +    <name>jQuery Migrate</name>
 +    <license>MIT</license>
 +    <version>1.1.1</version>
 +    <licenseversion></licenseversion>
 +  </library>
 +  <library>
 +    <location>jquery</location>
 +    <name>jQuery UI</name>
 +    <license>MIT</license>
 +    <version>1.10.2</version>
 +    <licenseversion></licenseversion>
 +  </library>
    <library>
      <location>zend</location>
      <name>Zend Framework</name>