# HG changeset patch # User Daniel Dourvaris # Date 2016-10-26 13:21:57 # Node ID c0265ae8426eba1830697ffff67c2bd9b6613d79 # Parent 95e7a2563cb112be73af6df7794203bc562d8a2a diffs: rename .diff to .filediff and use .diffset for grouping a list of diffs since .filediff refers to a single file rather than the entire diff diff --git a/rhodecode/public/css/code-block.less b/rhodecode/public/css/code-block.less --- a/rhodecode/public/css/code-block.less +++ b/rhodecode/public/css/code-block.less @@ -648,37 +648,37 @@ pre.literal-block, .codehilite pre{ @cb-line-code-padding: 10px; @cb-text-padding: 5px; -@diff-pill-padding: 2px 7px; +@pill-padding: 2px 7px; -input.diff-collapse-state { +input.filediff-collapse-state { display: none; - &:checked + .diff { /* file diff is collapsed */ + &:checked + .filediff { /* file diff is collapsed */ .cb { display: none } - .diff-collapse-indicator { + .filediff-collapse-indicator { border-width: 9px 0 9px 15.6px; border-color: transparent transparent transparent #ccc; } - .diff-menu { + .filediff-menu { display: none; } margin: -1px 0 0 0; } - &+ .diff { /* file diff is expanded */ - .diff-collapse-indicator { + &+ .filediff { /* file diff is expanded */ + .filediff-collapse-indicator { border-width: 15.6px 9px 0 9px; border-color: #ccc transparent transparent transparent; } - .diff-menu { + .filediff-menu { display: block; } margin: 20px 0; } } -.diff { +.filediff { border: 1px solid @grey5; /* START OVERRIDES */ @@ -697,16 +697,16 @@ input.diff-collapse-state { * { box-sizing: border-box; } - .diff-anchor { + .filediff-anchor { visibility: hidden; } &:hover { - .diff-anchor { + .filediff-anchor { visibility: visible; } } - .diff-collapse-indicator { + .filediff-collapse-indicator { width: 0; height: 0; border-style: solid; @@ -715,22 +715,22 @@ input.diff-collapse-state { cursor: pointer; } - .diff-heading { + .filediff-heading { background: @grey7; cursor: pointer; display: block; padding: 5px 10px; } - .diff-heading:after { + .filediff-heading:after { content: ""; display: table; clear: both; } - .diff-heading:hover { + .filediff-heading:hover { background: #e1e9f4 !important; } - .diff-menu { + .filediff-menu { float: right; a, span { @@ -739,13 +739,13 @@ input.diff-collapse-state { float: left } } - .diff-pill { + .pill { display: block; float: left; - padding: @diff-pill-padding; + padding: @pill-padding; } - .diff-pill-group { - .diff-pill { + .pill-group { + .pill { opacity: .8; &:first-child { border-radius: @border-radius 0 0 @border-radius; @@ -758,7 +758,7 @@ input.diff-collapse-state { } } } - .diff-pill { + .pill { &[op="name"] { background: none; color: @grey2; @@ -809,19 +809,19 @@ input.diff-collapse-state { } } - .diff-collapse-button, .diff-expand-button { + .filediff-collapse-button, .filediff-expand-button { cursor: pointer; } - .diff-collapse-button { + .filediff-collapse-button { display: inline; } - .diff-expand-button { + .filediff-expand-button { display: none; } - .diff-collapsed .diff-collapse-button { + .filediff-collapsed .filediff-collapse-button { display: none; } - .diff-collapsed .diff-expand-button { + .filediff-collapsed .filediff-expand-button { display: inline; } } diff --git a/rhodecode/templates/codeblocks/diffs.html b/rhodecode/templates/codeblocks/diffs.html --- a/rhodecode/templates/codeblocks/diffs.html +++ b/rhodecode/templates/codeblocks/diffs.html @@ -71,8 +71,8 @@ collapse_all = len(diffset.files) > coll % endif -
-
+
+
%if diffset.files:
@@ -94,11 +94,11 @@ collapse_all = len(diffset.files) > coll ${_('Expand All')} + onclick="$('input[class=filediff-collapse-state]').prop('checked', false); return false">${_('Expand All')} ${_('Collapse All')} + onclick="$('input[class=filediff-collapse-state]').prop('checked', true); return false">${_('Collapse All')}
%endif @@ -122,13 +122,13 @@ collapse_all = len(diffset.files) > coll lines_changed = filediff['patch']['stats']['added'] + filediff['patch']['stats']['deleted'] over_lines_changed_limit = lines_changed > lines_changed_limit %> - +
-