aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2012-10-27 19:42:25 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2012-10-27 19:42:25 +0200
commita6f3a570c68440eeb51d8b25cf7a1cef0f723a15 (patch)
tree2e77b01413933f68c24181a69fd17e14810f6002
parentfc280b28876bd1b57a8f4a5710da26adb8ebb3b9 (diff)
downloadnextcloud-server-a6f3a570c68440eeb51d8b25cf7a1cef0f723a15.tar.gz
nextcloud-server-a6f3a570c68440eeb51d8b25cf7a1cef0f723a15.zip
dont resize content div with javascript but use css box-sizing to do it
-rw-r--r--core/css/styles.css9
-rw-r--r--core/js/js.js36
2 files changed, 8 insertions, 37 deletions
diff --git a/core/css/styles.css b/core/css/styles.css
index 677d44658e8..1fc958940cc 100644
--- a/core/css/styles.css
+++ b/core/css/styles.css
@@ -56,7 +56,14 @@ input[type="submit"].highlight{ background:#ffc100; border:1px solid #db0; text-
/* CONTENT ------------------------------------------------------------------ */
#controls { padding: 0 0.5em; width:100%; top:3.5em; height:2.8em; margin:0; background:#f7f7f7; border-bottom:1px solid #eee; position:fixed; z-index:50; -moz-box-shadow:0 -3px 7px #000; -webkit-box-shadow:0 -3px 7px #000; box-shadow:0 -3px 7px #000; }
#controls .button { display:inline-block; }
-#content { top:3.5em; left:64px; position: absolute; }
+#content {
+ height: 100%;
+ width: 100%;
+ padding-top: 3.5em;
+ padding-left: 64px;
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+}
#leftcontent, .leftcontent { position:fixed; overflow: auto; top:6.4em; width:20em; background:#f8f8f8; border-right:1px solid #ddd; }
#leftcontent li, .leftcontent li { background:#f8f8f8; padding:.5em .8em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; -webkit-transition:background-color 200ms; -moz-transition:background-color 200ms; -o-transition:background-color 200ms; transition:background-color 200ms; }
#leftcontent li:hover, #leftcontent li:active, #leftcontent li.active, .leftcontent li:hover, .leftcontent li:active, .leftcontent li.active { background:#eee; }
diff --git a/core/js/js.js b/core/js/js.js
index c5e32f3c278..3bc988a2b6e 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -464,44 +464,8 @@ function object(o) {
}
-/**
- * Fills height of window. (more precise than height: 100%;)
- */
-function fillHeight(selector) {
- if (selector.length === 0) {
- return;
- }
- var height = parseFloat($(window).height())-selector.offset().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) {
- if (selector.length === 0) {
- return;
- }
- fillHeight(selector);
- var width = parseFloat($(window).width())-selector.offset().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($('#content'));
- fillWindow($('#rightcontent'));
- });
- $(window).trigger('resize');
-
if(!SVGSupport()){ //replace all svg images with png images for browser that dont support svg
replaceSVG();
}else{