diff --git a/app/assets/stylesheets/pages/diff.scss b/app/assets/stylesheets/pages/diff.scss index ca7fa2094b6f5859813854655e7b97d52f94234d..bd7640db3b707cef223732a8ae38c0c5e3f2c3b6 100644 --- a/app/assets/stylesheets/pages/diff.scss +++ b/app/assets/stylesheets/pages/diff.scss @@ -69,10 +69,12 @@ &.noteable_line.old:before { content: '-'; + position: absolute; } &.noteable_line.new:before { content: '+'; + position: absolute; } span { @@ -400,14 +402,22 @@ } } -.diff-line-num:not(.js-unfold-bottom) { - a { - &:before { - content: attr(data-linenumber); +.file-holder { + .diff-line-num:not(.js-unfold-bottom) { + a { + &:before { + content: attr(data-linenumber); + } + } + } +} + +.discussion { + .diff-content { + .diff-line-num { + &:before { + content: attr(data-linenumber); + } } - -moz-user-select: none; - -webkit-user-select: none; - -ms-user-select: none; - user-select: none; } } diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index e421a31549ab12c1e8511c4e98c6c27c3dc56328..ce44f5aa13bb9ac4eb33f46c8200a6106d7a27b4 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -276,8 +276,7 @@ ul.notes { .diff-file tr.line_holder { @mixin show-add-diff-note { - filter: alpha(opacity=100); - opacity: 1.0; + display: inline-block; } .add-diff-note { @@ -291,13 +290,8 @@ ul.notes { position: absolute; z-index: 10; width: 32px; - - transition: all 0.2s ease; - // "hide" it by default - opacity: 0.0; - filter: alpha(opacity=0); - + display: none; &:hover { background: $gl-info; color: #fff; diff --git a/app/views/projects/blob/diff.html.haml b/app/views/projects/blob/diff.html.haml index ea6d4df72556a851960cf15c93931f02c9c96251..c6ed78aadf673a1c662c69682479bef57460a2d0 100644 --- a/app/views/projects/blob/diff.html.haml +++ b/app/views/projects/blob/diff.html.haml @@ -9,9 +9,9 @@ - line_old = line_new - @form.offset %tr.line_holder %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}} - / = link_to raw(line_new) , "#" + = link_to raw(line_new) , "#" %td.line_content.noteable_line==#{' ' * @form.indent}#{line} - if @form.unfold? && @form.bottom? && @form.to < @blob.loc diff --git a/app/views/projects/notes/discussions/_diff.html.haml b/app/views/projects/notes/discussions/_diff.html.haml index 820e31ccd61b8528cdc4f2388688918572f46bd8..6abfb3abc3b1f28b18b5fb38f216b95157ae9441 100644 --- a/app/views/projects/notes/discussions/_diff.html.haml +++ b/app/views/projects/notes/discussions/_diff.html.haml @@ -20,10 +20,8 @@ %td.new_line.diff-line-num= "..." %td.line_content.match= line.text - else - %td.old_line.diff-line-num - = raw(type == "new" ? " " : line.old_pos) - %td.new_line.diff-line-num - = raw(type == "old" ? " " : line.new_pos) + %td.old_line.diff-line-num{data: {linenumber: raw(type == "new" ? " " : line.old_pos)}} + %td.new_line.diff-line-num{data: {linenumber: raw(type == "old" ? " " : line.new_pos)}} %td.line_content{class: "noteable_line #{type} #{line_code}", line_code: line_code}= diff_line_content(line.text) - if line_code == note.line_code