Commit bd699964 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review
Browse files

Merge "Bug 1794912: Fixing W3.org validation issues for iframes"

parents 64f2071a baab8c17
...@@ -75,7 +75,7 @@ class PluginBlocktypePdf extends MaharaCoreBlocktype { ...@@ -75,7 +75,7 @@ class PluginBlocktypePdf extends MaharaCoreBlocktype {
} }
$result = '<iframe src="' . $urlbase . 'artefact/file/blocktype/pdf/viewer.php?editing=' . $editing . '&ingroup=' . !empty($group) . '&file=' . $artefactid . '&lang=' . $language . '&view=' . $instance->get('view') $result = '<iframe src="' . $urlbase . 'artefact/file/blocktype/pdf/viewer.php?editing=' . $editing . '&ingroup=' . !empty($group) . '&file=' . $artefactid . '&lang=' . $language . '&view=' . $instance->get('view')
. ($versioning ? '&versioning=true' : '') . ($versioning ? '&versioning=true' : '')
. '" width="100%" height="500" frameborder="0"></iframe>'; . '" class="pdfiframe"></iframe>';
require_once(get_config('docroot') . 'artefact/comment/lib.php'); require_once(get_config('docroot') . 'artefact/comment/lib.php');
require_once(get_config('docroot') . 'lib/view.php'); require_once(get_config('docroot') . 'lib/view.php');
......
...@@ -111,7 +111,7 @@ class PluginBlocktypeExternalvideo extends MaharaCoreBlocktype { ...@@ -111,7 +111,7 @@ class PluginBlocktypeExternalvideo extends MaharaCoreBlocktype {
$width = (int) $width; $width = (int) $width;
$height = (int) $height; $height = (int) $height;
$url = hsc($url); $url = hsc($url);
return '<iframe width="' . $width . '" height="' . $height . '" src="' . $url . '" frameborder=0 allowfullscreen mozallowfullscreen webkitallowfullscreen></iframe>'; return '<iframe class="externalvideoiframe" width="' . $width . '" height="' . $height . '" src="' . $url . '" allowfullscreen="1"></iframe>';
} }
public static function get_blocktype_type_content_types() { public static function get_blocktype_type_content_types() {
......
{if $images} {if $images}
<iframe marginheight="0" marginwidth="0" width="{$width}" height="{$height}" scrolling="no" frameborder="0" src="{$images.url}/{$images.user}/{$images.album}?albumview=slideshow"></iframe> <iframe width="{$width}" height="{$height}" src="{$images.url}/{$images.user}/{$images.album}?albumview=slideshow"></iframe>
{else} {else}
{str tag=cannotdisplayslideshow section=blocktype.file/gallery} {str tag=cannotdisplayslideshow section=blocktype.file/gallery}
{/if} {/if}
{include file="header.tpl"} {include file="header.tpl"}
<div id="extract"> <div id="extract">
<h3>{str tag=pleasewaitwhileyourfilesarebeingunzipped section=artefact.file}</h3> <h3>{str tag=pleasewaitwhileyourfilesarebeingunzipped section=artefact.file}</h3>
<iframe src="{$WWWROOT}artefact/file/extract-progress.php" id="progress-iframe" scrolling="no" frameborder="none"></iframe> <iframe src="{$WWWROOT}artefact/file/extract-progress.php" id="progress-iframe"></iframe>
</div> </div>
{include file="footer.tpl"} {include file="footer.tpl"}
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
.attr('value', '{$jsflashvars}') .attr('value', '{$jsflashvars}')
.appendTo(embedobj); .appendTo(embedobj);
$j('<embed />').attr('src', '{$jsurl}') $j('<embed />').attr('src', '{$jsurl}')
.attr('allowfullscreen', 'true') .attr('allow', 'fullscreen')
.attr('wmode', 'transparent') .attr('wmode', 'transparent')
.attr('allowscriptaccess', 'always') .attr('allowscriptaccess', 'always')
.attr('width', '{$width}') .attr('width', '{$width}')
...@@ -40,10 +40,7 @@ ...@@ -40,10 +40,7 @@
$j('<iframe />').attr('src', jsurl) $j('<iframe />').attr('src', jsurl)
.attr('width', '{$width}') .attr('width', '{$width}')
.attr('height', '{$height}') .attr('height', '{$height}')
.attr('frameborder', '0')
.attr('allowfullscreen', '') .attr('allowfullscreen', '')
.attr('mozallowfullscreen', '')
.attr('webkitallowfullscreen', '')
.appendTo($j('#vid_{$blockid}')) .appendTo($j('#vid_{$blockid}'))
.on("load", function() { .on("load", function() {
blockinstance_{$blockid}_loaded = true; blockinstance_{$blockid}_loaded = true;
......
...@@ -9,11 +9,11 @@ ...@@ -9,11 +9,11 @@
{/if} {/if}
{if $type == 'div'} {if $type == 'div'}
<div class="embedly-responsive" style="{$style1}"><iframe class="embedly-embed" frameborder="0" scrolling="no" allowfullscreen src="{$src}" width="{$width}" height="{$height}" style="{$style2}"></iframe></div> <div class="embedly-responsive" style="{$style1}"><iframe class="embedly-embed" allowfullscreen="1" src="{$src}" width="{$width}" height="{$height}" style="{$style2}"></iframe></div>
{/if} {/if}
{if $type == 'iframe'} {if $type == 'iframe'}
<iframe class="embedly-embed" frameborder="0" scrolling="no" allowfullscreen src="{$src}" width="{$width}" height="{$height}"></iframe> <iframe class="embedly-embed" allowfullscreen="1" src="{$src}" width="{$width}" height="{$height}"></iframe>
{/if} {/if}
</div> </div>
......
<div class="googleapps-container text-center"> <div class="googleapps-container text-center">
<div class="googleapps"> <div class="googleapps">
<iframe width="100%" height="{$height}" frameborder="0" src="{$url}"></iframe> <iframe width="100%" height="{$height}" src="{$url}"></iframe>
</div> </div>
</div> </div>
...@@ -82,6 +82,16 @@ body { ...@@ -82,6 +82,16 @@ body {
} }
} }
iframe {
&.pdfiframe {
width: 100%;
height: 500px;
}
&.externalvideoiframe {
width: 100%;
}
border: 0;
}
// Limit the width of external media // Limit the width of external media
// to fit the width of the column // to fit the width of the column
.mediaplayer-container iframe { .mediaplayer-container iframe {
......
{include file="header.tpl"} {include file="header.tpl"}
<div id="exportgeneration"> <div id="exportgeneration">
<h3>{str tag=pleasewaitwhileyourexportisbeinggenerated section=export}</h3> <h3>{str tag=pleasewaitwhileyourexportisbeinggenerated section=export}</h3>
<iframe src="{$WWWROOT}admin/users/bulkdownload.php" id="progress-iframe" scrolling="no" frameborder="none"></iframe> <iframe src="{$WWWROOT}admin/users/bulkdownload.php" id="progress-iframe"></iframe>
</div> </div>
{include file="footer.tpl"} {include file="footer.tpl"}
{include file="header.tpl"} {include file="header.tpl"}
<div id="exportgeneration"> <div id="exportgeneration">
<h3>{str tag=pleasewaitwhileyourexportisbeinggenerated section=export}</h3> <h3>{str tag=pleasewaitwhileyourexportisbeinggenerated section=export}</h3>
<iframe src="{$WWWROOT}export/download.php" id="progress-iframe" scrolling="no" frameborder="none"></iframe> <iframe src="{$WWWROOT}export/download.php" id="progress-iframe"></iframe>
</div> </div>
{include file="footer.tpl"} {include file="footer.tpl"}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment