Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
d86cbe69
Commit
d86cbe69
authored
Jul 28, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed alignment in button
correctly scroll to element with sticky height offset
parent
30777178
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
app/assets/javascripts/lib/utils/common_utils.js
app/assets/javascripts/lib/utils/common_utils.js
+8
-2
app/views/projects/diffs/_stats.html.haml
app/views/projects/diffs/_stats.html.haml
+2
-2
No files found.
app/assets/javascripts/lib/utils/common_utils.js
View file @
d86cbe69
...
@@ -86,8 +86,9 @@
...
@@ -86,8 +86,9 @@
// This is required to handle non-unicode characters in hash
// This is required to handle non-unicode characters in hash
hash
=
decodeURIComponent
(
hash
);
hash
=
decodeURIComponent
(
hash
);
var
fixedTabs
=
document
.
querySelector
(
'
.js-tabs-affix
'
);
const
fixedTabs
=
document
.
querySelector
(
'
.js-tabs-affix
'
);
var
fixedNav
=
document
.
querySelector
(
'
.navbar-gitlab
'
);
const
fixedDiffStats
=
document
.
querySelector
(
'
.js-diff-files-changed.is-stuck
'
);
const
fixedNav
=
document
.
querySelector
(
'
.navbar-gitlab
'
);
var
adjustment
=
0
;
var
adjustment
=
0
;
if
(
fixedNav
)
adjustment
-=
fixedNav
.
offsetHeight
;
if
(
fixedNav
)
adjustment
-=
fixedNav
.
offsetHeight
;
...
@@ -104,6 +105,11 @@
...
@@ -104,6 +105,11 @@
if
(
fixedTabs
)
{
if
(
fixedTabs
)
{
adjustment
-=
fixedTabs
.
offsetHeight
;
adjustment
-=
fixedTabs
.
offsetHeight
;
}
}
if
(
fixedDiffStats
)
{
adjustment
-=
fixedDiffStats
.
offsetHeight
;
}
window
.
scrollBy
(
0
,
adjustment
);
window
.
scrollBy
(
0
,
adjustment
);
}
}
};
};
...
...
app/views/projects/diffs/_stats.html.haml
View file @
d86cbe69
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
Showing
Showing
%button
.diff-stats-summary-toggler.js-diff-stats-dropdown
{
type:
"button"
,
data:
{
toggle:
"dropdown"
}
}
<
%button
.diff-stats-summary-toggler.js-diff-stats-dropdown
{
type:
"button"
,
data:
{
toggle:
"dropdown"
}
}
<
=
pluralize
(
diff_files
.
size
,
"changed file"
)
=
pluralize
(
diff_files
.
size
,
"changed file"
)
=
icon
(
"caret-down
fw
"
)
=
icon
(
"caret-down
"
,
class:
"prepend-left-5
"
)
%span
.diff-stats-additions-deletions-expanded
#diff-stats
%span
.diff-stats-additions-deletions-expanded
#diff-stats
with
with
%strong
.cgreen
#{
sum_added_lines
}
additions
%strong
.cgreen
#{
sum_added_lines
}
additions
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
%strong
.cred
<
%strong
.cred
<
\
-
#{
sum_removed_lines
}
\
-
#{
sum_removed_lines
}
.dropdown-menu.diff-file-changes
.dropdown-menu.diff-file-changes
=
dropdown_filter
(
"Search file"
)
=
dropdown_filter
(
"Search file
s
"
)
.dropdown-content
.dropdown-content
%ul
%ul
-
diff_files
.
each
do
|
diff_file
|
-
diff_files
.
each
do
|
diff_file
|
...
...
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