Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
701cb27a
Commit
701cb27a
authored
Mar 27, 2015
by
Jan-Christoph Borchardt
Browse files
fix scrutinizer issues
parent
d728b85f
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/js/js.js
View file @
701cb27a
...
@@ -1264,18 +1264,19 @@ function initCore() {
...
@@ -1264,18 +1264,19 @@ function initCore() {
// adjust controls bar width
// adjust controls bar width
var
adjustControlsWidth
=
function
()
{
var
adjustControlsWidth
=
function
()
{
if
(
$
(
'
#controls
'
).
length
)
{
if
(
$
(
'
#controls
'
).
length
)
{
var
controlsWidth
;
// if there is a scrollbar …
// if there is a scrollbar …
if
(
$
(
'
#app-content
'
).
get
(
0
).
scrollHeight
>
$
(
'
#app-content
'
).
height
())
{
if
(
$
(
'
#app-content
'
).
get
(
0
).
scrollHeight
>
$
(
'
#app-content
'
).
height
())
{
if
(
$
(
window
).
width
()
>
768
)
{
if
(
$
(
window
).
width
()
>
768
)
{
var
controlsWidth
=
$
(
'
#content
'
).
width
()
-
$
(
'
#app-navigation
'
).
width
()
-
getScrollBarWidth
();
controlsWidth
=
$
(
'
#content
'
).
width
()
-
$
(
'
#app-navigation
'
).
width
()
-
getScrollBarWidth
();
}
else
{
}
else
{
var
controlsWidth
=
$
(
'
#content
'
).
width
()
-
getScrollBarWidth
();
controlsWidth
=
$
(
'
#content
'
).
width
()
-
getScrollBarWidth
();
}
}
}
else
{
// if there is none
}
else
{
// if there is none
if
(
$
(
window
).
width
()
>
768
)
{
if
(
$
(
window
).
width
()
>
768
)
{
var
controlsWidth
=
$
(
'
#content
'
).
width
()
-
$
(
'
#app-navigation
'
).
width
();
controlsWidth
=
$
(
'
#content
'
).
width
()
-
$
(
'
#app-navigation
'
).
width
();
}
else
{
}
else
{
var
controlsWidth
=
$
(
'
#content
'
).
width
();
controlsWidth
=
$
(
'
#content
'
).
width
();
}
}
}
}
$
(
'
#controls
'
).
css
(
'
width
'
,
controlsWidth
);
$
(
'
#controls
'
).
css
(
'
width
'
,
controlsWidth
);
...
@@ -1731,9 +1732,11 @@ function getScrollBarWidth() {
...
@@ -1731,9 +1732,11 @@ function getScrollBarWidth() {
var
w1
=
inner
.
offsetWidth
;
var
w1
=
inner
.
offsetWidth
;
outer
.
style
.
overflow
=
'
scroll
'
;
outer
.
style
.
overflow
=
'
scroll
'
;
var
w2
=
inner
.
offsetWidth
;
var
w2
=
inner
.
offsetWidth
;
if
(
w1
==
w2
)
w2
=
outer
.
clientWidth
;
if
(
w1
===
w2
)
{
w2
=
outer
.
clientWidth
;
}
document
.
body
.
removeChild
(
outer
);
document
.
body
.
removeChild
(
outer
);
return
(
w1
-
w2
);
return
(
w1
-
w2
);
}
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment