##// END OF EJS Templates
Merge with upstream
Liad Shani -
r1622:d58e514c merge beta
parent child Browse files
Show More
@@ -0,0 +1,129 b''
1 # -*- coding: utf-8 -*-
2 """
3 rhodecode.lib.markup_renderer
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
6
7 Renderer for markup languages with ability to parse using rst or markdown
8
9 :created_on: Oct 27, 2011
10 :author: marcink
11 :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
12 :license: GPLv3, see COPYING for more details.
13 """
14 # This program is free software: you can redistribute it and/or modify
15 # it under the terms of the GNU General Public License as published by
16 # the Free Software Foundation, either version 3 of the License, or
17 # (at your option) any later version.
18 #
19 # This program is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
23 #
24 # You should have received a copy of the GNU General Public License
25 # along with this program. If not, see <http://www.gnu.org/licenses/>.
26
27 import re
28 import logging
29
30 from rhodecode.lib import safe_unicode
31
32 log = logging.getLogger(__name__)
33
34 class MarkupRenderer(object):
35 RESTRUCTUREDTEXT_DISALLOWED_DIRECTIVES = ['include', 'meta', 'raw']
36
37 MARKDOWN_PAT = re.compile(r'md|mkdn?|mdown|markdown',re.IGNORECASE)
38 RST_PAT = re.compile(r're?st',re.IGNORECASE)
39 PLAIN_PAT = re.compile(r'readme',re.IGNORECASE)
40
41 def __detect_renderer(self, source, filename=None):
42 """
43 runs detection of what renderer should be used for generating html
44 from a markup language
45
46 filename can be also explicitly a renderer name
47
48 :param source:
49 :param filename:
50 """
51
52 if MarkupRenderer.MARKDOWN_PAT.findall(filename):
53 detected_renderer = 'markdown'
54 elif MarkupRenderer.RST_PAT.findall(filename):
55 detected_renderer = 'rst'
56 elif MarkupRenderer.PLAIN_PAT.findall(filename):
57 detected_renderer = 'rst'
58 else:
59 detected_renderer = 'plain'
60
61 return getattr(MarkupRenderer, detected_renderer)
62
63
64 def render(self, source, filename=None):
65 """
66 Renders a given filename using detected renderer
67 it detects renderers based on file extension or mimetype.
68 At last it will just do a simple html replacing new lines with <br/>
69
70 :param file_name:
71 :param source:
72 """
73
74 renderer = self.__detect_renderer(source, filename)
75 readme_data = renderer(source)
76 return readme_data
77
78 @classmethod
79 def plain(cls, source):
80 source = safe_unicode(source)
81 def urlify_text(text):
82 url_pat = re.compile(r'(http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]'
83 '|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+)')
84
85 def url_func(match_obj):
86 url_full = match_obj.groups()[0]
87 return '<a href="%(url)s">%(url)s</a>' % ({'url':url_full})
88
89 return url_pat.sub(url_func, text)
90
91 source = urlify_text(source)
92 return '<br />' + source.replace("\n", '<br />')
93
94
95 @classmethod
96 def markdown(cls, source):
97 source = safe_unicode(source)
98 try:
99 import markdown as __markdown
100 return __markdown.markdown(source)
101 except ImportError:
102 log.warning('Install markdown to use this function')
103 return cls.plain(source)
104
105
106 @classmethod
107 def rst(cls, source):
108 source = safe_unicode(source)
109 try:
110 from docutils.core import publish_parts
111 from docutils.parsers.rst import directives
112 docutils_settings = dict([(alias, None) for alias in
113 cls.RESTRUCTUREDTEXT_DISALLOWED_DIRECTIVES])
114
115 docutils_settings.update({'input_encoding': 'unicode',
116 'report_level':4})
117
118 for k, v in docutils_settings.iteritems():
119 directives.register_directive(k, v)
120
121 parts = publish_parts(source=source,
122 writer_name="html4css1",
123 settings_overrides=docutils_settings)
124
125 return parts['html_title'] + parts["fragment"]
126 except ImportError:
127 log.warning('Install docutils to use this function')
128 return cls.plain(source)
129
@@ -0,0 +1,25 b''
1 ## -*- coding: utf-8 -*-
2 <li>
3 ${h.link_to('%s (%s)' % (_('branches'),len(c.rhodecode_repo.branches.values()),),h.url('branches_home',repo_name=c.repo_name),class_='branches childs')}
4 <ul>
5 %if c.rhodecode_repo.branches.values():
6 %for cnt,branch in enumerate(c.rhodecode_repo.branches.items()):
7 <li>${h.link_to('%s - %s' % (branch[0],h.short_id(branch[1])),h.url('files_home',repo_name=c.repo_name,revision=branch[1]))}</li>
8 %endfor
9 %else:
10 <li>${h.link_to(_('There are no branches yet'),'#')}</li>
11 %endif
12 </ul>
13 </li>
14 <li>
15 ${h.link_to('%s (%s)' % (_('tags'),len(c.rhodecode_repo.tags.values()),),h.url('tags_home',repo_name=c.repo_name),class_='tags childs')}
16 <ul>
17 %if c.rhodecode_repo.tags.values():
18 %for cnt,tag in enumerate(c.rhodecode_repo.tags.items()):
19 <li>${h.link_to('%s - %s' % (tag[0],h.short_id(tag[1])),h.url('files_home',repo_name=c.repo_name,revision=tag[1]))}</li>
20 %endfor
21 %else:
22 <li>${h.link_to(_('There are no tags yet'),'#')}</li>
23 %endif
24 </ul>
25 </li> No newline at end of file
@@ -91,21 +91,27 b' beaker.cache.regions=super_short_term,sh'
91
91
92 beaker.cache.super_short_term.type=memory
92 beaker.cache.super_short_term.type=memory
93 beaker.cache.super_short_term.expire=10
93 beaker.cache.super_short_term.expire=10
94 beaker.cache.super_short_term.key_length = 256
94
95
95 beaker.cache.short_term.type=memory
96 beaker.cache.short_term.type=memory
96 beaker.cache.short_term.expire=60
97 beaker.cache.short_term.expire=60
98 beaker.cache.short_term.key_length = 256
97
99
98 beaker.cache.long_term.type=memory
100 beaker.cache.long_term.type=memory
99 beaker.cache.long_term.expire=36000
101 beaker.cache.long_term.expire=36000
102 beaker.cache.long_term.key_length = 256
100
103
101 beaker.cache.sql_cache_short.type=memory
104 beaker.cache.sql_cache_short.type=memory
102 beaker.cache.sql_cache_short.expire=10
105 beaker.cache.sql_cache_short.expire=10
106 beaker.cache.sql_cache_short.key_length = 256
103
107
104 beaker.cache.sql_cache_med.type=memory
108 beaker.cache.sql_cache_med.type=memory
105 beaker.cache.sql_cache_med.expire=360
109 beaker.cache.sql_cache_med.expire=360
110 beaker.cache.sql_cache_med.key_length = 256
106
111
107 beaker.cache.sql_cache_long.type=file
112 beaker.cache.sql_cache_long.type=file
108 beaker.cache.sql_cache_long.expire=3600
113 beaker.cache.sql_cache_long.expire=3600
114 beaker.cache.sql_cache_long.key_length = 256
109
115
110 ####################################
116 ####################################
111 ### BEAKER SESSION ####
117 ### BEAKER SESSION ####
@@ -91,21 +91,27 b' beaker.cache.regions=super_short_term,sh'
91
91
92 beaker.cache.super_short_term.type=memory
92 beaker.cache.super_short_term.type=memory
93 beaker.cache.super_short_term.expire=10
93 beaker.cache.super_short_term.expire=10
94 beaker.cache.super_short_term.key_length = 256
94
95
95 beaker.cache.short_term.type=memory
96 beaker.cache.short_term.type=memory
96 beaker.cache.short_term.expire=60
97 beaker.cache.short_term.expire=60
98 beaker.cache.short_term.key_length = 256
97
99
98 beaker.cache.long_term.type=memory
100 beaker.cache.long_term.type=memory
99 beaker.cache.long_term.expire=36000
101 beaker.cache.long_term.expire=36000
102 beaker.cache.long_term.key_length = 256
100
103
101 beaker.cache.sql_cache_short.type=memory
104 beaker.cache.sql_cache_short.type=memory
102 beaker.cache.sql_cache_short.expire=10
105 beaker.cache.sql_cache_short.expire=10
106 beaker.cache.sql_cache_short.key_length = 256
103
107
104 beaker.cache.sql_cache_med.type=memory
108 beaker.cache.sql_cache_med.type=memory
105 beaker.cache.sql_cache_med.expire=360
109 beaker.cache.sql_cache_med.expire=360
110 beaker.cache.sql_cache_med.key_length = 256
106
111
107 beaker.cache.sql_cache_long.type=file
112 beaker.cache.sql_cache_long.type=file
108 beaker.cache.sql_cache_long.expire=3600
113 beaker.cache.sql_cache_long.expire=3600
114 beaker.cache.sql_cache_long.key_length = 256
109
115
110 ####################################
116 ####################################
111 ### BEAKER SESSION ####
117 ### BEAKER SESSION ####
@@ -93,21 +93,27 b' beaker.cache.regions=super_short_term,sh'
93
93
94 beaker.cache.super_short_term.type=memory
94 beaker.cache.super_short_term.type=memory
95 beaker.cache.super_short_term.expire=10
95 beaker.cache.super_short_term.expire=10
96 beaker.cache.super_short_term.key_length = 256
96
97
97 beaker.cache.short_term.type=memory
98 beaker.cache.short_term.type=memory
98 beaker.cache.short_term.expire=60
99 beaker.cache.short_term.expire=60
100 beaker.cache.short_term.key_length = 256
99
101
100 beaker.cache.long_term.type=memory
102 beaker.cache.long_term.type=memory
101 beaker.cache.long_term.expire=36000
103 beaker.cache.long_term.expire=36000
104 beaker.cache.long_term.key_length = 256
102
105
103 beaker.cache.sql_cache_short.type=memory
106 beaker.cache.sql_cache_short.type=memory
104 beaker.cache.sql_cache_short.expire=10
107 beaker.cache.sql_cache_short.expire=10
108 beaker.cache.sql_cache_short.key_length = 256
105
109
106 beaker.cache.sql_cache_med.type=memory
110 beaker.cache.sql_cache_med.type=memory
107 beaker.cache.sql_cache_med.expire=360
111 beaker.cache.sql_cache_med.expire=360
112 beaker.cache.sql_cache_med.key_length = 256
108
113
109 beaker.cache.sql_cache_long.type=file
114 beaker.cache.sql_cache_long.type=file
110 beaker.cache.sql_cache_long.expire=3600
115 beaker.cache.sql_cache_long.expire=3600
116 beaker.cache.sql_cache_long.key_length = 256
111
117
112 ####################################
118 ####################################
113 ### BEAKER SESSION ####
119 ### BEAKER SESSION ####
@@ -156,6 +162,7 b' sqlalchemy.db1.url = sqlite:///%(here)s/'
156 # MySQL
162 # MySQL
157 # sqlalchemy.db1.url = mysql://user:pass@localhost/rhodecode
163 # sqlalchemy.db1.url = mysql://user:pass@localhost/rhodecode
158
164
165 # see sqlalchemy docs for others
159
166
160 sqlalchemy.db1.echo = false
167 sqlalchemy.db1.echo = false
161 sqlalchemy.db1.pool_recycle = 3600
168 sqlalchemy.db1.pool_recycle = 3600
@@ -62,6 +62,8 b' def make_map(config):'
62 rmap.connect('home', '/', controller='home', action='index')
62 rmap.connect('home', '/', controller='home', action='index')
63 rmap.connect('repo_switcher', '/repos', controller='home',
63 rmap.connect('repo_switcher', '/repos', controller='home',
64 action='repo_switcher')
64 action='repo_switcher')
65 rmap.connect('branch_tag_switcher', '/branches-tags/{repo_name:.*}',
66 controller='home',action='branch_tag_switcher')
65 rmap.connect('bugtracker',
67 rmap.connect('bugtracker',
66 "http://bitbucket.org/marcinkuzminski/rhodecode/issues",
68 "http://bitbucket.org/marcinkuzminski/rhodecode/issues",
67 _static=True)
69 _static=True)
@@ -24,7 +24,6 b''
24 # along with this program. If not, see <http://www.gnu.org/licenses/>.
24 # along with this program. If not, see <http://www.gnu.org/licenses/>.
25
25
26 import logging
26 import logging
27 from operator import itemgetter
28
27
29 from pylons import tmpl_context as c, request
28 from pylons import tmpl_context as c, request
30 from paste.httpexceptions import HTTPBadRequest
29 from paste.httpexceptions import HTTPBadRequest
@@ -58,3 +57,12 b' class HomeController(BaseController):'
58 return render('/repo_switcher_list.html')
57 return render('/repo_switcher_list.html')
59 else:
58 else:
60 return HTTPBadRequest()
59 return HTTPBadRequest()
60
61 def branch_tag_switcher(self, repo_name):
62 if request.is_xhr:
63 c.rhodecode_db_repo = Repository.get_by_repo_name(c.repo_name)
64 c.rhodecode_repo = c.rhodecode_db_repo.scm_instance
65 return render('/switch_to_list.html')
66 else:
67 return HTTPBadRequest()
68
@@ -23,23 +23,27 b''
23 # You should have received a copy of the GNU General Public License
23 # You should have received a copy of the GNU General Public License
24 # along with this program. If not, see <http://www.gnu.org/licenses/>.
24 # along with this program. If not, see <http://www.gnu.org/licenses/>.
25
25
26 import traceback
26 import calendar
27 import calendar
27 import logging
28 import logging
28 from time import mktime
29 from time import mktime
29 from datetime import datetime, timedelta, date
30 from datetime import timedelta, date
31 from itertools import product
30
32
31 from vcs.exceptions import ChangesetError
33 from vcs.exceptions import ChangesetError, EmptyRepositoryError, \
34 NodeDoesNotExistError
32
35
33 from pylons import tmpl_context as c, request, url
36 from pylons import tmpl_context as c, request, url
34 from pylons.i18n.translation import _
37 from pylons.i18n.translation import _
35
38
36 from rhodecode.model.db import Statistics, Repository
39 from beaker.cache import cache_region, region_invalidate
37 from rhodecode.model.repo import RepoModel
38
40
41 from rhodecode.model.db import Statistics, CacheInvalidation
42 from rhodecode.lib import ALL_READMES, ALL_EXTS
39 from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
43 from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
40 from rhodecode.lib.base import BaseRepoController, render
44 from rhodecode.lib.base import BaseRepoController, render
41 from rhodecode.lib.utils import EmptyChangeset
45 from rhodecode.lib.utils import EmptyChangeset
42
46 from rhodecode.lib.markup_renderer import MarkupRenderer
43 from rhodecode.lib.celerylib import run_task
47 from rhodecode.lib.celerylib import run_task
44 from rhodecode.lib.celerylib.tasks import get_commits_stats, \
48 from rhodecode.lib.celerylib.tasks import get_commits_stats, \
45 LANGUAGES_EXTENSIONS_MAP
49 LANGUAGES_EXTENSIONS_MAP
@@ -48,6 +52,9 b' from rhodecode.lib.compat import json, O'
48
52
49 log = logging.getLogger(__name__)
53 log = logging.getLogger(__name__)
50
54
55 README_FILES = [''.join([x[0][0], x[1][0]]) for x in
56 sorted(list(product(ALL_READMES, ALL_EXTS)),
57 key=lambda y:y[0][1] + y[1][1])]
51
58
52 class SummaryController(BaseRepoController):
59 class SummaryController(BaseRepoController):
53
60
@@ -161,8 +168,44 b' class SummaryController(BaseRepoControll'
161 if c.enable_downloads:
168 if c.enable_downloads:
162 c.download_options = self._get_download_links(c.rhodecode_repo)
169 c.download_options = self._get_download_links(c.rhodecode_repo)
163
170
171 c.readme_data, c.readme_file = self.__get_readme_data(c.rhodecode_repo)
164 return render('summary/summary.html')
172 return render('summary/summary.html')
165
173
174 def __get_readme_data(self, repo):
175
176 @cache_region('long_term')
177 def _get_readme_from_cache(key):
178 readme_data = None
179 readme_file = None
180 log.debug('Fetching readme file')
181 try:
182 cs = repo.get_changeset('tip')
183 renderer = MarkupRenderer()
184 for f in README_FILES:
185 try:
186 readme = cs.get_node(f)
187 readme_file = f
188 readme_data = renderer.render(readme.content, f)
189 log.debug('Found readme %s' % readme_file)
190 break
191 except NodeDoesNotExistError:
192 continue
193 except ChangesetError:
194 pass
195 except EmptyRepositoryError:
196 pass
197 except Exception:
198 log.error(traceback.format_exc())
199
200 return readme_data, readme_file
201
202 key = repo.name + '_README'
203 inv = CacheInvalidation.invalidate(key)
204 if inv is not None:
205 region_invalidate(_get_readme_from_cache, None, key)
206 CacheInvalidation.set_valid(inv.cache_key)
207 return _get_readme_from_cache(key)
208
166 def _get_download_links(self, repo):
209 def _get_download_links(self, repo):
167
210
168 download_l = []
211 download_l = []
@@ -181,3 +224,4 b' class SummaryController(BaseRepoControll'
181 download_l.append(tags_group)
224 download_l.append(tags_group)
182
225
183 return download_l
226 return download_l
227
@@ -66,6 +66,34 b" ADDITIONAL_MAPPINGS = {'xaml': 'XAML'}"
66
66
67 LANGUAGES_EXTENSIONS_MAP.update(ADDITIONAL_MAPPINGS)
67 LANGUAGES_EXTENSIONS_MAP.update(ADDITIONAL_MAPPINGS)
68
68
69 # list of readme files to search in file tree and display in summary
70 # attached weights defines the search order lower is first
71 ALL_READMES = [
72 ('readme', 0), ('README', 0), ('Readme', 0),
73 ('doc/readme', 1), ('doc/README', 1), ('doc/Readme', 1),
74 ('Docs/readme', 2), ('Docs/README', 2), ('Docs/Readme', 2),
75 ('DOCS/readme', 2), ('DOCS/README', 2), ('DOCS/Readme', 2),
76 ('docs/readme', 2), ('docs/README', 2), ('docs/Readme', 2),
77 ]
78
79 # extension together with weights to search lower is first
80 RST_EXTS = [
81 ('', 0), ('.rst', 1),('.rest', 1),
82 ('.RST', 2) ,('.REST', 2),
83 ('.txt', 3), ('.TXT', 3)
84 ]
85
86 MARKDOWN_EXTS = [
87 ('.md', 1), ('.MD', 1),
88 ('.mkdn', 2), ('.MKDN', 2),
89 ('.mdown', 3), ('.MDOWN', 3),
90 ('.markdown', 4), ('.MARKDOWN', 4)
91 ]
92
93 PLAIN_EXTS = [('.text', 2),('.TEXT', 2)]
94
95 ALL_EXTS = MARKDOWN_EXTS + RST_EXTS + PLAIN_EXTS
96
69
97
70 def str2bool(_str):
98 def str2bool(_str):
71 """
99 """
@@ -195,6 +223,9 b" def safe_str(unicode_, to_encoding='utf8"
195 :rtype: str
223 :rtype: str
196 :returns: str object
224 :returns: str object
197 """
225 """
226
227 if not isinstance(unicode_, basestring):
228 return str(unicode_)
198
229
199 if isinstance(unicode_, str):
230 if isinstance(unicode_, str):
200 return unicode_
231 return unicode_
@@ -3,7 +3,7 b''
3 Provides the BaseController class for subclassing.
3 Provides the BaseController class for subclassing.
4 """
4 """
5 import logging
5 import logging
6
6 import time
7 from pylons import config, tmpl_context as c, request, session, url
7 from pylons import config, tmpl_context as c, request, session, url
8 from pylons.controllers import WSGIController
8 from pylons.controllers import WSGIController
9 from pylons.controllers.util import redirect
9 from pylons.controllers.util import redirect
@@ -40,6 +40,7 b' class BaseController(WSGIController):'
40 # WSGIController.__call__ dispatches to the Controller method
40 # WSGIController.__call__ dispatches to the Controller method
41 # the request is routed to. This routing information is
41 # the request is routed to. This routing information is
42 # available in environ['pylons.routes_dict']
42 # available in environ['pylons.routes_dict']
43 start = time.time()
43 try:
44 try:
44 # putting this here makes sure that we update permissions each time
45 # putting this here makes sure that we update permissions each time
45 api_key = request.GET.get('api_key')
46 api_key = request.GET.get('api_key')
@@ -59,6 +60,7 b' class BaseController(WSGIController):'
59 session.save()
60 session.save()
60 return WSGIController.__call__(self, environ, start_response)
61 return WSGIController.__call__(self, environ, start_response)
61 finally:
62 finally:
63 log.debug('Request time: %.3fs' % (time.time()-start))
62 meta.Session.remove()
64 meta.Session.remove()
63
65
64
66
@@ -36,7 +36,7 b' from pylons import config'
36
36
37 from vcs.utils.lazy import LazyProperty
37 from vcs.utils.lazy import LazyProperty
38
38
39 from rhodecode.lib import str2bool
39 from rhodecode.lib import str2bool, safe_str
40 from rhodecode.lib.pidlock import DaemonLock, LockHeld
40 from rhodecode.lib.pidlock import DaemonLock, LockHeld
41
41
42 from celery.messaging import establish_connection
42 from celery.messaging import establish_connection
@@ -87,7 +87,7 b' def __get_lockkey(func, *fargs, **fkwarg'
87 func_name = str(func.__name__) if hasattr(func, '__name__') else str(func)
87 func_name = str(func.__name__) if hasattr(func, '__name__') else str(func)
88
88
89 lockkey = 'task_%s.lock' % \
89 lockkey = 'task_%s.lock' % \
90 md5(func_name + '-' + '-'.join(map(str, params))).hexdigest()
90 md5(func_name + '-' + '-'.join(map(safe_str, params))).hexdigest()
91 return lockkey
91 return lockkey
92
92
93
93
@@ -663,29 +663,13 b' class Repository(Base, BaseModel):'
663
663
664 @property
664 @property
665 def invalidate(self):
665 def invalidate(self):
666 """
666 return CacheInvalidation.invalidate(self.repo_name)
667 Returns Invalidation object if this repo should be invalidated
668 None otherwise. `cache_active = False` means that this cache
669 state is not valid and needs to be invalidated
670 """
671 return CacheInvalidation.query()\
672 .filter(CacheInvalidation.cache_key == self.repo_name)\
673 .filter(CacheInvalidation.cache_active == False)\
674 .scalar()
675
667
676 def set_invalidate(self):
668 def set_invalidate(self):
677 """
669 """
678 set a cache for invalidation for this instance
670 set a cache for invalidation for this instance
679 """
671 """
680 inv = CacheInvalidation.query()\
672 CacheInvalidation.set_invalidate(self.repo_name)
681 .filter(CacheInvalidation.cache_key == self.repo_name)\
682 .scalar()
683
684 if inv is None:
685 inv = CacheInvalidation(self.repo_name)
686 inv.cache_active = True
687 Session.add(inv)
688 Session.commit()
689
673
690 @LazyProperty
674 @LazyProperty
691 def scm_instance(self):
675 def scm_instance(self):
@@ -696,19 +680,13 b' class Repository(Base, BaseModel):'
696 @cache_region('long_term')
680 @cache_region('long_term')
697 def _c(repo_name):
681 def _c(repo_name):
698 return self.__get_instance()
682 return self.__get_instance()
699
683 rn = self.repo_name
700 # TODO: remove this trick when beaker 1.6 is released
701 # and have fixed this issue with not supporting unicode keys
702 rn = safe_str(self.repo_name)
703
684
704 inv = self.invalidate
685 inv = self.invalidate
705 if inv is not None:
686 if inv is not None:
706 region_invalidate(_c, None, rn)
687 region_invalidate(_c, None, rn)
707 # update our cache
688 # update our cache
708 inv.cache_active = True
689 CacheInvalidation.set_valid(inv.cache_key)
709 Session.add(inv)
710 Session.commit()
711
712 return _c(rn)
690 return _c(rn)
713
691
714 def __get_instance(self):
692 def __get_instance(self):
@@ -730,7 +708,7 b' class Repository(Base, BaseModel):'
730
708
731 repo = backend(safe_str(repo_full_path), create=False,
709 repo = backend(safe_str(repo_full_path), create=False,
732 baseui=self._ui)
710 baseui=self._ui)
733 #skip hidden web repository
711 # skip hidden web repository
734 if repo._get_hidden():
712 if repo._get_hidden():
735 return
713 return
736 else:
714 else:
@@ -855,7 +833,7 b' class Group(Base, BaseModel):'
855
833
856 :param group_name:
834 :param group_name:
857 """
835 """
858 path_prefix = (self.parent_group.full_path_splitted if
836 path_prefix = (self.parent_group.full_path_splitted if
859 self.parent_group else [])
837 self.parent_group else [])
860 return Group.url_sep().join(path_prefix + [group_name])
838 return Group.url_sep().join(path_prefix + [group_name])
861
839
@@ -1060,6 +1038,57 b' class CacheInvalidation(Base, BaseModel)'
1060 return "<%s('%s:%s')>" % (self.__class__.__name__,
1038 return "<%s('%s:%s')>" % (self.__class__.__name__,
1061 self.cache_id, self.cache_key)
1039 self.cache_id, self.cache_key)
1062
1040
1041 @classmethod
1042 def invalidate(cls, key):
1043 """
1044 Returns Invalidation object if this given key should be invalidated
1045 None otherwise. `cache_active = False` means that this cache
1046 state is not valid and needs to be invalidated
1047
1048 :param key:
1049 """
1050 return cls.query()\
1051 .filter(CacheInvalidation.cache_key == key)\
1052 .filter(CacheInvalidation.cache_active == False)\
1053 .scalar()
1054
1055 @classmethod
1056 def set_invalidate(cls, key):
1057 """
1058 Mark this Cache key for invalidation
1059
1060 :param key:
1061 """
1062
1063 log.debug('marking %s for invalidation' % key)
1064 inv_obj = Session().query(cls)\
1065 .filter(cls.cache_key == key).scalar()
1066 if inv_obj:
1067 inv_obj.cache_active = False
1068 else:
1069 log.debug('cache key not found in invalidation db -> creating one')
1070 inv_obj = CacheInvalidation(key)
1071
1072 try:
1073 Session.add(inv_obj)
1074 Session.commit()
1075 except Exception:
1076 log.error(traceback.format_exc())
1077 Session.rollback()
1078
1079 @classmethod
1080 def set_valid(cls, key):
1081 """
1082 Mark this cache key as active and currently cached
1083
1084 :param key:
1085 """
1086 inv_obj = Session().query(CacheInvalidation)\
1087 .filter(CacheInvalidation.cache_key == key).scalar()
1088 inv_obj.cache_active = True
1089 Session.add(inv_obj)
1090 Session.commit()
1091
1063 class DbMigrateVersion(Base, BaseModel):
1092 class DbMigrateVersion(Base, BaseModel):
1064 __tablename__ = 'db_migrate_version'
1093 __tablename__ = 'db_migrate_version'
1065 __table_args__ = {'extend_existing':True}
1094 __table_args__ = {'extend_existing':True}
@@ -197,24 +197,8 b' class ScmModel(BaseModel):'
197
197
198 :param repo_name: this repo that should invalidation take place
198 :param repo_name: this repo that should invalidation take place
199 """
199 """
200
200 CacheInvalidation.set_invalidate(repo_name)
201 log.debug('marking %s for invalidation', repo_name)
201 CacheInvalidation.set_invalidate(repo_name+"_README")
202 cache = self.sa.query(CacheInvalidation)\
203 .filter(CacheInvalidation.cache_key == repo_name).scalar()
204
205 if cache:
206 # mark this cache as inactive
207 cache.cache_active = False
208 else:
209 log.debug('cache key not found in invalidation db -> creating one')
210 cache = CacheInvalidation(repo_name)
211
212 try:
213 self.sa.add(cache)
214 self.sa.commit()
215 except (DatabaseError,):
216 log.error(traceback.format_exc())
217 self.sa.rollback()
218
202
219 def toggle_following_repo(self, follow_repo_id, user_id):
203 def toggle_following_repo(self, follow_repo_id, user_id):
220
204
@@ -395,20 +379,5 b' class ScmModel(BaseModel):'
395
379
396 self.mark_for_invalidation(repo_name)
380 self.mark_for_invalidation(repo_name)
397
381
398
399 def get_unread_journal(self):
382 def get_unread_journal(self):
400 return self.sa.query(UserLog).count()
383 return self.sa.query(UserLog).count()
401
402 def _should_invalidate(self, repo_name):
403 """Looks up database for invalidation signals for this repo_name
404
405 :param repo_name:
406 """
407
408 ret = self.sa.query(CacheInvalidation)\
409 .filter(CacheInvalidation.cache_key == repo_name)\
410 .filter(CacheInvalidation.cache_active == False)\
411 .scalar()
412
413 return ret
414
This diff has been collapsed as it changes many lines, (4554 lines changed) Show them Hide them
@@ -1,2756 +1,3112 b''
1 html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td {
1 html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td
2 border:0;
2 {
3 outline:0;
3 border: 0;
4 font-size:100%;
4 outline: 0;
5 vertical-align:baseline;
5 font-size: 100%;
6 background:transparent;
6 vertical-align: baseline;
7 margin:0;
7 background: transparent;
8 padding:0;
8 margin: 0;
9 padding: 0;
9 }
10 }
10
11
11 body {
12 body {
12 line-height:1;
13 line-height: 1;
13 height:100%;
14 height: 100%;
14 background:url("../images/background.png") repeat scroll 0 0 #B0B0B0;
15 background: url("../images/background.png") repeat scroll 0 0 #B0B0B0;
15 font-family:Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif;
16 font-family: Lucida Grande, Verdana, Lucida Sans Regular,
16 font-size:12px;
17 Lucida Sans Unicode, Arial, sans-serif; font-size : 12px;
17 color:#000;
18 color: #000;
18 margin:0;
19 margin: 0;
19 padding:0;
20 padding: 0;
21 font-size: 12px;
20 }
22 }
21
23
22 ol,ul {
24 ol,ul {
23 list-style:none;
25 list-style: none;
24 }
26 }
25
27
26 blockquote,q {
28 blockquote,q {
27 quotes:none;
29 quotes: none;
28 }
30 }
29
31
30 blockquote:before,blockquote:after,q:before,q:after {
32 blockquote:before,blockquote:after,q:before,q:after {
31 content:none;
33 content: none;
32 }
34 }
33
35
34 :focus {
36 :focus {
35 outline:0;
37 outline: 0;
36 }
38 }
37
39
38 del {
40 del {
39 text-decoration:line-through;
41 text-decoration: line-through;
40 }
42 }
41
43
42 table {
44 table {
43 border-collapse:collapse;
45 border-collapse: collapse;
44 border-spacing:0;
46 border-spacing: 0;
45 }
47 }
46
48
47 html {
49 html {
48 height:100%;
50 height: 100%;
49 }
51 }
50
52
51 a {
53 a {
52 color:#003367;
54 color: #003367;
53 text-decoration:none;
55 text-decoration: none;
54 cursor:pointer;
56 cursor: pointer;
55 }
57 }
56
58
57 a:hover {
59 a:hover {
58 color:#316293;
60 color: #316293;
59 text-decoration:underline;
61 text-decoration: underline;
60 }
62 }
61
63
62 h1,h2,h3,h4,h5,h6 {
64 h1,h2,h3,h4,h5,h6 {
63 color:#292929;
65 color: #292929;
64 font-weight:700;
66 font-weight: 700;
65 }
67 }
66
68
67 h1 {
69 h1 {
68 font-size:22px;
70 font-size: 22px;
69 }
71 }
70
72
71 h2 {
73 h2 {
72 font-size:20px;
74 font-size: 20px;
73 }
75 }
74
76
75 h3 {
77 h3 {
76 font-size:18px;
78 font-size: 18px;
77 }
79 }
78
80
79 h4 {
81 h4 {
80 font-size:16px;
82 font-size: 16px;
81 }
83 }
82
84
83 h5 {
85 h5 {
84 font-size:14px;
86 font-size: 14px;
85 }
87 }
86
88
87 h6 {
89 h6 {
88 font-size:11px;
90 font-size: 11px;
89 }
91 }
90
92
91 ul.circle {
93 ul.circle {
92 list-style-type:circle;
94 list-style-type: circle;
93 }
95 }
94
96
95 ul.disc {
97 ul.disc {
96 list-style-type:disc;
98 list-style-type: disc;
97 }
99 }
98
100
99 ul.square {
101 ul.square {
100 list-style-type:square;
102 list-style-type: square;
101 }
103 }
102
104
103 ol.lower-roman {
105 ol.lower-roman {
104 list-style-type:lower-roman;
106 list-style-type: lower-roman;
105 }
107 }
106
108
107 ol.upper-roman {
109 ol.upper-roman {
108 list-style-type:upper-roman;
110 list-style-type: upper-roman;
109 }
111 }
110
112
111 ol.lower-alpha {
113 ol.lower-alpha {
112 list-style-type:lower-alpha;
114 list-style-type: lower-alpha;
113 }
115 }
114
116
115 ol.upper-alpha {
117 ol.upper-alpha {
116 list-style-type:upper-alpha;
118 list-style-type: upper-alpha;
117 }
119 }
118
120
119 ol.decimal {
121 ol.decimal {
120 list-style-type:decimal;
122 list-style-type: decimal;
121 }
123 }
122
124
123 div.color {
125 div.color {
124 clear:both;
126 clear: both;
125 overflow:hidden;
127 overflow: hidden;
126 position:absolute;
128 position: absolute;
127 background:#FFF;
129 background: #FFF;
128 margin:7px 0 0 60px;
130 margin: 7px 0 0 60px;
129 padding:1px 1px 1px 0;
131 padding: 1px 1px 1px 0;
130 }
132 }
131
133
132 div.color a {
134 div.color a {
133 width:15px;
135 width: 15px;
134 height:15px;
136 height: 15px;
135 display:block;
137 display: block;
136 float:left;
138 float: left;
137 margin:0 0 0 1px;
139 margin: 0 0 0 1px;
138 padding:0;
140 padding: 0;
139 }
141 }
140
142
141 div.options {
143 div.options {
142 clear:both;
144 clear: both;
143 overflow:hidden;
145 overflow: hidden;
144 position:absolute;
146 position: absolute;
145 background:#FFF;
147 background: #FFF;
146 margin:7px 0 0 162px;
148 margin: 7px 0 0 162px;
147 padding:0;
149 padding: 0;
148 }
150 }
149
151
150 div.options a {
152 div.options a {
151 height:1%;
153 height: 1%;
152 display:block;
154 display: block;
153 text-decoration:none;
155 text-decoration: none;
154 margin:0;
156 margin: 0;
155 padding:3px 8px;
157 padding: 3px 8px;
156 }
158 }
157
159
158 .top-left-rounded-corner {
160 .top-left-rounded-corner {
159 -webkit-border-top-left-radius: 8px;
161 -webkit-border-top-left-radius: 8px;
160 -khtml-border-radius-topleft: 8px;
162 -khtml-border-radius-topleft: 8px;
161 -moz-border-radius-topleft: 8px;
163 -moz-border-radius-topleft: 8px;
162 border-top-left-radius: 8px;
164 border-top-left-radius: 8px;
163 }
165 }
164
166
165 .top-right-rounded-corner {
167 .top-right-rounded-corner {
166 -webkit-border-top-right-radius: 8px;
168 -webkit-border-top-right-radius: 8px;
167 -khtml-border-radius-topright: 8px;
169 -khtml-border-radius-topright: 8px;
168 -moz-border-radius-topright: 8px;
170 -moz-border-radius-topright: 8px;
169 border-top-right-radius: 8px;
171 border-top-right-radius: 8px;
170 }
172 }
171
173
172 .bottom-left-rounded-corner {
174 .bottom-left-rounded-corner {
173 -webkit-border-bottom-left-radius: 8px;
175 -webkit-border-bottom-left-radius: 8px;
174 -khtml-border-radius-bottomleft: 8px;
176 -khtml-border-radius-bottomleft: 8px;
175 -moz-border-radius-bottomleft: 8px;
177 -moz-border-radius-bottomleft: 8px;
176 border-bottom-left-radius: 8px;
178 border-bottom-left-radius: 8px;
177 }
179 }
178
180
179 .bottom-right-rounded-corner {
181 .bottom-right-rounded-corner {
180 -webkit-border-bottom-right-radius: 8px;
182 -webkit-border-bottom-right-radius: 8px;
181 -khtml-border-radius-bottomright: 8px;
183 -khtml-border-radius-bottomright: 8px;
182 -moz-border-radius-bottomright: 8px;
184 -moz-border-radius-bottomright: 8px;
183 border-bottom-right-radius: 8px;
185 border-bottom-right-radius: 8px;
184 }
186 }
185
186
187
187 #header {
188 #header {
188 margin:0;
189 margin: 0;
189 padding:0 10px;
190 padding: 0 10px;
190 }
191 }
191
192
192
193 #header ul#logged-user {
193 #header ul#logged-user{
194 margin-bottom: 5px !important;
194 margin-bottom:5px !important;
195 -webkit-border-radius: 0px 0px 8px 8px;
195 -webkit-border-radius: 0px 0px 8px 8px;
196 -khtml-border-radius: 0px 0px 8px 8px;
196 -khtml-border-radius: 0px 0px 8px 8px;
197 -moz-border-radius: 0px 0px 8px 8px;
197 -moz-border-radius: 0px 0px 8px 8px;
198 border-radius: 0px 0px 8px 8px;
198 border-radius: 0px 0px 8px 8px;
199 height: 37px;
199 height:37px;
200 background-color: #eedc94;
200 background:url("../images/header_inner.png") repeat-x scroll 0 0 #003367;
201 background-repeat: repeat-x;
201 box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
202 background-image: -khtml-gradient(linear, left top, left bottom, from(#fceec1),
203 to(#eedc94) );
204 background-image: -moz-linear-gradient(top, #003b76, #00376e);
205 background-image: -ms-linear-gradient(top, #003b76, #00376e);
206 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #003b76),
207 color-stop(100%, #00376e) );
208 background-image: -webkit-linear-gradient(top, #003b76, #00376e) );
209 background-image: -o-linear-gradient(top, #003b76, #00376e) );
210 background-image: linear-gradient(top, #003b76, #00376e);
211 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#003b76',
212 endColorstr='#00376e', GradientType=0 );
213 box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
202 }
214 }
203
215
204 #header ul#logged-user li {
216 #header ul#logged-user li {
205 list-style:none;
217 list-style: none;
206 float:left;
218 float: left;
207 margin:8px 0 0;
219 margin: 8px 0 0;
208 padding:4px 12px;
220 padding: 4px 12px;
209 border-left: 1px solid #316293;
221 border-left: 1px solid #316293;
210 }
222 }
211
223
212 #header ul#logged-user li.first {
224 #header ul#logged-user li.first {
213 border-left:none;
225 border-left: none;
214 margin:4px;
226 margin: 4px;
215 }
227 }
216
228
217 #header ul#logged-user li.first div.gravatar {
229 #header ul#logged-user li.first div.gravatar {
218 margin-top:-2px;
230 margin-top: -2px;
219 }
231 }
220
232
221 #header ul#logged-user li.first div.account {
233 #header ul#logged-user li.first div.account {
222 padding-top:4px;
234 padding-top: 4px;
223 float:left;
235 float: left;
224 }
236 }
225
237
226 #header ul#logged-user li.last {
238 #header ul#logged-user li.last {
227 border-right:none;
239 border-right: none;
228 }
240 }
229
241
230 #header ul#logged-user li a {
242 #header ul#logged-user li a {
231 color:#fff;
243 color: #fff;
232 font-weight:700;
244 font-weight: 700;
233 text-decoration:none;
245 text-decoration: none;
234 }
246 }
235
247
236 #header ul#logged-user li a:hover {
248 #header ul#logged-user li a:hover {
237 text-decoration:underline;
249 text-decoration: underline;
238 }
250 }
239
251
240 #header ul#logged-user li.highlight a {
252 #header ul#logged-user li.highlight a {
241 color:#fff;
253 color: #fff;
242 }
254 }
243
255
244 #header ul#logged-user li.highlight a:hover {
256 #header ul#logged-user li.highlight a:hover {
245 color:#FFF;
257 color: #FFF;
246 }
258 }
247
259
248 #header #header-inner {
260 #header #header-inner {
249 min-height:40px;
261 min-height: 40px;
250 clear:both;
262 clear: both;
251 position:relative;
263 position: relative;
252 background:#003367 url("../images/header_inner.png") repeat-x;
264 background-color: #eedc94;
253 margin:0;
265 background-repeat: repeat-x;
254 padding:0;
266 background-image: -khtml-gradient(linear, left top, left bottom, from(#fceec1),
255 display:block;
267 to(#eedc94) );
256 box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
268 background-image: -moz-linear-gradient(top, #003b76, #00376e);
257 -webkit-border-radius: 4px 4px 4px 4px;
269 background-image: -ms-linear-gradient(top, #003b76, #00376e);
258 -khtml-border-radius: 4px 4px 4px 4px;
270 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #003b76),
259 -moz-border-radius: 4px 4px 4px 4px;
271 color-stop(100%, #00376e) );
260 border-radius: 4px 4px 4px 4px;
272 background-image: -webkit-linear-gradient(top, #003b76, #00376e) );
261 }
273 background-image: -o-linear-gradient(top, #003b76, #00376e) );
262
274 background-image: linear-gradient(top, #003b76, #00376e);
275 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#003b76',
276 endColorstr='#00376e', GradientType=0 );
277 margin: 0;
278 padding: 0;
279 display: block;
280 box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
281 -webkit-border-radius: 4px 4px 4px 4px;
282 -khtml-border-radius: 4px 4px 4px 4px;
283 -moz-border-radius: 4px 4px 4px 4px;
284 border-radius: 4px 4px 4px 4px;
285 }
286 #header #header-inner.hover{
287 position: fixed !important;
288 width: 100% !important;
289 margin-left: -10px !important;
290 z-index: 10000;
291 border-radius: 0px 0px 4px 4px;
292 }
263 #header #header-inner #home a {
293 #header #header-inner #home a {
264 height:40px;
294 height: 40px;
265 width:46px;
295 width: 46px;
266 display:block;
296 display: block;
267 background:url("../images/button_home.png");
297 background: url("../images/button_home.png");
268 background-position:0 0;
298 background-position: 0 0;
269 margin:0;
299 margin: 0;
270 padding:0;
300 padding: 0;
271 }
301 }
272
302
273 #header #header-inner #home a:hover {
303 #header #header-inner #home a:hover {
274 background-position:0 -40px;
304 background-position: 0 -40px;
275 }
305 }
306
276 #header #header-inner #logo {
307 #header #header-inner #logo {
277 float: left;
308 float: left;
278 position: absolute;
309 position: absolute;
279 }
310 }
311
280 #header #header-inner #logo h1 {
312 #header #header-inner #logo h1 {
281 color:#FFF;
313 color: #FFF;
282 font-size:18px;
314 font-size: 18px;
283 margin:10px 0 0 13px;
315 margin: 10px 0 0 13px;
284 padding:0;
316 padding: 0;
285 }
317 }
286
318
287 #header #header-inner #logo a {
319 #header #header-inner #logo a {
288 color:#fff;
320 color: #fff;
289 text-decoration:none;
321 text-decoration: none;
290 }
322 }
291
323
292 #header #header-inner #logo a:hover {
324 #header #header-inner #logo a:hover {
293 color:#bfe3ff;
325 color: #bfe3ff;
294 }
326 }
295
327
296 #header #header-inner #quick,#header #header-inner #quick ul {
328 #header #header-inner #quick,#header #header-inner #quick ul {
297 position:relative;
329 position: relative;
298 float:right;
330 float: right;
299 list-style-type:none;
331 list-style-type: none;
300 list-style-position:outside;
332 list-style-position: outside;
301 margin:6px 5px 0 0;
333 margin: 6px 5px 0 0;
302 padding:0;
334 padding: 0;
303 }
335 }
304
336
305 #header #header-inner #quick li {
337 #header #header-inner #quick li {
306 position:relative;
338 position: relative;
307 float:left;
339 float: left;
308 margin:0 5px 0 0;
340 margin: 0 5px 0 0;
309 padding:0;
341 padding: 0;
310 }
342 }
311
343
312 #header #header-inner #quick li a {
344 #header #header-inner #quick li a {
313 top:0;
345 top: 0;
314 left:0;
346 left: 0;
315 height:1%;
347 height: 1%;
316 display:block;
348 display: block;
317 clear:both;
349 clear: both;
318 overflow:hidden;
350 overflow: hidden;
319 color:#FFF;
351 color: #FFF;
320 font-weight:700;
352 font-weight: 700;
321 text-decoration:none;
353 text-decoration: none;
322 background:#369;
354 background: #369;
323 padding:0;
355 padding: 0;
324 -webkit-border-radius: 4px 4px 4px 4px;
356 -webkit-border-radius: 4px 4px 4px 4px;
325 -khtml-border-radius: 4px 4px 4px 4px;
357 -khtml-border-radius: 4px 4px 4px 4px;
326 -moz-border-radius: 4px 4px 4px 4px;
358 -moz-border-radius: 4px 4px 4px 4px;
327 border-radius: 4px 4px 4px 4px;
359 border-radius: 4px 4px 4px 4px;
328 }
360 }
329
361
330 #header #header-inner #quick li span.short {
362 #header #header-inner #quick li span.short {
331 padding:9px 6px 8px 6px;
363 padding: 9px 6px 8px 6px;
332 }
364 }
333
365
334 #header #header-inner #quick li span {
366 #header #header-inner #quick li span {
335 top:0;
367 top: 0;
336 right:0;
368 right: 0;
337 height:1%;
369 height: 1%;
338 display:block;
370 display: block;
339 float:left;
371 float: left;
340 border-left:1px solid #3f6f9f;
372 border-left: 1px solid #3f6f9f;
341 margin:0;
373 margin: 0;
342 padding:10px 12px 8px 10px;
374 padding: 10px 12px 8px 10px;
343 }
375 }
344
376
345 #header #header-inner #quick li span.normal {
377 #header #header-inner #quick li span.normal {
346 border:none;
378 border: none;
347 padding:10px 12px 8px;
379 padding: 10px 12px 8px;
348 }
380 }
349
381
350 #header #header-inner #quick li span.icon {
382 #header #header-inner #quick li span.icon {
351 top:0;
383 top: 0;
352 left:0;
384 left: 0;
353 border-left:none;
385 border-left: none;
354 border-right:1px solid #2e5c89;
386 border-right: 1px solid #2e5c89;
355 padding:8px 6px 4px;
387 padding: 8px 6px 4px;
356 }
388 }
357
389
358 #header #header-inner #quick li span.icon_short {
390 #header #header-inner #quick li span.icon_short {
359 top:0;
391 top: 0;
360 left:0;
392 left: 0;
361 border-left:none;
393 border-left: none;
362 border-right:1px solid #2e5c89;
394 border-right: 1px solid #2e5c89;
363 padding:8px 6px 4px;
395 padding: 8px 6px 4px;
364 }
396 }
365 #header #header-inner #quick li span.icon img, #header #header-inner #quick li span.icon_short img {
397
398 #header #header-inner #quick li span.icon img,#header #header-inner #quick li span.icon_short img
399 {
366 margin: 0px -2px 0px 0px;
400 margin: 0px -2px 0px 0px;
367 }
401 }
368
402
369 #header #header-inner #quick li a:hover {
403 #header #header-inner #quick li a:hover {
370 background:#4e4e4e no-repeat top left;
404 background: #4e4e4e no-repeat top left;
371 }
405 }
372
406
373 #header #header-inner #quick li a:hover span {
407 #header #header-inner #quick li a:hover span {
374 border-left:1px solid #545454;
408 border-left: 1px solid #545454;
375 }
409 }
376
410
377 #header #header-inner #quick li a:hover span.icon,#header #header-inner #quick li a:hover span.icon_short {
411 #header #header-inner #quick li a:hover span.icon,#header #header-inner #quick li a:hover span.icon_short
378 border-left:none;
412 {
379 border-right:1px solid #464646;
413 border-left: none;
414 border-right: 1px solid #464646;
380 }
415 }
381
416
382 #header #header-inner #quick ul {
417 #header #header-inner #quick ul {
383 top:29px;
418 top: 29px;
384 right:0;
419 right: 0;
385 min-width:200px;
420 min-width: 200px;
386 display:none;
421 display: none;
387 position:absolute;
422 position: absolute;
388 background:#FFF;
423 background: #FFF;
389 border:1px solid #666;
424 border: 1px solid #666;
390 border-top:1px solid #003367;
425 border-top: 1px solid #003367;
391 z-index:100;
426 z-index: 100;
392 margin:0;
427 margin: 0;
393 padding:0;
428 padding: 0;
394 }
429 }
395
430
396 #header #header-inner #quick ul.repo_switcher {
431 #header #header-inner #quick ul.repo_switcher {
397 max-height:275px;
432 max-height: 275px;
398 overflow-x:hidden;
433 overflow-x: hidden;
399 overflow-y:auto;
434 overflow-y: auto;
400 }
435 }
436
401 #header #header-inner #quick ul.repo_switcher li.qfilter_rs {
437 #header #header-inner #quick ul.repo_switcher li.qfilter_rs {
402 float:none;
438 float: none;
403 margin:0;
439 margin: 0;
404 border-bottom:2px solid #003367;
440 border-bottom: 2px solid #003367;
405 }
441 }
406
442
407
443 #header #header-inner #quick .repo_switcher_type {
408 #header #header-inner #quick .repo_switcher_type{
444 position: absolute;
409 position:absolute;
445 left: 0;
410 left:0;
446 top: 9px;
411 top:9px;
447 }
412
448
413 }
414 #header #header-inner #quick li ul li {
449 #header #header-inner #quick li ul li {
415 border-bottom:1px solid #ddd;
450 border-bottom: 1px solid #ddd;
416 }
451 }
417
452
418 #header #header-inner #quick li ul li a {
453 #header #header-inner #quick li ul li a {
419 width:182px;
454 width: 182px;
420 height:auto;
455 height: auto;
421 display:block;
456 display: block;
422 float:left;
457 float: left;
423 background:#FFF;
458 background: #FFF;
424 color:#003367;
459 color: #003367;
425 font-weight:400;
460 font-weight: 400;
426 margin:0;
461 margin: 0;
427 padding:7px 9px;
462 padding: 7px 9px;
428 }
463 }
429
464
430 #header #header-inner #quick li ul li a:hover {
465 #header #header-inner #quick li ul li a:hover {
431 color:#000;
466 color: #000;
432 background:#FFF;
467 background: #FFF;
433 }
468 }
434
469
435 #header #header-inner #quick ul ul {
470 #header #header-inner #quick ul ul {
436 top:auto;
471 top: auto;
437 }
472 }
438
473
439 #header #header-inner #quick li ul ul {
474 #header #header-inner #quick li ul ul {
440 right:200px;
475 right: 200px;
441 max-height:275px;
476 max-height: 275px;
442 overflow:auto;
477 overflow: auto;
443 overflow-x:hidden;
478 overflow-x: hidden;
444 white-space:normal;
479 white-space: normal;
445 }
480 }
446
481
447 #header #header-inner #quick li ul li a.journal,#header #header-inner #quick li ul li a.journal:hover {
482 #header #header-inner #quick li ul li a.journal,#header #header-inner #quick li ul li a.journal:hover
448 background:url("../images/icons/book.png") no-repeat scroll 4px 9px #FFF;
483 {
449 width:167px;
484 background: url("../images/icons/book.png") no-repeat scroll 4px 9px
450 margin:0;
485 #FFF;
451 padding:12px 9px 7px 24px;
486 width: 167px;
452 }
487 margin: 0;
453
488 padding: 12px 9px 7px 24px;
454 #header #header-inner #quick li ul li a.private_repo,#header #header-inner #quick li ul li a.private_repo:hover {
489 }
455 background:url("../images/icons/lock.png") no-repeat scroll 4px 9px #FFF;
490
456 min-width:167px;
491 #header #header-inner #quick li ul li a.private_repo,#header #header-inner #quick li ul li a.private_repo:hover
457 margin:0;
492 {
458 padding:12px 9px 7px 24px;
493 background: url("../images/icons/lock.png") no-repeat scroll 4px 9px
459 }
494 #FFF;
460
495 min-width: 167px;
461 #header #header-inner #quick li ul li a.public_repo,#header #header-inner #quick li ul li a.public_repo:hover {
496 margin: 0;
462 background:url("../images/icons/lock_open.png") no-repeat scroll 4px 9px #FFF;
497 padding: 12px 9px 7px 24px;
463 min-width:167px;
498 }
464 margin:0;
499
465 padding:12px 9px 7px 24px;
500 #header #header-inner #quick li ul li a.public_repo,#header #header-inner #quick li ul li a.public_repo:hover
466 }
501 {
467
502 background: url("../images/icons/lock_open.png") no-repeat scroll 4px
468 #header #header-inner #quick li ul li a.hg,#header #header-inner #quick li ul li a.hg:hover {
503 9px #FFF;
469 background:url("../images/icons/hgicon.png") no-repeat scroll 4px 9px #FFF;
504 min-width: 167px;
470 min-width:167px;
505 margin: 0;
471 margin:0 0 0 14px;
506 padding: 12px 9px 7px 24px;
472 padding:12px 9px 7px 24px;
507 }
473 }
508
474
509 #header #header-inner #quick li ul li a.hg,#header #header-inner #quick li ul li a.hg:hover
475 #header #header-inner #quick li ul li a.git,#header #header-inner #quick li ul li a.git:hover {
510 {
476 background:url("../images/icons/giticon.png") no-repeat scroll 4px 9px #FFF;
511 background: url("../images/icons/hgicon.png") no-repeat scroll 4px 9px
477 min-width:167px;
512 #FFF;
478 margin:0 0 0 14px;
513 min-width: 167px;
479 padding:12px 9px 7px 24px;
514 margin: 0 0 0 14px;
480 }
515 padding: 12px 9px 7px 24px;
481
516 }
482 #header #header-inner #quick li ul li a.repos,#header #header-inner #quick li ul li a.repos:hover {
517
483 background:url("../images/icons/database_edit.png") no-repeat scroll 4px 9px #FFF;
518 #header #header-inner #quick li ul li a.git,#header #header-inner #quick li ul li a.git:hover
484 width:167px;
519 {
485 margin:0;
520 background: url("../images/icons/giticon.png") no-repeat scroll 4px 9px
486 padding:12px 9px 7px 24px;
521 #FFF;
487 }
522 min-width: 167px;
488
523 margin: 0 0 0 14px;
489 #header #header-inner #quick li ul li a.repos_groups,#header #header-inner #quick li ul li a.repos_groups:hover {
524 padding: 12px 9px 7px 24px;
490 background:url("../images/icons/database_link.png") no-repeat scroll 4px 9px #FFF;
525 }
491 width:167px;
526
492 margin:0;
527 #header #header-inner #quick li ul li a.repos,#header #header-inner #quick li ul li a.repos:hover
493 padding:12px 9px 7px 24px;
528 {
494 }
529 background: url("../images/icons/database_edit.png") no-repeat scroll
495
530 4px 9px #FFF;
496 #header #header-inner #quick li ul li a.users,#header #header-inner #quick li ul li a.users:hover {
531 width: 167px;
497 background:#FFF url("../images/icons/user_edit.png") no-repeat 4px 9px;
532 margin: 0;
498 width:167px;
533 padding: 12px 9px 7px 24px;
499 margin:0;
534 }
500 padding:12px 9px 7px 24px;
535
501 }
536 #header #header-inner #quick li ul li a.repos_groups,#header #header-inner #quick li ul li a.repos_groups:hover
502
537 {
503 #header #header-inner #quick li ul li a.groups,#header #header-inner #quick li ul li a.groups:hover {
538 background: url("../images/icons/database_link.png") no-repeat scroll
504 background:#FFF url("../images/icons/group_edit.png") no-repeat 4px 9px;
539 4px 9px #FFF;
505 width:167px;
540 width: 167px;
506 margin:0;
541 margin: 0;
507 padding:12px 9px 7px 24px;
542 padding: 12px 9px 7px 24px;
508 }
543 }
509
544
510 #header #header-inner #quick li ul li a.settings,#header #header-inner #quick li ul li a.settings:hover {
545 #header #header-inner #quick li ul li a.users,#header #header-inner #quick li ul li a.users:hover
511 background:#FFF url("../images/icons/cog.png") no-repeat 4px 9px;
546 {
512 width:167px;
547 background: #FFF url("../images/icons/user_edit.png") no-repeat 4px 9px;
513 margin:0;
548 width: 167px;
514 padding:12px 9px 7px 24px;
549 margin: 0;
515 }
550 padding: 12px 9px 7px 24px;
516
551 }
517 #header #header-inner #quick li ul li a.permissions,#header #header-inner #quick li ul li a.permissions:hover {
552
518 background:#FFF url("../images/icons/key.png") no-repeat 4px 9px;
553 #header #header-inner #quick li ul li a.groups,#header #header-inner #quick li ul li a.groups:hover
519 width:167px;
554 {
520 margin:0;
555 background: #FFF url("../images/icons/group_edit.png") no-repeat 4px 9px;
521 padding:12px 9px 7px 24px;
556 width: 167px;
522 }
557 margin: 0;
523
558 padding: 12px 9px 7px 24px;
524 #header #header-inner #quick li ul li a.ldap,#header #header-inner #quick li ul li a.ldap:hover {
559 }
525 background:#FFF url("../images/icons/server_key.png") no-repeat 4px 9px;
560
526 width:167px;
561 #header #header-inner #quick li ul li a.settings,#header #header-inner #quick li ul li a.settings:hover
527 margin:0;
562 {
528 padding:12px 9px 7px 24px;
563 background: #FFF url("../images/icons/cog.png") no-repeat 4px 9px;
529 }
564 width: 167px;
530
565 margin: 0;
531 #header #header-inner #quick li ul li a.fork,#header #header-inner #quick li ul li a.fork:hover {
566 padding: 12px 9px 7px 24px;
532 background:#FFF url("../images/icons/arrow_divide.png") no-repeat 4px 9px;
567 }
533 width:167px;
568
534 margin:0;
569 #header #header-inner #quick li ul li a.permissions,#header #header-inner #quick li ul li a.permissions:hover
535 padding:12px 9px 7px 24px;
570 {
536 }
571 background: #FFF url("../images/icons/key.png") no-repeat 4px 9px;
537
572 width: 167px;
538 #header #header-inner #quick li ul li a.search,#header #header-inner #quick li ul li a.search:hover {
573 margin: 0;
539 background:#FFF url("../images/icons/search_16.png") no-repeat 4px 9px;
574 padding: 12px 9px 7px 24px;
540 width:167px;
575 }
541 margin:0;
576
542 padding:12px 9px 7px 24px;
577 #header #header-inner #quick li ul li a.ldap,#header #header-inner #quick li ul li a.ldap:hover
543 }
578 {
544
579 background: #FFF url("../images/icons/server_key.png") no-repeat 4px 9px;
545 #header #header-inner #quick li ul li a.delete,#header #header-inner #quick li ul li a.delete:hover {
580 width: 167px;
546 background:#FFF url("../images/icons/delete.png") no-repeat 4px 9px;
581 margin: 0;
547 width:167px;
582 padding: 12px 9px 7px 24px;
548 margin:0;
583 }
549 padding:12px 9px 7px 24px;
584
550 }
585 #header #header-inner #quick li ul li a.fork,#header #header-inner #quick li ul li a.fork:hover
551
586 {
552 #header #header-inner #quick li ul li a.branches,#header #header-inner #quick li ul li a.branches:hover {
587 background: #FFF url("../images/icons/arrow_divide.png") no-repeat 4px
553 background:#FFF url("../images/icons/arrow_branch.png") no-repeat 4px 9px;
588 9px;
554 width:167px;
589 width: 167px;
555 margin:0;
590 margin: 0;
556 padding:12px 9px 7px 24px;
591 padding: 12px 9px 7px 24px;
557 }
592 }
558
593
559 #header #header-inner #quick li ul li a.tags,#header #header-inner #quick li ul li a.tags:hover {
594 #header #header-inner #quick li ul li a.search,#header #header-inner #quick li ul li a.search:hover
560 background:#FFF url("../images/icons/tag_blue.png") no-repeat 4px 9px;
595 {
561 width:167px;
596 background: #FFF url("../images/icons/search_16.png") no-repeat 4px 9px;
562 margin:0;
597 width: 167px;
563 padding:12px 9px 7px 24px;
598 margin: 0;
564 }
599 padding: 12px 9px 7px 24px;
565
600 }
566 #header #header-inner #quick li ul li a.admin,#header #header-inner #quick li ul li a.admin:hover {
601
567 background:#FFF url("../images/icons/cog_edit.png") no-repeat 4px 9px;
602 #header #header-inner #quick li ul li a.delete,#header #header-inner #quick li ul li a.delete:hover
568 width:167px;
603 {
569 margin:0;
604 background: #FFF url("../images/icons/delete.png") no-repeat 4px 9px;
570 padding:12px 9px 7px 24px;
605 width: 167px;
571 }
606 margin: 0;
572
607 padding: 12px 9px 7px 24px;
608 }
609
610 #header #header-inner #quick li ul li a.branches,#header #header-inner #quick li ul li a.branches:hover
611 {
612 background: #FFF url("../images/icons/arrow_branch.png") no-repeat 4px
613 9px;
614 width: 167px;
615 margin: 0;
616 padding: 12px 9px 7px 24px;
617 }
618
619 #header #header-inner #quick li ul li a.tags,#header #header-inner #quick li ul li a.tags:hover
620 {
621 background: #FFF url("../images/icons/tag_blue.png") no-repeat 4px 9px;
622 width: 167px;
623 margin: 0;
624 padding: 12px 9px 7px 24px;
625 }
626
627 #header #header-inner #quick li ul li a.admin,#header #header-inner #quick li ul li a.admin:hover
628 {
629 background: #FFF url("../images/icons/cog_edit.png") no-repeat 4px 9px;
630 width: 167px;
631 margin: 0;
632 padding: 12px 9px 7px 24px;
633 }
573
634
574 .groups_breadcrumbs a {
635 .groups_breadcrumbs a {
575 color: #fff;
636 color: #fff;
576 }
637 }
638
577 .groups_breadcrumbs a:hover {
639 .groups_breadcrumbs a:hover {
578 color: #bfe3ff;
640 color: #bfe3ff;
579 text-decoration: none;
641 text-decoration: none;
580 }
642 }
581
643
582 .quick_repo_menu{
644 .quick_repo_menu {
583 background: #FFF url("../images/vertical-indicator.png") 8px 50% no-repeat !important;
645 background: #FFF url("../images/vertical-indicator.png") 8px 50%
646 no-repeat !important;
584 cursor: pointer;
647 cursor: pointer;
585 width: 8px;
648 width: 8px;
586 }
649 }
587 .quick_repo_menu.active{
650
588 background: #FFF url("../images/horizontal-indicator.png") 4px 50% no-repeat !important;
651 .quick_repo_menu.active {
589 cursor: pointer;
652 background: #FFF url("../images/horizontal-indicator.png") 4px 50%
590 }
653 no-repeat !important;
591 .quick_repo_menu .menu_items{
654 cursor: pointer;
592 margin-top:6px;
655 }
593 width:150px;
656
657 .quick_repo_menu .menu_items {
658 margin-top: 6px;
659 width: 150px;
594 position: absolute;
660 position: absolute;
595 background-color:#FFF;
661 background-color: #FFF;
596 background: none repeat scroll 0 0 #FFFFFF;
662 background: none repeat scroll 0 0 #FFFFFF;
597 border-color: #003367 #666666 #666666;
663 border-color: #003367 #666666 #666666;
598 border-right: 1px solid #666666;
664 border-right: 1px solid #666666;
599 border-style: solid;
665 border-style: solid;
600 border-width: 1px;
666 border-width: 1px;
601 box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
667 box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
602 }
668 }
603 .quick_repo_menu .menu_items li{
669
604 padding:0 !important;
670 .quick_repo_menu .menu_items li {
605 }
671 padding: 0 !important;
606 .quick_repo_menu .menu_items a{
672 }
673
674 .quick_repo_menu .menu_items a {
607 display: block;
675 display: block;
608 padding: 4px 12px 4px 8px;
676 padding: 4px 12px 4px 8px;
609 }
677 }
610 .quick_repo_menu .menu_items a:hover{
678
611 background-color: #EEE;
679 .quick_repo_menu .menu_items a:hover {
612 text-decoration: none;
680 background-color: #EEE;
613
681 text-decoration: none;
614 }
682 }
615 .quick_repo_menu .menu_items .icon img{
683
616 margin-bottom:-2px;
684 .quick_repo_menu .menu_items .icon img {
617 }
685 margin-bottom: -2px;
618 .quick_repo_menu .menu_items.hidden{
686 }
687
688 .quick_repo_menu .menu_items.hidden {
619 display: none;
689 display: none;
620 }
690 }
621
691
622 #content #left {
692 #content #left {
623 left:0;
693 left: 0;
624 width:280px;
694 width: 280px;
625 position:absolute;
695 position: absolute;
626 }
696 }
627
697
628 #content #right {
698 #content #right {
629 margin:0 60px 10px 290px;
699 margin: 0 60px 10px 290px;
630 }
700 }
631
701
632 #content div.box {
702 #content div.box {
633 clear:both;
703 clear: both;
634 overflow:hidden;
704 overflow: hidden;
635 background:#fff;
705 background: #fff;
636 margin:0 0 10px;
706 margin: 0 0 10px;
637 padding:0 0 10px;
707 padding: 0 0 10px;
638 -webkit-border-radius: 4px 4px 4px 4px;
708 -webkit-border-radius: 4px 4px 4px 4px;
639 -khtml-border-radius: 4px 4px 4px 4px;
709 -khtml-border-radius: 4px 4px 4px 4px;
640 -moz-border-radius: 4px 4px 4px 4px;
710 -moz-border-radius: 4px 4px 4px 4px;
641 border-radius: 4px 4px 4px 4px;
711 border-radius: 4px 4px 4px 4px;
642 box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
712 box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
643
644 }
713 }
645
714
646 #content div.box-left {
715 #content div.box-left {
647 width:49%;
716 width: 49%;
648 clear:none;
717 clear: none;
649 float:left;
718 float: left;
650 margin:0 0 10px;
719 margin: 0 0 10px;
651 }
720 }
652
721
653 #content div.box-right {
722 #content div.box-right {
654 width:49%;
723 width: 49%;
655 clear:none;
724 clear: none;
656 float:right;
725 float: right;
657 margin:0 0 10px;
726 margin: 0 0 10px;
658 }
727 }
659
728
660 #content div.box div.title {
729 #content div.box div.title {
661 clear:both;
730 clear: both;
662 overflow:hidden;
731 overflow: hidden;
663 background:#369 url("../images/header_inner.png") repeat-x;
732 background-color: #eedc94;
664 margin:0 0 20px;
733 background-repeat: repeat-x;
665 padding:0;
734 background-image: -khtml-gradient(linear, left top, left bottom, from(#fceec1),
735 to(#eedc94) );
736 background-image: -moz-linear-gradient(top, #003b76, #00376e);
737 background-image: -ms-linear-gradient(top, #003b76, #00376e);
738 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #003b76),
739 color-stop(100%, #00376e) );
740 background-image: -webkit-linear-gradient(top, #003b76, #00376e) );
741 background-image: -o-linear-gradient(top, #003b76, #00376e) );
742 background-image: linear-gradient(top, #003b76, #00376e);
743 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#003b76',
744 endColorstr='#00376e', GradientType=0 );
745 margin: 0 0 20px;
746 padding: 0;
666 }
747 }
667
748
668 #content div.box div.title h5 {
749 #content div.box div.title h5 {
669 float:left;
750 float: left;
670 border:none;
751 border: none;
671 color:#fff;
752 color: #fff;
672 text-transform:uppercase;
753 text-transform: uppercase;
673 margin:0;
754 margin: 0;
674 padding:11px 0 11px 10px;
755 padding: 11px 0 11px 10px;
675 }
756 }
676
757
677 #content div.box div.title ul.links li {
758 #content div.box div.title ul.links li {
678 list-style:none;
759 list-style: none;
679 float:left;
760 float: left;
680 margin:0;
761 margin: 0;
681 padding:0;
762 padding: 0;
682 }
763 }
683
764
684 #content div.box div.title ul.links li a {
765 #content div.box div.title ul.links li a {
685 border-left: 1px solid #316293;
766 border-left: 1px solid #316293;
686 color: #FFFFFF;
767 color: #FFFFFF;
687 display: block;
768 display: block;
688 float: left;
769 float: left;
689 font-size: 13px;
770 font-size: 13px;
690 font-weight: 700;
771 font-weight: 700;
691 height: 1%;
772 height: 1%;
692 margin: 0;
773 margin: 0;
693 padding: 11px 22px 12px;
774 padding: 11px 22px 12px;
694 text-decoration: none;
775 text-decoration: none;
695 }
776 }
696
777
697 #content div.box h1,#content div.box h2,#content div.box h3,#content div.box h4,#content div.box h5,#content div.box h6 {
778 #content div.box h1,#content div.box h2,#content div.box h3,#content div.box h4,#content div.box h5,#content div.box h6
698 clear:both;
779 {
699 overflow:hidden;
780 clear: both;
700 border-bottom:1px solid #DDD;
781 overflow: hidden;
701 margin:10px 20px;
782 border-bottom: 1px solid #DDD;
702 padding:0 0 15px;
783 margin: 10px 20px;
784 padding: 0 0 15px;
703 }
785 }
704
786
705 #content div.box p {
787 #content div.box p {
706 color:#5f5f5f;
788 color: #5f5f5f;
707 font-size:12px;
789 font-size: 12px;
708 line-height:150%;
790 line-height: 150%;
709 margin:0 24px 10px;
791 margin: 0 24px 10px;
710 padding:0;
792 padding: 0;
711 }
793 }
712
794
713 #content div.box blockquote {
795 #content div.box blockquote {
714 border-left:4px solid #DDD;
796 border-left: 4px solid #DDD;
715 color:#5f5f5f;
797 color: #5f5f5f;
716 font-size:11px;
798 font-size: 11px;
717 line-height:150%;
799 line-height: 150%;
718 margin:0 34px;
800 margin: 0 34px;
719 padding:0 0 0 14px;
801 padding: 0 0 0 14px;
720 }
802 }
721
803
722 #content div.box blockquote p {
804 #content div.box blockquote p {
723 margin:10px 0;
805 margin: 10px 0;
724 padding:0;
806 padding: 0;
725 }
807 }
726
808
727 #content div.box dl {
809 #content div.box dl {
728 margin:10px 24px;
810 margin: 10px 24px;
729 }
811 }
730
812
731 #content div.box dt {
813 #content div.box dt {
732 font-size:12px;
814 font-size: 12px;
733 margin:0;
815 margin: 0;
734 }
816 }
735
817
736 #content div.box dd {
818 #content div.box dd {
737 font-size:12px;
819 font-size: 12px;
738 margin:0;
820 margin: 0;
739 padding:8px 0 8px 15px;
821 padding: 8px 0 8px 15px;
740 }
822 }
741
823
742 #content div.box li {
824 #content div.box li {
743 font-size:12px;
825 font-size: 12px;
744 padding:4px 0;
826 padding: 4px 0;
745 }
827 }
746
828
747 #content div.box ul.disc,#content div.box ul.circle {
829 #content div.box ul.disc,#content div.box ul.circle {
748 margin:10px 24px 10px 38px;
830 margin: 10px 24px 10px 38px;
749 }
831 }
750
832
751 #content div.box ul.square {
833 #content div.box ul.square {
752 margin:10px 24px 10px 40px;
834 margin: 10px 24px 10px 40px;
753 }
835 }
754
836
755 #content div.box img.left {
837 #content div.box img.left {
756 border:none;
838 border: none;
757 float:left;
839 float: left;
758 margin:10px 10px 10px 0;
840 margin: 10px 10px 10px 0;
759 }
841 }
760
842
761 #content div.box img.right {
843 #content div.box img.right {
762 border:none;
844 border: none;
763 float:right;
845 float: right;
764 margin:10px 0 10px 10px;
846 margin: 10px 0 10px 10px;
765 }
847 }
766
848
767 #content div.box div.messages {
849 #content div.box div.messages {
768 clear:both;
850 clear: both;
769 overflow:hidden;
851 overflow: hidden;
770 margin:0 20px;
852 margin: 0 20px;
771 padding:0;
853 padding: 0;
772 }
854 }
773
855
774 #content div.box div.message {
856 #content div.box div.message {
775 clear:both;
857 clear: both;
776 overflow:hidden;
858 overflow: hidden;
777 margin:0;
859 margin: 0;
778 padding:10px 0;
860 padding: 10px 0;
779 }
861 }
780
862
781 #content div.box div.message a {
863 #content div.box div.message a {
782 font-weight:400 !important;
864 font-weight: 400 !important;
783 }
865 }
784
866
785 #content div.box div.message div.image {
867 #content div.box div.message div.image {
786 float:left;
868 float: left;
787 margin:9px 0 0 5px;
869 margin: 9px 0 0 5px;
788 padding:6px;
870 padding: 6px;
789 }
871 }
790
872
791 #content div.box div.message div.image img {
873 #content div.box div.message div.image img {
792 vertical-align:middle;
874 vertical-align: middle;
793 margin:0;
875 margin: 0;
794 }
876 }
795
877
796 #content div.box div.message div.text {
878 #content div.box div.message div.text {
797 float:left;
879 float: left;
798 margin:0;
880 margin: 0;
799 padding:9px 6px;
881 padding: 9px 6px;
800 }
882 }
801
883
802 #content div.box div.message div.dismiss a {
884 #content div.box div.message div.dismiss a {
803 height:16px;
885 height: 16px;
804 width:16px;
886 width: 16px;
805 display:block;
887 display: block;
806 background:url("../images/icons/cross.png") no-repeat;
888 background: url("../images/icons/cross.png") no-repeat;
807 margin:15px 14px 0 0;
889 margin: 15px 14px 0 0;
808 padding:0;
890 padding: 0;
809 }
891 }
810
892
811 #content div.box div.message div.text h1,#content div.box div.message div.text h2,#content div.box div.message div.text h3,#content div.box div.message div.text h4,#content div.box div.message div.text h5,#content div.box div.message div.text h6 {
893 #content div.box div.message div.text h1,#content div.box div.message div.text h2,#content div.box div.message div.text h3,#content div.box div.message div.text h4,#content div.box div.message div.text h5,#content div.box div.message div.text h6
812 border:none;
894 {
813 margin:0;
895 border: none;
814 padding:0;
896 margin: 0;
897 padding: 0;
815 }
898 }
816
899
817 #content div.box div.message div.text span {
900 #content div.box div.message div.text span {
818 height:1%;
901 height: 1%;
819 display:block;
902 display: block;
820 margin:0;
903 margin: 0;
821 padding:5px 0 0;
904 padding: 5px 0 0;
822 }
905 }
823
906
824 #content div.box div.message-error {
907 #content div.box div.message-error {
825 height:1%;
908 height: 1%;
826 clear:both;
909 clear: both;
827 overflow:hidden;
910 overflow: hidden;
828 background:#FBE3E4;
911 background: #FBE3E4;
829 border:1px solid #FBC2C4;
912 border: 1px solid #FBC2C4;
830 color:#860006;
913 color: #860006;
831 }
914 }
832
915
833 #content div.box div.message-error h6 {
916 #content div.box div.message-error h6 {
834 color:#860006;
917 color: #860006;
835 }
918 }
836
919
837 #content div.box div.message-warning {
920 #content div.box div.message-warning {
838 height:1%;
921 height: 1%;
839 clear:both;
922 clear: both;
840 overflow:hidden;
923 overflow: hidden;
841 background:#FFF6BF;
924 background: #FFF6BF;
842 border:1px solid #FFD324;
925 border: 1px solid #FFD324;
843 color:#5f5200;
926 color: #5f5200;
844 }
927 }
845
928
846 #content div.box div.message-warning h6 {
929 #content div.box div.message-warning h6 {
847 color:#5f5200;
930 color: #5f5200;
848 }
931 }
849
932
850 #content div.box div.message-notice {
933 #content div.box div.message-notice {
851 height:1%;
934 height: 1%;
852 clear:both;
935 clear: both;
853 overflow:hidden;
936 overflow: hidden;
854 background:#8FBDE0;
937 background: #8FBDE0;
855 border:1px solid #6BACDE;
938 border: 1px solid #6BACDE;
856 color:#003863;
939 color: #003863;
857 }
940 }
858
941
859 #content div.box div.message-notice h6 {
942 #content div.box div.message-notice h6 {
860 color:#003863;
943 color: #003863;
861 }
944 }
862
945
863 #content div.box div.message-success {
946 #content div.box div.message-success {
864 height:1%;
947 height: 1%;
865 clear:both;
948 clear: both;
866 overflow:hidden;
949 overflow: hidden;
867 background:#E6EFC2;
950 background: #E6EFC2;
868 border:1px solid #C6D880;
951 border: 1px solid #C6D880;
869 color:#4e6100;
952 color: #4e6100;
870 }
953 }
871
954
872 #content div.box div.message-success h6 {
955 #content div.box div.message-success h6 {
873 color:#4e6100;
956 color: #4e6100;
874 }
957 }
875
958
876 #content div.box div.form div.fields div.field {
959 #content div.box div.form div.fields div.field {
877 height:1%;
960 height: 1%;
878 border-bottom:1px solid #DDD;
961 border-bottom: 1px solid #DDD;
879 clear:both;
962 clear: both;
880 margin:0;
963 margin: 0;
881 padding:10px 0;
964 padding: 10px 0;
882 }
965 }
883
966
884 #content div.box div.form div.fields div.field-first {
967 #content div.box div.form div.fields div.field-first {
885 padding:0 0 10px;
968 padding: 0 0 10px;
886 }
969 }
887
970
888 #content div.box div.form div.fields div.field-noborder {
971 #content div.box div.form div.fields div.field-noborder {
889 border-bottom:0 !important;
972 border-bottom: 0 !important;
890 }
973 }
891
974
892 #content div.box div.form div.fields div.field span.error-message {
975 #content div.box div.form div.fields div.field span.error-message {
893 height:1%;
976 height: 1%;
894 display:inline-block;
977 display: inline-block;
895 color:red;
978 color: red;
896 margin:8px 0 0 4px;
979 margin: 8px 0 0 4px;
897 padding:0;
980 padding: 0;
898 }
981 }
899
982
900 #content div.box div.form div.fields div.field span.success {
983 #content div.box div.form div.fields div.field span.success {
901 height:1%;
984 height: 1%;
902 display:block;
985 display: block;
903 color:#316309;
986 color: #316309;
904 margin:8px 0 0;
987 margin: 8px 0 0;
905 padding:0;
988 padding: 0;
906 }
989 }
907
990
908 #content div.box div.form div.fields div.field div.label {
991 #content div.box div.form div.fields div.field div.label {
909 left:70px;
992 left: 70px;
910 width:155px;
993 width: 155px;
911 position:absolute;
994 position: absolute;
912 margin:0;
995 margin: 0;
913 padding:8px 0 0 5px;
996 padding: 8px 0 0 5px;
914 }
997 }
915
998
916 #content div.box-left div.form div.fields div.field div.label,#content div.box-right div.form div.fields div.field div.label {
999 #content div.box-left div.form div.fields div.field div.label,#content div.box-right div.form div.fields div.field div.label
917 clear:both;
1000 {
918 overflow:hidden;
1001 clear: both;
919 left:0;
1002 overflow: hidden;
920 width:auto;
1003 left: 0;
921 position:relative;
1004 width: auto;
922 margin:0;
1005 position: relative;
923 padding:0 0 8px;
1006 margin: 0;
1007 padding: 0 0 8px;
924 }
1008 }
925
1009
926 #content div.box div.form div.fields div.field div.label-select {
1010 #content div.box div.form div.fields div.field div.label-select {
927 padding:5px 0 0 5px;
1011 padding: 5px 0 0 5px;
928 }
1012 }
929
1013
930 #content div.box-left div.form div.fields div.field div.label-select,#content div.box-right div.form div.fields div.field div.label-select {
1014 #content div.box-left div.form div.fields div.field div.label-select,#content div.box-right div.form div.fields div.field div.label-select
931 padding:0 0 8px;
1015 {
932 }
1016 padding: 0 0 8px;
933
1017 }
934 #content div.box-left div.form div.fields div.field div.label-textarea,#content div.box-right div.form div.fields div.field div.label-textarea {
1018
935 padding:0 0 8px !important;
1019 #content div.box-left div.form div.fields div.field div.label-textarea,#content div.box-right div.form div.fields div.field div.label-textarea
936 }
1020 {
937
1021 padding: 0 0 8px !important;
938 #content div.box div.form div.fields div.field div.label label, div.label label{
1022 }
939 color:#393939;
1023
940 font-weight:700;
1024 #content div.box div.form div.fields div.field div.label label,div.label label
1025 {
1026 color: #393939;
1027 font-weight: 700;
941 }
1028 }
942
1029
943 #content div.box div.form div.fields div.field div.input {
1030 #content div.box div.form div.fields div.field div.input {
944 margin:0 0 0 200px;
1031 margin: 0 0 0 200px;
945 }
1032 }
1033
946 #content div.box div.form div.fields div.field div.file {
1034 #content div.box div.form div.fields div.field div.file {
947 margin:0 0 0 200px;
1035 margin: 0 0 0 200px;
948 }
1036 }
949 #content div.box-left div.form div.fields div.field div.input,#content div.box-right div.form div.fields div.field div.input {
1037
950 margin:0 0 0 0px;
1038 #content div.box-left div.form div.fields div.field div.input,#content div.box-right div.form div.fields div.field div.input
1039 {
1040 margin: 0 0 0 0px;
951 }
1041 }
952
1042
953 #content div.box div.form div.fields div.field div.input input {
1043 #content div.box div.form div.fields div.field div.input input {
954 background:#FFF;
1044 background: #FFF;
955 border-top:1px solid #b3b3b3;
1045 border-top: 1px solid #b3b3b3;
956 border-left:1px solid #b3b3b3;
1046 border-left: 1px solid #b3b3b3;
957 border-right:1px solid #eaeaea;
1047 border-right: 1px solid #eaeaea;
958 border-bottom:1px solid #eaeaea;
1048 border-bottom: 1px solid #eaeaea;
959 color:#000;
1049 color: #000;
960 font-family:Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif;
1050 font-size: 11px;
961 font-size:11px;
1051 margin: 0;
962 margin:0;
1052 padding: 7px 7px 6px;
963 padding:7px 7px 6px;
964 }
1053 }
965
1054
966 #content div.box div.form div.fields div.field div.file input {
1055 #content div.box div.form div.fields div.field div.file input {
967 background: none repeat scroll 0 0 #FFFFFF;
1056 background: none repeat scroll 0 0 #FFFFFF;
968 border-color: #B3B3B3 #EAEAEA #EAEAEA #B3B3B3;
1057 border-color: #B3B3B3 #EAEAEA #EAEAEA #B3B3B3;
969 border-style: solid;
1058 border-style: solid;
970 border-width: 1px;
1059 border-width: 1px;
971 color: #000000;
1060 color: #000000;
972 font-family: Lucida Grande,Verdana,Lucida Sans Regular,Lucida Sans Unicode,Arial,sans-serif;
1061 font-size: 11px;
973 font-size: 11px;
1062 margin: 0;
974 margin: 0;
1063 padding: 7px 7px 6px;
975 padding: 7px 7px 6px;
1064 }
976 }
977
978
1065
979 #content div.box div.form div.fields div.field div.input input.small {
1066 #content div.box div.form div.fields div.field div.input input.small {
980 width:30%;
1067 width: 30%;
981 }
1068 }
982
1069
983 #content div.box div.form div.fields div.field div.input input.medium {
1070 #content div.box div.form div.fields div.field div.input input.medium {
984 width:55%;
1071 width: 55%;
985 }
1072 }
986
1073
987 #content div.box div.form div.fields div.field div.input input.large {
1074 #content div.box div.form div.fields div.field div.input input.large {
988 width:85%;
1075 width: 85%;
989 }
1076 }
990
1077
991 #content div.box div.form div.fields div.field div.input input.date {
1078 #content div.box div.form div.fields div.field div.input input.date {
992 width:177px;
1079 width: 177px;
993 }
1080 }
994
1081
995 #content div.box div.form div.fields div.field div.input input.button {
1082 #content div.box div.form div.fields div.field div.input input.button {
996 background:#D4D0C8;
1083 background: #D4D0C8;
997 border-top:1px solid #FFF;
1084 border-top: 1px solid #FFF;
998 border-left:1px solid #FFF;
1085 border-left: 1px solid #FFF;
999 border-right:1px solid #404040;
1086 border-right: 1px solid #404040;
1000 border-bottom:1px solid #404040;
1087 border-bottom: 1px solid #404040;
1001 color:#000;
1088 color: #000;
1002 margin:0;
1089 margin: 0;
1003 padding:4px 8px;
1090 padding: 4px 8px;
1004 }
1091 }
1005
1092
1006 #content div.box div.form div.fields div.field div.textarea {
1093 #content div.box div.form div.fields div.field div.textarea {
1007 border-top:1px solid #b3b3b3;
1094 border-top: 1px solid #b3b3b3;
1008 border-left:1px solid #b3b3b3;
1095 border-left: 1px solid #b3b3b3;
1009 border-right:1px solid #eaeaea;
1096 border-right: 1px solid #eaeaea;
1010 border-bottom:1px solid #eaeaea;
1097 border-bottom: 1px solid #eaeaea;
1011 margin:0 0 0 200px;
1098 margin: 0 0 0 200px;
1012 padding:10px;
1099 padding: 10px;
1013 }
1100 }
1014
1101
1015 #content div.box div.form div.fields div.field div.textarea-editor {
1102 #content div.box div.form div.fields div.field div.textarea-editor {
1016 border:1px solid #ddd;
1103 border: 1px solid #ddd;
1017 padding:0;
1104 padding: 0;
1018 }
1105 }
1019
1106
1020 #content div.box div.form div.fields div.field div.textarea textarea {
1107 #content div.box div.form div.fields div.field div.textarea textarea {
1021 width:100%;
1108 width: 100%;
1022 height:220px;
1109 height: 220px;
1023 overflow:hidden;
1110 overflow: hidden;
1024 background:#FFF;
1111 background: #FFF;
1025 color:#000;
1112 color: #000;
1026 font-family:Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif;
1113 font-size: 11px;
1027 font-size:11px;
1114 outline: none;
1028 outline:none;
1115 border-width: 0;
1029 border-width:0;
1116 margin: 0;
1030 margin:0;
1117 padding: 0;
1031 padding:0;
1118 }
1032 }
1119
1033
1120 #content div.box-left div.form div.fields div.field div.textarea textarea,#content div.box-right div.form div.fields div.field div.textarea textarea
1034 #content div.box-left div.form div.fields div.field div.textarea textarea,#content div.box-right div.form div.fields div.field div.textarea textarea {
1121 {
1035 width:100%;
1122 width: 100%;
1036 height:100px;
1123 height: 100px;
1037 }
1124 }
1038
1125
1039 #content div.box div.form div.fields div.field div.textarea table {
1126 #content div.box div.form div.fields div.field div.textarea table {
1040 width:100%;
1127 width: 100%;
1041 border:none;
1128 border: none;
1042 margin:0;
1129 margin: 0;
1043 padding:0;
1130 padding: 0;
1044 }
1131 }
1045
1132
1046 #content div.box div.form div.fields div.field div.textarea table td {
1133 #content div.box div.form div.fields div.field div.textarea table td {
1047 background:#DDD;
1134 background: #DDD;
1048 border:none;
1135 border: none;
1049 padding:0;
1136 padding: 0;
1050 }
1137 }
1051
1138
1052 #content div.box div.form div.fields div.field div.textarea table td table {
1139 #content div.box div.form div.fields div.field div.textarea table td table
1053 width:auto;
1140 {
1054 border:none;
1141 width: auto;
1055 margin:0;
1142 border: none;
1056 padding:0;
1143 margin: 0;
1057 }
1144 padding: 0;
1058
1145 }
1059 #content div.box div.form div.fields div.field div.textarea table td table td {
1146
1060 font-family:Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif;
1147 #content div.box div.form div.fields div.field div.textarea table td table td
1061 font-size:11px;
1148 {
1062 padding:5px 5px 5px 0;
1149 font-size: 11px;
1063 }
1150 padding: 5px 5px 5px 0;
1064
1151 }
1065 #content div.box div.form div.fields div.field input[type=text]:focus,#content div.box div.form div.fields div.field input[type=password]:focus,#content div.box div.form div.fields div.field input[type=file]:focus,#content div.box div.form div.fields div.field textarea:focus,#content div.box div.form div.fields div.field select:focus {
1152
1066 background:#f6f6f6;
1153 #content div.box div.form div.fields div.field input[type=text]:focus,#content div.box div.form div.fields div.field input[type=password]:focus,#content div.box div.form div.fields div.field input[type=file]:focus,#content div.box div.form div.fields div.field textarea:focus,#content div.box div.form div.fields div.field select:focus
1067 border-color:#666;
1154 {
1155 background: #f6f6f6;
1156 border-color: #666;
1068 }
1157 }
1069
1158
1070 div.form div.fields div.field div.button {
1159 div.form div.fields div.field div.button {
1071 margin:0;
1160 margin: 0;
1072 padding:0 0 0 8px;
1161 padding: 0 0 0 8px;
1073 }
1162 }
1074
1163 #content div.box table.noborder {
1164 border: 1px solid transparent;
1165 }
1075
1166
1076 #content div.box table {
1167 #content div.box table {
1077 width:100%;
1168 width: 100%;
1078 border-collapse:collapse;
1169 border-collapse: separate;
1079 margin:0;
1170 margin: 0;
1080 padding:0;
1171 padding: 0;
1081 border: 1px solid #eee;
1172 border: 1px solid #eee;
1173 -webkit-border-radius: 4px;
1174 -moz-border-radius: 4px;
1175 border-radius: 4px;
1082 }
1176 }
1083
1177
1084 #content div.box table th {
1178 #content div.box table th {
1085 background:#eee;
1179 background: #eee;
1086 border-bottom:1px solid #ddd;
1180 border-bottom: 1px solid #ddd;
1087 padding:5px 0px 5px 5px;
1181 padding: 5px 0px 5px 5px;
1088 }
1182 }
1089
1183
1090 #content div.box table th.left {
1184 #content div.box table th.left {
1091 text-align:left;
1185 text-align: left;
1092 }
1186 }
1093
1187
1094 #content div.box table th.right {
1188 #content div.box table th.right {
1095 text-align:right;
1189 text-align: right;
1096 }
1190 }
1097
1191
1098 #content div.box table th.center {
1192 #content div.box table th.center {
1099 text-align:center;
1193 text-align: center;
1100 }
1194 }
1101
1195
1102 #content div.box table th.selected {
1196 #content div.box table th.selected {
1103 vertical-align:middle;
1197 vertical-align: middle;
1104 padding:0;
1198 padding: 0;
1105 }
1199 }
1106
1200
1107 #content div.box table td {
1201 #content div.box table td {
1108 background:#fff;
1202 background: #fff;
1109 border-bottom:1px solid #cdcdcd;
1203 border-bottom: 1px solid #cdcdcd;
1110 vertical-align:middle;
1204 vertical-align: middle;
1111 padding:5px;
1205 padding: 5px;
1112 }
1206 }
1113
1207
1114 #content div.box table tr.selected td {
1208 #content div.box table tr.selected td {
1115 background:#FFC;
1209 background: #FFC;
1116 }
1210 }
1117
1211
1118 #content div.box table td.selected {
1212 #content div.box table td.selected {
1119 width:3%;
1213 width: 3%;
1120 text-align:center;
1214 text-align: center;
1121 vertical-align:middle;
1215 vertical-align: middle;
1122 padding:0;
1216 padding: 0;
1123 }
1217 }
1124
1218
1125 #content div.box table td.action {
1219 #content div.box table td.action {
1126 width:45%;
1220 width: 45%;
1127 text-align:left;
1221 text-align: left;
1128 }
1222 }
1129
1223
1130 #content div.box table td.date {
1224 #content div.box table td.date {
1131 width:33%;
1225 width: 33%;
1132 text-align:center;
1226 text-align: center;
1133 }
1227 }
1134
1228
1135 #content div.box div.action {
1229 #content div.box div.action {
1136 float:right;
1230 float: right;
1137 background:#FFF;
1231 background: #FFF;
1138 text-align:right;
1232 text-align: right;
1139 margin:10px 0 0;
1233 margin: 10px 0 0;
1140 padding:0;
1234 padding: 0;
1141 }
1235 }
1142
1236
1143 #content div.box div.action select {
1237 #content div.box div.action select {
1144 font-family:Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif;
1238 font-size: 11px;
1145 font-size:11px;
1239 margin: 0;
1146 margin:0;
1147 }
1240 }
1148
1241
1149 #content div.box div.action .ui-selectmenu {
1242 #content div.box div.action .ui-selectmenu {
1150 margin:0;
1243 margin: 0;
1151 padding:0;
1244 padding: 0;
1152 }
1245 }
1153
1246
1154 #content div.box div.pagination {
1247 #content div.box div.pagination {
1155 height:1%;
1248 height: 1%;
1156 clear:both;
1249 clear: both;
1157 overflow:hidden;
1250 overflow: hidden;
1158 margin:10px 0 0;
1251 margin: 10px 0 0;
1159 padding:0;
1252 padding: 0;
1160 }
1253 }
1161
1254
1162 #content div.box div.pagination ul.pager {
1255 #content div.box div.pagination ul.pager {
1163 float:right;
1256 float: right;
1164 text-align:right;
1257 text-align: right;
1165 margin:0;
1258 margin: 0;
1166 padding:0;
1259 padding: 0;
1167 }
1260 }
1168
1261
1169 #content div.box div.pagination ul.pager li {
1262 #content div.box div.pagination ul.pager li {
1170 height:1%;
1263 height: 1%;
1171 float:left;
1264 float: left;
1172 list-style:none;
1265 list-style: none;
1173 background:#ebebeb url("../images/pager.png") repeat-x;
1266 background: #ebebeb url("../images/pager.png") repeat-x;
1174 border-top:1px solid #dedede;
1267 border-top: 1px solid #dedede;
1175 border-left:1px solid #cfcfcf;
1268 border-left: 1px solid #cfcfcf;
1176 border-right:1px solid #c4c4c4;
1269 border-right: 1px solid #c4c4c4;
1177 border-bottom:1px solid #c4c4c4;
1270 border-bottom: 1px solid #c4c4c4;
1178 color:#4A4A4A;
1271 color: #4A4A4A;
1179 font-weight:700;
1272 font-weight: 700;
1180 margin:0 0 0 4px;
1273 margin: 0 0 0 4px;
1181 padding:0;
1274 padding: 0;
1182 }
1275 }
1183
1276
1184 #content div.box div.pagination ul.pager li.separator {
1277 #content div.box div.pagination ul.pager li.separator {
1185 padding:6px;
1278 padding: 6px;
1186 }
1279 }
1187
1280
1188 #content div.box div.pagination ul.pager li.current {
1281 #content div.box div.pagination ul.pager li.current {
1189 background:#b4b4b4 url("../images/pager_selected.png") repeat-x;
1282 background: #b4b4b4 url("../images/pager_selected.png") repeat-x;
1190 border-top:1px solid #ccc;
1283 border-top: 1px solid #ccc;
1191 border-left:1px solid #bebebe;
1284 border-left: 1px solid #bebebe;
1192 border-right:1px solid #b1b1b1;
1285 border-right: 1px solid #b1b1b1;
1193 border-bottom:1px solid #afafaf;
1286 border-bottom: 1px solid #afafaf;
1194 color:#515151;
1287 color: #515151;
1195 padding:6px;
1288 padding: 6px;
1196 }
1289 }
1197
1290
1198 #content div.box div.pagination ul.pager li a {
1291 #content div.box div.pagination ul.pager li a {
1199 height:1%;
1292 height: 1%;
1200 display:block;
1293 display: block;
1201 float:left;
1294 float: left;
1202 color:#515151;
1295 color: #515151;
1203 text-decoration:none;
1296 text-decoration: none;
1204 margin:0;
1297 margin: 0;
1205 padding:6px;
1298 padding: 6px;
1206 }
1299 }
1207
1300
1208 #content div.box div.pagination ul.pager li a:hover,#content div.box div.pagination ul.pager li a:active {
1301 #content div.box div.pagination ul.pager li a:hover,#content div.box div.pagination ul.pager li a:active
1209 background:#b4b4b4 url("../images/pager_selected.png") repeat-x;
1302 {
1210 border-top:1px solid #ccc;
1303 background: #b4b4b4 url("../images/pager_selected.png") repeat-x;
1211 border-left:1px solid #bebebe;
1304 border-top: 1px solid #ccc;
1212 border-right:1px solid #b1b1b1;
1305 border-left: 1px solid #bebebe;
1213 border-bottom:1px solid #afafaf;
1306 border-right: 1px solid #b1b1b1;
1214 margin:-1px;
1307 border-bottom: 1px solid #afafaf;
1308 margin: -1px;
1215 }
1309 }
1216
1310
1217 #content div.box div.pagination-wh {
1311 #content div.box div.pagination-wh {
1218 height:1%;
1312 height: 1%;
1219 clear:both;
1313 clear: both;
1220 overflow:hidden;
1314 overflow: hidden;
1221 text-align:right;
1315 text-align: right;
1222 margin:10px 0 0;
1316 margin: 10px 0 0;
1223 padding:0;
1317 padding: 0;
1224 }
1318 }
1225
1319
1226 #content div.box div.pagination-right {
1320 #content div.box div.pagination-right {
1227 float:right;
1321 float: right;
1228 }
1322 }
1229
1323
1230 #content div.box div.pagination-wh a,#content div.box div.pagination-wh span.pager_dotdot {
1324 #content div.box div.pagination-wh a,#content div.box div.pagination-wh span.pager_dotdot
1231 height:1%;
1325 {
1232 float:left;
1326 height: 1%;
1233 background:#ebebeb url("../images/pager.png") repeat-x;
1327 float: left;
1234 border-top:1px solid #dedede;
1328 background: #ebebeb url("../images/pager.png") repeat-x;
1235 border-left:1px solid #cfcfcf;
1329 border-top: 1px solid #dedede;
1236 border-right:1px solid #c4c4c4;
1330 border-left: 1px solid #cfcfcf;
1237 border-bottom:1px solid #c4c4c4;
1331 border-right: 1px solid #c4c4c4;
1238 color:#4A4A4A;
1332 border-bottom: 1px solid #c4c4c4;
1239 font-weight:700;
1333 color: #4A4A4A;
1240 margin:0 0 0 4px;
1334 font-weight: 700;
1241 padding:6px;
1335 margin: 0 0 0 4px;
1336 padding: 6px;
1242 }
1337 }
1243
1338
1244 #content div.box div.pagination-wh span.pager_curpage {
1339 #content div.box div.pagination-wh span.pager_curpage {
1245 height:1%;
1340 height: 1%;
1246 float:left;
1341 float: left;
1247 background:#b4b4b4 url("../images/pager_selected.png") repeat-x;
1342 background: #b4b4b4 url("../images/pager_selected.png") repeat-x;
1248 border-top:1px solid #ccc;
1343 border-top: 1px solid #ccc;
1249 border-left:1px solid #bebebe;
1344 border-left: 1px solid #bebebe;
1250 border-right:1px solid #b1b1b1;
1345 border-right: 1px solid #b1b1b1;
1251 border-bottom:1px solid #afafaf;
1346 border-bottom: 1px solid #afafaf;
1252 color:#515151;
1347 color: #515151;
1253 font-weight:700;
1348 font-weight: 700;
1254 margin:0 0 0 4px;
1349 margin: 0 0 0 4px;
1255 padding:6px;
1350 padding: 6px;
1256 }
1351 }
1257
1352
1258 #content div.box div.pagination-wh a:hover,#content div.box div.pagination-wh a:active {
1353 #content div.box div.pagination-wh a:hover,#content div.box div.pagination-wh a:active
1259 background:#b4b4b4 url("../images/pager_selected.png") repeat-x;
1354 {
1260 border-top:1px solid #ccc;
1355 background: #b4b4b4 url("../images/pager_selected.png") repeat-x;
1261 border-left:1px solid #bebebe;
1356 border-top: 1px solid #ccc;
1262 border-right:1px solid #b1b1b1;
1357 border-left: 1px solid #bebebe;
1263 border-bottom:1px solid #afafaf;
1358 border-right: 1px solid #b1b1b1;
1264 text-decoration:none;
1359 border-bottom: 1px solid #afafaf;
1360 text-decoration: none;
1265 }
1361 }
1266
1362
1267 #content div.box div.traffic div.legend {
1363 #content div.box div.traffic div.legend {
1268 clear:both;
1364 clear: both;
1269 overflow:hidden;
1365 overflow: hidden;
1270 border-bottom:1px solid #ddd;
1366 border-bottom: 1px solid #ddd;
1271 margin:0 0 10px;
1367 margin: 0 0 10px;
1272 padding:0 0 10px;
1368 padding: 0 0 10px;
1273 }
1369 }
1274
1370
1275 #content div.box div.traffic div.legend h6 {
1371 #content div.box div.traffic div.legend h6 {
1276 float:left;
1372 float: left;
1277 border:none;
1373 border: none;
1278 margin:0;
1374 margin: 0;
1279 padding:0;
1375 padding: 0;
1280 }
1376 }
1281
1377
1282 #content div.box div.traffic div.legend li {
1378 #content div.box div.traffic div.legend li {
1283 list-style:none;
1379 list-style: none;
1284 float:left;
1380 float: left;
1285 font-size:11px;
1381 font-size: 11px;
1286 margin:0;
1382 margin: 0;
1287 padding:0 8px 0 4px;
1383 padding: 0 8px 0 4px;
1288 }
1384 }
1289
1385
1290 #content div.box div.traffic div.legend li.visits {
1386 #content div.box div.traffic div.legend li.visits {
1291 border-left:12px solid #edc240;
1387 border-left: 12px solid #edc240;
1292 }
1388 }
1293
1389
1294 #content div.box div.traffic div.legend li.pageviews {
1390 #content div.box div.traffic div.legend li.pageviews {
1295 border-left:12px solid #afd8f8;
1391 border-left: 12px solid #afd8f8;
1296 }
1392 }
1297
1393
1298 #content div.box div.traffic table {
1394 #content div.box div.traffic table {
1299 width:auto;
1395 width: auto;
1300 }
1396 }
1301
1397
1302 #content div.box div.traffic table td {
1398 #content div.box div.traffic table td {
1303 background:transparent;
1399 background: transparent;
1304 border:none;
1400 border: none;
1305 padding:2px 3px 3px;
1401 padding: 2px 3px 3px;
1306 }
1402 }
1307
1403
1308 #content div.box div.traffic table td.legendLabel {
1404 #content div.box div.traffic table td.legendLabel {
1309 padding:0 3px 2px;
1405 padding: 0 3px 2px;
1310 }
1406 }
1311
1407
1312 #summary{
1408 #summary {
1313
1409
1314 }
1410 }
1315
1411
1316 #summary .desc{
1412 #summary .desc {
1317 white-space: pre;
1413 white-space: pre;
1318 width: 100%;
1414 width: 100%;
1319 }
1415 }
1320
1416
1321 #summary .repo_name{
1417 #summary .repo_name {
1322 font-size: 1.6em;
1418 font-size: 1.6em;
1323 font-weight: bold;
1419 font-weight: bold;
1324 vertical-align: baseline;
1420 vertical-align: baseline;
1325 clear:right
1421 clear: right
1326 }
1422 }
1327
1328
1423
1329 #footer {
1424 #footer {
1330 clear:both;
1425 clear: both;
1331 overflow:hidden;
1426 overflow: hidden;
1332 text-align:right;
1427 text-align: right;
1333 margin:0;
1428 margin: 0;
1334 padding:0 10px 4px;
1429 padding: 0 10px 4px;
1335 margin:-10px 0 0;
1430 margin: -10px 0 0;
1336 }
1431 }
1337
1432
1338 #footer div#footer-inner {
1433 #footer div#footer-inner {
1339 background:url("../images/header_inner.png") repeat-x scroll 0 0 #003367;
1434 background-color: #eedc94; background-repeat : repeat-x;
1340 box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
1435 background-image : -khtml-gradient( linear, left top, left bottom,
1341 -webkit-border-radius: 4px 4px 4px 4px;
1436 from( #fceec1), to( #eedc94)); background-image : -moz-linear-gradient(
1342 -khtml-border-radius: 4px 4px 4px 4px;
1437 top, #003b76, #00376e); background-image : -ms-linear-gradient( top,
1343 -moz-border-radius: 4px 4px 4px 4px;
1438 #003b76, #00376e); background-image : -webkit-gradient( linear, left
1344 border-radius: 4px 4px 4px 4px;
1439 top, left bottom, color-stop( 0%, #003b76), color-stop( 100%, #00376e));
1440 background-image : -webkit-linear-gradient( top, #003b76, #00376e));
1441 background-image : -o-linear-gradient( top, #003b76, #00376e));
1442 background-image : linear-gradient( top, #003b76, #00376e); filter :
1443 progid : DXImageTransform.Microsoft.gradient ( startColorstr =
1444 '#003b76', endColorstr = '#00376e', GradientType = 0);
1445 box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
1446 -webkit-border-radius: 4px 4px 4px 4px;
1447 -khtml-border-radius: 4px 4px 4px 4px;
1448 -moz-border-radius: 4px 4px 4px 4px;
1449 border-radius: 4px 4px 4px 4px;
1450 background-repeat: repeat-x;
1451 background-image: -khtml-gradient(linear, left top, left bottom, from(#fceec1),
1452 to(#eedc94) );
1453 background-image: -moz-linear-gradient(top, #003b76, #00376e);
1454 background-image: -ms-linear-gradient(top, #003b76, #00376e);
1455 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #003b76),
1456 color-stop(100%, #00376e) );
1457 background-image: -webkit-linear-gradient(top, #003b76, #00376e) );
1458 background-image: -o-linear-gradient(top, #003b76, #00376e) );
1459 background-image: linear-gradient(top, #003b76, #00376e);
1460 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#003b76',
1461 endColorstr='#00376e', GradientType=0 );
1345 }
1462 }
1346
1463
1347 #footer div#footer-inner p {
1464 #footer div#footer-inner p {
1348 padding:15px 25px 15px 0;
1465 padding: 15px 25px 15px 0;
1349 color:#FFF;
1466 color: #FFF;
1350 font-weight:700;
1467 font-weight: 700;
1351 }
1468 }
1469
1352 #footer div#footer-inner .footer-link {
1470 #footer div#footer-inner .footer-link {
1353 float:left;
1471 float: left;
1354 padding-left:10px;
1472 padding-left: 10px;
1355 }
1473 }
1356 #footer div#footer-inner .footer-link a,#footer div#footer-inner .footer-link-right a {
1474
1357 color:#FFF;
1475 #footer div#footer-inner .footer-link a,#footer div#footer-inner .footer-link-right a
1476 {
1477 color: #FFF;
1358 }
1478 }
1359
1479
1360 #login div.title {
1480 #login div.title {
1361 width:420px;
1481 width: 420px;
1362 clear:both;
1482 clear: both;
1363 overflow:hidden;
1483 overflow: hidden;
1364 position:relative;
1484 position: relative;
1365 background:#003367 url("../images/header_inner.png") repeat-x;
1485 background-color: #eedc94; background-repeat : repeat-x;
1366 margin:0 auto;
1486 background-image : -khtml-gradient( linear, left top, left bottom,
1367 padding:0;
1487 from( #fceec1), to( #eedc94)); background-image : -moz-linear-gradient(
1488 top, #003b76, #00376e); background-image : -ms-linear-gradient( top,
1489 #003b76, #00376e); background-image : -webkit-gradient( linear, left
1490 top, left bottom, color-stop( 0%, #003b76), color-stop( 100%, #00376e));
1491 background-image : -webkit-linear-gradient( top, #003b76, #00376e));
1492 background-image : -o-linear-gradient( top, #003b76, #00376e));
1493 background-image : linear-gradient( top, #003b76, #00376e); filter :
1494 progid : DXImageTransform.Microsoft.gradient ( startColorstr =
1495 '#003b76', endColorstr = '#00376e', GradientType = 0);
1496 margin: 0 auto;
1497 padding: 0;
1498 background-repeat: repeat-x;
1499 background-image: -khtml-gradient(linear, left top, left bottom, from(#fceec1),
1500 to(#eedc94) );
1501 background-image: -moz-linear-gradient(top, #003b76, #00376e);
1502 background-image: -ms-linear-gradient(top, #003b76, #00376e);
1503 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #003b76),
1504 color-stop(100%, #00376e) );
1505 background-image: -webkit-linear-gradient(top, #003b76, #00376e) );
1506 background-image: -o-linear-gradient(top, #003b76, #00376e) );
1507 background-image: linear-gradient(top, #003b76, #00376e);
1508 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#003b76',
1509 endColorstr='#00376e', GradientType=0 );
1368 }
1510 }
1369
1511
1370 #login div.inner {
1512 #login div.inner {
1371 width:380px;
1513 width: 380px;
1372 background:#FFF url("../images/login.png") no-repeat top left;
1514 background: #FFF url("../images/login.png") no-repeat top left;
1373 border-top:none;
1515 border-top: none;
1374 border-bottom:none;
1516 border-bottom: none;
1375 margin:0 auto;
1517 margin: 0 auto;
1376 padding:20px;
1518 padding: 20px;
1377 }
1519 }
1378
1520
1379 #login div.form div.fields div.field div.label {
1521 #login div.form div.fields div.field div.label {
1380 width:173px;
1522 width: 173px;
1381 float:left;
1523 float: left;
1382 text-align:right;
1524 text-align: right;
1383 margin:2px 10px 0 0;
1525 margin: 2px 10px 0 0;
1384 padding:5px 0 0 5px;
1526 padding: 5px 0 0 5px;
1385 }
1527 }
1386
1528
1387 #login div.form div.fields div.field div.input input {
1529 #login div.form div.fields div.field div.input input {
1388 width:176px;
1530 width: 176px;
1389 background:#FFF;
1531 background: #FFF;
1390 border-top:1px solid #b3b3b3;
1532 border-top: 1px solid #b3b3b3;
1391 border-left:1px solid #b3b3b3;
1533 border-left: 1px solid #b3b3b3;
1392 border-right:1px solid #eaeaea;
1534 border-right: 1px solid #eaeaea;
1393 border-bottom:1px solid #eaeaea;
1535 border-bottom: 1px solid #eaeaea;
1394 color:#000;
1536 color: #000;
1395 font-family:Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif;
1537 font-size: 11px;
1396 font-size:11px;
1538 margin: 0;
1397 margin:0;
1539 padding: 7px 7px 6px;
1398 padding:7px 7px 6px;
1399 }
1540 }
1400
1541
1401 #login div.form div.fields div.buttons {
1542 #login div.form div.fields div.buttons {
1402 clear:both;
1543 clear: both;
1403 overflow:hidden;
1544 overflow: hidden;
1404 border-top:1px solid #DDD;
1545 border-top: 1px solid #DDD;
1405 text-align:right;
1546 text-align: right;
1406 margin:0;
1547 margin: 0;
1407 padding:10px 0 0;
1548 padding: 10px 0 0;
1408 }
1549 }
1409
1550
1410 #login div.form div.links {
1551 #login div.form div.links {
1411 clear:both;
1552 clear: both;
1412 overflow:hidden;
1553 overflow: hidden;
1413 margin:10px 0 0;
1554 margin: 10px 0 0;
1414 padding:0 0 2px;
1555 padding: 0 0 2px;
1415 }
1556 }
1416
1557
1417 #quick_login{
1558 #quick_login {
1418 top: 31px;
1559 top: 31px;
1419 background-color: rgb(0, 51, 103);
1560 background-color: rgb(0, 51, 103);
1420 z-index: 999;
1561 z-index: 999;
1421 height: 150px;
1562 height: 150px;
1422 position: absolute;
1563 position: absolute;
1423 margin-left: -16px;
1564 margin-left: -16px;
1424 width: 281px;
1565 width: 281px;
1425 -webkit-border-radius: 0px 0px 4px 4px;
1566 -webkit-border-radius: 0px 0px 4px 4px;
1426 -khtml-border-radius: 0px 0px 4px 4px;
1567 -khtml-border-radius: 0px 0px 4px 4px;
1427 -moz-border-radius: 0px 0px 4px 4px;
1568 -moz-border-radius: 0px 0px 4px 4px;
1428 border-radius: 0px 0px 4px 4px;
1569 border-radius: 0px 0px 4px 4px;
1429
1570 box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
1430 box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
1571 }
1431 }
1572
1432
1573 #quick_login .password_forgoten {
1433 #quick_login .password_forgoten{
1574 padding-right: 10px;
1434 padding-right:10px;
1575 padding-top: 0px;
1435 padding-top:0px;
1576 float: left;
1436 float:left;
1577 }
1437 }
1578
1438 #quick_login .password_forgoten a{
1579 #quick_login .password_forgoten a {
1439 font-size: 10px
1580 font-size: 10px
1440 }
1581 }
1441
1582
1442 #quick_login .register{
1583 #quick_login .register {
1443 padding-right:10px;
1584 padding-right: 10px;
1444 padding-top:5px;
1585 padding-top: 5px;
1445 float:left;
1586 float: left;
1446 }
1587 }
1447
1588
1448 #quick_login .register a{
1589 #quick_login .register a {
1449 font-size: 10px
1590 font-size: 10px
1450 }
1591 }
1451 #quick_login div.form div.fields{
1592
1452 padding-top: 2px;
1593 #quick_login div.form div.fields {
1453 padding-left:10px;
1594 padding-top: 2px;
1454 }
1595 padding-left: 10px;
1455
1596 }
1456 #quick_login div.form div.fields div.field{
1597
1457 padding: 5px;
1598 #quick_login div.form div.fields div.field {
1458 }
1599 padding: 5px;
1459
1600 }
1460 #quick_login div.form div.fields div.field div.label label{
1601
1461 color:#fff;
1602 #quick_login div.form div.fields div.field div.label label {
1462 padding-bottom: 3px;
1603 color: #fff;
1604 padding-bottom: 3px;
1463 }
1605 }
1464
1606
1465 #quick_login div.form div.fields div.field div.input input {
1607 #quick_login div.form div.fields div.field div.input input {
1466 width:236px;
1608 width: 236px;
1467 background:#FFF;
1609 background: #FFF;
1468 border-top:1px solid #b3b3b3;
1610 border-top: 1px solid #b3b3b3;
1469 border-left:1px solid #b3b3b3;
1611 border-left: 1px solid #b3b3b3;
1470 border-right:1px solid #eaeaea;
1612 border-right: 1px solid #eaeaea;
1471 border-bottom:1px solid #eaeaea;
1613 border-bottom: 1px solid #eaeaea;
1472 color:#000;
1614 color: #000;
1473 font-family:Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif;
1615 font-size: 11px;
1474 font-size:11px;
1616 margin: 0;
1475 margin:0;
1617 padding: 5px 7px 4px;
1476 padding:5px 7px 4px;
1477 }
1618 }
1478
1619
1479 #quick_login div.form div.fields div.buttons {
1620 #quick_login div.form div.fields div.buttons {
1480 clear:both;
1621 clear: both;
1481 overflow:hidden;
1622 overflow: hidden;
1482 text-align:right;
1623 text-align: right;
1483 margin:0;
1624 margin: 0;
1484 padding:10px 14px 0px 5px;
1625 padding: 10px 14px 0px 5px;
1485 }
1626 }
1486
1627
1487 #quick_login div.form div.links {
1628 #quick_login div.form div.links {
1488 clear:both;
1629 clear: both;
1489 overflow:hidden;
1630 overflow: hidden;
1490 margin:10px 0 0;
1631 margin: 10px 0 0;
1491 padding:0 0 2px;
1632 padding: 0 0 2px;
1492 }
1633 }
1493
1634
1494 #register div.title {
1635 #register div.title {
1495 clear:both;
1636 clear: both;
1496 overflow:hidden;
1637 overflow: hidden;
1497 position:relative;
1638 position: relative;
1498 background:#003367 url("../images/header_inner.png") repeat-x;
1639 background-color: #eedc94;
1499 margin:0 auto;
1640 background-repeat: repeat-x;
1500 padding:0;
1641 background-image: -khtml-gradient(linear, left top, left bottom, from(#fceec1),
1642 to(#eedc94) );
1643 background-image: -moz-linear-gradient(top, #003b76, #00376e);
1644 background-image: -ms-linear-gradient(top, #003b76, #00376e);
1645 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #003b76),
1646 color-stop(100%, #00376e) );
1647 background-image: -webkit-linear-gradient(top, #003b76, #00376e) );
1648 background-image: -o-linear-gradient(top, #003b76, #00376e) );
1649 background-image: linear-gradient(top, #003b76, #00376e);
1650 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#003b76',
1651 endColorstr='#00376e', GradientType=0 );
1652 margin: 0 auto;
1653 padding: 0;
1501 }
1654 }
1502
1655
1503 #register div.inner {
1656 #register div.inner {
1504 background:#FFF;
1657 background: #FFF;
1505 border-top:none;
1658 border-top: none;
1506 border-bottom:none;
1659 border-bottom: none;
1507 margin:0 auto;
1660 margin: 0 auto;
1508 padding:20px;
1661 padding: 20px;
1509 }
1662 }
1510
1663
1511 #register div.form div.fields div.field div.label {
1664 #register div.form div.fields div.field div.label {
1512 width:135px;
1665 width: 135px;
1513 float:left;
1666 float: left;
1514 text-align:right;
1667 text-align: right;
1515 margin:2px 10px 0 0;
1668 margin: 2px 10px 0 0;
1516 padding:5px 0 0 5px;
1669 padding: 5px 0 0 5px;
1517 }
1670 }
1518
1671
1519 #register div.form div.fields div.field div.input input {
1672 #register div.form div.fields div.field div.input input {
1520 width:300px;
1673 width: 300px;
1521 background:#FFF;
1674 background: #FFF;
1522 border-top:1px solid #b3b3b3;
1675 border-top: 1px solid #b3b3b3;
1523 border-left:1px solid #b3b3b3;
1676 border-left: 1px solid #b3b3b3;
1524 border-right:1px solid #eaeaea;
1677 border-right: 1px solid #eaeaea;
1525 border-bottom:1px solid #eaeaea;
1678 border-bottom: 1px solid #eaeaea;
1526 color:#000;
1679 color: #000;
1527 font-family:Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif;
1680 font-size: 11px;
1528 font-size:11px;
1681 margin: 0;
1529 margin:0;
1682 padding: 7px 7px 6px;
1530 padding:7px 7px 6px;
1531 }
1683 }
1532
1684
1533 #register div.form div.fields div.buttons {
1685 #register div.form div.fields div.buttons {
1534 clear:both;
1686 clear: both;
1535 overflow:hidden;
1687 overflow: hidden;
1536 border-top:1px solid #DDD;
1688 border-top: 1px solid #DDD;
1537 text-align:left;
1689 text-align: left;
1538 margin:0;
1690 margin: 0;
1539 padding:10px 0 0 150px;
1691 padding: 10px 0 0 150px;
1540 }
1692 }
1541
1542
1693
1543 #register div.form div.activation_msg {
1694 #register div.form div.activation_msg {
1544 padding-top:4px;
1695 padding-top: 4px;
1545 padding-bottom:4px;
1696 padding-bottom: 4px;
1546 }
1697 }
1547
1698
1548 #journal .journal_day{
1699 #journal .journal_day {
1549 font-size:20px;
1700 font-size: 20px;
1550 padding:10px 0px;
1701 padding: 10px 0px;
1551 border-bottom:2px solid #DDD;
1702 border-bottom: 2px solid #DDD;
1552 margin-left:10px;
1703 margin-left: 10px;
1553 margin-right:10px;
1704 margin-right: 10px;
1554 }
1705 }
1555
1706
1556 #journal .journal_container{
1707 #journal .journal_container {
1557 padding:5px;
1708 padding: 5px;
1558 clear:both;
1709 clear: both;
1559 margin:0px 5px 0px 10px;
1710 margin: 0px 5px 0px 10px;
1560 }
1711 }
1561
1712
1562 #journal .journal_action_container{
1713 #journal .journal_action_container {
1563 padding-left:38px;
1714 padding-left: 38px;
1564 }
1715 }
1565
1716
1566 #journal .journal_user{
1717 #journal .journal_user {
1567 color: #747474;
1718 color: #747474;
1568 font-size: 14px;
1719 font-size: 14px;
1569 font-weight: bold;
1720 font-weight: bold;
1570 height: 30px;
1721 height: 30px;
1571 }
1722 }
1572 #journal .journal_icon{
1723
1573 clear: both;
1724 #journal .journal_icon {
1574 float: left;
1725 clear: both;
1575 padding-right: 4px;
1726 float: left;
1576 padding-top: 3px;
1727 padding-right: 4px;
1577 }
1728 padding-top: 3px;
1578 #journal .journal_action{
1729 }
1579 padding-top:4px;
1730
1580 min-height:2px;
1731 #journal .journal_action {
1581 float:left
1732 padding-top: 4px;
1582 }
1733 min-height: 2px;
1583 #journal .journal_action_params{
1734 float: left
1584 clear: left;
1735 }
1585 padding-left: 22px;
1736
1586 }
1737 #journal .journal_action_params {
1587 #journal .journal_repo{
1738 clear: left;
1588 float: left;
1739 padding-left: 22px;
1589 margin-left: 6px;
1740 }
1590 padding-top: 3px;
1741
1591 }
1742 #journal .journal_repo {
1592 #journal .date{
1743 float: left;
1593 clear: both;
1744 margin-left: 6px;
1594 color: #777777;
1745 padding-top: 3px;
1595 font-size: 11px;
1746 }
1596 padding-left: 22px;
1747
1597 }
1748 #journal .date {
1598 #journal .journal_repo .journal_repo_name{
1749 clear: both;
1599 font-weight: bold;
1750 color: #777777;
1600 font-size: 1.1em;
1751 font-size: 11px;
1601 }
1752 padding-left: 22px;
1602 #journal .compare_view{
1753 }
1603 padding: 5px 0px 5px 0px;
1754
1604 width: 95px;
1755 #journal .journal_repo .journal_repo_name {
1605 }
1756 font-weight: bold;
1606 .journal_highlight{
1757 font-size: 1.1em;
1607 font-weight: bold;
1758 }
1608 padding: 0 2px;
1759
1609 vertical-align: bottom;
1760 #journal .compare_view {
1610 }
1761 padding: 5px 0px 5px 0px;
1762 width: 95px;
1763 }
1764
1765 .journal_highlight {
1766 font-weight: bold;
1767 padding: 0 2px;
1768 vertical-align: bottom;
1769 }
1770
1611 .trending_language_tbl,.trending_language_tbl td {
1771 .trending_language_tbl,.trending_language_tbl td {
1612 border:0 !important;
1772 border: 0 !important;
1613 margin:0 !important;
1773 margin: 0 !important;
1614 padding:0 !important;
1774 padding: 0 !important;
1615 }
1775 }
1616
1776
1617 .trending_language {
1777 .trending_language {
1618 background-color:#003367;
1778 background-color: #003367;
1619 color:#FFF;
1779 color: #FFF;
1620 display:block;
1780 display: block;
1621 min-width:20px;
1781 min-width: 20px;
1622 text-decoration:none;
1782 text-decoration: none;
1623 height:12px;
1783 height: 12px;
1624 margin-bottom:4px;
1784 margin-bottom: 4px;
1625 margin-left:5px;
1785 margin-left: 5px;
1626 white-space:pre;
1786 white-space: pre;
1627 padding:3px;
1787 padding: 3px;
1628 }
1788 }
1629
1789
1630 h3.files_location {
1790 h3.files_location {
1631 font-size:1.8em;
1791 font-size: 1.8em;
1632 font-weight:700;
1792 font-weight: 700;
1633 border-bottom:none !important;
1793 border-bottom: none !important;
1634 margin:10px 0 !important;
1794 margin: 10px 0 !important;
1635 }
1795 }
1636
1796
1637 #files_data dl dt {
1797 #files_data dl dt {
1638 float:left;
1798 float: left;
1639 width:115px;
1799 width: 115px;
1640 margin:0 !important;
1800 margin: 0 !important;
1641 padding:5px;
1801 padding: 5px;
1642 }
1802 }
1643
1803
1644 #files_data dl dd {
1804 #files_data dl dd {
1645 margin:0 !important;
1805 margin: 0 !important;
1646 padding:5px !important;
1806 padding: 5px !important;
1647 }
1807 }
1648
1808
1649 #changeset_content {
1809 #changeset_content {
1650 border:1px solid #CCC;
1810 border: 1px solid #CCC;
1651 padding:5px;
1811 padding: 5px;
1652 }
1812 }
1653 #changeset_compare_view_content{
1813
1654 border:1px solid #CCC;
1814 #changeset_compare_view_content {
1655 padding:5px;
1815 border: 1px solid #CCC;
1816 padding: 5px;
1656 }
1817 }
1657
1818
1658 #changeset_content .container {
1819 #changeset_content .container {
1659 min-height:120px;
1820 min-height: 120px;
1660 font-size:1.2em;
1821 font-size: 1.2em;
1661 overflow:hidden;
1822 overflow: hidden;
1662 }
1823 }
1663
1824
1664 #changeset_compare_view_content .compare_view_commits{
1825 #changeset_compare_view_content .compare_view_commits {
1665 width: auto !important;
1826 width: auto !important;
1666 }
1827 }
1667
1828
1668 #changeset_compare_view_content .compare_view_commits td{
1829 #changeset_compare_view_content .compare_view_commits td {
1669 padding:0px 0px 0px 12px !important;
1830 padding: 0px 0px 0px 12px !important;
1670 }
1831 }
1671
1832
1672 #changeset_content .container .right {
1833 #changeset_content .container .right {
1673 float:right;
1834 float: right;
1674 width:25%;
1835 width: 25%;
1675 text-align:right;
1836 text-align: right;
1676 }
1837 }
1677
1838
1678 #changeset_content .container .left .message {
1839 #changeset_content .container .left .message {
1679 font-style:italic;
1840 font-style: italic;
1680 color:#556CB5;
1841 color: #556CB5;
1681 white-space:pre-wrap;
1842 white-space: pre-wrap;
1682 }
1843 }
1683
1844
1684 .cs_files .cur_cs{
1845 .cs_files .cur_cs {
1685 margin:10px 2px;
1846 margin: 10px 2px;
1686 font-weight: bold;
1847 font-weight: bold;
1687 }
1848 }
1688
1849
1689 .cs_files .node{
1850 .cs_files .node {
1690 float: left;
1851 float: left;
1691 }
1852 }
1692 .cs_files .changes{
1853
1693 float: right;
1854 .cs_files .changes {
1694 }
1855 float: right;
1695 .cs_files .changes .added{
1856 }
1696 background-color: #BBFFBB;
1857
1697 float: left;
1858 .cs_files .changes .added {
1698 text-align: center;
1859 background-color: #BBFFBB;
1699 font-size: 90%;
1860 float: left;
1700 }
1861 text-align: center;
1701 .cs_files .changes .deleted{
1862 font-size: 90%;
1702 background-color: #FF8888;
1863 }
1703 float: left;
1864
1704 text-align: center;
1865 .cs_files .changes .deleted {
1705 font-size: 90%;
1866 background-color: #FF8888;
1706 }
1867 float: left;
1868 text-align: center;
1869 font-size: 90%;
1870 }
1871
1707 .cs_files .cs_added {
1872 .cs_files .cs_added {
1708 background:url("../images/icons/page_white_add.png") no-repeat scroll 3px;
1873 background: url("../images/icons/page_white_add.png") no-repeat scroll
1709 height:16px;
1874 3px;
1710 padding-left:20px;
1875 height: 16px;
1711 margin-top:7px;
1876 padding-left: 20px;
1712 text-align:left;
1877 margin-top: 7px;
1878 text-align: left;
1713 }
1879 }
1714
1880
1715 .cs_files .cs_changed {
1881 .cs_files .cs_changed {
1716 background:url("../images/icons/page_white_edit.png") no-repeat scroll 3px;
1882 background: url("../images/icons/page_white_edit.png") no-repeat scroll
1717 height:16px;
1883 3px;
1718 padding-left:20px;
1884 height: 16px;
1719 margin-top:7px;
1885 padding-left: 20px;
1720 text-align:left;
1886 margin-top: 7px;
1887 text-align: left;
1721 }
1888 }
1722
1889
1723 .cs_files .cs_removed {
1890 .cs_files .cs_removed {
1724 background:url("../images/icons/page_white_delete.png") no-repeat scroll 3px;
1891 background: url("../images/icons/page_white_delete.png") no-repeat
1725 height:16px;
1892 scroll 3px;
1726 padding-left:20px;
1893 height: 16px;
1727 margin-top:7px;
1894 padding-left: 20px;
1728 text-align:left;
1895 margin-top: 7px;
1896 text-align: left;
1729 }
1897 }
1730
1898
1731 #graph {
1899 #graph {
1732 overflow:hidden;
1900 overflow: hidden;
1733 }
1901 }
1734
1902
1735 #graph_nodes {
1903 #graph_nodes {
1736 float: left;
1904 float: left;
1737 margin-right: -6px;
1905 margin-right: -6px;
1738 margin-top: -4px;
1906 margin-top: -4px;
1739 }
1907 }
1740
1908
1741 #graph_content {
1909 #graph_content {
1742 width:800px;
1910 width: 800px;
1743 float:left;
1911 float: left;
1744
1745 }
1912 }
1746
1913
1747 #graph_content .container_header {
1914 #graph_content .container_header {
1748 border:1px solid #CCC;
1915 border: 1px solid #CCC;
1749 padding:10px;
1916 padding: 10px;
1750 }
1917 }
1751 #graph_content #rev_range_container{
1918
1752 padding:10px 0px;
1919 #graph_content #rev_range_container {
1753 }
1920 padding: 10px 0px;
1921 }
1922
1754 #graph_content .container {
1923 #graph_content .container {
1755 border-bottom:1px solid #CCC;
1924 border-bottom: 1px solid #CCC;
1756 border-left:1px solid #CCC;
1925 border-left: 1px solid #CCC;
1757 border-right:1px solid #CCC;
1926 border-right: 1px solid #CCC;
1758 min-height:70px;
1927 min-height: 70px;
1759 overflow:hidden;
1928 overflow: hidden;
1760 font-size:1.2em;
1929 font-size: 1.2em;
1761 }
1930 }
1762
1931
1763 #graph_content .container .right {
1932 #graph_content .container .right {
1764 float:right;
1933 float: right;
1765 width:28%;
1934 width: 28%;
1766 text-align:right;
1935 text-align: right;
1767 padding-bottom:5px;
1936 padding-bottom: 5px;
1768 }
1937 }
1769
1938
1770 #graph_content .container .left .date {
1939 #graph_content .container .left .date {
1771 font-weight:700;
1940 font-weight: 700;
1772 padding-bottom:5px;
1941 padding-bottom: 5px;
1773 }
1942 }
1774 #graph_content .container .left .date span{
1943
1775 vertical-align: text-top;
1944 #graph_content .container .left .date span {
1776 }
1945 vertical-align: text-top;
1777
1946 }
1778 #graph_content .container .left .author{
1947
1779 height: 22px;
1948 #graph_content .container .left .author {
1780 }
1949 height: 22px;
1781 #graph_content .container .left .author .user{
1950 }
1782 color: #444444;
1951
1783 float: left;
1952 #graph_content .container .left .author .user {
1784 font-size: 12px;
1953 color: #444444;
1785 margin-left: -4px;
1954 float: left;
1786 margin-top: 4px;
1955 font-size: 12px;
1956 margin-left: -4px;
1957 margin-top: 4px;
1787 }
1958 }
1788
1959
1789 #graph_content .container .left .message {
1960 #graph_content .container .left .message {
1790 font-size:100%;
1961 font-size: 100%;
1791 padding-top:3px;
1962 padding-top: 3px;
1792 white-space:pre-wrap;
1963 white-space: pre-wrap;
1964 }
1965
1966 #graph_content .container .left .message a:hover{
1967 text-decoration: none;
1793 }
1968 }
1794
1969
1795 .right div {
1970 .right div {
1796 clear:both;
1971 clear: both;
1797 }
1972 }
1798
1973
1799 .right .changes .changed_total{
1974 .right .changes .changed_total {
1800 border:1px solid #DDD;
1975 border: 1px solid #DDD;
1801 display:block;
1976 display: block;
1802 float:right;
1977 float: right;
1803 text-align:center;
1978 text-align: center;
1804 min-width:45px;
1979 min-width: 45px;
1805 cursor: pointer;
1980 cursor: pointer;
1806 background:#FD8;
1981 background: #FD8;
1807 font-weight: bold;
1982 font-weight: bold;
1808 }
1983 }
1984
1809 .right .changes .added,.changed,.removed {
1985 .right .changes .added,.changed,.removed {
1810 border:1px solid #DDD;
1986 border: 1px solid #DDD;
1811 display:block;
1987 display: block;
1812 float:right;
1988 float: right;
1813 text-align:center;
1989 text-align: center;
1814 min-width:15px;
1990 min-width: 15px;
1815 cursor: help;
1991 cursor: help;
1816 }
1992 }
1993
1817 .right .changes .large {
1994 .right .changes .large {
1818 border:1px solid #DDD;
1995 border: 1px solid #DDD;
1819 display:block;
1996 display: block;
1820 float:right;
1997 float: right;
1821 text-align:center;
1998 text-align: center;
1822 min-width:45px;
1999 min-width: 45px;
1823 cursor: help;
2000 cursor: help;
1824 background: #54A9F7;
2001 background: #54A9F7;
1825 }
2002 }
1826
2003
1827 .right .changes .added {
2004 .right .changes .added {
1828 background:#BFB;
2005 background: #BFB;
1829 }
2006 }
1830
2007
1831 .right .changes .changed {
2008 .right .changes .changed {
1832 background:#FD8;
2009 background: #FD8;
1833 }
2010 }
1834
2011
1835 .right .changes .removed {
2012 .right .changes .removed {
1836 background:#F88;
2013 background: #F88;
1837 }
2014 }
1838
2015
1839 .right .merge {
2016 .right .merge {
1840 vertical-align:top;
2017 vertical-align: top;
1841 font-size:0.75em;
2018 font-size: 0.75em;
1842 font-weight:700;
2019 font-weight: 700;
1843 }
2020 }
1844
2021
1845 .right .parent {
2022 .right .parent {
1846 font-size:90%;
2023 font-size: 90%;
1847 font-family:monospace;
2024 font-family: monospace;
1848 }
2025 }
1849
2026
1850 .right .logtags .branchtag {
2027 .right .logtags .branchtag {
1851 background:#FFF url("../images/icons/arrow_branch.png") no-repeat right 6px;
2028 background: #FFF url("../images/icons/arrow_branch.png") no-repeat right
1852 display:block;
2029 6px;
1853 font-size:0.8em;
2030 display: block;
1854 padding:11px 16px 0 0;
2031 font-size: 0.8em;
2032 padding: 11px 16px 0 0;
1855 }
2033 }
1856
2034
1857 .right .logtags .tagtag {
2035 .right .logtags .tagtag {
1858 background:#FFF url("../images/icons/tag_blue.png") no-repeat right 6px;
2036 background: #FFF url("../images/icons/tag_blue.png") no-repeat right 6px;
1859 display:block;
2037 display: block;
1860 font-size:0.8em;
2038 font-size: 0.8em;
1861 padding:11px 16px 0 0;
2039 padding: 11px 16px 0 0;
1862 }
2040 }
1863
2041
1864 div.browserblock {
2042 div.browserblock {
1865 overflow:hidden;
2043 overflow: hidden;
1866 border:1px solid #ccc;
2044 border: 1px solid #ccc;
1867 background:#f8f8f8;
2045 background: #f8f8f8;
1868 font-size:100%;
2046 font-size: 100%;
1869 line-height:125%;
2047 line-height: 125%;
1870 padding:0;
2048 padding: 0;
1871 }
2049 }
1872
2050
1873 div.browserblock .browser-header {
2051 div.browserblock .browser-header {
1874 background:#FFF;
2052 background: #FFF;
1875 padding:10px 0px 15px 0px;
2053 padding: 10px 0px 15px 0px;
1876 width: 100%;
2054 width: 100%;
1877 }
2055 }
2056
1878 div.browserblock .browser-nav {
2057 div.browserblock .browser-nav {
1879 float:left
2058 float: left
1880 }
2059 }
1881
2060
1882 div.browserblock .browser-branch {
2061 div.browserblock .browser-branch {
1883 float:left;
2062 float: left;
1884 }
2063 }
1885
2064
1886 div.browserblock .browser-branch label {
2065 div.browserblock .browser-branch label {
1887 color:#4A4A4A;
2066 color: #4A4A4A;
1888 vertical-align:text-top;
2067 vertical-align: text-top;
1889 }
2068 }
1890
2069
1891 div.browserblock .browser-header span {
2070 div.browserblock .browser-header span {
1892 margin-left:5px;
2071 margin-left: 5px;
1893 font-weight:700;
2072 font-weight: 700;
1894 }
2073 }
1895
2074
1896 div.browserblock .browser-search{
2075 div.browserblock .browser-search {
1897 clear:both;
2076 clear: both;
1898 padding:8px 8px 0px 5px;
2077 padding: 8px 8px 0px 5px;
1899 height: 20px;
2078 height: 20px;
1900 }
2079 }
2080
1901 div.browserblock #node_filter_box {
2081 div.browserblock #node_filter_box {
1902 }
2082
1903
2083 }
1904 div.browserblock .search_activate{
2084
1905 float: left
2085 div.browserblock .search_activate {
1906 }
2086 float: left
1907
2087 }
1908 div.browserblock .add_node{
2088
1909 float: left;
2089 div.browserblock .add_node {
1910 padding-left: 5px;
2090 float: left;
1911 }
2091 padding-left: 5px;
1912
2092 }
1913 div.browserblock .search_activate a:hover,div.browserblock .add_node a:hover{
2093
1914 text-decoration: none !important;
2094 div.browserblock .search_activate a:hover,div.browserblock .add_node a:hover
2095 {
2096 text-decoration: none !important;
1915 }
2097 }
1916
2098
1917 div.browserblock .browser-body {
2099 div.browserblock .browser-body {
1918 background:#EEE;
2100 background: #EEE;
1919 border-top:1px solid #CCC;
2101 border-top: 1px solid #CCC;
1920 }
2102 }
1921
2103
1922 table.code-browser {
2104 table.code-browser {
1923 border-collapse:collapse;
2105 border-collapse: collapse;
1924 width:100%;
2106 width: 100%;
1925 }
2107 }
1926
2108
1927 table.code-browser tr {
2109 table.code-browser tr {
1928 margin:3px;
2110 margin: 3px;
1929 }
2111 }
1930
2112
1931 table.code-browser thead th {
2113 table.code-browser thead th {
1932 background-color:#EEE;
2114 background-color: #EEE;
1933 height:20px;
2115 height: 20px;
1934 font-size:1.1em;
2116 font-size: 1.1em;
1935 font-weight:700;
2117 font-weight: 700;
1936 text-align:left;
2118 text-align: left;
1937 padding-left:10px;
2119 padding-left: 10px;
1938 }
2120 }
1939
2121
1940 table.code-browser tbody td {
2122 table.code-browser tbody td {
1941 padding-left:10px;
2123 padding-left: 10px;
1942 height:20px;
2124 height: 20px;
1943 }
2125 }
1944
2126
1945 table.code-browser .browser-file {
2127 table.code-browser .browser-file {
1946 background:url("../images/icons/document_16.png") no-repeat scroll 3px;
2128 background: url("../images/icons/document_16.png") no-repeat scroll 3px;
1947 height:16px;
2129 height: 16px;
1948 padding-left:20px;
2130 padding-left: 20px;
1949 text-align:left;
2131 text-align: left;
1950 }
2132 }
1951 .diffblock .changeset_file{
2133
1952 background:url("../images/icons/file.png") no-repeat scroll 3px;
2134 .diffblock .changeset_file {
1953 height:16px;
2135 background: url("../images/icons/file.png") no-repeat scroll 3px;
1954 padding-left:22px;
2136 height: 16px;
1955 text-align:left;
2137 padding-left: 22px;
1956 font-size: 14px;
2138 text-align: left;
1957 }
2139 font-size: 14px;
1958
2140 }
1959 .diffblock .changeset_header{
2141
1960 margin-left: 6px !important;
2142 .diffblock .changeset_header {
2143 margin-left: 6px !important;
1961 }
2144 }
1962
2145
1963 table.code-browser .browser-dir {
2146 table.code-browser .browser-dir {
1964 background:url("../images/icons/folder_16.png") no-repeat scroll 3px;
2147 background: url("../images/icons/folder_16.png") no-repeat scroll 3px;
1965 height:16px;
2148 height: 16px;
1966 padding-left:20px;
2149 padding-left: 20px;
1967 text-align:left;
2150 text-align: left;
1968 }
2151 }
1969
2152
1970 .box .search {
2153 .box .search {
2154 clear: both;
2155 overflow: hidden;
2156 margin: 0;
2157 padding: 0 20px 10px;
2158 }
2159
2160 .box .search div.search_path {
2161 background: none repeat scroll 0 0 #EEE;
2162 border: 1px solid #CCC;
2163 color: blue;
2164 margin-bottom: 10px;
2165 padding: 10px 0;
2166 }
2167
2168 .box .search div.search_path div.link {
2169 font-weight: 700;
2170 margin-left: 25px;
2171 }
2172
2173 .box .search div.search_path div.link a {
2174 color: #003367;
2175 cursor: pointer;
2176 text-decoration: none;
2177 }
2178
2179 #path_unlock {
2180 color: red;
2181 font-size: 1.2em;
2182 padding-left: 4px;
2183 }
2184
2185 .info_box span {
2186 margin-left: 3px;
2187 margin-right: 3px;
2188 }
2189
2190 .info_box .rev {
2191 color: #003367;
2192 font-size: 1.6em;
2193 font-weight: bold;
2194 vertical-align: sub;
2195 }
2196
2197 .info_box input#at_rev,.info_box input#size {
2198 background: #FFF;
2199 border-top: 1px solid #b3b3b3;
2200 border-left: 1px solid #b3b3b3;
2201 border-right: 1px solid #eaeaea;
2202 border-bottom: 1px solid #eaeaea;
2203 color: #000;
2204 font-size: 12px;
2205 margin: 0;
2206 padding: 1px 5px 1px;
2207 }
2208
2209 .info_box input#view {
2210 text-align: center;
2211 padding: 4px 3px 2px 2px;
2212 }
2213
2214 .yui-overlay,.yui-panel-container {
2215 visibility: hidden;
2216 position: absolute;
2217 z-index: 2;
2218 }
2219
2220 .yui-tt {
2221 visibility: hidden;
2222 position: absolute;
2223 color: #666;
2224 background-color: #FFF;
2225 border: 2px solid #003367;
2226 font: 100% sans-serif;
2227 width: auto;
2228 opacity: 1px;
2229 padding: 8px;
2230 white-space: pre-wrap;
2231 -webkit-border-radius: 8px 8px 8px 8px;
2232 -khtml-border-radius: 8px 8px 8px 8px;
2233 -moz-border-radius: 8px 8px 8px 8px;
2234 border-radius: 8px 8px 8px 8px;
2235 box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
2236 }
2237
2238 .ac {
2239 vertical-align: top;
2240 }
2241
2242 .ac .yui-ac {
2243 position: relative;
2244 font-size: 100%;
2245 }
2246
2247 .ac .perm_ac {
2248 width: 15em;
2249 }
2250
2251 .ac .yui-ac-input {
2252 width: 100%;
2253 }
2254
2255 .ac .yui-ac-container {
2256 position: absolute;
2257 top: 1.6em;
2258 width: 100%;
2259 }
2260
2261 .ac .yui-ac-content {
2262 position: absolute;
2263 width: 100%;
2264 border: 1px solid gray;
2265 background: #fff;
2266 overflow: hidden;
2267 z-index: 9050;
2268 }
2269
2270 .ac .yui-ac-shadow {
2271 position: absolute;
2272 width: 100%;
2273 background: #000;
2274 -moz-opacity: 0.1px;
2275 opacity: .10;
2276 filter: alpha(opacity = 10);
2277 z-index: 9049;
2278 margin: .3em;
2279 }
2280
2281 .ac .yui-ac-content ul {
2282 width: 100%;
2283 margin: 0;
2284 padding: 0;
2285 }
2286
2287 .ac .yui-ac-content li {
2288 cursor: default;
2289 white-space: nowrap;
2290 margin: 0;
2291 padding: 2px 5px;
2292 }
2293
2294 .ac .yui-ac-content li.yui-ac-prehighlight {
2295 background: #B3D4FF;
2296 }
2297
2298 .ac .yui-ac-content li.yui-ac-highlight {
2299 background: #556CB5;
2300 color: #FFF;
2301 }
2302
2303 .follow {
2304 background: url("../images/icons/heart_add.png") no-repeat scroll 3px;
2305 height: 16px;
2306 width: 20px;
2307 cursor: pointer;
2308 display: block;
2309 float: right;
2310 margin-top: 2px;
2311 }
2312
2313 .following {
2314 background: url("../images/icons/heart_delete.png") no-repeat scroll 3px;
2315 height: 16px;
2316 width: 20px;
2317 cursor: pointer;
2318 display: block;
2319 float: right;
2320 margin-top: 2px;
2321 }
2322
2323 .currently_following {
2324 padding-left: 10px;
2325 padding-bottom: 5px;
2326 }
2327
2328 .add_icon {
2329 background: url("../images/icons/add.png") no-repeat scroll 3px;
2330 padding-left: 20px;
2331 padding-top: 0px;
2332 text-align: left;
2333 }
2334
2335 .edit_icon {
2336 background: url("../images/icons/folder_edit.png") no-repeat scroll 3px;
2337 padding-left: 20px;
2338 padding-top: 0px;
2339 text-align: left;
2340 }
2341
2342 .delete_icon {
2343 background: url("../images/icons/delete.png") no-repeat scroll 3px;
2344 padding-left: 20px;
2345 padding-top: 0px;
2346 text-align: left;
2347 }
2348
2349 .refresh_icon {
2350 background: url("../images/icons/arrow_refresh.png") no-repeat scroll
2351 3px;
2352 padding-left: 20px;
2353 padding-top: 0px;
2354 text-align: left;
2355 }
2356
2357 .pull_icon {
2358 background: url("../images/icons/connect.png") no-repeat scroll 3px;
2359 padding-left: 20px;
2360 padding-top: 0px;
2361 text-align: left;
2362 }
2363
2364 .rss_icon {
2365 background: url("../images/icons/rss_16.png") no-repeat scroll 3px;
2366 padding-left: 20px;
2367 padding-top: 0px;
2368 text-align: left;
2369 }
2370
2371 .atom_icon {
2372 background: url("../images/icons/atom.png") no-repeat scroll 3px;
2373 padding-left: 20px;
2374 padding-top: 0px;
2375 text-align: left;
2376 }
2377
2378 .archive_icon {
2379 background: url("../images/icons/compress.png") no-repeat scroll 3px;
2380 padding-left: 20px;
2381 text-align: left;
2382 padding-top: 1px;
2383 }
2384
2385 .start_following_icon {
2386 background: url("../images/icons/heart_add.png") no-repeat scroll 3px;
2387 padding-left: 20px;
2388 text-align: left;
2389 padding-top: 0px;
2390 }
2391
2392 .stop_following_icon {
2393 background: url("../images/icons/heart_delete.png") no-repeat scroll 3px;
2394 padding-left: 20px;
2395 text-align: left;
2396 padding-top: 0px;
2397 }
2398
2399 .action_button {
2400 border: 0;
2401 display: inline;
2402 }
2403
2404 .action_button:hover {
2405 border: 0;
2406 text-decoration: underline;
2407 cursor: pointer;
2408 }
2409
2410 #switch_repos {
2411 position: absolute;
2412 height: 25px;
2413 z-index: 1;
2414 }
2415
2416 #switch_repos select {
2417 min-width: 150px;
2418 max-height: 250px;
2419 z-index: 1;
2420 }
2421
2422 .breadcrumbs {
2423 border: medium none;
2424 color: #FFF;
2425 float: left;
2426 text-transform: uppercase;
2427 font-weight: 700;
2428 font-size: 14px;
2429 margin: 0;
2430 padding: 11px 0 11px 10px;
2431 }
2432
2433 .breadcrumbs a {
2434 color: #FFF;
2435 }
2436
2437 .flash_msg {
2438
2439 }
2440
2441 .flash_msg ul {
2442
2443 }
2444
2445 .error_msg {
2446 background-color: #c43c35;
2447 background-repeat: repeat-x;
2448 background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b),
2449 to(#c43c35) );
2450 background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
2451 background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
2452 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b),
2453 color-stop(100%, #c43c35) );
2454 background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
2455 background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
2456 background-image: linear-gradient(top, #ee5f5b, #c43c35);
2457 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b',
2458 endColorstr='#c43c35', GradientType=0 );
2459 border-color: #c43c35 #c43c35 #882a25;
2460 }
2461
2462 .warning_msg {
2463 color: #404040 !important;
2464 background-color: #eedc94;
2465 background-repeat: repeat-x;
2466 background-image: -khtml-gradient(linear, left top, left bottom, from(#fceec1),
2467 to(#eedc94) );
2468 background-image: -moz-linear-gradient(top, #fceec1, #eedc94);
2469 background-image: -ms-linear-gradient(top, #fceec1, #eedc94);
2470 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fceec1),
2471 color-stop(100%, #eedc94) );
2472 background-image: -webkit-linear-gradient(top, #fceec1, #eedc94);
2473 background-image: -o-linear-gradient(top, #fceec1, #eedc94);
2474 background-image: linear-gradient(top, #fceec1, #eedc94);
2475 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fceec1',
2476 endColorstr='#eedc94', GradientType=0 );
2477 border-color: #eedc94 #eedc94 #e4c652;
2478 }
2479
2480 .success_msg {
2481 background-color: #57a957;
2482 background-repeat: repeat-x !important;
2483 background-image: -khtml-gradient(linear, left top, left bottom, from(#62c462),
2484 to(#57a957) );
2485 background-image: -moz-linear-gradient(top, #62c462, #57a957);
2486 background-image: -ms-linear-gradient(top, #62c462, #57a957);
2487 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462),
2488 color-stop(100%, #57a957) );
2489 background-image: -webkit-linear-gradient(top, #62c462, #57a957);
2490 background-image: -o-linear-gradient(top, #62c462, #57a957);
2491 background-image: linear-gradient(top, #62c462, #57a957);
2492 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462',
2493 endColorstr='#57a957', GradientType=0 );
2494 border-color: #57a957 #57a957 #3d773d;
2495 }
2496
2497 .notice_msg {
2498 background-color: #339bb9;
2499 background-repeat: repeat-x;
2500 background-image: -khtml-gradient(linear, left top, left bottom, from(#5bc0de),
2501 to(#339bb9) );
2502 background-image: -moz-linear-gradient(top, #5bc0de, #339bb9);
2503 background-image: -ms-linear-gradient(top, #5bc0de, #339bb9);
2504 background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #5bc0de),
2505 color-stop(100%, #339bb9) );
2506 background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9);
2507 background-image: -o-linear-gradient(top, #5bc0de, #339bb9);
2508 background-image: linear-gradient(top, #5bc0de, #339bb9);
2509 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de',
2510 endColorstr='#339bb9', GradientType=0 );
2511 border-color: #339bb9 #339bb9 #22697d;
2512 }
2513
2514 .success_msg,.error_msg,.notice_msg,.warning_msg {
2515 font-size: 12px;
2516 font-weight: 700;
2517 min-height: 14px;
2518 line-height: 14px;
2519 margin-bottom: 10px;
2520 margin-top: 0;
2521 display: block;
2522 overflow: auto;
2523 padding: 6px 10px 6px 10px;
2524 border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
2525 position: relative;
2526 color: #FFF;
2527 border-width: 1px;
2528 border-style: solid;
2529 -webkit-border-radius: 4px;
2530 -moz-border-radius: 4px;
2531 border-radius: 4px;
2532 -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
2533 -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
2534 box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
2535 }
2536
2537 #msg_close {
2538 background: transparent url("../icons/cross_grey_small.png") no-repeat
2539 scroll 0 0;
2540 cursor: pointer;
2541 height: 16px;
2542 position: absolute;
2543 right: 5px;
2544 top: 5px;
2545 width: 16px;
2546 }
2547
2548 div#legend_container table,div#legend_choices table {
2549 width: auto !important;
2550 }
2551
2552 table#permissions_manage {
2553 width: 0 !important;
2554 }
2555
2556 table#permissions_manage span.private_repo_msg {
2557 font-size: 0.8em;
2558 opacity: 0.6px;
2559 }
2560
2561 table#permissions_manage td.private_repo_msg {
2562 font-size: 0.8em;
2563 }
2564
2565 table#permissions_manage tr#add_perm_input td {
2566 vertical-align: middle;
2567 }
2568
2569 div.gravatar {
2570 background-color: #FFF;
2571 border: 1px solid #D0D0D0;
2572 float: left;
2573 margin-right: 0.7em;
2574 padding: 2px 2px 0;
2575 -webkit-border-radius: 6px;
2576 -khtml-border-radius: 6px;
2577 -moz-border-radius: 6px;
2578 border-radius: 6px;
2579 }
2580
2581 div.gravatar img {
2582 -webkit-border-radius: 4px;
2583 -khtml-border-radius: 4px;
2584 -moz-border-radius: 4px;
2585 border-radius: 4px;
2586 }
2587
2588 #header,#content,#footer {
2589 min-width: 978px;
2590 }
2591
2592 #content {
2593 clear: both;
2594 overflow: hidden;
2595 padding: 14px 10px;
2596 }
2597
2598 #content div.box div.title div.search {
2599
2600 border-left: 1px solid #316293;
2601 }
2602
2603 #content div.box div.title div.search div.input input {
2604 border: 1px solid #316293;
2605 }
2606
2607 .ui-button-small a:hover {
2608
2609 }
2610
2611 input.ui-button-small,.ui-button-small {
2612 background: #e5e3e3 url("../images/button.png") repeat-x !important;
2613 border-top: 1px solid #DDD !important;
2614 border-left: 1px solid #c6c6c6 !important;
2615 border-right: 1px solid #DDD !important;
2616 border-bottom: 1px solid #c6c6c6 !important;
2617 color: #515151 !important;
2618 outline: none !important;
2619 margin: 0 !important;
2620 -webkit-border-radius: 4px 4px 4px 4px !important;
2621 -khtml-border-radius: 4px 4px 4px 4px !important;
2622 -moz-border-radius: 4px 4px 4px 4px !important;
2623 border-radius: 4px 4px 4px 4px !important;
2624 box-shadow: 0 1px 0 #ececec !important;
2625 cursor: pointer !important;
2626 padding: 0px 2px 1px 2px;
2627 }
2628
2629 input.ui-button-small:hover,.ui-button-small:hover {
2630 background: #b4b4b4 url("../images/button_selected.png") repeat-x
2631 !important;
2632 border-top: 1px solid #ccc !important;
2633 border-left: 1px solid #bebebe !important;
2634 border-right: 1px solid #b1b1b1 !important;
2635 border-bottom: 1px solid #afafaf !important;
2636 text-decoration: none;
2637 }
2638
2639 input.ui-button-small-blue,.ui-button-small-blue {
2640 background: #4e85bb url("../images/button_highlight.png") repeat-x;
2641 border-top: 1px solid #5c91a4;
2642 border-left: 1px solid #2a6f89;
2643 border-right: 1px solid #2b7089;
2644 border-bottom: 1px solid #1a6480;
2645 color: #fff;
2646 -webkit-border-radius: 4px 4px 4px 4px;
2647 -khtml-border-radius: 4px 4px 4px 4px;
2648 -moz-border-radius: 4px 4px 4px 4px;
2649 border-radius: 4px 4px 4px 4px;
2650 box-shadow: 0 1px 0 #ececec;
2651 cursor: pointer;
2652 padding: 0px 2px 1px 2px;
2653 }
2654
2655 input.ui-button-small-blue:hover {
2656
2657 }
2658
2659 ins,div.options a:hover {
2660 text-decoration: none;
2661 }
2662
2663 img,#header #header-inner #quick li a:hover span.normal,#header #header-inner #quick li ul li.last,#content div.box div.form div.fields div.field div.textarea table td table td a,#clone_url
2664 {
2665 border: none;
2666 }
2667
2668 img.icon,.right .merge img {
2669 vertical-align: bottom;
2670 }
2671
2672 #header ul#logged-user,#content div.box div.title ul.links,#content div.box div.message div.dismiss,#content div.box div.traffic div.legend ul
2673 {
2674 float: right;
2675 margin: 0;
2676 padding: 0;
2677 }
2678
2679 #header #header-inner #home,#header #header-inner #logo,#content div.box ul.left,#content div.box ol.left,#content div.box div.pagination-left,div#commit_history,div#legend_data,div#legend_container,div#legend_choices
2680 {
2681 float: left;
2682 }
2683
2684 #header #header-inner #quick li:hover ul ul,#header #header-inner #quick li:hover ul ul ul,#header #header-inner #quick li:hover ul ul ul ul,#content #left #menu ul.closed,#content #left #menu li ul.collapsed,.yui-tt-shadow
2685 {
2686 display: none;
2687 }
2688
2689 #header #header-inner #quick li:hover ul,#header #header-inner #quick li li:hover ul,#header #header-inner #quick li li li:hover ul,#header #header-inner #quick li li li li:hover ul,#content #left #menu ul.opened,#content #left #menu li ul.expanded
2690 {
2691 display: block;
2692 }
2693
2694 #content div.graph {
2695 padding: 0 10px 10px;
2696 }
2697
2698 #content div.box div.title ul.links li a:hover,#content div.box div.title ul.links li.ui-tabs-selected a
2699 {
2700 color: #bfe3ff;
2701 }
2702
2703 #content div.box ol.lower-roman,#content div.box ol.upper-roman,#content div.box ol.lower-alpha,#content div.box ol.upper-alpha,#content div.box ol.decimal
2704 {
2705 margin: 10px 24px 10px 44px;
2706 }
2707
2708 #content div.box div.form,#content div.box div.table,#content div.box div.traffic
2709 {
2710 clear: both;
2711 overflow: hidden;
2712 margin: 0;
2713 padding: 0 20px 10px;
2714 }
2715
2716 #content div.box div.form div.fields,#login div.form,#login div.form div.fields,#register div.form,#register div.form div.fields
2717 {
2718 clear: both;
2719 overflow: hidden;
2720 margin: 0;
2721 padding: 0;
2722 }
2723
2724 #content div.box div.form div.fields div.field div.label span,#login div.form div.fields div.field div.label span,#register div.form div.fields div.field div.label span
2725 {
2726 height: 1%;
2727 display: block;
2728 color: #363636;
2729 margin: 0;
2730 padding: 2px 0 0;
2731 }
2732
2733 #content div.box div.form div.fields div.field div.input input.error,#login div.form div.fields div.field div.input input.error,#register div.form div.fields div.field div.input input.error
2734 {
2735 background: #FBE3E4;
2736 border-top: 1px solid #e1b2b3;
2737 border-left: 1px solid #e1b2b3;
2738 border-right: 1px solid #FBC2C4;
2739 border-bottom: 1px solid #FBC2C4;
2740 }
2741
2742 #content div.box div.form div.fields div.field div.input input.success,#login div.form div.fields div.field div.input input.success,#register div.form div.fields div.field div.input input.success
2743 {
2744 background: #E6EFC2;
2745 border-top: 1px solid #cebb98;
2746 border-left: 1px solid #cebb98;
2747 border-right: 1px solid #c6d880;
2748 border-bottom: 1px solid #c6d880;
2749 }
2750
2751 #content div.box-left div.form div.fields div.field div.textarea,#content div.box-right div.form div.fields div.field div.textarea,#content div.box div.form div.fields div.field div.select select,#content div.box table th.selected input,#content div.box table td.selected input
2752 {
2753 margin: 0;
2754 }
2755
2756 #content div.box-left div.form div.fields div.field div.select,#content div.box-left div.form div.fields div.field div.checkboxes,#content div.box-left div.form div.fields div.field div.radios,#content div.box-right div.form div.fields div.field div.select,#content div.box-right div.form div.fields div.field div.checkboxes,#content div.box-right div.form div.fields div.field div.radios
2757 {
2758 margin: 0 0 0 0px !important;
2759 padding: 0;
2760 }
2761
2762 #content div.box div.form div.fields div.field div.select,#content div.box div.form div.fields div.field div.checkboxes,#content div.box div.form div.fields div.field div.radios
2763 {
2764 margin: 0 0 0 200px;
2765 padding: 0;
2766 }
2767
2768 #content div.box div.form div.fields div.field div.select a:hover,#content div.box div.form div.fields div.field div.select a.ui-selectmenu:hover,#content div.box div.action a:hover
2769 {
2770 color: #000;
2771 text-decoration: none;
2772 }
2773
2774 #content div.box div.form div.fields div.field div.select a.ui-selectmenu-focus,#content div.box div.action a.ui-selectmenu-focus
2775 {
2776 border: 1px solid #666;
2777 }
2778
2779 #content div.box div.form div.fields div.field div.checkboxes div.checkbox,#content div.box div.form div.fields div.field div.radios div.radio
2780 {
2781 clear: both;
2782 overflow: hidden;
2783 margin: 0;
2784 padding: 8px 0 2px;
2785 }
2786
2787 #content div.box div.form div.fields div.field div.checkboxes div.checkbox input,#content div.box div.form div.fields div.field div.radios div.radio input
2788 {
2789 float: left;
2790 margin: 0;
2791 }
2792
2793 #content div.box div.form div.fields div.field div.checkboxes div.checkbox label,#content div.box div.form div.fields div.field div.radios div.radio label
2794 {
2795 height: 1%;
2796 display: block;
2797 float: left;
2798 margin: 2px 0 0 4px;
2799 }
2800
2801 div.form div.fields div.field div.button input,#content div.box div.form div.fields div.buttons input,div.form div.fields div.buttons input,#content div.box div.action div.button input
2802 {
2803 color: #000;
2804 font-size: 11px;
2805 font-weight: 700;
2806 margin: 0;
2807 }
2808
2809 input.ui-button {
2810 background: #e5e3e3 url("../images/button.png") repeat-x;
2811 border-top: 1px solid #DDD;
2812 border-left: 1px solid #c6c6c6;
2813 border-right: 1px solid #DDD;
2814 border-bottom: 1px solid #c6c6c6;
2815 color: #515151 !important;
2816 outline: none;
2817 margin: 0;
2818 padding: 6px 12px;
2819 -webkit-border-radius: 4px 4px 4px 4px;
2820 -khtml-border-radius: 4px 4px 4px 4px;
2821 -moz-border-radius: 4px 4px 4px 4px;
2822 border-radius: 4px 4px 4px 4px;
2823 box-shadow: 0 1px 0 #ececec;
2824 cursor: pointer;
2825 }
2826
2827 input.ui-button:hover {
2828 background: #b4b4b4 url("../images/button_selected.png") repeat-x;
2829 border-top: 1px solid #ccc;
2830 border-left: 1px solid #bebebe;
2831 border-right: 1px solid #b1b1b1;
2832 border-bottom: 1px solid #afafaf;
2833 }
2834
2835 div.form div.fields div.field div.highlight,#content div.box div.form div.fields div.buttons div.highlight
2836 {
2837 display: inline;
2838 }
2839
2840 #content div.box div.form div.fields div.buttons,div.form div.fields div.buttons
2841 {
2842 margin: 10px 0 0 200px;
2843 padding: 0;
2844 }
2845
2846 #content div.box-left div.form div.fields div.buttons,#content div.box-right div.form div.fields div.buttons,div.box-left div.form div.fields div.buttons,div.box-right div.form div.fields div.buttons
2847 {
2848 margin: 10px 0 0;
2849 }
2850
2851 #content div.box table td.user,#content div.box table td.address {
2852 width: 10%;
2853 text-align: center;
2854 }
2855
2856 #content div.box div.action div.button,#login div.form div.fields div.field div.input div.link,#register div.form div.fields div.field div.input div.link
2857 {
2858 text-align: right;
2859 margin: 6px 0 0;
2860 padding: 0;
2861 }
2862
2863 #content div.box div.action div.button input.ui-state-hover,#login div.form div.fields div.buttons input.ui-state-hover,#register div.form div.fields div.buttons input.ui-state-hover
2864 {
2865 background: #b4b4b4 url("../images/button_selected.png") repeat-x;
2866 border-top: 1px solid #ccc;
2867 border-left: 1px solid #bebebe;
2868 border-right: 1px solid #b1b1b1;
2869 border-bottom: 1px solid #afafaf;
2870 color: #515151;
2871 margin: 0;
2872 padding: 6px 12px;
2873 }
2874
2875 #content div.box div.pagination div.results,#content div.box div.pagination-wh div.results
2876 {
2877 text-align: left;
2878 float: left;
2879 margin: 0;
2880 padding: 0;
2881 }
2882
2883 #content div.box div.pagination div.results span,#content div.box div.pagination-wh div.results span
2884 {
2885 height: 1%;
2886 display: block;
2887 float: left;
2888 background: #ebebeb url("../images/pager.png") repeat-x;
2889 border-top: 1px solid #dedede;
2890 border-left: 1px solid #cfcfcf;
2891 border-right: 1px solid #c4c4c4;
2892 border-bottom: 1px solid #c4c4c4;
2893 color: #4A4A4A;
2894 font-weight: 700;
2895 margin: 0;
2896 padding: 6px 8px;
2897 }
2898
2899 #content div.box div.pagination ul.pager li.disabled,#content div.box div.pagination-wh a.disabled
2900 {
2901 color: #B4B4B4;
2902 padding: 6px;
2903 }
2904
2905 #login,#register {
2906 width: 520px;
2907 margin: 10% auto 0;
2908 padding: 0;
2909 }
2910
2911 #login div.color,#register div.color {
2912 clear: both;
2913 overflow: hidden;
2914 background: #FFF;
2915 margin: 10px auto 0;
2916 padding: 3px 3px 3px 0;
2917 }
2918
2919 #login div.color a,#register div.color a {
2920 width: 20px;
2921 height: 20px;
2922 display: block;
2923 float: left;
2924 margin: 0 0 0 3px;
2925 padding: 0;
2926 }
2927
2928 #login div.title h5,#register div.title h5 {
2929 color: #fff;
2930 margin: 10px;
2931 padding: 0;
2932 }
2933
2934 #login div.form div.fields div.field,#register div.form div.fields div.field
2935 {
2936 clear: both;
2937 overflow: hidden;
2938 margin: 0;
2939 padding: 0 0 10px;
2940 }
2941
2942 #login div.form div.fields div.field span.error-message,#register div.form div.fields div.field span.error-message
2943 {
2944 height: 1%;
2945 display: block;
2946 color: red;
2947 margin: 8px 0 0;
2948 padding: 0;
2949 max-width: 320px;
2950 }
2951
2952 #login div.form div.fields div.field div.label label,#register div.form div.fields div.field div.label label
2953 {
2954 color: #000;
2955 font-weight: 700;
2956 }
2957
2958 #login div.form div.fields div.field div.input,#register div.form div.fields div.field div.input
2959 {
2960 float: left;
2961 margin: 0;
2962 padding: 0;
2963 }
2964
2965 #login div.form div.fields div.field div.checkbox,#register div.form div.fields div.field div.checkbox
2966 {
2967 margin: 0 0 0 184px;
2968 padding: 0;
2969 }
2970
2971 #login div.form div.fields div.field div.checkbox label,#register div.form div.fields div.field div.checkbox label
2972 {
2973 color: #565656;
2974 font-weight: 700;
2975 }
2976
2977 #login div.form div.fields div.buttons input,#register div.form div.fields div.buttons input
2978 {
2979 color: #000;
2980 font-size: 1em;
2981 font-weight: 700;
2982 margin: 0;
2983 }
2984
2985 #changeset_content .container .wrapper,#graph_content .container .wrapper
2986 {
2987 width: 600px;
2988 }
2989
2990 #changeset_content .container .left,#graph_content .container .left {
2991 float: left;
2992 width: 70%;
2993 padding-left: 5px;
2994 }
2995
2996 #changeset_content .container .left .date,.ac .match {
2997 font-weight: 700;
2998 padding-top: 5px;
2999 padding-bottom: 5px;
3000 }
3001
3002 div#legend_container table td,div#legend_choices table td {
3003 border: none !important;
3004 height: 20px !important;
3005 padding: 0 !important;
3006 }
3007
3008 #q_filter {
3009 border: 0 none;
3010 color: #AAAAAA;
3011 margin-bottom: -4px;
3012 margin-top: -4px;
3013 padding-left: 3px;
3014 }
3015
3016 #node_filter {
3017 border: 0px solid #545454;
3018 color: #AAAAAA;
3019 padding-left: 3px;
3020 }
3021
3022 /*README STYLE*/
3023
3024 div.readme {
3025 padding:0px;
3026 }
3027
3028 div.readme h2 {
3029 font-weight: normal;
3030 }
3031
3032 div.readme .readme_box {
3033 background-color: #fafafa;
3034 }
3035
3036 div.readme .readme_box {
1971 clear:both;
3037 clear:both;
1972 overflow:hidden;
3038 overflow:hidden;
1973 margin:0;
3039 margin:0;
1974 padding:0 20px 10px;
3040 padding:0 20px 10px;
1975 }
3041 }
1976
3042
1977 .box .search div.search_path {
3043 div.readme .readme_box h1, div.readme .readme_box h2, div.readme .readme_box h3, div.readme .readme_box h4, div.readme .readme_box h5, div.readme .readme_box h6 {
1978 background:none repeat scroll 0 0 #EEE;
3044 border-bottom: 0 !important;
1979 border:1px solid #CCC;
3045 margin: 0 !important;
1980 color:blue;
3046 padding: 0 !important;
1981 margin-bottom:10px;
3047 line-height: 1.5em !important;
1982 padding:10px 0;
3048 }
1983 }
3049
1984
3050
1985 .box .search div.search_path div.link {
3051 div.readme .readme_box h1:first-child {
1986 font-weight:700;
3052 padding-top: .25em !important;
1987 margin-left:25px;
3053 }
1988 }
3054
1989
3055 div.readme .readme_box h2, div.readme .readme_box h3 {
1990 .box .search div.search_path div.link a {
3056 margin: 1em 0 !important;
1991 color:#003367;
3057 }
1992 cursor:pointer;
3058
1993 text-decoration:none;
3059 div.readme .readme_box h2 {
1994 }
3060 margin-top: 1.5em !important;
1995
3061 border-top: 4px solid #e0e0e0 !important;
1996 #path_unlock {
3062 padding-top: .5em !important;
1997 color:red;
3063 }
1998 font-size:1.2em;
3064
1999 padding-left:4px;
3065 div.readme .readme_box p {
2000 }
3066 color: black !important;
2001
3067 margin: 1em 0 !important;
2002 .info_box span {
3068 line-height: 1.5em !important;
2003 margin-left:3px;
3069 }
2004 margin-right:3px;
3070
2005 }
3071 div.readme .readme_box ul {
2006
3072 list-style: disc !important;
2007 .info_box .rev {
3073 margin: 1em 0 1em 2em !important;
2008 color: #003367;
3074 }
2009 font-size: 1.6em;
3075
2010 font-weight: bold;
3076 div.readme .readme_box ol {
2011 vertical-align: sub;
3077 list-style: decimal;
2012 }
3078 margin: 1em 0 1em 2em !important;
2013
3079 }
2014
3080
2015 .info_box input#at_rev,.info_box input#size {
3081 div.readme .readme_box pre, code {
2016 background:#FFF;
3082 font: 12px "Bitstream Vera Sans Mono","Courier",monospace;
2017 border-top:1px solid #b3b3b3;
3083 }
2018 border-left:1px solid #b3b3b3;
3084
2019 border-right:1px solid #eaeaea;
3085 div.readme .readme_box code {
2020 border-bottom:1px solid #eaeaea;
3086 font-size: 12px !important;
2021 color:#000;
3087 background-color: ghostWhite !important;
2022 font-family:Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif;
3088 color: #444 !important;
2023 font-size:12px;
3089 padding: 0 .2em !important;
2024 margin:0;
3090 border: 1px solid #dedede !important;
2025 padding:1px 5px 1px;
3091 }
2026 }
3092
2027
3093 div.readme .readme_box pre code {
2028 .info_box input#view {
3094 padding: 0 !important;
2029 text-align:center;
3095 font-size: 12px !important;
2030 padding:4px 3px 2px 2px;
3096 background-color: #eee !important;
2031 }
3097 border: none !important;
2032
3098 }
2033 .yui-overlay,.yui-panel-container {
3099
2034 visibility:hidden;
3100 div.readme .readme_box pre {
2035 position:absolute;
3101 margin: 1em 0;
2036 z-index:2;
3102 font-size: 12px;
2037 }
3103 background-color: #eee;
2038
3104 border: 1px solid #ddd;
2039 .yui-tt {
3105 padding: 5px;
2040 visibility:hidden;
3106 color: #444;
2041 position:absolute;
3107 overflow: auto;
2042 color:#666;
3108 -webkit-box-shadow: rgba(0,0,0,0.07) 0 1px 2px inset;
2043 background-color:#FFF;
3109 -webkit-border-radius: 3px;
2044 font-family:arial, helvetica, verdana, sans-serif;
3110 -moz-border-radius: 3px;
2045 border:2px solid #003367;
3111 border-radius: 3px;
2046 font:100% sans-serif;
3112 }
2047 width:auto;
2048 opacity:1px;
2049 padding:8px;
2050 white-space: pre-wrap;
2051 -webkit-border-radius: 8px 8px 8px 8px;
2052 -khtml-border-radius: 8px 8px 8px 8px;
2053 -moz-border-radius: 8px 8px 8px 8px;
2054 border-radius: 8px 8px 8px 8px;
2055 box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
2056 }
2057
2058 .ac {
2059 vertical-align:top;
2060 }
2061
2062 .ac .yui-ac {
2063 position:relative;
2064 font-family:arial;
2065 font-size:100%;
2066 }
2067
2068 .ac .perm_ac {
2069 width:15em;
2070 }
2071
2072 .ac .yui-ac-input {
2073 width:100%;
2074 }
2075
2076 .ac .yui-ac-container {
2077 position:absolute;
2078 top:1.6em;
2079 width:100%;
2080 }
2081
2082 .ac .yui-ac-content {
2083 position:absolute;
2084 width:100%;
2085 border:1px solid gray;
2086 background:#fff;
2087 overflow:hidden;
2088 z-index:9050;
2089 }
2090
2091 .ac .yui-ac-shadow {
2092 position:absolute;
2093 width:100%;
2094 background:#000;
2095 -moz-opacity:0.1px;
2096 opacity:.10;
2097 filter:alpha(opacity = 10);
2098 z-index:9049;
2099 margin:.3em;
2100 }
2101
2102 .ac .yui-ac-content ul {
2103 width:100%;
2104 margin:0;
2105 padding:0;
2106 }
2107
2108 .ac .yui-ac-content li {
2109 cursor:default;
2110 white-space:nowrap;
2111 margin:0;
2112 padding:2px 5px;
2113 }
2114
2115 .ac .yui-ac-content li.yui-ac-prehighlight {
2116 background:#B3D4FF;
2117 }
2118
2119 .ac .yui-ac-content li.yui-ac-highlight {
2120 background:#556CB5;
2121 color:#FFF;
2122 }
2123
2124
2125 .follow{
2126 background:url("../images/icons/heart_add.png") no-repeat scroll 3px;
2127 height: 16px;
2128 width: 20px;
2129 cursor: pointer;
2130 display: block;
2131 float: right;
2132 margin-top: 2px;
2133 }
2134
2135 .following{
2136 background:url("../images/icons/heart_delete.png") no-repeat scroll 3px;
2137 height: 16px;
2138 width: 20px;
2139 cursor: pointer;
2140 display: block;
2141 float: right;
2142 margin-top: 2px;
2143 }
2144
2145 .currently_following{
2146 padding-left: 10px;
2147 padding-bottom:5px;
2148 }
2149
2150 .add_icon {
2151 background:url("../images/icons/add.png") no-repeat scroll 3px;
2152 padding-left:20px;
2153 padding-top:0px;
2154 text-align:left;
2155 }
2156
2157 .edit_icon {
2158 background:url("../images/icons/folder_edit.png") no-repeat scroll 3px;
2159 padding-left:20px;
2160 padding-top:0px;
2161 text-align:left;
2162 }
2163
2164 .delete_icon {
2165 background:url("../images/icons/delete.png") no-repeat scroll 3px;
2166 padding-left:20px;
2167 padding-top:0px;
2168 text-align:left;
2169 }
2170
2171 .refresh_icon {
2172 background:url("../images/icons/arrow_refresh.png") no-repeat scroll 3px;
2173 padding-left:20px;
2174 padding-top:0px;
2175 text-align:left;
2176 }
2177
2178 .pull_icon {
2179 background:url("../images/icons/connect.png") no-repeat scroll 3px;
2180 padding-left:20px;
2181 padding-top:0px;
2182 text-align:left;
2183 }
2184
2185 .rss_icon {
2186 background:url("../images/icons/rss_16.png") no-repeat scroll 3px;
2187 padding-left:20px;
2188 padding-top:0px;
2189 text-align:left;
2190 }
2191
2192 .atom_icon {
2193 background:url("../images/icons/atom.png") no-repeat scroll 3px;
2194 padding-left:20px;
2195 padding-top:0px;
2196 text-align:left;
2197 }
2198
2199 .archive_icon {
2200 background:url("../images/icons/compress.png") no-repeat scroll 3px;
2201 padding-left:20px;
2202 text-align:left;
2203 padding-top:1px;
2204 }
2205
2206 .start_following_icon {
2207 background:url("../images/icons/heart_add.png") no-repeat scroll 3px;
2208 padding-left:20px;
2209 text-align:left;
2210 padding-top:0px;
2211 }
2212
2213 .stop_following_icon {
2214 background:url("../images/icons/heart_delete.png") no-repeat scroll 3px;
2215 padding-left:20px;
2216 text-align:left;
2217 padding-top:0px;
2218 }
2219
2220 .action_button {
2221 border:0;
2222 display:inline;
2223 }
2224
2225 .action_button:hover {
2226 border:0;
2227 text-decoration:underline;
2228 cursor:pointer;
2229 }
2230
2231 #switch_repos {
2232 position:absolute;
2233 height:25px;
2234 z-index:1;
2235 }
2236
2237 #switch_repos select {
2238 min-width:150px;
2239 max-height:250px;
2240 z-index:1;
2241 }
2242
2243 .breadcrumbs {
2244 border:medium none;
2245 color:#FFF;
2246 float:left;
2247 text-transform:uppercase;
2248 font-weight:700;
2249 font-size:14px;
2250 margin:0;
2251 padding:11px 0 11px 10px;
2252 }
2253
2254 .breadcrumbs a {
2255 color:#FFF;
2256 }
2257
2258 .flash_msg ul {
2259 margin:0;
2260 padding:0 0 10px;
2261 }
2262
2263 .error_msg {
2264 background-color:#FFCFCF;
2265 background-image:url("../images/icons/error_msg.png");
2266 border:1px solid #FF9595;
2267 color:#C30;
2268 }
2269
2270 .warning_msg {
2271 background-color:#FFFBCC;
2272 background-image:url("../images/icons/warning_msg.png");
2273 border:1px solid #FFF35E;
2274 color:#C69E00;
2275 }
2276
2277 .success_msg {
2278 background-color:#D5FFCF;
2279 background-image:url("../images/icons/success_msg.png");
2280 border:1px solid #97FF88;
2281 color:#090;
2282 }
2283
2284 .notice_msg {
2285 background-color:#DCE3FF;
2286 background-image:url("../images/icons/notice_msg.png");
2287 border:1px solid #93A8FF;
2288 color:#556CB5;
2289 }
2290
2291 .success_msg,.error_msg,.notice_msg,.warning_msg {
2292 background-position:10px center;
2293 background-repeat:no-repeat;
2294 font-size:12px;
2295 font-weight:700;
2296 min-height:14px;
2297 line-height:14px;
2298 margin-bottom:0;
2299 margin-top:0;
2300 display:block;
2301 overflow:auto;
2302 padding:6px 10px 6px 40px;
2303 }
2304
2305 #msg_close {
2306 background:transparent url("../icons/cross_grey_small.png") no-repeat scroll 0 0;
2307 cursor:pointer;
2308 height:16px;
2309 position:absolute;
2310 right:5px;
2311 top:5px;
2312 width:16px;
2313 }
2314
2315 div#legend_container table,div#legend_choices table {
2316 width:auto !important;
2317 }
2318
2319 table#permissions_manage {
2320 width:0 !important;
2321 }
2322
2323 table#permissions_manage span.private_repo_msg {
2324 font-size:0.8em;
2325 opacity:0.6px;
2326 }
2327
2328 table#permissions_manage td.private_repo_msg {
2329 font-size:0.8em;
2330 }
2331
2332 table#permissions_manage tr#add_perm_input td {
2333 vertical-align:middle;
2334 }
2335
2336 div.gravatar {
2337 background-color:#FFF;
2338 border:1px solid #D0D0D0;
2339 float:left;
2340 margin-right:0.7em;
2341 padding:2px 2px 0;
2342
2343 -webkit-border-radius: 6px;
2344 -khtml-border-radius: 6px;
2345 -moz-border-radius: 6px;
2346 border-radius: 6px;
2347
2348 }
2349
2350 div.gravatar img {
2351 -webkit-border-radius: 4px;
2352 -khtml-border-radius: 4px;
2353 -moz-border-radius: 4px;
2354 border-radius: 4px;
2355 }
2356
2357 #header,#content,#footer {
2358 min-width:978px;
2359 }
2360
2361 #content {
2362 clear:both;
2363 overflow:hidden;
2364 padding:14px 10px;
2365 }
2366
2367 #content div.box div.title div.search {
2368 background:url("../images/title_link.png") no-repeat top left;
2369 border-left:1px solid #316293;
2370 }
2371
2372 #content div.box div.title div.search div.input input {
2373 border:1px solid #316293;
2374 }
2375
2376 .ui-button-small a:hover {
2377
2378 }
2379 input.ui-button-small,.ui-button-small {
2380 background:#e5e3e3 url("../images/button.png") repeat-x !important;
2381 border-top:1px solid #DDD !important;
2382 border-left:1px solid #c6c6c6 !important;
2383 border-right:1px solid #DDD !important;
2384 border-bottom:1px solid #c6c6c6 !important;
2385 color:#515151 !important;
2386 outline:none !important;
2387 margin:0 !important;
2388 -webkit-border-radius: 4px 4px 4px 4px !important;
2389 -khtml-border-radius: 4px 4px 4px 4px !important;
2390 -moz-border-radius: 4px 4px 4px 4px !important;
2391 border-radius: 4px 4px 4px 4px !important;
2392 box-shadow: 0 1px 0 #ececec !important;
2393 cursor: pointer !important;
2394 padding:0px 2px 1px 2px;
2395 }
2396
2397 input.ui-button-small:hover,.ui-button-small:hover {
2398 background:#b4b4b4 url("../images/button_selected.png") repeat-x !important;
2399 border-top:1px solid #ccc !important;
2400 border-left:1px solid #bebebe !important;
2401 border-right:1px solid #b1b1b1 !important;
2402 border-bottom:1px solid #afafaf !important;
2403 text-decoration: none;
2404 }
2405
2406 input.ui-button-small-blue,.ui-button-small-blue {
2407 background:#4e85bb url("../images/button_highlight.png") repeat-x;
2408 border-top:1px solid #5c91a4;
2409 border-left:1px solid #2a6f89;
2410 border-right:1px solid #2b7089;
2411 border-bottom:1px solid #1a6480;
2412 color:#fff;
2413 -webkit-border-radius: 4px 4px 4px 4px;
2414 -khtml-border-radius: 4px 4px 4px 4px;
2415 -moz-border-radius: 4px 4px 4px 4px;
2416 border-radius: 4px 4px 4px 4px;
2417 box-shadow: 0 1px 0 #ececec;
2418 cursor: pointer;
2419 padding:0px 2px 1px 2px;
2420 }
2421
2422 input.ui-button-small-blue:hover {
2423
2424 }
2425
2426
2427 ins,div.options a:hover {
2428 text-decoration:none;
2429 }
2430
2431 img,#header #header-inner #quick li a:hover span.normal,#header #header-inner #quick li ul li.last,#content div.box div.form div.fields div.field div.textarea table td table td a,#clone_url {
2432 border:none;
2433 }
2434
2435 img.icon,.right .merge img {
2436 vertical-align:bottom;
2437 }
2438
2439 #header ul#logged-user,#content div.box div.title ul.links,#content div.box div.message div.dismiss,#content div.box div.traffic div.legend ul {
2440 float:right;
2441 margin:0;
2442 padding:0;
2443 }
2444
2445
2446 #header #header-inner #home,#header #header-inner #logo,#content div.box ul.left,#content div.box ol.left,#content div.box div.pagination-left,div#commit_history,div#legend_data,div#legend_container,div#legend_choices {
2447 float:left;
2448 }
2449
2450 #header #header-inner #quick li:hover ul ul,#header #header-inner #quick li:hover ul ul ul,#header #header-inner #quick li:hover ul ul ul ul,#content #left #menu ul.closed,#content #left #menu li ul.collapsed,.yui-tt-shadow {
2451 display:none;
2452 }
2453
2454 #header #header-inner #quick li:hover ul,#header #header-inner #quick li li:hover ul,#header #header-inner #quick li li li:hover ul,#header #header-inner #quick li li li li:hover ul,#content #left #menu ul.opened,#content #left #menu li ul.expanded {
2455 display:block;
2456 }
2457
2458 #content div.graph{
2459 padding:0 10px 10px;
2460 }
2461
2462 #content div.box div.title ul.links li a:hover,#content div.box div.title ul.links li.ui-tabs-selected a {
2463 color:#bfe3ff;
2464 }
2465
2466 #content div.box ol.lower-roman,#content div.box ol.upper-roman,#content div.box ol.lower-alpha,#content div.box ol.upper-alpha,#content div.box ol.decimal {
2467 margin:10px 24px 10px 44px;
2468 }
2469
2470 #content div.box div.form,#content div.box div.table,#content div.box div.traffic {
2471 clear:both;
2472 overflow:hidden;
2473 margin:0;
2474 padding:0 20px 10px;
2475 }
2476
2477 #content div.box div.form div.fields,#login div.form,#login div.form div.fields,#register div.form,#register div.form div.fields {
2478 clear:both;
2479 overflow:hidden;
2480 margin:0;
2481 padding:0;
2482 }
2483
2484 #content div.box div.form div.fields div.field div.label span,#login div.form div.fields div.field div.label span,#register div.form div.fields div.field div.label span {
2485 height:1%;
2486 display:block;
2487 color:#363636;
2488 margin:0;
2489 padding:2px 0 0;
2490 }
2491
2492 #content div.box div.form div.fields div.field div.input input.error,#login div.form div.fields div.field div.input input.error,#register div.form div.fields div.field div.input input.error {
2493 background:#FBE3E4;
2494 border-top:1px solid #e1b2b3;
2495 border-left:1px solid #e1b2b3;
2496 border-right:1px solid #FBC2C4;
2497 border-bottom:1px solid #FBC2C4;
2498 }
2499
2500 #content div.box div.form div.fields div.field div.input input.success,#login div.form div.fields div.field div.input input.success,#register div.form div.fields div.field div.input input.success {
2501 background:#E6EFC2;
2502 border-top:1px solid #cebb98;
2503 border-left:1px solid #cebb98;
2504 border-right:1px solid #c6d880;
2505 border-bottom:1px solid #c6d880;
2506 }
2507
2508 #content div.box-left div.form div.fields div.field div.textarea,#content div.box-right div.form div.fields div.field div.textarea,#content div.box div.form div.fields div.field div.select select,#content div.box table th.selected input,#content div.box table td.selected input {
2509 margin:0;
2510 }
2511
2512 #content div.box-left div.form div.fields div.field div.select,#content div.box-left div.form div.fields div.field div.checkboxes,#content div.box-left div.form div.fields div.field div.radios,#content div.box-right div.form div.fields div.field div.select,#content div.box-right div.form div.fields div.field div.checkboxes,#content div.box-right div.form div.fields div.field div.radios{
2513 margin:0 0 0 0px !important;
2514 padding:0;
2515 }
2516
2517 #content div.box div.form div.fields div.field div.select,#content div.box div.form div.fields div.field div.checkboxes,#content div.box div.form div.fields div.field div.radios {
2518 margin:0 0 0 200px;
2519 padding:0;
2520 }
2521
2522
2523 #content div.box div.form div.fields div.field div.select a:hover,#content div.box div.form div.fields div.field div.select a.ui-selectmenu:hover,#content div.box div.action a:hover {
2524 color:#000;
2525 text-decoration:none;
2526 }
2527
2528 #content div.box div.form div.fields div.field div.select a.ui-selectmenu-focus,#content div.box div.action a.ui-selectmenu-focus {
2529 border:1px solid #666;
2530 }
2531
2532 #content div.box div.form div.fields div.field div.checkboxes div.checkbox,#content div.box div.form div.fields div.field div.radios div.radio {
2533 clear:both;
2534 overflow:hidden;
2535 margin:0;
2536 padding:8px 0 2px;
2537 }
2538
2539 #content div.box div.form div.fields div.field div.checkboxes div.checkbox input,#content div.box div.form div.fields div.field div.radios div.radio input {
2540 float:left;
2541 margin:0;
2542 }
2543
2544 #content div.box div.form div.fields div.field div.checkboxes div.checkbox label,#content div.box div.form div.fields div.field div.radios div.radio label {
2545 height:1%;
2546 display:block;
2547 float:left;
2548 margin:2px 0 0 4px;
2549 }
2550
2551 div.form div.fields div.field div.button input,#content div.box div.form div.fields div.buttons input,div.form div.fields div.buttons input,#content div.box div.action div.button input {
2552 color:#000;
2553 font-family:Lucida Grande, Verdana, Lucida Sans Regular, Lucida Sans Unicode, Arial, sans-serif;
2554 font-size:11px;
2555 font-weight:700;
2556 margin:0;
2557 }
2558
2559 input.ui-button {
2560 background:#e5e3e3 url("../images/button.png") repeat-x;
2561 border-top:1px solid #DDD;
2562 border-left:1px solid #c6c6c6;
2563 border-right:1px solid #DDD;
2564 border-bottom:1px solid #c6c6c6;
2565 color:#515151 !important;
2566 outline:none;
2567 margin:0;
2568 padding:6px 12px;
2569 -webkit-border-radius: 4px 4px 4px 4px;
2570 -khtml-border-radius: 4px 4px 4px 4px;
2571 -moz-border-radius: 4px 4px 4px 4px;
2572 border-radius: 4px 4px 4px 4px;
2573 box-shadow: 0 1px 0 #ececec;
2574 cursor: pointer;
2575 }
2576
2577 input.ui-button:hover {
2578 background:#b4b4b4 url("../images/button_selected.png") repeat-x;
2579 border-top:1px solid #ccc;
2580 border-left:1px solid #bebebe;
2581 border-right:1px solid #b1b1b1;
2582 border-bottom:1px solid #afafaf;
2583 }
2584
2585 div.form div.fields div.field div.highlight,#content div.box div.form div.fields div.buttons div.highlight {
2586 display:inline;
2587 }
2588
2589 #content div.box div.form div.fields div.buttons,div.form div.fields div.buttons {
2590 margin:10px 0 0 200px;
2591 padding:0;
2592 }
2593
2594 #content div.box-left div.form div.fields div.buttons,#content div.box-right div.form div.fields div.buttons,div.box-left div.form div.fields div.buttons,div.box-right div.form div.fields div.buttons {
2595 margin:10px 0 0;
2596 }
2597
2598 #content div.box table td.user,#content div.box table td.address {
2599 width:10%;
2600 text-align:center;
2601 }
2602
2603 #content div.box div.action div.button,#login div.form div.fields div.field div.input div.link,#register div.form div.fields div.field div.input div.link {
2604 text-align:right;
2605 margin:6px 0 0;
2606 padding:0;
2607 }
2608
2609
2610 #content div.box div.action div.button input.ui-state-hover,#login div.form div.fields div.buttons input.ui-state-hover,#register div.form div.fields div.buttons input.ui-state-hover {
2611 background:#b4b4b4 url("../images/button_selected.png") repeat-x;
2612 border-top:1px solid #ccc;
2613 border-left:1px solid #bebebe;
2614 border-right:1px solid #b1b1b1;
2615 border-bottom:1px solid #afafaf;
2616 color:#515151;
2617 margin:0;
2618 padding:6px 12px;
2619 }
2620
2621 #content div.box div.pagination div.results,#content div.box div.pagination-wh div.results {
2622 text-align:left;
2623 float:left;
2624 margin:0;
2625 padding:0;
2626 }
2627
2628 #content div.box div.pagination div.results span,#content div.box div.pagination-wh div.results span {
2629 height:1%;
2630 display:block;
2631 float:left;
2632 background:#ebebeb url("../images/pager.png") repeat-x;
2633 border-top:1px solid #dedede;
2634 border-left:1px solid #cfcfcf;
2635 border-right:1px solid #c4c4c4;
2636 border-bottom:1px solid #c4c4c4;
2637 color:#4A4A4A;
2638 font-weight:700;
2639 margin:0;
2640 padding:6px 8px;
2641 }
2642
2643 #content div.box div.pagination ul.pager li.disabled,#content div.box div.pagination-wh a.disabled {
2644 color:#B4B4B4;
2645 padding:6px;
2646 }
2647
2648 #login,#register {
2649 width:520px;
2650 margin:10% auto 0;
2651 padding:0;
2652 }
2653
2654 #login div.color,#register div.color {
2655 clear:both;
2656 overflow:hidden;
2657 background:#FFF;
2658 margin:10px auto 0;
2659 padding:3px 3px 3px 0;
2660 }
2661
2662 #login div.color a,#register div.color a {
2663 width:20px;
2664 height:20px;
2665 display:block;
2666 float:left;
2667 margin:0 0 0 3px;
2668 padding:0;
2669 }
2670
2671 #login div.title h5,#register div.title h5 {
2672 color:#fff;
2673 margin:10px;
2674 padding:0;
2675 }
2676
2677 #login div.form div.fields div.field,#register div.form div.fields div.field {
2678 clear:both;
2679 overflow:hidden;
2680 margin:0;
2681 padding:0 0 10px;
2682 }
2683
2684 #login div.form div.fields div.field span.error-message,#register div.form div.fields div.field span.error-message {
2685 height:1%;
2686 display:block;
2687 color:red;
2688 margin:8px 0 0;
2689 padding:0;
2690 max-width: 320px;
2691 }
2692
2693 #login div.form div.fields div.field div.label label,#register div.form div.fields div.field div.label label {
2694 color:#000;
2695 font-weight:700;
2696 }
2697
2698 #login div.form div.fields div.field div.input,#register div.form div.fields div.field div.input {
2699 float:left;
2700 margin:0;
2701 padding:0;
2702 }
2703
2704 #login div.form div.fields div.field div.checkbox,#register div.form div.fields div.field div.checkbox {
2705 margin:0 0 0 184px;
2706 padding:0;
2707 }
2708
2709 #login div.form div.fields div.field div.checkbox label,#register div.form div.fields div.field div.checkbox label {
2710 color:#565656;
2711 font-weight:700;
2712 }
2713
2714 #login div.form div.fields div.buttons input,#register div.form div.fields div.buttons input {
2715 color:#000;
2716 font-size:1em;
2717 font-weight:700;
2718 font-family:Verdana, Helvetica, Sans-Serif;
2719 margin:0;
2720 }
2721
2722 #changeset_content .container .wrapper,#graph_content .container .wrapper {
2723 width:600px;
2724 }
2725
2726 #changeset_content .container .left,#graph_content .container .left {
2727 float:left;
2728 width:70%;
2729 padding-left:5px;
2730 }
2731
2732 #changeset_content .container .left .date,.ac .match {
2733 font-weight:700;
2734 padding-top: 5px;
2735 padding-bottom:5px;
2736 }
2737
2738 div#legend_container table td,div#legend_choices table td {
2739 border:none !important;
2740 height:20px !important;
2741 padding:0 !important;
2742 }
2743
2744 #q_filter{
2745 border:0 none;
2746 color:#AAAAAA;
2747 margin-bottom:-4px;
2748 margin-top:-4px;
2749 padding-left:3px;
2750 }
2751
2752 #node_filter{
2753 border:0px solid #545454;
2754 color:#AAAAAA;
2755 padding-left:3px;
2756 }
This diff has been collapsed as it changes many lines, (1093 lines changed) Show them Hide them
@@ -13,32 +13,45 b' var CodeMirror = (function() {'
13 if (defaults.hasOwnProperty(opt))
13 if (defaults.hasOwnProperty(opt))
14 options[opt] = (givenOptions && givenOptions.hasOwnProperty(opt) ? givenOptions : defaults)[opt];
14 options[opt] = (givenOptions && givenOptions.hasOwnProperty(opt) ? givenOptions : defaults)[opt];
15
15
16 // The element in which the editor lives. Takes care of scrolling
16 var targetDocument = options["document"];
17 // (if enabled).
17 // The element in which the editor lives.
18 var wrapper = document.createElement("div");
18 var wrapper = targetDocument.createElement("div");
19 wrapper.className = "CodeMirror";
19 wrapper.className = "CodeMirror";
20 // This mess creates the base DOM structure for the editor.
20 // This mess creates the base DOM structure for the editor.
21 wrapper.innerHTML =
21 wrapper.innerHTML =
22 '<div style="position: relative">' + // Set to the height of the text, causes scrolling
22 '<div style="overflow: hidden; position: relative; width: 1px; height: 0px;">' + // Wraps and hides input textarea
23 '<pre style="position: relative; height: 0; visibility: hidden; overflow: hidden;">' + // To measure line/char size
23 '<textarea style="position: absolute; width: 10000px;" wrap="off" ' +
24 '<span>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</span></pre>' +
24 'autocorrect="off" autocapitalize="off"></textarea></div>' +
25 '<div style="position: relative">' + // Moved around its parent to cover visible view
25 '<div class="CodeMirror-scroll cm-s-' + options.theme + '">' +
26 '<div class="CodeMirror-gutter"><div class="CodeMirror-gutter-text"></div></div>' +
26 '<div style="position: relative">' + // Set to the height of the text, causes scrolling
27 '<div style="overflow: hidden; position: absolute; width: 0; left: 0">' + // Wraps and hides input textarea
27 '<div style="position: absolute; height: 0; width: 0; overflow: hidden;"></div>' +
28 '<textarea style="height: 1px; position: absolute; width: 1px;" wrap="off"></textarea></div>' +
28 '<div style="position: relative">' + // Moved around its parent to cover visible view
29 // Provides positioning relative to (visible) text origin
29 '<div class="CodeMirror-gutter"><div class="CodeMirror-gutter-text"></div></div>' +
30 '<div class="CodeMirror-lines"><div style="position: relative">' +
30 // Provides positioning relative to (visible) text origin
31 '<pre class="CodeMirror-cursor">&#160;</pre>' + // Absolutely positioned blinky cursor
31 '<div class="CodeMirror-lines"><div style="position: relative" draggable="true">' +
32 '<div></div></div></div></div></div>'; // This DIV contains the actual code
32 '<pre class="CodeMirror-cursor">&#160;</pre>' + // Absolutely positioned blinky cursor
33 '<div></div>' + // This DIV contains the actual code
34 '</div></div></div></div></div>';
33 if (place.appendChild) place.appendChild(wrapper); else place(wrapper);
35 if (place.appendChild) place.appendChild(wrapper); else place(wrapper);
34 // I've never seen more elegant code in my life.
36 // I've never seen more elegant code in my life.
35 var code = wrapper.firstChild, measure = code.firstChild, mover = measure.nextSibling,
37 var inputDiv = wrapper.firstChild, input = inputDiv.firstChild,
38 scroller = wrapper.lastChild, code = scroller.firstChild,
39 measure = code.firstChild, mover = measure.nextSibling,
36 gutter = mover.firstChild, gutterText = gutter.firstChild,
40 gutter = mover.firstChild, gutterText = gutter.firstChild,
37 inputDiv = gutter.nextSibling, input = inputDiv.firstChild,
41 lineSpace = gutter.nextSibling.firstChild,
38 lineSpace = inputDiv.nextSibling.firstChild, cursor = lineSpace.firstChild, lineDiv = cursor.nextSibling;
42 cursor = lineSpace.firstChild, lineDiv = cursor.nextSibling;
39 if (options.tabindex != null) input.tabindex = options.tabindex;
43 if (options.tabindex != null) input.tabindex = options.tabindex;
40 if (!options.gutter && !options.lineNumbers) gutter.style.display = "none";
44 if (!options.gutter && !options.lineNumbers) gutter.style.display = "none";
41
45
46 // Check for problem with IE innerHTML not working when we have a
47 // P (or similar) parent node.
48 try { stringWidth("x"); }
49 catch (e) {
50 if (e.message.match(/unknown runtime/i))
51 e = new Error("A CodeMirror inside a P-style element does not work in Internet Explorer. (innerHTML bug)");
52 throw e;
53 }
54
42 // Delayed object wrap timeouts, making sure only one is active. blinker holds an interval.
55 // Delayed object wrap timeouts, making sure only one is active. blinker holds an interval.
43 var poll = new Delayed(), highlight = new Delayed(), blinker;
56 var poll = new Delayed(), highlight = new Delayed(), blinker;
44
57
@@ -46,7 +59,7 b' var CodeMirror = (function() {'
46 // (see Line constructor), work an array of lines that should be
59 // (see Line constructor), work an array of lines that should be
47 // parsed, and history the undo history (instance of History
60 // parsed, and history the undo history (instance of History
48 // constructor).
61 // constructor).
49 var mode, lines = [new Line("")], work, history = new History(), focused;
62 var mode, lines = [new Line("")], work, focused;
50 loadMode();
63 loadMode();
51 // The selection. These are always maintained to point at valid
64 // The selection. These are always maintained to point at valid
52 // positions. Inverted is used to remember that the user is
65 // positions. Inverted is used to remember that the user is
@@ -56,10 +69,10 b' var CodeMirror = (function() {'
56 // whether the user is holding shift. reducedSelection is a hack
69 // whether the user is holding shift. reducedSelection is a hack
57 // to get around the fact that we can't create inverted
70 // to get around the fact that we can't create inverted
58 // selections. See below.
71 // selections. See below.
59 var shiftSelecting, reducedSelection;
72 var shiftSelecting, reducedSelection, lastClick, lastDoubleClick, draggingText;
60 // Variables used by startOperation/endOperation to track what
73 // Variables used by startOperation/endOperation to track what
61 // happened during the operation.
74 // happened during the operation.
62 var updateInput, changes, textChanged, selectionChanged, leaveInputAlone;
75 var updateInput, changes, textChanged, selectionChanged, leaveInputAlone, gutterDirty;
63 // Current visible range (may be bigger than the view window).
76 // Current visible range (may be bigger than the view window).
64 var showingFrom = 0, showingTo = 0, lastHeight = 0, curKeyId = null;
77 var showingFrom = 0, showingTo = 0, lastHeight = 0, curKeyId = null;
65 // editing will hold an object describing the things we put in the
78 // editing will hold an object describing the things we put in the
@@ -67,35 +80,46 b' var CodeMirror = (function() {'
67 // bracketHighlighted is used to remember that a backet has been
80 // bracketHighlighted is used to remember that a backet has been
68 // marked.
81 // marked.
69 var editing, bracketHighlighted;
82 var editing, bracketHighlighted;
83 // Tracks the maximum line length so that the horizontal scrollbar
84 // can be kept static when scrolling.
85 var maxLine = "", maxWidth;
70
86
71 // Initialize the content. Somewhat hacky (delayed prepareInput)
87 // Initialize the content.
72 // to work around browser issues.
73 operation(function(){setValue(options.value || ""); updateInput = false;})();
88 operation(function(){setValue(options.value || ""); updateInput = false;})();
74 setTimeout(prepareInput, 20);
89 var history = new History();
75
90
76 // Register our event handlers.
91 // Register our event handlers.
77 connect(wrapper, "mousedown", operation(onMouseDown));
92 connect(scroller, "mousedown", operation(onMouseDown));
93 connect(scroller, "dblclick", operation(onDoubleClick));
94 connect(lineSpace, "dragstart", onDragStart);
78 // Gecko browsers fire contextmenu *after* opening the menu, at
95 // Gecko browsers fire contextmenu *after* opening the menu, at
79 // which point we can't mess with it anymore. Context menu is
96 // which point we can't mess with it anymore. Context menu is
80 // handled in onMouseDown for Gecko.
97 // handled in onMouseDown for Gecko.
81 if (!gecko) connect(wrapper, "contextmenu", operation(onContextMenu));
98 if (!gecko) connect(scroller, "contextmenu", onContextMenu);
82 connect(code, "dblclick", operation(onDblClick));
99 connect(scroller, "scroll", function() {
83 connect(wrapper, "scroll", function() {updateDisplay([]); if (options.onScroll) options.onScroll(instance);});
100 updateDisplay([]);
101 if (options.fixedGutter) gutter.style.left = scroller.scrollLeft + "px";
102 if (options.onScroll) options.onScroll(instance);
103 });
84 connect(window, "resize", function() {updateDisplay(true);});
104 connect(window, "resize", function() {updateDisplay(true);});
85 connect(input, "keyup", operation(onKeyUp));
105 connect(input, "keyup", operation(onKeyUp));
106 connect(input, "input", function() {fastPoll(curKeyId);});
86 connect(input, "keydown", operation(onKeyDown));
107 connect(input, "keydown", operation(onKeyDown));
87 connect(input, "keypress", operation(onKeyPress));
108 connect(input, "keypress", operation(onKeyPress));
88 connect(input, "focus", onFocus);
109 connect(input, "focus", onFocus);
89 connect(input, "blur", onBlur);
110 connect(input, "blur", onBlur);
90
111
91 connect(wrapper, "dragenter", function(e){e.stop();});
112 connect(scroller, "dragenter", e_stop);
92 connect(wrapper, "dragover", function(e){e.stop();});
113 connect(scroller, "dragover", e_stop);
93 connect(wrapper, "drop", operation(onDrop));
114 connect(scroller, "drop", operation(onDrop));
94 connect(wrapper, "paste", function(){input.focus(); fastPoll();});
115 connect(scroller, "paste", function(){focusInput(); fastPoll();});
95 connect(input, "paste", function(){fastPoll();});
116 connect(input, "paste", function(){fastPoll();});
96 connect(input, "cut", function(){fastPoll();});
117 connect(input, "cut", function(){fastPoll();});
97
118
98 if (document.activeElement == input) onFocus();
119 // IE throws unspecified error in certain cases, when
120 // trying to access activeElement before onload
121 var hasFocus; try { hasFocus = (targetDocument.activeElement == input); } catch(e) { }
122 if (hasFocus) setTimeout(onFocus, 20);
99 else onBlur();
123 else onBlur();
100
124
101 function isLine(l) {return l >= 0 && l < lines.length;}
125 function isLine(l) {return l >= 0 && l < lines.length;}
@@ -104,27 +128,37 b' var CodeMirror = (function() {'
104 // range checking and/or clipping. operation is used to wrap the
128 // range checking and/or clipping. operation is used to wrap the
105 // call so that changes it makes are tracked, and the display is
129 // call so that changes it makes are tracked, and the display is
106 // updated afterwards.
130 // updated afterwards.
107 var instance = {
131 var instance = wrapper.CodeMirror = {
108 getValue: getValue,
132 getValue: getValue,
109 setValue: operation(setValue),
133 setValue: operation(setValue),
110 getSelection: getSelection,
134 getSelection: getSelection,
111 replaceSelection: operation(replaceSelection),
135 replaceSelection: operation(replaceSelection),
112 focus: function(){input.focus(); onFocus(); fastPoll();},
136 focus: function(){focusInput(); onFocus(); fastPoll();},
113 setOption: function(option, value) {
137 setOption: function(option, value) {
114 options[option] = value;
138 options[option] = value;
115 if (option == "lineNumbers" || option == "gutter") gutterChanged();
139 if (option == "lineNumbers" || option == "gutter" || option == "firstLineNumber")
140 operation(gutterChanged)();
116 else if (option == "mode" || option == "indentUnit") loadMode();
141 else if (option == "mode" || option == "indentUnit") loadMode();
142 else if (option == "readOnly" && value == "nocursor") input.blur();
143 else if (option == "theme") scroller.className = scroller.className.replace(/cm-s-\w+/, "cm-s-" + value);
117 },
144 },
118 getOption: function(option) {return options[option];},
145 getOption: function(option) {return options[option];},
119 undo: operation(undo),
146 undo: operation(undo),
120 redo: operation(redo),
147 redo: operation(redo),
121 indentLine: operation(function(n) {if (isLine(n)) indentLine(n, "smart");}),
148 indentLine: operation(function(n, dir) {
149 if (isLine(n)) indentLine(n, dir == null ? "smart" : dir ? "add" : "subtract");
150 }),
122 historySize: function() {return {undo: history.done.length, redo: history.undone.length};},
151 historySize: function() {return {undo: history.done.length, redo: history.undone.length};},
152 clearHistory: function() {history = new History();},
123 matchBrackets: operation(function(){matchBrackets(true);}),
153 matchBrackets: operation(function(){matchBrackets(true);}),
124 getTokenAt: function(pos) {
154 getTokenAt: function(pos) {
125 pos = clipPos(pos);
155 pos = clipPos(pos);
126 return lines[pos.line].getTokenAt(mode, getStateBefore(pos.line), pos.ch);
156 return lines[pos.line].getTokenAt(mode, getStateBefore(pos.line), pos.ch);
127 },
157 },
158 getStateAfter: function(line) {
159 line = clipLine(line == null ? lines.length - 1: line);
160 return getStateBefore(line + 1);
161 },
128 cursorCoords: function(start){
162 cursorCoords: function(start){
129 if (start == null) start = sel.inverted;
163 if (start == null) start = sel.inverted;
130 return pageCoords(start ? sel.from : sel.to);
164 return pageCoords(start ? sel.from : sel.to);
@@ -132,22 +166,41 b' var CodeMirror = (function() {'
132 charCoords: function(pos){return pageCoords(clipPos(pos));},
166 charCoords: function(pos){return pageCoords(clipPos(pos));},
133 coordsChar: function(coords) {
167 coordsChar: function(coords) {
134 var off = eltOffset(lineSpace);
168 var off = eltOffset(lineSpace);
135 var line = Math.min(showingTo - 1, showingFrom + Math.floor(coords.y / lineHeight()));
169 var line = clipLine(Math.min(lines.length - 1, showingFrom + Math.floor((coords.y - off.top) / lineHeight())));
136 return clipPos({line: line, ch: charFromX(clipLine(line), coords.x)});
170 return clipPos({line: line, ch: charFromX(clipLine(line), coords.x - off.left)});
137 },
171 },
138 getSearchCursor: function(query, pos, caseFold) {return new SearchCursor(query, pos, caseFold);},
172 getSearchCursor: function(query, pos, caseFold) {return new SearchCursor(query, pos, caseFold);},
139 markText: operation(function(a, b, c){return operation(markText(a, b, c));}),
173 markText: operation(markText),
140 setMarker: addGutterMarker,
174 setMarker: operation(addGutterMarker),
141 clearMarker: removeGutterMarker,
175 clearMarker: operation(removeGutterMarker),
142 setLineClass: operation(setLineClass),
176 setLineClass: operation(setLineClass),
143 lineInfo: lineInfo,
177 lineInfo: lineInfo,
144 addWidget: function(pos, node, scroll) {
178 addWidget: function(pos, node, scroll, vert, horiz) {
145 var pos = localCoords(clipPos(pos), true);
179 pos = localCoords(clipPos(pos));
146 node.style.top = (showingFrom * lineHeight() + pos.yBot + paddingTop()) + "px";
180 var top = pos.yBot, left = pos.x;
147 node.style.left = (pos.x + paddingLeft()) + "px";
181 node.style.position = "absolute";
148 code.appendChild(node);
182 code.appendChild(node);
183 if (vert == "over") top = pos.y;
184 else if (vert == "near") {
185 var vspace = Math.max(scroller.offsetHeight, lines.length * lineHeight()),
186 hspace = Math.max(code.clientWidth, lineSpace.clientWidth) - paddingLeft();
187 if (pos.yBot + node.offsetHeight > vspace && pos.y > node.offsetHeight)
188 top = pos.y - node.offsetHeight;
189 if (left + node.offsetWidth > hspace)
190 left = hspace - node.offsetWidth;
191 }
192 node.style.top = (top + paddingTop()) + "px";
193 node.style.left = node.style.right = "";
194 if (horiz == "right") {
195 left = code.clientWidth - node.offsetWidth;
196 node.style.right = "0px";
197 } else {
198 if (horiz == "left") left = 0;
199 else if (horiz == "middle") left = (code.clientWidth - node.offsetWidth) / 2;
200 node.style.left = (left + paddingLeft()) + "px";
201 }
149 if (scroll)
202 if (scroll)
150 scrollIntoView(pos.x, pos.yBot, pos.x + node.offsetWidth, pos.yBot + node.offsetHeight);
203 scrollIntoView(left, top, left + node.offsetWidth, top + node.offsetHeight);
151 },
204 },
152
205
153 lineCount: function() {return lines.length;},
206 lineCount: function() {return lines.length;},
@@ -171,18 +224,30 b' var CodeMirror = (function() {'
171 replaceRange: operation(replaceRange),
224 replaceRange: operation(replaceRange),
172 getRange: function(from, to) {return getRange(clipPos(from), clipPos(to));},
225 getRange: function(from, to) {return getRange(clipPos(from), clipPos(to));},
173
226
227 coordsFromIndex: function(index) {
228 var total = lines.length, pos = 0, line, ch, len;
229
230 for (line = 0; line < total; line++) {
231 len = lines[line].text.length + 1;
232 if (pos + len > index) { ch = index - pos; break; }
233 pos += len;
234 }
235 return clipPos({line: line, ch: ch});
236 },
237
174 operation: function(f){return operation(f)();},
238 operation: function(f){return operation(f)();},
175 refresh: function(){updateDisplay(true);},
239 refresh: function(){updateDisplay(true);},
176 getInputField: function(){return input;},
240 getInputField: function(){return input;},
177 getWrapperElement: function(){return wrapper;}
241 getWrapperElement: function(){return wrapper;},
242 getScrollerElement: function(){return scroller;},
243 getGutterElement: function(){return gutter;}
178 };
244 };
179
245
180 function setValue(code) {
246 function setValue(code) {
181 history = null;
182 var top = {line: 0, ch: 0};
247 var top = {line: 0, ch: 0};
183 updateLines(top, {line: lines.length - 1, ch: lines[lines.length-1].text.length},
248 updateLines(top, {line: lines.length - 1, ch: lines[lines.length-1].text.length},
184 splitLines(code), top, top);
249 splitLines(code), top, top);
185 history = new History();
250 updateInput = true;
186 }
251 }
187 function getValue(code) {
252 function getValue(code) {
188 var text = [];
253 var text = [];
@@ -192,38 +257,70 b' var CodeMirror = (function() {'
192 }
257 }
193
258
194 function onMouseDown(e) {
259 function onMouseDown(e) {
260 // Check whether this is a click in a widget
261 for (var n = e_target(e); n != wrapper; n = n.parentNode)
262 if (n.parentNode == code && n != mover) return;
263
195 // First, see if this is a click in the gutter
264 // First, see if this is a click in the gutter
196 for (var n = e.target(); n != wrapper; n = n.parentNode)
265 for (var n = e_target(e); n != wrapper; n = n.parentNode)
197 if (n.parentNode == gutterText) {
266 if (n.parentNode == gutterText) {
198 if (options.onGutterClick)
267 if (options.onGutterClick)
199 options.onGutterClick(instance, indexOf(gutterText.childNodes, n) + showingFrom);
268 options.onGutterClick(instance, indexOf(gutterText.childNodes, n) + showingFrom, e);
200 return e.stop();
269 return e_preventDefault(e);
201 }
270 }
202
271
203 if (gecko && e.button() == 3) onContextMenu(e);
272 var start = posFromMouse(e);
204 if (e.button() != 1) return;
273
274 switch (e_button(e)) {
275 case 3:
276 if (gecko && !mac) onContextMenu(e);
277 return;
278 case 2:
279 if (start) setCursor(start.line, start.ch, true);
280 return;
281 }
205 // For button 1, if it was clicked inside the editor
282 // For button 1, if it was clicked inside the editor
206 // (posFromMouse returning non-null), we have to adjust the
283 // (posFromMouse returning non-null), we have to adjust the
207 // selection.
284 // selection.
208 var start = posFromMouse(e), last = start, going;
285 if (!start) {if (e_target(e) == scroller) e_preventDefault(e); return;}
209 if (!start) {if (e.target() == wrapper) e.stop(); return;}
210 setCursor(start.line, start.ch, false);
211
286
212 if (!focused) onFocus();
287 if (!focused) onFocus();
213 e.stop();
288
214 // And then we have to see if it's a drag event, in which case
289 var now = +new Date;
215 // the dragged-over text must be selected.
290 if (lastDoubleClick > now - 400) {
216 function end() {
291 e_preventDefault(e);
217 input.focus();
292 return selectLine(start.line);
218 updateInput = true;
293 } else if (lastClick > now - 400) {
219 move(); up();
294 lastDoubleClick = now;
295 e_preventDefault(e);
296 return selectWordAt(start);
297 } else { lastClick = now; }
298
299 var last = start, going;
300 if (dragAndDrop && !posEq(sel.from, sel.to) &&
301 !posLess(start, sel.from) && !posLess(sel.to, start)) {
302 // Let the drag handler handle this.
303 var up = connect(targetDocument, "mouseup", operation(function(e2) {
304 draggingText = false;
305 up();
306 if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) {
307 e_preventDefault(e2);
308 setCursor(start.line, start.ch, true);
309 focusInput();
310 }
311 }), true);
312 draggingText = true;
313 return;
220 }
314 }
315 e_preventDefault(e);
316 setCursor(start.line, start.ch, true);
317
221 function extend(e) {
318 function extend(e) {
222 var cur = posFromMouse(e, true);
319 var cur = posFromMouse(e, true);
223 if (cur && !posEq(cur, last)) {
320 if (cur && !posEq(cur, last)) {
224 if (!focused) onFocus();
321 if (!focused) onFocus();
225 last = cur;
322 last = cur;
226 setSelection(start, cur);
323 setSelectionUser(start, cur);
227 updateInput = false;
324 updateInput = false;
228 var visible = visibleLines();
325 var visible = visibleLines();
229 if (cur.line >= visible.to || cur.line < visible.from)
326 if (cur.line >= visible.to || cur.line < visible.from)
@@ -231,68 +328,95 b' var CodeMirror = (function() {'
231 }
328 }
232 }
329 }
233
330
234 var move = connect(document, "mousemove", operation(function(e) {
331 var move = connect(targetDocument, "mousemove", operation(function(e) {
235 clearTimeout(going);
332 clearTimeout(going);
236 e.stop();
333 e_preventDefault(e);
237 extend(e);
334 extend(e);
238 }), true);
335 }), true);
239 var up = connect(document, "mouseup", operation(function(e) {
336 var up = connect(targetDocument, "mouseup", operation(function(e) {
240 clearTimeout(going);
337 clearTimeout(going);
241 var cur = posFromMouse(e);
338 var cur = posFromMouse(e);
242 if (cur) setSelection(start, cur);
339 if (cur) setSelectionUser(start, cur);
243 e.stop();
340 e_preventDefault(e);
244 end();
341 focusInput();
342 updateInput = true;
343 move(); up();
245 }), true);
344 }), true);
246 }
345 }
247 function onDblClick(e) {
346 function onDoubleClick(e) {
248 var pos = posFromMouse(e);
347 var start = posFromMouse(e);
249 if (!pos) return;
348 if (!start) return;
250 selectWordAt(pos);
349 lastDoubleClick = +new Date;
251 e.stop();
350 e_preventDefault(e);
351 selectWordAt(start);
252 }
352 }
253 function onDrop(e) {
353 function onDrop(e) {
254 var pos = posFromMouse(e, true), files = e.e.dataTransfer.files;
354 e.preventDefault();
355 var pos = posFromMouse(e, true), files = e.dataTransfer.files;
255 if (!pos || options.readOnly) return;
356 if (!pos || options.readOnly) return;
256 if (files && files.length && window.FileReader && window.File) {
357 if (files && files.length && window.FileReader && window.File) {
257 var n = files.length, text = Array(n), read = 0;
258 for (var i = 0; i < n; ++i) loadFile(files[i], i);
259 function loadFile(file, i) {
358 function loadFile(file, i) {
260 var reader = new FileReader;
359 var reader = new FileReader;
261 reader.onload = function() {
360 reader.onload = function() {
262 text[i] = reader.result;
361 text[i] = reader.result;
263 if (++read == n) replaceRange(text.join(""), clipPos(pos), clipPos(pos));
362 if (++read == n) {
363 pos = clipPos(pos);
364 var end = replaceRange(text.join(""), pos, pos);
365 setSelectionUser(pos, end);
366 }
264 };
367 };
265 reader.readAsText(file);
368 reader.readAsText(file);
266 }
369 }
370 var n = files.length, text = Array(n), read = 0;
371 for (var i = 0; i < n; ++i) loadFile(files[i], i);
267 }
372 }
268 else {
373 else {
269 try {
374 try {
270 var text = e.e.dataTransfer.getData("Text");
375 var text = e.dataTransfer.getData("Text");
271 if (text) replaceRange(text, pos, pos);
376 if (text) {
377 var end = replaceRange(text, pos, pos);
378 var curFrom = sel.from, curTo = sel.to;
379 setSelectionUser(pos, end);
380 if (draggingText) replaceRange("", curFrom, curTo);
381 focusInput();
382 }
272 }
383 }
273 catch(e){}
384 catch(e){}
274 }
385 }
275 }
386 }
387 function onDragStart(e) {
388 var txt = getSelection();
389 // This will reset escapeElement
390 htmlEscape(txt);
391 e.dataTransfer.setDragImage(escapeElement, 0, 0);
392 e.dataTransfer.setData("Text", txt);
393 }
276 function onKeyDown(e) {
394 function onKeyDown(e) {
277 if (!focused) onFocus();
395 if (!focused) onFocus();
278
396
279 var code = e.e.keyCode;
397 var code = e.keyCode;
398 // IE does strange things with escape.
399 if (ie && code == 27) { e.returnValue = false; }
280 // Tries to detect ctrl on non-mac, cmd on mac.
400 // Tries to detect ctrl on non-mac, cmd on mac.
281 var mod = (mac ? e.e.metaKey : e.e.ctrlKey) && !e.e.altKey, anyMod = e.e.ctrlKey || e.e.altKey || e.e.metaKey;
401 var mod = (mac ? e.metaKey : e.ctrlKey) && !e.altKey, anyMod = e.ctrlKey || e.altKey || e.metaKey;
282 if (code == 16 || e.e.shiftKey) shiftSelecting = shiftSelecting || (sel.inverted ? sel.to : sel.from);
402 if (code == 16 || e.shiftKey) shiftSelecting = shiftSelecting || (sel.inverted ? sel.to : sel.from);
283 else shiftSelecting = null;
403 else shiftSelecting = null;
284 // First give onKeyEvent option a chance to handle this.
404 // First give onKeyEvent option a chance to handle this.
285 if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e.e))) return;
405 if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return;
286
406
287 if (code == 33 || code == 34) {scrollPage(code == 34); return e.stop();} // page up/down
407 if (code == 33 || code == 34) {scrollPage(code == 34); return e_preventDefault(e);} // page up/down
288 if (mod && (code == 36 || code == 35)) {scrollEnd(code == 36); return e.stop();} // ctrl-home/end
408 if (mod && ((code == 36 || code == 35) || // ctrl-home/end
289 if (mod && code == 65) {selectAll(); return e.stop();} // ctrl-a
409 mac && (code == 38 || code == 40))) { // cmd-up/down
410 scrollEnd(code == 36 || code == 38); return e_preventDefault(e);
411 }
412 if (mod && code == 65) {selectAll(); return e_preventDefault(e);} // ctrl-a
290 if (!options.readOnly) {
413 if (!options.readOnly) {
291 if (!anyMod && code == 13) {return;} // enter
414 if (!anyMod && code == 13) {return;} // enter
292 if (!anyMod && code == 9 && handleTab(e.e.shiftKey)) return e.stop(); // tab
415 if (!anyMod && code == 9 && handleTab(e.shiftKey)) return e_preventDefault(e); // tab
293 if (mod && code == 90) {undo(); return e.stop();} // ctrl-z
416 if (mod && code == 90) {undo(); return e_preventDefault(e);} // ctrl-z
294 if (mod && ((e.e.shiftKey && code == 90) || code == 89)) {redo(); return e.stop();} // ctrl-shift-z, ctrl-y
417 if (mod && ((e.shiftKey && code == 90) || code == 89)) {redo(); return e_preventDefault(e);} // ctrl-shift-z, ctrl-y
295 }
418 }
419 if (code == 36) { if (options.smartHome) { smartHome(); return e_preventDefault(e); } }
296
420
297 // Key id to use in the movementKeys map. We also pass it to
421 // Key id to use in the movementKeys map. We also pass it to
298 // fastPoll in order to 'self learn'. We need this because
422 // fastPoll in order to 'self learn'. We need this because
@@ -300,51 +424,60 b' var CodeMirror = (function() {'
300 // its start when it is inverted and a movement key is pressed
424 // its start when it is inverted and a movement key is pressed
301 // (and later restore it again), shouldn't be used for
425 // (and later restore it again), shouldn't be used for
302 // non-movement keys.
426 // non-movement keys.
303 curKeyId = (mod ? "c" : "") + code;
427 curKeyId = (mod ? "c" : "") + (e.altKey ? "a" : "") + code;
304 if (sel.inverted && movementKeys.hasOwnProperty(curKeyId)) {
428 if (sel.inverted && movementKeys[curKeyId] === true) {
305 var range = selRange(input);
429 var range = selRange(input);
306 if (range) {
430 if (range) {
307 reducedSelection = {anchor: range.start};
431 reducedSelection = {anchor: range.start};
308 setSelRange(input, range.start, range.start);
432 setSelRange(input, range.start, range.start);
309 }
433 }
310 }
434 }
435 // Don't save the key as a movementkey unless it had a modifier
436 if (!mod && !e.altKey) curKeyId = null;
311 fastPoll(curKeyId);
437 fastPoll(curKeyId);
312 }
438 }
313 function onKeyUp(e) {
439 function onKeyUp(e) {
440 if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return;
314 if (reducedSelection) {
441 if (reducedSelection) {
315 reducedSelection = null;
442 reducedSelection = null;
316 updateInput = true;
443 updateInput = true;
317 }
444 }
318 if (e.e.keyCode == 16) shiftSelecting = null;
445 if (e.keyCode == 16) shiftSelecting = null;
319 }
446 }
320 function onKeyPress(e) {
447 function onKeyPress(e) {
321 if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e.e))) return;
448 if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return;
322 if (options.electricChars && mode.electricChars) {
449 if (options.electricChars && mode.electricChars) {
323 var ch = String.fromCharCode(e.e.charCode == null ? e.e.keyCode : e.e.charCode);
450 var ch = String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode);
324 if (mode.electricChars.indexOf(ch) > -1)
451 if (mode.electricChars.indexOf(ch) > -1)
325 setTimeout(operation(function() {indentLine(sel.to.line, "smart");}), 50);
452 setTimeout(operation(function() {indentLine(sel.to.line, "smart");}), 50);
326 }
453 }
327 var code = e.e.keyCode;
454 var code = e.keyCode;
328 // Re-stop tab and enter. Necessary on some browsers.
455 // Re-stop tab and enter. Necessary on some browsers.
329 if (code == 13) {handleEnter(); e.stop();}
456 if (code == 13) {if (!options.readOnly) handleEnter(); e_preventDefault(e);}
330 else if (code == 9 && options.tabMode != "default") e.stop();
457 else if (!e.ctrlKey && !e.altKey && !e.metaKey && code == 9 && options.tabMode != "default") e_preventDefault(e);
331 else fastPoll(curKeyId);
458 else fastPoll(curKeyId);
332 }
459 }
333
460
334 function onFocus() {
461 function onFocus() {
335 if (!focused && options.onFocus) options.onFocus(instance);
462 if (options.readOnly == "nocursor") return;
336 focused = true;
463 if (!focused) {
464 if (options.onFocus) options.onFocus(instance);
465 focused = true;
466 if (wrapper.className.search(/\bCodeMirror-focused\b/) == -1)
467 wrapper.className += " CodeMirror-focused";
468 if (!leaveInputAlone) prepareInput();
469 }
337 slowPoll();
470 slowPoll();
338 if (wrapper.className.search(/\bCodeMirror-focused\b/) == -1)
339 wrapper.className += " CodeMirror-focused";
340 restartBlink();
471 restartBlink();
341 }
472 }
342 function onBlur() {
473 function onBlur() {
343 if (focused && options.onBlur) options.onBlur(instance);
474 if (focused) {
475 if (options.onBlur) options.onBlur(instance);
476 focused = false;
477 wrapper.className = wrapper.className.replace(" CodeMirror-focused", "");
478 }
344 clearInterval(blinker);
479 clearInterval(blinker);
345 shiftSelecting = null;
480 setTimeout(function() {if (!focused) shiftSelecting = null;}, 150);
346 focused = false;
347 wrapper.className = wrapper.className.replace(" CodeMirror-focused", "");
348 }
481 }
349
482
350 // Replace the range from from to to by the strings in newText.
483 // Replace the range from from to to by the strings in newText.
@@ -367,12 +500,18 b' var CodeMirror = (function() {'
367 var pos = clipPos({line: change.start + change.old.length - 1,
500 var pos = clipPos({line: change.start + change.old.length - 1,
368 ch: editEnd(replaced[replaced.length-1], change.old[change.old.length-1])});
501 ch: editEnd(replaced[replaced.length-1], change.old[change.old.length-1])});
369 updateLinesNoUndo({line: change.start, ch: 0}, {line: end - 1, ch: lines[end-1].text.length}, change.old, pos, pos);
502 updateLinesNoUndo({line: change.start, ch: 0}, {line: end - 1, ch: lines[end-1].text.length}, change.old, pos, pos);
503 updateInput = true;
370 }
504 }
371 }
505 }
372 function undo() {unredoHelper(history.done, history.undone);}
506 function undo() {unredoHelper(history.done, history.undone);}
373 function redo() {unredoHelper(history.undone, history.done);}
507 function redo() {unredoHelper(history.undone, history.done);}
374
508
375 function updateLinesNoUndo(from, to, newText, selFrom, selTo) {
509 function updateLinesNoUndo(from, to, newText, selFrom, selTo) {
510 var recomputeMaxLength = false, maxLineLength = maxLine.length;
511 for (var i = from.line; i <= to.line; ++i) {
512 if (lines[i].text.length == maxLineLength) {recomputeMaxLength = true; break;}
513 }
514
376 var nlines = to.line - from.line, firstLine = lines[from.line], lastLine = lines[to.line];
515 var nlines = to.line - from.line, firstLine = lines[from.line], lastLine = lines[to.line];
377 // First adjust the line structure, taking some care to leave highlighting intact.
516 // First adjust the line structure, taking some care to leave highlighting intact.
378 if (firstLine == lastLine) {
517 if (firstLine == lastLine) {
@@ -381,24 +520,46 b' var CodeMirror = (function() {'
381 else {
520 else {
382 lastLine = firstLine.split(to.ch, newText[newText.length-1]);
521 lastLine = firstLine.split(to.ch, newText[newText.length-1]);
383 var spliceargs = [from.line + 1, nlines];
522 var spliceargs = [from.line + 1, nlines];
384 firstLine.replace(from.ch, firstLine.text.length, newText[0]);
523 firstLine.replace(from.ch, null, newText[0]);
385 for (var i = 1, e = newText.length - 1; i < e; ++i) spliceargs.push(new Line(newText[i]));
524 for (var i = 1, e = newText.length - 1; i < e; ++i)
525 spliceargs.push(Line.inheritMarks(newText[i], firstLine));
386 spliceargs.push(lastLine);
526 spliceargs.push(lastLine);
387 lines.splice.apply(lines, spliceargs);
527 lines.splice.apply(lines, spliceargs);
388 }
528 }
389 }
529 }
390 else if (newText.length == 1) {
530 else if (newText.length == 1) {
391 firstLine.replace(from.ch, firstLine.text.length, newText[0] + lastLine.text.slice(to.ch));
531 firstLine.replace(from.ch, null, newText[0]);
532 lastLine.replace(null, to.ch, "");
533 firstLine.append(lastLine);
392 lines.splice(from.line + 1, nlines);
534 lines.splice(from.line + 1, nlines);
393 }
535 }
394 else {
536 else {
395 var spliceargs = [from.line + 1, nlines - 1];
537 var spliceargs = [from.line + 1, nlines - 1];
396 firstLine.replace(from.ch, firstLine.text.length, newText[0]);
538 firstLine.replace(from.ch, null, newText[0]);
397 lastLine.replace(0, to.ch, newText[newText.length-1]);
539 lastLine.replace(null, to.ch, newText[newText.length-1]);
398 for (var i = 1, e = newText.length - 1; i < e; ++i) spliceargs.push(new Line(newText[i]));
540 for (var i = 1, e = newText.length - 1; i < e; ++i)
541 spliceargs.push(Line.inheritMarks(newText[i], firstLine));
399 lines.splice.apply(lines, spliceargs);
542 lines.splice.apply(lines, spliceargs);
400 }
543 }
401
544
545
546 for (var i = from.line, e = i + newText.length; i < e; ++i) {
547 var l = lines[i].text;
548 if (l.length > maxLineLength) {
549 maxLine = l; maxLineLength = l.length; maxWidth = null;
550 recomputeMaxLength = false;
551 }
552 }
553 if (recomputeMaxLength) {
554 maxLineLength = 0; maxLine = ""; maxWidth = null;
555 for (var i = 0, e = lines.length; i < e; ++i) {
556 var l = lines[i].text;
557 if (l.length > maxLineLength) {
558 maxLineLength = l.length; maxLine = l;
559 }
560 }
561 }
562
402 // Add these lines to the work array, so that they will be
563 // Add these lines to the work array, so that they will be
403 // highlighted. Adjust work lines if lines were added/removed.
564 // highlighted. Adjust work lines if lines were added/removed.
404 var newWork = [], lendiff = newText.length - nlines - 1;
565 var newWork = [], lendiff = newText.length - nlines - 1;
@@ -407,12 +568,17 b' var CodeMirror = (function() {'
407 if (task < from.line) newWork.push(task);
568 if (task < from.line) newWork.push(task);
408 else if (task > to.line) newWork.push(task + lendiff);
569 else if (task > to.line) newWork.push(task + lendiff);
409 }
570 }
410 if (newText.length) newWork.push(from.line);
571 if (newText.length < 5) {
572 highlightLines(from.line, from.line + newText.length);
573 newWork.push(from.line + newText.length);
574 } else {
575 newWork.push(from.line);
576 }
411 work = newWork;
577 work = newWork;
412 startWorker(100);
578 startWorker(100);
413 // Remember that these lines changed, for updating the display
579 // Remember that these lines changed, for updating the display
414 changes.push({from: from.line, to: to.line + 1, diff: lendiff});
580 changes.push({from: from.line, to: to.line + 1, diff: lendiff});
415 textChanged = true;
581 textChanged = {from: from, to: to, text: newText};
416
582
417 // Update the selection
583 // Update the selection
418 function updateLine(n) {return n <= Math.min(to.line, to.line + lendiff) ? n : n + lendiff;}
584 function updateLine(n) {return n <= Math.min(to.line, to.line + lendiff) ? n : n + lendiff;}
@@ -483,7 +649,10 b' var CodeMirror = (function() {'
483 function p() {
649 function p() {
484 startOperation();
650 startOperation();
485 var changed = readInput();
651 var changed = readInput();
486 if (changed == "moved" && keyId) movementKeys[keyId] = true;
652 if (changed && keyId) {
653 if (changed == "moved" && movementKeys[keyId] == null) movementKeys[keyId] = true;
654 if (changed == "changed") movementKeys[keyId] = false;
655 }
487 if (!changed && !missed) {missed = true; poll.set(80, p);}
656 if (!changed && !missed) {missed = true; poll.set(80, p);}
488 else {pollingFast = false; slowPoll();}
657 else {pollingFast = false; slowPoll();}
489 endOperation();
658 endOperation();
@@ -495,13 +664,12 b' var CodeMirror = (function() {'
495 // to the data in the editing variable, and updates the editor
664 // to the data in the editing variable, and updates the editor
496 // content or cursor if something changed.
665 // content or cursor if something changed.
497 function readInput() {
666 function readInput() {
667 if (leaveInputAlone || !focused) return;
498 var changed = false, text = input.value, sr = selRange(input);
668 var changed = false, text = input.value, sr = selRange(input);
499 if (!sr) return false;
669 if (!sr) return false;
500 var changed = editing.text != text, rs = reducedSelection;
670 var changed = editing.text != text, rs = reducedSelection;
501 var moved = changed || sr.start != editing.start || sr.end != (rs ? editing.start : editing.end);
671 var moved = changed || sr.start != editing.start || sr.end != (rs ? editing.start : editing.end);
502 if (reducedSelection && !moved && sel.from.line == 0 && sel.from.ch == 0)
672 if (!moved && !rs) return false;
503 reducedSelection = null;
504 else if (!moved) return false;
505 if (changed) {
673 if (changed) {
506 shiftSelecting = reducedSelection = null;
674 shiftSelecting = reducedSelection = null;
507 if (options.readOnly) {updateInput = true; return "changed";}
675 if (options.readOnly) {updateInput = true; return "changed";}
@@ -524,13 +692,10 b' var CodeMirror = (function() {'
524 // so that you can, for example, press shift-up at the start of
692 // so that you can, for example, press shift-up at the start of
525 // your selection and have the right thing happen.
693 // your selection and have the right thing happen.
526 if (rs) {
694 if (rs) {
527 from = sr.start == rs.anchor ? to : from;
695 var head = sr.start == rs.anchor ? to : from;
528 to = shiftSelecting ? sel.to : sr.start == rs.anchor ? from : to;
696 var tail = shiftSelecting ? sel.to : sr.start == rs.anchor ? from : to;
529 if (!posLess(from, to)) {
697 if (sel.inverted = posLess(head, tail)) { from = head; to = tail; }
530 reducedSelection = null;
698 else { reducedSelection = null; from = tail; to = head; }
531 sel.inverted = false;
532 var tmp = from; from = to; to = tmp;
533 }
534 }
699 }
535
700
536 // In some cases (cursor on same line as before), we don't have
701 // In some cases (cursor on same line as before), we don't have
@@ -550,8 +715,8 b' var CodeMirror = (function() {'
550 var ch = nl > -1 ? start - nl : start, endline = editing.to - 1, edend = editing.text.length;
715 var ch = nl > -1 ? start - nl : start, endline = editing.to - 1, edend = editing.text.length;
551 for (;;) {
716 for (;;) {
552 c = editing.text.charAt(edend);
717 c = editing.text.charAt(edend);
718 if (text.charAt(end) != c) {++end; ++edend; break;}
553 if (c == "\n") endline--;
719 if (c == "\n") endline--;
554 if (text.charAt(end) != c) {++end; ++edend; break;}
555 if (edend <= start || end <= start) break;
720 if (edend <= start || end <= start) break;
556 --end; --edend;
721 --end; --edend;
557 }
722 }
@@ -580,22 +745,36 b' var CodeMirror = (function() {'
580 editing = {text: text, from: from, to: to, start: startch, end: endch};
745 editing = {text: text, from: from, to: to, start: startch, end: endch};
581 setSelRange(input, startch, reducedSelection ? startch : endch);
746 setSelRange(input, startch, reducedSelection ? startch : endch);
582 }
747 }
748 function focusInput() {
749 if (options.readOnly != "nocursor") input.focus();
750 }
583
751
752 function scrollEditorIntoView() {
753 if (!cursor.getBoundingClientRect) return;
754 var rect = cursor.getBoundingClientRect();
755 var winH = window.innerHeight || Math.max(document.body.offsetHeight, document.documentElement.offsetHeight);
756 if (rect.top < 0 || rect.bottom > winH) cursor.scrollIntoView();
757 }
584 function scrollCursorIntoView() {
758 function scrollCursorIntoView() {
585 var cursor = localCoords(sel.inverted ? sel.from : sel.to);
759 var cursor = localCoords(sel.inverted ? sel.from : sel.to);
586 return scrollIntoView(cursor.x, cursor.y, cursor.x, cursor.yBot);
760 return scrollIntoView(cursor.x, cursor.y, cursor.x, cursor.yBot);
587 }
761 }
588 function scrollIntoView(x1, y1, x2, y2) {
762 function scrollIntoView(x1, y1, x2, y2) {
589 var pl = paddingLeft(), pt = paddingTop();
763 var pl = paddingLeft(), pt = paddingTop(), lh = lineHeight();
590 y1 += pt; y2 += pt; x1 += pl; x2 += pl;
764 y1 += pt; y2 += pt; x1 += pl; x2 += pl;
591 var screen = wrapper.clientHeight, screentop = wrapper.scrollTop, scrolled = false, result = true;
765 var screen = scroller.clientHeight, screentop = scroller.scrollTop, scrolled = false, result = true;
592 if (y1 < screentop) {wrapper.scrollTop = Math.max(0, y1 - 10); scrolled = true;}
766 if (y1 < screentop) {scroller.scrollTop = Math.max(0, y1 - 2*lh); scrolled = true;}
593 else if (y2 > screentop + screen) {wrapper.scrollTop = y2 + 10 - screen; scrolled = true;}
767 else if (y2 > screentop + screen) {scroller.scrollTop = y2 + lh - screen; scrolled = true;}
594
768
595 var screenw = wrapper.clientWidth, screenleft = wrapper.scrollLeft;
769 var screenw = scroller.clientWidth, screenleft = scroller.scrollLeft;
596 if (x1 < screenleft) {wrapper.scrollLeft = Math.max(0, x1 - 10); scrolled = true;}
770 var gutterw = options.fixedGutter ? gutter.clientWidth : 0;
771 if (x1 < screenleft + gutterw) {
772 if (x1 < 50) x1 = 0;
773 scroller.scrollLeft = Math.max(0, x1 - 10 - gutterw);
774 scrolled = true;
775 }
597 else if (x2 > screenw + screenleft) {
776 else if (x2 > screenw + screenleft) {
598 wrapper.scrollLeft = x2 + 10 - screenw;
777 scroller.scrollLeft = x2 + 10 - screenw;
599 scrolled = true;
778 scrolled = true;
600 if (x2 > code.clientWidth) result = false;
779 if (x2 > code.clientWidth) result = false;
601 }
780 }
@@ -604,15 +783,15 b' var CodeMirror = (function() {'
604 }
783 }
605
784
606 function visibleLines() {
785 function visibleLines() {
607 var lh = lineHeight(), top = wrapper.scrollTop - paddingTop();
786 var lh = lineHeight(), top = scroller.scrollTop - paddingTop();
608 return {from: Math.min(lines.length, Math.max(0, Math.floor(top / lh))),
787 return {from: Math.min(lines.length, Math.max(0, Math.floor(top / lh))),
609 to: Math.min(lines.length, Math.ceil((top + wrapper.clientHeight) / lh))};
788 to: Math.min(lines.length, Math.ceil((top + scroller.clientHeight) / lh))};
610 }
789 }
611 // Uses a set of changes plus the current scroll position to
790 // Uses a set of changes plus the current scroll position to
612 // determine which DOM updates have to be made, and makes the
791 // determine which DOM updates have to be made, and makes the
613 // updates.
792 // updates.
614 function updateDisplay(changes) {
793 function updateDisplay(changes) {
615 if (!wrapper.clientWidth) {
794 if (!scroller.clientWidth) {
616 showingFrom = showingTo = 0;
795 showingFrom = showingTo = 0;
617 return;
796 return;
618 }
797 }
@@ -629,7 +808,7 b' var CodeMirror = (function() {'
629 intact2.push(range);
808 intact2.push(range);
630 else {
809 else {
631 if (change.from > range.from)
810 if (change.from > range.from)
632 intact2.push({from: range.from, to: change.from, domStart: range.domStart})
811 intact2.push({from: range.from, to: change.from, domStart: range.domStart});
633 if (change.to < range.to)
812 if (change.to < range.to)
634 intact2.push({from: change.to + diff, to: range.to + diff,
813 intact2.push({from: change.to + diff, to: range.to + diff,
635 domStart: range.domStart + (change.to - range.from)});
814 domStart: range.domStart + (change.to - range.from)});
@@ -659,6 +838,7 b' var CodeMirror = (function() {'
659 if (domPos != domEnd || pos != to) {
838 if (domPos != domEnd || pos != to) {
660 changedLines += Math.abs(to - pos);
839 changedLines += Math.abs(to - pos);
661 updates.push({from: pos, to: to, domSize: domEnd - domPos, domStart: domPos});
840 updates.push({from: pos, to: to, domSize: domEnd - domPos, domStart: domPos});
841 if (to - pos != domEnd - domPos) gutterDirty = true;
662 }
842 }
663
843
664 if (!updates.length) return;
844 if (!updates.length) return;
@@ -674,13 +854,23 b' var CodeMirror = (function() {'
674
854
675 // Position the mover div to align with the lines it's supposed
855 // Position the mover div to align with the lines it's supposed
676 // to be showing (which will cover the visible display)
856 // to be showing (which will cover the visible display)
677 var different = from != showingFrom || to != showingTo || lastHeight != wrapper.clientHeight;
857 var different = from != showingFrom || to != showingTo || lastHeight != scroller.clientHeight;
678 showingFrom = from; showingTo = to;
858 showingFrom = from; showingTo = to;
679 mover.style.top = (from * lineHeight()) + "px";
859 mover.style.top = (from * lineHeight()) + "px";
680 if (different) {
860 if (different) {
681 lastHeight = wrapper.clientHeight;
861 lastHeight = scroller.clientHeight;
682 code.style.height = (lines.length * lineHeight() + 2 * paddingTop()) + "px";
862 code.style.height = (lines.length * lineHeight() + 2 * paddingTop()) + "px";
683 updateGutter();
863 }
864 if (different || gutterDirty) updateGutter();
865
866 if (maxWidth == null) maxWidth = stringWidth(maxLine);
867 if (maxWidth > scroller.clientWidth) {
868 lineSpace.style.width = maxWidth + "px";
869 // Needed to prevent odd wrapping/hiding of widgets placed in here.
870 code.style.width = "";
871 code.style.width = scroller.scrollWidth + "px";
872 } else {
873 lineSpace.style.width = code.style.width = "";
684 }
874 }
685
875
686 // Since this is all rather error prone, it is honoured with the
876 // Since this is all rather error prone, it is honoured with the
@@ -712,7 +902,7 b' var CodeMirror = (function() {'
712 // there .innerHTML on PRE nodes is dumb, and discards
902 // there .innerHTML on PRE nodes is dumb, and discards
713 // whitespace.
903 // whitespace.
714 var sfrom = sel.from.line, sto = sel.to.line, off = 0,
904 var sfrom = sel.from.line, sto = sel.to.line, off = 0,
715 scratch = badInnerHTML && document.createElement("div");
905 scratch = badInnerHTML && targetDocument.createElement("div");
716 for (var i = 0, e = updates.length; i < e; ++i) {
906 for (var i = 0, e = updates.length; i < e; ++i) {
717 var rec = updates[i];
907 var rec = updates[i];
718 var extra = (rec.to - rec.from) - rec.domSize;
908 var extra = (rec.to - rec.from) - rec.domSize;
@@ -722,7 +912,7 b' var CodeMirror = (function() {'
722 lineDiv.removeChild(nodeAfter ? nodeAfter.previousSibling : lineDiv.lastChild);
912 lineDiv.removeChild(nodeAfter ? nodeAfter.previousSibling : lineDiv.lastChild);
723 else if (extra) {
913 else if (extra) {
724 for (var j = Math.max(0, extra); j > 0; --j)
914 for (var j = Math.max(0, extra); j > 0; --j)
725 lineDiv.insertBefore(document.createElement("pre"), nodeAfter);
915 lineDiv.insertBefore(targetDocument.createElement("pre"), nodeAfter);
726 for (var j = Math.max(0, -extra); j > 0; --j)
916 for (var j = Math.max(0, -extra); j > 0; --j)
727 lineDiv.removeChild(nodeAfter ? nodeAfter.previousSibling : lineDiv.lastChild);
917 lineDiv.removeChild(nodeAfter ? nodeAfter.previousSibling : lineDiv.lastChild);
728 }
918 }
@@ -753,10 +943,10 b' var CodeMirror = (function() {'
753
943
754 function updateGutter() {
944 function updateGutter() {
755 if (!options.gutter && !options.lineNumbers) return;
945 if (!options.gutter && !options.lineNumbers) return;
756 var hText = mover.offsetHeight, hEditor = wrapper.clientHeight;
946 var hText = mover.offsetHeight, hEditor = scroller.clientHeight;
757 gutter.style.height = (hText - hEditor < 2 ? hEditor : hText) + "px";
947 gutter.style.height = (hText - hEditor < 2 ? hEditor : hText) + "px";
758 var html = [];
948 var html = [];
759 for (var i = showingFrom; i < showingTo; ++i) {
949 for (var i = showingFrom; i < Math.max(showingTo, showingFrom + 1); ++i) {
760 var marker = lines[i].gutterMarker;
950 var marker = lines[i].gutterMarker;
761 var text = options.lineNumbers ? i + options.firstLineNumber : null;
951 var text = options.lineNumbers ? i + options.firstLineNumber : null;
762 if (marker && marker.text)
952 if (marker && marker.text)
@@ -769,37 +959,43 b' var CodeMirror = (function() {'
769 gutterText.innerHTML = html.join("");
959 gutterText.innerHTML = html.join("");
770 var minwidth = String(lines.length).length, firstNode = gutterText.firstChild, val = eltText(firstNode), pad = "";
960 var minwidth = String(lines.length).length, firstNode = gutterText.firstChild, val = eltText(firstNode), pad = "";
771 while (val.length + pad.length < minwidth) pad += "\u00a0";
961 while (val.length + pad.length < minwidth) pad += "\u00a0";
772 if (pad) firstNode.insertBefore(document.createTextNode(pad), firstNode.firstChild);
962 if (pad) firstNode.insertBefore(targetDocument.createTextNode(pad), firstNode.firstChild);
773 gutter.style.display = "";
963 gutter.style.display = "";
774 lineSpace.style.marginLeft = gutter.offsetWidth + "px";
964 lineSpace.style.marginLeft = gutter.offsetWidth + "px";
965 gutterDirty = false;
775 }
966 }
776 function updateCursor() {
967 function updateCursor() {
777 var head = sel.inverted ? sel.from : sel.to;
968 var head = sel.inverted ? sel.from : sel.to, lh = lineHeight();
778 var x = charX(head.line, head.ch) + "px", y = (head.line - showingFrom) * lineHeight() + "px";
969 var x = charX(head.line, head.ch);
779 inputDiv.style.top = y; inputDiv.style.left = x;
970 var top = head.line * lh - scroller.scrollTop;
971 inputDiv.style.top = Math.max(Math.min(top, scroller.offsetHeight), 0) + "px";
972 inputDiv.style.left = (x - scroller.scrollLeft) + "px";
780 if (posEq(sel.from, sel.to)) {
973 if (posEq(sel.from, sel.to)) {
781 cursor.style.top = y; cursor.style.left = x;
974 cursor.style.top = (head.line - showingFrom) * lh + "px";
975 cursor.style.left = x + "px";
782 cursor.style.display = "";
976 cursor.style.display = "";
783 }
977 }
784 else cursor.style.display = "none";
978 else cursor.style.display = "none";
785 }
979 }
786
980
981 function setSelectionUser(from, to) {
982 var sh = shiftSelecting && clipPos(shiftSelecting);
983 if (sh) {
984 if (posLess(sh, from)) from = sh;
985 else if (posLess(to, sh)) to = sh;
986 }
987 setSelection(from, to);
988 }
787 // Update the selection. Last two args are only used by
989 // Update the selection. Last two args are only used by
788 // updateLines, since they have to be expressed in the line
990 // updateLines, since they have to be expressed in the line
789 // numbers before the update.
991 // numbers before the update.
790 function setSelection(from, to, oldFrom, oldTo) {
992 function setSelection(from, to, oldFrom, oldTo) {
791 if (posEq(sel.from, from) && posEq(sel.to, to)) return;
993 if (posEq(sel.from, from) && posEq(sel.to, to)) return;
792 var sh = shiftSelecting && clipPos(shiftSelecting);
793 if (posLess(to, from)) {var tmp = to; to = from; from = tmp;}
994 if (posLess(to, from)) {var tmp = to; to = from; from = tmp;}
794 if (sh) {
795 if (posLess(sh, from)) from = sh;
796 else if (posLess(to, sh)) to = sh;
797 }
798
995
799 var startEq = posEq(sel.to, to), endEq = posEq(sel.from, from);
800 if (posEq(from, to)) sel.inverted = false;
996 if (posEq(from, to)) sel.inverted = false;
801 else if (startEq && !endEq) sel.inverted = true;
997 else if (posEq(from, sel.to)) sel.inverted = false;
802 else if (endEq && !startEq) sel.inverted = false;
998 else if (posEq(to, sel.from)) sel.inverted = true;
803
999
804 // Some ugly logic used to only mark the lines that actually did
1000 // Some ugly logic used to only mark the lines that actually did
805 // see a change in selection as changed, rather than the whole
1001 // see a change in selection as changed, rather than the whole
@@ -829,9 +1025,9 b' var CodeMirror = (function() {'
829 sel.from = from; sel.to = to;
1025 sel.from = from; sel.to = to;
830 selectionChanged = true;
1026 selectionChanged = true;
831 }
1027 }
832 function setCursor(line, ch) {
1028 function setCursor(line, ch, user) {
833 var pos = clipPos({line: line, ch: ch || 0});
1029 var pos = clipPos({line: line, ch: ch || 0});
834 setSelection(pos, pos);
1030 (user ? setSelectionUser : setSelection)(pos, pos);
835 }
1031 }
836
1032
837 function clipLine(n) {return Math.max(0, Math.min(n, lines.length-1));}
1033 function clipLine(n) {return Math.max(0, Math.min(n, lines.length-1));}
@@ -845,11 +1041,12 b' var CodeMirror = (function() {'
845 }
1041 }
846
1042
847 function scrollPage(down) {
1043 function scrollPage(down) {
848 var linesPerPage = Math.floor(wrapper.clientHeight / lineHeight()), head = sel.inverted ? sel.from : sel.to;
1044 var linesPerPage = Math.floor(scroller.clientHeight / lineHeight()), head = sel.inverted ? sel.from : sel.to;
849 setCursor(head.line + (Math.max(linesPerPage - 1, 1) * (down ? 1 : -1)), head.ch);
1045 setCursor(head.line + (Math.max(linesPerPage - 1, 1) * (down ? 1 : -1)), head.ch, true);
850 }
1046 }
851 function scrollEnd(top) {
1047 function scrollEnd(top) {
852 setCursor(top ? 0 : lines.length - 1);
1048 var pos = top ? {line: 0, ch: 0} : {line: lines.length - 1, ch: lines[lines.length-1].text.length};
1049 setSelectionUser(pos, pos);
853 }
1050 }
854 function selectAll() {
1051 function selectAll() {
855 var endLine = lines.length - 1;
1052 var endLine = lines.length - 1;
@@ -859,8 +1056,11 b' var CodeMirror = (function() {'
859 var line = lines[pos.line].text;
1056 var line = lines[pos.line].text;
860 var start = pos.ch, end = pos.ch;
1057 var start = pos.ch, end = pos.ch;
861 while (start > 0 && /\w/.test(line.charAt(start - 1))) --start;
1058 while (start > 0 && /\w/.test(line.charAt(start - 1))) --start;
862 while (end < line.length - 1 && /\w/.test(line.charAt(end))) ++end;
1059 while (end < line.length && /\w/.test(line.charAt(end))) ++end;
863 setSelection({line: pos.line, ch: start}, {line: pos.line, ch: end});
1060 setSelectionUser({line: pos.line, ch: start}, {line: pos.line, ch: end});
1061 }
1062 function selectLine(line) {
1063 setSelectionUser({line: line, ch: 0}, {line: line, ch: lines[line].text.length});
864 }
1064 }
865 function handleEnter() {
1065 function handleEnter() {
866 replaceSelection("\n", "end");
1066 replaceSelection("\n", "end");
@@ -868,12 +1068,17 b' var CodeMirror = (function() {'
868 indentLine(sel.from.line, options.enterMode == "keep" ? "prev" : "smart");
1068 indentLine(sel.from.line, options.enterMode == "keep" ? "prev" : "smart");
869 }
1069 }
870 function handleTab(shift) {
1070 function handleTab(shift) {
1071 function indentSelected(mode) {
1072 if (posEq(sel.from, sel.to)) return indentLine(sel.from.line, mode);
1073 var e = sel.to.line - (sel.to.ch ? 0 : 1);
1074 for (var i = sel.from.line; i <= e; ++i) indentLine(i, mode);
1075 }
871 shiftSelecting = null;
1076 shiftSelecting = null;
872 switch (options.tabMode) {
1077 switch (options.tabMode) {
873 case "default":
1078 case "default":
874 return false;
1079 return false;
875 case "indent":
1080 case "indent":
876 for (var i = sel.from.line, e = sel.to.line; i <= e; ++i) indentLine(i, "smart");
1081 indentSelected("smart");
877 break;
1082 break;
878 case "classic":
1083 case "classic":
879 if (posEq(sel.from, sel.to)) {
1084 if (posEq(sel.from, sel.to)) {
@@ -882,11 +1087,15 b' var CodeMirror = (function() {'
882 break;
1087 break;
883 }
1088 }
884 case "shift":
1089 case "shift":
885 for (var i = sel.from.line, e = sel.to.line; i <= e; ++i) indentLine(i, shift ? "subtract" : "add");
1090 indentSelected(shift ? "subtract" : "add");
886 break;
1091 break;
887 }
1092 }
888 return true;
1093 return true;
889 }
1094 }
1095 function smartHome() {
1096 var firstNonWS = Math.max(0, lines[sel.from.line].text.search(/\S/));
1097 setCursor(sel.from.line, sel.from.ch <= firstNonWS && sel.from.ch ? 0 : firstNonWS, true);
1098 }
890
1099
891 function indentLine(n, how) {
1100 function indentLine(n, how) {
892 if (how == "smart") {
1101 if (how == "smart") {
@@ -924,21 +1133,20 b' var CodeMirror = (function() {'
924 for (var i = 0, l = lines.length; i < l; ++i)
1133 for (var i = 0, l = lines.length; i < l; ++i)
925 lines[i].stateAfter = null;
1134 lines[i].stateAfter = null;
926 work = [0];
1135 work = [0];
1136 startWorker();
927 }
1137 }
928 function gutterChanged() {
1138 function gutterChanged() {
929 var visible = options.gutter || options.lineNumbers;
1139 var visible = options.gutter || options.lineNumbers;
930 gutter.style.display = visible ? "" : "none";
1140 gutter.style.display = visible ? "" : "none";
931 if (visible) updateGutter();
1141 if (visible) gutterDirty = true;
932 else lineDiv.parentNode.style.marginLeft = 0;
1142 else lineDiv.parentNode.style.marginLeft = 0;
933 }
1143 }
934
1144
935 function markText(from, to, className) {
1145 function markText(from, to, className) {
936 from = clipPos(from); to = clipPos(to);
1146 from = clipPos(from); to = clipPos(to);
937 var accum = [];
1147 var set = [];
938 function add(line, from, to, className) {
1148 function add(line, from, to, className) {
939 var line = lines[line], mark = line.addMark(from, to, className);
1149 mark = lines[line].addMark(from, to, className, set);
940 mark.line = line;
941 accum.push(mark);
942 }
1150 }
943 if (from.line == to.line) add(from.line, from.ch, to.ch, className);
1151 if (from.line == to.line) add(from.line, from.ch, to.ch, className);
944 else {
1152 else {
@@ -948,30 +1156,51 b' var CodeMirror = (function() {'
948 add(to.line, 0, to.ch, className);
1156 add(to.line, 0, to.ch, className);
949 }
1157 }
950 changes.push({from: from.line, to: to.line + 1});
1158 changes.push({from: from.line, to: to.line + 1});
951 return function() {
1159 return new TextMarker(set);
952 var start, end;
1160 }
953 for (var i = 0; i < accum.length; ++i) {
1161
954 var mark = accum[i], found = indexOf(lines, mark.line);
1162 function TextMarker(set) { this.set = set; }
955 mark.line.removeMark(mark);
1163 TextMarker.prototype.clear = operation(function() {
956 if (found > -1) {
1164 for (var i = 0, e = this.set.length; i < e; ++i) {
957 if (start == null) start = found;
1165 var mk = this.set[i].marked;
958 end = found;
1166 for (var j = 0; j < mk.length; ++j) {
1167 if (mk[j].set == this.set) mk.splice(j--, 1);
1168 }
1169 }
1170 // We don't know the exact lines that changed. Refreshing is
1171 // cheaper than finding them.
1172 changes.push({from: 0, to: lines.length});
1173 });
1174 TextMarker.prototype.find = function() {
1175 var from, to;
1176 for (var i = 0, e = this.set.length; i < e; ++i) {
1177 var line = this.set[i], mk = line.marked;
1178 for (var j = 0; j < mk.length; ++j) {
1179 var mark = mk[j];
1180 if (mark.set == this.set) {
1181 if (mark.from != null || mark.to != null) {
1182 var found = indexOf(lines, line);
1183 if (found > -1) {
1184 if (mark.from != null) from = {line: found, ch: mark.from};
1185 if (mark.to != null) to = {line: found, ch: mark.to};
1186 }
1187 }
959 }
1188 }
960 }
1189 }
961 if (start != null) changes.push({from: start, to: end + 1});
1190 }
962 };
1191 return {from: from, to: to};
963 }
1192 };
964
1193
965 function addGutterMarker(line, text, className) {
1194 function addGutterMarker(line, text, className) {
966 if (typeof line == "number") line = lines[clipLine(line)];
1195 if (typeof line == "number") line = lines[clipLine(line)];
967 line.gutterMarker = {text: text, style: className};
1196 line.gutterMarker = {text: text, style: className};
968 updateGutter();
1197 gutterDirty = true;
969 return line;
1198 return line;
970 }
1199 }
971 function removeGutterMarker(line) {
1200 function removeGutterMarker(line) {
972 if (typeof line == "number") line = lines[clipLine(line)];
1201 if (typeof line == "number") line = lines[clipLine(line)];
973 line.gutterMarker = null;
1202 line.gutterMarker = null;
974 updateGutter();
1203 gutterDirty = true;
975 }
1204 }
976 function setLineClass(line, className) {
1205 function setLineClass(line, className) {
977 if (typeof line == "number") {
1206 if (typeof line == "number") {
@@ -982,8 +1211,10 b' var CodeMirror = (function() {'
982 var no = indexOf(lines, line);
1211 var no = indexOf(lines, line);
983 if (no == -1) return null;
1212 if (no == -1) return null;
984 }
1213 }
985 line.className = className;
1214 if (line.className != className) {
986 changes.push({from: no, to: no + 1});
1215 line.className = className;
1216 changes.push({from: no, to: no + 1});
1217 }
987 return line;
1218 return line;
988 }
1219 }
989
1220
@@ -1001,35 +1232,44 b' var CodeMirror = (function() {'
1001 return {line: n, text: line.text, markerText: marker && marker.text, markerClass: marker && marker.style};
1232 return {line: n, text: line.text, markerText: marker && marker.text, markerClass: marker && marker.style};
1002 }
1233 }
1003
1234
1235 function stringWidth(str) {
1236 measure.innerHTML = "<pre><span>x</span></pre>";
1237 measure.firstChild.firstChild.firstChild.nodeValue = str;
1238 return measure.firstChild.firstChild.offsetWidth || 10;
1239 }
1004 // These are used to go from pixel positions to character
1240 // These are used to go from pixel positions to character
1005 // positions, taking tabs into account.
1241 // positions, taking varying character widths into account.
1006 function charX(line, pos) {
1242 function charX(line, pos) {
1007 var text = lines[line].text, span = measure.firstChild;
1243 if (pos == 0) return 0;
1008 if (text.lastIndexOf("\t", pos) == -1) return pos * charWidth();
1244 measure.innerHTML = "<pre><span>" + lines[line].getHTML(null, null, false, pos) + "</span></pre>";
1009 var old = span.firstChild.nodeValue;
1245 return measure.firstChild.firstChild.offsetWidth;
1010 try {
1011 span.firstChild.nodeValue = text.slice(0, pos);
1012 return span.offsetWidth;
1013 } finally {span.firstChild.nodeValue = old;}
1014 }
1246 }
1015 function charFromX(line, x) {
1247 function charFromX(line, x) {
1016 var text = lines[line].text, cw = charWidth();
1017 if (x <= 0) return 0;
1248 if (x <= 0) return 0;
1018 if (text.indexOf("\t") == -1) return Math.min(text.length, Math.round(x / cw));
1249 var lineObj = lines[line], text = lineObj.text;
1019 var mspan = measure.firstChild, mtext = mspan.firstChild, old = mtext.nodeValue;
1250 function getX(len) {
1020 try {
1251 measure.innerHTML = "<pre><span>" + lineObj.getHTML(null, null, false, len) + "</span></pre>";
1021 mtext.nodeValue = text;
1252 return measure.firstChild.firstChild.offsetWidth;
1022 var from = 0, fromX = 0, to = text.length, toX = mspan.offsetWidth;
1253 }
1023 if (x > toX) return to;
1254 var from = 0, fromX = 0, to = text.length, toX;
1024 for (;;) {
1255 // Guess a suitable upper bound for our search.
1025 if (to - from <= 1) return (toX - x > x - fromX) ? from : to;
1256 var estimated = Math.min(to, Math.ceil(x / stringWidth("x")));
1026 var middle = Math.ceil((from + to) / 2);
1257 for (;;) {
1027 mtext.nodeValue = text.slice(0, middle);
1258 var estX = getX(estimated);
1028 var curX = mspan.offsetWidth;
1259 if (estX <= x && estimated < to) estimated = Math.min(to, Math.ceil(estimated * 1.2));
1029 if (curX > x) {to = middle; toX = curX;}
1260 else {toX = estX; to = estimated; break;}
1030 else {from = middle; fromX = curX;}
1261 }
1031 }
1262 if (x > toX) return to;
1032 } finally {mtext.nodeValue = old;}
1263 // Try to guess a suitable lower bound as well.
1264 estimated = Math.floor(to * 0.8); estX = getX(estimated);
1265 if (estX < x) {from = estimated; fromX = estX;}
1266 // Do a binary search between these bounds.
1267 for (;;) {
1268 if (to - from <= 1) return (toX - x > x - fromX) ? from : to;
1269 var middle = Math.ceil((from + to) / 2), middleX = getX(middle);
1270 if (middleX > x) {to = middle; toX = middleX;}
1271 else {from = middle; fromX = middleX;}
1272 }
1033 }
1273 }
1034
1274
1035 function localCoords(pos, inLineWrap) {
1275 function localCoords(pos, inLineWrap) {
@@ -1043,45 +1283,61 b' var CodeMirror = (function() {'
1043
1283
1044 function lineHeight() {
1284 function lineHeight() {
1045 var nlines = lineDiv.childNodes.length;
1285 var nlines = lineDiv.childNodes.length;
1046 if (nlines) return lineDiv.offsetHeight / nlines;
1286 if (nlines) return (lineDiv.offsetHeight / nlines) || 1;
1047 else return measure.firstChild.offsetHeight || 1;
1287 measure.innerHTML = "<pre>x</pre>";
1288 return measure.firstChild.offsetHeight || 1;
1048 }
1289 }
1049 function charWidth() {return (measure.firstChild.offsetWidth || 320) / 40;}
1050 function paddingTop() {return lineSpace.offsetTop;}
1290 function paddingTop() {return lineSpace.offsetTop;}
1051 function paddingLeft() {return lineSpace.offsetLeft;}
1291 function paddingLeft() {return lineSpace.offsetLeft;}
1052
1292
1053 function posFromMouse(e, liberal) {
1293 function posFromMouse(e, liberal) {
1054 var off = eltOffset(lineSpace),
1294 var offW = eltOffset(scroller, true), x, y;
1055 x = e.pageX() - off.left,
1295 // Fails unpredictably on IE[67] when mouse is dragged around quickly.
1056 y = e.pageY() - off.top;
1296 try { x = e.clientX; y = e.clientY; } catch (e) { return null; }
1057 if (!liberal && e.target() != lineSpace.parentNode && !(e.target() == wrapper && y > (lines.length * lineHeight())))
1297 // This is a mess of a heuristic to try and determine whether a
1058 for (var n = e.target(); n != lineDiv && n != cursor; n = n.parentNode)
1298 // scroll-bar was clicked or not, and to return null if one was
1059 if (!n || n == wrapper) return null;
1299 // (and !liberal).
1060 var line = showingFrom + Math.floor(y / lineHeight());
1300 if (!liberal && (x - offW.left > scroller.clientWidth || y - offW.top > scroller.clientHeight))
1061 return clipPos({line: line, ch: charFromX(clipLine(line), x)});
1301 return null;
1302 var offL = eltOffset(lineSpace, true);
1303 var line = showingFrom + Math.floor((y - offL.top) / lineHeight());
1304 return clipPos({line: line, ch: charFromX(clipLine(line), x - offL.left)});
1062 }
1305 }
1063 function onContextMenu(e) {
1306 function onContextMenu(e) {
1064 var pos = posFromMouse(e);
1307 var pos = posFromMouse(e);
1065 if (!pos || window.opera) return; // Opera is difficult.
1308 if (!pos || window.opera) return; // Opera is difficult.
1066 if (posEq(sel.from, sel.to) || posLess(pos, sel.from) || !posLess(pos, sel.to))
1309 if (posEq(sel.from, sel.to) || posLess(pos, sel.from) || !posLess(pos, sel.to))
1067 setCursor(pos.line, pos.ch);
1310 operation(setCursor)(pos.line, pos.ch);
1068
1311
1069 var oldCSS = input.style.cssText;
1312 var oldCSS = input.style.cssText;
1070 input.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e.pageY() - 1) +
1313 inputDiv.style.position = "absolute";
1071 "px; left: " + (e.pageX() - 1) + "px; z-index: 1000; background: white; " +
1314 input.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e.clientY - 5) +
1072 "border-width: 0; outline: none; overflow: hidden;";
1315 "px; left: " + (e.clientX - 5) + "px; z-index: 1000; background: white; " +
1316 "border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";
1317 leaveInputAlone = true;
1073 var val = input.value = getSelection();
1318 var val = input.value = getSelection();
1074 input.focus();
1319 focusInput();
1075 setSelRange(input, 0, val.length);
1320 setSelRange(input, 0, input.value.length);
1076 if (gecko) e.stop();
1321 function rehide() {
1077 leaveInputAlone = true;
1322 var newVal = splitLines(input.value).join("\n");
1078 setTimeout(function() {
1323 if (newVal != val) operation(replaceSelection)(newVal, "end");
1079 if (input.value != val) operation(replaceSelection)(input.value, "end");
1324 inputDiv.style.position = "relative";
1080 input.style.cssText = oldCSS;
1325 input.style.cssText = oldCSS;
1081 leaveInputAlone = false;
1326 leaveInputAlone = false;
1082 prepareInput();
1327 prepareInput();
1083 slowPoll();
1328 slowPoll();
1084 }, 50);
1329 }
1330
1331 if (gecko) {
1332 e_stop(e);
1333 var mouseup = connect(window, "mouseup", function() {
1334 mouseup();
1335 setTimeout(rehide, 20);
1336 }, true);
1337 }
1338 else {
1339 setTimeout(rehide, 50);
1340 }
1085 }
1341 }
1086
1342
1087 // Cursor-blinking
1343 // Cursor-blinking
@@ -1120,19 +1376,18 b' var CodeMirror = (function() {'
1120 }
1376 }
1121 }
1377 }
1122 }
1378 }
1123 for (var i = head.line, e = forward ? Math.min(i + 50, lines.length) : Math.max(0, i - 50); i != e; i+=d) {
1379 for (var i = head.line, e = forward ? Math.min(i + 100, lines.length) : Math.max(-1, i - 100); i != e; i+=d) {
1124 var line = lines[i], first = i == head.line;
1380 var line = lines[i], first = i == head.line;
1125 var found = scan(line, first && forward ? pos + 1 : 0, first && !forward ? pos : line.text.length);
1381 var found = scan(line, first && forward ? pos + 1 : 0, first && !forward ? pos : line.text.length);
1126 if (found) {
1382 if (found) break;
1127 var style = found.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket";
1128 var one = markText({line: head.line, ch: pos}, {line: head.line, ch: pos+1}, style),
1129 two = markText({line: i, ch: found.pos}, {line: i, ch: found.pos + 1}, style);
1130 var clear = operation(function(){one(); two();});
1131 if (autoclear) setTimeout(clear, 800);
1132 else bracketHighlighted = clear;
1133 break;
1134 }
1135 }
1383 }
1384 if (!found) found = {pos: null, match: false};
1385 var style = found.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket";
1386 var one = markText({line: head.line, ch: pos}, {line: head.line, ch: pos+1}, style),
1387 two = found.pos != null && markText({line: i, ch: found.pos}, {line: i, ch: found.pos + 1}, style);
1388 var clear = operation(function(){one.clear(); two && two.clear();});
1389 if (autoclear) setTimeout(clear, 800);
1390 else bracketHighlighted = clear;
1136 }
1391 }
1137
1392
1138 // Finds the line to start with when starting a parse. Tries to
1393 // Finds the line to start with when starting a parse. Tries to
@@ -1148,7 +1403,7 b' var CodeMirror = (function() {'
1148 if (line.stateAfter) return search;
1403 if (line.stateAfter) return search;
1149 var indented = line.indentation();
1404 var indented = line.indentation();
1150 if (minline == null || minindent > indented) {
1405 if (minline == null || minindent > indented) {
1151 minline = search;
1406 minline = search - 1;
1152 minindent = indented;
1407 minindent = indented;
1153 }
1408 }
1154 }
1409 }
@@ -1163,11 +1418,21 b' var CodeMirror = (function() {'
1163 line.highlight(mode, state);
1418 line.highlight(mode, state);
1164 line.stateAfter = copyState(mode, state);
1419 line.stateAfter = copyState(mode, state);
1165 }
1420 }
1166 if (!lines[n].stateAfter) work.push(n);
1421 changes.push({from: start, to: n});
1422 if (n < lines.length && !lines[n].stateAfter) work.push(n);
1167 return state;
1423 return state;
1168 }
1424 }
1425 function highlightLines(start, end) {
1426 var state = getStateBefore(start);
1427 for (var i = start; i < end; ++i) {
1428 var line = lines[i];
1429 line.highlight(mode, state);
1430 line.stateAfter = copyState(mode, state);
1431 }
1432 }
1169 function highlightWorker() {
1433 function highlightWorker() {
1170 var end = +new Date + options.workTime;
1434 var end = +new Date + options.workTime;
1435 var foundWork = work.length;
1171 while (work.length) {
1436 while (work.length) {
1172 if (!lines[showingFrom].stateAfter) var task = showingFrom;
1437 if (!lines[showingFrom].stateAfter) var task = showingFrom;
1173 else var task = work.pop();
1438 else var task = work.pop();
@@ -1176,20 +1441,29 b' var CodeMirror = (function() {'
1176 if (state) state = copyState(mode, state);
1441 if (state) state = copyState(mode, state);
1177 else state = startState(mode);
1442 else state = startState(mode);
1178
1443
1444 var unchanged = 0, compare = mode.compareStates, realChange = false;
1179 for (var i = start, l = lines.length; i < l; ++i) {
1445 for (var i = start, l = lines.length; i < l; ++i) {
1180 var line = lines[i], hadState = line.stateAfter;
1446 var line = lines[i], hadState = line.stateAfter;
1181 if (+new Date > end) {
1447 if (+new Date > end) {
1182 work.push(i);
1448 work.push(i);
1183 startWorker(options.workDelay);
1449 startWorker(options.workDelay);
1184 changes.push({from: task, to: i});
1450 if (realChange) changes.push({from: task, to: i + 1});
1185 return;
1451 return;
1186 }
1452 }
1187 var changed = line.highlight(mode, state);
1453 var changed = line.highlight(mode, state);
1454 if (changed) realChange = true;
1188 line.stateAfter = copyState(mode, state);
1455 line.stateAfter = copyState(mode, state);
1189 if (hadState && !changed && line.text) break;
1456 if (compare) {
1457 if (hadState && compare(hadState, state)) break;
1458 } else {
1459 if (changed !== false || !hadState) unchanged = 0;
1460 else if (++unchanged > 3) break;
1461 }
1190 }
1462 }
1191 changes.push({from: task, to: i});
1463 if (realChange) changes.push({from: task, to: i + 1});
1192 }
1464 }
1465 if (foundWork && options.onHighlightComplete)
1466 options.onHighlightComplete(instance);
1193 }
1467 }
1194 function startWorker(time) {
1468 function startWorker(time) {
1195 if (!work.length) return;
1469 if (!work.length) return;
@@ -1207,24 +1481,29 b' var CodeMirror = (function() {'
1207 var reScroll = false;
1481 var reScroll = false;
1208 if (selectionChanged) reScroll = !scrollCursorIntoView();
1482 if (selectionChanged) reScroll = !scrollCursorIntoView();
1209 if (changes.length) updateDisplay(changes);
1483 if (changes.length) updateDisplay(changes);
1210 else if (selectionChanged) updateCursor();
1484 else {
1485 if (selectionChanged) updateCursor();
1486 if (gutterDirty) updateGutter();
1487 }
1211 if (reScroll) scrollCursorIntoView();
1488 if (reScroll) scrollCursorIntoView();
1212 if (selectionChanged) restartBlink();
1489 if (selectionChanged) {scrollEditorIntoView(); restartBlink();}
1213
1490
1214 // updateInput can be set to a boolean value to force/prevent an
1491 // updateInput can be set to a boolean value to force/prevent an
1215 // update.
1492 // update.
1216 if (!leaveInputAlone && (updateInput === true || (updateInput !== false && selectionChanged)))
1493 if (focused && !leaveInputAlone &&
1494 (updateInput === true || (updateInput !== false && selectionChanged)))
1217 prepareInput();
1495 prepareInput();
1218
1496
1219 if (selectionChanged && options.onCursorActivity)
1220 options.onCursorActivity(instance);
1221 if (textChanged && options.onChange)
1222 options.onChange(instance);
1223 if (selectionChanged && options.matchBrackets)
1497 if (selectionChanged && options.matchBrackets)
1224 setTimeout(operation(function() {
1498 setTimeout(operation(function() {
1225 if (bracketHighlighted) {bracketHighlighted(); bracketHighlighted = null;}
1499 if (bracketHighlighted) {bracketHighlighted(); bracketHighlighted = null;}
1226 matchBrackets(false);
1500 matchBrackets(false);
1227 }), 20);
1501 }), 20);
1502 var tc = textChanged; // textChanged can be reset by cursoractivity callback
1503 if (selectionChanged && options.onCursorActivity)
1504 options.onCursorActivity(instance);
1505 if (tc && options.onChange && instance)
1506 options.onChange(instance, tc);
1228 }
1507 }
1229 var nestedOperation = 0;
1508 var nestedOperation = 0;
1230 function operation(f) {
1509 function operation(f) {
@@ -1259,6 +1538,7 b' var CodeMirror = (function() {'
1259 var newmatch = line.match(query);
1538 var newmatch = line.match(query);
1260 if (newmatch) match = newmatch;
1539 if (newmatch) match = newmatch;
1261 else break;
1540 else break;
1541 start++;
1262 }
1542 }
1263 }
1543 }
1264 else {
1544 else {
@@ -1338,9 +1618,21 b' var CodeMirror = (function() {'
1338 },
1618 },
1339
1619
1340 from: function() {if (this.atOccurrence) return copyPos(this.pos.from);},
1620 from: function() {if (this.atOccurrence) return copyPos(this.pos.from);},
1341 to: function() {if (this.atOccurrence) return copyPos(this.pos.to);}
1621 to: function() {if (this.atOccurrence) return copyPos(this.pos.to);},
1622
1623 replace: function(newText) {
1624 var self = this;
1625 if (this.atOccurrence)
1626 operation(function() {
1627 self.pos.to = replaceRange(newText, self.pos.from, self.pos.to);
1628 })();
1629 }
1342 };
1630 };
1343
1631
1632 for (var ext in extensions)
1633 if (extensions.propertyIsEnumerable(ext) &&
1634 !instance.propertyIsEnumerable(ext))
1635 instance[ext] = extensions[ext];
1344 return instance;
1636 return instance;
1345 } // (end of function CodeMirror)
1637 } // (end of function CodeMirror)
1346
1638
@@ -1348,6 +1640,7 b' var CodeMirror = (function() {'
1348 CodeMirror.defaults = {
1640 CodeMirror.defaults = {
1349 value: "",
1641 value: "",
1350 mode: null,
1642 mode: null,
1643 theme: "default",
1351 indentUnit: 2,
1644 indentUnit: 2,
1352 indentWithTabs: false,
1645 indentWithTabs: false,
1353 tabMode: "classic",
1646 tabMode: "classic",
@@ -1356,17 +1649,21 b' var CodeMirror = (function() {'
1356 onKeyEvent: null,
1649 onKeyEvent: null,
1357 lineNumbers: false,
1650 lineNumbers: false,
1358 gutter: false,
1651 gutter: false,
1652 fixedGutter: false,
1359 firstLineNumber: 1,
1653 firstLineNumber: 1,
1360 readOnly: false,
1654 readOnly: false,
1655 smartHome: true,
1361 onChange: null,
1656 onChange: null,
1362 onCursorActivity: null,
1657 onCursorActivity: null,
1363 onGutterClick: null,
1658 onGutterClick: null,
1659 onHighlightComplete: null,
1364 onFocus: null, onBlur: null, onScroll: null,
1660 onFocus: null, onBlur: null, onScroll: null,
1365 matchBrackets: false,
1661 matchBrackets: false,
1366 workTime: 100,
1662 workTime: 100,
1367 workDelay: 200,
1663 workDelay: 200,
1368 undoDepth: 40,
1664 undoDepth: 40,
1369 tabindex: null
1665 tabindex: null,
1666 document: window.document
1370 };
1667 };
1371
1668
1372 // Known modes, by name and by MIME
1669 // Known modes, by name and by MIME
@@ -1383,15 +1680,15 b' var CodeMirror = (function() {'
1383 spec = mimeModes[spec];
1680 spec = mimeModes[spec];
1384 if (typeof spec == "string")
1681 if (typeof spec == "string")
1385 var mname = spec, config = {};
1682 var mname = spec, config = {};
1386 else
1683 else if (spec != null)
1387 var mname = spec.name, config = spec;
1684 var mname = spec.name, config = spec;
1388 var mfactory = modes[mname];
1685 var mfactory = modes[mname];
1389 if (!mfactory) {
1686 if (!mfactory) {
1390 if (window.console) console.warn("No mode " + mname + " found, falling back to plain text.");
1687 if (window.console) console.warn("No mode " + mname + " found, falling back to plain text.");
1391 return CodeMirror.getMode(options, "text/plain");
1688 return CodeMirror.getMode(options, "text/plain");
1392 }
1689 }
1393 return mfactory(options, config);
1690 return mfactory(options, config || {});
1394 }
1691 };
1395 CodeMirror.listModes = function() {
1692 CodeMirror.listModes = function() {
1396 var list = [];
1693 var list = [];
1397 for (var m in modes)
1694 for (var m in modes)
@@ -1401,10 +1698,15 b' var CodeMirror = (function() {'
1401 CodeMirror.listMIMEs = function() {
1698 CodeMirror.listMIMEs = function() {
1402 var list = [];
1699 var list = [];
1403 for (var m in mimeModes)
1700 for (var m in mimeModes)
1404 if (mimeModes.propertyIsEnumerable(m)) list.push(m);
1701 if (mimeModes.propertyIsEnumerable(m)) list.push({mime: m, mode: mimeModes[m]});
1405 return list;
1702 return list;
1406 };
1703 };
1407
1704
1705 var extensions = {};
1706 CodeMirror.defineExtension = function(name, func) {
1707 extensions[name] = func;
1708 };
1709
1408 CodeMirror.fromTextArea = function(textarea, options) {
1710 CodeMirror.fromTextArea = function(textarea, options) {
1409 if (!options) options = {};
1711 if (!options) options = {};
1410 options.value = textarea.value;
1712 options.value = textarea.value;
@@ -1484,7 +1786,7 b' var CodeMirror = (function() {'
1484 if (ok) {++this.pos; return ch;}
1786 if (ok) {++this.pos; return ch;}
1485 },
1787 },
1486 eatWhile: function(match) {
1788 eatWhile: function(match) {
1487 var start = this.start;
1789 var start = this.pos;
1488 while (this.eat(match)){}
1790 while (this.eat(match)){}
1489 return this.pos > start;
1791 return this.pos > start;
1490 },
1792 },
@@ -1517,6 +1819,7 b' var CodeMirror = (function() {'
1517 },
1819 },
1518 current: function(){return this.string.slice(this.start, this.pos);}
1820 current: function(){return this.string.slice(this.start, this.pos);}
1519 };
1821 };
1822 CodeMirror.StringStream = StringStream;
1520
1823
1521 // Line objects. These hold state related to a line, including
1824 // Line objects. These hold state related to a line, including
1522 // highlighting info (the styles array).
1825 // highlighting info (the styles array).
@@ -1526,10 +1829,23 b' var CodeMirror = (function() {'
1526 this.text = text;
1829 this.text = text;
1527 this.marked = this.gutterMarker = this.className = null;
1830 this.marked = this.gutterMarker = this.className = null;
1528 }
1831 }
1832 Line.inheritMarks = function(text, orig) {
1833 var ln = new Line(text), mk = orig.marked;
1834 if (mk) {
1835 for (var i = 0; i < mk.length; ++i) {
1836 if (mk[i].to == null) {
1837 var newmk = ln.marked || (ln.marked = []), mark = mk[i];
1838 newmk.push({from: null, to: null, style: mark.style, set: mark.set});
1839 mark.set.push(ln);
1840 }
1841 }
1842 }
1843 return ln;
1844 }
1529 Line.prototype = {
1845 Line.prototype = {
1530 // Replace a piece of a line, keeping the styles around it intact.
1846 // Replace a piece of a line, keeping the styles around it intact.
1531 replace: function(from, to, text) {
1847 replace: function(from, to_, text) {
1532 var st = [], mk = this.marked;
1848 var st = [], mk = this.marked, to = to_ == null ? this.text.length : to_;
1533 copyStyles(0, from, this.styles, st);
1849 copyStyles(0, from, this.styles, st);
1534 if (text) st.push(text, null);
1850 if (text) st.push(text, null);
1535 copyStyles(to, this.text.length, this.styles, st);
1851 copyStyles(to, this.text.length, this.styles, st);
@@ -1538,39 +1854,86 b' var CodeMirror = (function() {'
1538 this.stateAfter = null;
1854 this.stateAfter = null;
1539 if (mk) {
1855 if (mk) {
1540 var diff = text.length - (to - from), end = this.text.length;
1856 var diff = text.length - (to - from), end = this.text.length;
1541 function fix(n) {return n <= Math.min(to, to + diff) ? n : n + diff;}
1857 var changeStart = Math.min(from, from + diff);
1542 for (var i = 0; i < mk.length; ++i) {
1858 for (var i = 0; i < mk.length; ++i) {
1543 var mark = mk[i], del = false;
1859 var mark = mk[i], del = false;
1544 if (mark.from >= end) del = true;
1860 if (mark.from != null && mark.from >= end) del = true;
1545 else {mark.from = fix(mark.from); if (mark.to != null) mark.to = fix(mark.to);}
1861 else {
1546 if (del || mark.from >= mark.to) {mk.splice(i, 1); i--;}
1862 if (mark.from != null && mark.from >= from) {
1863 mark.from += diff;
1864 if (mark.from <= 0) mark.from = from == null ? null : 0;
1865 }
1866 else if (to_ == null) mark.to = null;
1867 if (mark.to != null && mark.to > from) {
1868 mark.to += diff;
1869 if (mark.to < 0) del = true;
1870 }
1871 }
1872 if (del || (mark.from != null && mark.to != null && mark.from >= mark.to)) mk.splice(i--, 1);
1547 }
1873 }
1548 }
1874 }
1549 },
1875 },
1550 // Split a line in two, again keeping styles intact.
1876 // Split a part off a line, keeping styles and markers intact.
1551 split: function(pos, textBefore) {
1877 split: function(pos, textBefore) {
1552 var st = [textBefore, null];
1878 var st = [textBefore, null], mk = this.marked;
1553 copyStyles(pos, this.text.length, this.styles, st);
1879 copyStyles(pos, this.text.length, this.styles, st);
1554 return new Line(textBefore + this.text.slice(pos), st);
1880 var taken = new Line(textBefore + this.text.slice(pos), st);
1881 if (mk) {
1882 for (var i = 0; i < mk.length; ++i) {
1883 var mark = mk[i];
1884 if (mark.to > pos || mark.to == null) {
1885 if (!taken.marked) taken.marked = [];
1886 taken.marked.push({
1887 from: mark.from < pos || mark.from == null ? null : mark.from - pos + textBefore.length,
1888 to: mark.to == null ? null : mark.to - pos + textBefore.length,
1889 style: mark.style, set: mark.set
1890 });
1891 mark.set.push(taken);
1892 }
1893 }
1894 }
1895 return taken;
1555 },
1896 },
1556 addMark: function(from, to, style) {
1897 append: function(line) {
1557 var mk = this.marked, mark = {from: from, to: to, style: style};
1898 if (!line.text.length) return;
1899 var mylen = this.text.length, mk = line.marked;
1900 this.text += line.text;
1901 copyStyles(0, line.text.length, line.styles, this.styles);
1902 if (mk && mk.length) {
1903 var mymk = this.marked || (this.marked = []);
1904 for (var i = 0; i < mymk.length; ++i)
1905 if (mymk[i].to == null) mymk[i].to = mylen;
1906 outer: for (var i = 0; i < mk.length; ++i) {
1907 var mark = mk[i];
1908 if (!mark.from) {
1909 for (var j = 0; j < mymk.length; ++j) {
1910 var mymark = mymk[j];
1911 if (mymark.to == mylen && mymark.set == mark.set) {
1912 mymark.to = mark.to == null ? null : mark.to + mylen;
1913 continue outer;
1914 }
1915 }
1916 }
1917 mymk.push(mark);
1918 mark.set.push(this);
1919 mark.from += mylen;
1920 if (mark.to != null) mark.to += mylen;
1921 }
1922 }
1923 },
1924 addMark: function(from, to, style, set) {
1925 set.push(this);
1558 if (this.marked == null) this.marked = [];
1926 if (this.marked == null) this.marked = [];
1559 this.marked.push(mark);
1927 this.marked.push({from: from, to: to, style: style, set: set});
1560 this.marked.sort(function(a, b){return a.from - b.from;});
1928 this.marked.sort(function(a, b){return (a.from || 0) - (b.from || 0);});
1561 return mark;
1562 },
1563 removeMark: function(mark) {
1564 var mk = this.marked;
1565 if (!mk) return;
1566 for (var i = 0; i < mk.length; ++i)
1567 if (mk[i] == mark) {mk.splice(i, 1); break;}
1568 },
1929 },
1569 // Run the given mode's parser over a line, update the styles
1930 // Run the given mode's parser over a line, update the styles
1570 // array, which contains alternating fragments of text and CSS
1931 // array, which contains alternating fragments of text and CSS
1571 // classes.
1932 // classes.
1572 highlight: function(mode, state) {
1933 highlight: function(mode, state) {
1573 var stream = new StringStream(this.text), st = this.styles, pos = 0, changed = false;
1934 var stream = new StringStream(this.text), st = this.styles, pos = 0;
1935 var changed = false, curWord = st[0], prevWord;
1936 if (this.text == "" && mode.blankLine) mode.blankLine(state);
1574 while (!stream.eol()) {
1937 while (!stream.eol()) {
1575 var style = mode.token(stream, state);
1938 var style = mode.token(stream, state);
1576 var substr = this.text.slice(stream.start, stream.pos);
1939 var substr = this.text.slice(stream.start, stream.pos);
@@ -1578,8 +1941,9 b' var CodeMirror = (function() {'
1578 if (pos && st[pos-1] == style)
1941 if (pos && st[pos-1] == style)
1579 st[pos-2] += substr;
1942 st[pos-2] += substr;
1580 else if (substr) {
1943 else if (substr) {
1581 if (!changed && st[pos] != substr || st[pos+1] != style) changed = true;
1944 if (!changed && (st[pos+1] != style || (pos && st[pos-2] != prevWord))) changed = true;
1582 st[pos++] = substr; st[pos++] = style;
1945 st[pos++] = substr; st[pos++] = style;
1946 prevWord = curWord; curWord = st[pos];
1583 }
1947 }
1584 // Give up when line is ridiculously long
1948 // Give up when line is ridiculously long
1585 if (stream.pos > 5000) {
1949 if (stream.pos > 5000) {
@@ -1588,7 +1952,11 b' var CodeMirror = (function() {'
1588 }
1952 }
1589 }
1953 }
1590 if (st.length != pos) {st.length = pos; changed = true;}
1954 if (st.length != pos) {st.length = pos; changed = true;}
1591 return changed;
1955 if (pos && st[pos-2] != prevWord) changed = true;
1956 // Short lines with simple highlights return null, and are
1957 // counted as changed by the driver because they are likely to
1958 // highlight the same way in various contexts.
1959 return changed || (st.length < 5 && this.text.length < 10 ? null : false);
1592 },
1960 },
1593 // Fetch the parser token for a given character. Useful for hacks
1961 // Fetch the parser token for a given character. Useful for hacks
1594 // that want to inspect the mode state (say, for completion).
1962 // that want to inspect the mode state (say, for completion).
@@ -1607,7 +1975,7 b' var CodeMirror = (function() {'
1607 indentation: function() {return countColumn(this.text);},
1975 indentation: function() {return countColumn(this.text);},
1608 // Produces an HTML fragment for the line, taking selection,
1976 // Produces an HTML fragment for the line, taking selection,
1609 // marking, and highlighting into account.
1977 // marking, and highlighting into account.
1610 getHTML: function(sfrom, sto, includePre) {
1978 getHTML: function(sfrom, sto, includePre, endAt) {
1611 var html = [];
1979 var html = [];
1612 if (includePre)
1980 if (includePre)
1613 html.push(this.className ? '<pre class="' + this.className + '">': "<pre>");
1981 html.push(this.className ? '<pre class="' + this.className + '">': "<pre>");
@@ -1618,11 +1986,18 b' var CodeMirror = (function() {'
1618 }
1986 }
1619 var st = this.styles, allText = this.text, marked = this.marked;
1987 var st = this.styles, allText = this.text, marked = this.marked;
1620 if (sfrom == sto) sfrom = null;
1988 if (sfrom == sto) sfrom = null;
1989 var len = allText.length;
1990 if (endAt != null) len = Math.min(endAt, len);
1621
1991
1622 if (!allText)
1992 if (!allText && endAt == null)
1623 span(" ", sfrom != null && sto == null ? "CodeMirror-selected" : null);
1993 span(" ", sfrom != null && sto == null ? "CodeMirror-selected" : null);
1624 else if (!marked && sfrom == null)
1994 else if (!marked && sfrom == null)
1625 for (var i = 0, e = st.length; i < e; i+=2) span(st[i], st[i+1]);
1995 for (var i = 0, ch = 0; ch < len; i+=2) {
1996 var str = st[i], style = st[i+1], l = str.length;
1997 if (ch + l > len) str = str.slice(0, len - ch);
1998 ch += l;
1999 span(str, style && "cm-" + style);
2000 }
1626 else {
2001 else {
1627 var pos = 0, i = 0, text = "", style, sg = 0;
2002 var pos = 0, i = 0, text = "", style, sg = 0;
1628 var markpos = -1, mark = null;
2003 var markpos = -1, mark = null;
@@ -1632,9 +2007,9 b' var CodeMirror = (function() {'
1632 mark = (markpos < marked.length) ? marked[markpos] : null;
2007 mark = (markpos < marked.length) ? marked[markpos] : null;
1633 }
2008 }
1634 }
2009 }
1635 nextMark();
2010 nextMark();
1636 while (pos < allText.length) {
2011 while (pos < len) {
1637 var upto = allText.length;
2012 var upto = len;
1638 var extraStyle = "";
2013 var extraStyle = "";
1639 if (sfrom != null) {
2014 if (sfrom != null) {
1640 if (sfrom > pos) upto = sfrom;
2015 if (sfrom > pos) upto = sfrom;
@@ -1653,12 +2028,12 b' var CodeMirror = (function() {'
1653 }
2028 }
1654 for (;;) {
2029 for (;;) {
1655 var end = pos + text.length;
2030 var end = pos + text.length;
1656 var apliedStyle = style;
2031 var appliedStyle = style;
1657 if (extraStyle) apliedStyle = style ? style + extraStyle : extraStyle;
2032 if (extraStyle) appliedStyle = style ? style + extraStyle : extraStyle;
1658 span(end > upto ? text.slice(0, upto - pos) : text, apliedStyle);
2033 span(end > upto ? text.slice(0, upto - pos) : text, appliedStyle);
1659 if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}
2034 if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;}
1660 pos = end;
2035 pos = end;
1661 text = st[i++]; style = st[i++];
2036 text = st[i++]; style = "cm-" + st[i++];
1662 }
2037 }
1663 }
2038 }
1664 if (sfrom != null && sto == null) span(" ", "CodeMirror-selected");
2039 if (sfrom != null && sto == null) span(" ", "CodeMirror-selected");
@@ -1716,42 +2091,34 b' var CodeMirror = (function() {'
1716 }
2091 }
1717 };
2092 };
1718
2093
1719 // Event stopping compatibility wrapper.
2094 function stopMethod() {e_stop(this);}
1720 function stopEvent() {
1721 if (this.preventDefault) {this.preventDefault(); this.stopPropagation();}
1722 else {this.returnValue = false; this.cancelBubble = true;}
1723 }
1724 // Ensure an event has a stop method.
2095 // Ensure an event has a stop method.
1725 function addStop(event) {
2096 function addStop(event) {
1726 if (!event.stop) event.stop = stopEvent;
2097 if (!event.stop) event.stop = stopMethod;
1727 return event;
2098 return event;
1728 }
2099 }
1729
2100
1730 // Event wrapper, exposing the few operations we need.
2101 function e_preventDefault(e) {
1731 function Event(orig) {this.e = orig;}
2102 if (e.preventDefault) e.preventDefault();
1732 Event.prototype = {
2103 else e.returnValue = false;
1733 stop: function() {stopEvent.call(this.e);},
2104 }
1734 target: function() {return this.e.target || this.e.srcElement;},
2105 function e_stopPropagation(e) {
1735 button: function() {
2106 if (e.stopPropagation) e.stopPropagation();
1736 if (this.e.which) return this.e.which;
2107 else e.cancelBubble = true;
1737 else if (this.e.button & 1) return 1;
2108 }
1738 else if (this.e.button & 2) return 3;
2109 function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}
1739 else if (this.e.button & 4) return 2;
2110 function e_target(e) {return e.target || e.srcElement;}
1740 },
2111 function e_button(e) {
1741 pageX: function() {
2112 if (e.which) return e.which;
1742 if (this.e.pageX != null) return this.e.pageX;
2113 else if (e.button & 1) return 1;
1743 else return this.e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
2114 else if (e.button & 2) return 3;
1744 },
2115 else if (e.button & 4) return 2;
1745 pageY: function() {
2116 }
1746 if (this.e.pageY != null) return this.e.pageY;
1747 else return this.e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
1748 }
1749 };
1750
2117
1751 // Event handler registration. If disconnect is true, it'll return a
2118 // Event handler registration. If disconnect is true, it'll return a
1752 // function that unregisters the handler.
2119 // function that unregisters the handler.
1753 function connect(node, type, handler, disconnect) {
2120 function connect(node, type, handler, disconnect) {
1754 function wrapHandler(event) {handler(new Event(event || window.event));}
2121 function wrapHandler(event) {handler(event || window.event);}
1755 if (typeof node.addEventListener == "function") {
2122 if (typeof node.addEventListener == "function") {
1756 node.addEventListener(type, wrapHandler, false);
2123 node.addEventListener(type, wrapHandler, false);
1757 if (disconnect) return function() {node.removeEventListener(type, wrapHandler, false);};
2124 if (disconnect) return function() {node.removeEventListener(type, wrapHandler, false);};
@@ -1772,7 +2139,18 b' var CodeMirror = (function() {'
1772 pre.innerHTML = " "; return !pre.innerHTML;
2139 pre.innerHTML = " "; return !pre.innerHTML;
1773 })();
2140 })();
1774
2141
2142 // Detect drag-and-drop
2143 var dragAndDrop = (function() {
2144 // IE8 has ondragstart and ondrop properties, but doesn't seem to
2145 // actually support ondragstart the way it's supposed to work.
2146 if (/MSIE [1-8]\b/.test(navigator.userAgent)) return false;
2147 var div = document.createElement('div');
2148 return "ondragstart" in div && "ondrop" in div;
2149 })();
2150
1775 var gecko = /gecko\/\d{7}/i.test(navigator.userAgent);
2151 var gecko = /gecko\/\d{7}/i.test(navigator.userAgent);
2152 var ie = /MSIE \d/.test(navigator.userAgent);
2153 var safari = /Apple Computer/.test(navigator.vendor);
1776
2154
1777 var lineSep = "\n";
2155 var lineSep = "\n";
1778 // Feature-detect whether newlines in textareas are converted to \r\n
2156 // Feature-detect whether newlines in textareas are converted to \r\n
@@ -1802,11 +2180,23 b' var CodeMirror = (function() {'
1802 return n;
2180 return n;
1803 }
2181 }
1804
2182
2183 function computedStyle(elt) {
2184 if (elt.currentStyle) return elt.currentStyle;
2185 return window.getComputedStyle(elt, null);
2186 }
1805 // Find the position of an element by following the offsetParent chain.
2187 // Find the position of an element by following the offsetParent chain.
1806 function eltOffset(node) {
2188 // If screen==true, it returns screen (rather than page) coordinates.
1807 var x = 0, y = 0, n2 = node;
2189 function eltOffset(node, screen) {
1808 for (var n = node; n; n = n.offsetParent) {x += n.offsetLeft; y += n.offsetTop;}
2190 var doc = node.ownerDocument.body;
1809 for (var n = node; n != document.body; n = n.parentNode) {x -= n.scrollLeft; y -= n.scrollTop;}
2191 var x = 0, y = 0, skipDoc = false;
2192 for (var n = node; n; n = n.offsetParent) {
2193 x += n.offsetLeft; y += n.offsetTop;
2194 if (screen && computedStyle(n).position == "fixed")
2195 skipDoc = true;
2196 }
2197 var e = screen && !skipDoc ? null : doc;
2198 for (var n = node.parentNode; n != e; n = n.parentNode)
2199 if (n.scrollLeft != null) { x -= n.scrollLeft; y -= n.scrollTop;}
1810 return {left: x, top: y};
2200 return {left: x, top: y};
1811 }
2201 }
1812 // Get a node's text content.
2202 // Get a node's text content.
@@ -1819,9 +2209,18 b' var CodeMirror = (function() {'
1819 function posLess(a, b) {return a.line < b.line || (a.line == b.line && a.ch < b.ch);}
2209 function posLess(a, b) {return a.line < b.line || (a.line == b.line && a.ch < b.ch);}
1820 function copyPos(x) {return {line: x.line, ch: x.ch};}
2210 function copyPos(x) {return {line: x.line, ch: x.ch};}
1821
2211
2212 var escapeElement = document.createElement("pre");
1822 function htmlEscape(str) {
2213 function htmlEscape(str) {
1823 return str.replace(/[<&]/g, function(str) {return str == "&" ? "&amp;" : "&lt;";});
2214 if (badTextContent) {
2215 escapeElement.innerHTML = "";
2216 escapeElement.appendChild(document.createTextNode(str));
2217 } else {
2218 escapeElement.textContent = str;
2219 }
2220 return escapeElement.innerHTML;
1824 }
2221 }
2222 var badTextContent = htmlEscape("\t") != "\t";
2223 CodeMirror.htmlEscape = htmlEscape;
1825
2224
1826 // Used to position the cursor after an undo/redo by finding the
2225 // Used to position the cursor after an undo/redo by finding the
1827 // last edited character.
2226 // last edited character.
@@ -1842,8 +2241,9 b' var CodeMirror = (function() {'
1842
2241
1843 // See if "".split is the broken IE version, if so, provide an
2242 // See if "".split is the broken IE version, if so, provide an
1844 // alternative way to split lines.
2243 // alternative way to split lines.
2244 var splitLines, selRange, setSelRange;
1845 if ("\n\nb".split(/\n/).length != 3)
2245 if ("\n\nb".split(/\n/).length != 3)
1846 var splitLines = function(string) {
2246 splitLines = function(string) {
1847 var pos = 0, nl, result = [];
2247 var pos = 0, nl, result = [];
1848 while ((nl = string.indexOf("\n", pos)) > -1) {
2248 while ((nl = string.indexOf("\n", pos)) > -1) {
1849 result.push(string.slice(pos, string.charAt(nl-1) == "\r" ? nl - 1 : nl));
2249 result.push(string.slice(pos, string.charAt(nl-1) == "\r" ? nl - 1 : nl));
@@ -1853,23 +2253,40 b' var CodeMirror = (function() {'
1853 return result;
2253 return result;
1854 };
2254 };
1855 else
2255 else
1856 var splitLines = function(string){return string.split(/\r?\n/);};
2256 splitLines = function(string){return string.split(/\r?\n/);};
2257 CodeMirror.splitLines = splitLines;
1857
2258
1858 // Sane model of finding and setting the selection in a textarea
2259 // Sane model of finding and setting the selection in a textarea
1859 if (window.getSelection) {
2260 if (window.getSelection) {
1860 var selRange = function(te) {
2261 selRange = function(te) {
1861 try {return {start: te.selectionStart, end: te.selectionEnd};}
2262 try {return {start: te.selectionStart, end: te.selectionEnd};}
1862 catch(e) {return null;}
2263 catch(e) {return null;}
1863 };
2264 };
1864 var setSelRange = function(te, start, end) {
2265 if (safari)
1865 try {te.setSelectionRange(start, end);}
2266 // On Safari, selection set with setSelectionRange are in a sort
1866 catch(e) {} // Fails on Firefox when textarea isn't part of the document
2267 // of limbo wrt their anchor. If you press shift-left in them,
1867 };
2268 // the anchor is put at the end, and the selection expanded to
2269 // the left. If you press shift-right, the anchor ends up at the
2270 // front. This is not what CodeMirror wants, so it does a
2271 // spurious modify() call to get out of limbo.
2272 setSelRange = function(te, start, end) {
2273 if (start == end)
2274 te.setSelectionRange(start, end);
2275 else {
2276 te.setSelectionRange(start, end - 1);
2277 window.getSelection().modify("extend", "forward", "character");
2278 }
2279 };
2280 else
2281 setSelRange = function(te, start, end) {
2282 try {te.setSelectionRange(start, end);}
2283 catch(e) {} // Fails on Firefox when textarea isn't part of the document
2284 };
1868 }
2285 }
1869 // IE model. Don't ask.
2286 // IE model. Don't ask.
1870 else {
2287 else {
1871 var selRange = function(te) {
2288 selRange = function(te) {
1872 try {var range = document.selection.createRange();}
2289 try {var range = te.ownerDocument.selection.createRange();}
1873 catch(e) {return null;}
2290 catch(e) {return null;}
1874 if (!range || range.parentElement() != te) return null;
2291 if (!range || range.parentElement() != te) return null;
1875 var val = te.value, len = val.length, localRange = te.createTextRange();
2292 var val = te.value, len = val.length, localRange = te.createTextRange();
@@ -1890,7 +2307,7 b' var CodeMirror = (function() {'
1890 for (var i = val.indexOf("\r"); i > -1 && i < end; i = val.indexOf("\r", i+1), end++) {}
2307 for (var i = val.indexOf("\r"); i > -1 && i < end; i = val.indexOf("\r", i+1), end++) {}
1891 return {start: start, end: end};
2308 return {start: start, end: end};
1892 };
2309 };
1893 var setSelRange = function(te, start, end) {
2310 setSelRange = function(te, start, end) {
1894 var range = te.createTextRange();
2311 var range = te.createTextRange();
1895 range.collapse(true);
2312 range.collapse(true);
1896 var endrange = range.duplicate();
2313 var endrange = range.duplicate();
@@ -1,4 +1,4 b''
1 <table id="permissions_manage">
1 <table id="permissions_manage" class="noborder">
2 <tr>
2 <tr>
3 <td>${_('none')}</td>
3 <td>${_('none')}</td>
4 <td>${_('read')}</td>
4 <td>${_('read')}</td>
@@ -149,60 +149,6 b''
149 <a href="#">${_('loading...')}</a>
149 <a href="#">${_('loading...')}</a>
150 </li>
150 </li>
151 </ul>
151 </ul>
152 <script type="text/javascript">
153 YUE.on('repo_switcher','mouseover',function(){
154 function qfilter(){
155 var S = YAHOO.util.Selector;
156
157 var q_filter = YUD.get('q_filter_rs');
158 var F = YAHOO.namespace('q_filter_rs');
159
160 YUE.on(q_filter,'click',function(){
161 q_filter.value = '';
162 });
163
164 F.filterTimeout = null;
165
166 F.updateFilter = function() {
167 // Reset timeout
168 F.filterTimeout = null;
169
170 var obsolete = [];
171 var nodes = S.query('ul#repo_switcher_list li a.repo_name');
172 var req = YUD.get('q_filter_rs').value;
173 for (n in nodes){
174 YUD.setStyle(nodes[n].parentNode,'display','')
175 }
176 if (req){
177 for (n in nodes){
178 if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) {
179 obsolete.push(nodes[n]);
180 }
181 }
182 if(obsolete){
183 for (n in obsolete){
184 YUD.setStyle(obsolete[n].parentNode,'display','none');
185 }
186 }
187 }
188 }
189
190 YUE.on(q_filter,'keyup',function(e){
191 clearTimeout(F.filterTimeout);
192 F.filterTimeout = setTimeout(F.updateFilter,600);
193 });
194 }
195 var loaded = YUD.hasClass('repo_switcher','loaded');
196 if(!loaded){
197 YUD.addClass('repo_switcher','loaded');
198 ypjax("${h.url('repo_switcher')}",'repo_switcher_list',
199 function(o){qfilter();},
200 function(o){YUD.removeClass('repo_switcher','loaded');}
201 ,null);
202 }
203 return false;
204 });
205 </script>
206 </li>
152 </li>
207
153
208 <li ${is_current('summary')}>
154 <li ${is_current('summary')}>
@@ -231,38 +177,15 b''
231 </li>
177 </li>
232
178
233 <li ${is_current('switch_to')}>
179 <li ${is_current('switch_to')}>
234 <a title="${_('Switch to')}" href="#">
180 <a id="branch_tag_switcher" title="${_('Switch to')}" href="#">
235 <span class="icon">
181 <span class="icon">
236 <img src="${h.url('/images/icons/arrow_switch.png')}" alt="${_('Switch to')}" />
182 <img src="${h.url('/images/icons/arrow_switch.png')}" alt="${_('Switch to')}" />
237 </span>
183 </span>
238 <span>${_('Switch to')}</span>
184 <span>${_('Switch to')}</span>
239 </a>
185 </a>
240 <ul>
186 <ul id="switch_to_list" class="switch_to">
241 <li>
187 <li><a href="#">${_('loading...')}</a></li>
242 ${h.link_to('%s (%s)' % (_('branches'),len(c.rhodecode_repo.branches.values()),),h.url('branches_home',repo_name=c.repo_name),class_='branches childs')}
188 </ul>
243 <ul>
244 %if c.rhodecode_repo.branches.values():
245 %for cnt,branch in enumerate(c.rhodecode_repo.branches.items()):
246 <li>${h.link_to('%s - %s' % (branch[0],h.short_id(branch[1])),h.url('files_home',repo_name=c.repo_name,revision=branch[1]))}</li>
247 %endfor
248 %else:
249 <li>${h.link_to(_('There are no branches yet'),'#')}</li>
250 %endif
251 </ul>
252 </li>
253 <li>
254 ${h.link_to('%s (%s)' % (_('tags'),len(c.rhodecode_repo.tags.values()),),h.url('tags_home',repo_name=c.repo_name),class_='tags childs')}
255 <ul>
256 %if c.rhodecode_repo.tags.values():
257 %for cnt,tag in enumerate(c.rhodecode_repo.tags.items()):
258 <li>${h.link_to('%s - %s' % (tag[0],h.short_id(tag[1])),h.url('files_home',repo_name=c.repo_name,revision=tag[1]))}</li>
259 %endfor
260 %else:
261 <li>${h.link_to(_('There are no tags yet'),'#')}</li>
262 %endif
263 </ul>
264 </li>
265 </ul>
266 </li>
189 </li>
267 <li ${is_current('files')}>
190 <li ${is_current('files')}>
268 <a title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}">
191 <a title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}">
@@ -329,8 +252,73 b''
329 <span class="short">${c.repository_forks}</span>
252 <span class="short">${c.repository_forks}</span>
330 </a>
253 </a>
331 </li>
254 </li>
332
333 </ul>
255 </ul>
256 <script type="text/javascript">
257 YUE.on('repo_switcher','mouseover',function(){
258 function qfilter(){
259 var S = YAHOO.util.Selector;
260
261 var q_filter = YUD.get('q_filter_rs');
262 var F = YAHOO.namespace('q_filter_rs');
263
264 YUE.on(q_filter,'click',function(){
265 q_filter.value = '';
266 });
267
268 F.filterTimeout = null;
269
270 F.updateFilter = function() {
271 // Reset timeout
272 F.filterTimeout = null;
273
274 var obsolete = [];
275 var nodes = S.query('ul#repo_switcher_list li a.repo_name');
276 var req = YUD.get('q_filter_rs').value.toLowerCase();
277 for (n in nodes){
278 YUD.setStyle(nodes[n].parentNode,'display','')
279 }
280 if (req){
281 for (n in nodes){
282 if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) {
283 obsolete.push(nodes[n]);
284 }
285 }
286 if(obsolete){
287 for (n in obsolete){
288 YUD.setStyle(obsolete[n].parentNode,'display','none');
289 }
290 }
291 }
292 }
293
294 YUE.on(q_filter,'keyup',function(e){
295 clearTimeout(F.filterTimeout);
296 F.filterTimeout = setTimeout(F.updateFilter,600);
297 });
298 }
299 var loaded = YUD.hasClass('repo_switcher','loaded');
300 if(!loaded){
301 YUD.addClass('repo_switcher','loaded');
302 ypjax("${h.url('repo_switcher')}",'repo_switcher_list',
303 function(o){qfilter();},
304 function(o){YUD.removeClass('repo_switcher','loaded');}
305 ,null);
306 }
307 return false;
308 });
309
310 YUE.on('branch_tag_switcher','mouseover',function(){
311 var loaded = YUD.hasClass('branch_tag_switcher','loaded');
312 if(!loaded){
313 YUD.addClass('branch_tag_switcher','loaded');
314 ypjax("${h.url('branch_tag_switcher',repo_name=c.repo_name)}",'switch_to_list',
315 function(o){},
316 function(o){YUD.removeClass('branch_tag_switcher','loaded');}
317 ,null);
318 }
319 return false;
320 });
321 </script>
334 %else:
322 %else:
335 ##ROOT MENU
323 ##ROOT MENU
336 <ul id="quick">
324 <ul id="quick">
@@ -373,5 +361,5 b''
373 </li>
361 </li>
374 %endif
362 %endif
375 </ul>
363 </ul>
376 %endif
364 %endif
377 </%def>
365 </%def>
@@ -129,10 +129,16 b''
129 YUD.addClass(menu,'hidden');
129 YUD.addClass(menu,'hidden');
130 }
130 }
131 })
131 })
132
132 YUE.on(window,'scroll',function(){
133 if(YUD.getDocumentScrollTop() > 45){
134 YUD.addClass('header-inner','hover');
135 }
136 else{
137 YUD.removeClass('header-inner','hover');
138 }
139 })
133 })
140 })
134 </script>
141 </script>
135
136 </%def>
142 </%def>
137 <%def name="js_extra()">
143 <%def name="js_extra()">
138 </%def>
144 </%def>
@@ -37,7 +37,7 b''
37 </div>
37 </div>
38 <div id="changeset_compare_view_content">
38 <div id="changeset_compare_view_content">
39 <div class="container">
39 <div class="container">
40 <table class="compare_view_commits">
40 <table class="compare_view_commits noborder">
41 %for cs in c.cs_ranges:
41 %for cs in c.cs_ranges:
42 <tr>
42 <tr>
43 <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email(cs.author),14)}"/></div></td>
43 <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email(cs.author),14)}"/></div></td>
@@ -39,36 +39,35 b''
39 ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data")}
39 ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data")}
40 <h3>${_('Add new file')}</h3>
40 <h3>${_('Add new file')}</h3>
41 <div class="form">
41 <div class="form">
42 <div class="fields">
42 <div class="fields">
43 <div class="field">
43 <div id="filename_container" class="field file">
44 <div class="label">
44 <div class="label">
45 <label for="location">${_('Location')}</label>
45 <label for="filename">${_('File Name')}:</label>
46 </div>
46 </div>
47 <div class="input">
47 <div class="input">
48 <input type="text" value="${c.f_path}" size="30" name="location" id="location">
48 <input type="text" value="" size="30" name="filename" id="filename">
49 ${_('use / to separate directories')}
49 <input type="button" class="ui-button-small" value="upload file" id="upload_file_enable">
50 </div>
50 </div>
51 </div>
51 </div>
52
52 <div id="upload_file_container" class="field" style="display:none">
53 <div id="filename_container" class="field file">
53 <div class="label">
54 <div class="label">
54 <label for="location">${_('Upload file')}</label>
55 <label for="filename">${_('File Name')}:</label>
56 </div>
57 <div class="input">
58 <input type="text" value="" size="30" name="filename" id="filename">
59 <input type="button" class="ui-button-small" value="upload file" id="upload_file_enable">
60 </div>
61 </div>
62 <div id="upload_file_container" class="field" style="display:none">
63 <div class="label">
64 <label for="location">${_('Upload file')}</label>
65 </div>
66 <div class="file">
67 <input type="file" size="30" name="upload_file" id="upload_file">
68 <input type="button" class="ui-button-small" value="create file" id="file_enable">
69 </div>
70 </div>
71 </div>
55 </div>
56 <div class="file">
57 <input type="file" size="30" name="upload_file" id="upload_file">
58 <input type="button" class="ui-button-small" value="create file" id="file_enable">
59 </div>
60 </div>
61 <div class="field">
62 <div class="label">
63 <label for="location">${_('Location')}</label>
64 </div>
65 <div class="input">
66 <input type="text" value="${c.f_path}" size="30" name="location" id="location">
67 ${_('use / to separate directories')}
68 </div>
69 </div>
70 </div>
72 </div>
71 </div>
73 <div id="body" class="codeblock">
72 <div id="body" class="codeblock">
74 <div id="editor_container">
73 <div id="editor_container">
@@ -1,27 +1,26 b''
1 ##path search
1 ##path search
2 <div class="search">
2
3 %for cnt,sr in enumerate(c.formated_results):
3 %for cnt,sr in enumerate(c.formated_results):
4 %if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(sr['repository'],'search results check'):
4 %if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(sr['repository'],'search results check'):
5 <div class="search_path">
5 <div class="search_path">
6 <div class="link">
7 ${h.link_to(h.literal('%s &raquo; %s' % (sr['repository'],sr['f_path'])),
8 h.url('files_home',repo_name=sr['repository'],revision='tip',f_path=sr['f_path']))}
9 </div>
10 </div>
11 %else:
12 %if cnt == 0:
13 <div class="error">
6 <div class="link">
14 <div class="link">
7 ${h.link_to(h.literal('%s &raquo; %s' % (sr['repository'],sr['f_path'])),
15 ${_('Permission denied')}
8 h.url('files_home',repo_name=sr['repository'],revision='tip',f_path=sr['f_path']))}
9 </div>
16 </div>
10 </div>
17 </div>
11 %else:
18 %endif
12 %if cnt == 0:
19
13 <div class="error">
20 %endif
14 <div class="link">
21 %endfor
15 ${_('Permission denied')}
22 %if c.cur_query and c.formated_results:
16 </div>
23 <div class="pagination-wh pagination-left">
17 </div>
24 ${c.formated_results.pager('$link_previous ~2~ $link_next')}
18 %endif
25 </div>
19
26 %endif
20 %endif
21 %endfor
22 %if c.cur_query and c.formated_results:
23 <div class="pagination-wh pagination-left">
24 ${c.formated_results.pager('$link_previous ~2~ $link_next')}
25 </div>
26 %endif
27 </div> No newline at end of file
This diff has been collapsed as it changes many lines, (940 lines changed) Show them Hide them
@@ -64,29 +64,22 b''
64 ##FORK
64 ##FORK
65 %if c.dbrepo.fork:
65 %if c.dbrepo.fork:
66 <div style="margin-top:5px;clear:both"">
66 <div style="margin-top:5px;clear:both"">
67 <a href="${h.url('summary_home',repo_name=c.dbrepo.fork.repo_name)}">
67 <a href="${h.url('summary_home',repo_name=c.dbrepo.fork.repo_name)}"><img class="icon" alt="${_('public')}" title="${_('Fork of')} ${c.dbrepo.fork.repo_name}" src="${h.url('/images/icons/arrow_divide.png')}"/>
68 <img class="icon" alt="${_('public')}"
68 ${_('Fork of')} ${c.dbrepo.fork.repo_name}
69 title="${_('Fork of')} ${c.dbrepo.fork.repo_name}"
70 src="${h.url('/images/icons/arrow_divide.png')}"/>
71 ${_('Fork of')} ${c.dbrepo.fork.repo_name}
72 </a>
69 </a>
73 </div>
70 </div>
74 %endif
71 %endif
75 ##REMOTE
72 ##REMOTE
76 %if c.dbrepo.clone_uri:
73 %if c.dbrepo.clone_uri:
77 <div style="margin-top:5px;clear:both">
74 <div style="margin-top:5px;clear:both">
78 <a href="${h.url(str(h.hide_credentials(c.dbrepo.clone_uri)))}">
75 <a href="${h.url(str(h.hide_credentials(c.dbrepo.clone_uri)))}"><img class="icon" alt="${_('remote clone')}" title="${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)}" src="${h.url('/images/icons/connect.png')}"/>
79 <img class="icon" alt="${_('remote clone')}"
76 ${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)}
80 title="${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)}"
81 src="${h.url('/images/icons/connect.png')}"/>
82 ${_('Clone from')} ${h.hide_credentials(c.dbrepo.clone_uri)}
83 </a>
77 </a>
84 </div>
78 </div>
85 %endif
79 %endif
86 </div>
80 </div>
87 </div>
81 </div>
88
82
89
90 <div class="field">
83 <div class="field">
91 <div class="label">
84 <div class="label">
92 <label>${_('Description')}:</label>
85 <label>${_('Description')}:</label>
@@ -94,7 +87,6 b''
94 <div class="input-short desc">${h.urlify_text(c.dbrepo.description)}</div>
87 <div class="input-short desc">${h.urlify_text(c.dbrepo.description)}</div>
95 </div>
88 </div>
96
89
97
98 <div class="field">
90 <div class="field">
99 <div class="label">
91 <div class="label">
100 <label>${_('Contact')}:</label>
92 <label>${_('Contact')}:</label>
@@ -119,7 +111,6 b''
119 <span class="tooltip" title="${c.rhodecode_repo.last_change}">
111 <span class="tooltip" title="${c.rhodecode_repo.last_change}">
120 ${h.age(c.rhodecode_repo.last_change)}</span><br/>
112 ${h.age(c.rhodecode_repo.last_change)}</span><br/>
121 ${_('by')} ${h.get_changeset_safe(c.rhodecode_repo,'tip').author}
113 ${_('by')} ${h.get_changeset_safe(c.rhodecode_repo,'tip').author}
122
123 </div>
114 </div>
124 </div>
115 </div>
125
116
@@ -187,123 +178,6 b''
187 </div>
178 </div>
188 </div>
179 </div>
189 </div>
180 </div>
190 <script type="text/javascript">
191 YUE.onDOMReady(function(e){
192 id = 'clone_url';
193 YUE.on(id,'click',function(e){
194 if(YUD.hasClass(id,'selected')){
195 return
196 }
197 else{
198 YUD.addClass(id,'selected');
199 YUD.get(id).select();
200 }
201
202 })
203 })
204 var data = ${c.trending_languages|n};
205 var total = 0;
206 var no_data = true;
207 for (k in data){
208 total += data[k].count;
209 no_data = false;
210 }
211 var tbl = document.createElement('table');
212 tbl.setAttribute('class','trending_language_tbl');
213 var cnt = 0;
214 for (k in data){
215 cnt += 1;
216 var hide = cnt>2;
217 var tr = document.createElement('tr');
218 if (hide){
219 tr.setAttribute('style','display:none');
220 tr.setAttribute('class','stats_hidden');
221 }
222 var percentage = Math.round((data[k].count/total*100),2);
223 var value = data[k].count;
224 var td1 = document.createElement('td');
225 td1.width = 150;
226 var trending_language_label = document.createElement('div');
227 trending_language_label.innerHTML = data[k].desc+" ("+k+")";
228 td1.appendChild(trending_language_label);
229
230 var td2 = document.createElement('td');
231 td2.setAttribute('style','padding-right:14px !important');
232 var trending_language = document.createElement('div');
233 var nr_files = value+" ${_('files')}";
234
235 trending_language.title = k+" "+nr_files;
236
237 if (percentage>22){
238 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"% "+nr_files+ "</b>";
239 }
240 else{
241 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"%</b>";
242 }
243
244 trending_language.setAttribute("class", 'trending_language top-right-rounded-corner bottom-right-rounded-corner');
245 trending_language.style.width=percentage+"%";
246 td2.appendChild(trending_language);
247
248 tr.appendChild(td1);
249 tr.appendChild(td2);
250 tbl.appendChild(tr);
251 if(cnt == 3){
252 var show_more = document.createElement('tr');
253 var td = document.createElement('td');
254 lnk = document.createElement('a');
255
256 lnk.href='#';
257 lnk.innerHTML = "${_('show more')}";
258 lnk.id='code_stats_show_more';
259 td.appendChild(lnk);
260
261 show_more.appendChild(td);
262 show_more.appendChild(document.createElement('td'));
263 tbl.appendChild(show_more);
264 }
265
266 }
267 if(no_data){
268 var tr = document.createElement('tr');
269 var td1 = document.createElement('td');
270 td1.innerHTML = "${c.no_data_msg}";
271 tr.appendChild(td1);
272 tbl.appendChild(tr);
273 }
274 YUD.get('lang_stats').appendChild(tbl);
275 YUE.on('code_stats_show_more','click',function(){
276 l = YUD.getElementsByClassName('stats_hidden')
277 for (e in l){
278 YUD.setStyle(l[e],'display','');
279 };
280 YUD.setStyle(YUD.get('code_stats_show_more'),
281 'display','none');
282 })
283
284 var tmpl_links = {}
285 %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()):
286 tmpl_links['${archive['type']}'] = '${h.link_to(archive['type'],
287 h.url('files_archive_home',repo_name=c.dbrepo.repo_name,
288 fname='__CS__'+archive['extension'],subrepos='__SUB__'),class_="archive_icon")}';
289 %endfor
290
291 YUE.on(['download_options','archive_subrepos'],'change',function(e){
292 var sm = YUD.get('download_options');
293 var new_cs = sm.options[sm.selectedIndex];
294
295 for(k in tmpl_links){
296 var s = YUD.get(k+'_link');
297 title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__','__CS_EXT__')}";
298 s.title = title_tmpl.replace('__CS_NAME__',new_cs.text);
299 s.title = s.title.replace('__CS_EXT__',k);
300 var url = tmpl_links[k].replace('__CS__',new_cs.value);
301 var subrepos = YUD.get('archive_subrepos').checked
302 url = url.replace('__SUB__',subrepos);
303 s.innerHTML = url
304 }
305 });
306 </script>
307 </div>
181 </div>
308
182
309 <div class="box box-right" style="min-height:455px">
183 <div class="box box-right" style="min-height:455px">
@@ -319,7 +193,6 b''
319 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
193 %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
320 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-button-small")}
194 ${h.link_to(_('enable'),h.url('edit_repo',repo_name=c.repo_name),class_="ui-button-small")}
321 %endif
195 %endif
322
323 %else:
196 %else:
324 ${_('Loaded in')} ${c.stats_percentage} %
197 ${_('Loaded in')} ${c.stats_percentage} %
325 %endif
198 %endif
@@ -331,333 +204,9 b''
331 <div id="legend_data" style="clear:both;margin-top:10px;">
204 <div id="legend_data" style="clear:both;margin-top:10px;">
332 <div id="legend_container"></div>
205 <div id="legend_container"></div>
333 <div id="legend_choices">
206 <div id="legend_choices">
334 <table id="legend_choices_tables" style="font-size:smaller;color:#545454"></table>
207 <table id="legend_choices_tables" class="noborder" style="font-size:smaller;color:#545454"></table>
335 </div>
208 </div>
336 </div>
209 </div>
337 <script type="text/javascript">
338 /**
339 * Plots summary graph
340 *
341 * @class SummaryPlot
342 * @param {from} initial from for detailed graph
343 * @param {to} initial to for detailed graph
344 * @param {dataset}
345 * @param {overview_dataset}
346 */
347 function SummaryPlot(from,to,dataset,overview_dataset) {
348 var initial_ranges = {
349 "xaxis":{
350 "from":from,
351 "to":to,
352 },
353 };
354 var dataset = dataset;
355 var overview_dataset = [overview_dataset];
356 var choiceContainer = YUD.get("legend_choices");
357 var choiceContainerTable = YUD.get("legend_choices_tables");
358 var plotContainer = YUD.get('commit_history');
359 var overviewContainer = YUD.get('overview');
360
361 var plot_options = {
362 bars: {show:true,align:'center',lineWidth:4},
363 legend: {show:true, container:"legend_container"},
364 points: {show:true,radius:0,fill:false},
365 yaxis: {tickDecimals:0,},
366 xaxis: {
367 mode: "time",
368 timeformat: "%d/%m",
369 min:from,
370 max:to,
371 },
372 grid: {
373 hoverable: true,
374 clickable: true,
375 autoHighlight:true,
376 color: "#999"
377 },
378 //selection: {mode: "x"}
379 };
380 var overview_options = {
381 legend:{show:false},
382 bars: {show:true,barWidth: 2,},
383 shadowSize: 0,
384 xaxis: {mode: "time", timeformat: "%d/%m/%y",},
385 yaxis: {ticks: 3, min: 0,tickDecimals:0,},
386 grid: {color: "#999",},
387 selection: {mode: "x"}
388 };
389
390 /**
391 *get dummy data needed in few places
392 */
393 function getDummyData(label){
394 return {"label":label,
395 "data":[{"time":0,
396 "commits":0,
397 "added":0,
398 "changed":0,
399 "removed":0,
400 }],
401 "schema":["commits"],
402 "color":'#ffffff',
403 }
404 }
405
406 /**
407 * generate checkboxes accordindly to data
408 * @param keys
409 * @returns
410 */
411 function generateCheckboxes(data) {
412 //append checkboxes
413 var i = 0;
414 choiceContainerTable.innerHTML = '';
415 for(var pos in data) {
416
417 data[pos].color = i;
418 i++;
419 if(data[pos].label != ''){
420 choiceContainerTable.innerHTML += '<tr><td>'+
421 '<input type="checkbox" name="' + data[pos].label +'" checked="checked" />'
422 +data[pos].label+
423 '</td></tr>';
424 }
425 }
426 }
427
428 /**
429 * ToolTip show
430 */
431 function showTooltip(x, y, contents) {
432 var div=document.getElementById('tooltip');
433 if(!div) {
434 div = document.createElement('div');
435 div.id="tooltip";
436 div.style.position="absolute";
437 div.style.border='1px solid #fdd';
438 div.style.padding='2px';
439 div.style.backgroundColor='#fee';
440 document.body.appendChild(div);
441 }
442 YUD.setStyle(div, 'opacity', 0);
443 div.innerHTML = contents;
444 div.style.top=(y + 5) + "px";
445 div.style.left=(x + 5) + "px";
446
447 var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2);
448 anim.animate();
449 }
450
451 /**
452 * This function will detect if selected period has some changesets
453 for this user if it does this data is then pushed for displaying
454 Additionally it will only display users that are selected by the checkbox
455 */
456 function getDataAccordingToRanges(ranges) {
457
458 var data = [];
459 var new_dataset = {};
460 var keys = [];
461 var max_commits = 0;
462 for(var key in dataset){
463
464 for(var ds in dataset[key].data){
465 commit_data = dataset[key].data[ds];
466 if (commit_data.time >= ranges.xaxis.from && commit_data.time <= ranges.xaxis.to){
467
468 if(new_dataset[key] === undefined){
469 new_dataset[key] = {data:[],schema:["commits"],label:key};
470 }
471 new_dataset[key].data.push(commit_data);
472 }
473 }
474 if (new_dataset[key] !== undefined){
475 data.push(new_dataset[key]);
476 }
477 }
478
479 if (data.length > 0){
480 return data;
481 }
482 else{
483 //just return dummy data for graph to plot itself
484 return [getDummyData('')];
485 }
486 }
487
488 /**
489 * redraw using new checkbox data
490 */
491 function plotchoiced(e,args){
492 var cur_data = args[0];
493 var cur_ranges = args[1];
494
495 var new_data = [];
496 var inputs = choiceContainer.getElementsByTagName("input");
497
498 //show only checked labels
499 for(var i=0; i<inputs.length; i++) {
500 var checkbox_key = inputs[i].name;
501
502 if(inputs[i].checked){
503 for(var d in cur_data){
504 if(cur_data[d].label == checkbox_key){
505 new_data.push(cur_data[d]);
506 }
507 }
508 }
509 else{
510 //push dummy data to not hide the label
511 new_data.push(getDummyData(checkbox_key));
512 }
513 }
514
515 var new_options = YAHOO.lang.merge(plot_options, {
516 xaxis: {
517 min: cur_ranges.xaxis.from,
518 max: cur_ranges.xaxis.to,
519 mode:"time",
520 timeformat: "%d/%m",
521 },
522 });
523 if (!new_data){
524 new_data = [[0,1]];
525 }
526 // do the zooming
527 plot = YAHOO.widget.Flot(plotContainer, new_data, new_options);
528
529 plot.subscribe("plotselected", plotselected);
530
531 //resubscribe plothover
532 plot.subscribe("plothover", plothover);
533
534 // don't fire event on the overview to prevent eternal loop
535 overview.setSelection(cur_ranges, true);
536
537 }
538
539 /**
540 * plot only selected items from overview
541 * @param ranges
542 * @returns
543 */
544 function plotselected(ranges,cur_data) {
545 //updates the data for new plot
546 var data = getDataAccordingToRanges(ranges);
547 generateCheckboxes(data);
548
549 var new_options = YAHOO.lang.merge(plot_options, {
550 xaxis: {
551 min: ranges.xaxis.from,
552 max: ranges.xaxis.to,
553 mode:"time",
554 timeformat: "%d/%m",
555 },
556 });
557 // do the zooming
558 plot = YAHOO.widget.Flot(plotContainer, data, new_options);
559
560 plot.subscribe("plotselected", plotselected);
561
562 //resubscribe plothover
563 plot.subscribe("plothover", plothover);
564
565 // don't fire event on the overview to prevent eternal loop
566 overview.setSelection(ranges, true);
567
568 //resubscribe choiced
569 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, ranges]);
570 }
571
572 var previousPoint = null;
573
574 function plothover(o) {
575 var pos = o.pos;
576 var item = o.item;
577
578 //YUD.get("x").innerHTML = pos.x.toFixed(2);
579 //YUD.get("y").innerHTML = pos.y.toFixed(2);
580 if (item) {
581 if (previousPoint != item.datapoint) {
582 previousPoint = item.datapoint;
583
584 var tooltip = YUD.get("tooltip");
585 if(tooltip) {
586 tooltip.parentNode.removeChild(tooltip);
587 }
588 var x = item.datapoint.x.toFixed(2);
589 var y = item.datapoint.y.toFixed(2);
590
591 if (!item.series.label){
592 item.series.label = 'commits';
593 }
594 var d = new Date(x*1000);
595 var fd = d.toDateString()
596 var nr_commits = parseInt(y);
597
598 var cur_data = dataset[item.series.label].data[item.dataIndex];
599 var added = cur_data.added;
600 var changed = cur_data.changed;
601 var removed = cur_data.removed;
602
603 var nr_commits_suffix = " ${_('commits')} ";
604 var added_suffix = " ${_('files added')} ";
605 var changed_suffix = " ${_('files changed')} ";
606 var removed_suffix = " ${_('files removed')} ";
607
608
609 if(nr_commits == 1){nr_commits_suffix = " ${_('commit')} ";}
610 if(added==1){added_suffix=" ${_('file added')} ";}
611 if(changed==1){changed_suffix=" ${_('file changed')} ";}
612 if(removed==1){removed_suffix=" ${_('file removed')} ";}
613
614 showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd
615 +'<br/>'+
616 nr_commits + nr_commits_suffix+'<br/>'+
617 added + added_suffix +'<br/>'+
618 changed + changed_suffix + '<br/>'+
619 removed + removed_suffix + '<br/>');
620 }
621 }
622 else {
623 var tooltip = YUD.get("tooltip");
624
625 if(tooltip) {
626 tooltip.parentNode.removeChild(tooltip);
627 }
628 previousPoint = null;
629 }
630 }
631
632 /**
633 * MAIN EXECUTION
634 */
635
636 var data = getDataAccordingToRanges(initial_ranges);
637 generateCheckboxes(data);
638
639 //main plot
640 var plot = YAHOO.widget.Flot(plotContainer,data,plot_options);
641
642 //overview
643 var overview = YAHOO.widget.Flot(overviewContainer,
644 overview_dataset, overview_options);
645
646 //show initial selection on overview
647 overview.setSelection(initial_ranges);
648
649 plot.subscribe("plotselected", plotselected);
650 plot.subscribe("plothover", plothover)
651
652 overview.subscribe("plotselected", function (ranges) {
653 plot.setSelection(ranges);
654 });
655
656 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, initial_ranges]);
657 }
658 SummaryPlot(${c.ts_min},${c.ts_max},${c.commit_data|n},${c.overview_data|n});
659 </script>
660
661 </div>
210 </div>
662 </div>
211 </div>
663
212
@@ -669,32 +218,461 b''
669 <div id="shortlog_data">
218 <div id="shortlog_data">
670 <%include file='../shortlog/shortlog_data.html'/>
219 <%include file='../shortlog/shortlog_data.html'/>
671 </div>
220 </div>
672 ##%if c.repo_changesets:
221 </div>
673 ## ${h.link_to(_('show more'),h.url('changelog_home',repo_name=c.repo_name))}
222 </div>
674 ##%endif
223
224 %if c.readme_data:
225 <div class="box" style="background-color: #FAFAFA">
226 <div class="title">
227 <div class="breadcrumbs"><a href="${h.url('files_home',repo_name=c.repo_name,revision='tip',f_path=c.readme_file)}">${c.readme_file}</a></div>
228 </div>
229 <div class="readme">
230 <div class="readme_box">
231 ${c.readme_data|n}
232 </div>
675 </div>
233 </div>
676 </div>
234 </div>
677 <div class="box">
235 %endif
678 <div class="title">
236
679 <div class="breadcrumbs">${h.link_to(_('Tags'),h.url('tags_home',repo_name=c.repo_name))}</div>
237 <script type="text/javascript">
680 </div>
238 YUE.onDOMReady(function(e){
681 <div class="table">
239 id = 'clone_url';
682 <%include file='../tags/tags_data.html'/>
240 YUE.on(id,'click',function(e){
683 %if c.repo_changesets:
241 if(YUD.hasClass(id,'selected')){
684 ${h.link_to(_('show more'),h.url('tags_home',repo_name=c.repo_name))}
242 return
685 %endif
243 }
686 </div>
244 else{
687 </div>
245 YUD.addClass(id,'selected');
688 <div class="box">
246 YUD.get(id).select();
689 <div class="title">
247 }
690 <div class="breadcrumbs">${h.link_to(_('Branches'),h.url('branches_home',repo_name=c.repo_name))}</div>
248
691 </div>
249 })
692 <div class="table">
250 })
693 <%include file='../branches/branches_data.html'/>
251 var data = ${c.trending_languages|n};
694 %if c.repo_changesets:
252 var total = 0;
695 ${h.link_to(_('show more'),h.url('branches_home',repo_name=c.repo_name))}
253 var no_data = true;
696 %endif
254 for (k in data){
697 </div>
255 total += data[k].count;
698 </div>
256 no_data = false;
257 }
258 var tbl = document.createElement('table');
259 tbl.setAttribute('class','trending_language_tbl');
260 var cnt = 0;
261 for (k in data){
262 cnt += 1;
263 var hide = cnt>2;
264 var tr = document.createElement('tr');
265 if (hide){
266 tr.setAttribute('style','display:none');
267 tr.setAttribute('class','stats_hidden');
268 }
269 var percentage = Math.round((data[k].count/total*100),2);
270 var value = data[k].count;
271 var td1 = document.createElement('td');
272 td1.width = 150;
273 var trending_language_label = document.createElement('div');
274 trending_language_label.innerHTML = data[k].desc+" ("+k+")";
275 td1.appendChild(trending_language_label);
276
277 var td2 = document.createElement('td');
278 td2.setAttribute('style','padding-right:14px !important');
279 var trending_language = document.createElement('div');
280 var nr_files = value+" ${_('files')}";
281
282 trending_language.title = k+" "+nr_files;
283
284 if (percentage>22){
285 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"% "+nr_files+ "</b>";
286 }
287 else{
288 trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"%</b>";
289 }
290
291 trending_language.setAttribute("class", 'trending_language top-right-rounded-corner bottom-right-rounded-corner');
292 trending_language.style.width=percentage+"%";
293 td2.appendChild(trending_language);
294
295 tr.appendChild(td1);
296 tr.appendChild(td2);
297 tbl.appendChild(tr);
298 if(cnt == 3){
299 var show_more = document.createElement('tr');
300 var td = document.createElement('td');
301 lnk = document.createElement('a');
302
303 lnk.href='#';
304 lnk.innerHTML = "${_('show more')}";
305 lnk.id='code_stats_show_more';
306 td.appendChild(lnk);
307
308 show_more.appendChild(td);
309 show_more.appendChild(document.createElement('td'));
310 tbl.appendChild(show_more);
311 }
312
313 }
314 if(no_data){
315 var tr = document.createElement('tr');
316 var td1 = document.createElement('td');
317 td1.innerHTML = "${c.no_data_msg}";
318 tr.appendChild(td1);
319 tbl.appendChild(tr);
320 }
321 YUD.get('lang_stats').appendChild(tbl);
322 YUE.on('code_stats_show_more','click',function(){
323 l = YUD.getElementsByClassName('stats_hidden')
324 for (e in l){
325 YUD.setStyle(l[e],'display','');
326 };
327 YUD.setStyle(YUD.get('code_stats_show_more'),
328 'display','none');
329 })
330
331 var tmpl_links = {}
332 %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()):
333 tmpl_links['${archive['type']}'] = '${h.link_to(archive['type'],
334 h.url('files_archive_home',repo_name=c.dbrepo.repo_name,
335 fname='__CS__'+archive['extension'],subrepos='__SUB__'),class_="archive_icon")}';
336 %endfor
337
338 YUE.on(['download_options','archive_subrepos'],'change',function(e){
339 var sm = YUD.get('download_options');
340 var new_cs = sm.options[sm.selectedIndex];
341
342 for(k in tmpl_links){
343 var s = YUD.get(k+'_link');
344 title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__','__CS_EXT__')}";
345 s.title = title_tmpl.replace('__CS_NAME__',new_cs.text);
346 s.title = s.title.replace('__CS_EXT__',k);
347 var url = tmpl_links[k].replace('__CS__',new_cs.value);
348 var subrepos = YUD.get('archive_subrepos').checked
349 url = url.replace('__SUB__',subrepos);
350 s.innerHTML = url
351 }
352 });
353 </script>
354 <script type="text/javascript">
355 /**
356 * Plots summary graph
357 *
358 * @class SummaryPlot
359 * @param {from} initial from for detailed graph
360 * @param {to} initial to for detailed graph
361 * @param {dataset}
362 * @param {overview_dataset}
363 */
364 function SummaryPlot(from,to,dataset,overview_dataset) {
365 var initial_ranges = {
366 "xaxis":{
367 "from":from,
368 "to":to,
369 },
370 };
371 var dataset = dataset;
372 var overview_dataset = [overview_dataset];
373 var choiceContainer = YUD.get("legend_choices");
374 var choiceContainerTable = YUD.get("legend_choices_tables");
375 var plotContainer = YUD.get('commit_history');
376 var overviewContainer = YUD.get('overview');
377
378 var plot_options = {
379 bars: {show:true,align:'center',lineWidth:4},
380 legend: {show:true, container:"legend_container"},
381 points: {show:true,radius:0,fill:false},
382 yaxis: {tickDecimals:0,},
383 xaxis: {
384 mode: "time",
385 timeformat: "%d/%m",
386 min:from,
387 max:to,
388 },
389 grid: {
390 hoverable: true,
391 clickable: true,
392 autoHighlight:true,
393 color: "#999"
394 },
395 //selection: {mode: "x"}
396 };
397 var overview_options = {
398 legend:{show:false},
399 bars: {show:true,barWidth: 2,},
400 shadowSize: 0,
401 xaxis: {mode: "time", timeformat: "%d/%m/%y",},
402 yaxis: {ticks: 3, min: 0,tickDecimals:0,},
403 grid: {color: "#999",},
404 selection: {mode: "x"}
405 };
406
407 /**
408 *get dummy data needed in few places
409 */
410 function getDummyData(label){
411 return {"label":label,
412 "data":[{"time":0,
413 "commits":0,
414 "added":0,
415 "changed":0,
416 "removed":0,
417 }],
418 "schema":["commits"],
419 "color":'#ffffff',
420 }
421 }
422
423 /**
424 * generate checkboxes accordindly to data
425 * @param keys
426 * @returns
427 */
428 function generateCheckboxes(data) {
429 //append checkboxes
430 var i = 0;
431 choiceContainerTable.innerHTML = '';
432 for(var pos in data) {
433
434 data[pos].color = i;
435 i++;
436 if(data[pos].label != ''){
437 choiceContainerTable.innerHTML += '<tr><td>'+
438 '<input type="checkbox" name="' + data[pos].label +'" checked="checked" />'
439 +data[pos].label+
440 '</td></tr>';
441 }
442 }
443 }
444
445 /**
446 * ToolTip show
447 */
448 function showTooltip(x, y, contents) {
449 var div=document.getElementById('tooltip');
450 if(!div) {
451 div = document.createElement('div');
452 div.id="tooltip";
453 div.style.position="absolute";
454 div.style.border='1px solid #fdd';
455 div.style.padding='2px';
456 div.style.backgroundColor='#fee';
457 document.body.appendChild(div);
458 }
459 YUD.setStyle(div, 'opacity', 0);
460 div.innerHTML = contents;
461 div.style.top=(y + 5) + "px";
462 div.style.left=(x + 5) + "px";
463
464 var anim = new YAHOO.util.Anim(div, {opacity: {to: 0.8}}, 0.2);
465 anim.animate();
466 }
467
468 /**
469 * This function will detect if selected period has some changesets
470 for this user if it does this data is then pushed for displaying
471 Additionally it will only display users that are selected by the checkbox
472 */
473 function getDataAccordingToRanges(ranges) {
474
475 var data = [];
476 var new_dataset = {};
477 var keys = [];
478 var max_commits = 0;
479 for(var key in dataset){
480
481 for(var ds in dataset[key].data){
482 commit_data = dataset[key].data[ds];
483 if (commit_data.time >= ranges.xaxis.from && commit_data.time <= ranges.xaxis.to){
484
485 if(new_dataset[key] === undefined){
486 new_dataset[key] = {data:[],schema:["commits"],label:key};
487 }
488 new_dataset[key].data.push(commit_data);
489 }
490 }
491 if (new_dataset[key] !== undefined){
492 data.push(new_dataset[key]);
493 }
494 }
495
496 if (data.length > 0){
497 return data;
498 }
499 else{
500 //just return dummy data for graph to plot itself
501 return [getDummyData('')];
502 }
503 }
504
505 /**
506 * redraw using new checkbox data
507 */
508 function plotchoiced(e,args){
509 var cur_data = args[0];
510 var cur_ranges = args[1];
511
512 var new_data = [];
513 var inputs = choiceContainer.getElementsByTagName("input");
514
515 //show only checked labels
516 for(var i=0; i<inputs.length; i++) {
517 var checkbox_key = inputs[i].name;
518
519 if(inputs[i].checked){
520 for(var d in cur_data){
521 if(cur_data[d].label == checkbox_key){
522 new_data.push(cur_data[d]);
523 }
524 }
525 }
526 else{
527 //push dummy data to not hide the label
528 new_data.push(getDummyData(checkbox_key));
529 }
530 }
531
532 var new_options = YAHOO.lang.merge(plot_options, {
533 xaxis: {
534 min: cur_ranges.xaxis.from,
535 max: cur_ranges.xaxis.to,
536 mode:"time",
537 timeformat: "%d/%m",
538 },
539 });
540 if (!new_data){
541 new_data = [[0,1]];
542 }
543 // do the zooming
544 plot = YAHOO.widget.Flot(plotContainer, new_data, new_options);
545
546 plot.subscribe("plotselected", plotselected);
547
548 //resubscribe plothover
549 plot.subscribe("plothover", plothover);
550
551 // don't fire event on the overview to prevent eternal loop
552 overview.setSelection(cur_ranges, true);
553
554 }
555
556 /**
557 * plot only selected items from overview
558 * @param ranges
559 * @returns
560 */
561 function plotselected(ranges,cur_data) {
562 //updates the data for new plot
563 var data = getDataAccordingToRanges(ranges);
564 generateCheckboxes(data);
565
566 var new_options = YAHOO.lang.merge(plot_options, {
567 xaxis: {
568 min: ranges.xaxis.from,
569 max: ranges.xaxis.to,
570 mode:"time",
571 timeformat: "%d/%m",
572 },
573 });
574 // do the zooming
575 plot = YAHOO.widget.Flot(plotContainer, data, new_options);
576
577 plot.subscribe("plotselected", plotselected);
578
579 //resubscribe plothover
580 plot.subscribe("plothover", plothover);
581
582 // don't fire event on the overview to prevent eternal loop
583 overview.setSelection(ranges, true);
584
585 //resubscribe choiced
586 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, ranges]);
587 }
588
589 var previousPoint = null;
590
591 function plothover(o) {
592 var pos = o.pos;
593 var item = o.item;
594
595 //YUD.get("x").innerHTML = pos.x.toFixed(2);
596 //YUD.get("y").innerHTML = pos.y.toFixed(2);
597 if (item) {
598 if (previousPoint != item.datapoint) {
599 previousPoint = item.datapoint;
600
601 var tooltip = YUD.get("tooltip");
602 if(tooltip) {
603 tooltip.parentNode.removeChild(tooltip);
604 }
605 var x = item.datapoint.x.toFixed(2);
606 var y = item.datapoint.y.toFixed(2);
607
608 if (!item.series.label){
609 item.series.label = 'commits';
610 }
611 var d = new Date(x*1000);
612 var fd = d.toDateString()
613 var nr_commits = parseInt(y);
614
615 var cur_data = dataset[item.series.label].data[item.dataIndex];
616 var added = cur_data.added;
617 var changed = cur_data.changed;
618 var removed = cur_data.removed;
619
620 var nr_commits_suffix = " ${_('commits')} ";
621 var added_suffix = " ${_('files added')} ";
622 var changed_suffix = " ${_('files changed')} ";
623 var removed_suffix = " ${_('files removed')} ";
624
625
626 if(nr_commits == 1){nr_commits_suffix = " ${_('commit')} ";}
627 if(added==1){added_suffix=" ${_('file added')} ";}
628 if(changed==1){changed_suffix=" ${_('file changed')} ";}
629 if(removed==1){removed_suffix=" ${_('file removed')} ";}
630
631 showTooltip(item.pageX, item.pageY, item.series.label + " on " + fd
632 +'<br/>'+
633 nr_commits + nr_commits_suffix+'<br/>'+
634 added + added_suffix +'<br/>'+
635 changed + changed_suffix + '<br/>'+
636 removed + removed_suffix + '<br/>');
637 }
638 }
639 else {
640 var tooltip = YUD.get("tooltip");
641
642 if(tooltip) {
643 tooltip.parentNode.removeChild(tooltip);
644 }
645 previousPoint = null;
646 }
647 }
648
649 /**
650 * MAIN EXECUTION
651 */
652
653 var data = getDataAccordingToRanges(initial_ranges);
654 generateCheckboxes(data);
655
656 //main plot
657 var plot = YAHOO.widget.Flot(plotContainer,data,plot_options);
658
659 //overview
660 var overview = YAHOO.widget.Flot(overviewContainer,
661 overview_dataset, overview_options);
662
663 //show initial selection on overview
664 overview.setSelection(initial_ranges);
665
666 plot.subscribe("plotselected", plotselected);
667 plot.subscribe("plothover", plothover)
668
669 overview.subscribe("plotselected", function (ranges) {
670 plot.setSelection(ranges);
671 });
672
673 YUE.on(choiceContainer.getElementsByTagName("input"), "click", plotchoiced, [data, initial_ranges]);
674 }
675 SummaryPlot(${c.ts_min},${c.ts_max},${c.commit_data|n},${c.overview_data|n});
676 </script>
699
677
700 </%def>
678 </%def>
@@ -24,7 +24,9 b' requirements = ['
24 "python-dateutil>=1.5.0,<2.0.0",
24 "python-dateutil>=1.5.0,<2.0.0",
25 "dulwich>=0.8.0,<0.9.0",
25 "dulwich>=0.8.0,<0.9.0",
26 "vcs>=0.2.3.dev",
26 "vcs>=0.2.3.dev",
27 "webob==1.0.8"
27 "webob==1.0.8",
28 "markdown==2.0.3",
29 "docutils==0.8.1",
28 ]
30 ]
29
31
30 dependency_links = [
32 dependency_links = [
@@ -88,21 +88,27 b' beaker.cache.regions=super_short_term,sh'
88
88
89 beaker.cache.super_short_term.type=memory
89 beaker.cache.super_short_term.type=memory
90 beaker.cache.super_short_term.expire=10
90 beaker.cache.super_short_term.expire=10
91 beaker.cache.super_short_term.key_length = 256
91
92
92 beaker.cache.short_term.type=memory
93 beaker.cache.short_term.type=memory
93 beaker.cache.short_term.expire=60
94 beaker.cache.short_term.expire=60
95 beaker.cache.short_term.key_length = 256
94
96
95 beaker.cache.long_term.type=memory
97 beaker.cache.long_term.type=memory
96 beaker.cache.long_term.expire=36000
98 beaker.cache.long_term.expire=36000
99 beaker.cache.long_term.key_length = 256
97
100
98 beaker.cache.sql_cache_short.type=memory
101 beaker.cache.sql_cache_short.type=memory
99 beaker.cache.sql_cache_short.expire=10
102 beaker.cache.sql_cache_short.expire=10
103 beaker.cache.sql_cache_short.key_length = 256
100
104
101 beaker.cache.sql_cache_med.type=memory
105 beaker.cache.sql_cache_med.type=memory
102 beaker.cache.sql_cache_med.expire=360
106 beaker.cache.sql_cache_med.expire=360
107 beaker.cache.sql_cache_med.key_length = 256
103
108
104 beaker.cache.sql_cache_long.type=file
109 beaker.cache.sql_cache_long.type=file
105 beaker.cache.sql_cache_long.expire=3600
110 beaker.cache.sql_cache_long.expire=3600
111 beaker.cache.sql_cache_long.key_length = 256
106
112
107 ####################################
113 ####################################
108 ### BEAKER SESSION ####
114 ### BEAKER SESSION ####
@@ -143,7 +149,7 b' logview.pylons.util = #eee'
143 #########################################################
149 #########################################################
144 sqlalchemy.db1.url = sqlite:///%(here)s/test.db
150 sqlalchemy.db1.url = sqlite:///%(here)s/test.db
145 #sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode_tests
151 #sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode_tests
146 #sqlalchemy.db1.echo = False
152 #sqlalchemy.db1.echo = false
147 #sqlalchemy.db1.pool_recycle = 3600
153 #sqlalchemy.db1.pool_recycle = 3600
148 sqlalchemy.convert_unicode = true
154 sqlalchemy.convert_unicode = true
149
155
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
NO CONTENT: file was removed, binary diff hidden
General Comments 0
You need to be logged in to leave comments. Login now