##// END OF EJS Templates
files: fix loading of source files events via pjax.
marcink -
r1128:f8436858 default
parent child Browse files
Show More
@@ -223,9 +223,10 b' class FilesController(BaseRepoController'
223 c.file_author = True
223 c.file_author = True
224 c.file_tree = ''
224 c.file_tree = ''
225 if c.file.is_file():
225 if c.file.is_file():
226 c.file_source_page = 'true'
226 c.file_last_commit = c.file.last_commit
227 c.file_last_commit = c.file.last_commit
227 if c.file.size < self.cut_off_limit_file:
228 if c.file.size < self.cut_off_limit_file:
228 if c.annotate: # annotation has precedence over renderer
229 if c.annotate: # annotation has precedence over renderer
229 c.annotated_lines = filenode_as_annotated_lines_tokens(
230 c.annotated_lines = filenode_as_annotated_lines_tokens(
230 c.file
231 c.file
231 )
232 )
@@ -244,6 +245,7 b' class FilesController(BaseRepoController'
244 c.authors = [(h.email(author),
245 c.authors = [(h.email(author),
245 h.person(author, 'username_or_name_or_email'))]
246 h.person(author, 'username_or_name_or_email'))]
246 else:
247 else:
248 c.file_source_page = 'false'
247 c.authors = []
249 c.authors = []
248 c.file_tree = self._get_tree_at_commit(
250 c.file_tree = self._get_tree_at_commit(
249 repo_name, c.commit.raw_id, f_path)
251 repo_name, c.commit.raw_id, f_path)
@@ -88,7 +88,7 b''
88 if (metadataRequest && metadataRequest.readyState != 4) {
88 if (metadataRequest && metadataRequest.readyState != 4) {
89 metadataRequest.abort();
89 metadataRequest.abort();
90 }
90 }
91 if (source_page) {
91 if (fileSourcePage) {
92 return false;
92 return false;
93 }
93 }
94
94
@@ -143,8 +143,7 b''
143 $(this).hide();
143 $(this).hide();
144 });
144 });
145
145
146
146 if (fileSourcePage) {
147 if (source_page) {
148 // variants for with source code, not tree view
147 // variants for with source code, not tree view
149
148
150 // select code link event
149 // select code link event
@@ -47,7 +47,3 b''
47 </div>
47 </div>
48
48
49 </div>
49 </div>
50
51 <script>
52 var source_page = false;
53 </script>
@@ -34,7 +34,10 b''
34 % endif
34 % endif
35
35
36 </div> <!--end summary-detail-->
36 </div> <!--end summary-detail-->
37
37 <script>
38 // set the pageSource variable
39 var fileSourcePage = ${c.file_source_page};
40 </script>
38 % if c.file.is_dir():
41 % if c.file.is_dir():
39 <div id="commit-stats" class="sidebar-right">
42 <div id="commit-stats" class="sidebar-right">
40 <%include file='file_tree_author_box.html'/>
43 <%include file='file_tree_author_box.html'/>
@@ -75,8 +75,4 b''
75 %endif
75 %endif
76 %endif
76 %endif
77 </div>
77 </div>
78 </div>
78 </div> No newline at end of file
79
80 <script>
81 var source_page = true;
82 </script>
General Comments 0
You need to be logged in to leave comments. Login now