##// END OF EJS Templates
front-end: More clean-up after YUI is gone
Mads Kiilerich -
r7390:f78aa989 default
parent child Browse files
Show More
@@ -1,251 +1,251 b''
1 1 # -*- coding: utf-8 -*-
2 2 # This program is free software: you can redistribute it and/or modify
3 3 # it under the terms of the GNU General Public License as published by
4 4 # the Free Software Foundation, either version 3 of the License, or
5 5 # (at your option) any later version.
6 6 #
7 7 # This program is distributed in the hope that it will be useful,
8 8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 10 # GNU General Public License for more details.
11 11 #
12 12 # You should have received a copy of the GNU General Public License
13 13 # along with this program. If not, see <http://www.gnu.org/licenses/>.
14 14 """
15 15 Custom paging classes
16 16 """
17 17 import logging
18 18 import math
19 19 import re
20 20 from kallithea.config.routing import url
21 21 from webhelpers.html import literal, HTML
22 22 from webhelpers.paginate import Page as _Page
23 23
24 24 log = logging.getLogger(__name__)
25 25
26 26
27 27 class Page(_Page):
28 28 """
29 Custom pager to match rendering style with YUI paginator emitting Bootstrap paginators
29 Custom pager emitting Bootstrap paginators
30 30 """
31 31
32 32 def __init__(self, *args, **kwargs):
33 33 kwargs.setdefault('url', url.current)
34 34 _Page.__init__(self, *args, **kwargs)
35 35
36 36 def _get_pos(self, cur_page, max_page, items):
37 37 edge = (items / 2) + 1
38 38 if (cur_page <= edge):
39 39 radius = max(items / 2, items - cur_page)
40 40 elif (max_page - cur_page) < edge:
41 41 radius = (items - 1) - (max_page - cur_page)
42 42 else:
43 43 radius = items / 2
44 44
45 45 left = max(1, (cur_page - (radius)))
46 46 right = min(max_page, cur_page + (radius))
47 47 return left, cur_page, right
48 48
49 49 def _range(self, regexp_match):
50 50 """
51 51 Return range of linked pages (e.g. '1 2 [3] 4 5 6 7 8').
52 52
53 53 Arguments:
54 54
55 55 regexp_match
56 56 A "re" (regular expressions) match object containing the
57 57 radius of linked pages around the current page in
58 58 regexp_match.group(1) as a string
59 59
60 60 This function is supposed to be called as a callable in
61 61 re.sub.
62 62
63 63 """
64 64 radius = int(regexp_match.group(1))
65 65
66 66 # Compute the first and last page number within the radius
67 67 # e.g. '1 .. 5 6 [7] 8 9 .. 12'
68 68 # -> leftmost_page = 5
69 69 # -> rightmost_page = 9
70 70 leftmost_page, _cur, rightmost_page = self._get_pos(self.page,
71 71 self.last_page,
72 72 (radius * 2) + 1)
73 73 nav_items = []
74 74
75 75 # Create a link to the first page (unless we are on the first page
76 76 # or there would be no need to insert '..' spacers)
77 77 if self.page != self.first_page and self.first_page < leftmost_page:
78 78 nav_items.append(HTML.li(self._pagerlink(self.first_page, self.first_page)))
79 79
80 80 # Insert dots if there are pages between the first page
81 81 # and the currently displayed page range
82 82 if leftmost_page - self.first_page > 1:
83 83 # Wrap in a SPAN tag if nolink_attr is set
84 84 text_ = '..'
85 85 if self.dotdot_attr:
86 86 text_ = HTML.span(c=text_, **self.dotdot_attr)
87 87 nav_items.append(HTML.li(text_))
88 88
89 89 for thispage in xrange(leftmost_page, rightmost_page + 1):
90 90 # Highlight the current page number and do not use a link
91 91 text_ = str(thispage)
92 92 if thispage == self.page:
93 93 # Wrap in a SPAN tag if nolink_attr is set
94 94 if self.curpage_attr:
95 95 text_ = HTML.li(HTML.span(c=text_), **self.curpage_attr)
96 96 nav_items.append(text_)
97 97 # Otherwise create just a link to that page
98 98 else:
99 99 nav_items.append(HTML.li(self._pagerlink(thispage, text_)))
100 100
101 101 # Insert dots if there are pages between the displayed
102 102 # page numbers and the end of the page range
103 103 if self.last_page - rightmost_page > 1:
104 104 text_ = '..'
105 105 # Wrap in a SPAN tag if nolink_attr is set
106 106 if self.dotdot_attr:
107 107 text_ = HTML.span(c=text_, **self.dotdot_attr)
108 108 nav_items.append(HTML.li(text_))
109 109
110 110 # Create a link to the very last page (unless we are on the last
111 111 # page or there would be no need to insert '..' spacers)
112 112 if self.page != self.last_page and rightmost_page < self.last_page:
113 113 nav_items.append(HTML.li(self._pagerlink(self.last_page, self.last_page)))
114 114
115 115 #_page_link = url.current()
116 116 #nav_items.append(literal('<link rel="prerender" href="%s?page=%s">' % (_page_link, str(int(self.page)+1))))
117 117 #nav_items.append(literal('<link rel="prefetch" href="%s?page=%s">' % (_page_link, str(int(self.page)+1))))
118 118 return self.separator.join(nav_items)
119 119
120 120 def pager(self, format='<ul class="pagination">$link_previous ~2~ $link_next</ul>', page_param='page', partial_param='partial',
121 121 show_if_single_page=False, separator=' ', onclick=None,
122 122 symbol_first='<<', symbol_last='>>',
123 123 symbol_previous='<', symbol_next='>',
124 124 link_attr=None,
125 125 curpage_attr=None,
126 126 dotdot_attr=None, **kwargs):
127 127 self.curpage_attr = curpage_attr or {'class': 'active'}
128 128 self.separator = separator
129 129 self.pager_kwargs = kwargs
130 130 self.page_param = page_param
131 131 self.partial_param = partial_param
132 132 self.onclick = onclick
133 133 self.link_attr = link_attr or {'class': 'pager_link', 'rel': 'prerender'}
134 134 self.dotdot_attr = dotdot_attr or {'class': 'pager_dotdot'}
135 135
136 136 # Don't show navigator if there is no more than one page
137 137 if self.page_count == 0 or (self.page_count == 1 and not show_if_single_page):
138 138 return ''
139 139
140 140 from string import Template
141 141 # Replace ~...~ in token format by range of pages
142 142 result = re.sub(r'~(\d+)~', self._range, format)
143 143
144 144 # Interpolate '%' variables
145 145 result = Template(result).safe_substitute({
146 146 'first_page': self.first_page,
147 147 'last_page': self.last_page,
148 148 'page': self.page,
149 149 'page_count': self.page_count,
150 150 'items_per_page': self.items_per_page,
151 151 'first_item': self.first_item,
152 152 'last_item': self.last_item,
153 153 'item_count': self.item_count,
154 154 'link_first': self.page > self.first_page and \
155 155 self._pagerlink(self.first_page, symbol_first) or '',
156 156 'link_last': self.page < self.last_page and \
157 157 self._pagerlink(self.last_page, symbol_last) or '',
158 158 'link_previous': HTML.li(self.previous_page and \
159 159 self._pagerlink(self.previous_page, symbol_previous) \
160 160 or HTML.a(symbol_previous)),
161 161 'link_next': HTML.li(self.next_page and \
162 162 self._pagerlink(self.next_page, symbol_next) \
163 163 or HTML.a(symbol_next))
164 164 })
165 165
166 166 return literal(result)
167 167
168 168
169 169 class RepoPage(Page):
170 170
171 171 def __init__(self, collection, page=1, items_per_page=20,
172 172 item_count=None, **kwargs):
173 173
174 174 """Create a "RepoPage" instance. special pager for paging
175 175 repository
176 176 """
177 177 # TODO: call baseclass __init__
178 178 self._url_generator = kwargs.pop('url', url.current)
179 179
180 180 # Safe the kwargs class-wide so they can be used in the pager() method
181 181 self.kwargs = kwargs
182 182
183 183 # Save a reference to the collection
184 184 self.original_collection = collection
185 185
186 186 self.collection = collection
187 187
188 188 # The self.page is the number of the current page.
189 189 # The first page has the number 1!
190 190 try:
191 191 self.page = int(page) # make it int() if we get it as a string
192 192 except (ValueError, TypeError):
193 193 log.error("Invalid page value: %r" % page)
194 194 self.page = 1
195 195
196 196 self.items_per_page = items_per_page
197 197
198 198 # Unless the user tells us how many items the collections has
199 199 # we calculate that ourselves.
200 200 if item_count is not None:
201 201 self.item_count = item_count
202 202 else:
203 203 self.item_count = len(self.collection)
204 204
205 205 # Compute the number of the first and last available page
206 206 if self.item_count > 0:
207 207 self.first_page = 1
208 208 self.page_count = int(math.ceil(float(self.item_count) /
209 209 self.items_per_page))
210 210 self.last_page = self.first_page + self.page_count - 1
211 211
212 212 # Make sure that the requested page number is the range of
213 213 # valid pages
214 214 if self.page > self.last_page:
215 215 self.page = self.last_page
216 216 elif self.page < self.first_page:
217 217 self.page = self.first_page
218 218
219 219 # Note: the number of items on this page can be less than
220 220 # items_per_page if the last page is not full
221 221 self.first_item = max(0, (self.item_count) - (self.page *
222 222 items_per_page))
223 223 self.last_item = ((self.item_count - 1) - items_per_page *
224 224 (self.page - 1))
225 225
226 226 self.items = list(self.collection[self.first_item:self.last_item + 1])
227 227
228 228 # Links to previous and next page
229 229 if self.page > self.first_page:
230 230 self.previous_page = self.page - 1
231 231 else:
232 232 self.previous_page = None
233 233
234 234 if self.page < self.last_page:
235 235 self.next_page = self.page + 1
236 236 else:
237 237 self.next_page = None
238 238
239 239 # No items available
240 240 else:
241 241 self.first_page = None
242 242 self.page_count = 0
243 243 self.last_page = None
244 244 self.first_item = None
245 245 self.last_item = None
246 246 self.previous_page = None
247 247 self.next_page = None
248 248 self.items = []
249 249
250 250 # This is a subclass of the 'list' type. Initialise the list now.
251 251 list.__init__(self, reversed(self.items))
@@ -1,29 +1,28 b''
1 1 /*!
2 2 * Don't edit the css file directly.
3 3 *
4 4 * Instead, edit the less file(s) and regenerate the css:
5 5 *
6 6 * npm install
7 7 * npm run less
8 8 *
9 9 */
10 10
11 11 /* 3rd party styles */
12 12 @import "node_modules/bootstrap/less/bootstrap.less";
13 13 @import (inline) "node_modules/datatables.net-bs/css/dataTables.bootstrap.css";
14 14 @import (inline) "node_modules/at.js/dist/css/jquery.atwho.css";
15 15 @import (less) "node_modules/select2/select2.css";
16 16 @import (less) "node_modules/select2-bootstrap-css/select2-bootstrap.css";
17 17 @import (less) "tmp/pygments.css";
18 18 @import (less) "../fontello/css/kallithea.css";
19 19
20 20 /* kallithea styles */
21 21 @import "kallithea-variables.less";
22 22 @import "kallithea-labels.less";
23 @import "yui-ac.less";
24 23 @import "kallithea-select2.less";
25 24 @import "kallithea-diff.less";
26 25 @import "style.less";
27 26
28 27 /* finally, import the optional theme file with local customizations */
29 28 @import (optional) "theme.less";
@@ -1,937 +1,936 b''
1 1 body {
2 2 background: url("../images/background.png") repeat scroll 0 0 #B0B0B0;
3 3 }
4 4
5 5 /* pseude content that should not be selected or copied by the user */
6 6 [data-pseudo-content]:before {
7 7 content: attr(data-pseudo-content);
8 8 }
9 9
10 10 /* class for texts where newlines should be preserved, for very light-weight ascii art markup (like pull request descriptions) */
11 11 .formatted-fixed {
12 12 font-family: @font-family-monospace;
13 13 white-space: pre-wrap;
14 14 }
15 15
16 16 /* use monospace for changeset hashes */
17 17 .changeset_hash {
18 18 font-family: @font-family-monospace;
19 19 }
20 20
21 21 /* Note: class 'icon-empty' or 'icon-gravatar' can be used to get icon-ish styling without an actual glyph */
22 22 i[class^='icon-empty'],
23 23 i[class^='icon-gravatar'] {
24 24 background-repeat: no-repeat;
25 25 background-position: center;
26 26 display: inline-block;
27 27 min-width: 16px;
28 28 min-height: 16px;
29 29 margin: -2px 0 -4px 0;
30 30 }
31 31
32 32 .inline-comments-general.show-general-status .hidden.general-only {
33 33 display: block !important;
34 34 }
35 35 .truncate {
36 36 white-space: nowrap;
37 37 overflow: hidden;
38 38 text-overflow: ellipsis;
39 39 -o-text-overflow: ellipsis;
40 40 -ms-text-overflow: ellipsis;
41 41 }
42 42 .truncate.autoexpand:hover {
43 43 overflow: visible;
44 44 }
45 45
46 46 /* show comment anchors when hovering over panel-heading */
47 47 a.permalink {
48 48 visibility: hidden;
49 49 }
50 50 .panel-heading:hover .permalink {
51 51 visibility: visible;
52 52 }
53 53
54 54 .navbar-inverse {
55 55 border: none;
56 56 }
57 57
58 58 /* logo */
59 59 nav.navbar.mainmenu > .navbar-header > .navbar-brand {
60 60 font-size: 20px;
61 61 padding-top: 12px;
62 62 > .branding:before {
63 63 content: "";
64 64 display: inline-block;
65 65 margin-right: .2em;
66 66 background-image: url(@kallithea-logo-url);
67 67 width: @kallithea-logo-width;
68 68 height: @kallithea-logo-height;
69 69 margin-bottom: -@kallithea-logo-bottom;
70 70 margin-top: -12px;
71 71 }
72 72 }
73 73
74 74 /* code highlighting */
75 75 /* don't use bootstrap style for code blocks */
76 76 .code-highlighttable pre {
77 77 background: inherit;
78 78 border: 0;
79 79 }
80 80
81 81 /* every direct child of a panel, that is not .panel-heading, should auto
82 82 * overflow to prevent overflowing of elements like text boxes and tables */
83 83 .panel > :not(.panel-heading){
84 84 overflow-x: auto;
85 85 min-height: 0.01%;
86 86 }
87 87
88 88 /* allow other exceptions to automatic overflow-x */
89 89 .panel > .overflow-x-visible {
90 90 overflow-x: visible;
91 91 }
92 92
93 93 /* margin below top level panels */
94 94 #main > .panel {
95 95 margin-bottom: @kallithea-panel-margin;
96 96 }
97 97
98 98 /* search highlighting */
99 99 div.search-code-body pre .match {
100 100 background-color: @highlight-color;
101 101 }
102 102 div.search-code-body pre .break {
103 103 background-color: @highlight-line-color;
104 104 width: 100%;
105 105 display: block;
106 106 }
107 107
108 108 /* use @alert-danger-text for form error messages and .alert-danger for the input element */
109 109 .form-group .error-message {
110 110 color: @alert-danger-text;
111 111 display: inline-block;
112 112 padding-top: 5px;
113 113 &:empty{
114 114 display: none;
115 115 }
116 116 }
117 117 input.error {
118 118 .alert-danger;
119 119 }
120 120
121 121 /* datatable */
122 122 .dataTables_left {
123 123 .pull-left;
124 124 }
125 125 .dataTables_right {
126 126 .pull-right;
127 127 }
128 128
129 129 /* make all datatable paginations small */
130 130 .dataTables_paginate .pagination {
131 131 .pagination-sm;
132 132 }
133 133
134 134 /* show column sort icons in our font ... and before column header */
135 135 table.dataTable {
136 136 .sorting_asc:before {
137 137 font-family: "kallithea";
138 138 content: "\23f6";
139 139 padding-right: 8px;
140 140 }
141 141 .sorting_desc:before {
142 142 font-family: "kallithea";
143 143 content: "\23f7";
144 144 padding-right: 8px;
145 145 }
146 146 .sorting:before {
147 147 font-family: "kallithea";
148 148 content: "\2195";
149 149 padding-right: 8px;
150 150 opacity: 0.5;
151 151 }
152 152 .sorting_asc:after,
153 153 .sorting_desc:after,
154 154 .sorting:after {
155 155 content: "" !important;
156 156 }
157 157 }
158 158
159 159 /* _dt_elements.html styling - some submit buttons have their own form but should still be shown inline */
160 160 table.dataTable td > .btn + form {
161 161 display: inline;
162 162 }
163 163
164 164 table.dataTable .dt_repo_pending {
165 165 opacity: 0.5;
166 166 }
167 167
168 168 /* language bars (summary page) */
169 169 #lang_stats {
170 170 .progress-bar {
171 171 min-width: 15px;
172 172 border-top-right-radius: 8px;
173 173 border-bottom-right-radius: 8px;
174 174 }
175 175 td {
176 176 padding: 1px 0 !important;
177 177 }
178 178 }
179 179
180 180 /* use pointer cursor for expand_commit */
181 181 .expand_commit .icon-align-left {
182 182 cursor: pointer;
183 183 color: #999;
184 184 }
185 185
186 186 /* don't break author, date and comment cells into multiple lines in changeset table */
187 187 table.changesets {
188 188 .author,
189 189 .date,
190 190 .comments {
191 191 white-space: nowrap;
192 192 }
193 193 }
194 194
195 195 /* textareas should be at least 100px high and 400px wide */
196 196 textarea.form-control {
197 197 font-family: @font-family-monospace;
198 198 min-height: 100px;
199 199 min-width: 400px;
200 200 }
201 201
202 202 /* add some space between the code-browser icons and the file names */
203 203 .browser-dir > i[class^='icon-'],
204 204 .submodule-dir > i[class^='icon-'],
205 205 .browser-file > i[class^='icon-'] {
206 206 padding-right: 0.3em;
207 207 }
208 208
209 209 div.panel-primary {
210 210 border: none;
211 211 }
212 212
213 213 /* no extra vertical margin */
214 214 #content div.panel ul.pagination {
215 215 margin: 0;
216 216 }
217 217
218 218 /* remove margin below footer */
219 219 .navbar.footer {
220 220 margin-bottom: 0;
221 221 }
222 222
223 223 .user-menu {
224 224 padding: 0 !important;
225 225 }
226 226 #quick_login {
227 227 width: 360px;
228 228 margin-top: 15px;
229 229 min-height: 110px;
230 230 }
231 231 #quick_login input#username,
232 232 #quick_login input#password {
233 233 display: block;
234 234 margin: 5px 0 10px;
235 235 }
236 236 #quick_login .password_forgotten a,
237 237 #quick_login .register a {
238 238 padding: 0 !important;
239 239 line-height: 25px !important;
240 240 float: left;
241 241 clear: both;
242 242 }
243 243 #quick_login .submit {
244 244 float: right;
245 245 }
246 246 #quick_login .submit input#sign_in {
247 247 margin-top: 5px;
248 248 }
249 249 #quick_login > .pull-left {
250 250 width: 170px;
251 251 }
252 252 #quick_login > .pull-right {
253 253 width: 140px;
254 254 }
255 255 #quick_login .full_name {
256 256 font-weight: bold;
257 257 padding: 3px;
258 258 }
259 259 #quick_login .email {
260 260 padding: 3px 3px 3px 0;
261 261 }
262 262 #quick_login :not(input) {
263 263 color: @kallithea-theme-inverse-color;
264 264 padding-bottom: 3px;
265 265 }
266 266
267 267 #journal .journal_user {
268 268 color: #747474;
269 269 font-size: 14px;
270 270 font-weight: bold;
271 271 height: 30px;
272 272 }
273 273 #journal .journal_user.deleted {
274 274 color: #747474;
275 275 font-size: 14px;
276 276 font-weight: normal;
277 277 height: 30px;
278 278 font-style: italic;
279 279 }
280 280 #journal .journal_icon {
281 281 clear: both;
282 282 float: left;
283 283 padding-right: 4px;
284 284 padding-top: 3px;
285 285 }
286 286 #journal .journal_action {
287 287 padding-top: 4px;
288 288 min-height: 2px;
289 289 float: left;
290 290 }
291 291 #journal .journal_action_params {
292 292 clear: left;
293 293 padding-left: 22px;
294 294 }
295 295 #journal .date {
296 296 clear: both;
297 297 color: #777777;
298 298 font-size: 11px;
299 299 padding-left: 22px;
300 300 }
301 301 #journal .journal_repo_name {
302 302 font-weight: bold;
303 303 font-size: 1.1em;
304 304 }
305 305 #journal .compare_view {
306 306 padding: 5px 0px 5px 0px;
307 307 width: 95px;
308 308 }
309 309 .trending_language_tbl,
310 310 .trending_language_tbl td {
311 311 border: 0 !important;
312 312 margin: 0 !important;
313 313 padding: 0 !important;
314 314 }
315 315 .trending_language_tbl,
316 316 .trending_language_tbl tr {
317 317 border-spacing: 1px;
318 318 }
319 319 h3.files_location {
320 320 font-size: 1.8em;
321 321 font-weight: 700;
322 322 border-bottom: none !important;
323 323 margin: 10px 0 !important;
324 324 }
325 325 .file_history {
326 326 padding-top: 10px;
327 327 font-size: 16px;
328 328 }
329 329 .file_author {
330 330 float: left;
331 331 }
332 332 .file_author .item {
333 333 float: left;
334 334 padding: 5px;
335 335 color: #888;
336 336 }
337 337 table#updaterevs-table tr.mergerow,
338 338 table#updaterevs-table tr.out-of-range,
339 339 table#changesets tr.mergerow,
340 340 table#changesets tr.out-of-range {
341 341 opacity: 0.6;
342 342 }
343 343 .issue-tracker-link {
344 344 color: #3F6F9F;
345 345 font-weight: bold !important;
346 346 }
347 347 /* changeset statuses (must be the same name as the status) */
348 348 .changeset-status-not_reviewed {
349 349 color: #bababa;
350 350 }
351 351 .changeset-status-approved {
352 352 color: #81ba51;
353 353 }
354 354 .changeset-status-rejected {
355 355 color: #d06060;
356 356 }
357 357 .changeset-status-under_review {
358 358 color: #ffc71e;
359 359 }
360 360
361 361 #repo_size {
362 362 display: block;
363 363 margin-top: 4px;
364 364 color: #666;
365 365 float: right;
366 366 }
367 367 .currently_following {
368 368 padding-left: 10px;
369 369 padding-bottom: 5px;
370 370 }
371 371 #switch_repos {
372 372 position: absolute;
373 373 height: 25px;
374 374 z-index: 1;
375 375 }
376 376 #switch_repos select {
377 377 min-width: 150px;
378 378 max-height: 250px;
379 379 z-index: 1;
380 380 }
381 381 table#permissions_manage span.private_repo_msg {
382 382 font-size: 0.8em;
383 383 opacity: 0.6;
384 384 }
385 385 table#permissions_manage td.private_repo_msg {
386 386 font-size: 0.8em;
387 387 }
388 388 table#permissions_manage tr#add_perm_input td {
389 389 vertical-align: middle;
390 390 }
391 391 div.gravatar {
392 392 float: left;
393 393 background-color: #FFF;
394 394 margin-right: 0.7em;
395 395 padding: 1px 1px 1px 1px;
396 396 line-height: 0;
397 397 border-radius: 3px;
398 398 }
399 399 div.gravatar img {
400 400 border-radius: 2px;
401 401 }
402 402 .panel-body.settings .nav-pills > :not(.active) > a {
403 403 color: inherit;
404 404 }
405 405 .panel-body.no-padding {
406 406 padding: 0;
407 407 }
408 408 .panel-body ~ .panel-body {
409 409 padding-top: 0;
410 410 }
411 411 .panel-body.no-padding ~ .panel-body {
412 412 padding-top: 15px;
413 413 }
414 414 .panel-body > :last-child {
415 415 margin-bottom: 0;
416 416 }
417 417 .panel-body.settings .text-muted {
418 418 margin: 5px 0;
419 419 }
420 420 ins,
421 421 div.options a:hover {
422 422 text-decoration: none;
423 423 }
424 424 img,
425 425 nav.navbar #quick li a:hover span.normal,
426 426 #clone_url,
427 427 #clone_url_id {
428 428 border: none;
429 429 }
430 430 img.icon,
431 431 .right .merge img {
432 432 vertical-align: bottom;
433 433 }
434 434 #content div.panel div.panel-heading ul.links,
435 435 #content div.panel div.message div.dismiss {
436 436 float: right;
437 437 margin: 0;
438 438 padding: 0;
439 439 }
440 440 nav.navbar #home,
441 441 #content div.panel ul.left,
442 442 #content div.panel ol.left,
443 443 div#commit_history,
444 444 div#legend_data,
445 445 div#legend_container,
446 446 div#legend_choices {
447 447 float: left;
448 448 }
449 449
450 450 /* set size for statistics charts */
451 451 #commit_history {
452 452 width: 450px;
453 453 height: 300px;
454 454 }
455 455 #overview {
456 456 clear: both;
457 457 width: 450px;
458 458 height: 100px;
459 459 }
460 460
461 461 #content #left #menu ul.closed,
462 #content #left #menu li ul.collapsed,
463 .yui-tt-shadow {
462 #content #left #menu li ul.collapsed {
464 463 display: none;
465 464 }
466 465 #content #left #menu ul.opened,
467 466 #content #left #menu li ul.expanded {
468 467 display: block !important;
469 468 }
470 469
471 470 #content div.panel ol.lower-roman,
472 471 #content div.panel ol.upper-roman,
473 472 #content div.panel ol.lower-alpha,
474 473 #content div.panel ol.upper-alpha,
475 474 #content div.panel ol.decimal {
476 475 margin: 10px 24px 10px 44px;
477 476 }
478 477
479 478 div.form div.form-group div.button input,
480 479 #content div.panel div.form div.buttons input,
481 480 div.form div.buttons input,
482 481 #content div.panel div.action div.button input {
483 482 font-size: 11px;
484 483 font-weight: 700;
485 484 margin: 0;
486 485 }
487 486 div.form div.form-group div.highlight,
488 487 #content div.panel div.form div.buttons div.highlight {
489 488 display: inline;
490 489 }
491 490 #content div.panel table td.user,
492 491 #content div.panel table td.address {
493 492 width: 10%;
494 493 text-align: center;
495 494 }
496 495 #content div.panel div.action div.button {
497 496 text-align: right;
498 497 margin: 6px 0 0;
499 498 padding: 0;
500 499 }
501 500 .ac .match {
502 501 font-weight: 700;
503 502 padding-top: 5px;
504 503 padding-bottom: 5px;
505 504 }
506 505 .q_filter_box {
507 506 border-radius: 4px;
508 507 border: 0 none;
509 508 margin-bottom: -4px;
510 509 margin-top: -4px;
511 510 padding-left: 3px;
512 511 }
513 512 #node_filter {
514 513 border: 0px solid #545454;
515 514 color: #AAAAAA;
516 515 padding-left: 3px;
517 516 }
518 517 /** comment main **/
519 518 .comment .panel,
520 519 .comment-inline-form {
521 520 max-width: 978px;
522 521 }
523 522 .comment .panel-body {
524 523 background-color: #FAFAFA;
525 524 }
526 525 .comments-number {
527 526 padding: 10px 0;
528 527 color: #666;
529 528 }
530 529 .automatic-comment {
531 530 font-style: italic;
532 531 }
533 532 /** comment form **/
534 533 .status-block {
535 534 margin: 5px;
536 535 clear: both;
537 536 }
538 537 .panel-heading .pull-left input[type=checkbox],
539 538 .panel-heading .pull-right input[type=checkbox] {
540 539 position: relative;
541 540 top: 4px;
542 541 margin: -10px 2px 0;
543 542 }
544 543 /** comment inline **/
545 544 .inline-comments {
546 545 padding: 5px;
547 546 }
548 547 .inline-comments .comments-number {
549 548 padding: 0px 0px 10px 0px;
550 549 }
551 550 input.status_change_checkbox,
552 551 input.status_change_radio {
553 552 margin: 0 0 5px 15px;
554 553 }
555 554 @keyframes animated-comment-background {
556 555 0% {
557 556 background-position: 0 0;
558 557 }
559 558 100% {
560 559 background-position: 20px 0;
561 560 }
562 561 }
563 562 .comment-preview.failed .user,
564 563 .comment-preview.failed .panel-body {
565 564 color: #666;
566 565 }
567 566 .comment-preview .comment-submission-status {
568 567 float: right;
569 568 }
570 569 .comment-preview .comment-submission-status .btn-group {
571 570 margin-left: 10px;
572 571 }
573 572 .comment-preview.submitting .panel-body {
574 573 background-image: linear-gradient(-45deg, #FAFAFA, #FAFAFA 25%, #FFF 25%, #FFF 50%, #FAFAFA 50%, #FAFAFA 75%, #FFF 75%, #FFF 100%);
575 574 background-size: 20px 20px;
576 575 animation: animated-comment-background 0.4s linear infinite;
577 576 }
578 577 /****
579 578 PULL REQUESTS
580 579 *****/
581 580 div.pr-details-title.closed {
582 581 color: #555;
583 582 background: #eee;
584 583 }
585 584 div.pr {
586 585 margin: 0px 15px;
587 586 padding: 4px 4px;
588 587 }
589 588 tr.pr-closed td {
590 589 background-color: #eee !important;
591 590 color: #555 !important;
592 591 }
593 592 span.pr-closed-tag {
594 593 margin-bottom: 1px;
595 594 margin-right: 1px;
596 595 padding: 1px 3px;
597 596 font-size: 10px;
598 597 color: @kallithea-theme-main-color;
599 598 white-space: nowrap;
600 599 border-radius: 4px;
601 600 border: 1px solid #d9e8f8;
602 601 line-height: 1.5em;
603 602 }
604 603 #s2id_org_ref,
605 604 #s2id_other_ref,
606 605 #s2id_org_repo,
607 606 #s2id_other_repo {
608 607 min-width: 150px;
609 608 margin: 5px;
610 609 }
611 610 #pr-summary > .pr-not-edit {
612 611 min-height: 50px !important;
613 612 }
614 613 /* make 'next iteration' changeset table smaller and scrollable */
615 614 #pr-summary #updaterevs {
616 615 max-height: 200px;
617 616 overflow-y: auto;
618 617 overflow-x: hidden;
619 618 }
620 619
621 620 /****
622 621 PERMS
623 622 *****/
624 623 .perm-gravatar-ac {
625 624 vertical-align: middle;
626 625 padding: 2px;
627 626 width: 14px;
628 627 height: 14px;
629 628 }
630 629
631 630 /* avoid gaps between the navbar and browser */
632 631 .navbar.mainmenu {
633 632 border-top-left-radius: 0;
634 633 border-top-right-radius: 0;
635 634 }
636 635 .navbar.footer {
637 636 border-bottom-left-radius: 0;
638 637 border-bottom-right-radius: 0;
639 638 }
640 639
641 640 /* show some context of link targets - but only works when the link target
642 641 can be extended with any visual difference */
643 642 div.comment:target:before {
644 643 display: block;
645 644 height: 100px;
646 645 margin: -100px 0 0;
647 646 content: "";
648 647 }
649 648 div.comment:target > .panel {
650 649 border: solid 2px #ee0 !important;
651 650 }
652 651 .lineno:target a {
653 652 border: solid 2px #ee0 !important;
654 653 margin: -2px;
655 654 }
656 655 .btn-image-diff-show,
657 656 .btn-image-diff-swap {
658 657 margin: 5px;
659 658 }
660 659 .img-diff {
661 660 max-width: 45%;
662 661 height: auto;
663 662 margin: 5px;
664 663 /* http://lea.verou.me/demos/css3-patterns.html */
665 664 background-image: linear-gradient(45deg, #888 25%, transparent 25%, transparent), linear-gradient(-45deg, #888 25%, transparent 25%, transparent), linear-gradient(45deg, transparent 75%, #888 75%), linear-gradient(-45deg, transparent 75%, #888 75%);
666 665 background-size: 10px 10px;
667 666 background-color: #999;
668 667 }
669 668 .img-preview {
670 669 max-width: 100%;
671 670 height: auto;
672 671 margin: 5px;
673 672 }
674 673 div.comment-prev-next-links div.prev-comment,
675 674 div.comment-prev-next-links div.next-comment {
676 675 display: inline-block;
677 676 min-width: 150px;
678 677 margin: 3px 6px;
679 678 }
680 679 #comments-general-comments div.comment-prev-next-links div.prev-comment,
681 680 #comments-general-comments div.comment-prev-next-links div.next-comment {
682 681 margin-left: 0;
683 682 }
684 683
685 684 /* changelog graph */
686 685 #graph_nodes,
687 686 #updaterevs-graph {
688 687 .make-xs-column(1);
689 688 height: 0;
690 689 }
691 690 #graph_content,
692 691 #graph_content_pr,
693 692 #updaterevs-table {
694 693 .make-xs-column-offset(1);
695 694 .make-xs-column(11);
696 695 }
697 696
698 697 /* use bootstrap grid columns for centered columns */
699 698 .centered-column {
700 699 .make-sm-column-offset(3);
701 700 .make-sm-column(6);
702 701 .form {
703 702 .form-horizontal;
704 703 .form-group > label {
705 704 .make-sm-column(4);
706 705 }
707 706 .form-group > div {
708 707 .make-sm-column(8);
709 708 }
710 709 .form-group > div:first-child { /* in case there is no label */
711 710 .make-sm-column-offset(4);
712 711 .make-sm-column(8);
713 712 }
714 713 }
715 714 }
716 715
717 716 /* use columns and form-horizontal for settings pages ... on wide screens */
718 717 @media (min-width: @screen-sm-min) {
719 718 .settings {
720 719 max-width: @container-md;
721 720 > ul.nav-stacked {
722 721 .make-sm-column(2);
723 722 max-width: (@container-md/12)*2;
724 723 }
725 724 > div {
726 725 .make-sm-column(10);
727 726 max-width: (@container-md/12)*10;
728 727 }
729 728 .form {
730 729 .form-horizontal;
731 730 }
732 731 .form-group {
733 732 .clearfix;
734 733 > label {
735 734 .make-xs-column(3);
736 735 overflow: hidden;
737 736 text-overflow: ellipsis;
738 737 input {
739 738 width: 100%;
740 739 }
741 740 }
742 741 > div {
743 742 .make-xs-column(9);
744 743 }
745 744 .buttons {
746 745 .make-xs-column-offset(3);
747 746 }
748 747 }
749 748 }
750 749 }
751 750
752 751 /* use columns and form-horizontal for summary page */
753 752 #summary {
754 753 max-width: @container-md;
755 754 .form-horizontal;
756 755 .make-sm-column(10);
757 756 .form-group > label {
758 757 .make-sm-column(2);
759 758 }
760 759 .form-group > div {
761 760 .make-sm-column(10);
762 761 }
763 762 }
764 763 #summary-menu-stats {
765 764 .make-sm-column(2);
766 765 }
767 766
768 767 /* use columns and form-horizontal for pull request page */
769 768 .pr-box {
770 769 .make-sm-column(9);
771 770 max-width: @container-md;
772 771 #pr-summary {
773 772 .form-horizontal;
774 773 .form-group > label {
775 774 .make-sm-column(3);
776 775 }
777 776 .form-group > div {
778 777 .make-sm-column(9);
779 778 }
780 779 .form-group > .buttons {
781 780 .make-sm-column-offset(3);
782 781 .make-sm-column(9);
783 782 }
784 783 }
785 784 }
786 785 .pr-reviewers-box {
787 786 .make-sm-column(3);
788 787 }
789 788
790 789 /* repo table icons */
791 790 #repos_list_wrap_wrapper {
792 791 /* make icon-folder and repotag the same width */
793 792 .icon-folder:before {
794 793 margin: 0; // default margin would otherwise add to the total width
795 794 width: 24px;
796 795 text-align: left;
797 796 }
798 797 .label-repo {
799 798 display: inline-block;
800 799 width: 24px;
801 800 }
802 801 }
803 802
804 803 /* changelog table columns */
805 804 .table#changesets {
806 805 table-layout: fixed;
807 806 td {
808 807 overflow: hidden;
809 808 text-overflow: ellipsis;
810 809 white-space: nowrap;
811 810 vertical-align: baseline;
812 811 }
813 812 .checkbox-column {
814 813 width: 24px;
815 814 /* the optional second checkbox will be inline-block but should wrap to a new line */
816 815 white-space: normal;
817 816 > input[type=checkbox] {
818 817 margin-top: inherit;
819 818 vertical-align: text-bottom;
820 819 }
821 820 }
822 821 .changeset-logical-index {
823 822 color: @gray-light;
824 823 font-style: italic;
825 824 font-size: 85%;
826 825 text-align: right;
827 826 overflow: visible;
828 827 }
829 828 .changeset-logical-index,
830 829 .expand_commit,
831 830 .status {
832 831 width: 28px;
833 832 }
834 833 .author {
835 834 width: 200px;
836 835 @media (max-width: @screen-sm-max) {
837 836 width: 120px;
838 837 }
839 838 @media (max-width: @screen-xs-max) {
840 839 width: 20px;
841 840 /* keep gravatar but hide name on tiny screens to give important columns more room */
842 841 span {
843 842 .hidden;
844 843 }
845 844 }
846 845 }
847 846 .hash {
848 847 .small;
849 848 width: 110px;
850 849 @media (max-width: @screen-xs-max) {
851 850 width: 48px;
852 851 }
853 852 }
854 853 .date {
855 854 .small;
856 855 width: 100px;
857 856 }
858 857 /* hide on small screens to give important columns more room */
859 858 .status,
860 859 .expand_commit,
861 860 .comments,
862 861 .extra-container {
863 862 .hidden-xs;
864 863 }
865 864 .mid > .log-container {
866 865 position: relative;
867 866 overflow: hidden;
868 867 > .extra-container {
869 868 position: absolute;
870 869 top: 0;
871 870 right: 0;
872 871 background: white;
873 872 box-shadow: -10px 0px 10px 0px white;
874 873 }
875 874 }
876 875 }
877 876
878 877 /* undo Bootstrap chrome/webkit blue outline on focus in navbar */
879 878 .navbar-inverse .navbar-nav > li > a:focus {
880 879 outline: 0;
881 880 }
882 881
883 882 /* use same badge coloring in navbar inverse as in panel-heading */
884 883 .navbar-inverse {
885 884 .badge {
886 885 color: @navbar-inverse-bg;
887 886 background-color: @navbar-inverse-color;
888 887 }
889 888 }
890 889
891 890 /* pygments style */
892 891 div.search-code-body pre .match {
893 892 background-color: @highlight-color;
894 893 }
895 894 div.search-code-body pre .break {
896 895 background-color: @highlight-line-color;
897 896 width: 100%;
898 897 color: #747474;
899 898 display: block;
900 899 }
901 900 div.annotatediv {
902 901 margin-left: 2px;
903 902 margin-right: 4px;
904 903 }
905 904 .code-highlight {
906 905 border-left: 1px solid #ccc;
907 906 }
908 907 .code-highlight pre,
909 908 .linenodiv pre {
910 909 padding: 5px 2px 0px 5px;
911 910 margin: 0;
912 911 }
913 912 .code-highlight pre div:target {
914 913 background-color: #FFFFBE !important;
915 914 }
916 915 .linenos a { text-decoration: none; }
917 916
918 917 /* Stylesheets for the context bar */
919 918 #quick_login > .pull-right .list-group-item {
920 919 background-color: @kallithea-theme-main-color;
921 920 border: 0;
922 921 }
923 922 #content #context-pages .follow .show-following,
924 923 #content #context-pages .following .show-follow {
925 924 display: none;
926 925 }
927 926
928 927 nav.navbar #quick > li > a,
929 928 #context-pages > ul > li > a {
930 929 height: @navbar-height;
931 930 }
932 931
933 932 /* at.js */
934 933 .atwho-view strong {
935 934 /* the blue color doesn't look good, use normal color */
936 935 color: inherit;
937 936 }
@@ -1,210 +1,210 b''
1 1 ## -*- coding: utf-8 -*-
2 2 ## usage:
3 3 ## <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
4 4 ## ${comment.comment_block(co)}
5 5 ##
6 6 <%def name="comment_block(co)">
7 7 <div class="comment" id="comment-${co.comment_id}">
8 8 <div class="comment-prev-next-links"></div>
9 9 <div class="panel panel-default">
10 10 <div class="panel-heading">
11 11 ${h.gravatar_div(co.author.email, size=20)}
12 12 <span class="user">
13 13 ${co.author.full_name_and_username}
14 14 </span>
15 15
16 16 <span data-toggle="tooltip" title="${h.fmt_date(co.modified_at)}">
17 17 ${h.age(co.modified_at)}
18 18 %if co.pull_request:
19 19 ${_('on pull request')}
20 20 <a href="${co.url()}">"${co.pull_request.title or _("No title")}"</a>
21 21 %else:
22 22 ${_('on this changeset')}
23 23 %endif
24 24 <a class="permalink" href="${co.url()}">&para;</a>
25 25 </span>
26 26
27 27 %if co.author_id == request.authuser.user_id or h.HasRepoPermissionLevel('admin')(c.repo_name):
28 28 %if co.deletable():
29 29 <button type="button" onClick="confirm('${_('Delete comment?')}') && deleteComment(${co.comment_id})" class="pull-right buttons delete-comment btn btn-default btn-xs">${_('Delete')}</button>
30 30 %endif
31 31 %endif
32 32 </div>
33 33 <div class="panel-body">
34 34 %if co.status_change:
35 35 <div class="automatic-comment">
36 36 <p>
37 37 ${_("Status change")}: <span class="comment-status-label">${co.status_change[0].status_lbl}</span>
38 38 <i class="icon-circle changeset-status-${co.status_change[0].status}"></i>
39 39 </p>
40 40 </div>
41 41 %endif
42 42 <div class="comment-text">
43 43 %if co.text:
44 44 ${h.render_w_mentions(co.text, c.repo_name)|n}
45 45 %endif
46 46 </div>
47 47 </div>
48 48 </div>
49 49 </div>
50 50 </%def>
51 51
52 52
53 53 <%def name="comment_inline_form()">
54 54 <div id='comment-inline-form-template' style="display: none;">
55 55 <div class="comment comment-preview submitting" style="display: none;">
56 56 <div class="panel panel-default">
57 57 <div class="panel-heading">
58 58 ${h.gravatar_div(request.authuser.email, size=20)}
59 59 <span class="user">
60 60 ${request.authuser.full_name_or_username}
61 61 </span>
62 62
63 63 <span class="comment-submission-status">
64 64 ${_('Submitting ...')}
65 65 </span>
66 66 </div>
67 67 <div class="panel-body">
68 68 <div class="automatic-comment" style="display: none;">
69 69 <p>
70 70 ${_("Status change")}: <span class="comment-status-label"></span>
71 71 <i class="icon-circle"></i>
72 72 </p>
73 73 </div>
74 74 <div class="comment-text">
75 75 <div class="formatted-fixed">
76 76 </div>
77 77 </div>
78 78 </div>
79 79 </div>
80 80 </div>
81 81 <div class="ac">
82 82 %if request.authuser.username != 'default':
83 83 ${h.form('#', class_='inline-form')}
84 84 <div class="well well-sm clearfix">
85 85 <div class="comment-help">
86 86 <span class="text-muted">${_('Comments are in plain text. Use @username to notify another user.')|n}</span>
87 87 </div>
88 <textarea name="text" class="form-control comment-block-ta yui-ac-input"></textarea>
88 <textarea name="text" class="form-control"></textarea>
89 89
90 90 <div id="status_block_container" class="status-block general-only hidden">
91 91 %if c.pull_request is None:
92 92 ${_('Set changeset status')}:
93 93 %else:
94 94 ${_('Vote for pull request status')}:
95 95 %endif
96 96 <span class="general-only cs-only">
97 97 </span>
98 98 <label class="radio-inline">
99 99 <input type="radio" class="status_change_radio" name="changeset_status" id="changeset_status_unchanged" value="" checked="checked" />
100 100 ${_('No change')}
101 101 </label>
102 102 %for status, lbl in c.changeset_statuses:
103 103 <label class="radio-inline">
104 104 <input type="radio" class="status_change_radio" name="changeset_status" id="${status}" value="${status}">
105 105 ${lbl}<i class="icon-circle changeset-status-${status}"></i>
106 106 </label>
107 107 %endfor
108 108
109 109 %if c.pull_request is not None and ( \
110 110 h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionLevel('admin')(c.repo_name) \
111 111 or c.pull_request.owner_id == request.authuser.user_id):
112 112 <div>
113 113 ${_('Finish pull request')}:
114 114 <label class="checkbox-inline">
115 115 <input id="save_close" type="checkbox" name="save_close" class="status_change_checkbox">
116 116 ${_("Close")}
117 117 </label>
118 118 <label class="checkbox-inline">
119 119 <input id="save_delete" type="checkbox" name="save_delete" value="delete" class="status_change_checkbox">
120 120 ${_("Delete")}
121 121 </label>
122 122 </div>
123 123 %endif
124 124 </div>
125 125
126 126 </div>
127 127 <div class="comment-button">
128 128 ${h.submit('save', _('Comment'), class_='btn btn-default btn-sm save-inline-form')}
129 129 ${h.reset('hide-inline-form', _('Cancel'), class_='btn btn-default btn-sm hide-inline-form')}
130 130 </div>
131 131 ${h.end_form()}
132 132 %else:
133 133 ${h.form('')}
134 134 <div class="clearfix">
135 135 <div class="comment-help">
136 136 ${_('You need to be logged in to comment.')} <a href="${h.url('login_home', came_from=request.path_qs)}">${_('Login now')}</a>
137 137 </div>
138 138 </div>
139 139 <div class="comment-button">
140 140 ${h.reset('hide-inline-form', _('Hide'), class_='btn btn-default btn-sm hide-inline-form')}
141 141 </div>
142 142 ${h.end_form()}
143 143 %endif
144 144 </div>
145 145 </div>
146 146 </%def>
147 147
148 148
149 149 ## show comment count as "x comments (y inline, z general)"
150 150 <%def name="comment_count(inline_cnt, general_cnt)">
151 151 ${'%s (%s, %s)' % (
152 152 ungettext("%d comment", "%d comments", inline_cnt + general_cnt) % (inline_cnt + general_cnt),
153 153 ungettext("%d inline", "%d inline", inline_cnt) % inline_cnt,
154 154 ungettext("%d general", "%d general", general_cnt) % general_cnt
155 155 )}
156 156 <span class="firstlink"></span>
157 157 </%def>
158 158
159 159
160 160 ## generate inline comments and the main ones
161 161 <%def name="generate_comments()">
162 162 ## original location of comments ... but the ones outside diff context remains here
163 163 <div class="comments inline-comments">
164 164 %for f_path, lines in c.inline_comments:
165 165 %for line_no, comments in lines.iteritems():
166 166 <div class="comments-list-chunk" data-f_path="${f_path}" data-line_no="${line_no}" data-target-id="${h.safeid(h.safe_unicode(f_path))}_${line_no}">
167 167 %for co in comments:
168 168 ${comment_block(co)}
169 169 %endfor
170 170 </div>
171 171 %endfor
172 172 %endfor
173 173
174 174 <div class="comments-list-chunk" data-f_path="" data-line_no="" data-target-id="general-comments">
175 175 %for co in c.comments:
176 176 ${comment_block(co)}
177 177 %endfor
178 178 </div>
179 179 </div>
180 180 <div class="comments-number">
181 181 ${comment_count(c.inline_cnt, len(c.comments))}
182 182 </div>
183 183 </%def>
184 184
185 185 ## MAIN COMMENT FORM
186 186 <%def name="comments(change_status=True)">
187 187 <div class="inline-comments inline-comments-general
188 188 ${'show-general-status' if change_status else ''}">
189 189 <div id="comments-general-comments" class="">
190 190 ## comment_div for general comments
191 191 </div>
192 192 </div>
193 193
194 194 <script>
195 195
196 196 $(document).ready(function () {
197 197
198 198 $(window).on('beforeunload', function(){
199 199 var $textareas = $('.comment-inline-form textarea[name=text]');
200 200 if($textareas.size() > 1 ||
201 201 $textareas.val()) {
202 202 // this message will not be displayed on all browsers
203 203 // (e.g. some versions of Firefox), but the user will still be warned
204 204 return 'There are uncommitted comments.';
205 205 }
206 206 });
207 207
208 208 });
209 209 </script>
210 210 </%def>
@@ -1,20 +1,20 b''
1 1 #!/bin/bash -x
2 2
3 3 # Enforce some consistency in whitespace - just to avoid spurious whitespaces changes
4 4
5 files=`hg mani | egrep -v '/fontello/|/email_templates/|(/lockfiles.py|^LICENSE-MERGELY.html|^docs/Makefile|^scripts/whitespacecleanup.sh|/(graph|mergely|native.history|yui.2.9)\.js|/test_dump_html_mails.ref.html|\.png|\.gif|\.ico|\.pot|\.po|\.mo|\.tar\.gz|\.diff)$'`
5 files=`hg mani | egrep -v '/fontello/|/email_templates/|(/lockfiles.py|^LICENSE-MERGELY.html|^docs/Makefile|^scripts/whitespacecleanup.sh|/(graph|mergely|native.history)\.js|/test_dump_html_mails.ref.html|\.png|\.gif|\.ico|\.pot|\.po|\.mo|\.tar\.gz|\.diff)$'`
6 6
7 7 sed -i "s/`printf '\r'`//g" $files
8 8 sed -i -e "s,`printf '\t'`, ,g" $files
9 9 sed -i -e "s, *$,,g" $files
10 10 sed -i -e 's,\([^ ]\)\\$,\1 \\,g' -e 's,\(["'"'"']["'"'"']["'"'"']\) \\$,\1\\,g' $files
11 11 # ensure one trailing newline - remove empty last line and make last line include trailing newline:
12 12 sed -i -e '$,${/^$/d}' -e '$a\' $files
13 13
14 14 sed -i -e 's,\([^ /]\){,\1 {,g' `hg loc '*.css'`
15 15 sed -i -e 's|^\([^ /].*,\)\([^ ]\)|\1 \2|g' `hg loc '*.css'`
16 16
17 17 hg mani | xargs chmod -x
18 18 hg loc 'set:!binary()&grep("^#!")&!(**_tmpl.py)&!(**/template**)' | xargs chmod +x
19 19
20 20 hg diff
1 NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now