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