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
c3415873
Commit
c3415873
authored
Dec 04, 2016
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Instantiate ImageFile for diff-files in Diff
parent
0819d093
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
4 deletions
+11
-4
app/assets/javascripts/commit/file.js
app/assets/javascripts/commit/file.js
+1
-1
app/assets/javascripts/commit/image_file.js
app/assets/javascripts/commit/image_file.js
+1
-1
app/assets/javascripts/diff.js.es6
app/assets/javascripts/diff.js.es6
+5
-2
changelogs/unreleased/24949-view-2-up-swipe-onion-skin-controls-for-merge-request-diff-containing-an-image.yml
...n-controls-for-merge-request-diff-containing-an-image.yml
+4
-0
No files found.
app/assets/javascripts/commit/file.js
View file @
c3415873
...
...
@@ -3,7 +3,7 @@
this
.
CommitFile
=
(
function
()
{
function
CommitFile
(
file
)
{
if
(
$
(
'
.image
'
,
file
).
length
)
{
new
ImageFile
(
file
);
new
gl
.
ImageFile
(
file
);
}
}
...
...
app/assets/javascripts/commit/image_file.js
View file @
c3415873
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, no-use-before-define, prefer-arrow-callback, no-else-return, consistent-return, prefer-template, quotes, one-var, one-var-declaration-per-line, no-unused-vars, no-return-assign, comma-dangle, quote-props, no-unused-expressions, no-sequences, object-shorthand, padded-blocks, max-len */
(
function
()
{
this
.
ImageFile
=
(
function
()
{
gl
.
ImageFile
=
(
function
()
{
var
prepareFrames
;
// Width where images must fits in, for 2-up this gets divided by 2
...
...
app/assets/javascripts/diff.js.es6
View file @
c3415873
...
...
@@ -5,8 +5,11 @@
class Diff {
constructor() {
$('.files .diff-file').singleFileDiff();
$('.files .diff-file').filesCommentButton();
const $diffFile = $('.files .diff-file');
$diffFile.singleFileDiff();
$diffFile.filesCommentButton();
$diffFile.each((index, file) => new gl.ImageFile(file));
if (this.diffViewType() === 'parallel') {
$('.content-wrapper .container-fluid').removeClass('container-limited');
...
...
changelogs/unreleased/24949-view-2-up-swipe-onion-skin-controls-for-merge-request-diff-containing-an-image.yml
0 → 100644
View file @
c3415873
---
title
:
Add image controls to MR diffs
merge_request
:
7919
author
:
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