##// END OF EJS Templates
changed links with diff options into a pop-up menu. Saves space on long filenames and looks better
marcink -
r1775:fb423ee5 beta
parent child Browse files
Show More
@@ -2241,19 +2241,43 b' table.code-browser .browser-file {'
2241 padding-left: 20px;
2241 padding-left: 20px;
2242 text-align: left;
2242 text-align: left;
2243 }
2243 }
2244
2244 .diffblock .changeset_header {
2245 height: 16px;
2246 }
2245 .diffblock .changeset_file {
2247 .diffblock .changeset_file {
2246 background: url("../images/icons/file.png") no-repeat scroll 3px;
2248 background: url("../images/icons/file.png") no-repeat scroll 3px;
2247 height: 16px;
2248 padding-left: 22px;
2249 text-align: left;
2249 text-align: left;
2250 font-size: 14px;
2250 float: left;
2251 }
2251 padding: 2px 0px 2px 22px;
2252
2252 }
2253 .diffblock .changeset_header {
2253 .diffblock .diff-menu-wrapper{
2254 margin-left: 6px !important;
2254 float: left;
2255 }
2255 }
2256
2256
2257 .diffblock .changeset_header .diff-menu{
2258 position: absolute;
2259 background: none repeat scroll 0 0 #FFFFFF;
2260 border-color: #003367 #666666 #666666;
2261 border-right: 1px solid #666666;
2262 border-style: solid solid solid;
2263 border-width: 1px;
2264 box-shadow: 2px 8px 4px rgba(0, 0, 0, 0.2);
2265 margin-top:5px;
2266 margin-left:1px;
2267
2268 }
2269
2270 .diffblock .changeset_header .diff-menu ul li {
2271 padding: 0px 0px 0px 0px !important;
2272 }
2273 .diffblock .changeset_header .diff-menu ul li a{
2274 display: block;
2275 padding: 3px 8px 3px 8px !important;
2276 }
2277 .diffblock .changeset_header .diff-menu ul li a:hover{
2278 text-decoration: none;
2279 background-color: #EEEEEE;
2280 }
2257 table.code-browser .browser-dir {
2281 table.code-browser .browser-dir {
2258 background: url("../images/icons/folder_16.png") no-repeat scroll 3px;
2282 background: url("../images/icons/folder_16.png") no-repeat scroll 3px;
2259 height: 16px;
2283 height: 16px;
@@ -3667,7 +3691,7 b' div.diffblock .code-header{'
3667 padding:10px 0 10px 0;
3691 padding:10px 0 10px 0;
3668 }
3692 }
3669 div.diffblock .code-header div{
3693 div.diffblock .code-header div{
3670 margin-left:10px;
3694 margin-left:4px;
3671 font-weight: bold;
3695 font-weight: bold;
3672 font-size: 14px;
3696 font-size: 14px;
3673 }
3697 }
@@ -122,16 +122,20 b''
122 <div class="diffblock margined comm" id="${self.fid(filenode.changeset.raw_id,filenode.path)}">
122 <div class="diffblock margined comm" id="${self.fid(filenode.changeset.raw_id,filenode.path)}">
123 <div class="code-header">
123 <div class="code-header">
124 <div class="changeset_header">
124 <div class="changeset_header">
125 <span class="changeset_file">
125 <div class="changeset_file">
126 ${h.link_to_if(change!='removed',h.safe_unicode(filenode.path),h.url('files_home',repo_name=c.repo_name,
126 ${h.link_to_if(change!='removed',h.safe_unicode(filenode.path),h.url('files_home',repo_name=c.repo_name,
127 revision=filenode.changeset.raw_id,f_path=h.safe_unicode(filenode.path)))}
127 revision=filenode.changeset.raw_id,f_path=h.safe_unicode(filenode.path)))}
128 </span>
128 </div>
129 &raquo; <span>${h.link_to(_('diff'),
129 <div class="diff-menu-wrapper">
130 h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='diff'))}</span>
130 <img class="diff-menu-activate" style="margin-bottom:-6px;cursor: pointer" alt="diff-menu" src="${h.url('/images/icons/script_gear.png')}" />
131 &raquo; <span>${h.link_to(_('raw diff'),
131 <div class="diff-menu" style="display:none">
132 h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='raw'))}</span>
132 <ul>
133 &raquo; <span>${h.link_to(_('download diff'),
133 <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'))}</li>
134 h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='download'))}</span>
134 <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>
135 <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>
136 </ul>
137 </div>
138 </div>
135 <span style="float:right;margin-top:-3px">
139 <span style="float:right;margin-top:-3px">
136 <label>
140 <label>
137 ${_('show inline comments')}
141 ${_('show inline comments')}
@@ -205,7 +209,19 b''
205 }
209 }
206
210
207 YUE.onDOMReady(function(){
211 YUE.onDOMReady(function(){
208
212
213 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
214 var act = e.currentTarget.nextElementSibling;
215
216 if(YUD.hasClass(act,'active')){
217 YUD.removeClass(act,'active');
218 YUD.setStyle(act,'display','none');
219 }else{
220 YUD.addClass(act,'active');
221 YUD.setStyle(act,'display','');
222 }
223 });
224
209 YUE.on(YUQ('.show-inline-comments'),'change',function(e){
225 YUE.on(YUQ('.show-inline-comments'),'change',function(e){
210 var show = 'none';
226 var show = 'none';
211 var target = e.currentTarget;
227 var target = e.currentTarget;
General Comments 0
You need to be logged in to leave comments. Login now