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
Jérome Perrin
gitlab-ce
Commits
b57027f2
Commit
b57027f2
authored
Feb 05, 2017
by
Filipa Lacerda
Committed by
Annabel Dunstone Gray
Feb 08, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a new class to keep old behavior
parent
af143b3f
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
36 additions
and
36 deletions
+36
-36
app/assets/javascripts/diff.js.es6
app/assets/javascripts/diff.js.es6
+1
-1
app/assets/javascripts/single_file_diff.js
app/assets/javascripts/single_file_diff.js
+2
-2
app/views/admin/logs/show.html.haml
app/views/admin/logs/show.html.haml
+1
-1
app/views/ci/lints/show.html.haml
app/views/ci/lints/show.html.haml
+1
-1
app/views/discussions/_diff_with_notes.html.haml
app/views/discussions/_diff_with_notes.html.haml
+1
-1
app/views/help/ui.html.haml
app/views/help/ui.html.haml
+1
-1
app/views/projects/blame/show.html.haml
app/views/projects/blame/show.html.haml
+1
-1
app/views/projects/blob/_blob.html.haml
app/views/projects/blob/_blob.html.haml
+1
-1
app/views/projects/blob/_editor.html.haml
app/views/projects/blob/_editor.html.haml
+1
-1
app/views/projects/diffs/_file.html.haml
app/views/projects/diffs/_file.html.haml
+1
-1
app/views/projects/merge_requests/conflicts.html.haml
app/views/projects/merge_requests/conflicts.html.haml
+1
-1
app/views/projects/snippets/show.html.haml
app/views/projects/snippets/show.html.haml
+1
-1
app/views/projects/tree/_readme.html.haml
app/views/projects/tree/_readme.html.haml
+1
-1
app/views/search/results/_blob.html.haml
app/views/search/results/_blob.html.haml
+1
-1
app/views/search/results/_snippet_blob.html.haml
app/views/search/results/_snippet_blob.html.haml
+1
-1
app/views/search/results/_wiki_blob.html.haml
app/views/search/results/_wiki_blob.html.haml
+1
-1
app/views/shared/snippets/_form.html.haml
app/views/shared/snippets/_form.html.haml
+1
-1
app/views/sherlock/file_samples/show.html.haml
app/views/sherlock/file_samples/show.html.haml
+1
-1
app/views/snippets/show.html.haml
app/views/snippets/show.html.haml
+1
-1
spec/features/expand_collapse_diffs_spec.rb
spec/features/expand_collapse_diffs_spec.rb
+14
-14
spec/features/projects/files/find_file_keyboard_spec.rb
spec/features/projects/files/find_file_keyboard_spec.rb
+2
-2
No files found.
app/assets/javascripts/diff.js.es6
View file @
b57027f2
...
...
@@ -76,7 +76,7 @@ require('./lib/utils/url_utility');
const diffFile = diffTitle.closest('.diff-file');
const nothingHereBlock = $('.nothing-here-block:visible', diffFile);
if (nothingHereBlock.length) {
const clickTarget = $('.file-title, .click-to-expand', diffFile);
const clickTarget = $('.
js-
file-title, .click-to-expand', diffFile);
diffFile.data('singleFileDiff').toggleDiff(clickTarget, () => {
this.highlighSelectedLine();
if (cb) cb();
...
...
app/assets/javascripts/single_file_diff.js
View file @
b57027f2
...
...
@@ -33,13 +33,13 @@
this
.
$toggleIcon
.
addClass
(
'
fa-caret-down
'
);
}
$
(
'
.file-title, .click-to-expand
'
,
this
.
file
).
on
(
'
click
'
,
(
function
(
e
)
{
$
(
'
.
js-
file-title, .click-to-expand
'
,
this
.
file
).
on
(
'
click
'
,
(
function
(
e
)
{
this
.
toggleDiff
(
$
(
e
.
target
));
}).
bind
(
this
));
}
SingleFileDiff
.
prototype
.
toggleDiff
=
function
(
$target
,
cb
)
{
if
(
!
$target
.
hasClass
(
'
file-title
'
)
&&
!
$target
.
hasClass
(
'
click-to-expand
'
)
&&
!
$target
.
hasClass
(
'
diff-toggle-caret
'
))
return
;
if
(
!
$target
.
hasClass
(
'
js-
file-title
'
)
&&
!
$target
.
hasClass
(
'
click-to-expand
'
)
&&
!
$target
.
hasClass
(
'
diff-toggle-caret
'
))
return
;
this
.
isOpen
=
!
this
.
isOpen
;
if
(
!
this
.
isOpen
&&
!
this
.
hasError
)
{
this
.
content
.
hide
();
...
...
app/views/admin/logs/show.html.haml
View file @
b57027f2
...
...
@@ -18,7 +18,7 @@
.tab-pane
{
class:
(
klass
==
Gitlab
::
GitLogger
?
'active'
:
''
),
id:
klass
::
file_name_noext
}
.file-holder
#README
.file-title
.
js-file-title.
file-title
%i
.fa.fa-file
=
klass
::
file_name
.pull-right
...
...
app/views/ci/lints/show.html.haml
View file @
b57027f2
...
...
@@ -11,7 +11,7 @@
.form-group
.col-sm-12
.file-holder
.file-title.clearfix
.
js-file-title.
file-title.clearfix
Content of .gitlab-ci.yml
#ci-editor
.ci-editor
=
@content
=
text_area_tag
(
:content
,
@content
,
class:
'hidden form-control span1'
,
rows:
7
,
require:
true
)
...
...
app/views/discussions/_diff_with_notes.html.haml
View file @
b57027f2
...
...
@@ -2,7 +2,7 @@
-
blob
=
discussion
.
blob
.diff-file.file-holder
.file-title
.
js-file-title.
file-title
=
render
"projects/diffs/file_header"
,
diff_file:
diff_file
,
blob:
blob
,
diff_commit:
diff_file
.
content_commit
,
project:
discussion
.
project
,
url:
discussion_diff_path
(
discussion
)
.diff-content.code.js-syntax-highlight
...
...
app/views/help/ui.html.haml
View file @
b57027f2
...
...
@@ -528,7 +528,7 @@
-
blob
=
Snippet
.
new
(
content:
"Wow
\n
Such
\n
File"
)
.example
.file-holder
.file-title
.
js-file-title.
file-title
Awesome file
.file-actions
.btn-group
...
...
app/views/projects/blame/show.html.haml
View file @
b57027f2
...
...
@@ -7,7 +7,7 @@
#blob-content-holder
.tree-holder
.file-holder
.file-title
.
js-file-title.
file-title
=
blob_icon
@blob
.
mode
,
@blob
.
name
%strong
=
@path
...
...
app/views/projects/blob/_blob.html.haml
View file @
b57027f2
...
...
@@ -24,7 +24,7 @@
#blob-content-holder
.blob-content-holder
%article
.file-holder
.file-title
.
js-file-title.
file-title
=
blob_icon
blob
.
mode
,
blob
.
name
%strong
=
blob
.
name
...
...
app/views/projects/blob/_editor.html.haml
View file @
b57027f2
.file-holder.file.append-bottom-default
.file-title.clearfix
.
js-file-title.
file-title.clearfix
.editor-ref
=
icon
(
'code-fork'
)
=
ref
...
...
app/views/projects/diffs/_file.html.haml
View file @
b57027f2
-
environment
=
local_assigns
.
fetch
(
:environment
,
nil
)
.diff-file.file-holder
{
id:
file_hash
,
data:
diff_file_html_data
(
project
,
diff_file
.
file_path
,
diff_commit
.
id
)
}
.file-title-flex-parent
.
js-file-title.
file-title-flex-parent
=
render
"projects/diffs/file_header"
,
diff_file:
diff_file
,
blob:
blob
,
diff_commit:
diff_commit
,
project:
project
,
url:
"#
#{
file_hash
}
"
-
unless
diff_file
.
submodule?
...
...
app/views/projects/merge_requests/conflicts.html.haml
View file @
b57027f2
...
...
@@ -23,7 +23,7 @@
.files-wrapper
{
"v-if"
=>
"!isLoading && !hasError"
}
.files
.diff-file.file-holder.conflict
{
"v-for"
=>
"file in conflictsData.files"
}
.file-title
.
js-file-title.
file-title
%i
.fa.fa-fw
{
":class"
=>
"file.iconClass"
}
%strong
{{file.filePath}}
=
render
partial:
'projects/merge_requests/conflicts/file_actions'
...
...
app/views/projects/snippets/show.html.haml
View file @
b57027f2
...
...
@@ -4,7 +4,7 @@
.project-snippets
%article
.file-holder.snippet-file-content
.file-title
.
js-file-title.
file-title
=
blob_icon
0
,
@snippet
.
file_name
=
@snippet
.
file_name
.file-actions
...
...
app/views/projects/tree/_readme.html.haml
View file @
b57027f2
%article
.file-holder.readme-holder
.file-title
.
js-file-title.
file-title
=
blob_icon
readme
.
mode
,
readme
.
name
=
link_to
namespace_project_blob_path
(
@project
.
namespace
,
@project
,
tree_join
(
@ref
,
@path
,
readme
.
name
))
do
%strong
...
...
app/views/search/results/_blob.html.haml
View file @
b57027f2
-
file_name
,
blob
=
blob
.blob-result
.file-holder
.file-title
.
js-file-title.
file-title
-
ref
=
@search_results
.
repository_ref
-
blob_link
=
namespace_project_blob_path
(
@project
.
namespace
,
@project
,
tree_join
(
ref
,
file_name
))
=
link_to
blob_link
do
...
...
app/views/search/results/_snippet_blob.html.haml
View file @
b57027f2
...
...
@@ -14,7 +14,7 @@
-
snippet_path
=
reliable_snippet_path
(
snippet
)
=
link_to
snippet_path
do
.file-holder
.file-title
.
js-file-title.
file-title
%i
.fa.fa-file
%strong
=
snippet
.
file_name
-
if
markup?
(
snippet
.
file_name
)
...
...
app/views/search/results/_wiki_blob.html.haml
View file @
b57027f2
-
wiki_blob
=
parse_search_result
(
wiki_blob
)
.blob-result
.file-holder
.file-title
.
js-file-title.
file-title
=
link_to
namespace_project_wiki_path
(
@project
.
namespace
,
@project
,
wiki_blob
.
basename
)
do
%i
.fa.fa-file
%strong
...
...
app/views/shared/snippets/_form.html.haml
View file @
b57027f2
...
...
@@ -18,7 +18,7 @@
=
f
.
label
:file_name
,
"File"
,
class:
'control-label'
.col-sm-10
.file-holder.snippet
.file-title
.
js-file-title.
file-title
=
f
.
text_field
:file_name
,
placeholder:
"Optionally name this file to add code highlighting, e.g. example.rb for Ruby."
,
class:
'form-control snippet-file-name'
.file-content.code
%pre
#editor
=
@snippet
.
content
...
...
app/views/sherlock/file_samples/show.html.haml
View file @
b57027f2
...
...
@@ -26,7 +26,7 @@
=
@file_sample
.
events
%article
.file-holder
.file-title
.
js-file-title.
file-title
%i
.fa.fa-file-text-o.fa-fw
%strong
=
@file_sample
.
file
...
...
app/views/snippets/show.html.haml
View file @
b57027f2
...
...
@@ -3,7 +3,7 @@
=
render
'shared/snippets/header'
%article
.file-holder.snippet-file-content
.file-title
.
js-file-title.
file-title
=
blob_icon
0
,
@snippet
.
file_name
=
@snippet
.
file_name
.file-actions
...
...
spec/features/expand_collapse_diffs_spec.rb
View file @
b57027f2
...
...
@@ -72,8 +72,8 @@ feature 'Expand and collapse diffs', js: true, feature: true do
it
'collapses large diffs for renamed files by default'
do
expect
(
large_diff_renamed
).
not_to
have_selector
(
'.code'
)
expect
(
large_diff_renamed
).
to
have_selector
(
'.nothing-here-block'
)
expect
(
large_diff_renamed
).
to
have_selector
(
'.file-title .deletion'
)
expect
(
large_diff_renamed
).
to
have_selector
(
'.file-title .addition'
)
expect
(
large_diff_renamed
).
to
have_selector
(
'.
js-
file-title .deletion'
)
expect
(
large_diff_renamed
).
to
have_selector
(
'.
js-
file-title .addition'
)
end
it
'shows non-renderable diffs as such immediately, regardless of their size'
do
...
...
@@ -115,9 +115,9 @@ feature 'Expand and collapse diffs', js: true, feature: true do
context
'expanding a large diff'
do
before
do
# Wait for diffs
find
(
'.file-title'
,
match: :first
)
find
(
'.
js-
file-title'
,
match: :first
)
# Click `large_diff.md` title
all
(
'.file-title'
)[
1
].
click
all
(
'.
js-
file-title'
)[
1
].
click
wait_for_ajax
end
...
...
@@ -159,9 +159,9 @@ feature 'Expand and collapse diffs', js: true, feature: true do
context
'expanding the diff'
do
before
do
# Wait for diffs
find
(
'.file-title'
,
match: :first
)
find
(
'.
js-
file-title'
,
match: :first
)
# Click `large_diff.md` title
all
(
'.file-title'
)[
1
].
click
all
(
'.
js-
file-title'
)[
1
].
click
wait_for_ajax
end
...
...
@@ -181,9 +181,9 @@ feature 'Expand and collapse diffs', js: true, feature: true do
context
'collapsing an expanded diff'
do
before
do
# Wait for diffs
find
(
'.file-title'
,
match: :first
)
find
(
'.
js-
file-title'
,
match: :first
)
# Click `small_diff.md` title
all
(
'.file-title'
)[
3
].
click
all
(
'.
js-
file-title'
)[
3
].
click
end
it
'hides the diff content'
do
...
...
@@ -194,9 +194,9 @@ feature 'Expand and collapse diffs', js: true, feature: true do
context
're-expanding the same diff'
do
before
do
# Wait for diffs
find
(
'.file-title'
,
match: :first
)
find
(
'.
js-
file-title'
,
match: :first
)
# Click `small_diff.md` title
all
(
'.file-title'
)[
3
].
click
all
(
'.
js-
file-title'
)[
3
].
click
end
it
'shows the diff content'
do
...
...
@@ -290,9 +290,9 @@ feature 'Expand and collapse diffs', js: true, feature: true do
context
'collapsing an expanded diff'
do
before
do
# Wait for diffs
find
(
'.file-title'
,
match: :first
)
find
(
'.
js-
file-title'
,
match: :first
)
# Click `small_diff.md` title
all
(
'.file-title'
)[
3
].
click
all
(
'.
js-
file-title'
)[
3
].
click
end
it
'hides the diff content'
do
...
...
@@ -303,9 +303,9 @@ feature 'Expand and collapse diffs', js: true, feature: true do
context
're-expanding the same diff'
do
before
do
# Wait for diffs
find
(
'.file-title'
,
match: :first
)
find
(
'.
js-
file-title'
,
match: :first
)
# Click `small_diff.md` title
all
(
'.file-title'
)[
3
].
click
all
(
'.
js-
file-title'
)[
3
].
click
end
it
'shows the diff content'
do
...
...
spec/features/projects/files/find_file_keyboard_spec.rb
View file @
b57027f2
...
...
@@ -22,7 +22,7 @@ feature 'Find file keyboard shortcuts', feature: true, js: true do
expect
(
page
).
to
have_selector
(
'.blob-content-holder'
)
page
.
within
(
'.file-title'
)
do
page
.
within
(
'.
js-
file-title'
)
do
expect
(
page
).
to
have_content
(
'CHANGELOG'
)
end
end
...
...
@@ -35,7 +35,7 @@ feature 'Find file keyboard shortcuts', feature: true, js: true do
expect
(
page
).
to
have_selector
(
'.blob-content-holder'
)
page
.
within
(
'.file-title'
)
do
page
.
within
(
'.
js-
file-title'
)
do
expect
(
page
).
to
have_content
(
'application.js'
)
end
end
...
...
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