##// END OF EJS Templates
collapsable diff container in changeset, makes quick review easier
marcink -
r3419:efc00d36 beta
parent child Browse files
Show More
@@ -244,7 +244,6 b' div:hover > a.permalink {'
244
244
245 #header {
245 #header {
246 }
246 }
247
248 #header ul#logged-user {
247 #header ul#logged-user {
249 margin-bottom: 5px !important;
248 margin-bottom: 5px !important;
250 -webkit-border-radius: 0px 0px 8px 8px;
249 -webkit-border-radius: 0px 0px 8px 8px;
@@ -4639,6 +4638,23 b' PULL REQUESTS'
4639 /*****************************************************************************
4638 /*****************************************************************************
4640 DIFFS CSS
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 div.diffblock {
4659 div.diffblock {
4644 overflow: auto;
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 'Open new pull request for selected changesets': "${_('Open new pull request for selected changesets')}",
51 'Open new pull request for selected changesets': "${_('Open new pull request for selected changesets')}",
52 'Show selected changes __S -> __E': "${_('Show selected changes __S -> __E')}",
52 'Show selected changes __S -> __E': "${_('Show selected changes __S -> __E')}",
53 'Selection link': "${_('Selection link')}",
53 'Selection link': "${_('Selection link')}",
54 'collapse diff': "${_('collapse diff')}",
55 'expand diff': "${_('expand diff')}",
54 };
56 };
55 var _TM = TRANSLATION_MAP;
57 var _TM = TRANSLATION_MAP;
56
58
@@ -4,7 +4,10 b''
4 ## ${diff_block.diff_block(change)}
4 ## ${diff_block.diff_block(change)}
5 ##
5 ##
6 <%def name="diff_block(change)">
6 <%def name="diff_block(change)">
7
7 <div class="diff-collapse">
8 <span target="${'diff-container-%s' % (id(change))}" class="diff-collapse-button">&uarr; ${_('collapse diff')} &uarr;</span>
9 </div>
10 <div class="diff-container" id="${'diff-container-%s' % (id(change))}">
8 %for FID,(cs1, cs2, change, path, diff, stats) in change.iteritems():
11 %for FID,(cs1, cs2, change, path, diff, stats) in change.iteritems():
9 ##%if op !='removed':
12 ##%if op !='removed':
10 <div id="${FID}_target" style="clear:both;margin-top:25px"></div>
13 <div id="${FID}_target" style="clear:both;margin-top:25px"></div>
@@ -37,7 +40,7 b''
37 </div>
40 </div>
38 ##%endif
41 ##%endif
39 %endfor
42 %endfor
40
43 </div>
41 </%def>
44 </%def>
42
45
43 <%def name="diff_block_simple(change)">
46 <%def name="diff_block_simple(change)">
General Comments 0
You need to be logged in to leave comments. Login now