[Pkg-owncloud-commits] [owncloud] 19/62: fix scrutinizer issues
David Prévot
taffit at moszumanska.debian.org
Tue Jun 23 23:39:34 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v8.0.5beta
in repository owncloud.
commit a040a5b08e83b08d98780554cef053914fc01a4b
Author: Jan-Christoph Borchardt <hey at jancborchardt.net>
Date: Fri Mar 27 09:37:52 2015 +0100
fix scrutinizer issues
---
core/js/js.js | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/core/js/js.js b/core/js/js.js
index 410d515..4012952 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -1194,18 +1194,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);
@@ -1661,9 +1662,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);
-};
+}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list