Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/maven/fixes/8.0' into maven/rele…
Browse files Browse the repository at this point in the history
…ase/8.0
  • Loading branch information
metaventis-build committed May 23, 2023
2 parents 732639c + 48e35b6 commit d64ffe4
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 44 deletions.
8 changes: 8 additions & 0 deletions src/main/php/theme/default/css/dynamic.php
Original file line number Diff line number Diff line change
Expand Up @@ -455,3 +455,11 @@
.dataProtectionRegulationsDialog {
border-radius: 5px;
}
.h5p-org-content-wrapper #edusharing_toggle_fullscreen {
position: absolute;
overflow: hidden;
width: 54px;
padding: 0px 8px;
top: 23px;
right: 20px;
}
31 changes: 31 additions & 0 deletions src/main/php/theme/default/js/fullscreen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
$('#edusharing_toggle_fullscreen').on('click', function(){
// if already full screen; exit
// else go fullscreen
if (
document.fullscreenElement ||
document.webkitFullscreenElement ||
document.mozFullScreenElement ||
document.msFullscreenElement
) {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
} else {
element = $('.edusharing_rendering_fullscreen_wrapper').get(0);
if (element.requestFullscreen) {
element.requestFullscreen();
} else if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if (element.webkitRequestFullscreen) {
element.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
} else if (element.msRequestFullscreen) {
element.msRequestFullscreen();
}
}
});
9 changes: 8 additions & 1 deletion src/main/php/theme/default/module/h5p/dynamic.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,16 @@ $id = uniqid();
<div class="edusharing_rendering_wrapper h5p-org-content-wrapper" vocab="http://schema.org/" typeof="WebPage">
<h1 class="edusharing_rendering_content_title"><?php echo htmlentities($title) ?></h1>
<div class="edusharing_rendering_content_wrapper" >
<i id="edusharing_toggle_fullscreen" class="btn material-icons">fullscreen</i>
<?php if(empty($h5p_new)){ ?>
<iframe src="<?php echo $iframeurl?>" style="width:85%;border:none" allowfullscreen="allowfullscreen" frameBorder="0" scrolling="no"></iframe>
<iframe src="<?php echo $iframeurl?>" style="width:85%;border:none"
class="edusharing_rendering_fullscreen_wrapper"
allowfullscreen="allowfullscreen"
frameBorder="0"
scrolling="no"></iframe>
<script src="<?php echo $MC_URL; ?>/modules/h5p/h5p-resizer.js" charset="UTF-8"></script>
<script src="<?php echo $MC_URL?>/vendor/js/getJS.php"></script>
<script src="<?php echo $MC_URL?>/theme/default/js/fullscreen.js"></script>
<?php }else{ ?>
<h3><?php echo $h5p_new?></h3>
<?php } ?>
Expand Down
54 changes: 11 additions & 43 deletions src/main/php/theme/default/module/picture/dynamic.phtml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<?php
<?php
global $Locale, $Translate;
$msg = array();
$msg['imageDescriptionNotAvailable'] = new Phools_Message_Default('imageDescriptionNotAvailable');
?>

<style>
<?php include(dirname(__FILE__) . '/../../css/dynamic.php'); ?>
<?php include(dirname(__FILE__) . '/../../css/metadata.css'); ?>
<?php include(dirname(__FILE__) . '/../../css/dynamic.php'); ?>
<?php include(dirname(__FILE__) . '/../../css/metadata.css'); ?>
</style>
<div class="edusharing_rendering_wrapper" vocab="http://schema.org/" typeof="WebPage">
<h1 class="edusharing_rendering_content_title"><?php echo htmlentities($title) ?></h1>
<div class="edusharing_rendering_content_wrapper" >
<h1 class="edusharing_rendering_content_title"><?php echo htmlentities($title) ?></h1>
<div class="edusharing_rendering_content_wrapper" >
<div class="edusharing_rendering_fullscreen_wrapper">
<img
class="edusharing_rendering_content"
src="<?php echo htmlentities($image_url, ENT_QUOTES, 'UTF-8') ?>"
alt="<?php echo $msg['imageDescriptionNotAvailable'] -> localize($Locale, $Translate) ?>"
class="edusharing_rendering_content"
src="<?php echo htmlentities($image_url, ENT_QUOTES, 'UTF-8') ?>"
alt="<?php echo $msg['imageDescriptionNotAvailable'] -> localize($Locale, $Translate) ?>"
>
<i id="edusharing_toggle_fullscreen" class="material-icons">fullscreen</i>
</div>
</div>
<?php echo $metadata; ?>
</div>
<?php echo $metadata; ?>
</div>
<?php
$downloadUrl = Config::get('downloadUrl');
Expand All @@ -29,36 +29,4 @@ if(!empty($downloadUrl))
?>

<script src="<?php echo $MC_URL?>/vendor/js/getJS.php"></script>
<script>
$('#edusharing_toggle_fullscreen').on('click', function(){
// if already full screen; exit
// else go fullscreen
if (
document.fullscreenElement ||
document.webkitFullscreenElement ||
document.mozFullScreenElement ||
document.msFullscreenElement
) {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if (document.webkitExitFullscreen) {
document.webkitExitFullscreen();
} else if (document.msExitFullscreen) {
document.msExitFullscreen();
}
} else {
element = $('.edusharing_rendering_fullscreen_wrapper').get(0);
if (element.requestFullscreen) {
element.requestFullscreen();
} else if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if (element.webkitRequestFullscreen) {
element.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
} else if (element.msRequestFullscreen) {
element.msRequestFullscreen();
}
}
});
</script>
<script src="<?php echo $MC_URL?>/theme/default/js/fullscreen.js"></script>

0 comments on commit d64ffe4

Please sign in to comment.