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