diff --git a/CHANGELOG b/CHANGELOG index 09b60e8e54a..f279c7c923a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ Please view this file on the master branch, on stable branches it's out of date. v 7.10.0 (unreleased) + - enable line wrapping per default and remove the checkbox to toggle it (Hannes Rosenögger) - Add a service to support external wikis (Hannes Rosenögger) v 7.9.0 (unreleased) diff --git a/app/assets/javascripts/behaviors/toggle_diff_line_wrap_behavior.coffee b/app/assets/javascripts/behaviors/toggle_diff_line_wrap_behavior.coffee deleted file mode 100644 index 691ed4f98ae..00000000000 --- a/app/assets/javascripts/behaviors/toggle_diff_line_wrap_behavior.coffee +++ /dev/null @@ -1,14 +0,0 @@ -$ -> - # Toggle line wrapping in diff. - # - # %div.diff-file - # %input.js-toggle-diff-line-wrap - # %td.line_content - # - $("body").on "click", ".js-toggle-diff-line-wrap", (e) -> - diffFile = $(@).closest(".diff-file") - if $(@).is(":checked") - diffFile.addClass("diff-wrap-lines") - else - diffFile.removeClass("diff-wrap-lines") - diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml index 36d98b26712..a9e4d63cd98 100644 --- a/app/views/projects/diffs/_file.html.haml +++ b/app/views/projects/diffs/_file.html.haml @@ -22,11 +22,6 @@ .diff-btn-group - if blob.text? - - unless params[:view] == 'parallel' - %label - = check_box_tag nil, 1, false, class: 'js-toggle-diff-line-wrap' - Wrap text -   = link_to '#', class: 'js-toggle-diff-comments btn btn-sm' do %i.fa.fa-chevron-down Show/Hide comments @@ -39,7 +34,7 @@ = view_file_btn(@commit.id, diff_file, project) - .diff-content + .diff-content.diff-wrap-lines -# Skipp all non non-supported blobs - return unless blob.respond_to?('text?') - if blob.text?