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
Léo-Paul Géneau
gitlab-ce
Commits
9e8aadb0
Commit
9e8aadb0
authored
Nov 21, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2026 from koenpunt/extended-image-diff
Added bg for transparent images
parents
7392d28d
1de0ea28
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
app/assets/images/trans_bg.gif
app/assets/images/trans_bg.gif
+0
-0
app/assets/stylesheets/sections/commits.scss
app/assets/stylesheets/sections/commits.scss
+4
-1
app/views/commit/show.html.haml
app/views/commit/show.html.haml
+15
-0
No files found.
app/assets/images/trans_bg.gif
0 → 100644
View file @
9e8aadb0
58 Bytes
app/assets/stylesheets/sections/commits.scss
View file @
9e8aadb0
...
...
@@ -133,9 +133,12 @@
.image
{
display
:
inline-block
;
margin
:
50px
;
padding
:
1px
;
max-width
:
400px
;
img
{
background
:
url('trans_bg.gif')
;
}
&
.diff_removed
{
img
{
border
:
1px
solid
#C00
;
...
...
app/views/commit/show.html.haml
View file @
9e8aadb0
...
...
@@ -7,4 +7,19 @@
:javascript
$
(
function
(){
PerLineNotes
.
init
();
var
w
,
h
;
$
(
'
.diff_file
'
).
each
(
function
(){
$
(
'
.image.diff_removed img
'
,
this
).
on
(
'
load
'
,
$
.
proxy
(
function
(
event
){
var
w
=
event
.
currentTarget
.
naturalWidth
,
h
=
event
.
currentTarget
.
naturalHeight
;
$
(
'
.image.diff_removed .image-info
'
,
this
).
append
(
'
| <b>W:</b>
'
+
w
+
'
px | <b>H:</b>
'
+
h
+
'
px
'
);
},
this
));
$
(
'
.image.diff_added img
'
,
this
).
on
(
'
load
'
,
$
.
proxy
(
function
(
event
){
var
w
=
event
.
currentTarget
.
naturalWidth
,
h
=
event
.
currentTarget
.
naturalHeight
;
$
(
'
.image.diff_added .image-info
'
,
this
).
append
(
'
| <b>W:</b>
'
+
w
+
'
px | <b>H:</b>
'
+
h
+
'
px
'
);
},
this
));
});
});
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