Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Commit

Permalink
Fix: #803.
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed Jan 25, 2017
1 parent 56372b1 commit 2b05629
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 29 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ New in 3.0.1.15
===============
- FIX: Issue #798: Slider title needs to support multi-lang filter.
- FIX: Issue #799: Message avatar overlap.
- FIX: Issue #803: Embedded pdf files not displaying in IE 11.
- FIX: Course category multi-lang, ref: https://moodle.org/mod/forum/discuss.php?d=344426#p1389008.
- NEW: Issue #734: Unable to disable the new "page top" block region.
- NEW: Properties.
Expand Down
18 changes: 10 additions & 8 deletions amd/build/fitvids.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 23 additions & 21 deletions amd/src/fitvids.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
/* jshint ignore:start */
define(['jquery', 'core/log'], function($, log) {

"use strict"; // jshint ;_;
"use strict"; // jshint ;_;

log.debug('Essential fitvids AMD');
log.debug('Essential fitvids AMD');


/*jshint browser:true */
/*!
* FitVids 1.1.2
*
* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
*
*/
/*jshint browser:true */
/*!
* FitVids 1.1.
*
* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
*
* Adapted to AMD for Moodle by Gareth J Barnard.
*
*/

$.fn.fitVids = function( options ) {
var settings = {
customSelector: null,
ignore: null
ignore: "object[type='application/pdf']"
};

if(!document.getElementById('fit-vids-style')) {
Expand Down Expand Up @@ -56,8 +58,8 @@ define(['jquery', 'core/log'], function($, log) {
}

var $allVideos = $(this).find(selectors.join(','));
$allVideos = $allVideos.not("object object"); // SwfObj conflict patch
$allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video.
$allVideos = $allVideos.not("object object"); // SwfObj conflict patch.
$allVideos = $allVideos.not(ignoreList); // Disable FitVids on these.

$allVideos.each(function(){
var $this = $(this);
Expand Down Expand Up @@ -102,13 +104,13 @@ define(['jquery', 'core/log'], function($, log) {
});
};

return {
init: function() {
$(document).ready(function($) {
$('#page').fitVids();
});
log.debug('Essential fitvids AMD init');
return {
init: function() {
$(document).ready(function($) {
$('#page').fitVids();
});
log.debug('Essential fitvids AMD init');
}
}
}
});
/* jshint ignore:end */

0 comments on commit 2b05629

Please sign in to comment.