This repository was archived by the owner on Nov 4, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +20
-18
lines changed
integrations/nextcloud/snappymail Expand file tree Collapse file tree 2 files changed +20
-18
lines changed Original file line number Diff line number Diff line change 1- ( ( ) => {
2-
3- const
4- buffer = 0 , //was 5 but this was creating a white space of 5px at the bottom of the page
5- ifr = document . getElementById ( 'rliframe' ) ,
6- pageY = elem => elem . offsetParent ? ( elem . offsetTop + pageY ( elem . offsetParent ) ) : elem . offsetTop ,
7- resizeIframe = ( ) => {
8- var height = document . documentElement . clientHeight ;
9- height -= pageY ( ifr ) + buffer ;
10- height = ( height < 0 ) ? 0 : height ;
11- ifr . style . height = height + 'px' ;
12- } ;
13- if ( ifr ) {
14- ifr . onload = resizeIframe ;
15- window . onresize = resizeIframe ;
1+ document . addEventListener ( 'readystatechange' , ( ) => {
2+ if ( document . readyState === 'complete' ) {
3+ const
4+ buffer = 0 , //was 5 but this was creating a white space of 5px at the bottom of the page
5+ ifr = document . getElementById ( 'rliframe' ) ,
6+ pageY = elem => elem . offsetParent ? ( elem . offsetTop + pageY ( elem . offsetParent ) ) : elem . offsetTop ,
7+ resizeIframe = ( ) => {
8+ var height = document . documentElement . clientHeight ;
9+ height -= pageY ( ifr ) + buffer ;
10+ height = ( height < 0 ) ? 0 : height ;
11+ ifr . style . height = height + 'px' ;
12+ } ;
13+ if ( ifr ) {
14+ ifr . onload = resizeIframe ;
15+ window . onresize = resizeIframe ;
16+ }
1617 }
17-
18- } ) ( ) ;
18+ } ) ;
Original file line number Diff line number Diff line change 1- <iframe id="rliframe" style="border: none; width: 100%; height: 100%; position: relative;" tabindex="-1" frameborder="0" src="<?php echo $ _ ['snappymail-iframe-url ' ]; ?> "></iframe><?php OCP \Util::addScript ('snappymail ' , 'resize ' );
1+ <iframe id="rliframe" style="border: none; width: 100%; min-height: 100%; position: relative;" tabindex="-1" frameborder="0" src="<?php echo $ _ ['snappymail-iframe-url ' ]; ?> "></iframe>
2+ <?php
3+ // OCP\Util::addScript('snappymail', 'resize');
You can’t perform that action at this time.
0 commit comments