Show More
@@ -244,7 +244,6 b' div:hover > a.permalink {' | |||
|
244 | 244 | |
|
245 | 245 | #header { |
|
246 | 246 | } |
|
247 | ||
|
248 | 247 | #header ul#logged-user { |
|
249 | 248 | margin-bottom: 5px !important; |
|
250 | 249 | -webkit-border-radius: 0px 0px 8px 8px; |
@@ -4639,6 +4638,23 b' PULL REQUESTS' | |||
|
4639 | 4638 | /***************************************************************************** |
|
4640 | 4639 | DIFFS CSS |
|
4641 | 4640 | ******************************************************************************/ |
|
4641 | .diff-collapse{ | |
|
4642 | text-align: center; | |
|
4643 | } | |
|
4644 | .diff-collapse-button{ | |
|
4645 | cursor: pointer; | |
|
4646 | color: #666; | |
|
4647 | font-size: 16px; | |
|
4648 | } | |
|
4649 | .diff-container { | |
|
4650 | margin-bottom: -15px; | |
|
4651 | } | |
|
4652 | ||
|
4653 | .diff-container.hidden{ | |
|
4654 | display: none; | |
|
4655 | overflow: hidden; | |
|
4656 | } | |
|
4657 | ||
|
4642 | 4658 | |
|
4643 | 4659 | div.diffblock { |
|
4644 | 4660 | overflow: auto; |
@@ -2161,3 +2161,26 b' var MultiSelectWidget = function(selecte' | |||
|
2161 | 2161 | }); |
|
2162 | 2162 | } |
|
2163 | 2163 | } |
|
2164 | ||
|
2165 | ||
|
2166 | // global hooks after DOM is loaded | |
|
2167 | ||
|
2168 | YUE.onDOMReady(function(){ | |
|
2169 | YUE.on(YUQ('.diff-collapse-button'), 'click', function(e){ | |
|
2170 | var button = e.currentTarget; | |
|
2171 | var t = YUD.get(button).getAttribute('target'); | |
|
2172 | console.log(t); | |
|
2173 | if(YUD.hasClass(t, 'hidden')){ | |
|
2174 | YUD.removeClass(t, 'hidden'); | |
|
2175 | YUD.get(button).innerHTML = "↑ {0} ↑".format(_TM['collapse diff']); | |
|
2176 | } | |
|
2177 | else if(!YUD.hasClass(t, 'hidden')){ | |
|
2178 | YUD.addClass(t, 'hidden'); | |
|
2179 | YUD.get(button).innerHTML = "↓ {0} ↓".format(_TM['expand diff']); | |
|
2180 | } | |
|
2181 | }); | |
|
2182 | ||
|
2183 | ||
|
2184 | ||
|
2185 | }); | |
|
2186 |
@@ -51,6 +51,8 b'' | |||
|
51 | 51 | 'Open new pull request for selected changesets': "${_('Open new pull request for selected changesets')}", |
|
52 | 52 | 'Show selected changes __S -> __E': "${_('Show selected changes __S -> __E')}", |
|
53 | 53 | 'Selection link': "${_('Selection link')}", |
|
54 | 'collapse diff': "${_('collapse diff')}", | |
|
55 | 'expand diff': "${_('expand diff')}", | |
|
54 | 56 | }; |
|
55 | 57 | var _TM = TRANSLATION_MAP; |
|
56 | 58 |
@@ -4,7 +4,10 b'' | |||
|
4 | 4 | ## ${diff_block.diff_block(change)} |
|
5 | 5 | ## |
|
6 | 6 | <%def name="diff_block(change)"> |
|
7 | ||
|
7 | <div class="diff-collapse"> | |
|
8 | <span target="${'diff-container-%s' % (id(change))}" class="diff-collapse-button">↑ ${_('collapse diff')} ↑</span> | |
|
9 | </div> | |
|
10 | <div class="diff-container" id="${'diff-container-%s' % (id(change))}"> | |
|
8 | 11 | %for FID,(cs1, cs2, change, path, diff, stats) in change.iteritems(): |
|
9 | 12 | ##%if op !='removed': |
|
10 | 13 | <div id="${FID}_target" style="clear:both;margin-top:25px"></div> |
@@ -37,7 +40,7 b'' | |||
|
37 | 40 | </div> |
|
38 | 41 | ##%endif |
|
39 | 42 | %endfor |
|
40 | ||
|
43 | </div> | |
|
41 | 44 | </%def> |
|
42 | 45 | |
|
43 | 46 | <%def name="diff_block_simple(change)"> |
General Comments 0
You need to be logged in to leave comments.
Login now