BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
c7609180
Unverified
Commit
c7609180
authored
Aug 07, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the sticky changes bar on commits page
parent
8fbbd3f2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
14 deletions
+23
-14
dispatcher.js
app/assets/javascripts/dispatcher.js
+3
-0
init_changes_dropdown.js
app/assets/javascripts/init_changes_dropdown.js
+10
-0
merge_request_tabs.js
app/assets/javascripts/merge_request_tabs.js
+2
-11
diff.scss
app/assets/stylesheets/pages/diff.scss
+5
-1
_diffs.html.haml
app/views/projects/diffs/_diffs.html.haml
+2
-1
_diffs.html.haml
app/views/projects/merge_requests/diffs/_diffs.html.haml
+1
-1
No files found.
app/assets/javascripts/dispatcher.js
View file @
c7609180
...
...
@@ -76,6 +76,7 @@ import initLegacyFilters from './init_legacy_filters';
import
initIssuableSidebar
from
'./init_issuable_sidebar'
;
import
GpgBadges
from
'./gpg_badges'
;
import
UserFeatureHelper
from
'./helpers/user_feature_helper'
;
import
initChangesDropdown
from
'./init_changes_dropdown'
;
(
function
()
{
var
Dispatcher
;
...
...
@@ -228,6 +229,7 @@ import UserFeatureHelper from './helpers/user_feature_helper';
break
;
case
'projects:compare:show'
:
new
gl
.
Diff
();
initChangesDropdown
();
break
;
case
'projects:branches:new'
:
case
'projects:branches:create'
:
...
...
@@ -320,6 +322,7 @@ import UserFeatureHelper from './helpers/user_feature_helper';
container
:
'.js-commit-pipeline-graph'
,
}).
bindEvents
();
initNotes
();
initChangesDropdown
();
$
(
'.commit-info.branches'
).
load
(
document
.
querySelector
(
'.js-commit-box'
).
dataset
.
commitPath
);
break
;
case
'projects:commit:pipelines'
:
...
...
app/assets/javascripts/init_changes_dropdown.js
0 → 100644
View file @
c7609180
import
stickyMonitor
from
'./lib/utils/sticky'
;
export
default
()
=>
{
stickyMonitor
(
document
.
querySelector
(
'.js-diff-files-changed'
));
$
(
'.js-diff-stats-dropdown'
).
glDropdown
({
filterable
:
true
,
remoteFilter
:
false
,
});
};
app/assets/javascripts/merge_request_tabs.js
View file @
c7609180
...
...
@@ -7,7 +7,7 @@ import Cookies from 'js-cookie';
import
'./breakpoints'
;
import
'./flash'
;
import
BlobForkSuggestion
from
'./blob/blob_fork_suggestion'
;
import
stickyMonitor
from
'./lib/utils/sticky
'
;
import
initChangesDropdown
from
'./init_changes_dropdown
'
;
/* eslint-disable max-len */
// MergeRequestTabs
...
...
@@ -267,9 +267,7 @@ import stickyMonitor from './lib/utils/sticky';
const
$container
=
$
(
'#diffs'
);
$container
.
html
(
data
.
html
);
this
.
initChangesDropdown
();
stickyMonitor
(
document
.
querySelector
(
'.js-diff-files-changed'
));
initChangesDropdown
();
if
(
typeof
gl
.
diffNotesCompileComponents
!==
'undefined'
)
{
gl
.
diffNotesCompileComponents
();
...
...
@@ -319,13 +317,6 @@ import stickyMonitor from './lib/utils/sticky';
});
}
initChangesDropdown
()
{
$
(
'.js-diff-stats-dropdown'
).
glDropdown
({
filterable
:
true
,
remoteFilter
:
false
,
});
}
// Show or hide the loading spinner
//
// status - Boolean, true to show, false to hide
...
...
app/assets/stylesheets/pages/diff.scss
View file @
c7609180
...
...
@@ -574,10 +574,14 @@
@media
(
min-width
:
$screen-sm-min
)
{
position
:
-
webkit-sticky
;
position
:
sticky
;
top
:
8
4px
;
top
:
3
4px
;
background-color
:
$white-light
;
z-index
:
190
;
&
.diff-files-changed-merge-request
{
top
:
84px
;
}
+
.files
,
+
.alert
{
margin-top
:
1px
;
...
...
app/views/projects/diffs/_diffs.html.haml
View file @
c7609180
...
...
@@ -2,8 +2,9 @@
-
show_whitespace_toggle
=
local_assigns
.
fetch
(
:show_whitespace_toggle
,
true
)
-
can_create_note
=
!
@diff_notes_disabled
&&
can?
(
current_user
,
:create_note
,
diffs
.
project
)
-
diff_files
=
diffs
.
diff_files
-
merge_request
=
local_assigns
.
fetch
(
:merge_request
,
false
)
.content-block.oneline-block.files-changed.diff-files-changed.js-diff-files-changed
.content-block.oneline-block.files-changed.diff-files-changed.js-diff-files-changed
{
class:
(
"diff-files-changed-merge-request"
if
merge_request
)
}
.files-changed-inner
.inline-parallel-buttons
-
if
!
diffs_expanded?
&&
diff_files
.
any?
{
|
diff_file
|
diff_file
.
collapsed?
}
...
...
app/views/projects/merge_requests/diffs/_diffs.html.haml
View file @
c7609180
-
if
@merge_request_diff
.
collected?
||
@merge_request_diff
.
overflow?
=
render
'projects/merge_requests/diffs/versions'
=
render
"projects/diffs/diffs"
,
diffs:
@diffs
,
environment:
@environment
=
render
"projects/diffs/diffs"
,
diffs:
@diffs
,
environment:
@environment
,
merge_request:
true
-
elsif
@merge_request_diff
.
empty?
.nothing-here-block
Nothing to merge from
#{
@merge_request
.
source_branch
}
into
#{
@merge_request
.
target_branch
}
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