summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <hey@jancborchardt.net>2015-03-27 09:37:52 +0100
committerJan-Christoph Borchardt <hey@jancborchardt.net>2015-03-27 09:38:41 +0100
commit701cb27a9e27e26aa6a4460e5a7e4b713b79eac3 (patch)
tree7eba271e1be4afa426a9e6fe157dabdd2d69d7b9 /core/js
parentd728b85fddb91bc9f854e6f4b66772d666aaf732 (diff)
downloadnextcloud-server-701cb27a9e27e26aa6a4460e5a7e4b713b79eac3.tar.gz
nextcloud-server-701cb27a9e27e26aa6a4460e5a7e4b713b79eac3.zip
fix scrutinizer issues
Diffstat (limited to 'core/js')
-rw-r--r--core/js/js.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 26eac9c01a8..274eddffff7 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -1264,18 +1264,19 @@ function initCore() {
// adjust controls bar width
var adjustControlsWidth = function() {
if($('#controls').length) {
+ var controlsWidth;
// if there is a scrollbar …
if($('#app-content').get(0).scrollHeight > $('#app-content').height()) {
if($(window).width() > 768) {
- var controlsWidth = $('#content').width() - $('#app-navigation').width() - getScrollBarWidth();
+ controlsWidth = $('#content').width() - $('#app-navigation').width() - getScrollBarWidth();
} else {
- var controlsWidth = $('#content').width() - getScrollBarWidth();
+ controlsWidth = $('#content').width() - getScrollBarWidth();
}
} else { // if there is none
if($(window).width() > 768) {
- var controlsWidth = $('#content').width() - $('#app-navigation').width();
+ controlsWidth = $('#content').width() - $('#app-navigation').width();
} else {
- var controlsWidth = $('#content').width();
+ controlsWidth = $('#content').width();
}
}
$('#controls').css('width', controlsWidth);
@@ -1731,9 +1732,11 @@ function getScrollBarWidth() {
var w1 = inner.offsetWidth;
outer.style.overflow = 'scroll';
var w2 = inner.offsetWidth;
- if (w1 == w2) w2 = outer.clientWidth;
+ if(w1 === w2) {
+ w2 = outer.clientWidth;
+ }
document.body.removeChild (outer);
return (w1 - w2);
-};
+}