summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorMarvin Thomas Rabe <m.rabe@echtzeitraum.de>2011-10-04 18:54:07 +0200
committerMarvin Thomas Rabe <m.rabe@echtzeitraum.de>2011-10-04 18:54:07 +0200
commitde213782913179a793fba48f3cf8f3843a4207eb (patch)
tree8c3f5d8f3194df1611d0d66e756d1d90df1aa420 /core/js
parentb60f755f4fbe95924c3b5c77cda93016e3393a60 (diff)
downloadnextcloud-server-de213782913179a793fba48f3cf8f3843a4207eb.tar.gz
nextcloud-server-de213782913179a793fba48f3cf8f3843a4207eb.zip
fixed scrollbar issues
Diffstat (limited to 'core/js')
-rw-r--r--core/js/js.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 61a60c52485..9e814ca0729 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -244,7 +244,36 @@ function object(o) {
return new F();
}
+
+/**
+ * Fills height of window. (more precise than height: 100%;)
+ */
+function fillHeight(selector) {
+ var height = parseFloat($(window).height())-parseFloat(selector.css('top'));
+ selector.css('height', height + 'px');
+ if(selector.outerHeight() > selector.height())
+ selector.css('height', height-(selector.outerHeight()-selector.height()) + 'px');
+}
+
+/**
+ * Fills height and width of window. (more precise than height: 100%; or width: 100%;)
+ */
+function fillWindow(selector) {
+ fillHeight(selector);
+ var width = parseFloat($(window).width())-parseFloat(selector.css('left'));
+ selector.css('width', width + 'px');
+ if(selector.outerWidth() > selector.width())
+ selector.css('width', width-(selector.outerWidth()-selector.width()) + 'px');
+}
+
$(document).ready(function(){
+
+ $(window).resize(function () {
+ fillHeight($('#leftcontent'));
+ fillWindow($('#rightcontent'));
+ });
+ $(window).trigger('resize');
+
if(!SVGSupport()){//replace all svg images with png images for browser that dont support svg
replaceSVG();
}else{