Commit d176f873 authored by Annabel Dunstone's avatar Annabel Dunstone

Add content attributes to discussion diffs; change styling of add-note icon to...

Add content attributes to discussion diffs; change styling of add-note icon to prevent white spaces in paste
parent 7030ffb0
...@@ -69,10 +69,12 @@ ...@@ -69,10 +69,12 @@
&.noteable_line.old:before { &.noteable_line.old:before {
content: '-'; content: '-';
position: absolute;
} }
&.noteable_line.new:before { &.noteable_line.new:before {
content: '+'; content: '+';
position: absolute;
} }
span { span {
...@@ -400,14 +402,22 @@ ...@@ -400,14 +402,22 @@
} }
} }
.diff-line-num:not(.js-unfold-bottom) { .file-holder {
.diff-line-num:not(.js-unfold-bottom) {
a { a {
&:before { &:before {
content: attr(data-linenumber); content: attr(data-linenumber);
} }
-moz-user-select: none; }
-webkit-user-select: none; }
-ms-user-select: none; }
user-select: none;
.discussion {
.diff-content {
.diff-line-num {
&:before {
content: attr(data-linenumber);
}
}
} }
} }
...@@ -276,8 +276,7 @@ ul.notes { ...@@ -276,8 +276,7 @@ ul.notes {
.diff-file tr.line_holder { .diff-file tr.line_holder {
@mixin show-add-diff-note { @mixin show-add-diff-note {
filter: alpha(opacity=100); display: inline-block;
opacity: 1.0;
} }
.add-diff-note { .add-diff-note {
...@@ -291,13 +290,8 @@ ul.notes { ...@@ -291,13 +290,8 @@ ul.notes {
position: absolute; position: absolute;
z-index: 10; z-index: 10;
width: 32px; width: 32px;
transition: all 0.2s ease;
// "hide" it by default // "hide" it by default
opacity: 0.0; display: none;
filter: alpha(opacity=0);
&:hover { &:hover {
background: $gl-info; background: $gl-info;
color: #fff; color: #fff;
......
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
- line_old = line_new - @form.offset - line_old = line_new - @form.offset
%tr.line_holder %tr.line_holder
%td.old_line.diff-line-num{data: {linenumber: line_old}} %td.old_line.diff-line-num{data: {linenumber: line_old}}
/ = link_to raw(line_old), "#" = link_to raw(line_old), "#"
%td.new_line.diff-line-num{data: {linenumber: line_old}} %td.new_line.diff-line-num{data: {linenumber: line_old}}
/ = link_to raw(line_new) , "#" = link_to raw(line_new) , "#"
%td.line_content.noteable_line==#{' ' * @form.indent}#{line} %td.line_content.noteable_line==#{' ' * @form.indent}#{line}
- if @form.unfold? && @form.bottom? && @form.to < @blob.loc - if @form.unfold? && @form.bottom? && @form.to < @blob.loc
......
...@@ -20,10 +20,8 @@ ...@@ -20,10 +20,8 @@
%td.new_line.diff-line-num= "..." %td.new_line.diff-line-num= "..."
%td.line_content.match= line.text %td.line_content.match= line.text
- else - else
%td.old_line.diff-line-num %td.old_line.diff-line-num{data: {linenumber: raw(type == "new" ? "&nbsp;" : line.old_pos)}}
= raw(type == "new" ? "&nbsp;" : line.old_pos) %td.new_line.diff-line-num{data: {linenumber: raw(type == "old" ? "&nbsp;" : line.new_pos)}}
%td.new_line.diff-line-num
= raw(type == "old" ? "&nbsp;" : line.new_pos)
%td.line_content{class: "noteable_line #{type} #{line_code}", line_code: line_code}= diff_line_content(line.text) %td.line_content{class: "noteable_line #{type} #{line_code}", line_code: line_code}= diff_line_content(line.text)
- if line_code == note.line_code - if line_code == note.line_code
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment