##// END OF EJS Templates
changeset: replace diff/whitespace/context popup menu with icons
Aras Pranckevicius -
r1859:929fc8d9 beta
parent child Browse files
Show More
@@ -93,7 +93,8 b' def _ignorews_url(fileid=None):'
93 params[ctx_key] += [ctx_val]
93 params[ctx_key] += [ctx_val]
94
94
95 params['anchor'] = fileid
95 params['anchor'] = fileid
96 return h.link_to(lbl, h.url.current(**params))
96 img = h.image('/images/icons/text_strikethrough.png', lbl, class_='icon')
97 return h.link_to(img, h.url.current(**params), title=lbl)
97
98
98
99
99 def get_line_ctx(fid, GET):
100 def get_line_ctx(fid, GET):
@@ -143,7 +144,8 b' def _context_url(fileid=None):'
143 lbl = _('%s line context') % ln_ctx
144 lbl = _('%s line context') % ln_ctx
144
145
145 params['anchor'] = fileid
146 params['anchor'] = fileid
146 return h.link_to(lbl, h.url.current(**params))
147 img = h.image('/images/icons/table_add.png', lbl, class_='icon')
148 return h.link_to(img, h.url.current(**params), title=lbl)
147
149
148
150
149 class ChangesetController(BaseRepoController):
151 class ChangesetController(BaseRepoController):
@@ -30,17 +30,12 b''
30 <div class="date">${c.changeset.revision}:
30 <div class="date">${c.changeset.revision}:
31 ${h.link_to(h.short_id(c.changeset.raw_id),h.url('changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}
31 ${h.link_to(h.short_id(c.changeset.raw_id),h.url('changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}
32 ${c.changeset.date}</div>
32 ${c.changeset.date}</div>
33 <div class="diff-menu-wrapper">
33 <span class="diff-actions">
34 <img class="diff-menu-activate" style="cursor: pointer" alt="diff-menu" src="${h.url('/images/icons/script_gear.png')}" />
34 <a href="${h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='show')}" title="${_('raw diff')}"><img class="icon" src="${h.url('/images/icons/page_white_text.png')}"/></a>
35 <div class="diff-menu" style="display:none">
35 <a href="${h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download')}" title="${_('download diff')}"><img class="icon" src="${h.url('/images/icons/down_16.png')}"/></a>
36 <ul>
36 ${c.ignorews_url()}
37 <li>${h.link_to(_('raw diff'),h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='show'))}</li>
37 ${c.context_url()}
38 <li>${h.link_to(_('download diff'),h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download'))}</li>
38 </span>
39 <li>${c.ignorews_url()}</li>
40 <li>${c.context_url()}</li>
41 </ul>
42 </div>
43 </div>
44 <div class="comments-number" style="float:right;padding-right:5px">${len(c.comments)} comment(s) (${c.inline_cnt} ${_('inline')})</div>
39 <div class="comments-number" style="float:right;padding-right:5px">${len(c.comments)} comment(s) (${c.inline_cnt} ${_('inline')})</div>
45 </div>
40 </div>
46 </div>
41 </div>
@@ -140,18 +135,6 b''
140
135
141 YUE.onDOMReady(function(){
136 YUE.onDOMReady(function(){
142
137
143 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
144 var act = e.currentTarget.nextElementSibling;
145
146 if(YUD.hasClass(act,'active')){
147 YUD.removeClass(act,'active');
148 YUD.setStyle(act,'display','none');
149 }else{
150 YUD.addClass(act,'active');
151 YUD.setStyle(act,'display','');
152 }
153 });
154
155 YUE.on(YUQ('.show-inline-comments'),'change',function(e){
138 YUE.on(YUQ('.show-inline-comments'),'change',function(e){
156 var show = 'none';
139 var show = 'none';
157 var target = e.currentTarget;
140 var target = e.currentTarget;
@@ -15,18 +15,13 b''
15 ${h.link_to_if(change!='removed',h.safe_unicode(filenode.path),h.url('files_home',repo_name=c.repo_name,
15 ${h.link_to_if(change!='removed',h.safe_unicode(filenode.path),h.url('files_home',repo_name=c.repo_name,
16 revision=filenode.changeset.raw_id,f_path=h.safe_unicode(filenode.path)))}
16 revision=filenode.changeset.raw_id,f_path=h.safe_unicode(filenode.path)))}
17 </div>
17 </div>
18 <div class="diff-menu-wrapper">
18 <span class="diff-actions">
19 <img class="diff-menu-activate" style="margin-bottom:-6px;cursor: pointer" alt="diff-menu" src="${h.url('/images/icons/script_gear.png')}" />
19 <a href="${h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='diff',fulldiff=1)}" title="${_('diff')}"><img class="icon" src="${h.url('/images/icons/page_white_text.png')}"/></a>
20 <div class="diff-menu" style="display:none">
20 <a href="${h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='raw')}" title="${_('raw diff')}"><img class="icon" src="${h.url('/images/icons/page_white_text.png')}"/></a>
21 <ul>
21 <a href="${h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='download')}" title="${_('download diff')}"><img class="icon" src="${h.url('/images/icons/down_16.png')}"/></a>
22 <li>${h.link_to(_('diff'),h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='diff',fulldiff=1))}</li>
22 ${c.ignorews_url(h.FID(filenode.changeset.raw_id,filenode.path))}
23 <li>${h.link_to(_('raw diff'),h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='raw'))}</li>
23 ${c.context_url(h.FID(filenode.changeset.raw_id,filenode.path))}
24 <li>${h.link_to(_('download diff'),h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='download'))}</li>
24 </span>
25 <li>${c.ignorews_url(h.FID(filenode.changeset.raw_id,filenode.path))}</li>
26 <li>${c.context_url(h.FID(filenode.changeset.raw_id,filenode.path))}</li>
27 </ul>
28 </div>
29 </div>
30 <span style="float:right;margin-top:-3px">
25 <span style="float:right;margin-top:-3px">
31 <label>
26 <label>
32 ${_('show inline comments')}
27 ${_('show inline comments')}
General Comments 0
You need to be logged in to leave comments. Login now