Show More
@@ -1,408 +1,423 b'' | |||
|
1 | 1 | // summary.less |
|
2 | 2 | // For use in RhodeCode applications; |
|
3 | 3 | // Used for headers and file detail summary screens. |
|
4 | 4 | |
|
5 | 5 | .summary { |
|
6 | 6 | clear: both; |
|
7 | 7 | float: none; |
|
8 | 8 | position: relative; |
|
9 | 9 | width: 100%; |
|
10 | 10 | margin: 0; |
|
11 | 11 | padding: 0; |
|
12 | 12 | background: #FCFCFC; |
|
13 | 13 | border: 1px solid #EAEAEA; |
|
14 | 14 | border-radius: @border-radius; |
|
15 | 15 | margin-bottom: 20px; |
|
16 | 16 | |
|
17 | 17 | .summary-detail-header { |
|
18 | float: left; | |
|
19 | 18 | display: block; |
|
20 | 19 | width: 100%; |
|
21 | 20 | margin-bottom: @textmargin; |
|
22 | 21 | padding: 0 0 .5em 0; |
|
23 | 22 | border-bottom: @border-thickness solid @border-default-color; |
|
24 | 23 | |
|
25 | 24 | .breadcrumbs { |
|
26 | float: left; | |
|
27 | 25 | display: inline; |
|
28 | 26 | margin: 0; |
|
29 | 27 | padding: 0; |
|
30 | 28 | } |
|
29 | ||
|
31 | 30 | h4 { |
|
32 | float: left; | |
|
33 | 31 | margin: 0 1em 0 0; |
|
34 | 32 | padding: 0; |
|
35 | 33 | line-height: 1.2em; |
|
36 | 34 | font-size: @basefontsize; |
|
37 | 35 | } |
|
38 | 36 | |
|
39 | 37 | .action_link { |
|
40 | 38 | float: right; |
|
41 | 39 | } |
|
42 | 40 | |
|
43 | 41 | .new-file { |
|
44 | 42 | float: right; |
|
45 | 43 | margin-top: -1.5em; |
|
46 | 44 | } |
|
47 | 45 | } |
|
48 | 46 | |
|
49 | 47 | .summary-detail { |
|
50 | 48 | float: none; |
|
51 | 49 | position: relative; |
|
52 | 50 | width: 100%; |
|
53 | 51 | margin: 0; |
|
54 | 52 | padding: 0; |
|
55 | 53 | |
|
56 | 54 | .file_diff_buttons { |
|
57 | 55 | margin-top: @space; |
|
58 | 56 | } |
|
59 | 57 | |
|
60 | 58 | // commit message |
|
61 | 59 | .commit { |
|
62 | 60 | white-space: pre-wrap; |
|
63 | 61 | } |
|
64 | 62 | |
|
65 | 63 | .left-clone { |
|
66 | 64 | float: left; |
|
67 | 65 | height: 30px; |
|
68 | 66 | margin: 0; |
|
69 | 67 | padding: 0; |
|
70 | 68 | width: 130px; |
|
71 | 69 | font-weight: @text-semibold-weight; |
|
72 | 70 | font-family: @text-semibold; |
|
73 | 71 | } |
|
74 | 72 | .left-clone select { |
|
75 | 73 | width: 130px; |
|
76 | 74 | margin-right: 0; |
|
77 | 75 | background-color: @grey7; |
|
78 | 76 | border-color: @grey4; |
|
79 | 77 | color: #5C5C5C; |
|
80 | 78 | border-top-right-radius: 0; |
|
81 | 79 | border-bottom-right-radius: 0; |
|
82 | 80 | } |
|
83 | 81 | |
|
84 | 82 | .right-clone { |
|
85 | 83 | float: left; |
|
86 | 84 | width: ~"calc(100% - 170px)"; |
|
87 | 85 | |
|
88 | 86 | .clipboard-action { |
|
89 | 87 | margin-left: -30px; |
|
90 | 88 | } |
|
91 | 89 | } |
|
92 | 90 | |
|
93 | 91 | .clone_url_input { |
|
94 | 92 | width: ~"calc(100% - 90px)"; |
|
95 | 93 | padding: 6px 30px 6px 10px; |
|
96 | 94 | height: 14px; |
|
97 | 95 | box-shadow: 0 1px 1px 0 rgba(0,0,0,0.07); |
|
98 | 96 | border-top-left-radius: 0; |
|
99 | 97 | border-bottom-left-radius: 0; |
|
100 | 98 | margin-left: -1px; |
|
101 | 99 | } |
|
102 | 100 | |
|
103 | 101 | &.directory { |
|
104 | 102 | margin-bottom: 0; |
|
105 | 103 | } |
|
106 | 104 | |
|
107 | 105 | .desc { |
|
108 | 106 | white-space: pre-wrap; |
|
109 | 107 | } |
|
110 | 108 | .disabled { |
|
111 | 109 | opacity: .5; |
|
112 | 110 | cursor: inherit; |
|
113 | 111 | } |
|
114 | 112 | .help-block { |
|
115 | 113 | color: inherit; |
|
116 | 114 | margin: 0; |
|
117 | 115 | } |
|
118 | 116 | } |
|
119 | 117 | |
|
120 | 118 | .sidebar-right { |
|
121 | 119 | float: left; |
|
122 | 120 | width: 24%; |
|
123 | 121 | margin: 0; |
|
124 | 122 | padding: 0; |
|
125 | 123 | |
|
126 | 124 | ul { |
|
127 | 125 | margin-left: 0; |
|
128 | 126 | padding-left: 0; |
|
129 | 127 | |
|
130 | 128 | li { |
|
131 | 129 | list-style-type: none; |
|
132 | 130 | } |
|
133 | 131 | } |
|
134 | 132 | } |
|
135 | 133 | |
|
136 | 134 | #clone_by_name, #clone_by_id{ |
|
137 | 135 | display: inline-block; |
|
138 | 136 | margin-left: 0px; |
|
139 | 137 | } |
|
140 | 138 | |
|
141 | 139 | .codeblock { |
|
142 | 140 | border: none; |
|
143 | 141 | background-color: transparent; |
|
144 | 142 | } |
|
145 | 143 | |
|
146 | 144 | .code-body { |
|
147 | 145 | border: @border-thickness solid @border-default-color; |
|
148 | 146 | .border-radius(@border-radius); |
|
149 | 147 | } |
|
150 | 148 | |
|
151 | 149 | .btn-collapse { |
|
152 | 150 | clear: both; |
|
153 | 151 | float: none; |
|
154 | 152 | background: #F7F7F7; |
|
155 | 153 | text-align: center; |
|
156 | 154 | color: #949494; |
|
157 | 155 | font-size: 11px; |
|
158 | 156 | |
|
159 | 157 | &:hover { |
|
160 | 158 | background: #f1f1f1; |
|
161 | 159 | color: #2B2B2D; |
|
162 | 160 | } |
|
163 | 161 | } |
|
164 | 162 | } |
|
165 | 163 | |
|
166 | 164 | // this is used outside of just the summary |
|
167 | 165 | .fieldset, // similar to form fieldset |
|
168 | 166 | .summary .sidebar-right-content { // these have to match |
|
169 | 167 | clear: both; |
|
170 | 168 | float: none; |
|
171 | 169 | position: relative; |
|
172 | 170 | display:block; |
|
173 | 171 | width: 100%; |
|
174 | 172 | min-height: 1em; |
|
175 | 173 | margin-bottom: 10px; |
|
176 | 174 | padding: 0; |
|
177 | 175 | line-height: 1.2em; |
|
178 | 176 | |
|
179 | 177 | &:after { // clearfix |
|
180 | 178 | content: ""; |
|
181 | 179 | clear: both; |
|
182 | 180 | width: 100%; |
|
183 | 181 | height: 1em; |
|
184 | 182 | } |
|
185 | 183 | } |
|
186 | 184 | |
|
187 | 185 | .summary .sidebar-right-content { |
|
188 | 186 | margin-bottom: @space; |
|
189 | 187 | |
|
190 | 188 | .rc-user { |
|
191 | 189 | min-width: 0; |
|
192 | 190 | } |
|
193 | 191 | } |
|
194 | 192 | |
|
193 | .summary { | |
|
194 | .fieldset { | |
|
195 | margin-bottom: 0; | |
|
196 | } | |
|
197 | } | |
|
198 | ||
|
195 | 199 | .fieldset { |
|
196 | 200 | |
|
197 | 201 | .left-label { // similar to form legend |
|
198 | 202 | display: block; |
|
199 | 203 | margin: 0; |
|
200 | 204 | padding: 0; |
|
201 | 205 | font-weight: @text-semibold-weight; |
|
202 | 206 | font-family: @text-semibold; |
|
203 | 207 | } |
|
204 | 208 | |
|
205 | 209 | .left-label-summary { |
|
206 | 210 | padding-left: 20px; |
|
207 | 211 | margin-bottom: 5px; |
|
208 | 212 | |
|
209 | 213 | p { |
|
210 | 214 | margin-bottom: 5px; |
|
211 | 215 | color: @grey1; |
|
212 | 216 | float: left; |
|
213 | 217 | width: 130px; |
|
214 | 218 | } |
|
215 | 219 | |
|
216 | 220 | .right-label-summary { |
|
217 | 221 | float: left; |
|
218 | 222 | margin-top: 7px; |
|
219 | 223 | } |
|
220 | 224 | } |
|
221 | 225 | |
|
222 | 226 | .left-content { |
|
223 | 227 | width: ~"calc(50% - 20px)"; |
|
224 | 228 | float: left; |
|
225 | 229 | margin: 15px 0 15px 20px; |
|
230 | ||
|
231 | .rc-user { | |
|
232 | min-width: auto; | |
|
233 | max-width: none; | |
|
234 | min-height: auto; | |
|
235 | padding-right: 5px; | |
|
236 | } | |
|
226 | 237 | } |
|
227 | 238 | |
|
228 | 239 | .right-content { // similar to form fields |
|
229 | 240 | float: left; |
|
230 | 241 | display: block; |
|
231 | 242 | width: ~"calc(50% - 20px)"; |
|
232 | 243 | text-align: right; |
|
233 | 244 | margin: 15px 20px 15px 0; |
|
234 | 245 | |
|
235 | 246 | .truncate-wrap, |
|
236 | 247 | .truncate { |
|
237 | 248 | max-width: 100%; |
|
238 | 249 | width: 100%; |
|
239 | 250 | } |
|
240 | 251 | |
|
241 | 252 | .commit-long { |
|
242 | 253 | overflow-x: auto; |
|
243 | 254 | } |
|
244 | 255 | |
|
245 | 256 | .commit-info { |
|
246 | 257 | margin-top: 7px; |
|
247 | 258 | } |
|
248 | 259 | |
|
249 | 260 | .tag, .tagtag, .branchtag, .booktag, .metatag, .perm_tag { |
|
250 | 261 | background:transparent; |
|
251 | 262 | border: none; |
|
252 | 263 | box-shadow: none; |
|
253 | 264 | margin-left: 10px; |
|
254 | 265 | font-size: 13px; |
|
255 | 266 | } |
|
256 | 267 | |
|
257 | 268 | .tag span, .tag i { |
|
258 | 269 | color: @grey1; |
|
259 | 270 | } |
|
260 | 271 | } |
|
272 | .commit { | |
|
273 | color: @grey1; | |
|
274 | margin-bottom: 10px; | |
|
275 | } | |
|
261 | 276 | .commit.truncate-wrap { |
|
262 | 277 | overflow:hidden; |
|
263 | 278 | text-overflow: ellipsis; |
|
264 | 279 | } |
|
265 | 280 | } |
|
266 | 281 | |
|
267 | 282 | // expand commit message |
|
268 | 283 | #message_expand { |
|
269 | 284 | clear: both; |
|
270 | 285 | display: block; |
|
271 | 286 | color: @rcblue; |
|
272 | 287 | cursor: pointer; |
|
273 | 288 | } |
|
274 | 289 | |
|
275 | 290 | #trimmed_message_box { |
|
276 | 291 | max-height: floor(2 * @basefontsize * 1.2); // 2 lines * line-height |
|
277 | 292 | overflow: hidden; |
|
278 | 293 | } |
|
279 | 294 | |
|
280 | 295 | // show/hide comments button |
|
281 | 296 | .show-inline-comments { |
|
282 | 297 | display: inline; |
|
283 | 298 | cursor: pointer; |
|
284 | 299 | |
|
285 | 300 | .comments-show { display: inline; } |
|
286 | 301 | .comments-hide { display: none; } |
|
287 | 302 | |
|
288 | 303 | &.comments-visible { |
|
289 | 304 | .comments-show { display: none; } |
|
290 | 305 | .comments-hide { display: inline; } |
|
291 | 306 | } |
|
292 | 307 | } |
|
293 | 308 | |
|
294 | 309 | // Quick Start section |
|
295 | 310 | |
|
296 | 311 | .empty-repo { |
|
297 | 312 | border: 1px solid #EAEAEA; |
|
298 | 313 | border-bottom: 0; |
|
299 | 314 | border-radius: @border-radius; |
|
300 | 315 | padding: 0 20px; |
|
301 | 316 | } |
|
302 | 317 | |
|
303 | 318 | .empty-repo h3, .quick_start p { |
|
304 | 319 | margin-bottom: 10px; |
|
305 | 320 | } |
|
306 | 321 | |
|
307 | 322 | .quick_start pre { |
|
308 | 323 | background: #FCFEFF; |
|
309 | 324 | border: 1px solid #CBDBEB; |
|
310 | 325 | box-shadow: @button-shadow; |
|
311 | 326 | padding: 10px 15px; |
|
312 | 327 | border-radius: 4px; |
|
313 | 328 | color: @grey2; |
|
314 | 329 | } |
|
315 | 330 | |
|
316 | 331 | .clear-fix { |
|
317 | 332 | clear: both; |
|
318 | 333 | } |
|
319 | 334 | |
|
320 | 335 | .quick_start { |
|
321 | 336 | display: block; |
|
322 | 337 | position: relative; |
|
323 | 338 | border: 1px solid #EAEAEA; |
|
324 | 339 | border-top: 0; |
|
325 | 340 | border-radius: @border-radius; |
|
326 | 341 | padding: 0 20px; |
|
327 | 342 | |
|
328 | 343 | // adds some space to make copy and paste easier |
|
329 | 344 | .left-label, |
|
330 | 345 | .right-content { |
|
331 | 346 | line-height: 1.6em; |
|
332 | 347 | } |
|
333 | 348 | } |
|
334 | 349 | |
|
335 | 350 | |
|
336 | 351 | .submodule { |
|
337 | 352 | .summary-detail { |
|
338 | 353 | width: 100%; |
|
339 | 354 | |
|
340 | 355 | .btn-collapse { |
|
341 | 356 | display: none; |
|
342 | 357 | } |
|
343 | 358 | } |
|
344 | 359 | } |
|
345 | 360 | |
|
346 | 361 | .codeblock-header { |
|
347 | 362 | float: left; |
|
348 | 363 | display: block; |
|
349 | 364 | width: 100%; |
|
350 | 365 | margin: 0; |
|
351 | 366 | padding: @space 0 10px 0; |
|
352 | 367 | border-top: @border-thickness solid @border-default-color; |
|
353 | 368 | |
|
354 | 369 | .stats { |
|
355 | 370 | float: left; |
|
356 | 371 | } |
|
357 | 372 | .stats-filename { |
|
358 | 373 | font-size: 120%; |
|
359 | 374 | } |
|
360 | 375 | .stats-first-item { |
|
361 | 376 | padding: 0px 0px 0px 3px; |
|
362 | 377 | } |
|
363 | 378 | |
|
364 | 379 | .buttons { |
|
365 | 380 | float: right; |
|
366 | 381 | text-align: right; |
|
367 | 382 | color: @grey4; |
|
368 | 383 | } |
|
369 | 384 | |
|
370 | 385 | .file-container { |
|
371 | 386 | display: inline-block; |
|
372 | 387 | width: 100%; |
|
373 | 388 | } |
|
374 | 389 | |
|
375 | 390 | } |
|
376 | 391 | |
|
377 | 392 | #summary-menu-stats { |
|
378 | 393 | |
|
379 | 394 | .stats-bullet { |
|
380 | 395 | color: @grey3; |
|
381 | 396 | min-width: 3em; |
|
382 | 397 | } |
|
383 | 398 | |
|
384 | 399 | .repo-size { |
|
385 | 400 | margin-bottom: .5em; |
|
386 | 401 | } |
|
387 | 402 | |
|
388 | 403 | } |
|
389 | 404 | |
|
390 | 405 | .rctable.repo_summary { |
|
391 | 406 | border: 1px solid #eaeaea; |
|
392 | 407 | border-radius: 2px; |
|
393 | 408 | border-collapse: inherit; |
|
394 | 409 | border-bottom: 0; |
|
395 | 410 | |
|
396 | 411 | th { |
|
397 | 412 | background: @grey7; |
|
398 | 413 | border-bottom: 0; |
|
399 | 414 | } |
|
400 | 415 | |
|
401 | 416 | td { |
|
402 | 417 | border-color: #eaeaea; |
|
403 | 418 | } |
|
404 | 419 | |
|
405 | 420 | td.td-status { |
|
406 | 421 | padding: 0 0 0 10px; |
|
407 | 422 | } |
|
408 | 423 | } |
@@ -1,566 +1,571 b'' | |||
|
1 | 1 | // |
|
2 | 2 | // Typography |
|
3 | 3 | // modified from Bootstrap |
|
4 | 4 | // -------------------------------------------------- |
|
5 | 5 | |
|
6 | 6 | // Base |
|
7 | 7 | body { |
|
8 | 8 | font-size: @basefontsize; |
|
9 | 9 | font-family: @text-light; |
|
10 | 10 | letter-spacing: .02em; |
|
11 | 11 | color: @grey2; |
|
12 | 12 | } |
|
13 | 13 | |
|
14 | 14 | #content, label{ |
|
15 | 15 | font-size: @basefontsize; |
|
16 | 16 | } |
|
17 | 17 | |
|
18 | 18 | label { |
|
19 | 19 | color: @grey2; |
|
20 | 20 | } |
|
21 | 21 | |
|
22 | 22 | ::selection { background: @rchighlightblue; } |
|
23 | 23 | |
|
24 | 24 | // Headings |
|
25 | 25 | // ------------------------- |
|
26 | 26 | |
|
27 | 27 | h1, h2, h3, h4, h5, h6, |
|
28 | 28 | .h1, .h2, .h3, .h4, .h5, .h6 { |
|
29 | 29 | margin: 0 0 @textmargin 0; |
|
30 | 30 | padding: 0; |
|
31 | 31 | line-height: 1.8em; |
|
32 | 32 | color: @text-color; |
|
33 | 33 | a { |
|
34 | 34 | color: @rcblue; |
|
35 | 35 | } |
|
36 | 36 | } |
|
37 | 37 | |
|
38 | 38 | h1, .h1 { font-size: 1.54em; font-weight: @text-bold-weight; font-family: @text-bold; } |
|
39 | 39 | h2, .h2 { font-size: 1.23em; font-weight: @text-semibold-weight; font-family: @text-semibold; } |
|
40 | 40 | h3, .h3 { font-size: 1.23em; font-family: @text-regular; } |
|
41 | 41 | h4, .h4 { font-size: 1em; font-weight: @text-bold-weight; font-family: @text-bold; } |
|
42 | 42 | h5, .h5 { font-size: 1em; font-weight: @text-bold-weight; font-family: @text-bold; } |
|
43 | 43 | h6, .h6 { font-size: 1em; font-weight: @text-bold-weight; font-family: @text-bold; } |
|
44 | 44 | |
|
45 | 45 | // Breadcrumbs |
|
46 | 46 | .breadcrumbs { |
|
47 | 47 | font-size: @repo-title-fontsize; |
|
48 | 48 | margin: 0; |
|
49 | ||
|
50 | h4 { | |
|
51 | font-size: @basefontsize; | |
|
52 | margin-bottom: 15px; | |
|
53 | } | |
|
49 | 54 | } |
|
50 | 55 | |
|
51 | 56 | .breadcrumbs_light { |
|
52 | 57 | float:left; |
|
53 | 58 | font-size: 1.3em; |
|
54 | 59 | line-height: 38px; |
|
55 | 60 | } |
|
56 | 61 | |
|
57 | 62 | // Body text |
|
58 | 63 | // ------------------------- |
|
59 | 64 | |
|
60 | 65 | p { |
|
61 | 66 | margin: 0 0 @textmargin 0; |
|
62 | 67 | padding: 0; |
|
63 | 68 | line-height: 2em; |
|
64 | 69 | } |
|
65 | 70 | |
|
66 | 71 | .lead { |
|
67 | 72 | margin-bottom: @textmargin; |
|
68 | 73 | font-weight: 300; |
|
69 | 74 | line-height: 1.4; |
|
70 | 75 | |
|
71 | 76 | @media (min-width: @screen-sm-min) { |
|
72 | 77 | font-size: (@basefontsize * 1.5); |
|
73 | 78 | } |
|
74 | 79 | } |
|
75 | 80 | |
|
76 | 81 | a, |
|
77 | 82 | .link { |
|
78 | 83 | color: @rcblue; |
|
79 | 84 | text-decoration: none; |
|
80 | 85 | outline: none; |
|
81 | 86 | cursor: pointer; |
|
82 | 87 | |
|
83 | 88 | &:focus { |
|
84 | 89 | outline: none; |
|
85 | 90 | } |
|
86 | 91 | |
|
87 | 92 | &:hover { |
|
88 | 93 | color: @rcdarkblue; |
|
89 | 94 | } |
|
90 | 95 | } |
|
91 | 96 | |
|
92 | 97 | img { |
|
93 | 98 | border: none; |
|
94 | 99 | outline: none; |
|
95 | 100 | } |
|
96 | 101 | |
|
97 | 102 | strong { |
|
98 | 103 | font-weight: @text-bold-weight; |
|
99 | 104 | font-family: @text-bold; |
|
100 | 105 | } |
|
101 | 106 | |
|
102 | 107 | em { |
|
103 | 108 | font-family: @text-italic; |
|
104 | 109 | font-style: italic; |
|
105 | 110 | } |
|
106 | 111 | |
|
107 | 112 | strong em, |
|
108 | 113 | em strong { |
|
109 | 114 | font-style: italic; |
|
110 | 115 | font-weight: @text-bold-italic-weight; |
|
111 | 116 | font-family: @text-bold-italic; |
|
112 | 117 | } |
|
113 | 118 | |
|
114 | 119 | //TODO: lisa: b and i are depreciated, but we are still using them in places. |
|
115 | 120 | // Should probably make some decision whether to keep or lose these. |
|
116 | 121 | b { |
|
117 | 122 | |
|
118 | 123 | } |
|
119 | 124 | |
|
120 | 125 | i { |
|
121 | 126 | font-style: normal; |
|
122 | 127 | } |
|
123 | 128 | |
|
124 | 129 | label { |
|
125 | 130 | color: @text-color; |
|
126 | 131 | |
|
127 | 132 | input[type="checkbox"] { |
|
128 | 133 | margin-right: 1em; |
|
129 | 134 | } |
|
130 | 135 | input[type="radio"] { |
|
131 | 136 | margin-right: 1em; |
|
132 | 137 | } |
|
133 | 138 | } |
|
134 | 139 | |
|
135 | 140 | code, |
|
136 | 141 | .code { |
|
137 | 142 | font-size: .95em; |
|
138 | 143 | font-family: @text-code; |
|
139 | 144 | color: @grey3; |
|
140 | 145 | |
|
141 | 146 | a { |
|
142 | 147 | color: lighten(@rcblue,10%) |
|
143 | 148 | } |
|
144 | 149 | } |
|
145 | 150 | |
|
146 | 151 | pre { |
|
147 | 152 | margin: 0; |
|
148 | 153 | padding: 0; |
|
149 | 154 | border: 0; |
|
150 | 155 | outline: 0; |
|
151 | 156 | font-size: @basefontsize*.95; |
|
152 | 157 | line-height: 1.4em; |
|
153 | 158 | font-family: @text-code; |
|
154 | 159 | color: @grey3; |
|
155 | 160 | } |
|
156 | 161 | |
|
157 | 162 | // Emphasis & misc |
|
158 | 163 | // ------------------------- |
|
159 | 164 | .discreet { |
|
160 | 165 | color: @grey4; |
|
161 | 166 | font-size: 85%; |
|
162 | 167 | font-weight: normal; |
|
163 | 168 | |
|
164 | 169 | a { |
|
165 | 170 | color: @grey4; |
|
166 | 171 | |
|
167 | 172 | &:hover { |
|
168 | 173 | color: @rcdarkblue; |
|
169 | 174 | } |
|
170 | 175 | } |
|
171 | 176 | } |
|
172 | 177 | |
|
173 | 178 | small, |
|
174 | 179 | .small { |
|
175 | 180 | font-size: 75%; |
|
176 | 181 | font-weight: normal; |
|
177 | 182 | line-height: 1em; |
|
178 | 183 | } |
|
179 | 184 | |
|
180 | 185 | mark, |
|
181 | 186 | .mark { |
|
182 | 187 | padding: .2em; |
|
183 | 188 | } |
|
184 | 189 | |
|
185 | 190 | // Alignment |
|
186 | 191 | .text-left { text-align: left; } |
|
187 | 192 | .text-right { text-align: right; } |
|
188 | 193 | .text-center { text-align: center; } |
|
189 | 194 | .text-justify { text-align: justify; } |
|
190 | 195 | .text-nowrap { white-space: nowrap; } |
|
191 | 196 | |
|
192 | 197 | // Transformation |
|
193 | 198 | .text-lowercase { text-transform: lowercase; } |
|
194 | 199 | .text-uppercase { text-transform: uppercase; } |
|
195 | 200 | .text-capitalize { text-transform: capitalize; } |
|
196 | 201 | |
|
197 | 202 | // Contextual colors |
|
198 | 203 | .text-muted { |
|
199 | 204 | color: @grey4; |
|
200 | 205 | } |
|
201 | 206 | .text-primary { |
|
202 | 207 | color: @rcblue; |
|
203 | 208 | } |
|
204 | 209 | .text-success { |
|
205 | 210 | color: @alert1; |
|
206 | 211 | } |
|
207 | 212 | .text-info { |
|
208 | 213 | color: @alert4; |
|
209 | 214 | } |
|
210 | 215 | .text-warning { |
|
211 | 216 | color: @alert3; |
|
212 | 217 | } |
|
213 | 218 | .text-danger { |
|
214 | 219 | color: @alert2; |
|
215 | 220 | } |
|
216 | 221 | |
|
217 | 222 | // Contextual backgrounds |
|
218 | 223 | .bg-primary { |
|
219 | 224 | background-color: white; |
|
220 | 225 | } |
|
221 | 226 | .bg-success { |
|
222 | 227 | background-color: @alert1; |
|
223 | 228 | } |
|
224 | 229 | .bg-info { |
|
225 | 230 | background-color: @alert4; |
|
226 | 231 | } |
|
227 | 232 | .bg-warning { |
|
228 | 233 | background-color: @alert3; |
|
229 | 234 | } |
|
230 | 235 | .bg-danger { |
|
231 | 236 | background-color: @alert2; |
|
232 | 237 | } |
|
233 | 238 | |
|
234 | 239 | |
|
235 | 240 | // Page header |
|
236 | 241 | // ------------------------- |
|
237 | 242 | |
|
238 | 243 | .page-header { |
|
239 | 244 | margin: @pagepadding 0 @textmargin; |
|
240 | 245 | border-bottom: @border-thickness solid @grey5; |
|
241 | 246 | } |
|
242 | 247 | |
|
243 | 248 | .title { |
|
244 | 249 | clear: both; |
|
245 | 250 | float: left; |
|
246 | 251 | width: 100%; |
|
247 | 252 | margin: @pagepadding/2 0 @pagepadding/4; |
|
248 | 253 | min-height: 25px; |
|
249 | 254 | |
|
250 | 255 | .breadcrumbs { |
|
251 | 256 | float: left; |
|
252 | 257 | clear: both; |
|
253 | 258 | width: 700px; |
|
254 | 259 | margin: 0; |
|
255 | 260 | |
|
256 | 261 | .q_filter_box { |
|
257 | 262 | margin-right: @padding; |
|
258 | 263 | } |
|
259 | 264 | } |
|
260 | 265 | |
|
261 | 266 | h1 a { |
|
262 | 267 | color: @rcblue; |
|
263 | 268 | } |
|
264 | 269 | |
|
265 | 270 | input{ |
|
266 | 271 | margin-right: @padding; |
|
267 | 272 | } |
|
268 | 273 | |
|
269 | 274 | h5, .h5 { |
|
270 | 275 | color: @grey1; |
|
271 | 276 | margin-bottom: @space; |
|
272 | 277 | |
|
273 | 278 | span { |
|
274 | 279 | display: inline-block; |
|
275 | 280 | } |
|
276 | 281 | } |
|
277 | 282 | |
|
278 | 283 | p { |
|
279 | 284 | margin-bottom: 0; |
|
280 | 285 | } |
|
281 | 286 | |
|
282 | 287 | .links { |
|
283 | 288 | float: right; |
|
284 | 289 | display: inline; |
|
285 | 290 | margin: 0; |
|
286 | 291 | padding-left: 0; |
|
287 | 292 | list-style: none; |
|
288 | 293 | text-align: right; |
|
289 | 294 | |
|
290 | 295 | li { |
|
291 | 296 | float: right; |
|
292 | 297 | list-style-type: none; |
|
293 | 298 | } |
|
294 | 299 | |
|
295 | 300 | a { |
|
296 | 301 | display: inline-block; |
|
297 | 302 | margin-left: @textmargin/2; |
|
298 | 303 | } |
|
299 | 304 | } |
|
300 | 305 | |
|
301 | 306 | .title-content { |
|
302 | 307 | float: left; |
|
303 | 308 | margin: 0; |
|
304 | 309 | padding: 0; |
|
305 | 310 | |
|
306 | 311 | & + .breadcrumbs { |
|
307 | 312 | margin-top: @padding; |
|
308 | 313 | } |
|
309 | 314 | |
|
310 | 315 | & + .links { |
|
311 | 316 | margin-top: -@button-padding; |
|
312 | 317 | |
|
313 | 318 | & + .breadcrumbs { |
|
314 | 319 | margin-top: @padding; |
|
315 | 320 | } |
|
316 | 321 | } |
|
317 | 322 | |
|
318 | 323 | .repo-group-desc { |
|
319 | 324 | padding: 8px 0px 0px 0px; |
|
320 | 325 | } |
|
321 | 326 | } |
|
322 | 327 | |
|
323 | 328 | .title-main { |
|
324 | 329 | font-size: @repo-title-fontsize; |
|
325 | 330 | } |
|
326 | 331 | |
|
327 | 332 | .title-description { |
|
328 | 333 | margin-top: .5em; |
|
329 | 334 | } |
|
330 | 335 | |
|
331 | 336 | .q_filter_box { |
|
332 | 337 | width: 200px; |
|
333 | 338 | } |
|
334 | 339 | |
|
335 | 340 | } |
|
336 | 341 | |
|
337 | 342 | #readme .title { |
|
338 | 343 | text-transform: none; |
|
339 | 344 | } |
|
340 | 345 | |
|
341 | 346 | // Lists |
|
342 | 347 | // ------------------------- |
|
343 | 348 | |
|
344 | 349 | // Unordered and Ordered lists |
|
345 | 350 | ul, |
|
346 | 351 | ol { |
|
347 | 352 | margin-top: 0; |
|
348 | 353 | margin-bottom: @textmargin; |
|
349 | 354 | ul, |
|
350 | 355 | ol { |
|
351 | 356 | margin-bottom: 0; |
|
352 | 357 | } |
|
353 | 358 | } |
|
354 | 359 | |
|
355 | 360 | li { |
|
356 | 361 | line-height: 2em; |
|
357 | 362 | } |
|
358 | 363 | |
|
359 | 364 | ul li { |
|
360 | 365 | position: relative; |
|
361 | 366 | list-style-type: disc; |
|
362 | 367 | |
|
363 | 368 | p:first-child { |
|
364 | 369 | display:inline; |
|
365 | 370 | } |
|
366 | 371 | } |
|
367 | 372 | |
|
368 | 373 | // List options |
|
369 | 374 | |
|
370 | 375 | // Unstyled keeps list items block level, just removes default browser padding and list-style |
|
371 | 376 | .list-unstyled { |
|
372 | 377 | padding-left: 0; |
|
373 | 378 | list-style: none; |
|
374 | 379 | li:before { content: none; } |
|
375 | 380 | } |
|
376 | 381 | |
|
377 | 382 | // Inline turns list items into inline-block |
|
378 | 383 | .list-inline { |
|
379 | 384 | .list-unstyled(); |
|
380 | 385 | margin-left: -5px; |
|
381 | 386 | |
|
382 | 387 | > li { |
|
383 | 388 | display: inline-block; |
|
384 | 389 | padding-left: 5px; |
|
385 | 390 | padding-right: 5px; |
|
386 | 391 | } |
|
387 | 392 | } |
|
388 | 393 | |
|
389 | 394 | // Description Lists |
|
390 | 395 | |
|
391 | 396 | dl { |
|
392 | 397 | margin-top: 0; // Remove browser default |
|
393 | 398 | margin-bottom: @textmargin; |
|
394 | 399 | } |
|
395 | 400 | |
|
396 | 401 | dt, |
|
397 | 402 | dd { |
|
398 | 403 | line-height: 1.4em; |
|
399 | 404 | } |
|
400 | 405 | |
|
401 | 406 | dt { |
|
402 | 407 | margin: @textmargin 0 0 0; |
|
403 | 408 | font-weight: @text-bold-weight; |
|
404 | 409 | font-family: @text-bold; |
|
405 | 410 | } |
|
406 | 411 | |
|
407 | 412 | dd { |
|
408 | 413 | margin-left: 0; // Undo browser default |
|
409 | 414 | } |
|
410 | 415 | |
|
411 | 416 | // Horizontal description lists |
|
412 | 417 | // Defaults to being stacked without any of the below styles applied, until the |
|
413 | 418 | // grid breakpoint is reached (default of ~768px). |
|
414 | 419 | // These are used in forms as well; see style guide. |
|
415 | 420 | // TODO: lisa: These should really not be used in forms. |
|
416 | 421 | |
|
417 | 422 | .dl-horizontal { |
|
418 | 423 | |
|
419 | 424 | overflow: hidden; |
|
420 | 425 | margin-bottom: @space; |
|
421 | 426 | |
|
422 | 427 | dt, dd { |
|
423 | 428 | float: left; |
|
424 | 429 | margin: 5px 0 5px 0; |
|
425 | 430 | } |
|
426 | 431 | |
|
427 | 432 | dt { |
|
428 | 433 | clear: left; |
|
429 | 434 | width: @label-width - @form-vertical-margin; |
|
430 | 435 | } |
|
431 | 436 | |
|
432 | 437 | dd { |
|
433 | 438 | &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present |
|
434 | 439 | margin-left: @form-vertical-margin; |
|
435 | 440 | max-width: @form-max-width - (@label-width - @form-vertical-margin) - @form-vertical-margin; |
|
436 | 441 | } |
|
437 | 442 | |
|
438 | 443 | pre { |
|
439 | 444 | margin: 0; |
|
440 | 445 | } |
|
441 | 446 | |
|
442 | 447 | &.settings { |
|
443 | 448 | dt { |
|
444 | 449 | text-align: left; |
|
445 | 450 | } |
|
446 | 451 | } |
|
447 | 452 | |
|
448 | 453 | @media (min-width: 768px) { |
|
449 | 454 | dt { |
|
450 | 455 | float: left; |
|
451 | 456 | width: 185px; |
|
452 | 457 | clear: left; |
|
453 | 458 | text-align: right; |
|
454 | 459 | } |
|
455 | 460 | dd { |
|
456 | 461 | margin-left: 20px; |
|
457 | 462 | } |
|
458 | 463 | } |
|
459 | 464 | } |
|
460 | 465 | |
|
461 | 466 | |
|
462 | 467 | // Misc |
|
463 | 468 | // ------------------------- |
|
464 | 469 | |
|
465 | 470 | // Abbreviations and acronyms |
|
466 | 471 | abbr[title], |
|
467 | 472 | abbr[data-original-title] { |
|
468 | 473 | cursor: help; |
|
469 | 474 | border-bottom: @border-thickness dotted @grey4; |
|
470 | 475 | } |
|
471 | 476 | .initialism { |
|
472 | 477 | font-size: 90%; |
|
473 | 478 | text-transform: uppercase; |
|
474 | 479 | } |
|
475 | 480 | |
|
476 | 481 | // Blockquotes |
|
477 | 482 | blockquote { |
|
478 | 483 | padding: 1em 2em; |
|
479 | 484 | margin: 0 0 2em; |
|
480 | 485 | font-size: @basefontsize; |
|
481 | 486 | border-left: 2px solid @grey6; |
|
482 | 487 | |
|
483 | 488 | p, |
|
484 | 489 | ul, |
|
485 | 490 | ol { |
|
486 | 491 | &:last-child { |
|
487 | 492 | margin-bottom: 0; |
|
488 | 493 | } |
|
489 | 494 | } |
|
490 | 495 | |
|
491 | 496 | footer, |
|
492 | 497 | small, |
|
493 | 498 | .small { |
|
494 | 499 | display: block; |
|
495 | 500 | font-size: 80%; |
|
496 | 501 | |
|
497 | 502 | &:before { |
|
498 | 503 | content: '\2014 \00A0'; // em dash, nbsp |
|
499 | 504 | } |
|
500 | 505 | } |
|
501 | 506 | } |
|
502 | 507 | |
|
503 | 508 | // Opposite alignment of blockquote |
|
504 | 509 | // |
|
505 | 510 | .blockquote-reverse, |
|
506 | 511 | blockquote.pull-right { |
|
507 | 512 | padding-right: 15px; |
|
508 | 513 | padding-left: 0; |
|
509 | 514 | border-right: 5px solid @grey6; |
|
510 | 515 | border-left: 0; |
|
511 | 516 | text-align: right; |
|
512 | 517 | |
|
513 | 518 | // Account for citation |
|
514 | 519 | footer, |
|
515 | 520 | small, |
|
516 | 521 | .small { |
|
517 | 522 | &:before { content: ''; } |
|
518 | 523 | &:after { |
|
519 | 524 | content: '\00A0 \2014'; // nbsp, em dash |
|
520 | 525 | } |
|
521 | 526 | } |
|
522 | 527 | } |
|
523 | 528 | |
|
524 | 529 | // Addresses |
|
525 | 530 | address { |
|
526 | 531 | margin-bottom: 2em; |
|
527 | 532 | font-style: normal; |
|
528 | 533 | line-height: 1.8em; |
|
529 | 534 | } |
|
530 | 535 | |
|
531 | 536 | .error-message { |
|
532 | 537 | display: block; |
|
533 | 538 | margin: @padding/3 0; |
|
534 | 539 | color: @alert2; |
|
535 | 540 | } |
|
536 | 541 | |
|
537 | 542 | .issue-tracker-link { |
|
538 | 543 | color: @rcblue; |
|
539 | 544 | } |
|
540 | 545 | |
|
541 | 546 | .info_text{ |
|
542 | 547 | font-size: @basefontsize; |
|
543 | 548 | color: @grey4; |
|
544 | 549 | font-family: @text-regular; |
|
545 | 550 | } |
|
546 | 551 | |
|
547 | 552 | .help-block-inline { |
|
548 | 553 | margin: 0; |
|
549 | 554 | } |
|
550 | 555 | |
|
551 | 556 | // help block text |
|
552 | 557 | .help-block { |
|
553 | 558 | display: block; |
|
554 | 559 | margin: 0 0 @padding; |
|
555 | 560 | color: @grey4; |
|
556 | 561 | font-family: @text-light; |
|
557 | 562 | &.pre-formatting { |
|
558 | 563 | white-space: pre-wrap; |
|
559 | 564 | } |
|
560 | 565 | } |
|
561 | 566 | |
|
562 | 567 | .error-message { |
|
563 | 568 | display: block; |
|
564 | 569 | margin: @padding/3 0; |
|
565 | 570 | color: @alert2; |
|
566 | 571 | } |
@@ -1,321 +1,321 b'' | |||
|
1 | 1 | <%inherit file="/base/base.mako"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title(*args)"> |
|
4 | 4 | ${_('%s Files') % c.repo_name} |
|
5 | 5 | %if hasattr(c,'file'): |
|
6 | 6 | · ${h.safe_unicode(c.file.path) or '\\'} |
|
7 | 7 | %endif |
|
8 | 8 | |
|
9 | 9 | %if c.rhodecode_name: |
|
10 | 10 | · ${h.branding(c.rhodecode_name)} |
|
11 | 11 | %endif |
|
12 | 12 | </%def> |
|
13 | 13 | |
|
14 | 14 | <%def name="breadcrumbs_links()"> |
|
15 | 15 | ${_('Files')} |
|
16 | 16 | %if c.file: |
|
17 | 17 | @ ${h.show_id(c.commit)} |
|
18 | 18 | %endif |
|
19 | 19 | </%def> |
|
20 | 20 | |
|
21 | 21 | <%def name="menu_bar_nav()"> |
|
22 | 22 | ${self.menu_items(active='repositories')} |
|
23 | 23 | </%def> |
|
24 | 24 | |
|
25 | 25 | <%def name="menu_bar_subnav()"> |
|
26 | 26 | ${self.repo_menu(active='files')} |
|
27 | 27 | </%def> |
|
28 | 28 | |
|
29 | 29 | <%def name="main()"> |
|
30 |
<div id="pjax-container" |
|
|
30 | <div id="pjax-container"> | |
|
31 | 31 | <div id="files_data"> |
|
32 | 32 | <%include file='files_pjax.mako'/> |
|
33 | 33 | </div> |
|
34 | 34 | </div> |
|
35 | 35 | <script> |
|
36 | 36 | var curState = { |
|
37 | 37 | commit_id: "${c.commit.raw_id}" |
|
38 | 38 | }; |
|
39 | 39 | |
|
40 | 40 | var getState = function(context) { |
|
41 | 41 | var url = $(location).attr('href'); |
|
42 | 42 | var _base_url = '${h.route_path("repo_files",repo_name=c.repo_name,commit_id='',f_path='')}'; |
|
43 | 43 | var _annotate_url = '${h.route_path("repo_files:annotated",repo_name=c.repo_name,commit_id='',f_path='')}'; |
|
44 | 44 | _base_url = _base_url.replace('//', '/'); |
|
45 | 45 | _annotate_url = _annotate_url.replace('//', '/'); |
|
46 | 46 | |
|
47 | 47 | //extract f_path from url. |
|
48 | 48 | var parts = url.split(_base_url); |
|
49 | 49 | if (parts.length != 2) { |
|
50 | 50 | parts = url.split(_annotate_url); |
|
51 | 51 | if (parts.length != 2) { |
|
52 | 52 | var rev = "tip"; |
|
53 | 53 | var f_path = ""; |
|
54 | 54 | } else { |
|
55 | 55 | var parts2 = parts[1].split('/'); |
|
56 | 56 | var rev = parts2.shift(); // pop the first element which is the revision |
|
57 | 57 | var f_path = parts2.join('/'); |
|
58 | 58 | } |
|
59 | 59 | |
|
60 | 60 | } else { |
|
61 | 61 | var parts2 = parts[1].split('/'); |
|
62 | 62 | var rev = parts2.shift(); // pop the first element which is the revision |
|
63 | 63 | var f_path = parts2.join('/'); |
|
64 | 64 | } |
|
65 | 65 | |
|
66 | 66 | var _node_list_url = pyroutes.url('repo_files_nodelist', |
|
67 | 67 | {repo_name: templateContext.repo_name, |
|
68 | 68 | commit_id: rev, f_path: f_path}); |
|
69 | 69 | var _url_base = pyroutes.url('repo_files', |
|
70 | 70 | {repo_name: templateContext.repo_name, |
|
71 | 71 | commit_id: rev, f_path:'__FPATH__'}); |
|
72 | 72 | return { |
|
73 | 73 | url: url, |
|
74 | 74 | f_path: f_path, |
|
75 | 75 | rev: rev, |
|
76 | 76 | commit_id: curState.commit_id, |
|
77 | 77 | node_list_url: _node_list_url, |
|
78 | 78 | url_base: _url_base |
|
79 | 79 | }; |
|
80 | 80 | }; |
|
81 | 81 | |
|
82 | 82 | var metadataRequest = null; |
|
83 | 83 | var getFilesMetadata = function() { |
|
84 | 84 | if (metadataRequest && metadataRequest.readyState != 4) { |
|
85 | 85 | metadataRequest.abort(); |
|
86 | 86 | } |
|
87 | 87 | if (fileSourcePage) { |
|
88 | 88 | return false; |
|
89 | 89 | } |
|
90 | 90 | |
|
91 | 91 | if ($('#file-tree-wrapper').hasClass('full-load')) { |
|
92 | 92 | // in case our HTML wrapper has full-load class we don't |
|
93 | 93 | // trigger the async load of metadata |
|
94 | 94 | return false; |
|
95 | 95 | } |
|
96 | 96 | |
|
97 | 97 | var state = getState('metadata'); |
|
98 | 98 | var url_data = { |
|
99 | 99 | 'repo_name': templateContext.repo_name, |
|
100 | 100 | 'commit_id': state.commit_id, |
|
101 | 101 | 'f_path': state.f_path |
|
102 | 102 | }; |
|
103 | 103 | |
|
104 | 104 | var url = pyroutes.url('repo_nodetree_full', url_data); |
|
105 | 105 | |
|
106 | 106 | metadataRequest = $.ajax({url: url}); |
|
107 | 107 | |
|
108 | 108 | metadataRequest.done(function(data) { |
|
109 | 109 | $('#file-tree').html(data); |
|
110 | 110 | timeagoActivate(); |
|
111 | 111 | }); |
|
112 | 112 | metadataRequest.fail(function (data, textStatus, errorThrown) { |
|
113 | 113 | console.log(data); |
|
114 | 114 | if (data.status != 0) { |
|
115 | 115 | alert("Error while fetching metadata.\nError code {0} ({1}).Please consider reloading the page".format(data.status,data.statusText)); |
|
116 | 116 | } |
|
117 | 117 | }); |
|
118 | 118 | }; |
|
119 | 119 | |
|
120 | 120 | var callbacks = function() { |
|
121 | 121 | var state = getState('callbacks'); |
|
122 | 122 | timeagoActivate(); |
|
123 | 123 | |
|
124 | 124 | // used for history, and switch to |
|
125 | 125 | var initialCommitData = { |
|
126 | 126 | id: null, |
|
127 | 127 | text: '${_("Pick Commit")}', |
|
128 | 128 | type: 'sha', |
|
129 | 129 | raw_id: null, |
|
130 | 130 | files_url: null |
|
131 | 131 | }; |
|
132 | 132 | |
|
133 | 133 | if ($('#trimmed_message_box').height() < 50) { |
|
134 | 134 | $('#message_expand').hide(); |
|
135 | 135 | } |
|
136 | 136 | |
|
137 | 137 | $('#message_expand').on('click', function(e) { |
|
138 | 138 | $('#trimmed_message_box').css('max-height', 'none'); |
|
139 | 139 | $(this).hide(); |
|
140 | 140 | }); |
|
141 | 141 | |
|
142 | 142 | if (fileSourcePage) { |
|
143 | 143 | // variants for with source code, not tree view |
|
144 | 144 | |
|
145 | 145 | // select code link event |
|
146 | 146 | $("#hlcode").mouseup(getSelectionLink); |
|
147 | 147 | |
|
148 | 148 | // file history select2 |
|
149 | 149 | select2FileHistorySwitcher('#diff1', initialCommitData, state); |
|
150 | 150 | |
|
151 | 151 | // show at, diff to actions handlers |
|
152 | 152 | $('#diff1').on('change', function(e) { |
|
153 | 153 | $('#diff_to_commit').removeClass('disabled').removeAttr("disabled"); |
|
154 | 154 | $('#diff_to_commit').val(_gettext('Diff to Commit ') + e.val.truncateAfter(8, '...')); |
|
155 | 155 | |
|
156 | 156 | $('#show_at_commit').removeClass('disabled').removeAttr("disabled"); |
|
157 | 157 | $('#show_at_commit').val(_gettext('Show at Commit ') + e.val.truncateAfter(8, '...')); |
|
158 | 158 | }); |
|
159 | 159 | |
|
160 | 160 | $('#diff_to_commit').on('click', function(e) { |
|
161 | 161 | var diff1 = $('#diff1').val(); |
|
162 | 162 | var diff2 = $('#diff2').val(); |
|
163 | 163 | |
|
164 | 164 | var url_data = { |
|
165 | 165 | repo_name: templateContext.repo_name, |
|
166 | 166 | source_ref: diff1, |
|
167 | 167 | source_ref_type: 'rev', |
|
168 | 168 | target_ref: diff2, |
|
169 | 169 | target_ref_type: 'rev', |
|
170 | 170 | merge: 1, |
|
171 | 171 | f_path: state.f_path |
|
172 | 172 | }; |
|
173 | 173 | window.location = pyroutes.url('repo_compare', url_data); |
|
174 | 174 | }); |
|
175 | 175 | |
|
176 | 176 | $('#show_at_commit').on('click', function(e) { |
|
177 | 177 | var diff1 = $('#diff1').val(); |
|
178 | 178 | |
|
179 | 179 | var annotate = $('#annotate').val(); |
|
180 | 180 | if (annotate === "True") { |
|
181 | 181 | var url = pyroutes.url('repo_files:annotated', |
|
182 | 182 | {'repo_name': templateContext.repo_name, |
|
183 | 183 | 'commit_id': diff1, 'f_path': state.f_path}); |
|
184 | 184 | } else { |
|
185 | 185 | var url = pyroutes.url('repo_files', |
|
186 | 186 | {'repo_name': templateContext.repo_name, |
|
187 | 187 | 'commit_id': diff1, 'f_path': state.f_path}); |
|
188 | 188 | } |
|
189 | 189 | window.location = url; |
|
190 | 190 | |
|
191 | 191 | }); |
|
192 | 192 | |
|
193 | 193 | // show more authors |
|
194 | 194 | $('#show_authors').on('click', function(e) { |
|
195 | 195 | e.preventDefault(); |
|
196 | 196 | var url = pyroutes.url('repo_file_authors', |
|
197 | 197 | {'repo_name': templateContext.repo_name, |
|
198 | 198 | 'commit_id': state.rev, 'f_path': state.f_path}); |
|
199 | 199 | |
|
200 | 200 | $.pjax({ |
|
201 | 201 | url: url, |
|
202 | 202 | data: 'annotate=${"1" if c.annotate else "0"}', |
|
203 | 203 | container: '#file_authors', |
|
204 | 204 | push: false, |
|
205 | 205 | timeout: pjaxTimeout |
|
206 | 206 | }).complete(function(){ |
|
207 | 207 | $('#show_authors').hide(); |
|
208 | 208 | $('#file_authors_title').html(_gettext('All Authors')) |
|
209 | 209 | }) |
|
210 | 210 | }); |
|
211 | 211 | |
|
212 | 212 | // load file short history |
|
213 | 213 | $('#file_history_overview').on('click', function(e) { |
|
214 | 214 | e.preventDefault(); |
|
215 | 215 | path = state.f_path; |
|
216 | 216 | if (path.indexOf("#") >= 0) { |
|
217 | 217 | path = path.slice(0, path.indexOf("#")); |
|
218 | 218 | } |
|
219 | 219 | var url = pyroutes.url('repo_changelog_file', |
|
220 | 220 | {'repo_name': templateContext.repo_name, |
|
221 | 221 | 'commit_id': state.rev, 'f_path': path, 'limit': 6}); |
|
222 | 222 | $('#file_history_container').show(); |
|
223 | 223 | $('#file_history_container').html('<div class="file-history-inner">{0}</div>'.format(_gettext('Loading ...'))); |
|
224 | 224 | |
|
225 | 225 | $.pjax({ |
|
226 | 226 | url: url, |
|
227 | 227 | container: '#file_history_container', |
|
228 | 228 | push: false, |
|
229 | 229 | timeout: pjaxTimeout |
|
230 | 230 | }) |
|
231 | 231 | }); |
|
232 | 232 | |
|
233 | 233 | } |
|
234 | 234 | else { |
|
235 | 235 | getFilesMetadata(); |
|
236 | 236 | |
|
237 | 237 | // fuzzy file filter |
|
238 | 238 | fileBrowserListeners(state.node_list_url, state.url_base); |
|
239 | 239 | |
|
240 | 240 | // switch to widget |
|
241 | 241 | select2RefSwitcher('#refs_filter', initialCommitData); |
|
242 | 242 | $('#refs_filter').on('change', function(e) { |
|
243 | 243 | var data = $('#refs_filter').select2('data'); |
|
244 | 244 | curState.commit_id = data.raw_id; |
|
245 | 245 | $.pjax({url: data.files_url, container: '#pjax-container', timeout: pjaxTimeout}); |
|
246 | 246 | }); |
|
247 | 247 | |
|
248 | 248 | $("#prev_commit_link").on('click', function(e) { |
|
249 | 249 | var data = $(this).data(); |
|
250 | 250 | curState.commit_id = data.commitId; |
|
251 | 251 | }); |
|
252 | 252 | |
|
253 | 253 | $("#next_commit_link").on('click', function(e) { |
|
254 | 254 | var data = $(this).data(); |
|
255 | 255 | curState.commit_id = data.commitId; |
|
256 | 256 | }); |
|
257 | 257 | |
|
258 | 258 | $('#at_rev').on("keypress", function(e) { |
|
259 | 259 | /* ENTER PRESSED */ |
|
260 | 260 | if (e.keyCode === 13) { |
|
261 | 261 | var rev = $('#at_rev').val(); |
|
262 | 262 | // explicit reload page here. with pjax entering bad input |
|
263 | 263 | // produces not so nice results |
|
264 | 264 | window.location = pyroutes.url('repo_files', |
|
265 | 265 | {'repo_name': templateContext.repo_name, |
|
266 | 266 | 'commit_id': rev, 'f_path': state.f_path}); |
|
267 | 267 | } |
|
268 | 268 | }); |
|
269 | 269 | } |
|
270 | 270 | }; |
|
271 | 271 | |
|
272 | 272 | var pjaxTimeout = 5000; |
|
273 | 273 | |
|
274 | 274 | $(document).pjax(".pjax-link", "#pjax-container", { |
|
275 | 275 | "fragment": "#pjax-content", |
|
276 | 276 | "maxCacheLength": 1000, |
|
277 | 277 | "timeout": pjaxTimeout |
|
278 | 278 | }); |
|
279 | 279 | |
|
280 | 280 | // define global back/forward states |
|
281 | 281 | var isPjaxPopState = false; |
|
282 | 282 | $(document).on('pjax:popstate', function() { |
|
283 | 283 | isPjaxPopState = true; |
|
284 | 284 | }); |
|
285 | 285 | |
|
286 | 286 | $(document).on('pjax:end', function(xhr, options) { |
|
287 | 287 | if (isPjaxPopState) { |
|
288 | 288 | isPjaxPopState = false; |
|
289 | 289 | callbacks(); |
|
290 | 290 | _NODEFILTER.resetFilter(); |
|
291 | 291 | } |
|
292 | 292 | |
|
293 | 293 | // run callback for tracking if defined for google analytics etc. |
|
294 | 294 | // this is used to trigger tracking on pjax |
|
295 | 295 | if (typeof window.rhodecode_statechange_callback !== 'undefined') { |
|
296 | 296 | var state = getState('statechange'); |
|
297 | 297 | rhodecode_statechange_callback(state.url, null) |
|
298 | 298 | } |
|
299 | 299 | }); |
|
300 | 300 | |
|
301 | 301 | $(document).on('pjax:success', function(event, xhr, options) { |
|
302 | 302 | if (event.target.id == "file_history_container") { |
|
303 | 303 | $('#file_history_overview').hide(); |
|
304 | 304 | $('#file_history_overview_full').show(); |
|
305 | 305 | timeagoActivate(); |
|
306 | 306 | } else { |
|
307 | 307 | callbacks(); |
|
308 | 308 | } |
|
309 | 309 | }); |
|
310 | 310 | |
|
311 | 311 | $(document).ready(function() { |
|
312 | 312 | callbacks(); |
|
313 | 313 | var search_GET = "${request.GET.get('search','')}"; |
|
314 | 314 | if (search_GET === "1") { |
|
315 | 315 | _NODEFILTER.initFilter(); |
|
316 | 316 | } |
|
317 | 317 | }); |
|
318 | 318 | |
|
319 | 319 | </script> |
|
320 | 320 | |
|
321 | 321 | </%def> |
@@ -1,49 +1,46 b'' | |||
|
1 | 1 | <%def name="title(*args)"> |
|
2 | 2 | ${_('{} Files').format(c.repo_name)} |
|
3 | 3 | %if hasattr(c,'file'): |
|
4 | 4 | · ${(h.safe_unicode(c.file.path) or '\\')} |
|
5 | 5 | %endif |
|
6 | 6 | |
|
7 | 7 | %if c.rhodecode_name: |
|
8 | 8 | · ${h.branding(c.rhodecode_name)} |
|
9 | 9 | %endif |
|
10 | 10 | </%def> |
|
11 | 11 | |
|
12 | 12 | <div id="pjax-content" data-title="${self.title()}"> |
|
13 | 13 | <script> |
|
14 | 14 | // set the pageSource variable |
|
15 | 15 | var fileSourcePage = ${c.file_source_page}; |
|
16 | 16 | </script> |
|
17 | 17 | |
|
18 | 18 | <div class="summary-detail"> |
|
19 | 19 | <div class="summary-detail-header"> |
|
20 | 20 | <div class="breadcrumbs files_location"> |
|
21 | 21 | <h4> |
|
22 |
|
|
|
22 | ${h.files_breadcrumbs(c.repo_name,c.commit.raw_id,c.file.path)} | |
|
23 | 23 | %if c.annotate: |
|
24 | 24 | - ${_('annotation')} |
|
25 | 25 | %endif |
|
26 | 26 | </h4> |
|
27 | 27 | </div> |
|
28 | <div class="btn-collapse" data-toggle="summary-details"> | |
|
29 | ${_('Show More')} | |
|
30 | </div> | |
|
31 | 28 | </div><!--end summary-detail-header--> |
|
32 | 29 | |
|
33 | 30 | % if c.file.is_submodule(): |
|
34 | 31 | <span class="submodule-dir">Submodule ${h.escape(c.file.name)}</span> |
|
35 | 32 | % elif c.file.is_dir(): |
|
36 | 33 | <%include file='files_tree_header.mako'/> |
|
37 | 34 | % else: |
|
38 | 35 | <%include file='files_source_header.mako'/> |
|
39 | 36 | % endif |
|
40 | 37 | |
|
41 | 38 | </div> <!--end summary-detail--> |
|
42 | 39 | |
|
43 | 40 | % if c.file.is_dir(): |
|
44 | 41 | <%include file='files_browser.mako'/> |
|
45 | 42 | % else: |
|
46 | 43 | <%include file='files_source.mako'/> |
|
47 | 44 | % endif |
|
48 | 45 | |
|
49 | 46 | </div> |
@@ -1,45 +1,37 b'' | |||
|
1 | 1 | <%namespace name="base" file="/base/base.mako"/> |
|
2 | 2 | <%namespace name="file_base" file="/files/base.mako"/> |
|
3 | 3 | |
|
4 | <div class="fieldset collapsable-content no-hide" data-toggle="summary-details"> | |
|
5 |
<div class=" |
|
|
6 | ${_('Description')}: | |
|
7 | </div> | |
|
8 |
<div class="commit |
|
|
9 | </div> | |
|
4 | <div class="summary"> | |
|
5 | <div class="fieldset"> | |
|
6 | <div class="left-content"> | |
|
7 | <div class="fieldset collapsable-content no-hide" data-toggle="summary-details"> | |
|
8 | <div class="commit truncate-wrap">${h.urlify_commit_message(h.chop_at_smart(c.commit.message, '\n', suffix_if_chopped='...'), c.repo_name)}</div> | |
|
9 | </div> | |
|
10 | ||
|
11 | <div class="fieldset collapsable-content" data-toggle="summary-details"> | |
|
12 | <div class="commit">${h.urlify_commit_message(c.commit.message,c.repo_name)}</div> | |
|
13 | </div> | |
|
10 | 14 | |
|
11 | <div class="fieldset collapsable-content" data-toggle="summary-details"> | |
|
12 | <div class="left-label"> | |
|
13 | ${_('Description')}: | |
|
15 | <div class="clear-fix">${base.gravatar_with_user(c.commit.author)}-${h.age_component(c.commit.date)}</div> | |
|
16 | </div> | |
|
17 | ||
|
18 | <div class="right-content"> | |
|
19 | <div class="tags commit-info"> | |
|
20 | <code> | |
|
21 | <a href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=c.commit.raw_id)}">${h.show_id(c.commit)}</a> | |
|
22 | </code> | |
|
23 | ||
|
24 | ${file_base.refs(c.commit)} | |
|
25 | </div> | |
|
26 | </div> | |
|
27 | <div class="clear-fix"> | |
|
14 | 28 | </div> |
|
15 | <div class="commit right-content">${h.urlify_commit_message(c.commit.message,c.repo_name)}</div> | |
|
16 | </div> | |
|
29 | ||
|
17 | 30 | |
|
18 | <div class="fieldset"> | |
|
19 | <div class="left-label"> | |
|
20 | ${_('References')}: | |
|
21 | </div> | |
|
22 | <div class="right-content"> | |
|
23 | <div class="tags"> | |
|
24 | <code> | |
|
25 | <a href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=c.commit.raw_id)}">${h.show_id(c.commit)}</a> | |
|
26 | </code> | |
|
27 | ||
|
28 | ${file_base.refs(c.commit)} | |
|
29 | </div> | |
|
31 | <div class="btn-collapse" data-toggle="summary-details"> | |
|
32 | ${_('Show More')} | |
|
30 | 33 | </div> |
|
31 | 34 | </div> |
|
32 | ||
|
33 | <div class="fieldset"> | |
|
34 | <div class="left-label"> | |
|
35 | ${_('Commit Author')}: | |
|
36 | </div> | |
|
37 | <div class="right-content"> | |
|
38 | ${base.gravatar_with_user(c.commit.author)} | |
|
39 | <div class="user-inline-data">- ${h.age_component(c.commit.date)}</div> | |
|
40 | </div> | |
|
41 | </div> | |
|
42 | ||
|
43 | 35 | <script> |
|
44 | 36 | collapsableContent(); |
|
45 | 37 | </script> |
General Comments 0
You need to be logged in to leave comments.
Login now