mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Release commit
Refactoring
This commit is contained in:
parent
958c814c86
commit
484271bb69
21 changed files with 407 additions and 415 deletions
26
build/owncloud/rainloop-app/js/resize.js
Normal file
26
build/owncloud/rainloop-app/js/resize.js
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
$(function (window, document) {
|
||||
|
||||
var
|
||||
buffer = 5,
|
||||
ifr = document.getElementById('rliframe')
|
||||
;
|
||||
|
||||
|
||||
function pageY(elem) {
|
||||
return elem.offsetParent ? (elem.offsetTop + pageY(elem.offsetParent)) : elem.offsetTop;
|
||||
}
|
||||
|
||||
function resizeIframe() {
|
||||
var height = document.documentElement.clientHeight;
|
||||
height -= pageY(ifr) + buffer;
|
||||
height = (height < 0) ? 0 : height;
|
||||
ifr.style.height = height + 'px';
|
||||
}
|
||||
|
||||
if (ifr)
|
||||
{
|
||||
ifr.onload = resizeIframe;
|
||||
window.onresize = resizeIframe;
|
||||
}
|
||||
|
||||
}(window, document));
|
||||
Loading…
Add table
Add a link
Reference in a new issue