summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2013-01-16 13:53:38 -0800
committerBart Visscher <bartv@thisnet.nl>2013-01-16 13:53:38 -0800
commitd42214ef81c1cc0a903cd16d8e97eed36871bd48 (patch)
tree17379a0b282874794f02b1f855f9453c0dc57526
parent1d57a2e2a9d5e392bb1061479543cd1dec860c4b (diff)
parentb659072686292907a61f14b211b3cb09fa98f5a0 (diff)
downloadnextcloud-server-d42214ef81c1cc0a903cd16d8e97eed36871bd48.tar.gz
nextcloud-server-d42214ef81c1cc0a903cd16d8e97eed36871bd48.zip
Merge pull request #1204 from Raydiation/master
Dont resize content div with javascript but use css box-sizing to do it
-rw-r--r--core/css/styles.css3
-rw-r--r--core/js/js.js9
-rw-r--r--core/templates/layout.user.php6
3 files changed, 8 insertions, 10 deletions
diff --git a/core/css/styles.css b/core/css/styles.css
index 496320561f8..7771fd52b9e 100644
--- a/core/css/styles.css
+++ b/core/css/styles.css
@@ -94,7 +94,8 @@ input[type="submit"].enabled { background:#66f866; border:1px solid #5e5; -moz-b
/* 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:12.5em; position:absolute; }
+#content { height: 100%; width: 100%; position: relative; }
+#content-wrapper { height: 100%; width: 100%; padding-top: 3.5em; padding-left: 12.5em; box-sizing: border-box; -moz-box-sizing: border-box; position: absolute;}
#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 95889ac8a27..23ace89f4e3 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -504,6 +504,7 @@ function fillHeight(selector) {
if(selector.outerHeight() > selector.height()){
selector.css('height', height-(selector.outerHeight()-selector.height()) + 'px');
}
+ console.warn("This function is deprecated! Use CSS instead");
}
/**
@@ -519,17 +520,11 @@ function fillWindow(selector) {
if(selector.outerWidth() > selector.width()){
selector.css('width', width-(selector.outerWidth()-selector.width()) + 'px');
}
+ console.warn("This function is deprecated! Use CSS instead");
}
$(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{
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php
index ba5053edecf..a16d2c9e55d 100644
--- a/core/templates/layout.user.php
+++ b/core/templates/layout.user.php
@@ -67,8 +67,10 @@
</ul>
</div></nav>
- <div id="content">
- <?php echo $_['content']; ?>
+ <div id="content-wrapper">
+ <div id="content">
+ <?php echo $_['content']; ?>
+ </div>
</div>
</body>
</html>