spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af in woople-theme-0.8.6 vs spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af in woople-theme-0.8.7

- old
+ new

@@ -1,12 +1,49 @@ -o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1354220049.4907641: @value"?{I" +o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1354292278.136638: @value"w {I" class:EFI"BundledAsset;FI"logical_path;FI"application.js;FI" pathname;FI"0$root/app/assets/javascripts/application.js;TI"content_type;FI"application/javascript;FI" -mtime;FI"2012-11-29T15:10:24-05:00;FI" length;FiI" digest;F"%59d26edf19c2b0443d13697da585c960I" source;FI" +mtime;FI"2012-11-08T15:08:42-05:00;FI" length;Fi I" digest;F"%a5daadd4a6856a036368cafd0c3e7e0aI" source;FI" var showingPlayer; +function showMobile() { + var modalContents = $('#myModal').html(); + var selectedRow = $('#video_0_0'); + var playerRow = selectedRow.after('<tr><td colspan=3>' + modalContents + '</td></tr>'); + + $('#myModal').remove(); + + var offset = selectedRow.offset(); + window.scrollTo(offset.left, offset.top); + + initPlayer(); +} + +function showDesktop() { + $('#myModal').modal(); + $('#myModal').on('hide', function() { + window.location.href = '/course'; + }); + + initPlayer(); +} + +function playerResizeListener() { + $(window).bind('resize orientationchange', resizePlayer); +} + +function resizePlayer() { + var parentHeight = $('.modal-video-box').height(); + var parentWidth = $('.modal-video-box').width(); + + $('#theme_video').css({'width': parentWidth, 'height': parentHeight}); + + // assume we are parsing a decimal -- http://stackoverflow.com/questions/850341/workarounds-for-javascript-parseint-octal-bug + $('#theme_video').attr('width', parseInt(parentWidth, 10)); + $('#theme_video').attr('height', parseInt(parentHeight, 10)); +} + function initPlayer() { jwplayer("theme_video").setup({ image: '/assets/woople-theme/poster.jpg', controlbar: { position: 'bottom' @@ -15,27 +52,30 @@ file: videoOptions.desktopSrc, height: '100%', modes: [{ type: "flash", src: "/assets/jwplayer/player.swf" - },{ - type: "html5", - config: { - file: videoOptions.mobileSrc - } }], provider: "video", width: '100%', plugins: { "gapro-2":{} } }); } $(document).ready(function() { + if (showingPlayer) { - initPlayer();; + if ($(window).width() < 768) { + showMobile(); + } else { + showDesktop(); + } + + playerResizeListener(); + resizePlayer(); } }); // from https://gist.github.com/1042026 // Mobile Safari in standalone mode if(("standalone" in window.navigator) && window.navigator.standalone){ @@ -58,6 +98,6 @@ } },false); } ; -;FI"required_assets_digest;F"%73ea53c610027068c0ef1683af7a4a49I" _version;F"%9f3b95dd7ea3030dc35985c0a8020862 +;FI"required_assets_digest;F"%3c34e0f0e94d7600d47d30519499739dI" _version;F"%9f3b95dd7ea3030dc35985c0a8020862 \ No newline at end of file