##// END OF EJS Templates
gists: removed private/public gist buttons and replaced them with radio group...
marcink -
r4083:ca52deba default
parent child Browse files
Show More
@@ -1,391 +1,391 b''
1 1 # -*- coding: utf-8 -*-
2 2
3 3 # Copyright (C) 2010-2019 RhodeCode GmbH
4 4 #
5 5 # This program is free software: you can redistribute it and/or modify
6 6 # it under the terms of the GNU Affero General Public License, version 3
7 7 # (only), as published by the Free Software Foundation.
8 8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 13 #
14 14 # You should have received a copy of the GNU Affero General Public License
15 15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 16 #
17 17 # This program is dual-licensed. If you wish to learn more about the
18 18 # RhodeCode Enterprise Edition, including its added features, Support services,
19 19 # and proprietary license terms, please see https://rhodecode.com/licenses/
20 20
21 21 import mock
22 22 import pytest
23 23
24 24 from rhodecode.lib import helpers as h
25 25 from rhodecode.model.db import User, Gist
26 26 from rhodecode.model.gist import GistModel
27 27 from rhodecode.model.meta import Session
28 28 from rhodecode.tests import (
29 29 TEST_USER_ADMIN_LOGIN, TEST_USER_REGULAR_LOGIN, TEST_USER_REGULAR_PASS,
30 30 TestController, assert_session_flash)
31 31
32 32
33 33 def route_path(name, params=None, **kwargs):
34 34 import urllib
35 35 from rhodecode.apps._base import ADMIN_PREFIX
36 36
37 37 base_url = {
38 38 'gists_show': ADMIN_PREFIX + '/gists',
39 39 'gists_new': ADMIN_PREFIX + '/gists/new',
40 40 'gists_create': ADMIN_PREFIX + '/gists/create',
41 41 'gist_show': ADMIN_PREFIX + '/gists/{gist_id}',
42 42 'gist_delete': ADMIN_PREFIX + '/gists/{gist_id}/delete',
43 43 'gist_edit': ADMIN_PREFIX + '/gists/{gist_id}/edit',
44 44 'gist_edit_check_revision': ADMIN_PREFIX + '/gists/{gist_id}/edit/check_revision',
45 45 'gist_update': ADMIN_PREFIX + '/gists/{gist_id}/update',
46 46 'gist_show_rev': ADMIN_PREFIX + '/gists/{gist_id}/{revision}',
47 47 'gist_show_formatted': ADMIN_PREFIX + '/gists/{gist_id}/{revision}/{format}',
48 48 'gist_show_formatted_path': ADMIN_PREFIX + '/gists/{gist_id}/{revision}/{format}/{f_path}',
49 49
50 50 }[name].format(**kwargs)
51 51
52 52 if params:
53 53 base_url = '{}?{}'.format(base_url, urllib.urlencode(params))
54 54 return base_url
55 55
56 56
57 57 class GistUtility(object):
58 58
59 59 def __init__(self):
60 60 self._gist_ids = []
61 61
62 62 def __call__(
63 63 self, f_name, content='some gist', lifetime=-1,
64 64 description='gist-desc', gist_type='public',
65 65 acl_level=Gist.GIST_PUBLIC, owner=TEST_USER_ADMIN_LOGIN):
66 66 gist_mapping = {
67 67 f_name: {'content': content}
68 68 }
69 69 user = User.get_by_username(owner)
70 70 gist = GistModel().create(
71 71 description, owner=user, gist_mapping=gist_mapping,
72 72 gist_type=gist_type, lifetime=lifetime, gist_acl_level=acl_level)
73 73 Session().commit()
74 74 self._gist_ids.append(gist.gist_id)
75 75 return gist
76 76
77 77 def cleanup(self):
78 78 for gist_id in self._gist_ids:
79 79 gist = Gist.get(gist_id)
80 80 if gist:
81 81 Session().delete(gist)
82 82
83 83 Session().commit()
84 84
85 85
86 86 @pytest.fixture()
87 87 def create_gist(request):
88 88 gist_utility = GistUtility()
89 89 request.addfinalizer(gist_utility.cleanup)
90 90 return gist_utility
91 91
92 92
93 93 class TestGistsController(TestController):
94 94
95 95 def test_index_empty(self, create_gist):
96 96 self.log_user()
97 97 response = self.app.get(route_path('gists_show'))
98 98 response.mustcontain('data: [],')
99 99
100 100 def test_index(self, create_gist):
101 101 self.log_user()
102 102 g1 = create_gist('gist1')
103 103 g2 = create_gist('gist2', lifetime=1400)
104 104 g3 = create_gist('gist3', description='gist3-desc')
105 105 g4 = create_gist('gist4', gist_type='private').gist_access_id
106 106 response = self.app.get(route_path('gists_show'))
107 107
108 108 response.mustcontain('gist: %s' % g1.gist_access_id)
109 109 response.mustcontain('gist: %s' % g2.gist_access_id)
110 110 response.mustcontain('gist: %s' % g3.gist_access_id)
111 111 response.mustcontain('gist3-desc')
112 112 response.mustcontain(no=['gist: %s' % g4])
113 113
114 114 # Expiration information should be visible
115 115 expires_tag = '%s' % h.age_component(
116 116 h.time_to_utcdatetime(g2.gist_expires))
117 117 response.mustcontain(expires_tag.replace('"', '\\"'))
118 118
119 119 def test_index_private_gists(self, create_gist):
120 120 self.log_user()
121 121 gist = create_gist('gist5', gist_type='private')
122 122 response = self.app.get(route_path('gists_show', params=dict(private=1)))
123 123
124 124 # and privates
125 125 response.mustcontain('gist: %s' % gist.gist_access_id)
126 126
127 127 def test_index_show_all(self, create_gist):
128 128 self.log_user()
129 129 create_gist('gist1')
130 130 create_gist('gist2', lifetime=1400)
131 131 create_gist('gist3', description='gist3-desc')
132 132 create_gist('gist4', gist_type='private')
133 133
134 134 response = self.app.get(route_path('gists_show', params=dict(all=1)))
135 135
136 136 assert len(GistModel.get_all()) == 4
137 137 # and privates
138 138 for gist in GistModel.get_all():
139 139 response.mustcontain('gist: %s' % gist.gist_access_id)
140 140
141 141 def test_index_show_all_hidden_from_regular(self, create_gist):
142 142 self.log_user(TEST_USER_REGULAR_LOGIN, TEST_USER_REGULAR_PASS)
143 143 create_gist('gist2', gist_type='private')
144 144 create_gist('gist3', gist_type='private')
145 145 create_gist('gist4', gist_type='private')
146 146
147 147 response = self.app.get(route_path('gists_show', params=dict(all=1)))
148 148
149 149 assert len(GistModel.get_all()) == 3
150 150 # since we don't have access to private in this view, we
151 151 # should see nothing
152 152 for gist in GistModel.get_all():
153 153 response.mustcontain(no=['gist: %s' % gist.gist_access_id])
154 154
155 155 def test_create(self):
156 156 self.log_user()
157 157 response = self.app.post(
158 158 route_path('gists_create'),
159 159 params={'lifetime': -1,
160 160 'content': 'gist test',
161 161 'filename': 'foo',
162 'public': 'public',
162 'gist_type': 'public',
163 163 'gist_acl_level': Gist.ACL_LEVEL_PUBLIC,
164 164 'csrf_token': self.csrf_token},
165 165 status=302)
166 166 response = response.follow()
167 167 response.mustcontain('added file: foo')
168 168 response.mustcontain('gist test')
169 169
170 170 def test_create_with_path_with_dirs(self):
171 171 self.log_user()
172 172 response = self.app.post(
173 173 route_path('gists_create'),
174 174 params={'lifetime': -1,
175 175 'content': 'gist test',
176 176 'filename': '/home/foo',
177 'public': 'public',
177 'gist_type': 'public',
178 178 'gist_acl_level': Gist.ACL_LEVEL_PUBLIC,
179 179 'csrf_token': self.csrf_token},
180 180 status=200)
181 181 response.mustcontain('Filename /home/foo cannot be inside a directory')
182 182
183 183 def test_access_expired_gist(self, create_gist):
184 184 self.log_user()
185 185 gist = create_gist('never-see-me')
186 186 gist.gist_expires = 0 # 1970
187 187 Session().add(gist)
188 188 Session().commit()
189 189
190 190 self.app.get(route_path('gist_show', gist_id=gist.gist_access_id),
191 191 status=404)
192 192
193 193 def test_create_private(self):
194 194 self.log_user()
195 195 response = self.app.post(
196 196 route_path('gists_create'),
197 197 params={'lifetime': -1,
198 198 'content': 'private gist test',
199 199 'filename': 'private-foo',
200 'private': 'private',
200 'gist_type': 'private',
201 201 'gist_acl_level': Gist.ACL_LEVEL_PUBLIC,
202 202 'csrf_token': self.csrf_token},
203 203 status=302)
204 204 response = response.follow()
205 205 response.mustcontain('added file: private-foo<')
206 206 response.mustcontain('private gist test')
207 207 response.mustcontain('Private Gist')
208 208 # Make sure private gists are not indexed by robots
209 209 response.mustcontain(
210 210 '<meta name="robots" content="noindex, nofollow">')
211 211
212 212 def test_create_private_acl_private(self):
213 213 self.log_user()
214 214 response = self.app.post(
215 215 route_path('gists_create'),
216 216 params={'lifetime': -1,
217 217 'content': 'private gist test',
218 218 'filename': 'private-foo',
219 'private': 'private',
219 'gist_type': 'private',
220 220 'gist_acl_level': Gist.ACL_LEVEL_PRIVATE,
221 221 'csrf_token': self.csrf_token},
222 222 status=302)
223 223 response = response.follow()
224 224 response.mustcontain('added file: private-foo<')
225 225 response.mustcontain('private gist test')
226 226 response.mustcontain('Private Gist')
227 227 # Make sure private gists are not indexed by robots
228 228 response.mustcontain(
229 229 '<meta name="robots" content="noindex, nofollow">')
230 230
231 231 def test_create_with_description(self):
232 232 self.log_user()
233 233 response = self.app.post(
234 234 route_path('gists_create'),
235 235 params={'lifetime': -1,
236 236 'content': 'gist test',
237 237 'filename': 'foo-desc',
238 238 'description': 'gist-desc',
239 'public': 'public',
239 'gist_type': 'public',
240 240 'gist_acl_level': Gist.ACL_LEVEL_PUBLIC,
241 241 'csrf_token': self.csrf_token},
242 242 status=302)
243 243 response = response.follow()
244 244 response.mustcontain('added file: foo-desc')
245 245 response.mustcontain('gist test')
246 246 response.mustcontain('gist-desc')
247 247
248 248 def test_create_public_with_anonymous_access(self):
249 249 self.log_user()
250 250 params = {
251 251 'lifetime': -1,
252 252 'content': 'gist test',
253 253 'filename': 'foo-desc',
254 254 'description': 'gist-desc',
255 'public': 'public',
255 'gist_type': 'public',
256 256 'gist_acl_level': Gist.ACL_LEVEL_PUBLIC,
257 257 'csrf_token': self.csrf_token
258 258 }
259 259 response = self.app.post(
260 260 route_path('gists_create'), params=params, status=302)
261 261 self.logout_user()
262 262 response = response.follow()
263 263 response.mustcontain('added file: foo-desc')
264 264 response.mustcontain('gist test')
265 265 response.mustcontain('gist-desc')
266 266
267 267 def test_new(self):
268 268 self.log_user()
269 269 self.app.get(route_path('gists_new'))
270 270
271 271 def test_delete(self, create_gist):
272 272 self.log_user()
273 273 gist = create_gist('delete-me')
274 274 response = self.app.post(
275 275 route_path('gist_delete', gist_id=gist.gist_id),
276 276 params={'csrf_token': self.csrf_token})
277 277 assert_session_flash(response, 'Deleted gist %s' % gist.gist_id)
278 278
279 279 def test_delete_normal_user_his_gist(self, create_gist):
280 280 self.log_user(TEST_USER_REGULAR_LOGIN, TEST_USER_REGULAR_PASS)
281 281 gist = create_gist('delete-me', owner=TEST_USER_REGULAR_LOGIN)
282 282
283 283 response = self.app.post(
284 284 route_path('gist_delete', gist_id=gist.gist_id),
285 285 params={'csrf_token': self.csrf_token})
286 286 assert_session_flash(response, 'Deleted gist %s' % gist.gist_id)
287 287
288 288 def test_delete_normal_user_not_his_own_gist(self, create_gist):
289 289 self.log_user(TEST_USER_REGULAR_LOGIN, TEST_USER_REGULAR_PASS)
290 290 gist = create_gist('delete-me-2')
291 291
292 292 self.app.post(
293 293 route_path('gist_delete', gist_id=gist.gist_id),
294 294 params={'csrf_token': self.csrf_token}, status=404)
295 295
296 296 def test_show(self, create_gist):
297 297 gist = create_gist('gist-show-me')
298 298 response = self.app.get(route_path('gist_show', gist_id=gist.gist_access_id))
299 299
300 300 response.mustcontain('added file: gist-show-me<')
301 301
302 302 assert_response = response.assert_response()
303 303 assert_response.element_equals_to(
304 304 'div.rc-user span.user',
305 305 '<a href="/_profiles/test_admin">test_admin</a></span>')
306 306
307 307 response.mustcontain('gist-desc')
308 308
309 309 def test_show_without_hg(self, create_gist):
310 310 with mock.patch(
311 311 'rhodecode.lib.vcs.settings.ALIASES', ['git']):
312 312 gist = create_gist('gist-show-me-again')
313 313 self.app.get(
314 314 route_path('gist_show', gist_id=gist.gist_access_id), status=200)
315 315
316 316 def test_show_acl_private(self, create_gist):
317 317 gist = create_gist('gist-show-me-only-when-im-logged-in',
318 318 acl_level=Gist.ACL_LEVEL_PRIVATE)
319 319 self.app.get(
320 320 route_path('gist_show', gist_id=gist.gist_access_id), status=404)
321 321
322 322 # now we log-in we should see thi gist
323 323 self.log_user()
324 324 response = self.app.get(
325 325 route_path('gist_show', gist_id=gist.gist_access_id))
326 326 response.mustcontain('added file: gist-show-me-only-when-im-logged-in')
327 327
328 328 assert_response = response.assert_response()
329 329 assert_response.element_equals_to(
330 330 'div.rc-user span.user',
331 331 '<a href="/_profiles/test_admin">test_admin</a></span>')
332 332 response.mustcontain('gist-desc')
333 333
334 334 def test_show_as_raw(self, create_gist):
335 335 gist = create_gist('gist-show-me', content='GIST CONTENT')
336 336 response = self.app.get(
337 337 route_path('gist_show_formatted',
338 338 gist_id=gist.gist_access_id, revision='tip',
339 339 format='raw'))
340 340 assert response.body == 'GIST CONTENT'
341 341
342 342 def test_show_as_raw_individual_file(self, create_gist):
343 343 gist = create_gist('gist-show-me-raw', content='GIST BODY')
344 344 response = self.app.get(
345 345 route_path('gist_show_formatted_path',
346 346 gist_id=gist.gist_access_id, format='raw',
347 347 revision='tip', f_path='gist-show-me-raw'))
348 348 assert response.body == 'GIST BODY'
349 349
350 350 def test_edit_page(self, create_gist):
351 351 self.log_user()
352 352 gist = create_gist('gist-for-edit', content='GIST EDIT BODY')
353 353 response = self.app.get(route_path('gist_edit', gist_id=gist.gist_access_id))
354 354 response.mustcontain('GIST EDIT BODY')
355 355
356 356 def test_edit_page_non_logged_user(self, create_gist):
357 357 gist = create_gist('gist-for-edit', content='GIST EDIT BODY')
358 358 self.app.get(route_path('gist_edit', gist_id=gist.gist_access_id),
359 359 status=302)
360 360
361 361 def test_edit_normal_user_his_gist(self, create_gist):
362 362 self.log_user(TEST_USER_REGULAR_LOGIN, TEST_USER_REGULAR_PASS)
363 363 gist = create_gist('gist-for-edit', owner=TEST_USER_REGULAR_LOGIN)
364 364 self.app.get(route_path('gist_edit', gist_id=gist.gist_access_id,
365 365 status=200))
366 366
367 367 def test_edit_normal_user_not_his_own_gist(self, create_gist):
368 368 self.log_user(TEST_USER_REGULAR_LOGIN, TEST_USER_REGULAR_PASS)
369 369 gist = create_gist('delete-me')
370 370 self.app.get(route_path('gist_edit', gist_id=gist.gist_access_id),
371 371 status=404)
372 372
373 373 def test_user_first_name_is_escaped(self, user_util, create_gist):
374 374 xss_atack_string = '"><script>alert(\'First Name\')</script>'
375 375 xss_escaped_string = h.html_escape(h.escape(xss_atack_string))
376 376 password = 'test'
377 377 user = user_util.create_user(
378 378 firstname=xss_atack_string, password=password)
379 379 create_gist('gist', gist_type='public', owner=user.username)
380 380 response = self.app.get(route_path('gists_show'))
381 381 response.mustcontain(xss_escaped_string)
382 382
383 383 def test_user_last_name_is_escaped(self, user_util, create_gist):
384 384 xss_atack_string = '"><script>alert(\'Last Name\')</script>'
385 385 xss_escaped_string = h.html_escape(h.escape(xss_atack_string))
386 386 password = 'test'
387 387 user = user_util.create_user(
388 388 lastname=xss_atack_string, password=password)
389 389 create_gist('gist', gist_type='public', owner=user.username)
390 390 response = self.app.get(route_path('gists_show'))
391 391 response.mustcontain(xss_escaped_string)
@@ -1,414 +1,419 b''
1 1 # -*- coding: utf-8 -*-
2 2
3 3 # Copyright (C) 2013-2019 RhodeCode GmbH
4 4 #
5 5 # This program is free software: you can redistribute it and/or modify
6 6 # it under the terms of the GNU Affero General Public License, version 3
7 7 # (only), as published by the Free Software Foundation.
8 8 #
9 9 # This program is distributed in the hope that it will be useful,
10 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 12 # GNU General Public License for more details.
13 13 #
14 14 # You should have received a copy of the GNU Affero General Public License
15 15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 16 #
17 17 # This program is dual-licensed. If you wish to learn more about the
18 18 # RhodeCode Enterprise Edition, including its added features, Support services,
19 19 # and proprietary license terms, please see https://rhodecode.com/licenses/
20 20
21 21 import time
22 22 import logging
23 23
24 24 import formencode
25 25 import formencode.htmlfill
26 26 import peppercorn
27 27
28 28 from pyramid.httpexceptions import HTTPNotFound, HTTPFound, HTTPBadRequest
29 29 from pyramid.view import view_config
30 30 from pyramid.renderers import render
31 31 from pyramid.response import Response
32 32
33 33 from rhodecode.apps._base import BaseAppView
34 34 from rhodecode.lib import helpers as h
35 35 from rhodecode.lib.auth import LoginRequired, NotAnonymous, CSRFRequired
36 36 from rhodecode.lib.utils2 import time_to_datetime
37 37 from rhodecode.lib.ext_json import json
38 38 from rhodecode.lib.vcs.exceptions import VCSError, NodeNotChangedError
39 39 from rhodecode.model.gist import GistModel
40 40 from rhodecode.model.meta import Session
41 41 from rhodecode.model.db import Gist, User, or_
42 42 from rhodecode.model import validation_schema
43 43 from rhodecode.model.validation_schema.schemas import gist_schema
44 44
45 45
46 46 log = logging.getLogger(__name__)
47 47
48 48
49 49 class GistView(BaseAppView):
50 50
51 51 def load_default_context(self):
52 52 _ = self.request.translate
53 53 c = self._get_local_tmpl_context()
54 54 c.user = c.auth_user.get_instance()
55 55
56 56 c.lifetime_values = [
57 57 (-1, _('forever')),
58 58 (5, _('5 minutes')),
59 59 (60, _('1 hour')),
60 60 (60 * 24, _('1 day')),
61 61 (60 * 24 * 30, _('1 month')),
62 62 ]
63 63
64 64 c.lifetime_options = [(c.lifetime_values, _("Lifetime"))]
65 65 c.acl_options = [
66 66 (Gist.ACL_LEVEL_PRIVATE, _("Requires registered account")),
67 67 (Gist.ACL_LEVEL_PUBLIC, _("Can be accessed by anonymous users"))
68 68 ]
69 69
70 70 return c
71 71
72 72 @LoginRequired()
73 73 @view_config(
74 74 route_name='gists_show', request_method='GET',
75 75 renderer='rhodecode:templates/admin/gists/gist_index.mako')
76 76 def gist_show_all(self):
77 77 c = self.load_default_context()
78 78
79 79 not_default_user = self._rhodecode_user.username != User.DEFAULT_USER
80 80 c.show_private = self.request.GET.get('private') and not_default_user
81 81 c.show_public = self.request.GET.get('public') and not_default_user
82 82 c.show_all = self.request.GET.get('all') and self._rhodecode_user.admin
83 83
84 84 gists = _gists = Gist().query()\
85 85 .filter(or_(Gist.gist_expires == -1, Gist.gist_expires >= time.time()))\
86 86 .order_by(Gist.created_on.desc())
87 87
88 88 c.active = 'public'
89 89 # MY private
90 90 if c.show_private and not c.show_public:
91 91 gists = _gists.filter(Gist.gist_type == Gist.GIST_PRIVATE)\
92 92 .filter(Gist.gist_owner == self._rhodecode_user.user_id)
93 93 c.active = 'my_private'
94 94 # MY public
95 95 elif c.show_public and not c.show_private:
96 96 gists = _gists.filter(Gist.gist_type == Gist.GIST_PUBLIC)\
97 97 .filter(Gist.gist_owner == self._rhodecode_user.user_id)
98 98 c.active = 'my_public'
99 99 # MY public+private
100 100 elif c.show_private and c.show_public:
101 101 gists = _gists.filter(or_(Gist.gist_type == Gist.GIST_PUBLIC,
102 102 Gist.gist_type == Gist.GIST_PRIVATE))\
103 103 .filter(Gist.gist_owner == self._rhodecode_user.user_id)
104 104 c.active = 'my_all'
105 105 # Show all by super-admin
106 106 elif c.show_all:
107 107 c.active = 'all'
108 108 gists = _gists
109 109
110 110 # default show ALL public gists
111 111 if not c.show_public and not c.show_private and not c.show_all:
112 112 gists = _gists.filter(Gist.gist_type == Gist.GIST_PUBLIC)
113 113 c.active = 'public'
114 114
115 115 _render = self.request.get_partial_renderer(
116 116 'rhodecode:templates/data_table/_dt_elements.mako')
117 117
118 118 data = []
119 119
120 120 for gist in gists:
121 121 data.append({
122 122 'created_on': _render('gist_created', gist.created_on),
123 123 'created_on_raw': gist.created_on,
124 124 'type': _render('gist_type', gist.gist_type),
125 125 'access_id': _render('gist_access_id', gist.gist_access_id, gist.owner.full_contact),
126 126 'author': _render('gist_author', gist.owner.full_contact, gist.created_on, gist.gist_expires),
127 127 'author_raw': h.escape(gist.owner.full_contact),
128 128 'expires': _render('gist_expires', gist.gist_expires),
129 129 'description': _render('gist_description', gist.gist_description)
130 130 })
131 131 c.data = json.dumps(data)
132 132
133 133 return self._get_template_context(c)
134 134
135 135 @LoginRequired()
136 136 @NotAnonymous()
137 137 @view_config(
138 138 route_name='gists_new', request_method='GET',
139 139 renderer='rhodecode:templates/admin/gists/gist_new.mako')
140 140 def gist_new(self):
141 141 c = self.load_default_context()
142 142 return self._get_template_context(c)
143 143
144 144 @LoginRequired()
145 145 @NotAnonymous()
146 146 @CSRFRequired()
147 147 @view_config(
148 148 route_name='gists_create', request_method='POST',
149 149 renderer='rhodecode:templates/admin/gists/gist_new.mako')
150 150 def gist_create(self):
151 151 _ = self.request.translate
152 152 c = self.load_default_context()
153 153
154 154 data = dict(self.request.POST)
155 155 data['filename'] = data.get('filename') or Gist.DEFAULT_FILENAME
156
156 157 data['nodes'] = [{
157 158 'filename': data['filename'],
158 159 'content': data.get('content'),
159 160 'mimetype': data.get('mimetype') # None is autodetect
160 161 }]
162 gist_type = {
163 'public': Gist.GIST_PUBLIC,
164 'private': Gist.GIST_PRIVATE
165 }.get(data.get('gist_type')) or Gist.GIST_PRIVATE
161 166
162 data['gist_type'] = (
163 Gist.GIST_PUBLIC if data.get('public') else Gist.GIST_PRIVATE)
167 data['gist_type'] = gist_type
168
164 169 data['gist_acl_level'] = (
165 170 data.get('gist_acl_level') or Gist.ACL_LEVEL_PRIVATE)
166 171
167 172 schema = gist_schema.GistSchema().bind(
168 173 lifetime_options=[x[0] for x in c.lifetime_values])
169 174
170 175 try:
171 176
172 177 schema_data = schema.deserialize(data)
173 178 # convert to safer format with just KEYs so we sure no duplicates
174 179 schema_data['nodes'] = gist_schema.sequence_to_nodes(
175 180 schema_data['nodes'])
176 181
177 182 gist = GistModel().create(
178 183 gist_id=schema_data['gistid'], # custom access id not real ID
179 184 description=schema_data['description'],
180 185 owner=self._rhodecode_user.user_id,
181 186 gist_mapping=schema_data['nodes'],
182 187 gist_type=schema_data['gist_type'],
183 188 lifetime=schema_data['lifetime'],
184 189 gist_acl_level=schema_data['gist_acl_level']
185 190 )
186 191 Session().commit()
187 192 new_gist_id = gist.gist_access_id
188 193 except validation_schema.Invalid as errors:
189 194 defaults = data
190 195 errors = errors.asdict()
191 196
192 197 if 'nodes.0.content' in errors:
193 198 errors['content'] = errors['nodes.0.content']
194 199 del errors['nodes.0.content']
195 200 if 'nodes.0.filename' in errors:
196 201 errors['filename'] = errors['nodes.0.filename']
197 202 del errors['nodes.0.filename']
198 203
199 204 data = render('rhodecode:templates/admin/gists/gist_new.mako',
200 205 self._get_template_context(c), self.request)
201 206 html = formencode.htmlfill.render(
202 207 data,
203 208 defaults=defaults,
204 209 errors=errors,
205 210 prefix_error=False,
206 211 encoding="UTF-8",
207 212 force_defaults=False
208 213 )
209 214 return Response(html)
210 215
211 216 except Exception:
212 217 log.exception("Exception while trying to create a gist")
213 218 h.flash(_('Error occurred during gist creation'), category='error')
214 219 raise HTTPFound(h.route_url('gists_new'))
215 220 raise HTTPFound(h.route_url('gist_show', gist_id=new_gist_id))
216 221
217 222 @LoginRequired()
218 223 @NotAnonymous()
219 224 @CSRFRequired()
220 225 @view_config(
221 226 route_name='gist_delete', request_method='POST')
222 227 def gist_delete(self):
223 228 _ = self.request.translate
224 229 gist_id = self.request.matchdict['gist_id']
225 230
226 231 c = self.load_default_context()
227 232 c.gist = Gist.get_or_404(gist_id)
228 233
229 234 owner = c.gist.gist_owner == self._rhodecode_user.user_id
230 235 if not (h.HasPermissionAny('hg.admin')() or owner):
231 236 log.warning('Deletion of Gist was forbidden '
232 237 'by unauthorized user: `%s`', self._rhodecode_user)
233 238 raise HTTPNotFound()
234 239
235 240 GistModel().delete(c.gist)
236 241 Session().commit()
237 242 h.flash(_('Deleted gist %s') % c.gist.gist_access_id, category='success')
238 243
239 244 raise HTTPFound(h.route_url('gists_show'))
240 245
241 246 def _get_gist(self, gist_id):
242 247
243 248 gist = Gist.get_or_404(gist_id)
244 249
245 250 # Check if this gist is expired
246 251 if gist.gist_expires != -1:
247 252 if time.time() > gist.gist_expires:
248 253 log.error(
249 254 'Gist expired at %s', time_to_datetime(gist.gist_expires))
250 255 raise HTTPNotFound()
251 256
252 257 # check if this gist requires a login
253 258 is_default_user = self._rhodecode_user.username == User.DEFAULT_USER
254 259 if gist.acl_level == Gist.ACL_LEVEL_PRIVATE and is_default_user:
255 260 log.error("Anonymous user %s tried to access protected gist `%s`",
256 261 self._rhodecode_user, gist_id)
257 262 raise HTTPNotFound()
258 263 return gist
259 264
260 265 @LoginRequired()
261 266 @view_config(
262 267 route_name='gist_show', request_method='GET',
263 268 renderer='rhodecode:templates/admin/gists/gist_show.mako')
264 269 @view_config(
265 270 route_name='gist_show_rev', request_method='GET',
266 271 renderer='rhodecode:templates/admin/gists/gist_show.mako')
267 272 @view_config(
268 273 route_name='gist_show_formatted', request_method='GET',
269 274 renderer=None)
270 275 @view_config(
271 276 route_name='gist_show_formatted_path', request_method='GET',
272 277 renderer=None)
273 278 def gist_show(self):
274 279 gist_id = self.request.matchdict['gist_id']
275 280
276 281 # TODO(marcink): expose those via matching dict
277 282 revision = self.request.matchdict.get('revision', 'tip')
278 283 f_path = self.request.matchdict.get('f_path', None)
279 284 return_format = self.request.matchdict.get('format')
280 285
281 286 c = self.load_default_context()
282 287 c.gist = self._get_gist(gist_id)
283 288 c.render = not self.request.GET.get('no-render', False)
284 289
285 290 try:
286 291 c.file_last_commit, c.files = GistModel().get_gist_files(
287 292 gist_id, revision=revision)
288 293 except VCSError:
289 294 log.exception("Exception in gist show")
290 295 raise HTTPNotFound()
291 296
292 297 if return_format == 'raw':
293 298 content = '\n\n'.join([f.content for f in c.files
294 299 if (f_path is None or f.path == f_path)])
295 300 response = Response(content)
296 301 response.content_type = 'text/plain'
297 302 return response
298 303 elif return_format:
299 304 raise HTTPBadRequest()
300 305
301 306 return self._get_template_context(c)
302 307
303 308 @LoginRequired()
304 309 @NotAnonymous()
305 310 @view_config(
306 311 route_name='gist_edit', request_method='GET',
307 312 renderer='rhodecode:templates/admin/gists/gist_edit.mako')
308 313 def gist_edit(self):
309 314 _ = self.request.translate
310 315 gist_id = self.request.matchdict['gist_id']
311 316 c = self.load_default_context()
312 317 c.gist = self._get_gist(gist_id)
313 318
314 319 owner = c.gist.gist_owner == self._rhodecode_user.user_id
315 320 if not (h.HasPermissionAny('hg.admin')() or owner):
316 321 raise HTTPNotFound()
317 322
318 323 try:
319 324 c.file_last_commit, c.files = GistModel().get_gist_files(gist_id)
320 325 except VCSError:
321 326 log.exception("Exception in gist edit")
322 327 raise HTTPNotFound()
323 328
324 329 if c.gist.gist_expires == -1:
325 330 expiry = _('never')
326 331 else:
327 332 # this cannot use timeago, since it's used in select2 as a value
328 333 expiry = h.age(h.time_to_datetime(c.gist.gist_expires))
329 334
330 335 c.lifetime_values.append(
331 336 (0, _('%(expiry)s - current value') % {'expiry': _(expiry)})
332 337 )
333 338
334 339 return self._get_template_context(c)
335 340
336 341 @LoginRequired()
337 342 @NotAnonymous()
338 343 @CSRFRequired()
339 344 @view_config(
340 345 route_name='gist_update', request_method='POST',
341 346 renderer='rhodecode:templates/admin/gists/gist_edit.mako')
342 347 def gist_update(self):
343 348 _ = self.request.translate
344 349 gist_id = self.request.matchdict['gist_id']
345 350 c = self.load_default_context()
346 351 c.gist = self._get_gist(gist_id)
347 352
348 353 owner = c.gist.gist_owner == self._rhodecode_user.user_id
349 354 if not (h.HasPermissionAny('hg.admin')() or owner):
350 355 raise HTTPNotFound()
351 356
352 357 data = peppercorn.parse(self.request.POST.items())
353 358
354 359 schema = gist_schema.GistSchema()
355 360 schema = schema.bind(
356 361 # '0' is special value to leave lifetime untouched
357 362 lifetime_options=[x[0] for x in c.lifetime_values] + [0],
358 363 )
359 364
360 365 try:
361 366 schema_data = schema.deserialize(data)
362 367 # convert to safer format with just KEYs so we sure no duplicates
363 368 schema_data['nodes'] = gist_schema.sequence_to_nodes(
364 369 schema_data['nodes'])
365 370
366 371 GistModel().update(
367 372 gist=c.gist,
368 373 description=schema_data['description'],
369 374 owner=c.gist.owner,
370 375 gist_mapping=schema_data['nodes'],
371 376 lifetime=schema_data['lifetime'],
372 377 gist_acl_level=schema_data['gist_acl_level']
373 378 )
374 379
375 380 Session().commit()
376 381 h.flash(_('Successfully updated gist content'), category='success')
377 382 except NodeNotChangedError:
378 383 # raised if nothing was changed in repo itself. We anyway then
379 384 # store only DB stuff for gist
380 385 Session().commit()
381 386 h.flash(_('Successfully updated gist data'), category='success')
382 387 except validation_schema.Invalid as errors:
383 388 errors = h.escape(errors.asdict())
384 389 h.flash(_('Error occurred during update of gist {}: {}').format(
385 390 gist_id, errors), category='error')
386 391 except Exception:
387 392 log.exception("Exception in gist edit")
388 393 h.flash(_('Error occurred during update of gist %s') % gist_id,
389 394 category='error')
390 395
391 396 raise HTTPFound(h.route_url('gist_show', gist_id=gist_id))
392 397
393 398 @LoginRequired()
394 399 @NotAnonymous()
395 400 @view_config(
396 401 route_name='gist_edit_check_revision', request_method='GET',
397 402 renderer='json_ext')
398 403 def gist_edit_check_revision(self):
399 404 _ = self.request.translate
400 405 gist_id = self.request.matchdict['gist_id']
401 406 c = self.load_default_context()
402 407 c.gist = self._get_gist(gist_id)
403 408
404 409 last_rev = c.gist.scm_instance().get_commit()
405 410 success = True
406 411 revision = self.request.GET.get('revision')
407 412
408 413 if revision != last_rev.raw_id:
409 414 log.error('Last revision %s is different then submitted %s',
410 415 revision, last_rev)
411 416 # our gist has newer version than we
412 417 success = False
413 418
414 419 return {'success': success}
@@ -1,1301 +1,1302 b''
1 1 // Default styles
2 2
3 3 .diff-collapse {
4 4 margin: @padding 0;
5 5 text-align: right;
6 6 }
7 7
8 8 .diff-container {
9 9 margin-bottom: @space;
10 10
11 11 .diffblock {
12 12 margin-bottom: @space;
13 13 }
14 14
15 15 &.hidden {
16 16 display: none;
17 17 overflow: hidden;
18 18 }
19 19 }
20 20
21 21
22 22 div.diffblock .sidebyside {
23 23 background: #ffffff;
24 24 }
25 25
26 26 div.diffblock {
27 27 overflow-x: auto;
28 28 overflow-y: hidden;
29 29 clear: both;
30 30 padding: 0px;
31 31 background: @grey6;
32 32 border: @border-thickness solid @grey5;
33 33 -webkit-border-radius: @border-radius @border-radius 0px 0px;
34 34 border-radius: @border-radius @border-radius 0px 0px;
35 35
36 36
37 37 .comments-number {
38 38 float: right;
39 39 }
40 40
41 41 // BEGIN CODE-HEADER STYLES
42 42
43 43 .code-header {
44 44 background: @grey6;
45 45 padding: 10px 0 10px 0;
46 46 height: auto;
47 47 width: 100%;
48 48
49 49 .hash {
50 50 float: left;
51 51 padding: 2px 0 0 2px;
52 52 }
53 53
54 54 .date {
55 55 float: left;
56 56 text-transform: uppercase;
57 57 padding: 4px 0px 0px 2px;
58 58 }
59 59
60 60 div {
61 61 margin-left: 4px;
62 62 }
63 63
64 64 div.compare_header {
65 65 min-height: 40px;
66 66 margin: 0;
67 67 padding: 0 @padding;
68 68
69 69 .drop-menu {
70 70 float:left;
71 71 display: block;
72 72 margin:0 0 @padding 0;
73 73 }
74 74
75 75 .compare-label {
76 76 float: left;
77 77 clear: both;
78 78 display: inline-block;
79 79 min-width: 5em;
80 80 margin: 0;
81 81 padding: @button-padding @button-padding @button-padding 0;
82 82 font-weight: @text-semibold-weight;
83 83 font-family: @text-semibold;
84 84 }
85 85
86 86 .compare-buttons {
87 87 float: left;
88 88 margin: 0;
89 89 padding: 0 0 @padding;
90 90
91 91 .btn {
92 92 margin: 0 @padding 0 0;
93 93 }
94 94 }
95 95 }
96 96
97 97 }
98 98
99 99 .parents {
100 100 float: left;
101 101 width: 100px;
102 102 font-weight: 400;
103 103 vertical-align: middle;
104 104 padding: 0px 2px 0px 2px;
105 105 background-color: @grey6;
106 106
107 107 #parent_link {
108 108 margin: 00px 2px;
109 109
110 110 &.double {
111 111 margin: 0px 2px;
112 112 }
113 113
114 114 &.disabled{
115 115 margin-right: @padding;
116 116 }
117 117 }
118 118 }
119 119
120 120 .children {
121 121 float: right;
122 122 width: 100px;
123 123 font-weight: 400;
124 124 vertical-align: middle;
125 125 text-align: right;
126 126 padding: 0px 2px 0px 2px;
127 127 background-color: @grey6;
128 128
129 129 #child_link {
130 130 margin: 0px 2px;
131 131
132 132 &.double {
133 133 margin: 0px 2px;
134 134 }
135 135
136 136 &.disabled{
137 137 margin-right: @padding;
138 138 }
139 139 }
140 140 }
141 141
142 142 .changeset_header {
143 143 height: 16px;
144 144
145 145 & > div{
146 146 margin-right: @padding;
147 147 }
148 148 }
149 149
150 150 .changeset_file {
151 151 text-align: left;
152 152 float: left;
153 153 padding: 0;
154 154
155 155 a{
156 156 display: inline-block;
157 157 margin-right: 0.5em;
158 158 }
159 159
160 160 #selected_mode{
161 161 margin-left: 0;
162 162 }
163 163 }
164 164
165 165 .diff-menu-wrapper {
166 166 float: left;
167 167 }
168 168
169 169 .diff-menu {
170 170 position: absolute;
171 171 background: none repeat scroll 0 0 #FFFFFF;
172 172 border-color: #003367 @grey3 @grey3;
173 173 border-right: 1px solid @grey3;
174 174 border-style: solid solid solid;
175 175 border-width: @border-thickness;
176 176 box-shadow: 2px 8px 4px rgba(0, 0, 0, 0.2);
177 177 margin-top: 5px;
178 178 margin-left: 1px;
179 179 }
180 180
181 181 .diff-actions, .editor-actions {
182 182 float: left;
183 183
184 184 input{
185 185 margin: 0 0.5em 0 0;
186 186 }
187 187 }
188 188
189 189 // END CODE-HEADER STYLES
190 190
191 191 // BEGIN CODE-BODY STYLES
192 192
193 193 .code-body {
194 194 padding: 0;
195 195 background-color: #ffffff;
196 196 position: relative;
197 197 max-width: none;
198 198 box-sizing: border-box;
199 199 // TODO: johbo: Parent has overflow: auto, this forces the child here
200 200 // to have the intended size and to scroll. Should be simplified.
201 201 width: 100%;
202 202 overflow-x: auto;
203 203 }
204 204
205 205 pre.raw {
206 206 background: white;
207 207 color: @grey1;
208 208 }
209 209 // END CODE-BODY STYLES
210 210
211 211 }
212 212
213 213
214 214 table.code-difftable {
215 215 border-collapse: collapse;
216 216 width: 99%;
217 217 border-radius: 0px !important;
218 218
219 219 td {
220 220 padding: 0 !important;
221 221 background: none !important;
222 222 border: 0 !important;
223 223 }
224 224
225 225 .context {
226 226 background: none repeat scroll 0 0 #DDE7EF;
227 227 }
228 228
229 229 .add {
230 230 background: none repeat scroll 0 0 #DDFFDD;
231 231
232 232 ins {
233 233 background: none repeat scroll 0 0 #AAFFAA;
234 234 text-decoration: none;
235 235 }
236 236 }
237 237
238 238 .del {
239 239 background: none repeat scroll 0 0 #FFDDDD;
240 240
241 241 del {
242 242 background: none repeat scroll 0 0 #FFAAAA;
243 243 text-decoration: none;
244 244 }
245 245 }
246 246
247 247 /** LINE NUMBERS **/
248 248 .lineno {
249 249 padding-left: 2px !important;
250 250 padding-right: 2px;
251 251 text-align: right;
252 252 width: 32px;
253 253 -moz-user-select: none;
254 254 -webkit-user-select: none;
255 255 border-right: @border-thickness solid @grey5 !important;
256 256 border-left: 0px solid #CCC !important;
257 257 border-top: 0px solid #CCC !important;
258 258 border-bottom: none !important;
259 259
260 260 a {
261 261 &:extend(pre);
262 262 text-align: right;
263 263 padding-right: 2px;
264 264 cursor: pointer;
265 265 display: block;
266 266 width: 32px;
267 267 }
268 268 }
269 269
270 270 .context {
271 271 cursor: auto;
272 272 &:extend(pre);
273 273 }
274 274
275 275 .lineno-inline {
276 276 background: none repeat scroll 0 0 #FFF !important;
277 277 padding-left: 2px;
278 278 padding-right: 2px;
279 279 text-align: right;
280 280 width: 30px;
281 281 -moz-user-select: none;
282 282 -webkit-user-select: none;
283 283 }
284 284
285 285 /** CODE **/
286 286 .code {
287 287 display: block;
288 288 width: 100%;
289 289
290 290 td {
291 291 margin: 0;
292 292 padding: 0;
293 293 }
294 294
295 295 pre {
296 296 margin: 0;
297 297 padding: 0;
298 298 margin-left: .5em;
299 299 }
300 300 }
301 301 }
302 302
303 303
304 304 // Comments
305 305 .comment-selected-hl {
306 306 border-left: 6px solid @comment-highlight-color !important;
307 307 padding-left: 3px !important;
308 308 margin-left: -7px !important;
309 309 }
310 310
311 311 div.comment:target,
312 312 div.comment-outdated:target {
313 313 .comment-selected-hl;
314 314 }
315 315
316 316 //TODO: anderson: can't get an absolute number out of anything, so had to put the
317 317 //current values that might change. But to make it clear I put as a calculation
318 318 @comment-max-width: 1065px;
319 319 @pr-extra-margin: 34px;
320 320 @pr-border-spacing: 4px;
321 321 @pr-comment-width: @comment-max-width - @pr-extra-margin - @pr-border-spacing;
322 322
323 323 // Pull Request
324 324 .cs_files .code-difftable {
325 325 border: @border-thickness solid @grey5; //borders only on PRs
326 326
327 327 .comment-inline-form,
328 328 div.comment {
329 329 width: @pr-comment-width;
330 330 }
331 331 }
332 332
333 333 // Changeset
334 334 .code-difftable {
335 335 .comment-inline-form,
336 336 div.comment {
337 337 width: @comment-max-width;
338 338 }
339 339 }
340 340
341 341 //Style page
342 342 @style-extra-margin: @sidebar-width + (@sidebarpadding * 3) + @padding;
343 343 #style-page .code-difftable{
344 344 .comment-inline-form,
345 345 div.comment {
346 346 width: @comment-max-width - @style-extra-margin;
347 347 }
348 348 }
349 349
350 350 #context-bar > h2 {
351 351 font-size: 20px;
352 352 }
353 353
354 354 #context-bar > h2> a {
355 355 font-size: 20px;
356 356 }
357 357 // end of defaults
358 358
359 359 .file_diff_buttons {
360 360 padding: 0 0 @padding;
361 361
362 362 .drop-menu {
363 363 float: left;
364 364 margin: 0 @padding 0 0;
365 365 }
366 366 .btn {
367 367 margin: 0 @padding 0 0;
368 368 }
369 369 }
370 370
371 371 .code-body.textarea.editor {
372 372 max-width: none;
373 373 padding: 15px;
374 374 }
375 375
376 376 td.injected_diff{
377 377 max-width: 1178px;
378 378 overflow-x: auto;
379 379 overflow-y: hidden;
380 380
381 381 div.diff-container,
382 382 div.diffblock{
383 383 max-width: 100%;
384 384 }
385 385
386 386 div.code-body {
387 387 max-width: 1124px;
388 388 overflow-x: auto;
389 389 overflow-y: hidden;
390 390 padding: 0;
391 391 }
392 392 div.diffblock {
393 393 border: none;
394 394 }
395 395
396 396 &.inline-form {
397 397 width: 99%
398 398 }
399 399 }
400 400
401 401
402 402 table.code-difftable {
403 403 width: 100%;
404 404 }
405 405
406 406 /** PYGMENTS COLORING **/
407 407 div.codeblock {
408 408
409 409 // TODO: johbo: Added interim to get rid of the margin around
410 410 // Select2 widgets. This needs further cleanup.
411 411 overflow: auto;
412 412 padding: 0px;
413 413 border: @border-thickness solid @grey6;
414 414 .border-radius(@border-radius);
415 415
416 416 #remove_gist {
417 417 float: right;
418 418 }
419 419
420 420 .gist_url {
421 421 padding: 0px 0px 35px 0px;
422 422 }
423 423
424 424 .gist-desc {
425 425 clear: both;
426 426 margin: 0 0 10px 0;
427 427 code {
428 428 white-space: pre-line;
429 429 line-height: inherit
430 430 }
431 431 }
432
432 433 .author {
433 434 clear: both;
434 435 vertical-align: middle;
435 436 font-weight: @text-bold-weight;
436 437 font-family: @text-bold;
437 438 }
438 439
439 440 .btn-mini {
440 441 float: left;
441 442 margin: 0 5px 0 0;
442 443 }
443 444
444 445 .code-header {
445 446 padding: @padding;
446 447 border-bottom: @border-thickness solid @grey5;
447 448
448 449 .rc-user {
449 450 min-width: 0;
450 451 margin-right: .5em;
451 452 }
452 453
453 454 .stats {
454 455 clear: both;
455 456 margin: 0 0 @padding 0;
456 457 padding: 0;
457 458 .left {
458 459 float: left;
459 460 clear: left;
460 461 max-width: 75%;
461 462 margin: 0 0 @padding 0;
462 463
463 464 &.item {
464 465 margin-right: @padding;
465 466 &.last { border-right: none; }
466 467 }
467 468 }
468 469 .buttons { float: right; }
469 470 .author {
470 471 height: 25px; margin-left: 15px; font-weight: bold;
471 472 }
472 473 }
473 474
474 475 .commit {
475 476 margin: 5px 0 0 26px;
476 477 font-weight: normal;
477 478 white-space: pre-wrap;
478 479 }
479 480 }
480 481
481 482 .message {
482 483 position: relative;
483 484 margin: @padding;
484 485
485 486 .codeblock-label {
486 487 margin: 0 0 1em 0;
487 488 }
488 489 }
489 490
490 491 .code-body {
491 492 padding: 0.8em 1em;
492 493 background-color: #ffffff;
493 494 min-width: 100%;
494 495 box-sizing: border-box;
495 496 // TODO: johbo: Parent has overflow: auto, this forces the child here
496 497 // to have the intended size and to scroll. Should be simplified.
497 498 width: 100%;
498 499 overflow-x: auto;
499 500
500 501 img.rendered-binary {
501 502 height: auto;
502 503 width: 100%;
503 504 }
504 505
505 506 .markdown-block {
506 507 padding: 1em 0;
507 508 }
508 509 }
509 510
510 511 .codeblock-header {
511 512 background: @grey7;
512 513 height: 36px;
513 514 }
514 515
515 516 .path {
516 517 border-bottom: 1px solid @grey6;
517 518 padding: .65em 1em;
518 519 height: 18px;
519 520 }
520 521 }
521 522
522 523 .code-highlighttable,
523 524 div.codeblock {
524 525
525 526 &.readme {
526 527 background-color: white;
527 528 }
528 529
529 530 .markdown-block table {
530 531 border-collapse: collapse;
531 532
532 533 th,
533 534 td {
534 535 padding: .5em;
535 536 border: @border-thickness solid @border-default-color;
536 537 }
537 538 }
538 539
539 540 table {
540 541 border: 0px;
541 542 margin: 0;
542 543 letter-spacing: normal;
543 544
544 545
545 546 td {
546 547 border: 0px;
547 548 vertical-align: top;
548 549 }
549 550 }
550 551 }
551 552
552 553 div.codeblock .code-header .search-path { padding: 0 0 0 10px; }
553 554 div.search-code-body {
554 555 background-color: #ffffff; padding: 5px 0 5px 10px;
555 556 pre {
556 557 .match { background-color: #faffa6;}
557 558 .break { display: block; width: 100%; background-color: #DDE7EF; color: #747474; }
558 559 }
559 560 .code-highlighttable {
560 561 border-collapse: collapse;
561 562
562 563 tr:hover {
563 564 background: #fafafa;
564 565 }
565 566 td.code {
566 567 padding-left: 10px;
567 568 }
568 569 td.line {
569 570 border-right: 1px solid #ccc !important;
570 571 padding-right: 10px;
571 572 text-align: right;
572 573 font-family: @text-monospace;
573 574 span {
574 575 white-space: pre-wrap;
575 576 color: #666666;
576 577 }
577 578 }
578 579 }
579 580 }
580 581
581 582 div.annotatediv { margin-left: 2px; margin-right: 4px; }
582 583 .code-highlight {
583 584 margin: 0; padding: 0; border-left: @border-thickness solid @grey5;
584 585 pre, .linenodiv pre { padding: 0 5px; margin: 0; }
585 586 pre div:target {background-color: @comment-highlight-color !important;}
586 587 }
587 588
588 589 .linenos a { text-decoration: none; }
589 590
590 591 .CodeMirror-selected { background: @rchighlightblue; }
591 592 .CodeMirror-focused .CodeMirror-selected { background: @rchighlightblue; }
592 593 .CodeMirror ::selection { background: @rchighlightblue; }
593 594 .CodeMirror ::-moz-selection { background: @rchighlightblue; }
594 595
595 596 .code { display: block; border:0px !important; }
596 597 .code-highlight, /* TODO: dan: merge codehilite into code-highlight */
597 598 /* This can be generated with `pygmentize -S default -f html` */
598 599 .codehilite {
599 600 .c-ElasticMatch { background-color: #faffa6; padding: 0.2em;}
600 601 .hll { background-color: #ffffcc }
601 602 .c { color: #408080; font-style: italic } /* Comment */
602 603 .err, .codehilite .err { border: none } /* Error */
603 604 .k { color: #008000; font-weight: bold } /* Keyword */
604 605 .o { color: #666666 } /* Operator */
605 606 .ch { color: #408080; font-style: italic } /* Comment.Hashbang */
606 607 .cm { color: #408080; font-style: italic } /* Comment.Multiline */
607 608 .cp { color: #BC7A00 } /* Comment.Preproc */
608 609 .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
609 610 .c1 { color: #408080; font-style: italic } /* Comment.Single */
610 611 .cs { color: #408080; font-style: italic } /* Comment.Special */
611 612 .gd { color: #A00000 } /* Generic.Deleted */
612 613 .ge { font-style: italic } /* Generic.Emph */
613 614 .gr { color: #FF0000 } /* Generic.Error */
614 615 .gh { color: #000080; font-weight: bold } /* Generic.Heading */
615 616 .gi { color: #00A000 } /* Generic.Inserted */
616 617 .go { color: #888888 } /* Generic.Output */
617 618 .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
618 619 .gs { font-weight: bold } /* Generic.Strong */
619 620 .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
620 621 .gt { color: #0044DD } /* Generic.Traceback */
621 622 .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
622 623 .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
623 624 .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
624 625 .kp { color: #008000 } /* Keyword.Pseudo */
625 626 .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
626 627 .kt { color: #B00040 } /* Keyword.Type */
627 628 .m { color: #666666 } /* Literal.Number */
628 629 .s { color: #BA2121 } /* Literal.String */
629 630 .na { color: #7D9029 } /* Name.Attribute */
630 631 .nb { color: #008000 } /* Name.Builtin */
631 632 .nc { color: #0000FF; font-weight: bold } /* Name.Class */
632 633 .no { color: #880000 } /* Name.Constant */
633 634 .nd { color: #AA22FF } /* Name.Decorator */
634 635 .ni { color: #999999; font-weight: bold } /* Name.Entity */
635 636 .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
636 637 .nf { color: #0000FF } /* Name.Function */
637 638 .nl { color: #A0A000 } /* Name.Label */
638 639 .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
639 640 .nt { color: #008000; font-weight: bold } /* Name.Tag */
640 641 .nv { color: #19177C } /* Name.Variable */
641 642 .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
642 643 .w { color: #bbbbbb } /* Text.Whitespace */
643 644 .mb { color: #666666 } /* Literal.Number.Bin */
644 645 .mf { color: #666666 } /* Literal.Number.Float */
645 646 .mh { color: #666666 } /* Literal.Number.Hex */
646 647 .mi { color: #666666 } /* Literal.Number.Integer */
647 648 .mo { color: #666666 } /* Literal.Number.Oct */
648 649 .sa { color: #BA2121 } /* Literal.String.Affix */
649 650 .sb { color: #BA2121 } /* Literal.String.Backtick */
650 651 .sc { color: #BA2121 } /* Literal.String.Char */
651 652 .dl { color: #BA2121 } /* Literal.String.Delimiter */
652 653 .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
653 654 .s2 { color: #BA2121 } /* Literal.String.Double */
654 655 .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
655 656 .sh { color: #BA2121 } /* Literal.String.Heredoc */
656 657 .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
657 658 .sx { color: #008000 } /* Literal.String.Other */
658 659 .sr { color: #BB6688 } /* Literal.String.Regex */
659 660 .s1 { color: #BA2121 } /* Literal.String.Single */
660 661 .ss { color: #19177C } /* Literal.String.Symbol */
661 662 .bp { color: #008000 } /* Name.Builtin.Pseudo */
662 663 .fm { color: #0000FF } /* Name.Function.Magic */
663 664 .vc { color: #19177C } /* Name.Variable.Class */
664 665 .vg { color: #19177C } /* Name.Variable.Global */
665 666 .vi { color: #19177C } /* Name.Variable.Instance */
666 667 .vm { color: #19177C } /* Name.Variable.Magic */
667 668 .il { color: #666666 } /* Literal.Number.Integer.Long */
668 669
669 670 }
670 671
671 672 /* customized pre blocks for markdown/rst */
672 673 pre.literal-block, .codehilite pre{
673 674 padding: @padding;
674 675 border: 1px solid @grey6;
675 676 .border-radius(@border-radius);
676 677 background-color: @grey7;
677 678 }
678 679
679 680
680 681 /* START NEW CODE BLOCK CSS */
681 682
682 683 @cb-line-height: 18px;
683 684 @cb-line-code-padding: 10px;
684 685 @cb-text-padding: 5px;
685 686
686 687 @pill-padding: 2px 7px;
687 688 @pill-padding-small: 2px 2px 1px 2px;
688 689
689 690 input.filediff-collapse-state {
690 691 display: none;
691 692
692 693 &:checked + .filediff { /* file diff is collapsed */
693 694 .cb {
694 695 display: none
695 696 }
696 697 .filediff-collapse-indicator {
697 698 float: left;
698 699 cursor: pointer;
699 700 margin: 1px -5px;
700 701 }
701 702 .filediff-collapse-indicator:before {
702 703 content: '\f105';
703 704 }
704 705
705 706 .filediff-menu {
706 707 display: none;
707 708 }
708 709
709 710 }
710 711
711 712 &+ .filediff { /* file diff is expanded */
712 713
713 714 .filediff-collapse-indicator {
714 715 float: left;
715 716 cursor: pointer;
716 717 margin: 1px -5px;
717 718 }
718 719 .filediff-collapse-indicator:before {
719 720 content: '\f107';
720 721 }
721 722
722 723 .filediff-menu {
723 724 display: block;
724 725 }
725 726
726 727 margin: 10px 0;
727 728 &:nth-child(2) {
728 729 margin: 0;
729 730 }
730 731 }
731 732 }
732 733
733 734 .filediffs .anchor {
734 735 display: block;
735 736 height: 40px;
736 737 margin-top: -40px;
737 738 visibility: hidden;
738 739 }
739 740
740 741 .filediffs .anchor:nth-of-type(1) {
741 742 display: block;
742 743 height: 80px;
743 744 margin-top: -80px;
744 745 visibility: hidden;
745 746 }
746 747
747 748 .cs_files {
748 749 clear: both;
749 750 }
750 751
751 752 #diff-file-sticky{
752 753 will-change: min-height;
753 754 height: 80px;
754 755 }
755 756
756 757 .sidebar__inner{
757 758 transform: translate(0, 0); /* For browsers don't support translate3d. */
758 759 transform: translate3d(0, 0, 0);
759 760 will-change: position, transform;
760 761 height: 65px;
761 762 background-color: #fff;
762 763 padding: 5px 0px;
763 764 }
764 765
765 766 .sidebar__bar {
766 767 padding: 5px 0px 0px 0px
767 768 }
768 769
769 770 .fpath-placeholder {
770 771 clear: both;
771 772 visibility: hidden
772 773 }
773 774
774 775 .is-affixed {
775 776
776 777 .sidebar__inner {
777 778 z-index: 30;
778 779 }
779 780
780 781 .sidebar_inner_shadow {
781 782 position: fixed;
782 783 top: 75px;
783 784 right: -100%;
784 785 left: -100%;
785 786 z-index: 30;
786 787 display: block;
787 788 height: 5px;
788 789 content: "";
789 790 background: linear-gradient(rgba(0, 0, 0, 0.075), rgba(0, 0, 0, 0.001)) repeat-x 0 0;
790 791 border-top: 1px solid rgba(0, 0, 0, 0.15);
791 792 }
792 793
793 794 .fpath-placeholder {
794 795 visibility: visible !important;
795 796 }
796 797 }
797 798
798 799 .diffset-menu {
799 800
800 801 }
801 802
802 803 #todo-box {
803 804 clear:both;
804 805 display: none;
805 806 text-align: right
806 807 }
807 808
808 809 .diffset {
809 810 margin: 0px auto;
810 811 .diffset-heading {
811 812 border: 1px solid @grey5;
812 813 margin-bottom: -1px;
813 814 // margin-top: 20px;
814 815 h2 {
815 816 margin: 0;
816 817 line-height: 38px;
817 818 padding-left: 10px;
818 819 }
819 820 .btn {
820 821 margin: 0;
821 822 }
822 823 background: @grey6;
823 824 display: block;
824 825 padding: 5px;
825 826 }
826 827 .diffset-heading-warning {
827 828 background: @alert3-inner;
828 829 border: 1px solid @alert3;
829 830 }
830 831 &.diffset-comments-disabled {
831 832 .cb-comment-box-opener, .comment-inline-form, .cb-comment-add-button {
832 833 display: none !important;
833 834 }
834 835 }
835 836 }
836 837
837 838 .filelist {
838 839 .pill {
839 840 display: block;
840 841 float: left;
841 842 padding: @pill-padding-small;
842 843 }
843 844 }
844 845
845 846 .pill {
846 847 display: block;
847 848 float: left;
848 849 padding: @pill-padding;
849 850 }
850 851
851 852 .pill-group {
852 853 .pill {
853 854 opacity: .8;
854 855 margin-right: 3px;
855 856 font-size: 12px;
856 857 font-weight: normal;
857 858 min-width: 30px;
858 859 text-align: center;
859 860
860 861 &:first-child {
861 862 border-radius: @border-radius 0 0 @border-radius;
862 863 }
863 864 &:last-child {
864 865 border-radius: 0 @border-radius @border-radius 0;
865 866 }
866 867 &:only-child {
867 868 border-radius: @border-radius;
868 869 margin-right: 0;
869 870 }
870 871 }
871 872 }
872 873
873 874 /* Main comments*/
874 875 #comments {
875 876 .comment-selected {
876 877 border-left: 6px solid @comment-highlight-color;
877 878 padding-left: 3px;
878 879 margin-left: -9px;
879 880 }
880 881 }
881 882
882 883 .filediff {
883 884 border: 1px solid @grey5;
884 885
885 886 /* START OVERRIDES */
886 887 .code-highlight {
887 888 border: none; // TODO: remove this border from the global
888 889 // .code-highlight, it doesn't belong there
889 890 }
890 891 label {
891 892 margin: 0; // TODO: remove this margin definition from global label
892 893 // it doesn't belong there - if margin on labels
893 894 // are needed for a form they should be defined
894 895 // in the form's class
895 896 }
896 897 /* END OVERRIDES */
897 898
898 899 * {
899 900 box-sizing: border-box;
900 901 }
901 902 .filediff-anchor {
902 903 visibility: hidden;
903 904 }
904 905 &:hover {
905 906 .filediff-anchor {
906 907 visibility: visible;
907 908 }
908 909 }
909 910
910 911 .filediff-heading {
911 912 cursor: pointer;
912 913 display: block;
913 914 padding: 10px 10px;
914 915 }
915 916 .filediff-heading:after {
916 917 content: "";
917 918 display: table;
918 919 clear: both;
919 920 }
920 921 .filediff-heading:hover {
921 922 background: #e1e9f4 !important;
922 923 }
923 924
924 925 .filediff-menu {
925 926 text-align: right;
926 927 padding: 5px 5px 5px 0px;
927 928 background: @grey7;
928 929
929 930 &> a,
930 931 &> span {
931 932 padding: 1px;
932 933 }
933 934 }
934 935
935 936 .filediff-collapse-button, .filediff-expand-button {
936 937 cursor: pointer;
937 938 }
938 939 .filediff-collapse-button {
939 940 display: inline;
940 941 }
941 942 .filediff-expand-button {
942 943 display: none;
943 944 }
944 945 .filediff-collapsed .filediff-collapse-button {
945 946 display: none;
946 947 }
947 948 .filediff-collapsed .filediff-expand-button {
948 949 display: inline;
949 950 }
950 951
951 952 /**** COMMENTS ****/
952 953
953 954 .filediff-menu {
954 955 .show-comment-button {
955 956 display: none;
956 957 }
957 958 }
958 959 &.hide-comments {
959 960 .inline-comments {
960 961 display: none;
961 962 }
962 963 .filediff-menu {
963 964 .show-comment-button {
964 965 display: inline;
965 966 }
966 967 .hide-comment-button {
967 968 display: none;
968 969 }
969 970 }
970 971 }
971 972
972 973 .hide-line-comments {
973 974 .inline-comments {
974 975 display: none;
975 976 }
976 977 }
977 978
978 979 /**** END COMMENTS ****/
979 980
980 981 }
981 982
982 983
983 984 .op-added {
984 985 color: @alert1;
985 986 }
986 987
987 988 .op-deleted {
988 989 color: @alert2;
989 990 }
990 991
991 992 .filediff, .filelist {
992 993
993 994 .pill {
994 995 &[op="name"] {
995 996 background: none;
996 997 opacity: 1;
997 998 color: white;
998 999 }
999 1000 &[op="limited"] {
1000 1001 background: @grey2;
1001 1002 color: white;
1002 1003 }
1003 1004 &[op="binary"] {
1004 1005 background: @color7;
1005 1006 color: white;
1006 1007 }
1007 1008 &[op="modified"] {
1008 1009 background: @alert1;
1009 1010 color: white;
1010 1011 }
1011 1012 &[op="renamed"] {
1012 1013 background: @color4;
1013 1014 color: white;
1014 1015 }
1015 1016 &[op="copied"] {
1016 1017 background: @color4;
1017 1018 color: white;
1018 1019 }
1019 1020 &[op="mode"] {
1020 1021 background: @grey3;
1021 1022 color: white;
1022 1023 }
1023 1024 &[op="symlink"] {
1024 1025 background: @color8;
1025 1026 color: white;
1026 1027 }
1027 1028
1028 1029 &[op="added"] { /* added lines */
1029 1030 background: @alert1;
1030 1031 color: white;
1031 1032 }
1032 1033 &[op="deleted"] { /* deleted lines */
1033 1034 background: @alert2;
1034 1035 color: white;
1035 1036 }
1036 1037
1037 1038 &[op="created"] { /* created file */
1038 1039 background: @alert1;
1039 1040 color: white;
1040 1041 }
1041 1042 &[op="removed"] { /* deleted file */
1042 1043 background: @color5;
1043 1044 color: white;
1044 1045 }
1045 1046 }
1046 1047 }
1047 1048
1048 1049
1049 1050 .filediff-outdated {
1050 1051 padding: 8px 0;
1051 1052
1052 1053 .filediff-heading {
1053 1054 opacity: .5;
1054 1055 }
1055 1056 }
1056 1057
1057 1058 table.cb {
1058 1059 width: 100%;
1059 1060 border-collapse: collapse;
1060 1061
1061 1062 .cb-text {
1062 1063 padding: @cb-text-padding;
1063 1064 }
1064 1065 .cb-hunk {
1065 1066 padding: @cb-text-padding;
1066 1067 }
1067 1068 .cb-expand {
1068 1069 display: none;
1069 1070 }
1070 1071 .cb-collapse {
1071 1072 display: inline;
1072 1073 }
1073 1074 &.cb-collapsed {
1074 1075 .cb-line {
1075 1076 display: none;
1076 1077 }
1077 1078 .cb-expand {
1078 1079 display: inline;
1079 1080 }
1080 1081 .cb-collapse {
1081 1082 display: none;
1082 1083 }
1083 1084 .cb-hunk {
1084 1085 display: none;
1085 1086 }
1086 1087 }
1087 1088
1088 1089 /* intentionally general selector since .cb-line-selected must override it
1089 1090 and they both use !important since the td itself may have a random color
1090 1091 generated by annotation blocks. TLDR: if you change it, make sure
1091 1092 annotated block selection and line selection in file view still work */
1092 1093 .cb-line-fresh .cb-content {
1093 1094 background: white !important;
1094 1095 }
1095 1096 .cb-warning {
1096 1097 background: #fff4dd;
1097 1098 }
1098 1099
1099 1100 &.cb-diff-sideside {
1100 1101 td {
1101 1102 &.cb-content {
1102 1103 width: 50%;
1103 1104 }
1104 1105 }
1105 1106 }
1106 1107
1107 1108 tr {
1108 1109 &.cb-annotate {
1109 1110 border-top: 1px solid #eee;
1110 1111 }
1111 1112
1112 1113 &.cb-comment-info {
1113 1114 border-top: 1px solid #eee;
1114 1115 color: rgba(0, 0, 0, 0.3);
1115 1116 background: #edf2f9;
1116 1117
1117 1118 td {
1118 1119
1119 1120 }
1120 1121 }
1121 1122
1122 1123 &.cb-hunk {
1123 1124 font-family: @text-monospace;
1124 1125 color: rgba(0, 0, 0, 0.3);
1125 1126
1126 1127 td {
1127 1128 &:first-child {
1128 1129 background: #edf2f9;
1129 1130 }
1130 1131 &:last-child {
1131 1132 background: #f4f7fb;
1132 1133 }
1133 1134 }
1134 1135 }
1135 1136 }
1136 1137
1137 1138
1138 1139 td {
1139 1140 vertical-align: top;
1140 1141 padding: 0;
1141 1142
1142 1143 &.cb-content {
1143 1144 font-size: 12.35px;
1144 1145
1145 1146 &.cb-line-selected .cb-code {
1146 1147 background: @comment-highlight-color !important;
1147 1148 }
1148 1149
1149 1150 span.cb-code {
1150 1151 line-height: @cb-line-height;
1151 1152 padding-left: @cb-line-code-padding;
1152 1153 padding-right: @cb-line-code-padding;
1153 1154 display: block;
1154 1155 white-space: pre-wrap;
1155 1156 font-family: @text-monospace;
1156 1157 word-break: break-all;
1157 1158 .nonl {
1158 1159 color: @color5;
1159 1160 }
1160 1161 .cb-action {
1161 1162 &:before {
1162 1163 content: " ";
1163 1164 }
1164 1165 &.cb-deletion:before {
1165 1166 content: "- ";
1166 1167 }
1167 1168 &.cb-addition:before {
1168 1169 content: "+ ";
1169 1170 }
1170 1171 }
1171 1172 }
1172 1173
1173 1174 &> button.cb-comment-box-opener {
1174 1175
1175 1176 padding: 2px 2px 1px 3px;
1176 1177 margin-left: -6px;
1177 1178 margin-top: -1px;
1178 1179
1179 1180 border-radius: @border-radius;
1180 1181 position: absolute;
1181 1182 display: none;
1182 1183 }
1183 1184 .cb-comment {
1184 1185 margin-top: 10px;
1185 1186 white-space: normal;
1186 1187 }
1187 1188 }
1188 1189 &:hover {
1189 1190 button.cb-comment-box-opener {
1190 1191 display: block;
1191 1192 }
1192 1193 &+ td button.cb-comment-box-opener {
1193 1194 display: block
1194 1195 }
1195 1196 }
1196 1197
1197 1198 &.cb-data {
1198 1199 text-align: right;
1199 1200 width: 30px;
1200 1201 font-family: @text-monospace;
1201 1202
1202 1203 .icon-comment {
1203 1204 cursor: pointer;
1204 1205 }
1205 1206 &.cb-line-selected {
1206 1207 background: @comment-highlight-color !important;
1207 1208 }
1208 1209 &.cb-line-selected > div {
1209 1210 display: block;
1210 1211 background: @comment-highlight-color !important;
1211 1212 line-height: @cb-line-height;
1212 1213 color: rgba(0, 0, 0, 0.3);
1213 1214 }
1214 1215 }
1215 1216
1216 1217 &.cb-lineno {
1217 1218 padding: 0;
1218 1219 width: 50px;
1219 1220 color: rgba(0, 0, 0, 0.3);
1220 1221 text-align: right;
1221 1222 border-right: 1px solid #eee;
1222 1223 font-family: @text-monospace;
1223 1224 -webkit-user-select: none;
1224 1225 -moz-user-select: none;
1225 1226 user-select: none;
1226 1227
1227 1228 a::before {
1228 1229 content: attr(data-line-no);
1229 1230 }
1230 1231 &.cb-line-selected {
1231 1232 background: @comment-highlight-color !important;
1232 1233 }
1233 1234
1234 1235 a {
1235 1236 display: block;
1236 1237 padding-right: @cb-line-code-padding;
1237 1238 padding-left: @cb-line-code-padding;
1238 1239 line-height: @cb-line-height;
1239 1240 color: rgba(0, 0, 0, 0.3);
1240 1241 }
1241 1242 }
1242 1243
1243 1244 &.cb-empty {
1244 1245 background: @grey7;
1245 1246 }
1246 1247
1247 1248 ins {
1248 1249 color: black;
1249 1250 background: #a6f3a6;
1250 1251 text-decoration: none;
1251 1252 }
1252 1253 del {
1253 1254 color: black;
1254 1255 background: #f8cbcb;
1255 1256 text-decoration: none;
1256 1257 }
1257 1258 &.cb-addition {
1258 1259 background: #ecffec;
1259 1260
1260 1261 &.blob-lineno {
1261 1262 background: #ddffdd;
1262 1263 }
1263 1264 }
1264 1265 &.cb-deletion {
1265 1266 background: #ffecec;
1266 1267
1267 1268 &.blob-lineno {
1268 1269 background: #ffdddd;
1269 1270 }
1270 1271 }
1271 1272 &.cb-annotate-message-spacer {
1272 1273 width:8px;
1273 1274 padding: 1px 0px 0px 3px;
1274 1275 }
1275 1276 &.cb-annotate-info {
1276 1277 width: 320px;
1277 1278 min-width: 320px;
1278 1279 max-width: 320px;
1279 1280 padding: 5px 2px;
1280 1281 font-size: 13px;
1281 1282
1282 1283 .cb-annotate-message {
1283 1284 padding: 2px 0px 0px 0px;
1284 1285 white-space: pre-line;
1285 1286 overflow: hidden;
1286 1287 }
1287 1288 .rc-user {
1288 1289 float: none;
1289 1290 padding: 0 6px 0 17px;
1290 1291 min-width: unset;
1291 1292 min-height: unset;
1292 1293 }
1293 1294 }
1294 1295
1295 1296 &.cb-annotate-revision {
1296 1297 cursor: pointer;
1297 1298 text-align: right;
1298 1299 padding: 1px 3px 0px 3px;
1299 1300 }
1300 1301 }
1301 1302 }
@@ -1,325 +1,404 b''
1 1 // forms.less
2 2 // For use in RhodeCode applications;
3 3 // see style guide documentation for guidelines.
4 4
5 5 form.rcform {
6 6
7 7 // reset for ie
8 8 // using :not(#ie) prevents older browsers from applying these rules
9 9 input[type="radio"],
10 10 input[type="checkbox"] {
11 11 padding: 0;
12 12 border: none;
13 13 }
14 14 label { display: inline; border:none; padding:0; }
15 15 .label { display: none; }
16 16
17 17 max-width: 940px;
18 18 line-height: normal;
19 19 white-space: normal;
20 20 font-size: @basefontsize;
21 21 font-family: @text-light;
22 22 color: @form-textcolor;
23 23
24 24 fieldset,
25 25 .buttons {
26 26 clear: both;
27 27 position: relative;
28 28 display:block;
29 29 width: 100%;
30 30 min-height: 3em;
31 31 margin-bottom: @form-vertical-margin;
32 32 line-height: 1.2em;
33 33
34 34 &:after { //clearfix
35 35 content: "";
36 36 clear: both;
37 37 width: 100%;
38 38 height: 1em;
39 39 }
40 40
41 41 .label:not(#ie) {
42 42 display: inline;
43 43 margin: 0 1em 0 .5em;
44 44 line-height: 1em;
45 45 }
46 46 }
47 47
48 48 legend {
49 49 float: left;
50 50 display: block;
51 51 width: @legend-width;
52 52 margin: 0;
53 53 padding: 0 @padding 0 0;
54 54 }
55 55
56 56 .fields {
57 57 float: left;
58 58 display: block;
59 59 width: 100%;
60 60 max-width: 500px;
61 61 margin: 0 0 @padding -@legend-width;
62 62 padding: 0 0 0 @legend-width;
63 63
64 64 .btn {
65 65 display: inline-block;
66 66 margin: 0 1em @padding 0;
67 67 }
68 68 }
69 69
70 70 input,
71 71 textarea {
72 72 float: left;
73 73 .box-sizing(content-box);
74 74 padding: @input-padding;
75 75 border: @border-thickness-inputs solid @grey4;
76 76 }
77 77
78 78 input {
79 79 float: left;
80 80 margin: 0 @input-padding 0 0;
81 81 line-height: 1em;
82 82 }
83 83
84 84 input[type="text"],
85 85 input[type="password"],
86 86 textarea {
87 87 float: left;
88 88 min-width: 200px;
89 89 margin: 0 1em @padding 0;
90 90 color: @form-textcolor;
91 91 }
92 92
93 93 input[type="text"],
94 94 input[type="password"] {
95 95 height: 1em;
96 96 }
97 97
98 98 textarea {
99 99 width: 100%;
100 100 margin-top: -1em; //so it lines up with legend
101 101 overflow: auto;
102 102 }
103 103
104 104 label:not(#ie) {
105 105 cursor: pointer;
106 106 display: inline-block;
107 107 position: relative;
108 108 background: white;
109 109 border-radius: 4px;
110 110 box-shadow: none;
111 111
112 112 &:hover::after {
113 113 opacity: 0.5;
114 114 }
115 115 }
116 116
117 117 input[type="radio"]:not(#ie),
118 118 input[type="checkbox"]:not(#ie) {
119 119 // Hide the input, but have it still be clickable
120 120 opacity: 0;
121 121 float: left;
122 122 height: 0;
123 123 width: 0;
124 124 margin: 0;
125 125 padding: 0;
126 126 }
127 127 input[type='radio'] + label:not(#ie),
128 128 input[type='checkbox'] + label:not(#ie) {
129 129 margin: 0;
130 130 clear: none;
131 131 }
132 132
133 133 input[type='radio'] + label:not(#ie) {
134 134 .circle (@form-radio-width,white);
135 135 float: left;
136 136 display: inline-block;
137 137 height: @form-radio-width;
138 138 width: @form-radio-width;
139 139 margin: 2px 6px 2px 0;
140 140 border: 1px solid @grey4;
141 141 background-color: white;
142 142 box-shadow: none;
143 143 text-indent: -9999px;
144 144 transition: none;
145 145
146 146 & + .label {
147 147 float: left;
148 148 margin-top: 7px
149 149 }
150 150 }
151 151
152 152 input[type='radio']:checked + label:not(#ie) {
153 153 margin: 0 4px 0 -2px;
154 154 padding: 3px;
155 155 border-style: double;
156 156 border-color: white;
157 157 border-width: thick;
158 158 background-color: @rcblue;
159 159 box-shadow: none;
160 160 }
161 161
162 162 input[type='checkbox'] + label:not(#ie) {
163 163 float: left;
164 164 width: @form-check-width;
165 165 height: @form-check-width;
166 166 margin: 0 5px 1em 0;
167 167 border: 1px solid @grey3;
168 168 .border-radius(@border-radius);
169 169 background-color: white;
170 170 box-shadow: none;
171 171 text-indent: -9999px;
172 172 transition: none;
173 173
174 174 &:after {
175 175 content: '';
176 176 width: 9px;
177 177 height: 5px;
178 178 position: absolute;
179 179 top: 4px;
180 180 left: 4px;
181 181 border: 3px solid @grey3;
182 182 border-top: none;
183 183 border-right: none;
184 184 background: transparent;
185 185 opacity: 0;
186 186 transform: rotate(-45deg);
187 187 filter: progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476); /* IE6,IE7 */
188 188
189 189 -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=-0.7071067811865475, M21=0.7071067811865475, M22=0.7071067811865476)"; /* IE8 */ }
190 190
191 191 & + .label {
192 192 float: left;
193 193 margin-top: 5px
194 194 }
195 195 }
196 196
197 197 input[type=checkbox]:not(#ie) {
198 198 visibility: hidden;
199 199 &:checked + label:after {
200 200 opacity: 1;
201 201 }
202 202 }
203 203
204 204 // center checkbox and label on a drop-down
205 205 .drop-menu + select + input[type='checkbox'] + label:not(#ie) {
206 206 margin-top:10px;
207 207
208 208 & + .label {
209 209 margin-top: 15px;
210 210 }
211 211 }
212 212
213 213 .formlist {
214 214 position: relative;
215 215 float: left;
216 216 margin: 0;
217 217 padding: 0;
218 218
219 219 li {
220 220 list-style-type: none;
221 221
222 222 &:after {
223 223 content: "";
224 224 float: left;
225 225 display: block;
226 226 height: @padding;
227 227 width: 100%;
228 228 }
229 229 }
230 230 }
231 231
232 232 .drop-menu {
233 233 float: left;
234 234
235 235 & + .last-item {
236 236 margin: 0;
237 237 }
238 238
239 239 margin: 0 @input-padding 0 0;
240 240 }
241 241
242 242 .help-block,
243 243 .error-message {
244 244 display: block;
245 245 clear: both;
246 246 margin: @textmargin 0;
247 247 }
248 248
249 249 .error-message {
250 250 margin-top: 5px;
251 251 }
252 252
253 253 input[type=submit] {
254 254 &:extend(.btn-primary);
255 255
256 256 &:hover {
257 257 &:extend(.btn-primary:hover);
258 258 }
259 259 }
260 260
261 261 input[type=reset] {
262 262 &:extend(.btn-default);
263 263
264 264 &:hover {
265 265 &:extend(.btn-default:hover);
266 266 }
267 267 }
268 268
269 269 select,
270 270 option:checked {
271 271 background-color: @rclightblue;
272 272 }
273 273
274 274 }
275 275
276 .rcform-element {
277
278 label { display: inline; border:none; padding:0; }
279 .label { display: none; }
280
281 label:not(#ie) {
282 cursor: pointer;
283 display: inline-block;
284 position: relative;
285 background: white;
286 border-radius: 4px;
287 box-shadow: none;
288
289 &:hover::after {
290 opacity: 0.5;
291 }
292 }
293
294 input[type="radio"],
295 input[type="checkbox"] {
296 padding: 0;
297 border: none;
298 }
299
300 input[type="radio"]:not(#ie),
301 input[type="checkbox"]:not(#ie) {
302 // Hide the input, but have it still be clickable
303 opacity: 0;
304 float: left;
305 height: 0;
306 width: 0;
307 margin: 0;
308 padding: 0;
309 }
310 input[type='radio'] + label:not(#ie),
311 input[type='checkbox'] + label:not(#ie) {
312 margin: 0;
313 clear: none;
314 }
315
316 input[type='radio'] + label:not(#ie) {
317 .circle (@form-radio-width,white);
318 float: left;
319 display: inline-block;
320 height: @form-radio-width;
321 width: @form-radio-width;
322 margin: 2px 2px 2px 0;
323 border: 1px solid @grey4;
324 background-color: white;
325 box-shadow: none;
326 text-indent: -9999px;
327 transition: none;
328
329 & + .label {
330 float: left;
331 margin-top: 7px
332 }
333 }
334
335 input[type='radio']:checked + label:not(#ie) {
336 margin: 0 0px 0 -2px;
337 padding: 3px;
338 border-style: double;
339 border-color: white;
340 border-width: thick;
341 background-color: @rcblue;
342 box-shadow: none;
343 }
344
345 fieldset {
346 .label:not(#ie) {
347 display: inline;
348 margin: 0 1em 0 .5em;
349 line-height: 1em;
350 }
351 }
352
353 }
354
276 355 .badged-field {
277 356 .user-badge {
278 357 line-height: 25px;
279 358 padding: .4em;
280 359 border-radius: @border-radius;
281 360 border-top: 1px solid @grey4;
282 361 border-left: 1px solid @grey4;
283 362 border-bottom: 1px solid @grey4;
284 363 font-size: 14px;
285 364 font-style: normal;
286 365 color: @text-light;
287 366 background: @grey7;
288 367 display: inline-block;
289 368 vertical-align: top;
290 369 cursor: default;
291 370 margin-right: -2px;
292 371 }
293 372 .badge-input-container {
294 373 display: flex;
295 374 position: relative;
296 375 }
297 376 .user-disabled {
298 377 text-decoration: line-through;
299 378 }
300 379 .badge-input-wrap {
301 380 display: inline-block;
302 381 }
303 382 }
304 383
305 384 // for situations where we wish to display the form value but not the form input
306 385 input.input-valuedisplay {
307 386 border: none;
308 387 }
309 388
310 389 // for forms which only display information
311 390 .infoform {
312 391 .fields {
313 392 .field {
314 393 label,
315 394 .label,
316 395 input,
317 396 .input {
318 397 margin-top: 0;
319 398 margin-bottom: 0;
320 399 padding-top: 0;
321 400 padding-bottom: 0;
322 401 }
323 402 }
324 403 }
325 404 }
@@ -1,2911 +1,2921 b''
1 1 //Primary CSS
2 2
3 3 //--- IMPORTS ------------------//
4 4
5 5 @import 'helpers';
6 6 @import 'mixins';
7 7 @import 'rcicons';
8 8 @import 'variables';
9 9 @import 'bootstrap-variables';
10 10 @import 'form-bootstrap';
11 11 @import 'codemirror';
12 12 @import 'legacy_code_styles';
13 13 @import 'readme-box';
14 14 @import 'progress-bar';
15 15
16 16 @import 'type';
17 17 @import 'alerts';
18 18 @import 'buttons';
19 19 @import 'tags';
20 20 @import 'code-block';
21 21 @import 'examples';
22 22 @import 'login';
23 23 @import 'main-content';
24 24 @import 'select2';
25 25 @import 'comments';
26 26 @import 'panels-bootstrap';
27 27 @import 'panels';
28 28 @import 'deform';
29 29 @import 'tooltips';
30 30
31 31 //--- BASE ------------------//
32 32 .noscript-error {
33 33 top: 0;
34 34 left: 0;
35 35 width: 100%;
36 36 z-index: 101;
37 37 text-align: center;
38 38 font-size: 120%;
39 39 color: white;
40 40 background-color: @alert2;
41 41 padding: 5px 0 5px 0;
42 42 font-weight: @text-semibold-weight;
43 43 font-family: @text-semibold;
44 44 }
45 45
46 46 html {
47 47 display: table;
48 48 height: 100%;
49 49 width: 100%;
50 50 }
51 51
52 52 body {
53 53 display: table-cell;
54 54 width: 100%;
55 55 }
56 56
57 57 //--- LAYOUT ------------------//
58 58
59 59 .hidden{
60 60 display: none !important;
61 61 }
62 62
63 63 .box{
64 64 float: left;
65 65 width: 100%;
66 66 }
67 67
68 68 .browser-header {
69 69 clear: both;
70 70 }
71 71 .main {
72 72 clear: both;
73 73 padding:0 0 @pagepadding;
74 74 height: auto;
75 75
76 76 &:after { //clearfix
77 77 content:"";
78 78 clear:both;
79 79 width:100%;
80 80 display:block;
81 81 }
82 82 }
83 83
84 84 .action-link{
85 85 margin-left: @padding;
86 86 padding-left: @padding;
87 87 border-left: @border-thickness solid @border-default-color;
88 88 }
89 89
90 90 input + .action-link, .action-link.first{
91 91 border-left: none;
92 92 }
93 93
94 94 .action-link.last{
95 95 margin-right: @padding;
96 96 padding-right: @padding;
97 97 }
98 98
99 99 .action-link.active,
100 100 .action-link.active a{
101 101 color: @grey4;
102 102 }
103 103
104 104 .action-link.disabled {
105 105 color: @grey4;
106 106 cursor: inherit;
107 107 }
108 108
109 109 .clipboard-action {
110 110 cursor: pointer;
111 111 color: @grey4;
112 112 margin-left: 5px;
113 113
114 114 &:hover {
115 115 color: @grey2;
116 116 }
117 117 }
118 118
119 119 ul.simple-list{
120 120 list-style: none;
121 121 margin: 0;
122 122 padding: 0;
123 123 }
124 124
125 125 .main-content {
126 126 padding-bottom: @pagepadding;
127 127 }
128 128
129 129 .wide-mode-wrapper {
130 130 max-width:4000px !important;
131 131 }
132 132
133 133 .wrapper {
134 134 position: relative;
135 135 max-width: @wrapper-maxwidth;
136 136 margin: 0 auto;
137 137 }
138 138
139 139 #content {
140 140 clear: both;
141 141 padding: 0 @contentpadding;
142 142 }
143 143
144 144 .advanced-settings-fields{
145 145 input{
146 146 margin-left: @textmargin;
147 147 margin-right: @padding/2;
148 148 }
149 149 }
150 150
151 151 .cs_files_title {
152 152 margin: @pagepadding 0 0;
153 153 }
154 154
155 155 input.inline[type="file"] {
156 156 display: inline;
157 157 }
158 158
159 159 .error_page {
160 160 margin: 10% auto;
161 161
162 162 h1 {
163 163 color: @grey2;
164 164 }
165 165
166 166 .alert {
167 167 margin: @padding 0;
168 168 }
169 169
170 170 .error-branding {
171 171 color: @grey4;
172 172 font-weight: @text-semibold-weight;
173 173 font-family: @text-semibold;
174 174 }
175 175
176 176 .error_message {
177 177 font-family: @text-regular;
178 178 }
179 179
180 180 .sidebar {
181 181 min-height: 275px;
182 182 margin: 0;
183 183 padding: 0 0 @sidebarpadding @sidebarpadding;
184 184 border: none;
185 185 }
186 186
187 187 .main-content {
188 188 position: relative;
189 189 margin: 0 @sidebarpadding @sidebarpadding;
190 190 padding: 0 0 0 @sidebarpadding;
191 191 border-left: @border-thickness solid @grey5;
192 192
193 193 @media (max-width:767px) {
194 194 clear: both;
195 195 width: 100%;
196 196 margin: 0;
197 197 border: none;
198 198 }
199 199 }
200 200
201 201 .inner-column {
202 202 float: left;
203 203 width: 29.75%;
204 204 min-height: 150px;
205 205 margin: @sidebarpadding 2% 0 0;
206 206 padding: 0 2% 0 0;
207 207 border-right: @border-thickness solid @grey5;
208 208
209 209 @media (max-width:767px) {
210 210 clear: both;
211 211 width: 100%;
212 212 border: none;
213 213 }
214 214
215 215 ul {
216 216 padding-left: 1.25em;
217 217 }
218 218
219 219 &:last-child {
220 220 margin: @sidebarpadding 0 0;
221 221 border: none;
222 222 }
223 223
224 224 h4 {
225 225 margin: 0 0 @padding;
226 226 font-weight: @text-semibold-weight;
227 227 font-family: @text-semibold;
228 228 }
229 229 }
230 230 }
231 231 .error-page-logo {
232 232 width: 130px;
233 233 height: 160px;
234 234 }
235 235
236 236 // HEADER
237 237 .header {
238 238
239 239 // TODO: johbo: Fix login pages, so that they work without a min-height
240 240 // for the header and then remove the min-height. I chose a smaller value
241 241 // intentionally here to avoid rendering issues in the main navigation.
242 242 min-height: 49px;
243 243 min-width: 1024px;
244 244
245 245 position: relative;
246 246 vertical-align: bottom;
247 247 padding: 0 @header-padding;
248 248 background-color: @grey1;
249 249 color: @grey5;
250 250
251 251 .title {
252 252 overflow: visible;
253 253 }
254 254
255 255 &:before,
256 256 &:after {
257 257 content: "";
258 258 clear: both;
259 259 width: 100%;
260 260 }
261 261
262 262 // TODO: johbo: Avoids breaking "Repositories" chooser
263 263 .select2-container .select2-choice .select2-arrow {
264 264 display: none;
265 265 }
266 266 }
267 267
268 268 #header-inner {
269 269 &.title {
270 270 margin: 0;
271 271 }
272 272 &:before,
273 273 &:after {
274 274 content: "";
275 275 clear: both;
276 276 }
277 277 }
278 278
279 279 // Gists
280 280 #files_data {
281 281 clear: both; //for firefox
282 282 padding-top: 10px;
283 283 }
284 284
285 285 #gistid {
286 286 margin-right: @padding;
287 287 }
288 288
289 289 // Global Settings Editor
290 290 .textarea.editor {
291 291 float: left;
292 292 position: relative;
293 293 max-width: @texteditor-width;
294 294
295 295 select {
296 296 position: absolute;
297 297 top:10px;
298 298 right:0;
299 299 }
300 300
301 301 .CodeMirror {
302 302 margin: 0;
303 303 }
304 304
305 305 .help-block {
306 306 margin: 0 0 @padding;
307 307 padding:.5em;
308 308 background-color: @grey6;
309 309 &.pre-formatting {
310 310 white-space: pre;
311 311 }
312 312 }
313 313 }
314 314
315 315 ul.auth_plugins {
316 316 margin: @padding 0 @padding @legend-width;
317 317 padding: 0;
318 318
319 319 li {
320 320 margin-bottom: @padding;
321 321 line-height: 1em;
322 322 list-style-type: none;
323 323
324 324 .auth_buttons .btn {
325 325 margin-right: @padding;
326 326 }
327 327
328 328 }
329 329 }
330 330
331 331
332 332 // My Account PR list
333 333
334 334 #show_closed {
335 335 margin: 0 1em 0 0;
336 336 }
337 337
338 338 #pull_request_list_table {
339 339 .closed {
340 340 background-color: @grey6;
341 341 }
342 342
343 343 .state-creating,
344 344 .state-updating,
345 345 .state-merging
346 346 {
347 347 background-color: @grey6;
348 348 }
349 349
350 350 .td-status {
351 351 padding-left: .5em;
352 352 }
353 353 .log-container .truncate {
354 354 height: 2.75em;
355 355 white-space: pre-line;
356 356 }
357 357 table.rctable .user {
358 358 padding-left: 0;
359 359 }
360 360 table.rctable {
361 361 td.td-description,
362 362 .rc-user {
363 363 min-width: auto;
364 364 }
365 365 }
366 366 }
367 367
368 368 // Pull Requests
369 369
370 370 .pullrequests_section_head {
371 371 display: block;
372 372 clear: both;
373 373 margin: @padding 0;
374 374 font-weight: @text-bold-weight;
375 375 font-family: @text-bold;
376 376 }
377 377
378 378 .pr-origininfo, .pr-targetinfo {
379 379 position: relative;
380 380
381 381 .tag {
382 382 display: inline-block;
383 383 margin: 0 1em .5em 0;
384 384 }
385 385
386 386 .clone-url {
387 387 display: inline-block;
388 388 margin: 0 0 .5em 0;
389 389 padding: 0;
390 390 line-height: 1.2em;
391 391 }
392 392 }
393 393
394 394 .pr-mergeinfo {
395 395 min-width: 95% !important;
396 396 padding: 0 !important;
397 397 border: 0;
398 398 }
399 399 .pr-mergeinfo-copy {
400 400 padding: 0 0;
401 401 }
402 402
403 403 .pr-pullinfo {
404 404 min-width: 95% !important;
405 405 padding: 0 !important;
406 406 border: 0;
407 407 }
408 408 .pr-pullinfo-copy {
409 409 padding: 0 0;
410 410 }
411 411
412 412
413 413 #pr-title-input {
414 414 width: 72%;
415 415 font-size: 1em;
416 416 margin: 0;
417 417 padding: 0 0 0 @padding/4;
418 418 line-height: 1.7em;
419 419 color: @text-color;
420 420 letter-spacing: .02em;
421 421 font-weight: @text-bold-weight;
422 422 font-family: @text-bold;
423 423 }
424 424
425 425 #pullrequest_title {
426 426 width: 100%;
427 427 box-sizing: border-box;
428 428 }
429 429
430 430 #pr_open_message {
431 431 border: @border-thickness solid #fff;
432 432 border-radius: @border-radius;
433 433 padding: @padding-large-vertical @padding-large-vertical @padding-large-vertical 0;
434 434 text-align: left;
435 435 overflow: hidden;
436 436 }
437 437
438 438 .pr-submit-button {
439 439 float: right;
440 440 margin: 0 0 0 5px;
441 441 }
442 442
443 443 .pr-spacing-container {
444 444 padding: 20px;
445 445 clear: both
446 446 }
447 447
448 448 #pr-description-input {
449 449 margin-bottom: 0;
450 450 }
451 451
452 452 .pr-description-label {
453 453 vertical-align: top;
454 454 }
455 455
456 456 .perms_section_head {
457 457 min-width: 625px;
458 458
459 459 h2 {
460 460 margin-bottom: 0;
461 461 }
462 462
463 463 .label-checkbox {
464 464 float: left;
465 465 }
466 466
467 467 &.field {
468 468 margin: @space 0 @padding;
469 469 }
470 470
471 471 &:first-child.field {
472 472 margin-top: 0;
473 473
474 474 .label {
475 475 margin-top: 0;
476 476 padding-top: 0;
477 477 }
478 478
479 479 .radios {
480 480 padding-top: 0;
481 481 }
482 482 }
483 483
484 484 .radios {
485 485 position: relative;
486 486 width: 505px;
487 487 }
488 488 }
489 489
490 490 //--- MODULES ------------------//
491 491
492 492
493 493 // Server Announcement
494 494 #server-announcement {
495 495 width: 95%;
496 496 margin: @padding auto;
497 497 padding: @padding;
498 498 border-width: 2px;
499 499 border-style: solid;
500 500 .border-radius(2px);
501 501 font-weight: @text-bold-weight;
502 502 font-family: @text-bold;
503 503
504 504 &.info { border-color: @alert4; background-color: @alert4-inner; }
505 505 &.warning { border-color: @alert3; background-color: @alert3-inner; }
506 506 &.error { border-color: @alert2; background-color: @alert2-inner; }
507 507 &.success { border-color: @alert1; background-color: @alert1-inner; }
508 508 &.neutral { border-color: @grey3; background-color: @grey6; }
509 509 }
510 510
511 511 // Fixed Sidebar Column
512 512 .sidebar-col-wrapper {
513 513 padding-left: @sidebar-all-width;
514 514
515 515 .sidebar {
516 516 width: @sidebar-width;
517 517 margin-left: -@sidebar-all-width;
518 518 }
519 519 }
520 520
521 521 .sidebar-col-wrapper.scw-small {
522 522 padding-left: @sidebar-small-all-width;
523 523
524 524 .sidebar {
525 525 width: @sidebar-small-width;
526 526 margin-left: -@sidebar-small-all-width;
527 527 }
528 528 }
529 529
530 530
531 531 // FOOTER
532 532 #footer {
533 533 padding: 0;
534 534 text-align: center;
535 535 vertical-align: middle;
536 536 color: @grey2;
537 537 font-size: 11px;
538 538
539 539 p {
540 540 margin: 0;
541 541 padding: 1em;
542 542 line-height: 1em;
543 543 }
544 544
545 545 .server-instance { //server instance
546 546 display: none;
547 547 }
548 548
549 549 .title {
550 550 float: none;
551 551 margin: 0 auto;
552 552 }
553 553 }
554 554
555 555 button.close {
556 556 padding: 0;
557 557 cursor: pointer;
558 558 background: transparent;
559 559 border: 0;
560 560 .box-shadow(none);
561 561 -webkit-appearance: none;
562 562 }
563 563
564 564 .close {
565 565 float: right;
566 566 font-size: 21px;
567 567 font-family: @text-bootstrap;
568 568 line-height: 1em;
569 569 font-weight: bold;
570 570 color: @grey2;
571 571
572 572 &:hover,
573 573 &:focus {
574 574 color: @grey1;
575 575 text-decoration: none;
576 576 cursor: pointer;
577 577 }
578 578 }
579 579
580 580 // GRID
581 581 .sorting,
582 582 .sorting_desc,
583 583 .sorting_asc {
584 584 cursor: pointer;
585 585 }
586 586 .sorting_desc:after {
587 587 content: "\00A0\25B2";
588 588 font-size: .75em;
589 589 }
590 590 .sorting_asc:after {
591 591 content: "\00A0\25BC";
592 592 font-size: .68em;
593 593 }
594 594
595 595
596 596 .user_auth_tokens {
597 597
598 598 &.truncate {
599 599 white-space: nowrap;
600 600 overflow: hidden;
601 601 text-overflow: ellipsis;
602 602 }
603 603
604 604 .fields .field .input {
605 605 margin: 0;
606 606 }
607 607
608 608 input#description {
609 609 width: 100px;
610 610 margin: 0;
611 611 }
612 612
613 613 .drop-menu {
614 614 // TODO: johbo: Remove this, should work out of the box when
615 615 // having multiple inputs inline
616 616 margin: 0 0 0 5px;
617 617 }
618 618 }
619 619 #user_list_table {
620 620 .closed {
621 621 background-color: @grey6;
622 622 }
623 623 }
624 624
625 625
626 626 input, textarea {
627 627 &.disabled {
628 628 opacity: .5;
629 629 }
630 630
631 631 &:hover {
632 632 border-color: @grey3;
633 633 box-shadow: @button-shadow;
634 634 }
635 635
636 636 &:focus {
637 637 border-color: @rcblue;
638 638 box-shadow: @button-shadow;
639 639 }
640 640 }
641 641
642 642 // remove extra padding in firefox
643 643 input::-moz-focus-inner { border:0; padding:0 }
644 644
645 645 .adjacent input {
646 646 margin-bottom: @padding;
647 647 }
648 648
649 649 .permissions_boxes {
650 650 display: block;
651 651 }
652 652
653 653 //FORMS
654 654
655 655 .medium-inline,
656 656 input#description.medium-inline {
657 657 display: inline;
658 658 width: @medium-inline-input-width;
659 659 min-width: 100px;
660 660 }
661 661
662 662 select {
663 663 //reset
664 664 -webkit-appearance: none;
665 665 -moz-appearance: none;
666 666
667 667 display: inline-block;
668 668 height: 28px;
669 669 width: auto;
670 670 margin: 0 @padding @padding 0;
671 671 padding: 0 18px 0 8px;
672 672 line-height:1em;
673 673 font-size: @basefontsize;
674 674 border: @border-thickness solid @grey5;
675 675 border-radius: @border-radius;
676 676 background:white url("../images/dt-arrow-dn.png") no-repeat 100% 50%;
677 677 color: @grey4;
678 678 box-shadow: @button-shadow;
679 679
680 680 &:after {
681 681 content: "\00A0\25BE";
682 682 }
683 683
684 684 &:focus, &:hover {
685 685 outline: none;
686 686 border-color: @grey4;
687 687 color: @rcdarkblue;
688 688 }
689 689 }
690 690
691 691 option {
692 692 &:focus {
693 693 outline: none;
694 694 }
695 695 }
696 696
697 697 input,
698 698 textarea {
699 699 padding: @input-padding;
700 700 border: @input-border-thickness solid @border-highlight-color;
701 701 .border-radius (@border-radius);
702 702 font-family: @text-light;
703 703 font-size: @basefontsize;
704 704
705 705 &.input-sm {
706 706 padding: 5px;
707 707 }
708 708
709 709 &#description {
710 710 min-width: @input-description-minwidth;
711 711 min-height: 1em;
712 712 padding: 10px;
713 713 }
714 714 }
715 715
716 716 .field-sm {
717 717 input,
718 718 textarea {
719 719 padding: 5px;
720 720 }
721 721 }
722 722
723 723 textarea {
724 724 display: block;
725 725 clear: both;
726 726 width: 100%;
727 727 min-height: 100px;
728 728 margin-bottom: @padding;
729 729 .box-sizing(border-box);
730 730 overflow: auto;
731 731 }
732 732
733 733 label {
734 734 font-family: @text-light;
735 735 }
736 736
737 737 // GRAVATARS
738 738 // centers gravatar on username to the right
739 739
740 740 .gravatar {
741 741 display: inline;
742 742 min-width: 16px;
743 743 min-height: 16px;
744 744 margin: -5px 0;
745 745 padding: 0;
746 746 line-height: 1em;
747 747 box-sizing: content-box;
748 748 border-radius: 50%;
749 749
750 750 &.gravatar-large {
751 751 margin: -0.5em .25em -0.5em 0;
752 752 }
753 753
754 754 & + .user {
755 755 display: inline;
756 756 margin: 0;
757 757 padding: 0 0 0 .17em;
758 758 line-height: 1em;
759 759 }
760 760 }
761 761
762 762 .user-inline-data {
763 763 display: inline-block;
764 764 float: left;
765 765 padding-left: .5em;
766 766 line-height: 1.3em;
767 767 }
768 768
769 769 .rc-user { // gravatar + user wrapper
770 770 float: left;
771 771 position: relative;
772 772 min-width: 100px;
773 773 max-width: 200px;
774 774 min-height: (@gravatar-size + @border-thickness * 2); // account for border
775 775 display: block;
776 776 padding: 0 0 0 (@gravatar-size + @basefontsize/2 + @border-thickness * 2);
777 777
778 778
779 779 .gravatar {
780 780 display: block;
781 781 position: absolute;
782 782 top: 0;
783 783 left: 0;
784 784 min-width: @gravatar-size;
785 785 min-height: @gravatar-size;
786 786 margin: 0;
787 787 }
788 788
789 789 .user {
790 790 display: block;
791 791 max-width: 175px;
792 792 padding-top: 2px;
793 793 overflow: hidden;
794 794 text-overflow: ellipsis;
795 795 }
796 796 }
797 797
798 798 .gist-gravatar,
799 799 .journal_container {
800 800 .gravatar-large {
801 801 margin: 0 .5em -10px 0;
802 802 }
803 803 }
804 804
805 .gist-type-fields {
806 line-height: 30px;
807 height: 30px;
808
809 .gist-type-fields-wrapper {
810 vertical-align: middle;
811 display: inline-block;
812 line-height: 25px;
813 }
814 }
805 815
806 816 // ADMIN SETTINGS
807 817
808 818 // Tag Patterns
809 819 .tag_patterns {
810 820 .tag_input {
811 821 margin-bottom: @padding;
812 822 }
813 823 }
814 824
815 825 .locked_input {
816 826 position: relative;
817 827
818 828 input {
819 829 display: inline;
820 830 margin: 3px 5px 0px 0px;
821 831 }
822 832
823 833 br {
824 834 display: none;
825 835 }
826 836
827 837 .error-message {
828 838 float: left;
829 839 width: 100%;
830 840 }
831 841
832 842 .lock_input_button {
833 843 display: inline;
834 844 }
835 845
836 846 .help-block {
837 847 clear: both;
838 848 }
839 849 }
840 850
841 851 // Notifications
842 852
843 853 .notifications_buttons {
844 854 margin: 0 0 @space 0;
845 855 padding: 0;
846 856
847 857 .btn {
848 858 display: inline-block;
849 859 }
850 860 }
851 861
852 862 .notification-list {
853 863
854 864 div {
855 865 vertical-align: middle;
856 866 }
857 867
858 868 .container {
859 869 display: block;
860 870 margin: 0 0 @padding 0;
861 871 }
862 872
863 873 .delete-notifications {
864 874 margin-left: @padding;
865 875 text-align: right;
866 876 cursor: pointer;
867 877 }
868 878
869 879 .read-notifications {
870 880 margin-left: @padding/2;
871 881 text-align: right;
872 882 width: 35px;
873 883 cursor: pointer;
874 884 }
875 885
876 886 .icon-minus-sign {
877 887 color: @alert2;
878 888 }
879 889
880 890 .icon-ok-sign {
881 891 color: @alert1;
882 892 }
883 893 }
884 894
885 895 .user_settings {
886 896 float: left;
887 897 clear: both;
888 898 display: block;
889 899 width: 100%;
890 900
891 901 .gravatar_box {
892 902 margin-bottom: @padding;
893 903
894 904 &:after {
895 905 content: " ";
896 906 clear: both;
897 907 width: 100%;
898 908 }
899 909 }
900 910
901 911 .fields .field {
902 912 clear: both;
903 913 }
904 914 }
905 915
906 916 .advanced_settings {
907 917 margin-bottom: @space;
908 918
909 919 .help-block {
910 920 margin-left: 0;
911 921 }
912 922
913 923 button + .help-block {
914 924 margin-top: @padding;
915 925 }
916 926 }
917 927
918 928 // admin settings radio buttons and labels
919 929 .label-2 {
920 930 float: left;
921 931 width: @label2-width;
922 932
923 933 label {
924 934 color: @grey1;
925 935 }
926 936 }
927 937 .checkboxes {
928 938 float: left;
929 939 width: @checkboxes-width;
930 940 margin-bottom: @padding;
931 941
932 942 .checkbox {
933 943 width: 100%;
934 944
935 945 label {
936 946 margin: 0;
937 947 padding: 0;
938 948 }
939 949 }
940 950
941 951 .checkbox + .checkbox {
942 952 display: inline-block;
943 953 }
944 954
945 955 label {
946 956 margin-right: 1em;
947 957 }
948 958 }
949 959
950 960 // CHANGELOG
951 961 .container_header {
952 962 float: left;
953 963 display: block;
954 964 width: 100%;
955 965 margin: @padding 0 @padding;
956 966
957 967 #filter_changelog {
958 968 float: left;
959 969 margin-right: @padding;
960 970 }
961 971
962 972 .breadcrumbs_light {
963 973 display: inline-block;
964 974 }
965 975 }
966 976
967 977 .info_box {
968 978 float: right;
969 979 }
970 980
971 981
972 982
973 983 #graph_content{
974 984
975 985 // adjust for table headers so that graph renders properly
976 986 // #graph_nodes padding - table cell padding
977 987 padding-top: (@space - (@basefontsize * 2.4));
978 988
979 989 &.graph_full_width {
980 990 width: 100%;
981 991 max-width: 100%;
982 992 }
983 993 }
984 994
985 995 #graph {
986 996
987 997 .pagination-left {
988 998 float: left;
989 999 clear: both;
990 1000 }
991 1001
992 1002 .log-container {
993 1003 max-width: 345px;
994 1004
995 1005 .message{
996 1006 max-width: 340px;
997 1007 }
998 1008 }
999 1009
1000 1010 .graph-col-wrapper {
1001 1011
1002 1012 #graph_nodes {
1003 1013 width: 100px;
1004 1014 position: absolute;
1005 1015 left: 70px;
1006 1016 z-index: -1;
1007 1017 }
1008 1018 }
1009 1019
1010 1020 .load-more-commits {
1011 1021 text-align: center;
1012 1022 }
1013 1023 .load-more-commits:hover {
1014 1024 background-color: @grey7;
1015 1025 }
1016 1026 .load-more-commits {
1017 1027 a {
1018 1028 display: block;
1019 1029 }
1020 1030 }
1021 1031 }
1022 1032
1023 1033 .obsolete-toggle {
1024 1034 line-height: 30px;
1025 1035 margin-left: -15px;
1026 1036 }
1027 1037
1028 1038 #rev_range_container, #rev_range_clear, #rev_range_more {
1029 1039 margin-top: -5px;
1030 1040 margin-bottom: -5px;
1031 1041 }
1032 1042
1033 1043 #filter_changelog {
1034 1044 float: left;
1035 1045 }
1036 1046
1037 1047
1038 1048 //--- THEME ------------------//
1039 1049
1040 1050 #logo {
1041 1051 float: left;
1042 1052 margin: 9px 0 0 0;
1043 1053
1044 1054 .header {
1045 1055 background-color: transparent;
1046 1056 }
1047 1057
1048 1058 a {
1049 1059 display: inline-block;
1050 1060 }
1051 1061
1052 1062 img {
1053 1063 height:30px;
1054 1064 }
1055 1065 }
1056 1066
1057 1067 .logo-wrapper {
1058 1068 float:left;
1059 1069 }
1060 1070
1061 1071 .branding {
1062 1072 float: left;
1063 1073 padding: 9px 2px;
1064 1074 line-height: 1em;
1065 1075 font-size: @navigation-fontsize;
1066 1076
1067 1077 a {
1068 1078 color: @grey5
1069 1079 }
1070 1080 @media screen and (max-width: 1200px) {
1071 1081 display: none;
1072 1082 }
1073 1083 }
1074 1084
1075 1085 img {
1076 1086 border: none;
1077 1087 outline: none;
1078 1088 }
1079 1089 user-profile-header
1080 1090 label {
1081 1091
1082 1092 input[type="checkbox"] {
1083 1093 margin-right: 1em;
1084 1094 }
1085 1095 input[type="radio"] {
1086 1096 margin-right: 1em;
1087 1097 }
1088 1098 }
1089 1099
1090 1100 .review-status {
1091 1101 &.under_review {
1092 1102 color: @alert3;
1093 1103 }
1094 1104 &.approved {
1095 1105 color: @alert1;
1096 1106 }
1097 1107 &.rejected,
1098 1108 &.forced_closed{
1099 1109 color: @alert2;
1100 1110 }
1101 1111 &.not_reviewed {
1102 1112 color: @grey5;
1103 1113 }
1104 1114 }
1105 1115
1106 1116 .review-status-under_review {
1107 1117 color: @alert3;
1108 1118 }
1109 1119 .status-tag-under_review {
1110 1120 border-color: @alert3;
1111 1121 }
1112 1122
1113 1123 .review-status-approved {
1114 1124 color: @alert1;
1115 1125 }
1116 1126 .status-tag-approved {
1117 1127 border-color: @alert1;
1118 1128 }
1119 1129
1120 1130 .review-status-rejected,
1121 1131 .review-status-forced_closed {
1122 1132 color: @alert2;
1123 1133 }
1124 1134 .status-tag-rejected,
1125 1135 .status-tag-forced_closed {
1126 1136 border-color: @alert2;
1127 1137 }
1128 1138
1129 1139 .review-status-not_reviewed {
1130 1140 color: @grey5;
1131 1141 }
1132 1142 .status-tag-not_reviewed {
1133 1143 border-color: @grey5;
1134 1144 }
1135 1145
1136 1146 .test_pattern_preview {
1137 1147 margin: @space 0;
1138 1148
1139 1149 p {
1140 1150 margin-bottom: 0;
1141 1151 border-bottom: @border-thickness solid @border-default-color;
1142 1152 color: @grey3;
1143 1153 }
1144 1154
1145 1155 .btn {
1146 1156 margin-bottom: @padding;
1147 1157 }
1148 1158 }
1149 1159 #test_pattern_result {
1150 1160 display: none;
1151 1161 &:extend(pre);
1152 1162 padding: .9em;
1153 1163 color: @grey3;
1154 1164 background-color: @grey7;
1155 1165 border-right: @border-thickness solid @border-default-color;
1156 1166 border-bottom: @border-thickness solid @border-default-color;
1157 1167 border-left: @border-thickness solid @border-default-color;
1158 1168 }
1159 1169
1160 1170 #repo_vcs_settings {
1161 1171 #inherit_overlay_vcs_default {
1162 1172 display: none;
1163 1173 }
1164 1174 #inherit_overlay_vcs_custom {
1165 1175 display: custom;
1166 1176 }
1167 1177 &.inherited {
1168 1178 #inherit_overlay_vcs_default {
1169 1179 display: block;
1170 1180 }
1171 1181 #inherit_overlay_vcs_custom {
1172 1182 display: none;
1173 1183 }
1174 1184 }
1175 1185 }
1176 1186
1177 1187 .issue-tracker-link {
1178 1188 color: @rcblue;
1179 1189 }
1180 1190
1181 1191 // Issue Tracker Table Show/Hide
1182 1192 #repo_issue_tracker {
1183 1193 #inherit_overlay {
1184 1194 display: none;
1185 1195 }
1186 1196 #custom_overlay {
1187 1197 display: custom;
1188 1198 }
1189 1199 &.inherited {
1190 1200 #inherit_overlay {
1191 1201 display: block;
1192 1202 }
1193 1203 #custom_overlay {
1194 1204 display: none;
1195 1205 }
1196 1206 }
1197 1207 }
1198 1208 table.issuetracker {
1199 1209 &.readonly {
1200 1210 tr, td {
1201 1211 color: @grey3;
1202 1212 }
1203 1213 }
1204 1214 .edit {
1205 1215 display: none;
1206 1216 }
1207 1217 .editopen {
1208 1218 .edit {
1209 1219 display: inline;
1210 1220 }
1211 1221 .entry {
1212 1222 display: none;
1213 1223 }
1214 1224 }
1215 1225 tr td.td-action {
1216 1226 min-width: 117px;
1217 1227 }
1218 1228 td input {
1219 1229 max-width: none;
1220 1230 min-width: 30px;
1221 1231 width: 80%;
1222 1232 }
1223 1233 .issuetracker_pref input {
1224 1234 width: 40%;
1225 1235 }
1226 1236 input.edit_issuetracker_update {
1227 1237 margin-right: 0;
1228 1238 width: auto;
1229 1239 }
1230 1240 }
1231 1241
1232 1242 table.integrations {
1233 1243 .td-icon {
1234 1244 width: 20px;
1235 1245 .integration-icon {
1236 1246 height: 20px;
1237 1247 width: 20px;
1238 1248 }
1239 1249 }
1240 1250 }
1241 1251
1242 1252 .integrations {
1243 1253 a.integration-box {
1244 1254 color: @text-color;
1245 1255 &:hover {
1246 1256 .panel {
1247 1257 background: #fbfbfb;
1248 1258 }
1249 1259 }
1250 1260 .integration-icon {
1251 1261 width: 30px;
1252 1262 height: 30px;
1253 1263 margin-right: 20px;
1254 1264 float: left;
1255 1265 }
1256 1266
1257 1267 .panel-body {
1258 1268 padding: 10px;
1259 1269 }
1260 1270 .panel {
1261 1271 margin-bottom: 10px;
1262 1272 }
1263 1273 h2 {
1264 1274 display: inline-block;
1265 1275 margin: 0;
1266 1276 min-width: 140px;
1267 1277 }
1268 1278 }
1269 1279 a.integration-box.dummy-integration {
1270 1280 color: @grey4
1271 1281 }
1272 1282 }
1273 1283
1274 1284 //Permissions Settings
1275 1285 #add_perm {
1276 1286 margin: 0 0 @padding;
1277 1287 cursor: pointer;
1278 1288 }
1279 1289
1280 1290 .perm_ac {
1281 1291 input {
1282 1292 width: 95%;
1283 1293 }
1284 1294 }
1285 1295
1286 1296 .autocomplete-suggestions {
1287 1297 width: auto !important; // overrides autocomplete.js
1288 1298 min-width: 278px;
1289 1299 margin: 0;
1290 1300 border: @border-thickness solid @grey5;
1291 1301 border-radius: @border-radius;
1292 1302 color: @grey2;
1293 1303 background-color: white;
1294 1304 }
1295 1305
1296 1306 .autocomplete-qfilter-suggestions {
1297 1307 width: auto !important; // overrides autocomplete.js
1298 1308 max-height: 100% !important;
1299 1309 min-width: 376px;
1300 1310 margin: 0;
1301 1311 border: @border-thickness solid @grey5;
1302 1312 color: @grey2;
1303 1313 background-color: white;
1304 1314 }
1305 1315
1306 1316 .autocomplete-selected {
1307 1317 background: #F0F0F0;
1308 1318 }
1309 1319
1310 1320 .ac-container-wrap {
1311 1321 margin: 0;
1312 1322 padding: 8px;
1313 1323 border-bottom: @border-thickness solid @grey5;
1314 1324 list-style-type: none;
1315 1325 cursor: pointer;
1316 1326
1317 1327 &:hover {
1318 1328 background-color: @grey7;
1319 1329 }
1320 1330
1321 1331 img {
1322 1332 height: @gravatar-size;
1323 1333 width: @gravatar-size;
1324 1334 margin-right: 1em;
1325 1335 }
1326 1336
1327 1337 strong {
1328 1338 font-weight: normal;
1329 1339 }
1330 1340 }
1331 1341
1332 1342 // Settings Dropdown
1333 1343 .user-menu .container {
1334 1344 padding: 0 4px;
1335 1345 margin: 0;
1336 1346 }
1337 1347
1338 1348 .user-menu .gravatar {
1339 1349 cursor: pointer;
1340 1350 }
1341 1351
1342 1352 .codeblock {
1343 1353 margin-bottom: @padding;
1344 1354 clear: both;
1345 1355
1346 1356 .stats {
1347 1357 overflow: hidden;
1348 1358 }
1349 1359
1350 1360 .message{
1351 1361 textarea{
1352 1362 margin: 0;
1353 1363 }
1354 1364 }
1355 1365
1356 1366 .code-header {
1357 1367 .stats {
1358 1368 line-height: 2em;
1359 1369
1360 1370 .revision_id {
1361 1371 margin-left: 0;
1362 1372 }
1363 1373 .buttons {
1364 1374 padding-right: 0;
1365 1375 }
1366 1376 }
1367 1377
1368 1378 .item{
1369 1379 margin-right: 0.5em;
1370 1380 }
1371 1381 }
1372 1382
1373 1383 #editor_container {
1374 1384 position: relative;
1375 1385 margin: @padding 10px;
1376 1386 }
1377 1387 }
1378 1388
1379 1389 #file_history_container {
1380 1390 display: none;
1381 1391 }
1382 1392
1383 1393 .file-history-inner {
1384 1394 margin-bottom: 10px;
1385 1395 }
1386 1396
1387 1397 // Pull Requests
1388 1398 .summary-details {
1389 1399 width: 72%;
1390 1400 }
1391 1401 .pr-summary {
1392 1402 border-bottom: @border-thickness solid @grey5;
1393 1403 margin-bottom: @space;
1394 1404 }
1395 1405 .reviewers-title {
1396 1406 width: 25%;
1397 1407 min-width: 200px;
1398 1408 }
1399 1409 .reviewers {
1400 1410 width: 25%;
1401 1411 min-width: 200px;
1402 1412 }
1403 1413 .reviewers ul li {
1404 1414 position: relative;
1405 1415 width: 100%;
1406 1416 padding-bottom: 8px;
1407 1417 list-style-type: none;
1408 1418 }
1409 1419
1410 1420 .reviewer_entry {
1411 1421 min-height: 55px;
1412 1422 }
1413 1423
1414 1424 .reviewers_member {
1415 1425 width: 100%;
1416 1426 overflow: auto;
1417 1427 }
1418 1428 .reviewer_reason {
1419 1429 padding-left: 20px;
1420 1430 line-height: 1.5em;
1421 1431 }
1422 1432 .reviewer_status {
1423 1433 display: inline-block;
1424 1434 width: 25px;
1425 1435 min-width: 25px;
1426 1436 height: 1.2em;
1427 1437 line-height: 1em;
1428 1438 }
1429 1439
1430 1440 .reviewer_name {
1431 1441 display: inline-block;
1432 1442 max-width: 83%;
1433 1443 padding-right: 20px;
1434 1444 vertical-align: middle;
1435 1445 line-height: 1;
1436 1446
1437 1447 .rc-user {
1438 1448 min-width: 0;
1439 1449 margin: -2px 1em 0 0;
1440 1450 }
1441 1451
1442 1452 .reviewer {
1443 1453 float: left;
1444 1454 }
1445 1455 }
1446 1456
1447 1457 .reviewer_member_mandatory {
1448 1458 position: absolute;
1449 1459 left: 15px;
1450 1460 top: 8px;
1451 1461 width: 16px;
1452 1462 font-size: 11px;
1453 1463 margin: 0;
1454 1464 padding: 0;
1455 1465 color: black;
1456 1466 }
1457 1467
1458 1468 .reviewer_member_mandatory_remove,
1459 1469 .reviewer_member_remove {
1460 1470 position: absolute;
1461 1471 right: 0;
1462 1472 top: 0;
1463 1473 width: 16px;
1464 1474 margin-bottom: 10px;
1465 1475 padding: 0;
1466 1476 color: black;
1467 1477 }
1468 1478
1469 1479 .reviewer_member_mandatory_remove {
1470 1480 color: @grey4;
1471 1481 }
1472 1482
1473 1483 .reviewer_member_status {
1474 1484 margin-top: 5px;
1475 1485 }
1476 1486 .pr-summary #summary{
1477 1487 width: 100%;
1478 1488 }
1479 1489 .pr-summary .action_button:hover {
1480 1490 border: 0;
1481 1491 cursor: pointer;
1482 1492 }
1483 1493 .pr-details-title {
1484 1494 padding-bottom: 8px;
1485 1495 border-bottom: @border-thickness solid @grey5;
1486 1496
1487 1497 .action_button.disabled {
1488 1498 color: @grey4;
1489 1499 cursor: inherit;
1490 1500 }
1491 1501 .action_button {
1492 1502 color: @rcblue;
1493 1503 }
1494 1504 }
1495 1505 .pr-details-content {
1496 1506 margin-top: @textmargin;
1497 1507 margin-bottom: @textmargin;
1498 1508 }
1499 1509
1500 1510 .pr-reviewer-rules {
1501 1511 padding: 10px 0px 20px 0px;
1502 1512 }
1503 1513
1504 1514 .group_members {
1505 1515 margin-top: 0;
1506 1516 padding: 0;
1507 1517 list-style: outside none none;
1508 1518
1509 1519 img {
1510 1520 height: @gravatar-size;
1511 1521 width: @gravatar-size;
1512 1522 margin-right: .5em;
1513 1523 margin-left: 3px;
1514 1524 }
1515 1525
1516 1526 .to-delete {
1517 1527 .user {
1518 1528 text-decoration: line-through;
1519 1529 }
1520 1530 }
1521 1531 }
1522 1532
1523 1533 .compare_view_commits_title {
1524 1534 .disabled {
1525 1535 cursor: inherit;
1526 1536 &:hover{
1527 1537 background-color: inherit;
1528 1538 color: inherit;
1529 1539 }
1530 1540 }
1531 1541 }
1532 1542
1533 1543 .subtitle-compare {
1534 1544 margin: -15px 0px 0px 0px;
1535 1545 }
1536 1546
1537 1547 // new entry in group_members
1538 1548 .td-author-new-entry {
1539 1549 background-color: rgba(red(@alert1), green(@alert1), blue(@alert1), 0.3);
1540 1550 }
1541 1551
1542 1552 .usergroup_member_remove {
1543 1553 width: 16px;
1544 1554 margin-bottom: 10px;
1545 1555 padding: 0;
1546 1556 color: black !important;
1547 1557 cursor: pointer;
1548 1558 }
1549 1559
1550 1560 .reviewer_ac .ac-input {
1551 1561 width: 92%;
1552 1562 margin-bottom: 1em;
1553 1563 }
1554 1564
1555 1565 .compare_view_commits tr{
1556 1566 height: 20px;
1557 1567 }
1558 1568 .compare_view_commits td {
1559 1569 vertical-align: top;
1560 1570 padding-top: 10px;
1561 1571 }
1562 1572 .compare_view_commits .author {
1563 1573 margin-left: 5px;
1564 1574 }
1565 1575
1566 1576 .compare_view_commits {
1567 1577 .color-a {
1568 1578 color: @alert1;
1569 1579 }
1570 1580
1571 1581 .color-c {
1572 1582 color: @color3;
1573 1583 }
1574 1584
1575 1585 .color-r {
1576 1586 color: @color5;
1577 1587 }
1578 1588
1579 1589 .color-a-bg {
1580 1590 background-color: @alert1;
1581 1591 }
1582 1592
1583 1593 .color-c-bg {
1584 1594 background-color: @alert3;
1585 1595 }
1586 1596
1587 1597 .color-r-bg {
1588 1598 background-color: @alert2;
1589 1599 }
1590 1600
1591 1601 .color-a-border {
1592 1602 border: 1px solid @alert1;
1593 1603 }
1594 1604
1595 1605 .color-c-border {
1596 1606 border: 1px solid @alert3;
1597 1607 }
1598 1608
1599 1609 .color-r-border {
1600 1610 border: 1px solid @alert2;
1601 1611 }
1602 1612
1603 1613 .commit-change-indicator {
1604 1614 width: 15px;
1605 1615 height: 15px;
1606 1616 position: relative;
1607 1617 left: 15px;
1608 1618 }
1609 1619
1610 1620 .commit-change-content {
1611 1621 text-align: center;
1612 1622 vertical-align: middle;
1613 1623 line-height: 15px;
1614 1624 }
1615 1625 }
1616 1626
1617 1627 .compare_view_filepath {
1618 1628 color: @grey1;
1619 1629 }
1620 1630
1621 1631 .show_more {
1622 1632 display: inline-block;
1623 1633 width: 0;
1624 1634 height: 0;
1625 1635 vertical-align: middle;
1626 1636 content: "";
1627 1637 border: 4px solid;
1628 1638 border-right-color: transparent;
1629 1639 border-bottom-color: transparent;
1630 1640 border-left-color: transparent;
1631 1641 font-size: 0;
1632 1642 }
1633 1643
1634 1644 .journal_more .show_more {
1635 1645 display: inline;
1636 1646
1637 1647 &:after {
1638 1648 content: none;
1639 1649 }
1640 1650 }
1641 1651
1642 1652 .compare_view_commits .collapse_commit:after {
1643 1653 cursor: pointer;
1644 1654 content: "\00A0\25B4";
1645 1655 margin-left: -3px;
1646 1656 font-size: 17px;
1647 1657 color: @grey4;
1648 1658 }
1649 1659
1650 1660 .diff_links {
1651 1661 margin-left: 8px;
1652 1662 }
1653 1663
1654 1664 #pull_request_overview {
1655 1665 div.ancestor {
1656 1666 margin: -33px 0;
1657 1667 }
1658 1668 }
1659 1669
1660 1670 div.ancestor {
1661 1671 line-height: 33px;
1662 1672 }
1663 1673
1664 1674 .cs_icon_td input[type="checkbox"] {
1665 1675 display: none;
1666 1676 }
1667 1677
1668 1678 .cs_icon_td .expand_file_icon:after {
1669 1679 cursor: pointer;
1670 1680 content: "\00A0\25B6";
1671 1681 font-size: 12px;
1672 1682 color: @grey4;
1673 1683 }
1674 1684
1675 1685 .cs_icon_td .collapse_file_icon:after {
1676 1686 cursor: pointer;
1677 1687 content: "\00A0\25BC";
1678 1688 font-size: 12px;
1679 1689 color: @grey4;
1680 1690 }
1681 1691
1682 1692 /*new binary
1683 1693 NEW_FILENODE = 1
1684 1694 DEL_FILENODE = 2
1685 1695 MOD_FILENODE = 3
1686 1696 RENAMED_FILENODE = 4
1687 1697 COPIED_FILENODE = 5
1688 1698 CHMOD_FILENODE = 6
1689 1699 BIN_FILENODE = 7
1690 1700 */
1691 1701 .cs_files_expand {
1692 1702 font-size: @basefontsize + 5px;
1693 1703 line-height: 1.8em;
1694 1704 float: right;
1695 1705 }
1696 1706
1697 1707 .cs_files_expand span{
1698 1708 color: @rcblue;
1699 1709 cursor: pointer;
1700 1710 }
1701 1711 .cs_files {
1702 1712 clear: both;
1703 1713 padding-bottom: @padding;
1704 1714
1705 1715 .cur_cs {
1706 1716 margin: 10px 2px;
1707 1717 font-weight: bold;
1708 1718 }
1709 1719
1710 1720 .node {
1711 1721 float: left;
1712 1722 }
1713 1723
1714 1724 .changes {
1715 1725 float: right;
1716 1726 color: white;
1717 1727 font-size: @basefontsize - 4px;
1718 1728 margin-top: 4px;
1719 1729 opacity: 0.6;
1720 1730 filter: Alpha(opacity=60); /* IE8 and earlier */
1721 1731
1722 1732 .added {
1723 1733 background-color: @alert1;
1724 1734 float: left;
1725 1735 text-align: center;
1726 1736 }
1727 1737
1728 1738 .deleted {
1729 1739 background-color: @alert2;
1730 1740 float: left;
1731 1741 text-align: center;
1732 1742 }
1733 1743
1734 1744 .bin {
1735 1745 background-color: @alert1;
1736 1746 text-align: center;
1737 1747 }
1738 1748
1739 1749 /*new binary*/
1740 1750 .bin.bin1 {
1741 1751 background-color: @alert1;
1742 1752 text-align: center;
1743 1753 }
1744 1754
1745 1755 /*deleted binary*/
1746 1756 .bin.bin2 {
1747 1757 background-color: @alert2;
1748 1758 text-align: center;
1749 1759 }
1750 1760
1751 1761 /*mod binary*/
1752 1762 .bin.bin3 {
1753 1763 background-color: @grey2;
1754 1764 text-align: center;
1755 1765 }
1756 1766
1757 1767 /*rename file*/
1758 1768 .bin.bin4 {
1759 1769 background-color: @alert4;
1760 1770 text-align: center;
1761 1771 }
1762 1772
1763 1773 /*copied file*/
1764 1774 .bin.bin5 {
1765 1775 background-color: @alert4;
1766 1776 text-align: center;
1767 1777 }
1768 1778
1769 1779 /*chmod file*/
1770 1780 .bin.bin6 {
1771 1781 background-color: @grey2;
1772 1782 text-align: center;
1773 1783 }
1774 1784 }
1775 1785 }
1776 1786
1777 1787 .cs_files .cs_added, .cs_files .cs_A,
1778 1788 .cs_files .cs_added, .cs_files .cs_M,
1779 1789 .cs_files .cs_added, .cs_files .cs_D {
1780 1790 height: 16px;
1781 1791 padding-right: 10px;
1782 1792 margin-top: 7px;
1783 1793 text-align: left;
1784 1794 }
1785 1795
1786 1796 .cs_icon_td {
1787 1797 min-width: 16px;
1788 1798 width: 16px;
1789 1799 }
1790 1800
1791 1801 .pull-request-merge {
1792 1802 border: 1px solid @grey5;
1793 1803 padding: 10px 0px 20px;
1794 1804 margin-top: 10px;
1795 1805 margin-bottom: 20px;
1796 1806 }
1797 1807
1798 1808 .pull-request-merge-refresh {
1799 1809 margin: 2px 7px;
1800 1810 a {
1801 1811 color: @grey3;
1802 1812 }
1803 1813 }
1804 1814
1805 1815 .pull-request-merge ul {
1806 1816 padding: 0px 0px;
1807 1817 }
1808 1818
1809 1819 .pull-request-merge li {
1810 1820 list-style-type: none;
1811 1821 }
1812 1822
1813 1823 .pull-request-merge .pull-request-wrap {
1814 1824 height: auto;
1815 1825 padding: 0px 0px;
1816 1826 text-align: right;
1817 1827 }
1818 1828
1819 1829 .pull-request-merge span {
1820 1830 margin-right: 5px;
1821 1831 }
1822 1832
1823 1833 .pull-request-merge-actions {
1824 1834 min-height: 30px;
1825 1835 padding: 0px 0px;
1826 1836 }
1827 1837
1828 1838 .pull-request-merge-info {
1829 1839 padding: 0px 5px 5px 0px;
1830 1840 }
1831 1841
1832 1842 .merge-status {
1833 1843 margin-right: 5px;
1834 1844 }
1835 1845
1836 1846 .merge-message {
1837 1847 font-size: 1.2em
1838 1848 }
1839 1849
1840 1850 .merge-message.success i,
1841 1851 .merge-icon.success i {
1842 1852 color:@alert1;
1843 1853 }
1844 1854
1845 1855 .merge-message.warning i,
1846 1856 .merge-icon.warning i {
1847 1857 color: @alert3;
1848 1858 }
1849 1859
1850 1860 .merge-message.error i,
1851 1861 .merge-icon.error i {
1852 1862 color:@alert2;
1853 1863 }
1854 1864
1855 1865 .pr-versions {
1856 1866 font-size: 1.1em;
1857 1867
1858 1868 table {
1859 1869 padding: 0px 5px;
1860 1870 }
1861 1871
1862 1872 td {
1863 1873 line-height: 15px;
1864 1874 }
1865 1875
1866 1876 .compare-radio-button {
1867 1877 position: relative;
1868 1878 top: -3px;
1869 1879 }
1870 1880 }
1871 1881
1872 1882
1873 1883 #close_pull_request {
1874 1884 margin-right: 0px;
1875 1885 }
1876 1886
1877 1887 .empty_data {
1878 1888 color: @grey4;
1879 1889 }
1880 1890
1881 1891 #changeset_compare_view_content {
1882 1892 clear: both;
1883 1893 width: 100%;
1884 1894 box-sizing: border-box;
1885 1895 .border-radius(@border-radius);
1886 1896
1887 1897 .help-block {
1888 1898 margin: @padding 0;
1889 1899 color: @text-color;
1890 1900 &.pre-formatting {
1891 1901 white-space: pre;
1892 1902 }
1893 1903 }
1894 1904
1895 1905 .empty_data {
1896 1906 margin: @padding 0;
1897 1907 }
1898 1908
1899 1909 .alert {
1900 1910 margin-bottom: @space;
1901 1911 }
1902 1912 }
1903 1913
1904 1914 .table_disp {
1905 1915 .status {
1906 1916 width: auto;
1907 1917 }
1908 1918 }
1909 1919
1910 1920
1911 1921 .creation_in_progress {
1912 1922 color: @grey4
1913 1923 }
1914 1924
1915 1925 .status_box_menu {
1916 1926 margin: 0;
1917 1927 }
1918 1928
1919 1929 .notification-table{
1920 1930 margin-bottom: @space;
1921 1931 display: table;
1922 1932 width: 100%;
1923 1933
1924 1934 .container{
1925 1935 display: table-row;
1926 1936
1927 1937 .notification-header{
1928 1938 border-bottom: @border-thickness solid @border-default-color;
1929 1939 }
1930 1940
1931 1941 .notification-subject{
1932 1942 display: table-cell;
1933 1943 }
1934 1944 }
1935 1945 }
1936 1946
1937 1947 // Notifications
1938 1948 .notification-header{
1939 1949 display: table;
1940 1950 width: 100%;
1941 1951 padding: floor(@basefontsize/2) 0;
1942 1952 line-height: 1em;
1943 1953
1944 1954 .desc, .delete-notifications, .read-notifications{
1945 1955 display: table-cell;
1946 1956 text-align: left;
1947 1957 }
1948 1958
1949 1959 .delete-notifications, .read-notifications{
1950 1960 width: 35px;
1951 1961 min-width: 35px; //fixes when only one button is displayed
1952 1962 }
1953 1963 }
1954 1964
1955 1965 .notification-body {
1956 1966 .markdown-block,
1957 1967 .rst-block {
1958 1968 padding: @padding 0;
1959 1969 }
1960 1970
1961 1971 .notification-subject {
1962 1972 padding: @textmargin 0;
1963 1973 border-bottom: @border-thickness solid @border-default-color;
1964 1974 }
1965 1975 }
1966 1976
1967 1977
1968 1978 .notifications_buttons{
1969 1979 float: right;
1970 1980 }
1971 1981
1972 1982 #notification-status{
1973 1983 display: inline;
1974 1984 }
1975 1985
1976 1986 // Repositories
1977 1987
1978 1988 #summary.fields{
1979 1989 display: table;
1980 1990
1981 1991 .field{
1982 1992 display: table-row;
1983 1993
1984 1994 .label-summary{
1985 1995 display: table-cell;
1986 1996 min-width: @label-summary-minwidth;
1987 1997 padding-top: @padding/2;
1988 1998 padding-bottom: @padding/2;
1989 1999 padding-right: @padding/2;
1990 2000 }
1991 2001
1992 2002 .input{
1993 2003 display: table-cell;
1994 2004 padding: @padding/2;
1995 2005
1996 2006 input{
1997 2007 min-width: 29em;
1998 2008 padding: @padding/4;
1999 2009 }
2000 2010 }
2001 2011 .statistics, .downloads{
2002 2012 .disabled{
2003 2013 color: @grey4;
2004 2014 }
2005 2015 }
2006 2016 }
2007 2017 }
2008 2018
2009 2019 #summary{
2010 2020 width: 70%;
2011 2021 }
2012 2022
2013 2023
2014 2024 // Journal
2015 2025 .journal.title {
2016 2026 h5 {
2017 2027 float: left;
2018 2028 margin: 0;
2019 2029 width: 70%;
2020 2030 }
2021 2031
2022 2032 ul {
2023 2033 float: right;
2024 2034 display: inline-block;
2025 2035 margin: 0;
2026 2036 width: 30%;
2027 2037 text-align: right;
2028 2038
2029 2039 li {
2030 2040 display: inline;
2031 2041 font-size: @journal-fontsize;
2032 2042 line-height: 1em;
2033 2043
2034 2044 list-style-type: none;
2035 2045 }
2036 2046 }
2037 2047 }
2038 2048
2039 2049 .filterexample {
2040 2050 position: absolute;
2041 2051 top: 95px;
2042 2052 left: @contentpadding;
2043 2053 color: @rcblue;
2044 2054 font-size: 11px;
2045 2055 font-family: @text-regular;
2046 2056 cursor: help;
2047 2057
2048 2058 &:hover {
2049 2059 color: @rcdarkblue;
2050 2060 }
2051 2061
2052 2062 @media (max-width:768px) {
2053 2063 position: relative;
2054 2064 top: auto;
2055 2065 left: auto;
2056 2066 display: block;
2057 2067 }
2058 2068 }
2059 2069
2060 2070
2061 2071 #journal{
2062 2072 margin-bottom: @space;
2063 2073
2064 2074 .journal_day{
2065 2075 margin-bottom: @textmargin/2;
2066 2076 padding-bottom: @textmargin/2;
2067 2077 font-size: @journal-fontsize;
2068 2078 border-bottom: @border-thickness solid @border-default-color;
2069 2079 }
2070 2080
2071 2081 .journal_container{
2072 2082 margin-bottom: @space;
2073 2083
2074 2084 .journal_user{
2075 2085 display: inline-block;
2076 2086 }
2077 2087 .journal_action_container{
2078 2088 display: block;
2079 2089 margin-top: @textmargin;
2080 2090
2081 2091 div{
2082 2092 display: inline;
2083 2093 }
2084 2094
2085 2095 div.journal_action_params{
2086 2096 display: block;
2087 2097 }
2088 2098
2089 2099 div.journal_repo:after{
2090 2100 content: "\A";
2091 2101 white-space: pre;
2092 2102 }
2093 2103
2094 2104 div.date{
2095 2105 display: block;
2096 2106 margin-bottom: @textmargin;
2097 2107 }
2098 2108 }
2099 2109 }
2100 2110 }
2101 2111
2102 2112 // Files
2103 2113 .edit-file-title {
2104 2114 font-size: 16px;
2105 2115
2106 2116 .title-heading {
2107 2117 padding: 2px;
2108 2118 }
2109 2119 }
2110 2120
2111 2121 .edit-file-fieldset {
2112 2122 margin: @sidebarpadding 0;
2113 2123
2114 2124 .fieldset {
2115 2125 .left-label {
2116 2126 width: 13%;
2117 2127 }
2118 2128 .right-content {
2119 2129 width: 87%;
2120 2130 max-width: 100%;
2121 2131 }
2122 2132 .filename-label {
2123 2133 margin-top: 13px;
2124 2134 }
2125 2135 .commit-message-label {
2126 2136 margin-top: 4px;
2127 2137 }
2128 2138 .file-upload-input {
2129 2139 input {
2130 2140 display: none;
2131 2141 }
2132 2142 margin-top: 10px;
2133 2143 }
2134 2144 .file-upload-label {
2135 2145 margin-top: 10px;
2136 2146 }
2137 2147 p {
2138 2148 margin-top: 5px;
2139 2149 }
2140 2150
2141 2151 }
2142 2152 .custom-path-link {
2143 2153 margin-left: 5px;
2144 2154 }
2145 2155 #commit {
2146 2156 resize: vertical;
2147 2157 }
2148 2158 }
2149 2159
2150 2160 .delete-file-preview {
2151 2161 max-height: 250px;
2152 2162 }
2153 2163
2154 2164 .new-file,
2155 2165 #filter_activate,
2156 2166 #filter_deactivate {
2157 2167 float: right;
2158 2168 margin: 0 0 0 10px;
2159 2169 }
2160 2170
2161 2171 .file-upload-transaction-wrapper {
2162 2172 margin-top: 57px;
2163 2173 clear: both;
2164 2174 }
2165 2175
2166 2176 .file-upload-transaction-wrapper .error {
2167 2177 color: @color5;
2168 2178 }
2169 2179
2170 2180 .file-upload-transaction {
2171 2181 min-height: 200px;
2172 2182 padding: 54px;
2173 2183 border: 1px solid @grey5;
2174 2184 text-align: center;
2175 2185 clear: both;
2176 2186 }
2177 2187
2178 2188 .file-upload-transaction i {
2179 2189 font-size: 48px
2180 2190 }
2181 2191
2182 2192 h3.files_location{
2183 2193 line-height: 2.4em;
2184 2194 }
2185 2195
2186 2196 .browser-nav {
2187 2197 width: 100%;
2188 2198 display: table;
2189 2199 margin-bottom: 20px;
2190 2200
2191 2201 .info_box {
2192 2202 float: left;
2193 2203 display: inline-table;
2194 2204 height: 2.5em;
2195 2205
2196 2206 .browser-cur-rev, .info_box_elem {
2197 2207 display: table-cell;
2198 2208 vertical-align: middle;
2199 2209 }
2200 2210
2201 2211 .drop-menu {
2202 2212 margin: 0 10px;
2203 2213 }
2204 2214
2205 2215 .info_box_elem {
2206 2216 border-top: @border-thickness solid @grey5;
2207 2217 border-bottom: @border-thickness solid @grey5;
2208 2218 box-shadow: @button-shadow;
2209 2219
2210 2220 #at_rev, a {
2211 2221 padding: 0.6em 0.4em;
2212 2222 margin: 0;
2213 2223 .box-shadow(none);
2214 2224 border: 0;
2215 2225 height: 12px;
2216 2226 color: @grey2;
2217 2227 }
2218 2228
2219 2229 input#at_rev {
2220 2230 max-width: 50px;
2221 2231 text-align: center;
2222 2232 }
2223 2233
2224 2234 &.previous {
2225 2235 border: @border-thickness solid @grey5;
2226 2236 border-top-left-radius: @border-radius;
2227 2237 border-bottom-left-radius: @border-radius;
2228 2238
2229 2239 &:hover {
2230 2240 border-color: @grey4;
2231 2241 }
2232 2242
2233 2243 .disabled {
2234 2244 color: @grey5;
2235 2245 cursor: not-allowed;
2236 2246 opacity: 0.5;
2237 2247 }
2238 2248 }
2239 2249
2240 2250 &.next {
2241 2251 border: @border-thickness solid @grey5;
2242 2252 border-top-right-radius: @border-radius;
2243 2253 border-bottom-right-radius: @border-radius;
2244 2254
2245 2255 &:hover {
2246 2256 border-color: @grey4;
2247 2257 }
2248 2258
2249 2259 .disabled {
2250 2260 color: @grey5;
2251 2261 cursor: not-allowed;
2252 2262 opacity: 0.5;
2253 2263 }
2254 2264 }
2255 2265 }
2256 2266
2257 2267 .browser-cur-rev {
2258 2268
2259 2269 span{
2260 2270 margin: 0;
2261 2271 color: @rcblue;
2262 2272 height: 12px;
2263 2273 display: inline-block;
2264 2274 padding: 0.7em 1em ;
2265 2275 border: @border-thickness solid @rcblue;
2266 2276 margin-right: @padding;
2267 2277 }
2268 2278 }
2269 2279
2270 2280 }
2271 2281
2272 2282 .select-index-number {
2273 2283 margin: 0 0 0 20px;
2274 2284 color: @grey3;
2275 2285 }
2276 2286
2277 2287 .search_activate {
2278 2288 display: table-cell;
2279 2289 vertical-align: middle;
2280 2290
2281 2291 input, label{
2282 2292 margin: 0;
2283 2293 padding: 0;
2284 2294 }
2285 2295
2286 2296 input{
2287 2297 margin-left: @textmargin;
2288 2298 }
2289 2299
2290 2300 }
2291 2301 }
2292 2302
2293 2303 .browser-cur-rev{
2294 2304 margin-bottom: @textmargin;
2295 2305 }
2296 2306
2297 2307 #node_filter_box_loading{
2298 2308 .info_text;
2299 2309 }
2300 2310
2301 2311 .browser-search {
2302 2312 margin: -25px 0px 5px 0px;
2303 2313 }
2304 2314
2305 2315 .files-quick-filter {
2306 2316 float: right;
2307 2317 width: 180px;
2308 2318 position: relative;
2309 2319 }
2310 2320
2311 2321 .files-filter-box {
2312 2322 display: flex;
2313 2323 padding: 0px;
2314 2324 border-radius: 3px;
2315 2325 margin-bottom: 0;
2316 2326
2317 2327 a {
2318 2328 border: none !important;
2319 2329 }
2320 2330
2321 2331 li {
2322 2332 list-style-type: none
2323 2333 }
2324 2334 }
2325 2335
2326 2336 .files-filter-box-path {
2327 2337 line-height: 33px;
2328 2338 padding: 0;
2329 2339 width: 20px;
2330 2340 position: absolute;
2331 2341 z-index: 11;
2332 2342 left: 5px;
2333 2343 }
2334 2344
2335 2345 .files-filter-box-input {
2336 2346 margin-right: 0;
2337 2347
2338 2348 input {
2339 2349 border: 1px solid @white;
2340 2350 padding-left: 25px;
2341 2351 width: 145px;
2342 2352
2343 2353 &:hover {
2344 2354 border-color: @grey6;
2345 2355 }
2346 2356
2347 2357 &:focus {
2348 2358 border-color: @grey5;
2349 2359 }
2350 2360 }
2351 2361 }
2352 2362
2353 2363 .browser-result{
2354 2364 td a{
2355 2365 margin-left: 0.5em;
2356 2366 display: inline-block;
2357 2367
2358 2368 em {
2359 2369 font-weight: @text-bold-weight;
2360 2370 font-family: @text-bold;
2361 2371 }
2362 2372 }
2363 2373 }
2364 2374
2365 2375 .browser-highlight{
2366 2376 background-color: @grey5-alpha;
2367 2377 }
2368 2378
2369 2379
2370 2380 .edit-file-fieldset #location,
2371 2381 .edit-file-fieldset #filename {
2372 2382 display: flex;
2373 2383 width: -moz-available; /* WebKit-based browsers will ignore this. */
2374 2384 width: -webkit-fill-available; /* Mozilla-based browsers will ignore this. */
2375 2385 width: fill-available;
2376 2386 border: 0;
2377 2387 }
2378 2388
2379 2389 .path-items {
2380 2390 display: flex;
2381 2391 padding: 0;
2382 2392 border: 1px solid #eeeeee;
2383 2393 width: 100%;
2384 2394 float: left;
2385 2395
2386 2396 .breadcrumb-path {
2387 2397 line-height: 30px;
2388 2398 padding: 0 4px;
2389 2399 white-space: nowrap;
2390 2400 }
2391 2401
2392 2402 .location-path {
2393 2403 width: -moz-available; /* WebKit-based browsers will ignore this. */
2394 2404 width: -webkit-fill-available; /* Mozilla-based browsers will ignore this. */
2395 2405 width: fill-available;
2396 2406
2397 2407 .file-name-input {
2398 2408 padding: 0.5em 0;
2399 2409 }
2400 2410
2401 2411 }
2402 2412
2403 2413 ul {
2404 2414 display: flex;
2405 2415 margin: 0;
2406 2416 padding: 0;
2407 2417 width: 100%;
2408 2418 }
2409 2419
2410 2420 li {
2411 2421 list-style-type: none;
2412 2422 }
2413 2423
2414 2424 }
2415 2425
2416 2426 .editor-items {
2417 2427 height: 40px;
2418 2428 margin: 10px 0 -17px 10px;
2419 2429
2420 2430 .editor-action {
2421 2431 cursor: pointer;
2422 2432 }
2423 2433
2424 2434 .editor-action.active {
2425 2435 border-bottom: 2px solid #5C5C5C;
2426 2436 }
2427 2437
2428 2438 li {
2429 2439 list-style-type: none;
2430 2440 }
2431 2441 }
2432 2442
2433 2443 .edit-file-fieldset .message textarea {
2434 2444 border: 1px solid #eeeeee;
2435 2445 }
2436 2446
2437 2447 #files_data .codeblock {
2438 2448 background-color: #F5F5F5;
2439 2449 }
2440 2450
2441 2451 #editor_preview {
2442 2452 background: white;
2443 2453 }
2444 2454
2445 2455 .show-editor {
2446 2456 padding: 10px;
2447 2457 background-color: white;
2448 2458
2449 2459 }
2450 2460
2451 2461 .show-preview {
2452 2462 padding: 10px;
2453 2463 background-color: white;
2454 2464 border-left: 1px solid #eeeeee;
2455 2465 }
2456 2466 // quick filter
2457 2467 .grid-quick-filter {
2458 2468 float: right;
2459 2469 position: relative;
2460 2470 }
2461 2471
2462 2472 .grid-filter-box {
2463 2473 display: flex;
2464 2474 padding: 0px;
2465 2475 border-radius: 3px;
2466 2476 margin-bottom: 0;
2467 2477
2468 2478 a {
2469 2479 border: none !important;
2470 2480 }
2471 2481
2472 2482 li {
2473 2483 list-style-type: none
2474 2484 }
2475 2485 }
2476 2486
2477 2487 .grid-filter-box-icon {
2478 2488 line-height: 33px;
2479 2489 padding: 0;
2480 2490 width: 20px;
2481 2491 position: absolute;
2482 2492 z-index: 11;
2483 2493 left: 5px;
2484 2494 }
2485 2495
2486 2496 .grid-filter-box-input {
2487 2497 margin-right: 0;
2488 2498
2489 2499 input {
2490 2500 border: 1px solid @white;
2491 2501 padding-left: 25px;
2492 2502 width: 145px;
2493 2503
2494 2504 &:hover {
2495 2505 border-color: @grey6;
2496 2506 }
2497 2507
2498 2508 &:focus {
2499 2509 border-color: @grey5;
2500 2510 }
2501 2511 }
2502 2512 }
2503 2513
2504 2514
2505 2515
2506 2516 // Search
2507 2517
2508 2518 .search-form{
2509 2519 #q {
2510 2520 width: @search-form-width;
2511 2521 }
2512 2522 .fields{
2513 2523 margin: 0 0 @space;
2514 2524 }
2515 2525
2516 2526 label{
2517 2527 display: inline-block;
2518 2528 margin-right: @textmargin;
2519 2529 padding-top: 0.25em;
2520 2530 }
2521 2531
2522 2532
2523 2533 .results{
2524 2534 clear: both;
2525 2535 margin: 0 0 @padding;
2526 2536 }
2527 2537
2528 2538 .search-tags {
2529 2539 padding: 5px 0;
2530 2540 }
2531 2541 }
2532 2542
2533 2543 div.search-feedback-items {
2534 2544 display: inline-block;
2535 2545 }
2536 2546
2537 2547 div.search-code-body {
2538 2548 background-color: #ffffff; padding: 5px 0 5px 10px;
2539 2549 pre {
2540 2550 .match { background-color: #faffa6;}
2541 2551 .break { display: block; width: 100%; background-color: #DDE7EF; color: #747474; }
2542 2552 }
2543 2553 }
2544 2554
2545 2555 .expand_commit.search {
2546 2556 .show_more.open {
2547 2557 height: auto;
2548 2558 max-height: none;
2549 2559 }
2550 2560 }
2551 2561
2552 2562 .search-results {
2553 2563
2554 2564 h2 {
2555 2565 margin-bottom: 0;
2556 2566 }
2557 2567 .codeblock {
2558 2568 border: none;
2559 2569 background: transparent;
2560 2570 }
2561 2571
2562 2572 .codeblock-header {
2563 2573 border: none;
2564 2574 background: transparent;
2565 2575 }
2566 2576
2567 2577 .code-body {
2568 2578 border: @border-thickness solid @grey6;
2569 2579 .border-radius(@border-radius);
2570 2580 }
2571 2581
2572 2582 .td-commit {
2573 2583 &:extend(pre);
2574 2584 border-bottom: @border-thickness solid @border-default-color;
2575 2585 }
2576 2586
2577 2587 .message {
2578 2588 height: auto;
2579 2589 max-width: 350px;
2580 2590 white-space: normal;
2581 2591 text-overflow: initial;
2582 2592 overflow: visible;
2583 2593
2584 2594 .match { background-color: #faffa6;}
2585 2595 .break { background-color: #DDE7EF; width: 100%; color: #747474; display: block; }
2586 2596 }
2587 2597
2588 2598 .path {
2589 2599 border-bottom: none !important;
2590 2600 border-left: 1px solid @grey6 !important;
2591 2601 border-right: 1px solid @grey6 !important;
2592 2602 }
2593 2603 }
2594 2604
2595 2605 table.rctable td.td-search-results div {
2596 2606 max-width: 100%;
2597 2607 }
2598 2608
2599 2609 #tip-box, .tip-box{
2600 2610 padding: @menupadding/2;
2601 2611 display: block;
2602 2612 border: @border-thickness solid @border-highlight-color;
2603 2613 .border-radius(@border-radius);
2604 2614 background-color: white;
2605 2615 z-index: 99;
2606 2616 white-space: pre-wrap;
2607 2617 }
2608 2618
2609 2619 #linktt {
2610 2620 width: 79px;
2611 2621 }
2612 2622
2613 2623 #help_kb .modal-content{
2614 2624 max-width: 750px;
2615 2625 margin: 10% auto;
2616 2626
2617 2627 table{
2618 2628 td,th{
2619 2629 border-bottom: none;
2620 2630 line-height: 2.5em;
2621 2631 }
2622 2632 th{
2623 2633 padding-bottom: @textmargin/2;
2624 2634 }
2625 2635 td.keys{
2626 2636 text-align: center;
2627 2637 }
2628 2638 }
2629 2639
2630 2640 .block-left{
2631 2641 width: 45%;
2632 2642 margin-right: 5%;
2633 2643 }
2634 2644 .modal-footer{
2635 2645 clear: both;
2636 2646 }
2637 2647 .key.tag{
2638 2648 padding: 0.5em;
2639 2649 background-color: @rcblue;
2640 2650 color: white;
2641 2651 border-color: @rcblue;
2642 2652 .box-shadow(none);
2643 2653 }
2644 2654 }
2645 2655
2646 2656
2647 2657
2648 2658 //--- IMPORTS FOR REFACTORED STYLES ------------------//
2649 2659
2650 2660 @import 'statistics-graph';
2651 2661 @import 'tables';
2652 2662 @import 'forms';
2653 2663 @import 'diff';
2654 2664 @import 'summary';
2655 2665 @import 'navigation';
2656 2666
2657 2667 //--- SHOW/HIDE SECTIONS --//
2658 2668
2659 2669 .btn-collapse {
2660 2670 float: right;
2661 2671 text-align: right;
2662 2672 font-family: @text-light;
2663 2673 font-size: @basefontsize;
2664 2674 cursor: pointer;
2665 2675 border: none;
2666 2676 color: @rcblue;
2667 2677 }
2668 2678
2669 2679 table.rctable,
2670 2680 table.dataTable {
2671 2681 .btn-collapse {
2672 2682 float: right;
2673 2683 text-align: right;
2674 2684 }
2675 2685 }
2676 2686
2677 2687 table.rctable {
2678 2688 &.permissions {
2679 2689
2680 2690 th.td-owner {
2681 2691 padding: 0;
2682 2692 }
2683 2693
2684 2694 th {
2685 2695 font-weight: normal;
2686 2696 padding: 0 5px;
2687 2697 }
2688 2698
2689 2699 }
2690 2700 }
2691 2701
2692 2702
2693 2703 // TODO: johbo: Fix for IE10, this avoids that we see a border
2694 2704 // and padding around checkboxes and radio boxes. Move to the right place,
2695 2705 // or better: Remove this once we did the form refactoring.
2696 2706 input[type=checkbox],
2697 2707 input[type=radio] {
2698 2708 padding: 0;
2699 2709 border: none;
2700 2710 }
2701 2711
2702 2712 .toggle-ajax-spinner{
2703 2713 height: 16px;
2704 2714 width: 16px;
2705 2715 }
2706 2716
2707 2717
2708 2718 .markup-form .clearfix {
2709 2719 .border-radius(@border-radius);
2710 2720 margin: 0px;
2711 2721 }
2712 2722
2713 2723 .markup-form-area {
2714 2724 padding: 8px 12px;
2715 2725 border: 1px solid @grey4;
2716 2726 .border-radius(@border-radius);
2717 2727 }
2718 2728
2719 2729 .markup-form-area-header .nav-links {
2720 2730 display: flex;
2721 2731 flex-flow: row wrap;
2722 2732 -webkit-flex-flow: row wrap;
2723 2733 width: 100%;
2724 2734 }
2725 2735
2726 2736 .markup-form-area-footer {
2727 2737 display: flex;
2728 2738 }
2729 2739
2730 2740 .markup-form-area-footer .toolbar {
2731 2741
2732 2742 }
2733 2743
2734 2744 // markup Form
2735 2745 div.markup-form {
2736 2746 margin-top: 20px;
2737 2747 }
2738 2748
2739 2749 .markup-form strong {
2740 2750 display: block;
2741 2751 margin-bottom: 15px;
2742 2752 }
2743 2753
2744 2754 .markup-form textarea {
2745 2755 width: 100%;
2746 2756 height: 100px;
2747 2757 font-family: @text-monospace;
2748 2758 }
2749 2759
2750 2760 form.markup-form {
2751 2761 margin-top: 10px;
2752 2762 margin-left: 10px;
2753 2763 }
2754 2764
2755 2765 .markup-form .comment-block-ta,
2756 2766 .markup-form .preview-box {
2757 2767 .border-radius(@border-radius);
2758 2768 .box-sizing(border-box);
2759 2769 background-color: white;
2760 2770 }
2761 2771
2762 2772 .markup-form .preview-box.unloaded {
2763 2773 height: 50px;
2764 2774 text-align: center;
2765 2775 padding: 20px;
2766 2776 background-color: white;
2767 2777 }
2768 2778
2769 2779
2770 2780 .dropzone-wrapper {
2771 2781 border: 1px solid @grey5;
2772 2782 padding: 20px;
2773 2783 }
2774 2784
2775 2785 .dropzone,
2776 2786 .dropzone-pure {
2777 2787 border: 2px dashed @grey5;
2778 2788 border-radius: 5px;
2779 2789 background: white;
2780 2790 min-height: 200px;
2781 2791 padding: 54px;
2782 2792
2783 2793 .dz-message {
2784 2794 font-weight: 700;
2785 2795 text-align: center;
2786 2796 margin: 2em 0;
2787 2797 }
2788 2798
2789 2799 }
2790 2800
2791 2801 .dz-preview {
2792 2802 margin: 10px 0 !important;
2793 2803 position: relative;
2794 2804 vertical-align: top;
2795 2805 padding: 10px;
2796 2806 border-bottom: 1px solid @grey5;
2797 2807 }
2798 2808
2799 2809 .dz-filename {
2800 2810 font-weight: 700;
2801 2811 float: left;
2802 2812 }
2803 2813
2804 2814 .dz-sending {
2805 2815 float: right;
2806 2816 }
2807 2817
2808 2818 .dz-response {
2809 2819 clear: both
2810 2820 }
2811 2821
2812 2822 .dz-filename-size {
2813 2823 float: right
2814 2824 }
2815 2825
2816 2826 .dz-error-message {
2817 2827 color: @alert2;
2818 2828 padding-top: 10px;
2819 2829 clear: both;
2820 2830 }
2821 2831
2822 2832
2823 2833 .user-hovercard {
2824 2834 padding: 5px;
2825 2835 }
2826 2836
2827 2837 .user-hovercard-icon {
2828 2838 display: inline;
2829 2839 padding: 0;
2830 2840 box-sizing: content-box;
2831 2841 border-radius: 50%;
2832 2842 float: left;
2833 2843 }
2834 2844
2835 2845 .user-hovercard-name {
2836 2846 float: right;
2837 2847 vertical-align: top;
2838 2848 padding-left: 10px;
2839 2849 min-width: 150px;
2840 2850 }
2841 2851
2842 2852 .user-hovercard-bio {
2843 2853 clear: both;
2844 2854 padding-top: 10px;
2845 2855 }
2846 2856
2847 2857 .user-hovercard-header {
2848 2858 clear: both;
2849 2859 min-height: 10px;
2850 2860 }
2851 2861
2852 2862 .user-hovercard-footer {
2853 2863 clear: both;
2854 2864 min-height: 10px;
2855 2865 }
2856 2866
2857 2867 .user-group-hovercard {
2858 2868 padding: 5px;
2859 2869 }
2860 2870
2861 2871 .user-group-hovercard-icon {
2862 2872 display: inline;
2863 2873 padding: 0;
2864 2874 box-sizing: content-box;
2865 2875 border-radius: 50%;
2866 2876 float: left;
2867 2877 }
2868 2878
2869 2879 .user-group-hovercard-name {
2870 2880 float: left;
2871 2881 vertical-align: top;
2872 2882 padding-left: 10px;
2873 2883 min-width: 150px;
2874 2884 }
2875 2885
2876 2886 .user-group-hovercard-icon i {
2877 2887 border: 1px solid @grey4;
2878 2888 border-radius: 4px;
2879 2889 }
2880 2890
2881 2891 .user-group-hovercard-bio {
2882 2892 clear: both;
2883 2893 padding-top: 10px;
2884 2894 line-height: 1.0em;
2885 2895 }
2886 2896
2887 2897 .user-group-hovercard-header {
2888 2898 clear: both;
2889 2899 min-height: 10px;
2890 2900 }
2891 2901
2892 2902 .user-group-hovercard-footer {
2893 2903 clear: both;
2894 2904 min-height: 10px;
2895 2905 }
2896 2906
2897 2907 .pr-hovercard-header {
2898 2908 clear: both;
2899 2909 display: block;
2900 2910 line-height: 20px;
2901 2911 }
2902 2912
2903 2913 .pr-hovercard-user {
2904 2914 display: flex;
2905 2915 align-items: center;
2906 2916 padding-left: 5px;
2907 2917 }
2908 2918
2909 2919 .pr-hovercard-title {
2910 2920 padding-top: 5px;
2911 2921 } No newline at end of file
@@ -1,86 +1,105 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.mako"/>
3 3
4 4 <%def name="title()">
5 5 ${_('New Gist')}
6 6 %if c.rhodecode_name:
7 7 &middot; ${h.branding(c.rhodecode_name)}
8 8 %endif
9 9 </%def>
10 10
11 11 <%def name="breadcrumbs_links()"></%def>
12 12
13 13 <%def name="menu_bar_nav()">
14 14 ${self.menu_items(active='gists')}
15 15 </%def>
16 16
17 17 <%def name="main()">
18 18 <div class="box">
19 19 <!-- box / title -->
20 20 <div class="title">
21 21
22 22 </div>
23 23
24 24 <div class="table">
25 25 <div id="files_data">
26 26 ${h.secure_form(h.route_path('gists_create'), id='eform', request=request)}
27 27 <div>
28 28 <span class="gist-gravatar">
29 29 ${self.gravatar(c.rhodecode_user.email, 30)}
30 30 </span>
31 31 <label for='gistid'>${_('Gist id')}</label>
32 32 ${h.text('gistid', placeholder=_('Auto generated'))}
33 33
34 34 <label for='lifetime'>${_('Gist lifetime')}</label>
35 35 ${h.dropdownmenu('lifetime', '', c.lifetime_options)}
36 36
37 37 <label for='acl_level'>${_('Private Gist access level')}</label>
38 38 ${h.dropdownmenu('gist_acl_level', '', c.acl_options)}
39 39
40 40 <textarea style="margin-top: 5px; border-color: #dbd9da" id="description" name="description" placeholder="${_('Gist description ...')}"></textarea>
41 41 </div>
42 42
43 43 <div id="codeblock" class="codeblock">
44 44 <div class="code-header">
45 45 <div class="form">
46 46 <div class="fields">
47 47 ${h.text('filename', size=30, placeholder=_('name gist file...'))}
48 48 ${h.dropdownmenu('mimetype','plain',[('plain',_('plain'))],enable_filter=True)}
49 49 </div>
50 50 </div>
51 51 </div>
52 52
53 53 <div id="editor_container">
54 54 <div id="editor_pre"></div>
55 55 <textarea id="editor" name="content" ></textarea>
56 56 </div>
57 57 </div>
58 58
59 59 <div class="pull-right">
60 <i class="tooltip icon-info" title="${_('Secret gists are hidden from listing, but accessible to anyone who knows the url.')}"></i>
61 ${h.submit('private',_('Create Private Gist'),class_="btn")}
62 ${h.submit('public',_('Create Public Gist'),class_="btn")}
60 ##<i class="tooltip icon-info" title="${_('Secret gists are hidden from listing, but accessible to anyone who knows the url.')}"></i>
61
62 <div class="pull-right">
63 ${h.submit('create',_('Create Gist'),class_="btn")}
64 </div>
65 <div class="rcform-element pull-right">
66 <div class="fields gist-type-fields">
67 <fieldset>
68 <div class="gist-type-fields-wrapper">
69
70 <input type="radio" id="private_gist" checked="" name="gist_type" value="private">
71 <label for="private_gist">${_('Private Gist')}</label>
72 <span class="tooltip label" title="${_('Private Gists are not listed and only accessible through their secret url.')}">${_('Private Gist')}</span>
73
74 <input type="radio" id="public_gist" name="gist_type" value="public">
75 <label for="public_gist">${_('Public Gist')}</label>
76 <span class="tooltip label" title="${_('Public Gists are accessible to anyone and listed in Gists page.')}">${_('Public Gist')}</span>
77 </div>
78 </fieldset>
79 </div>
80 </div>
81
63 82 </div>
64 83 ${h.end_form()}
65 84 </div>
66 85 </div>
67 86
68 87 </div>
69 88
70 89 <script type="text/javascript">
71 90 var myCodeMirror = initCodeMirror('editor', '');
72 91
73 92 var modes_select = $('#mimetype');
74 93 fillCodeMirrorOptions(modes_select);
75 94
76 95 var filename_selector = '#filename';
77 96 // on change of select field set mode
78 97 setCodeMirrorModeFromSelect(
79 98 modes_select, filename_selector, myCodeMirror, null);
80 99
81 100 // on entering the new filename set mode, from given extension
82 101 setCodeMirrorModeFromInput(
83 102 modes_select, filename_selector, myCodeMirror, null);
84 103
85 104 </script>
86 105 </%def>
General Comments 0
You need to be logged in to leave comments. Login now