Show More
@@ -3342,6 +3342,10 form.comment-form { | |||
|
3342 | 3342 | } |
|
3343 | 3343 | |
|
3344 | 3344 | |
|
3345 | .show-inline-comments{ | |
|
3346 | position: relative; | |
|
3347 | top:1px | |
|
3348 | } | |
|
3345 | 3349 | |
|
3346 | 3350 | /** comment inline form **/ |
|
3347 | 3351 |
@@ -113,8 +113,8 | |||
|
113 | 113 | %for change,filenode,diff,cs1,cs2,stat in c.changes: |
|
114 | 114 | %if change !='removed': |
|
115 | 115 | <div style="clear:both;height:10px"></div> |
|
116 | <div class="diffblock margined"> | |
|
117 | <div id="${self.fid(filenode.changeset.raw_id,filenode.path)}" class="code-header"> | |
|
116 | <div class="diffblock margined" id="${self.fid(filenode.changeset.raw_id,filenode.path)}"> | |
|
117 | <div class="code-header"> | |
|
118 | 118 | <div class="changeset_header"> |
|
119 | 119 | <span class="changeset_file"> |
|
120 | 120 | ${h.link_to_if(change!='removed',h.safe_unicode(filenode.path),h.url('files_home',repo_name=c.repo_name, |
@@ -126,6 +126,12 | |||
|
126 | 126 | h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='raw'))}</span> |
|
127 | 127 | » <span>${h.link_to(_('download diff'), |
|
128 | 128 | h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='download'))}</span> |
|
129 | <span style="float:right"> | |
|
130 | <label> | |
|
131 | ${_('show inline comments')} | |
|
132 | ${h.checkbox('',checked="checked",class_="show-inline-comments",id_for=self.fid(filenode.changeset.raw_id,filenode.path))} | |
|
133 | </label> | |
|
134 | </span> | |
|
129 | 135 | </div> |
|
130 | 136 | </div> |
|
131 | 137 | <div class="code-body"> |
@@ -192,6 +198,20 | |||
|
192 | 198 | } |
|
193 | 199 | |
|
194 | 200 | YUE.onDOMReady(function(){ |
|
201 | ||
|
202 | YUE.on(YUQ('.show-inline-comments'),'change',function(e){ | |
|
203 | var show = 'none'; | |
|
204 | var target = e.currentTarget; | |
|
205 | if(target.checked){ | |
|
206 | var show = '' | |
|
207 | } | |
|
208 | var boxid = YUD.getAttribute(target,'id_for'); | |
|
209 | var comments = YUQ('#{0} .inline-comments'.format(boxid)); | |
|
210 | for(c in comments){ | |
|
211 | YUD.setStyle(comments[c],'display',show); | |
|
212 | } | |
|
213 | }) | |
|
214 | ||
|
195 | 215 | YUE.on(YUQ('.line'),'mouseenter',function(e){ |
|
196 | 216 | var tr = e.currentTarget; |
|
197 | 217 | if(YUD.hasClass(tr,'form-open') || YUD.hasClass(tr,'context')){ |
General Comments 0
You need to be logged in to leave comments.
Login now