├── src └── heso │ ├── Procfile │ ├── __init__.py │ ├── requirements.txt │ ├── static │ ├── favicon.ico │ ├── lib │ │ ├── bootstrap │ │ │ ├── bootstrap.custom.css │ │ │ └── bootstrap.css │ │ └── codemirror │ │ │ ├── codemirror.custom.css │ │ │ ├── theme │ │ │ └── night.css │ │ │ ├── mode │ │ │ ├── yaml.js │ │ │ ├── css.js │ │ │ ├── ruby.js │ │ │ ├── xml.js │ │ │ ├── python.js │ │ │ └── javascript.js │ │ │ └── codemirror.css │ ├── style.css │ └── script.js │ ├── Rakefile │ ├── setting.py │ ├── database.py │ ├── forms.py │ ├── heroku.py │ ├── script.py │ ├── model.py │ ├── controller.py │ ├── templates │ └── index.html │ ├── tests.py │ └── application.py ├── .gitignore ├── .hgignore ├── LICENSE ├── TODO ├── setup.py ├── README.rst └── bootstrap.py /src/heso/Procfile: -------------------------------------------------------------------------------- 1 | web: python heroku.py 2 | -------------------------------------------------------------------------------- /src/heso/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /src/heso/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask 2 | Flask-Mitten 3 | GitPython 4 | WTForms 5 | peewee 6 | -------------------------------------------------------------------------------- /src/heso/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanius/heso/HEAD/src/heso/static/favicon.ico -------------------------------------------------------------------------------- /src/heso/Rakefile: -------------------------------------------------------------------------------- 1 | desc "Remove extra heso regularly on Heroku" 2 | task :cron do 3 | sh "curl http://your.heroku.host/clean" 4 | end -------------------------------------------------------------------------------- /src/heso/static/lib/bootstrap/bootstrap.custom.css: -------------------------------------------------------------------------------- 1 | .navbar-inner { 2 | border-radius: 0px; 3 | } 4 | 5 | .container-fluid { 6 | padding-top: 20px; 7 | padding-bottom: 20px; 8 | } 9 | 10 | code, pre { 11 | color: #F8F8F8; 12 | } 13 | 14 | hr { 15 | margin: 5px 0 5px; 16 | } 17 | -------------------------------------------------------------------------------- /src/heso/setting.py: -------------------------------------------------------------------------------- 1 | # This file is generated by buildout. See buildout.cfg. 2 | import os.path 3 | var_heso = os.path.join(os.path.dirname(__file__), '../../var/heso') 4 | REPO_ROOT = os.path.join(var_heso, 'repo') 5 | LOG_FILE = os.path.join(var_heso, 'heso.log') 6 | USER_DB_FILE = os.path.join(var_heso, 'user.db') 7 | RUN_ON_HEROKU = False 8 | if RUN_ON_HEROKU: REPO_ROOT = '/app/repo/' 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.py[co] 2 | 3 | # Packages 4 | *.egg 5 | *.egg-info 6 | dist 7 | build 8 | eggs 9 | parts 10 | bin 11 | var 12 | sdist 13 | develop-eggs 14 | .installed.cfg 15 | 16 | # Installer logs 17 | pip-log.txt 18 | 19 | # Unit test / coverage reports 20 | .coverage 21 | .tox 22 | 23 | #Translations 24 | *.mo 25 | 26 | #Mr Developer 27 | .mr.developer.cfg 28 | 29 | # Original 30 | .project 31 | .pydevproject 32 | .settings 33 | deploy.ini 34 | -------------------------------------------------------------------------------- /.hgignore: -------------------------------------------------------------------------------- 1 | syntax: glob 2 | *.py[co] 3 | 4 | # Packages 5 | *.egg 6 | *.egg-info 7 | dist 8 | build 9 | eggs 10 | parts 11 | bin 12 | var 13 | sdist 14 | develop-eggs 15 | .installed.cfg 16 | 17 | # Installer logs 18 | pip-log.txt 19 | 20 | # Unit test / coverage reports 21 | .coverage 22 | .tox 23 | 24 | #Translations 25 | *.mo 26 | 27 | #Mr Developer 28 | .mr.developer.cfg 29 | 30 | # Original 31 | .project 32 | .pydevproject 33 | .settings 34 | deploy.ini 35 | -------------------------------------------------------------------------------- /src/heso/database.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | heso.database 4 | ~~~~~~~~~~~~~ 5 | 6 | Decides the database to use. 7 | 8 | :copyright: (c) 2011 lanius 9 | :license: Apache License, Version 2.0, see LICENSE for more details. 10 | """ 11 | 12 | from peewee import SqliteDatabase 13 | #from peewee import MySQLDatabase 14 | 15 | from setting import USER_DB_FILE 16 | 17 | database = SqliteDatabase(USER_DB_FILE, threadlocals=True) 18 | #database = MySQLDatabase(...) 19 | -------------------------------------------------------------------------------- /src/heso/static/lib/codemirror/codemirror.custom.css: -------------------------------------------------------------------------------- 1 | .CodeMirror { 2 | border: 1px solid #eee; 3 | } 4 | 5 | .CodeMirror-scroll { 6 | height: auto; 7 | overflow-y: hidden; 8 | overflow-x: auto; 9 | width: 100%; 10 | 11 | -webkit-border-radius: 4px; 12 | -moz-border-radius: 4px; 13 | border-radius: 4px; 14 | } 15 | 16 | .CodeMirror-gutter { 17 | -webkit-border-radius: 4px; 18 | -moz-border-radius: 4px; 19 | border-radius: 4px; 20 | } 21 | 22 | .activeline { 23 | background: #555555; 24 | } 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2011 lanius 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /src/heso/forms.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from wtforms import ( 4 | Form, FormField, FieldList, HiddenField, TextField, TextAreaField, 5 | validators, ValidationError, widgets 6 | ) 7 | from wtforms.validators import Required 8 | 9 | 10 | class HesofileForm(Form): 11 | filename = TextField(u'filename', [validators.required()]) 12 | document = TextAreaField(u'document', [validators.required()]) 13 | removed = HiddenField(u'removed') 14 | 15 | 16 | class HesoForm(Form): 17 | description = TextField(u'description', [validators.required()]) 18 | files = FieldList(FormField(HesofileForm), min_entries=1) 19 | -------------------------------------------------------------------------------- /src/heso/heroku.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | heso.heroku 4 | ~~~~~~~~~~~ 5 | 6 | Implements a helper for running Heso on Heroku. 7 | 8 | :copyright: (c) 2011 lanius 9 | :license: Apache License, Version 2.0, see LICENSE for more details. 10 | """ 11 | 12 | import os 13 | 14 | from setting import REPO_ROOT 15 | from controller import app, make_app 16 | from application import get_all_heso, destroy_heso 17 | 18 | REMAINED = 8 19 | 20 | 21 | @app.route('/clean') 22 | def clean(): 23 | for i, heso in enumerate(get_all_heso()): 24 | if REMAINED <= i: 25 | destroy_heso(heso['reponame']) 26 | return "Cleaning has been completed" 27 | 28 | 29 | if __name__ == '__main__': 30 | if not os.path.exists(REPO_ROOT): 31 | os.mkdir(REPO_ROOT) 32 | app = make_app() 33 | app.run(host='0.0.0.0', port=int(os.environ.get('PORT', 5000))) 34 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | ==== 2 | TODO 3 | ==== 4 | 5 | Base 6 | ==== 7 | * Input validation 8 | * Logging 9 | * Error handling 10 | 11 | Function 12 | ======== 13 | 14 | Server 15 | ------ 16 | * Remove repositories 17 | * URI construction for git client 18 | * User manegement and key registration for git 19 | * Listing all heso, or pagination of heso 20 | * Comment view as reStructuredText Style 21 | 22 | Client 23 | ------ 24 | * Use Web Storage to save documents to browser during edit 25 | * Be enable to select language manually 26 | 27 | Usability 28 | ========= 29 | * Set hostname automatically 30 | * Enlarge code paste area 31 | 32 | Design 33 | ====== 34 | * Logo 35 | * Theming for CodeMirror 36 | * Refinement for user interface 37 | 38 | Consideration 39 | ============= 40 | * Use pygments 41 | 42 | Known Bugs 43 | ========== 44 | * Non-ascii strings cannot be used as filename in Windows environment. 45 | -------------------------------------------------------------------------------- /src/heso/script.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | heso.script 4 | ~~~~~~~~~~~ 5 | 6 | Implements helpers to be generated as commands. 7 | 8 | :copyright: (c) 2011 lanius 9 | :license: Apache License, Version 2.0, see LICENSE for more details. 10 | """ 11 | 12 | import getpass 13 | import sys 14 | 15 | from model import User, create_tables 16 | from database import database 17 | 18 | 19 | def adduser(_=None): 20 | create_tables() 21 | 22 | username = raw_input('Username:') 23 | user = None 24 | try: 25 | user = User.get(name=username) 26 | except User.DoesNotExist: 27 | pass # ok 28 | if user: 29 | sys.exit("The username has been already used.") 30 | password = getpass.getpass() 31 | user = User(name=username, password=password) 32 | user.save() 33 | print("The user was created successfully.") 34 | 35 | database.close() 36 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | Heso 4 | ---- 5 | 6 | Heso is a web application to share snippets and pastes with others, and 7 | an open source clone of Gist. 8 | 9 | """ 10 | from setuptools import setup, find_packages 11 | 12 | description = """Heso is a web application \ 13 | to share snippets and pastes with others.""" 14 | 15 | setup( 16 | name='Heso', 17 | version='0.1.0', 18 | description=description, 19 | author='lanius', 20 | author_email='lanius@nirvake.org', 21 | license='Apache License 2.0', 22 | package_dir={'': 'src'}, 23 | packages=find_packages('src'), 24 | include_package_data=True, 25 | zip_safe=False, 26 | install_requires=[ 27 | 'setuptools', 28 | 'Flask', 29 | 'Flask-Mitten', 30 | 'GitPython', 31 | 'WTForms', 32 | 'peewee', 33 | ], 34 | entry_points=""" 35 | [paste.app_factory] 36 | main = heso.controller:make_app 37 | [console_scripts] 38 | heso-adduser = heso.script:adduser 39 | """, 40 | ) 41 | -------------------------------------------------------------------------------- /src/heso/static/lib/codemirror/theme/night.css: -------------------------------------------------------------------------------- 1 | /* Loosely based on the Midnight Textmate theme */ 2 | 3 | .cm-s-night { background: #0a001f; color: #f8f8f8; } 4 | .cm-s-night div.CodeMirror-selected { background: #a8f !important; } 5 | .cm-s-night .CodeMirror-gutter { background: #0a001f; border-right: 1px solid #aaa; } 6 | .cm-s-night .CodeMirror-gutter-text { color: #f8f8f8; } 7 | .cm-s-night .CodeMirror-cursor { border-left: 1px solid white !important; } 8 | 9 | .cm-s-night span.cm-comment { color: #6900a1; } 10 | .cm-s-night span.cm-atom { color: #845dc4; } 11 | .cm-s-night span.cm-number, .cm-s-night span.cm-attribute { color: #ffd500; } 12 | .cm-s-night span.cm-keyword { color: #599eff; } 13 | .cm-s-night span.cm-string { color: #37f14a; } 14 | .cm-s-night span.cm-meta { color: #7678e2; } 15 | .cm-s-night span.cm-variable-2, .cm-s-night span.cm-tag { color: #99b2ff; } 16 | .cm-s-night span.cm-variable-3, .cm-s-night span.cm-def { color: white; } 17 | .cm-s-night span.cm-error { color: #9d1e15; } 18 | .cm-s-night span.cm-bracket { color: #8da6ce; } 19 | .cm-s-night span.cm-comment { color: #6900a1; } 20 | .cm-s-night span.cm-builtin, .cm-s-night span.cm-special { color: #ff9e59; } 21 | .cm-s-night span.cm-link { color: #845dc4; } 22 | -------------------------------------------------------------------------------- /src/heso/static/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #eee; 3 | } 4 | 5 | .header { 6 | padding: 20px; 7 | } 8 | 9 | .header > .logo { 10 | font-size: 40px; 11 | } 12 | 13 | .logo > .logoa { 14 | color: #eee; 15 | } 16 | 17 | .logo > .logoa { 18 | text-decoration: none; 19 | } 20 | 21 | .login-form { 22 | margin-top: -22px; 23 | } 24 | 25 | .user-info { 26 | color: #fff; 27 | margin-right: 15px; 28 | } 29 | 30 | .container-wrapper { 31 | padding-top: 20px; 32 | padding-bottom: 20px; 33 | } 34 | 35 | .create { 36 | float: right; 37 | } 38 | 39 | .update { 40 | float: right; 41 | } 42 | 43 | .add { 44 | font-size: 15px; 45 | } 46 | 47 | .remove { 48 | float: right; 49 | padding-top: 19px; 50 | } 51 | 52 | .reponame { 53 | margin-bottom: 10px; 54 | } 55 | 56 | .description { 57 | margin-bottom: 0; 58 | } 59 | 60 | .filename { 61 | margin-bottom: 19px; 62 | } 63 | 64 | .comments { 65 | margin-top: 70px; 66 | } 67 | 68 | .comment { 69 | width: 98.5%; 70 | height: 100px; 71 | margin-bottom: 19px; 72 | padding-right: 8px; 73 | } 74 | 75 | .comment-wrapper { 76 | margin-bottom: 29px; 77 | } 78 | 79 | .comment-well { 80 | margin-top: 12px; 81 | margin-bottom: 0; 82 | } 83 | 84 | .addcomment { 85 | float: right; 86 | } 87 | 88 | .error-message { 89 | color: #c43c35; 90 | font-size: 15px; 91 | font-weight:bold; 92 | } 93 | 94 | .clearfix:after { 95 | content: ""; 96 | display: block; 97 | clear: both; 98 | } 99 | -------------------------------------------------------------------------------- /src/heso/model.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | heso.model 4 | ~~~~~~~~~~ 5 | 6 | Implements the model. 7 | 8 | :copyright: (c) 2011 lanius 9 | :license: Apache License, Version 2.0, see LICENSE for more details. 10 | """ 11 | 12 | from hashlib import sha1 13 | import os 14 | from uuid import uuid4 15 | 16 | from peewee import Model, CharField, Q 17 | 18 | from database import database 19 | 20 | 21 | class BaseModel(Model): 22 | class Meta: 23 | database = database 24 | 25 | 26 | class User(BaseModel): 27 | name = CharField() 28 | _password = CharField() 29 | 30 | @property 31 | def password(self): 32 | return None 33 | 34 | @password.setter 35 | def password(self, raw_password): 36 | if isinstance(raw_password, unicode): 37 | password_8bit = raw_password.encode('utf-8') 38 | else: 39 | password_8bit = raw_password 40 | 41 | salt = sha1() 42 | salt.update(os.urandom(60)) 43 | hash = sha1() 44 | hash.update(password_8bit + salt.hexdigest()) 45 | hashed_password = salt.hexdigest() + hash.hexdigest() 46 | 47 | if not isinstance(hashed_password, unicode): 48 | hashed_password = hashed_password.decode('utf-8') 49 | 50 | self._password = hashed_password 51 | 52 | @password.getter 53 | def password(self): 54 | return self._password 55 | 56 | def validate_password(self, raw_password): 57 | hashed_pass = sha1() 58 | hashed_pass.update(raw_password + self.password[:40]) 59 | return self.password[40:] == hashed_pass.hexdigest() 60 | 61 | 62 | def create_tables(): 63 | database.connect() 64 | try: 65 | User.create_table() 66 | except: # OperationalError 67 | pass # database already exists. skip creating tables. 68 | database.close() 69 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ==== 2 | Heso 3 | ==== 4 | 5 | Welcome to Heso 6 | =============== 7 | Heso is a web application to share snippets and pastes with others, and an open source clone of Gist. 8 | 9 | Live Demo 10 | ========= 11 | You can see Heso running at http://heso.nirvake.org/. 12 | 13 | Getting started 14 | =============== 15 | Heso requires git. Install it anyway:: 16 | 17 | sudo yum install git -y 18 | 19 | Download the source code:: 20 | 21 | git clone git://github.com/lanius/heso.git 22 | cd heso 23 | 24 | Edit buildout.cfg and change values of "host", "port" or others to suit your environment:: 25 | 26 | vi buildout.cfg 27 | 28 | Install Heso with buildout:: 29 | 30 | python bootstrap.py -d 31 | bin/buildout 32 | 33 | Now, you can run the server and access it:: 34 | 35 | bin/server 36 | 37 | To add a user optionally, execute following command:: 38 | 39 | bin/heso-adduser 40 | 41 | Installing on Windows 42 | ===================== 43 | 44 | Set a GIT_PYTHON_GIT_EXECUTABLE environment variable to the full path to the git executable, e.g. C:\\Program Files (x86)\\Git\\bin\\git.exe. 45 | 46 | Installing on Heroku 47 | ==================== 48 | Install git and heroku gem anyway:: 49 | 50 | sudo yum install git -y 51 | sudo yum install rubygems -y && sudo gem install heroku 52 | 53 | Log in to Heroku. If you're not yet setting up your SSH keys, you have to do it:: 54 | 55 | heroku login 56 | 57 | Download the source code and change directory:: 58 | 59 | git clone git://github.com/lanius/heso.git 60 | cd heso/src/heso 61 | 62 | Edit setting.py and change value of "RUN_ON_HEROKU" to "True":: 63 | 64 | vi setting.py 65 | 66 | Track files (heso/src/heso/\*) with git:: 67 | 68 | git init 69 | git add . 70 | git commit -m "initial commit for Heso on Heroku" 71 | 72 | Create a new Cedar app on Heroku and push Heso:: 73 | 74 | heroku create --stack cedar 75 | git push heroku master 76 | 77 | License 78 | ======= 79 | Heso is licensed under the Apache Licence, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html). 80 | -------------------------------------------------------------------------------- /src/heso/static/lib/codemirror/mode/yaml.js: -------------------------------------------------------------------------------- 1 | CodeMirror.defineMode("yaml", function() { 2 | 3 | var cons = ['true', 'false', 'on', 'off', 'yes', 'no']; 4 | var keywordRegex = new RegExp("\\b(("+cons.join(")|(")+"))$", 'i'); 5 | 6 | return { 7 | token: function(stream, state) { 8 | var ch = stream.peek(); 9 | var esc = state.escaped; 10 | state.escaped = false; 11 | /* comments */ 12 | if (ch == "#") { stream.skipToEnd(); return "comment"; } 13 | if (state.literal && stream.indentation() > state.keyCol) { 14 | stream.skipToEnd(); return "string"; 15 | } else if (state.literal) { state.literal = false; } 16 | if (stream.sol()) { 17 | state.keyCol = 0; 18 | state.pair = false; 19 | state.pairStart = false; 20 | /* document start */ 21 | if(stream.match(/---/)) { return "def"; } 22 | /* document end */ 23 | if (stream.match(/\.\.\./)) { return "def"; } 24 | /* array list item */ 25 | if (stream.match(/\s*-\s+/)) { return 'meta'; } 26 | } 27 | /* pairs (associative arrays) -> key */ 28 | if (!state.pair && stream.match(/^\s*([a-z0-9\._-])+(?=\s*:)/i)) { 29 | state.pair = true; 30 | state.keyCol = stream.indentation(); 31 | return "atom"; 32 | } 33 | if (state.pair && stream.match(/^:\s*/)) { state.pairStart = true; return 'meta'; } 34 | 35 | /* inline pairs/lists */ 36 | if (stream.match(/^(\{|\}|\[|\])/)) { 37 | if (ch == '{') 38 | state.inlinePairs++; 39 | else if (ch == '}') 40 | state.inlinePairs--; 41 | else if (ch == '[') 42 | state.inlineList++; 43 | else 44 | state.inlineList--; 45 | return 'meta'; 46 | } 47 | 48 | /* list seperator */ 49 | if (state.inlineList > 0 && !esc && ch == ',') { 50 | stream.next(); 51 | return 'meta'; 52 | } 53 | /* pairs seperator */ 54 | if (state.inlinePairs > 0 && !esc && ch == ',') { 55 | state.keyCol = 0; 56 | state.pair = false; 57 | state.pairStart = false; 58 | stream.next(); 59 | return 'meta'; 60 | } 61 | 62 | /* start of value of a pair */ 63 | if (state.pairStart) { 64 | /* block literals */ 65 | if (stream.match(/^\s*(\||\>)\s*/)) { state.literal = true; return 'meta'; }; 66 | /* references */ 67 | if (stream.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i)) { return 'variable-2'; } 68 | /* numbers */ 69 | if (state.inlinePairs == 0 && stream.match(/^\s*-?[0-9\.\,]+\s?$/)) { return 'number'; } 70 | if (state.inlinePairs > 0 && stream.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/)) { return 'number'; } 71 | /* keywords */ 72 | if (stream.match(keywordRegex)) { return 'keyword'; } 73 | } 74 | 75 | /* nothing found, continue */ 76 | state.pairStart = false; 77 | state.escaped = (ch == '\\'); 78 | stream.next(); 79 | return null; 80 | }, 81 | startState: function() { 82 | return { 83 | pair: false, 84 | pairStart: false, 85 | keyCol: 0, 86 | inlinePairs: 0, 87 | inlineList: 0, 88 | literal: false, 89 | escaped: false 90 | }; 91 | } 92 | }; 93 | }); 94 | 95 | CodeMirror.defineMIME("text/x-yaml", "yaml"); 96 | -------------------------------------------------------------------------------- /src/heso/static/lib/codemirror/codemirror.css: -------------------------------------------------------------------------------- 1 | .CodeMirror { 2 | line-height: 1em; 3 | font-family: monospace; 4 | } 5 | 6 | .CodeMirror-scroll { 7 | overflow: auto; 8 | height: 300px; 9 | /* This is needed to prevent an IE[67] bug where the scrolled content 10 | is visible outside of the scrolling box. */ 11 | position: relative; 12 | } 13 | 14 | .CodeMirror-gutter { 15 | position: absolute; left: 0; top: 0; 16 | z-index: 10; 17 | background-color: #f7f7f7; 18 | border-right: 1px solid #eee; 19 | min-width: 2em; 20 | height: 100%; 21 | } 22 | .CodeMirror-gutter-text { 23 | color: #aaa; 24 | text-align: right; 25 | padding: .4em .2em .4em .4em; 26 | white-space: pre !important; 27 | } 28 | .CodeMirror-lines { 29 | padding: .4em; 30 | } 31 | 32 | .CodeMirror pre { 33 | -moz-border-radius: 0; 34 | -webkit-border-radius: 0; 35 | -o-border-radius: 0; 36 | border-radius: 0; 37 | border-width: 0; margin: 0; padding: 0; background: transparent; 38 | font-family: inherit; 39 | font-size: inherit; 40 | padding: 0; margin: 0; 41 | white-space: pre; 42 | word-wrap: normal; 43 | } 44 | 45 | .CodeMirror-wrap pre { 46 | word-wrap: break-word; 47 | white-space: pre-wrap; 48 | } 49 | .CodeMirror-wrap .CodeMirror-scroll { 50 | overflow-x: hidden; 51 | } 52 | 53 | .CodeMirror textarea { 54 | outline: none !important; 55 | } 56 | 57 | .CodeMirror pre.CodeMirror-cursor { 58 | z-index: 10; 59 | position: absolute; 60 | visibility: hidden; 61 | border-left: 1px solid black; 62 | } 63 | .CodeMirror-focused pre.CodeMirror-cursor { 64 | visibility: visible; 65 | } 66 | 67 | div.CodeMirror-selected { background: #d9d9d9; } 68 | .CodeMirror-focused div.CodeMirror-selected { background: #d7d4f0; } 69 | 70 | .CodeMirror-searching { 71 | background: #ffa; 72 | background: rgba(255, 255, 0, .4); 73 | } 74 | 75 | /* Default theme */ 76 | 77 | .cm-s-default span.cm-keyword {color: #708;} 78 | .cm-s-default span.cm-atom {color: #219;} 79 | .cm-s-default span.cm-number {color: #164;} 80 | .cm-s-default span.cm-def {color: #00f;} 81 | .cm-s-default span.cm-variable {color: black;} 82 | .cm-s-default span.cm-variable-2 {color: #05a;} 83 | .cm-s-default span.cm-variable-3 {color: #085;} 84 | .cm-s-default span.cm-property {color: black;} 85 | .cm-s-default span.cm-operator {color: black;} 86 | .cm-s-default span.cm-comment {color: #a50;} 87 | .cm-s-default span.cm-string {color: #a11;} 88 | .cm-s-default span.cm-string-2 {color: #f50;} 89 | .cm-s-default span.cm-meta {color: #555;} 90 | .cm-s-default span.cm-error {color: #f00;} 91 | .cm-s-default span.cm-qualifier {color: #555;} 92 | .cm-s-default span.cm-builtin {color: #30a;} 93 | .cm-s-default span.cm-bracket {color: #cc7;} 94 | .cm-s-default span.cm-tag {color: #170;} 95 | .cm-s-default span.cm-attribute {color: #00c;} 96 | .cm-s-default span.cm-header {color: #a0a;} 97 | .cm-s-default span.cm-quote {color: #090;} 98 | .cm-s-default span.cm-hr {color: #999;} 99 | .cm-s-default span.cm-link {color: #00c;} 100 | 101 | span.cm-header, span.cm-strong {font-weight: bold;} 102 | span.cm-em {font-style: italic;} 103 | span.cm-emstrong {font-style: italic; font-weight: bold;} 104 | span.cm-link {text-decoration: underline;} 105 | 106 | div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;} 107 | div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} 108 | -------------------------------------------------------------------------------- /src/heso/static/lib/codemirror/mode/css.js: -------------------------------------------------------------------------------- 1 | CodeMirror.defineMode("css", function(config) { 2 | var indentUnit = config.indentUnit, type; 3 | function ret(style, tp) {type = tp; return style;} 4 | 5 | function tokenBase(stream, state) { 6 | var ch = stream.next(); 7 | if (ch == "@") {stream.eatWhile(/[\w\\\-]/); return ret("meta", stream.current());} 8 | else if (ch == "/" && stream.eat("*")) { 9 | state.tokenize = tokenCComment; 10 | return tokenCComment(stream, state); 11 | } 12 | else if (ch == "<" && stream.eat("!")) { 13 | state.tokenize = tokenSGMLComment; 14 | return tokenSGMLComment(stream, state); 15 | } 16 | else if (ch == "=") ret(null, "compare"); 17 | else if ((ch == "~" || ch == "|") && stream.eat("=")) return ret(null, "compare"); 18 | else if (ch == "\"" || ch == "'") { 19 | state.tokenize = tokenString(ch); 20 | return state.tokenize(stream, state); 21 | } 22 | else if (ch == "#") { 23 | stream.eatWhile(/[\w\\\-]/); 24 | return ret("atom", "hash"); 25 | } 26 | else if (ch == "!") { 27 | stream.match(/^\s*\w*/); 28 | return ret("keyword", "important"); 29 | } 30 | else if (/\d/.test(ch)) { 31 | stream.eatWhile(/[\w.%]/); 32 | return ret("number", "unit"); 33 | } 34 | else if (/[,.+>*\/]/.test(ch)) { 35 | return ret(null, "select-op"); 36 | } 37 | else if (/[;{}:\[\]]/.test(ch)) { 38 | return ret(null, ch); 39 | } 40 | else { 41 | stream.eatWhile(/[\w\\\-]/); 42 | return ret("variable", "variable"); 43 | } 44 | } 45 | 46 | function tokenCComment(stream, state) { 47 | var maybeEnd = false, ch; 48 | while ((ch = stream.next()) != null) { 49 | if (maybeEnd && ch == "/") { 50 | state.tokenize = tokenBase; 51 | break; 52 | } 53 | maybeEnd = (ch == "*"); 54 | } 55 | return ret("comment", "comment"); 56 | } 57 | 58 | function tokenSGMLComment(stream, state) { 59 | var dashes = 0, ch; 60 | while ((ch = stream.next()) != null) { 61 | if (dashes >= 2 && ch == ">") { 62 | state.tokenize = tokenBase; 63 | break; 64 | } 65 | dashes = (ch == "-") ? dashes + 1 : 0; 66 | } 67 | return ret("comment", "comment"); 68 | } 69 | 70 | function tokenString(quote) { 71 | return function(stream, state) { 72 | var escaped = false, ch; 73 | while ((ch = stream.next()) != null) { 74 | if (ch == quote && !escaped) 75 | break; 76 | escaped = !escaped && ch == "\\"; 77 | } 78 | if (!escaped) state.tokenize = tokenBase; 79 | return ret("string", "string"); 80 | }; 81 | } 82 | 83 | return { 84 | startState: function(base) { 85 | return {tokenize: tokenBase, 86 | baseIndent: base || 0, 87 | stack: []}; 88 | }, 89 | 90 | token: function(stream, state) { 91 | if (stream.eatSpace()) return null; 92 | var style = state.tokenize(stream, state); 93 | 94 | var context = state.stack[state.stack.length-1]; 95 | if (type == "hash" && context == "rule") style = "atom"; 96 | else if (style == "variable") { 97 | if (context == "rule") style = "number"; 98 | else if (!context || context == "@media{") style = "tag"; 99 | } 100 | 101 | if (context == "rule" && /^[\{\};]$/.test(type)) 102 | state.stack.pop(); 103 | if (type == "{") { 104 | if (context == "@media") state.stack[state.stack.length-1] = "@media{"; 105 | else state.stack.push("{"); 106 | } 107 | else if (type == "}") state.stack.pop(); 108 | else if (type == "@media") state.stack.push("@media"); 109 | else if (context == "{" && type != "comment") state.stack.push("rule"); 110 | return style; 111 | }, 112 | 113 | indent: function(state, textAfter) { 114 | var n = state.stack.length; 115 | if (/^\}/.test(textAfter)) 116 | n -= state.stack[state.stack.length-1] == "rule" ? 2 : 1; 117 | return state.baseIndent + n * indentUnit; 118 | }, 119 | 120 | electricChars: "}" 121 | }; 122 | }); 123 | 124 | CodeMirror.defineMIME("text/css", "css"); 125 | -------------------------------------------------------------------------------- /src/heso/controller.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | heso.controller 4 | ~~~~~~~~~~~~~~~ 5 | 6 | Implements the routing layer, and acts as controller. 7 | 8 | :copyright: (c) 2011 lanius 9 | :license: Apache License, Version 2.0, see LICENSE for more details. 10 | """ 11 | 12 | import logging 13 | import os 14 | 15 | from flask import (Flask, request, render_template, abort, redirect, url_for, 16 | session, flash, g) 17 | from flaskext.mitten import Mitten 18 | 19 | from setting import REPO_ROOT, LOG_FILE 20 | from application import * 21 | from forms import HesoForm 22 | from model import User, create_tables 23 | from database import database 24 | 25 | app = Flask(__name__) 26 | mitten = Mitten(app) 27 | mitten.banner = 'I am heso !' 28 | 29 | handler = logging.FileHandler(LOG_FILE, encoding='utf-8') 30 | handler.setLevel(logging.WARN) 31 | app.logger.addHandler(handler) 32 | 33 | 34 | @app.before_request 35 | def before_request(): 36 | g.db = database 37 | g.db.connect() 38 | 39 | 40 | @app.after_request 41 | def after_request(response): 42 | g.db.close() 43 | return response 44 | 45 | 46 | @app.route('/favicon.ico') 47 | def favicon(): 48 | return app.send_static_file('favicon.ico') 49 | 50 | 51 | @app.route('/login', methods=['POST']) 52 | def login(): 53 | # todo: show a message about login success or fail 54 | username = request.form.get('username') 55 | password = request.form.get('password') 56 | try: 57 | user = User.get(name=username) 58 | except User.DoesNotExist: 59 | return redirect(url_for('index')) 60 | if (user.validate_password(password)): 61 | session.regenerate() 62 | session['username'] = username 63 | session['logged_in'] = True 64 | return redirect(url_for('index')) 65 | 66 | 67 | @app.route('/logout') 68 | def logout(): 69 | session.destroy() 70 | return redirect(url_for('index')) 71 | 72 | 73 | @app.route('/', methods=['GET', 'POST']) 74 | def index(): 75 | form = HesoForm(request.form) 76 | if request.method == 'POST': 77 | if form.validate(): 78 | create_heso(extract_heso(form), session.get('username')) 79 | return redirect(url_for('index')) 80 | flash(u'all fields are required.') 81 | hesoes = get_all_heso() 82 | return render_template('index.html', hesoes=hesoes, form=form, 83 | for_create=True) 84 | 85 | 86 | @app.route('/', methods=['GET', 'POST']) 87 | def heso_latest(reponame): 88 | return heso(reponame, None) 89 | 90 | 91 | @app.route('//', methods=['GET', 'POST']) 92 | def heso(reponame, rev): 93 | if request.method == 'POST': 94 | form = HesoForm(request.form) 95 | if form.validate(): 96 | update_heso(reponame, extract_heso(form), session.get('username')) 97 | return redirect(url_for('heso_latest', reponame=reponame)) 98 | flash(u'all fields are required.') 99 | else: 100 | form = HesoForm(**get_heso(reponame, rev)) 101 | history = get_history(reponame) 102 | comments = get_all_comment(reponame) 103 | return render_template('index.html', reponame=reponame, form=form, 104 | history=history, comments=comments) 105 | 106 | 107 | @app.route('//comment', methods=['POST']) 108 | def comment(reponame): 109 | comment = request.form.get('comment') 110 | if comment: 111 | add_comment(reponame, comment) 112 | return redirect(url_for('heso_latest', reponame=reponame)) 113 | 114 | 115 | @app.errorhandler(500) 116 | def error(e): 117 | # todo: return a custom error page 118 | app.logger.exception(u'An Error was handled.') 119 | flash(u'Sorry, any error occurred..') 120 | form = HesoForm(request.form) 121 | hesoes = get_all_heso() 122 | return render_template('index.html', hesoes=hesoes, form=form, 123 | for_create=True) 124 | 125 | 126 | def extract_heso(form): 127 | return {'files': [{'filename': f.filename.data, 128 | 'document': f.document.data, 129 | 'removed': True if f.removed.data == u'true' else False 130 | } 131 | for f in form.files.entries], 132 | 'description': form.description.data} 133 | 134 | 135 | def make_app(global_conf={}): 136 | app.debug = False 137 | app.secret_key = os.urandom(24) 138 | create_tables() 139 | return app 140 | 141 | 142 | if __name__ == '__main__': 143 | host = 'localhost' 144 | port = 8080 145 | app = make_app() 146 | app.debug = True 147 | app.run(host=host, port=port) 148 | -------------------------------------------------------------------------------- /src/heso/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Heso 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 34 | 35 |
36 |
37 | 38 |
39 | {% with messages = get_flashed_messages() %} 40 | {% if messages %} 41 |
42 | {% for message in messages %} 43 |

{{ message }}

44 | {% endfor %} 45 |
46 | {% endif %} 47 | {% endwith %} 48 |
49 |
50 | {% if reponame %} 51 |

heso: {{ reponame }}

52 | {% endif %} 53 | {{ form.description(placeholder="description", class="description input-xxlarge") }} 54 |
55 |
56 | {% for ff in form.files.entries %} 57 |
58 | {{ ff.filename(placeholder="file name", class="filename") }} 59 | 60 | {{ ff.document(rows="16", cols="200", class="document") }} 61 | {{ ff.removed(value="false", class="removed") }} 62 | 63 |
64 | {% endfor %} 65 |
66 | 67 |
68 | add another file 69 |
70 | 71 | 72 | 73 | {% if for_create %} 74 |
75 | 76 |
77 | {% else %} 78 |
79 | 80 |
81 | {% endif %} 82 | 83 |
84 | {% if for_create is not defined %} 85 |
86 |

Comments

87 |
88 | {% for comment in comments %} 89 | {{comment}} 90 |
91 | {% endfor %} 92 |
93 |
94 |
95 | 96 |
97 | 98 |
99 | 100 |
101 |
102 | {% endif %} 103 | 104 |
105 | 106 |
107 | {% if for_create %} 108 |

Recent Heso

109 |
110 | {% for heso in hesoes %} 111 |
112 | heso: {{heso.reponame}} 113 | {{heso.description}}
114 | created {{heso.created}} 115 |
116 |
117 | {% endfor %} 118 | {% else %} 119 |

Revisions

120 |
121 | {% for commit in history %} 122 |
123 | {{commit.revshort}} 124 | {{commit.author}} 125 | {{commit.timestamp}} 126 |
127 |
128 | {% endfor %} 129 | {% endif %} 130 |
131 | 132 | 133 |
134 |
135 | 136 |
137 | 138 | 139 | 140 | 141 | 142 | 143 | -------------------------------------------------------------------------------- /src/heso/tests.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | heso.tests 4 | ~~~~~~~~~~ 5 | 6 | Implements tests. 7 | 8 | :copyright: (c) 2011 lanius 9 | :license: Apache License, Version 2.0, see LICENSE for more details. 10 | """ 11 | 12 | import errno 13 | import os 14 | from shutil import rmtree 15 | import stat 16 | import time 17 | import unittest 18 | 19 | import application 20 | import controller 21 | from setting import REPO_ROOT 22 | 23 | 24 | class ControllerTestCase(unittest.TestCase): 25 | 26 | def setUp(self): 27 | self.app = controller.make_app().test_client() 28 | 29 | def tearDown(self): 30 | pass 31 | 32 | def test_index(self): 33 | rv = self.app.get('/') 34 | self.assert_('Heso' in rv.data) 35 | 36 | 37 | class ApplicationTestCase(unittest.TestCase): 38 | 39 | def setUp(self): 40 | self.begin_repos = self._get_current_repos() 41 | 42 | def tearDown(self): 43 | diff = self._get_diff_repos() 44 | for reponame in diff: 45 | self._remove_repo(reponame) 46 | 47 | def test_is_invalid(self): 48 | valid_heso = self._make_heso() 49 | self.assertFalse(application.is_invalid(valid_heso)) 50 | 51 | desc_blank_heso = valid_heso.copy() 52 | desc_blank_heso['description'] = "" 53 | self.assertTrue(application.is_invalid(desc_blank_heso)) 54 | 55 | fname_blank_heso = valid_heso.copy() 56 | fname_blank_heso['files'][0]['filename'] = "" 57 | self.assertTrue(application.is_invalid(fname_blank_heso)) 58 | 59 | def test_create_heso(self): 60 | heso = self._make_heso() 61 | application.create_heso(heso) 62 | diff = self._get_diff_repos() 63 | self.assertEqual(len(diff), 1) 64 | 65 | def test_update_heso(self): 66 | heso = self._make_heso() 67 | application.create_heso(heso) 68 | reponame = self._get_diff_repos()[0] 69 | expected = application.get_heso(reponame) 70 | expected['description'] = "This heso is updated." 71 | application.update_heso(reponame, expected) 72 | 73 | result = application.get_heso(reponame) 74 | self.assertEqual(result['description'], expected['description']) 75 | self.assertEqual(result['files'][0]['filename'], 76 | expected['files'][0]['filename']) 77 | 78 | def test_destroy_heso(self): 79 | heso = self._make_heso() 80 | application.create_heso(heso) 81 | reponame = self._get_diff_repos()[0] 82 | application.destroy_heso(reponame) 83 | self.assert_(reponame not in self._get_current_repos()) 84 | 85 | def test_get_heso(self): 86 | heso = self._make_heso() 87 | application.create_heso(heso) 88 | reponame = self._get_diff_repos()[0] 89 | result = application.get_heso(reponame) 90 | self.assertEqual(result['description'], heso['description']) 91 | self.assertEqual(result['files'][0]['filename'], 92 | heso['files'][0]['filename']) 93 | 94 | def test_get_all_heso(self): 95 | for i in xrange(3): 96 | heso = self._make_heso() 97 | heso['description'] = "Heso description number {0}.".format(i + 1) 98 | application.create_heso(heso) 99 | 100 | all_heso = application.get_all_heso() 101 | expected = self._get_current_repos() 102 | for heso in all_heso: 103 | self.assert_(heso['reponame'] in expected) 104 | 105 | def test_get_history(self): 106 | heso = self._make_heso() 107 | application.create_heso(heso) 108 | reponame = self._get_diff_repos()[0] 109 | 110 | heso['files'][0]['document'] = "This heso is updated once." 111 | application.update_heso(reponame, heso) 112 | heso['files'][0]['document'] = "This heso is updated twice." 113 | application.update_heso(reponame, heso) 114 | 115 | history = application.get_history(reponame) 116 | self.assertEqual(len(history), 3) 117 | 118 | def test_comment(self): 119 | heso = self._make_heso() 120 | application.create_heso(heso) 121 | reponame = self._get_diff_repos()[0] 122 | 123 | begin_comments = application.get_all_comment(reponame) 124 | for i in xrange(3): 125 | comment = "This is test comment number {0}.".format(i + 1) 126 | application.add_comment(reponame, comment) 127 | time.sleep(0.001) # fixme: I don't want to use sleep! 128 | comments = application.get_all_comment(reponame) 129 | self.assertEqual(len(comments), len(begin_comments) + 3) 130 | 131 | def _make_heso(self): 132 | return {'description': "This is a test description.", 133 | 'files': [ 134 | {'filename': "heso_test.py", 135 | 'document': "import heso", 136 | 'removed': False} 137 | ]} 138 | 139 | def _get_current_repos(self): 140 | return [repodir[0:-4] for repodir in os.listdir(REPO_ROOT)] 141 | 142 | def _get_diff_repos(self): 143 | reposet = set(self._get_current_repos()) 144 | return list(reposet.difference(set(self.begin_repos))) 145 | 146 | def _remove_repo(self, reponame): 147 | application.destroy_heso(reponame) 148 | 149 | 150 | def suite(): 151 | suite = unittest.TestSuite() 152 | suite.addTest(unittest.makeSuite(ControllerTestCase)) 153 | suite.addTest(unittest.makeSuite(ApplicationTestCase)) 154 | return suite 155 | 156 | 157 | if __name__ == '__main__': 158 | unittest.main() 159 | -------------------------------------------------------------------------------- /src/heso/static/script.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | 4 | var STATIC_ROOT = document.getElementById("static-root").value; 5 | 6 | var getFileLanguage = function (fileName) { 7 | var ext = fileName.split('.').pop(), 8 | language = "text"; 9 | switch (ext) { 10 | case 'js': 11 | language = 'javascript'; 12 | break; 13 | case 'py': 14 | language = 'python'; 15 | break; 16 | case 'rb': 17 | language = 'ruby'; 18 | break; 19 | case 'css': 20 | language = 'css'; 21 | break; 22 | case 'html': 23 | language = 'xml'; 24 | break; 25 | case 'xml': 26 | language = 'xml'; 27 | break; 28 | case 'yml': 29 | language = 'yaml'; 30 | break; 31 | case 'yaml': 32 | language = 'yaml'; 33 | break; 34 | default: 35 | break; 36 | } 37 | return language; 38 | }; 39 | 40 | var getIndex = function (name) { 41 | return name.match(/files-(\d+)-(document|filename)/)[1]; 42 | }; 43 | 44 | var loadScript = function (language, onloadCallback) { 45 | var url, script; 46 | if (language !== 'text') { 47 | url = STATIC_ROOT + 'lib/codemirror/mode/' + language + '.js'; 48 | script = document.createElement('script'); 49 | script.src = url; 50 | script.onload = onloadCallback; 51 | document.body.appendChild(script); 52 | } else { 53 | onloadCallback(); 54 | } 55 | }; 56 | 57 | var setupCodeMirror = function (textArea, language) { 58 | var setup = function (textArea, language) { 59 | var editor, hlLine; 60 | editor = CodeMirror.fromTextArea(textArea, { 61 | mode: { name: language }, 62 | theme: "night", 63 | lineNumbers: true, 64 | matchBrackets: true, 65 | onCursorActivity: function () { 66 | editor.setLineClass(hlLine, null); 67 | hlLine = editor.setLineClass(editor.getCursor().line, "activeline"); 68 | } 69 | }); 70 | hlLine = editor.setLineClass(0, "activeline"); 71 | 72 | textArea.changeMode = function (language) { 73 | loadScript(language, function () { 74 | editor.setOption("mode", language); 75 | }); 76 | }; 77 | }; 78 | 79 | if (language === 'text') { 80 | setup(textArea, language); 81 | } else { 82 | loadScript(language, function () { 83 | setup(textArea, language); 84 | }); 85 | } 86 | }; 87 | 88 | 89 | var setUpTextArea = function (textArea) { 90 | 91 | if (textArea.innerHTML === "") { 92 | textArea.innerHTML = "\n\n\n\n"; 93 | } 94 | 95 | var fileNameInput = document.getElementsByName("files-" + getIndex(textArea.name) + "-filename")[0]; 96 | 97 | fileNameInput.onchange = function (event) { 98 | var fileNameInput, textArea, fileName; 99 | fileNameInput = event.target; 100 | textArea = document.getElementsByName("files-" + getIndex(fileNameInput.name) + "-document")[0]; 101 | fileName = fileNameInput.value; 102 | if (!textArea.changeMode) { 103 | setupCodeMirror(textArea, getFileLanguage(fileName)); 104 | } else { 105 | textArea.changeMode(getFileLanguage(fileName)); 106 | } 107 | }; 108 | 109 | fileNameInput.onchange({'target': fileNameInput}); 110 | }; 111 | 112 | var createFileNode = function () { 113 | var numFiles; 114 | numFiles = document.getElementsByClassName("document").length; 115 | 116 | var fileNode; 117 | fileNode = document.createElement("div"); 118 | fileNode.className = "well clearfix"; 119 | 120 | var fileName; 121 | fileName = document.createElement("input"); 122 | fileName.setAttribute("type", "text"); 123 | fileName.setAttribute("id", "files-" + numFiles + "-filename"); 124 | fileName.setAttribute("name", "files-" + numFiles + "-filename"); 125 | fileName.setAttribute("placeholder", "file name"); 126 | fileNode.appendChild(fileName); 127 | 128 | fileNode.appendChild(document.createElement("hr")); 129 | 130 | var textArea; 131 | textArea = document.createElement("textarea"); 132 | textArea.setAttribute("id", "files-" + numFiles + "-document"); 133 | textArea.setAttribute("name", "files-" + numFiles + "-document"); 134 | textArea.setAttribute("placeholder", "document"); 135 | textArea.setAttribute("rows", "16"); 136 | textArea.setAttribute("cols", "200"); 137 | textArea.className = "document"; 138 | fileNode.appendChild(textArea); 139 | 140 | var removed; 141 | removed = document.createElement("input"); 142 | removed.type = "hidden"; 143 | removed.value = "false"; 144 | removed.setAttribute("id", "files-" + numFiles + "-removed"); 145 | removed.setAttribute("name", "files-" + numFiles + "-removed"); 146 | removed.className = "removed"; 147 | fileNode.appendChild(removed); 148 | 149 | var removeLink, a; 150 | removeLink = document.createElement("div"); 151 | a = document.createElement("a"); 152 | a.innerHTML = "remove"; 153 | a.href = "#"; 154 | a.onclick = function () { 155 | removeFileNode(fileNode); 156 | return false; 157 | }; 158 | removeLink.appendChild(a); 159 | removeLink.className = "remove"; 160 | fileNode.appendChild(removeLink); 161 | 162 | // fixme: is there any smart way? 163 | fileNode.textarea = textArea; 164 | 165 | return fileNode; 166 | }; 167 | 168 | var removeFileNode = function (fileNode) { 169 | var removed = fileNode.getElementsByClassName("removed")[0]; 170 | removed.value = true; 171 | fileNode.style.display = "none"; 172 | }; 173 | 174 | 175 | var textAreas, fileNodes, i, max; 176 | 177 | textAreas = document.getElementsByClassName("document"); 178 | for (i = 0, max = textAreas.length; i < max; i += 1) { 179 | setUpTextArea(textAreas[i]); 180 | } 181 | 182 | document.getElementById("add").onclick = function () { 183 | var fileNode = createFileNode(); 184 | document.getElementById("files").appendChild(fileNode); 185 | setUpTextArea(fileNode.textarea); 186 | return false; 187 | }; 188 | 189 | fileNodes = document.getElementById("files").children; 190 | for (i = 0, max = fileNodes.length; i < max; i += 1) { 191 | (function () { 192 | var fileNode = fileNodes[i]; 193 | fileNode.getElementsByTagName("a")[0].onclick = function () { 194 | removeFileNode(fileNode); 195 | return false; 196 | }; 197 | }()); 198 | } 199 | 200 | }()); 201 | -------------------------------------------------------------------------------- /src/heso/application.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | heso.application 4 | ~~~~~~~~~~~~~~~~ 5 | 6 | Implements the application layer, and accesses git repositories. 7 | 8 | :copyright: (c) 2011 lanius 9 | :license: Apache License, Version 2.0, see LICENSE for more details. 10 | """ 11 | 12 | import errno 13 | import os 14 | import stat 15 | from datetime import datetime 16 | from dircache import listdir 17 | from itertools import chain 18 | from random import randrange 19 | from shutil import copyfile, rmtree 20 | from tempfile import gettempdir 21 | from time import time, gmtime, strftime 22 | 23 | from git import Repo 24 | 25 | from setting import REPO_ROOT 26 | 27 | 28 | def is_invalid(heso): 29 | files = heso['files'] 30 | description = heso['description'] 31 | if all(chain(*[[f['filename'], f['document']] for f in files 32 | if not f['removed']])) and description: 33 | return False 34 | else: 35 | return True 36 | 37 | 38 | def create_heso(heso, username=None): 39 | if not username: 40 | username = 'anonymous' 41 | reponame = _create_reponame() 42 | _init_repo(reponame) 43 | 44 | _update_repo(reponame, heso['files'], heso['description']) 45 | _push_repo(reponame, "create repository.", username) 46 | _cleanup(reponame) 47 | 48 | 49 | def update_heso(reponame, heso, username=None): 50 | if not username: 51 | username = 'anonymous' 52 | _update_repo(reponame, heso['files'], heso['description']) 53 | _push_repo(reponame, "update.", username) 54 | _cleanup(reponame) 55 | 56 | 57 | def destroy_heso(reponame): 58 | _rmtree(_get_repo_path(reponame)) 59 | 60 | 61 | def get_heso(reponame, rev=None): 62 | repo = _get_repo(reponame) 63 | commit = repo.commit(rev) 64 | files = [{'filename': blob.name, 65 | 'document': unicode(blob.data_stream.read(), 'utf-8'), 66 | 'removed': False} 67 | for blob in commit.tree] 68 | return {'reponame': reponame, 69 | 'files': files, 70 | 'description': unicode(repo.description, 'utf-8'), 71 | # fixme: do you want to oldest committed date? 72 | 'created': strftime('%b %d, %Y', 73 | gmtime(commit.committed_date))} 74 | 75 | 76 | def get_all_heso(): 77 | return [get_heso(reponame) for reponame in _get_reponames()] 78 | 79 | 80 | def get_history(reponame): 81 | return [{'rev': c.hexsha, 'revshort': c.hexsha[0:5], 82 | 'author': c.author.name, 83 | 'timestamp': _prettytime(c.committed_date)} 84 | for c in _get_repo(reponame).iter_commits()] 85 | 86 | 87 | def add_comment(reponame, comment): 88 | filename = ''.join([str(int(time() * 1000)), '.rst']) 89 | filepath = os.path.join(_get_comment_path(reponame), filename) 90 | with open(filepath, 'w') as fp: 91 | fp.write(comment.encode('utf-8')) 92 | 93 | 94 | def get_all_comment(reponame): 95 | files = sorted(os.listdir(_get_comment_path(reponame))) 96 | comments = [] 97 | for f in files: 98 | with open(os.path.join(_get_comment_path(reponame), f), 'r') as fp: 99 | comments.append(unicode(fp.read(), 'utf-8')) 100 | return comments 101 | 102 | 103 | def _create_reponame(): 104 | # fixme: generate unique name. 105 | key_length = 8 106 | _letter = map(lambda _i: chr(_i), range(65, 91)) 107 | _letter.extend(map(lambda _i: chr(_i), range(97, 123))) 108 | name = ''.join(map(lambda _i: _letter[randrange(50)], range(key_length))) 109 | if name in _get_reponames(): 110 | raise Exception("generated name is already used. please retry.") 111 | return name 112 | 113 | 114 | def _init_repo(reponame): 115 | repo = Repo.init(_get_repo_path(reponame), bare=True) 116 | os.mkdir(_get_comment_path(reponame)) 117 | return repo 118 | 119 | 120 | def _get_reponames(): 121 | files = [r for r in listdir(REPO_ROOT) if r.endswith('.git')] 122 | files = sorted(files, 123 | key=lambda f: os.stat(os.path.join(REPO_ROOT, f)).st_mtime, 124 | reverse=True) 125 | return [filename[0:-4] for filename in files] 126 | 127 | 128 | def _get_repo(reponame): 129 | return Repo(_get_repo_path(reponame)) 130 | 131 | 132 | def _get_repo_path(reponame): 133 | return '{0}.git'.format(os.path.join(REPO_ROOT, reponame)) 134 | 135 | 136 | def _update_repo(reponame, files, description): 137 | repo = _get_repo(reponame) 138 | tmp_path = os.path.join(gettempdir(), reponame) 139 | repo.clone(tmp_path) 140 | for f in files: 141 | file_path = os.path.join(tmp_path, f['filename']) 142 | if f['removed']: 143 | if os.path.exists(file_path): 144 | os.remove(file_path) 145 | else: 146 | pass 147 | else: 148 | with open(file_path, 'w') as fp: 149 | doc = _replace_lfcode(f['document'].encode('utf-8')) 150 | fp.write(doc) 151 | repo.description = description.encode('utf-8') 152 | 153 | 154 | def _push_repo(reponame, comment, 155 | username='anonymous', email='heso@nirvake.org'): 156 | repo = Repo(_get_tmp_path(reponame)) 157 | repo.git.add('-A') 158 | try: 159 | repo.git.commit('-m', '{0}'.format(comment), 160 | '--author', '{0} <{1}>'.format(username, email)) 161 | repo.git.push(_get_repo_path(reponame), 'master') 162 | except: 163 | # todo: handle error. 164 | pass 165 | 166 | 167 | def _cleanup(reponame): 168 | _rmtree(_get_tmp_path(reponame)) 169 | 170 | 171 | def _get_tmp_path(reponame): 172 | return os.path.join(gettempdir(), reponame) 173 | 174 | 175 | def _get_comment_path(reponame): 176 | return os.path.join(_get_repo_path(reponame), 'comments') 177 | 178 | 179 | def _rmtree(path): 180 | rmtree(path, ignore_errors=False, onerror=_handle_readonly) 181 | 182 | 183 | def _prettytime(timestamp): 184 | """See http://stackoverflow.com/questions/410221/natural-relative-days-in-python""" 185 | d = datetime.fromtimestamp(timestamp) 186 | diff = datetime.today() - d 187 | s = diff.seconds 188 | if diff.days > 7 or diff.days < 0: 189 | return d.strftime('%d %b %y') 190 | elif diff.days == 1: 191 | return '1 day ago' 192 | elif diff.days > 1: 193 | return '{0} days ago'.format(diff.days) 194 | elif s <= 1: 195 | return 'just now' 196 | elif s < 60: 197 | return '{0} seconds ago'.format(s) 198 | elif s < 120: 199 | return '1 minute ago' 200 | elif s < 3600: 201 | return '{0} minutes ago'.format(s / 60) 202 | elif s < 7200: 203 | return '1 hour ago' 204 | else: 205 | return '{0} hours ago'.format(s / 3600) 206 | 207 | 208 | def _handle_readonly(func, path, exc): 209 | """For Windows. 210 | See http://stackoverflow.com/questions/1213706/what-user-do-python-scripts-run-as-in-windows. 211 | """ 212 | excvalue = exc[1] 213 | if func in (os.rmdir, os.remove) and excvalue.errno == errno.EACCES: 214 | os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO) # 0777 215 | func(path) 216 | else: 217 | raise 218 | 219 | 220 | def _replace_lfcode(text): 221 | """For Windows.""" 222 | return text.replace('\r', '') 223 | 224 | 225 | if __name__ == '__main__': 226 | pass 227 | -------------------------------------------------------------------------------- /src/heso/static/lib/codemirror/mode/ruby.js: -------------------------------------------------------------------------------- 1 | CodeMirror.defineMode("ruby", function(config, parserConfig) { 2 | function wordObj(words) { 3 | var o = {}; 4 | for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true; 5 | return o; 6 | } 7 | var keywords = wordObj([ 8 | "alias", "and", "BEGIN", "begin", "break", "case", "class", "def", "defined?", "do", "else", 9 | "elsif", "END", "end", "ensure", "false", "for", "if", "in", "module", "next", "not", "or", 10 | "redo", "rescue", "retry", "return", "self", "super", "then", "true", "undef", "unless", 11 | "until", "when", "while", "yield", "nil", "raise", "throw", "catch", "fail", "loop", "callcc", 12 | "caller", "lambda", "proc", "public", "protected", "private", "require", "load", 13 | "require_relative", "extend", "autoload" 14 | ]); 15 | var indentWords = wordObj(["def", "class", "case", "for", "while", "do", "module", "then", 16 | "catch", "loop", "proc", "begin"]); 17 | var dedentWords = wordObj(["end", "until"]); 18 | var matching = {"[": "]", "{": "}", "(": ")"}; 19 | var curPunc; 20 | 21 | function chain(newtok, stream, state) { 22 | state.tokenize.push(newtok); 23 | return newtok(stream, state); 24 | } 25 | 26 | function tokenBase(stream, state) { 27 | curPunc = null; 28 | if (stream.sol() && stream.match("=begin") && stream.eol()) { 29 | state.tokenize.push(readBlockComment); 30 | return "comment"; 31 | } 32 | if (stream.eatSpace()) return null; 33 | var ch = stream.next(); 34 | if (ch == "`" || ch == "'" || ch == '"' || 35 | (ch == "/" && !stream.eol() && stream.peek() != " ")) { 36 | return chain(readQuoted(ch, "string", ch == '"'), stream, state); 37 | } else if (ch == "%") { 38 | var style, embed = false; 39 | if (stream.eat("s")) style = "atom"; 40 | else if (stream.eat(/[WQ]/)) { style = "string"; embed = true; } 41 | else if (stream.eat(/[wxqr]/)) style = "string"; 42 | var delim = stream.eat(/[^\w\s]/); 43 | if (!delim) return "operator"; 44 | if (matching.propertyIsEnumerable(delim)) delim = matching[delim]; 45 | return chain(readQuoted(delim, style, embed, true), stream, state); 46 | } else if (ch == "#") { 47 | stream.skipToEnd(); 48 | return "comment"; 49 | } else if (ch == "<" && stream.eat("<")) { 50 | stream.eat("-"); 51 | stream.eat(/[\'\"\`]/); 52 | var match = stream.match(/^\w+/); 53 | stream.eat(/[\'\"\`]/); 54 | if (match) return chain(readHereDoc(match[0]), stream, state); 55 | return null; 56 | } else if (ch == "0") { 57 | if (stream.eat("x")) stream.eatWhile(/[\da-fA-F]/); 58 | else if (stream.eat("b")) stream.eatWhile(/[01]/); 59 | else stream.eatWhile(/[0-7]/); 60 | return "number"; 61 | } else if (/\d/.test(ch)) { 62 | stream.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/); 63 | return "number"; 64 | } else if (ch == "?") { 65 | while (stream.match(/^\\[CM]-/)) {} 66 | if (stream.eat("\\")) stream.eatWhile(/\w/); 67 | else stream.next(); 68 | return "string"; 69 | } else if (ch == ":") { 70 | if (stream.eat("'")) return chain(readQuoted("'", "atom", false), stream, state); 71 | if (stream.eat('"')) return chain(readQuoted('"', "atom", true), stream, state); 72 | stream.eatWhile(/[\w\?]/); 73 | return "atom"; 74 | } else if (ch == "@") { 75 | stream.eat("@"); 76 | stream.eatWhile(/[\w\?]/); 77 | return "variable-2"; 78 | } else if (ch == "$") { 79 | stream.next(); 80 | stream.eatWhile(/[\w\?]/); 81 | return "variable-3"; 82 | } else if (/\w/.test(ch)) { 83 | stream.eatWhile(/[\w\?]/); 84 | if (stream.eat(":")) return "atom"; 85 | return "ident"; 86 | } else if (ch == "|" && (state.varList || state.lastTok == "{" || state.lastTok == "do")) { 87 | curPunc = "|"; 88 | return null; 89 | } else if (/[\(\)\[\]{}\\;]/.test(ch)) { 90 | curPunc = ch; 91 | return null; 92 | } else if (ch == "-" && stream.eat(">")) { 93 | return "arrow"; 94 | } else if (/[=+\-\/*:\.^%<>~|]/.test(ch)) { 95 | stream.eatWhile(/[=+\-\/*:\.^%<>~|]/); 96 | return "operator"; 97 | } else { 98 | return null; 99 | } 100 | } 101 | 102 | function tokenBaseUntilBrace() { 103 | var depth = 1; 104 | return function(stream, state) { 105 | if (stream.peek() == "}") { 106 | depth--; 107 | if (depth == 0) { 108 | state.tokenize.pop(); 109 | return state.tokenize[state.tokenize.length-1](stream, state); 110 | } 111 | } else if (stream.peek() == "{") { 112 | depth++; 113 | } 114 | return tokenBase(stream, state); 115 | }; 116 | } 117 | function readQuoted(quote, style, embed, unescaped) { 118 | return function(stream, state) { 119 | var escaped = false, ch; 120 | while ((ch = stream.next()) != null) { 121 | if (ch == quote && (unescaped || !escaped)) { 122 | state.tokenize.pop(); 123 | break; 124 | } 125 | if (embed && ch == "#" && !escaped && stream.eat("{")) { 126 | state.tokenize.push(tokenBaseUntilBrace(arguments.callee)); 127 | break; 128 | } 129 | escaped = !escaped && ch == "\\"; 130 | } 131 | return style; 132 | }; 133 | } 134 | function readHereDoc(phrase) { 135 | return function(stream, state) { 136 | if (stream.match(phrase)) state.tokenize.pop(); 137 | else stream.skipToEnd(); 138 | return "string"; 139 | }; 140 | } 141 | function readBlockComment(stream, state) { 142 | if (stream.sol() && stream.match("=end") && stream.eol()) 143 | state.tokenize.pop(); 144 | stream.skipToEnd(); 145 | return "comment"; 146 | } 147 | 148 | return { 149 | startState: function() { 150 | return {tokenize: [tokenBase], 151 | indented: 0, 152 | context: {type: "top", indented: -config.indentUnit}, 153 | continuedLine: false, 154 | lastTok: null, 155 | varList: false}; 156 | }, 157 | 158 | token: function(stream, state) { 159 | if (stream.sol()) state.indented = stream.indentation(); 160 | var style = state.tokenize[state.tokenize.length-1](stream, state), kwtype; 161 | if (style == "ident") { 162 | var word = stream.current(); 163 | style = keywords.propertyIsEnumerable(stream.current()) ? "keyword" 164 | : /^[A-Z]/.test(word) ? "tag" 165 | : (state.lastTok == "def" || state.lastTok == "class" || state.varList) ? "def" 166 | : "variable"; 167 | if (indentWords.propertyIsEnumerable(word)) kwtype = "indent"; 168 | else if (dedentWords.propertyIsEnumerable(word)) kwtype = "dedent"; 169 | else if ((word == "if" || word == "unless") && stream.column() == stream.indentation()) 170 | kwtype = "indent"; 171 | } 172 | if (curPunc || (style && style != "comment")) state.lastTok = word || curPunc || style; 173 | if (curPunc == "|") state.varList = !state.varList; 174 | 175 | if (kwtype == "indent" || /[\(\[\{]/.test(curPunc)) 176 | state.context = {prev: state.context, type: curPunc || style, indented: state.indented}; 177 | else if ((kwtype == "dedent" || /[\)\]\}]/.test(curPunc)) && state.context.prev) 178 | state.context = state.context.prev; 179 | 180 | if (stream.eol()) 181 | state.continuedLine = (curPunc == "\\" || style == "operator"); 182 | return style; 183 | }, 184 | 185 | indent: function(state, textAfter) { 186 | if (state.tokenize[state.tokenize.length-1] != tokenBase) return 0; 187 | var firstChar = textAfter && textAfter.charAt(0); 188 | var ct = state.context; 189 | var closing = ct.type == matching[firstChar] || 190 | ct.type == "keyword" && /^(?:end|until|else|elsif|when|rescue)\b/.test(textAfter); 191 | return ct.indented + (closing ? 0 : config.indentUnit) + 192 | (state.continuedLine ? config.indentUnit : 0); 193 | }, 194 | electricChars: "}de" // enD and rescuE 195 | 196 | }; 197 | }); 198 | 199 | CodeMirror.defineMIME("text/x-ruby", "ruby"); 200 | 201 | -------------------------------------------------------------------------------- /src/heso/static/lib/codemirror/mode/xml.js: -------------------------------------------------------------------------------- 1 | CodeMirror.defineMode("xml", function(config, parserConfig) { 2 | var indentUnit = config.indentUnit; 3 | var Kludges = parserConfig.htmlMode ? { 4 | autoSelfClosers: {"br": true, "img": true, "hr": true, "link": true, "input": true, 5 | "meta": true, "col": true, "frame": true, "base": true, "area": true}, 6 | doNotIndent: {"pre": true}, 7 | allowUnquoted: true 8 | } : {autoSelfClosers: {}, doNotIndent: {}, allowUnquoted: false}; 9 | var alignCDATA = parserConfig.alignCDATA; 10 | 11 | // Return variables for tokenizers 12 | var tagName, type; 13 | 14 | function inText(stream, state) { 15 | function chain(parser) { 16 | state.tokenize = parser; 17 | return parser(stream, state); 18 | } 19 | 20 | var ch = stream.next(); 21 | if (ch == "<") { 22 | if (stream.eat("!")) { 23 | if (stream.eat("[")) { 24 | if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>")); 25 | else return null; 26 | } 27 | else if (stream.match("--")) return chain(inBlock("comment", "-->")); 28 | else if (stream.match("DOCTYPE", true, true)) { 29 | stream.eatWhile(/[\w\._\-]/); 30 | return chain(doctype(1)); 31 | } 32 | else return null; 33 | } 34 | else if (stream.eat("?")) { 35 | stream.eatWhile(/[\w\._\-]/); 36 | state.tokenize = inBlock("meta", "?>"); 37 | return "meta"; 38 | } 39 | else { 40 | type = stream.eat("/") ? "closeTag" : "openTag"; 41 | stream.eatSpace(); 42 | tagName = ""; 43 | var c; 44 | while ((c = stream.eat(/[^\s\u00a0=<>\"\'\/?]/))) tagName += c; 45 | state.tokenize = inTag; 46 | return "tag"; 47 | } 48 | } 49 | else if (ch == "&") { 50 | var ok; 51 | if (stream.eat("#")) { 52 | if (stream.eat("x")) { 53 | ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";"); 54 | } else { 55 | ok = stream.eatWhile(/[\d]/) && stream.eat(";"); 56 | } 57 | } else { 58 | ok = stream.eatWhile(/[\w]/) && stream.eat(";"); 59 | } 60 | return ok ? "atom" : "error"; 61 | } 62 | else { 63 | stream.eatWhile(/[^&<]/); 64 | return null; 65 | } 66 | } 67 | 68 | function inTag(stream, state) { 69 | var ch = stream.next(); 70 | if (ch == ">" || (ch == "/" && stream.eat(">"))) { 71 | state.tokenize = inText; 72 | type = ch == ">" ? "endTag" : "selfcloseTag"; 73 | return "tag"; 74 | } 75 | else if (ch == "=") { 76 | type = "equals"; 77 | return null; 78 | } 79 | else if (/[\'\"]/.test(ch)) { 80 | state.tokenize = inAttribute(ch); 81 | return state.tokenize(stream, state); 82 | } 83 | else { 84 | stream.eatWhile(/[^\s\u00a0=<>\"\'\/?]/); 85 | return "word"; 86 | } 87 | } 88 | 89 | function inAttribute(quote) { 90 | return function(stream, state) { 91 | while (!stream.eol()) { 92 | if (stream.next() == quote) { 93 | state.tokenize = inTag; 94 | break; 95 | } 96 | } 97 | return "string"; 98 | }; 99 | } 100 | 101 | function inBlock(style, terminator) { 102 | return function(stream, state) { 103 | while (!stream.eol()) { 104 | if (stream.match(terminator)) { 105 | state.tokenize = inText; 106 | break; 107 | } 108 | stream.next(); 109 | } 110 | return style; 111 | }; 112 | } 113 | function doctype(depth) { 114 | return function(stream, state) { 115 | var ch; 116 | while ((ch = stream.next()) != null) { 117 | if (ch == "<") { 118 | state.tokenize = doctype(depth + 1); 119 | return state.tokenize(stream, state); 120 | } else if (ch == ">") { 121 | if (depth == 1) { 122 | state.tokenize = inText; 123 | break; 124 | } else { 125 | state.tokenize = doctype(depth - 1); 126 | return state.tokenize(stream, state); 127 | } 128 | } 129 | } 130 | return "meta"; 131 | }; 132 | } 133 | 134 | var curState, setStyle; 135 | function pass() { 136 | for (var i = arguments.length - 1; i >= 0; i--) curState.cc.push(arguments[i]); 137 | } 138 | function cont() { 139 | pass.apply(null, arguments); 140 | return true; 141 | } 142 | 143 | function pushContext(tagName, startOfLine) { 144 | var noIndent = Kludges.doNotIndent.hasOwnProperty(tagName) || (curState.context && curState.context.noIndent); 145 | curState.context = { 146 | prev: curState.context, 147 | tagName: tagName, 148 | indent: curState.indented, 149 | startOfLine: startOfLine, 150 | noIndent: noIndent 151 | }; 152 | } 153 | function popContext() { 154 | if (curState.context) curState.context = curState.context.prev; 155 | } 156 | 157 | function element(type) { 158 | if (type == "openTag") { 159 | curState.tagName = tagName; 160 | return cont(attributes, endtag(curState.startOfLine)); 161 | } else if (type == "closeTag") { 162 | var err = false; 163 | if (curState.context) { 164 | err = curState.context.tagName != tagName; 165 | } else { 166 | err = true; 167 | } 168 | if (err) setStyle = "error"; 169 | return cont(endclosetag(err)); 170 | } 171 | return cont(); 172 | } 173 | function endtag(startOfLine) { 174 | return function(type) { 175 | if (type == "selfcloseTag" || 176 | (type == "endTag" && Kludges.autoSelfClosers.hasOwnProperty(curState.tagName.toLowerCase()))) 177 | return cont(); 178 | if (type == "endTag") {pushContext(curState.tagName, startOfLine); return cont();} 179 | return cont(); 180 | }; 181 | } 182 | function endclosetag(err) { 183 | return function(type) { 184 | if (err) setStyle = "error"; 185 | if (type == "endTag") { popContext(); return cont(); } 186 | setStyle = "error"; 187 | return cont(arguments.callee); 188 | } 189 | } 190 | 191 | function attributes(type) { 192 | if (type == "word") {setStyle = "attribute"; return cont(attributes);} 193 | if (type == "equals") return cont(attvalue, attributes); 194 | if (type == "string") {setStyle = "error"; return cont(attributes);} 195 | return pass(); 196 | } 197 | function attvalue(type) { 198 | if (type == "word" && Kludges.allowUnquoted) {setStyle = "string"; return cont();} 199 | if (type == "string") return cont(attvaluemaybe); 200 | return pass(); 201 | } 202 | function attvaluemaybe(type) { 203 | if (type == "string") return cont(attvaluemaybe); 204 | else return pass(); 205 | } 206 | 207 | return { 208 | startState: function() { 209 | return {tokenize: inText, cc: [], indented: 0, startOfLine: true, tagName: null, context: null}; 210 | }, 211 | 212 | token: function(stream, state) { 213 | if (stream.sol()) { 214 | state.startOfLine = true; 215 | state.indented = stream.indentation(); 216 | } 217 | if (stream.eatSpace()) return null; 218 | 219 | setStyle = type = tagName = null; 220 | var style = state.tokenize(stream, state); 221 | state.type = type; 222 | if ((style || type) && style != "comment") { 223 | curState = state; 224 | while (true) { 225 | var comb = state.cc.pop() || element; 226 | if (comb(type || style)) break; 227 | } 228 | } 229 | state.startOfLine = false; 230 | return setStyle || style; 231 | }, 232 | 233 | indent: function(state, textAfter, fullLine) { 234 | var context = state.context; 235 | if ((state.tokenize != inTag && state.tokenize != inText) || 236 | context && context.noIndent) 237 | return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0; 238 | if (alignCDATA && / bestv: 231 | best = [dist] 232 | bestv = distv 233 | elif distv == bestv: 234 | best.append(dist) 235 | if best: 236 | best.sort() 237 | version = best[-1].version 238 | if version: 239 | requirement = '=='.join((requirement, version)) 240 | cmd.append(requirement) 241 | 242 | if is_jython: 243 | import subprocess 244 | exitcode = subprocess.Popen(cmd, env=env).wait() 245 | else: # Windows prefers this, apparently; otherwise we would prefer subprocess 246 | exitcode = os.spawnle(*([os.P_WAIT, sys.executable] + cmd + [env])) 247 | if exitcode != 0: 248 | sys.stdout.flush() 249 | sys.stderr.flush() 250 | print ("An error occurred when trying to install zc.buildout. " 251 | "Look above this message for any errors that " 252 | "were output by easy_install.") 253 | sys.exit(exitcode) 254 | 255 | ws.add_entry(eggs_dir) 256 | ws.require(requirement) 257 | import zc.buildout.buildout 258 | zc.buildout.buildout.main(args) 259 | if not options.eggs: # clean up temporary egg directory 260 | shutil.rmtree(eggs_dir) 261 | -------------------------------------------------------------------------------- /src/heso/static/lib/codemirror/mode/python.js: -------------------------------------------------------------------------------- 1 | CodeMirror.defineMode("python", function(conf, parserConf) { 2 | var ERRORCLASS = 'error'; 3 | 4 | function wordRegexp(words) { 5 | return new RegExp("^((" + words.join(")|(") + "))\\b"); 6 | } 7 | 8 | var singleOperators = new RegExp("^[\\+\\-\\*/%&|\\^~<>!]"); 9 | var singleDelimiters = new RegExp('^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]'); 10 | var doubleOperators = new RegExp("^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"); 11 | var doubleDelimiters = new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"); 12 | var tripleDelimiters = new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"); 13 | var identifiers = new RegExp("^[_A-Za-z][_A-Za-z0-9]*"); 14 | 15 | var wordOperators = wordRegexp(['and', 'or', 'not', 'is', 'in']); 16 | var commonkeywords = ['as', 'assert', 'break', 'class', 'continue', 17 | 'def', 'del', 'elif', 'else', 'except', 'finally', 18 | 'for', 'from', 'global', 'if', 'import', 19 | 'lambda', 'pass', 'raise', 'return', 20 | 'try', 'while', 'with', 'yield']; 21 | var commonBuiltins = ['abs', 'all', 'any', 'bin', 'bool', 'bytearray', 'callable', 'chr', 22 | 'classmethod', 'compile', 'complex', 'delattr', 'dict', 'dir', 'divmod', 23 | 'enumerate', 'eval', 'filter', 'float', 'format', 'frozenset', 24 | 'getattr', 'globals', 'hasattr', 'hash', 'help', 'hex', 'id', 25 | 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 26 | 'list', 'locals', 'map', 'max', 'memoryview', 'min', 'next', 27 | 'object', 'oct', 'open', 'ord', 'pow', 'property', 'range', 28 | 'repr', 'reversed', 'round', 'set', 'setattr', 'slice', 29 | 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 30 | 'type', 'vars', 'zip', '__import__', 'NotImplemented', 31 | 'Ellipsis', '__debug__']; 32 | var py2 = {'builtins': ['apply', 'basestring', 'buffer', 'cmp', 'coerce', 'execfile', 33 | 'file', 'intern', 'long', 'raw_input', 'reduce', 'reload', 34 | 'unichr', 'unicode', 'xrange', 'False', 'True', 'None'], 35 | 'keywords': ['exec', 'print']}; 36 | var py3 = {'builtins': ['ascii', 'bytes', 'exec', 'print'], 37 | 'keywords': ['nonlocal', 'False', 'True', 'None']}; 38 | 39 | if (!!parserConf.version && parseInt(parserConf.version, 10) === 3) { 40 | commonkeywords = commonkeywords.concat(py3.keywords); 41 | commonBuiltins = commonBuiltins.concat(py3.builtins); 42 | var stringPrefixes = new RegExp("^(([rb]|(br))?('{3}|\"{3}|['\"]))", "i"); 43 | } else { 44 | commonkeywords = commonkeywords.concat(py2.keywords); 45 | commonBuiltins = commonBuiltins.concat(py2.builtins); 46 | var stringPrefixes = new RegExp("^(([rub]|(ur)|(br))?('{3}|\"{3}|['\"]))", "i"); 47 | } 48 | var keywords = wordRegexp(commonkeywords); 49 | var builtins = wordRegexp(commonBuiltins); 50 | 51 | var indentInfo = null; 52 | 53 | // tokenizers 54 | function tokenBase(stream, state) { 55 | // Handle scope changes 56 | if (stream.sol()) { 57 | var scopeOffset = state.scopes[0].offset; 58 | if (stream.eatSpace()) { 59 | var lineOffset = stream.indentation(); 60 | if (lineOffset > scopeOffset) { 61 | indentInfo = 'indent'; 62 | } else if (lineOffset < scopeOffset) { 63 | indentInfo = 'dedent'; 64 | } 65 | return null; 66 | } else { 67 | if (scopeOffset > 0) { 68 | dedent(stream, state); 69 | } 70 | } 71 | } 72 | if (stream.eatSpace()) { 73 | return null; 74 | } 75 | 76 | var ch = stream.peek(); 77 | 78 | // Handle Comments 79 | if (ch === '#') { 80 | stream.skipToEnd(); 81 | return 'comment'; 82 | } 83 | 84 | // Handle Number Literals 85 | if (stream.match(/^[0-9\.]/, false)) { 86 | var floatLiteral = false; 87 | // Floats 88 | if (stream.match(/^\d*\.\d+(e[\+\-]?\d+)?/i)) { floatLiteral = true; } 89 | if (stream.match(/^\d+\.\d*/)) { floatLiteral = true; } 90 | if (stream.match(/^\.\d+/)) { floatLiteral = true; } 91 | if (floatLiteral) { 92 | // Float literals may be "imaginary" 93 | stream.eat(/J/i); 94 | return 'number'; 95 | } 96 | // Integers 97 | var intLiteral = false; 98 | // Hex 99 | if (stream.match(/^0x[0-9a-f]+/i)) { intLiteral = true; } 100 | // Binary 101 | if (stream.match(/^0b[01]+/i)) { intLiteral = true; } 102 | // Octal 103 | if (stream.match(/^0o[0-7]+/i)) { intLiteral = true; } 104 | // Decimal 105 | if (stream.match(/^[1-9]\d*(e[\+\-]?\d+)?/)) { 106 | // Decimal literals may be "imaginary" 107 | stream.eat(/J/i); 108 | // TODO - Can you have imaginary longs? 109 | intLiteral = true; 110 | } 111 | // Zero by itself with no other piece of number. 112 | if (stream.match(/^0(?![\dx])/i)) { intLiteral = true; } 113 | if (intLiteral) { 114 | // Integer literals may be "long" 115 | stream.eat(/L/i); 116 | return 'number'; 117 | } 118 | } 119 | 120 | // Handle Strings 121 | if (stream.match(stringPrefixes)) { 122 | state.tokenize = tokenStringFactory(stream.current()); 123 | return state.tokenize(stream, state); 124 | } 125 | 126 | // Handle operators and Delimiters 127 | if (stream.match(tripleDelimiters) || stream.match(doubleDelimiters)) { 128 | return null; 129 | } 130 | if (stream.match(doubleOperators) 131 | || stream.match(singleOperators) 132 | || stream.match(wordOperators)) { 133 | return 'operator'; 134 | } 135 | if (stream.match(singleDelimiters)) { 136 | return null; 137 | } 138 | 139 | if (stream.match(keywords)) { 140 | return 'keyword'; 141 | } 142 | 143 | if (stream.match(builtins)) { 144 | return 'builtin'; 145 | } 146 | 147 | if (stream.match(identifiers)) { 148 | return 'variable'; 149 | } 150 | 151 | // Handle non-detected items 152 | stream.next(); 153 | return ERRORCLASS; 154 | } 155 | 156 | function tokenStringFactory(delimiter) { 157 | while ('rub'.indexOf(delimiter.charAt(0).toLowerCase()) >= 0) { 158 | delimiter = delimiter.substr(1); 159 | } 160 | var singleline = delimiter.length == 1; 161 | var OUTCLASS = 'string'; 162 | 163 | return function tokenString(stream, state) { 164 | while (!stream.eol()) { 165 | stream.eatWhile(/[^'"\\]/); 166 | if (stream.eat('\\')) { 167 | stream.next(); 168 | if (singleline && stream.eol()) { 169 | return OUTCLASS; 170 | } 171 | } else if (stream.match(delimiter)) { 172 | state.tokenize = tokenBase; 173 | return OUTCLASS; 174 | } else { 175 | stream.eat(/['"]/); 176 | } 177 | } 178 | if (singleline) { 179 | if (parserConf.singleLineStringErrors) { 180 | return ERRORCLASS; 181 | } else { 182 | state.tokenize = tokenBase; 183 | } 184 | } 185 | return OUTCLASS; 186 | }; 187 | } 188 | 189 | function indent(stream, state, type) { 190 | type = type || 'py'; 191 | var indentUnit = 0; 192 | if (type === 'py') { 193 | if (state.scopes[0].type !== 'py') { 194 | state.scopes[0].offset = stream.indentation(); 195 | return; 196 | } 197 | for (var i = 0; i < state.scopes.length; ++i) { 198 | if (state.scopes[i].type === 'py') { 199 | indentUnit = state.scopes[i].offset + conf.indentUnit; 200 | break; 201 | } 202 | } 203 | } else { 204 | indentUnit = stream.column() + stream.current().length; 205 | } 206 | state.scopes.unshift({ 207 | offset: indentUnit, 208 | type: type 209 | }); 210 | } 211 | 212 | function dedent(stream, state, type) { 213 | type = type || 'py'; 214 | if (state.scopes.length == 1) return; 215 | if (state.scopes[0].type === 'py') { 216 | var _indent = stream.indentation(); 217 | var _indent_index = -1; 218 | for (var i = 0; i < state.scopes.length; ++i) { 219 | if (_indent === state.scopes[i].offset) { 220 | _indent_index = i; 221 | break; 222 | } 223 | } 224 | if (_indent_index === -1) { 225 | return true; 226 | } 227 | while (state.scopes[0].offset !== _indent) { 228 | state.scopes.shift(); 229 | } 230 | return false 231 | } else { 232 | if (type === 'py') { 233 | state.scopes[0].offset = stream.indentation(); 234 | return false; 235 | } else { 236 | if (state.scopes[0].type != type) { 237 | return true; 238 | } 239 | state.scopes.shift(); 240 | return false; 241 | } 242 | } 243 | } 244 | 245 | function tokenLexer(stream, state) { 246 | indentInfo = null; 247 | var style = state.tokenize(stream, state); 248 | var current = stream.current(); 249 | 250 | // Handle '.' connected identifiers 251 | if (current === '.') { 252 | style = state.tokenize(stream, state); 253 | current = stream.current(); 254 | if (style === 'variable' || style === 'builtin') { 255 | return 'variable'; 256 | } else { 257 | return ERRORCLASS; 258 | } 259 | } 260 | 261 | // Handle decorators 262 | if (current === '@') { 263 | style = state.tokenize(stream, state); 264 | current = stream.current(); 265 | if (style === 'variable' 266 | || current === '@staticmethod' 267 | || current === '@classmethod') { 268 | return 'meta'; 269 | } else { 270 | return ERRORCLASS; 271 | } 272 | } 273 | 274 | // Handle scope changes. 275 | if (current === 'pass' || current === 'return') { 276 | state.dedent += 1; 277 | } 278 | if ((current === ':' && !state.lambda && state.scopes[0].type == 'py') 279 | || indentInfo === 'indent') { 280 | indent(stream, state); 281 | } 282 | var delimiter_index = '[({'.indexOf(current); 283 | if (delimiter_index !== -1) { 284 | indent(stream, state, '])}'.slice(delimiter_index, delimiter_index+1)); 285 | } 286 | if (indentInfo === 'dedent') { 287 | if (dedent(stream, state)) { 288 | return ERRORCLASS; 289 | } 290 | } 291 | delimiter_index = '])}'.indexOf(current); 292 | if (delimiter_index !== -1) { 293 | if (dedent(stream, state, current)) { 294 | return ERRORCLASS; 295 | } 296 | } 297 | if (state.dedent > 0 && stream.eol() && state.scopes[0].type == 'py') { 298 | if (state.scopes.length > 1) state.scopes.shift(); 299 | state.dedent -= 1; 300 | } 301 | 302 | return style; 303 | } 304 | 305 | var external = { 306 | startState: function(basecolumn) { 307 | return { 308 | tokenize: tokenBase, 309 | scopes: [{offset:basecolumn || 0, type:'py'}], 310 | lastToken: null, 311 | lambda: false, 312 | dedent: 0 313 | }; 314 | }, 315 | 316 | token: function(stream, state) { 317 | var style = tokenLexer(stream, state); 318 | 319 | state.lastToken = {style:style, content: stream.current()}; 320 | 321 | if (stream.eol() && stream.lambda) { 322 | state.lambda = false; 323 | } 324 | 325 | return style; 326 | }, 327 | 328 | indent: function(state, textAfter) { 329 | if (state.tokenize != tokenBase) { 330 | return 0; 331 | } 332 | 333 | return state.scopes[0].offset; 334 | } 335 | 336 | }; 337 | return external; 338 | }); 339 | 340 | CodeMirror.defineMIME("text/x-python", "python"); 341 | -------------------------------------------------------------------------------- /src/heso/static/lib/codemirror/mode/javascript.js: -------------------------------------------------------------------------------- 1 | CodeMirror.defineMode("javascript", function(config, parserConfig) { 2 | var indentUnit = config.indentUnit; 3 | var jsonMode = parserConfig.json; 4 | 5 | // Tokenizer 6 | 7 | var keywords = function(){ 8 | function kw(type) {return {type: type, style: "keyword"};} 9 | var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"); 10 | var operator = kw("operator"), atom = {type: "atom", style: "atom"}; 11 | return { 12 | "if": A, "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B, 13 | "return": C, "break": C, "continue": C, "new": C, "delete": C, "throw": C, 14 | "var": kw("var"), "const": kw("var"), "let": kw("var"), 15 | "function": kw("function"), "catch": kw("catch"), 16 | "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"), 17 | "in": operator, "typeof": operator, "instanceof": operator, 18 | "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom 19 | }; 20 | }(); 21 | 22 | var isOperatorChar = /[+\-*&%=<>!?|]/; 23 | 24 | function chain(stream, state, f) { 25 | state.tokenize = f; 26 | return f(stream, state); 27 | } 28 | 29 | function nextUntilUnescaped(stream, end) { 30 | var escaped = false, next; 31 | while ((next = stream.next()) != null) { 32 | if (next == end && !escaped) 33 | return false; 34 | escaped = !escaped && next == "\\"; 35 | } 36 | return escaped; 37 | } 38 | 39 | // Used as scratch variables to communicate multiple values without 40 | // consing up tons of objects. 41 | var type, content; 42 | function ret(tp, style, cont) { 43 | type = tp; content = cont; 44 | return style; 45 | } 46 | 47 | function jsTokenBase(stream, state) { 48 | var ch = stream.next(); 49 | if (ch == '"' || ch == "'") 50 | return chain(stream, state, jsTokenString(ch)); 51 | else if (/[\[\]{}\(\),;\:\.]/.test(ch)) 52 | return ret(ch); 53 | else if (ch == "0" && stream.eat(/x/i)) { 54 | stream.eatWhile(/[\da-f]/i); 55 | return ret("number", "number"); 56 | } 57 | else if (/\d/.test(ch)) { 58 | stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/); 59 | return ret("number", "number"); 60 | } 61 | else if (ch == "/") { 62 | if (stream.eat("*")) { 63 | return chain(stream, state, jsTokenComment); 64 | } 65 | else if (stream.eat("/")) { 66 | stream.skipToEnd(); 67 | return ret("comment", "comment"); 68 | } 69 | else if (state.reAllowed) { 70 | nextUntilUnescaped(stream, "/"); 71 | stream.eatWhile(/[gimy]/); // 'y' is "sticky" option in Mozilla 72 | return ret("regexp", "string-2"); 73 | } 74 | else { 75 | stream.eatWhile(isOperatorChar); 76 | return ret("operator", null, stream.current()); 77 | } 78 | } 79 | else if (ch == "#") { 80 | stream.skipToEnd(); 81 | return ret("error", "error"); 82 | } 83 | else if (isOperatorChar.test(ch)) { 84 | stream.eatWhile(isOperatorChar); 85 | return ret("operator", null, stream.current()); 86 | } 87 | else { 88 | stream.eatWhile(/[\w\$_]/); 89 | var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word]; 90 | return (known && state.kwAllowed) ? ret(known.type, known.style, word) : 91 | ret("variable", "variable", word); 92 | } 93 | } 94 | 95 | function jsTokenString(quote) { 96 | return function(stream, state) { 97 | if (!nextUntilUnescaped(stream, quote)) 98 | state.tokenize = jsTokenBase; 99 | return ret("string", "string"); 100 | }; 101 | } 102 | 103 | function jsTokenComment(stream, state) { 104 | var maybeEnd = false, ch; 105 | while (ch = stream.next()) { 106 | if (ch == "/" && maybeEnd) { 107 | state.tokenize = jsTokenBase; 108 | break; 109 | } 110 | maybeEnd = (ch == "*"); 111 | } 112 | return ret("comment", "comment"); 113 | } 114 | 115 | // Parser 116 | 117 | var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true}; 118 | 119 | function JSLexical(indented, column, type, align, prev, info) { 120 | this.indented = indented; 121 | this.column = column; 122 | this.type = type; 123 | this.prev = prev; 124 | this.info = info; 125 | if (align != null) this.align = align; 126 | } 127 | 128 | function inScope(state, varname) { 129 | for (var v = state.localVars; v; v = v.next) 130 | if (v.name == varname) return true; 131 | } 132 | 133 | function parseJS(state, style, type, content, stream) { 134 | var cc = state.cc; 135 | // Communicate our context to the combinators. 136 | // (Less wasteful than consing up a hundred closures on every call.) 137 | cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; 138 | 139 | if (!state.lexical.hasOwnProperty("align")) 140 | state.lexical.align = true; 141 | 142 | while(true) { 143 | var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement; 144 | if (combinator(type, content)) { 145 | while(cc.length && cc[cc.length - 1].lex) 146 | cc.pop()(); 147 | if (cx.marked) return cx.marked; 148 | if (type == "variable" && inScope(state, content)) return "variable-2"; 149 | return style; 150 | } 151 | } 152 | } 153 | 154 | // Combinator utils 155 | 156 | var cx = {state: null, column: null, marked: null, cc: null}; 157 | function pass() { 158 | for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]); 159 | } 160 | function cont() { 161 | pass.apply(null, arguments); 162 | return true; 163 | } 164 | function register(varname) { 165 | var state = cx.state; 166 | if (state.context) { 167 | cx.marked = "def"; 168 | for (var v = state.localVars; v; v = v.next) 169 | if (v.name == varname) return; 170 | state.localVars = {name: varname, next: state.localVars}; 171 | } 172 | } 173 | 174 | // Combinators 175 | 176 | var defaultVars = {name: "this", next: {name: "arguments"}}; 177 | function pushcontext() { 178 | if (!cx.state.context) cx.state.localVars = defaultVars; 179 | cx.state.context = {prev: cx.state.context, vars: cx.state.localVars}; 180 | } 181 | function popcontext() { 182 | cx.state.localVars = cx.state.context.vars; 183 | cx.state.context = cx.state.context.prev; 184 | } 185 | function pushlex(type, info) { 186 | var result = function() { 187 | var state = cx.state; 188 | state.lexical = new JSLexical(state.indented, cx.stream.column(), type, null, state.lexical, info) 189 | }; 190 | result.lex = true; 191 | return result; 192 | } 193 | function poplex() { 194 | var state = cx.state; 195 | if (state.lexical.prev) { 196 | if (state.lexical.type == ")") 197 | state.indented = state.lexical.indented; 198 | state.lexical = state.lexical.prev; 199 | } 200 | } 201 | poplex.lex = true; 202 | 203 | function expect(wanted) { 204 | return function expecting(type) { 205 | if (type == wanted) return cont(); 206 | else if (wanted == ";") return pass(); 207 | else return cont(arguments.callee); 208 | }; 209 | } 210 | 211 | function statement(type) { 212 | if (type == "var") return cont(pushlex("vardef"), vardef1, expect(";"), poplex); 213 | if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex); 214 | if (type == "keyword b") return cont(pushlex("form"), statement, poplex); 215 | if (type == "{") return cont(pushlex("}"), block, poplex); 216 | if (type == ";") return cont(); 217 | if (type == "function") return cont(functiondef); 218 | if (type == "for") return cont(pushlex("form"), expect("("), pushlex(")"), forspec1, expect(")"), 219 | poplex, statement, poplex); 220 | if (type == "variable") return cont(pushlex("stat"), maybelabel); 221 | if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"), 222 | block, poplex, poplex); 223 | if (type == "case") return cont(expression, expect(":")); 224 | if (type == "default") return cont(expect(":")); 225 | if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"), 226 | statement, poplex, popcontext); 227 | return pass(pushlex("stat"), expression, expect(";"), poplex); 228 | } 229 | function expression(type) { 230 | if (atomicTypes.hasOwnProperty(type)) return cont(maybeoperator); 231 | if (type == "function") return cont(functiondef); 232 | if (type == "keyword c") return cont(maybeexpression); 233 | if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeoperator); 234 | if (type == "operator") return cont(expression); 235 | if (type == "[") return cont(pushlex("]"), commasep(expression, "]"), poplex, maybeoperator); 236 | if (type == "{") return cont(pushlex("}"), commasep(objprop, "}"), poplex, maybeoperator); 237 | return cont(); 238 | } 239 | function maybeexpression(type) { 240 | if (type.match(/[;\}\)\],]/)) return pass(); 241 | return pass(expression); 242 | } 243 | 244 | function maybeoperator(type, value) { 245 | if (type == "operator" && /\+\+|--/.test(value)) return cont(maybeoperator); 246 | if (type == "operator") return cont(expression); 247 | if (type == ";") return; 248 | if (type == "(") return cont(pushlex(")"), commasep(expression, ")"), poplex, maybeoperator); 249 | if (type == ".") return cont(property, maybeoperator); 250 | if (type == "[") return cont(pushlex("]"), expression, expect("]"), poplex, maybeoperator); 251 | } 252 | function maybelabel(type) { 253 | if (type == ":") return cont(poplex, statement); 254 | return pass(maybeoperator, expect(";"), poplex); 255 | } 256 | function property(type) { 257 | if (type == "variable") {cx.marked = "property"; return cont();} 258 | } 259 | function objprop(type) { 260 | if (type == "variable") cx.marked = "property"; 261 | if (atomicTypes.hasOwnProperty(type)) return cont(expect(":"), expression); 262 | } 263 | function commasep(what, end) { 264 | function proceed(type) { 265 | if (type == ",") return cont(what, proceed); 266 | if (type == end) return cont(); 267 | return cont(expect(end)); 268 | } 269 | return function commaSeparated(type) { 270 | if (type == end) return cont(); 271 | else return pass(what, proceed); 272 | }; 273 | } 274 | function block(type) { 275 | if (type == "}") return cont(); 276 | return pass(statement, block); 277 | } 278 | function vardef1(type, value) { 279 | if (type == "variable"){register(value); return cont(vardef2);} 280 | return cont(); 281 | } 282 | function vardef2(type, value) { 283 | if (value == "=") return cont(expression, vardef2); 284 | if (type == ",") return cont(vardef1); 285 | } 286 | function forspec1(type) { 287 | if (type == "var") return cont(vardef1, forspec2); 288 | if (type == ";") return pass(forspec2); 289 | if (type == "variable") return cont(formaybein); 290 | return pass(forspec2); 291 | } 292 | function formaybein(type, value) { 293 | if (value == "in") return cont(expression); 294 | return cont(maybeoperator, forspec2); 295 | } 296 | function forspec2(type, value) { 297 | if (type == ";") return cont(forspec3); 298 | if (value == "in") return cont(expression); 299 | return cont(expression, expect(";"), forspec3); 300 | } 301 | function forspec3(type) { 302 | if (type != ")") cont(expression); 303 | } 304 | function functiondef(type, value) { 305 | if (type == "variable") {register(value); return cont(functiondef);} 306 | if (type == "(") return cont(pushlex(")"), pushcontext, commasep(funarg, ")"), poplex, statement, popcontext); 307 | } 308 | function funarg(type, value) { 309 | if (type == "variable") {register(value); return cont();} 310 | } 311 | 312 | // Interface 313 | 314 | return { 315 | startState: function(basecolumn) { 316 | return { 317 | tokenize: jsTokenBase, 318 | reAllowed: true, 319 | kwAllowed: true, 320 | cc: [], 321 | lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false), 322 | localVars: null, 323 | context: null, 324 | indented: 0 325 | }; 326 | }, 327 | 328 | token: function(stream, state) { 329 | if (stream.sol()) { 330 | if (!state.lexical.hasOwnProperty("align")) 331 | state.lexical.align = false; 332 | state.indented = stream.indentation(); 333 | } 334 | if (stream.eatSpace()) return null; 335 | var style = state.tokenize(stream, state); 336 | if (type == "comment") return style; 337 | state.reAllowed = type == "operator" || type == "keyword c" || type.match(/^[\[{}\(,;:]$/); 338 | state.kwAllowed = type != '.'; 339 | return parseJS(state, style, type, content, stream); 340 | }, 341 | 342 | indent: function(state, textAfter) { 343 | if (state.tokenize != jsTokenBase) return 0; 344 | var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, 345 | type = lexical.type, closing = firstChar == type; 346 | if (type == "vardef") return lexical.indented + 4; 347 | else if (type == "form" && firstChar == "{") return lexical.indented; 348 | else if (type == "stat" || type == "form") return lexical.indented + indentUnit; 349 | else if (lexical.info == "switch" && !closing) 350 | return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit); 351 | else if (lexical.align) return lexical.column + (closing ? 0 : 1); 352 | else return lexical.indented + (closing ? 0 : indentUnit); 353 | }, 354 | 355 | electricChars: ":{}" 356 | }; 357 | }); 358 | 359 | CodeMirror.defineMIME("text/javascript", "javascript"); 360 | CodeMirror.defineMIME("application/json", {name: "javascript", json: true}); 361 | -------------------------------------------------------------------------------- /src/heso/static/lib/bootstrap/bootstrap.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v2.0.1 3 | * 4 | * Copyright 2012 Twitter, Inc 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Designed and built with all the love in the world @twitter by @mdo and @fat. 9 | */ 10 | article, 11 | aside, 12 | details, 13 | figcaption, 14 | figure, 15 | footer, 16 | header, 17 | hgroup, 18 | nav, 19 | section { 20 | display: block; 21 | } 22 | audio, canvas, video { 23 | display: inline-block; 24 | *display: inline; 25 | *zoom: 1; 26 | } 27 | audio:not([controls]) { 28 | display: none; 29 | } 30 | html { 31 | font-size: 100%; 32 | -webkit-text-size-adjust: 100%; 33 | -ms-text-size-adjust: 100%; 34 | } 35 | a:focus { 36 | outline: thin dotted #333; 37 | outline: 5px auto -webkit-focus-ring-color; 38 | outline-offset: -2px; 39 | } 40 | a:hover, a:active { 41 | outline: 0; 42 | } 43 | sub, sup { 44 | position: relative; 45 | font-size: 75%; 46 | line-height: 0; 47 | vertical-align: baseline; 48 | } 49 | sup { 50 | top: -0.5em; 51 | } 52 | sub { 53 | bottom: -0.25em; 54 | } 55 | img { 56 | max-width: 100%; 57 | height: auto; 58 | border: 0; 59 | -ms-interpolation-mode: bicubic; 60 | } 61 | button, 62 | input, 63 | select, 64 | textarea { 65 | margin: 0; 66 | font-size: 100%; 67 | vertical-align: middle; 68 | } 69 | button, input { 70 | *overflow: visible; 71 | line-height: normal; 72 | } 73 | button::-moz-focus-inner, input::-moz-focus-inner { 74 | padding: 0; 75 | border: 0; 76 | } 77 | button, 78 | input[type="button"], 79 | input[type="reset"], 80 | input[type="submit"] { 81 | cursor: pointer; 82 | -webkit-appearance: button; 83 | } 84 | input[type="search"] { 85 | -webkit-appearance: textfield; 86 | -webkit-box-sizing: content-box; 87 | -moz-box-sizing: content-box; 88 | box-sizing: content-box; 89 | } 90 | input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button { 91 | -webkit-appearance: none; 92 | } 93 | textarea { 94 | overflow: auto; 95 | vertical-align: top; 96 | } 97 | .clearfix { 98 | *zoom: 1; 99 | } 100 | .clearfix:before, .clearfix:after { 101 | display: table; 102 | content: ""; 103 | } 104 | .clearfix:after { 105 | clear: both; 106 | } 107 | body { 108 | margin: 0; 109 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 110 | font-size: 13px; 111 | line-height: 18px; 112 | color: #333333; 113 | background-color: #ffffff; 114 | } 115 | a { 116 | color: #0088cc; 117 | text-decoration: none; 118 | } 119 | a:hover { 120 | color: #005580; 121 | text-decoration: underline; 122 | } 123 | .row { 124 | margin-left: -20px; 125 | *zoom: 1; 126 | } 127 | .row:before, .row:after { 128 | display: table; 129 | content: ""; 130 | } 131 | .row:after { 132 | clear: both; 133 | } 134 | [class*="span"] { 135 | float: left; 136 | margin-left: 20px; 137 | } 138 | .span1 { 139 | width: 60px; 140 | } 141 | .span2 { 142 | width: 140px; 143 | } 144 | .span3 { 145 | width: 220px; 146 | } 147 | .span4 { 148 | width: 300px; 149 | } 150 | .span5 { 151 | width: 380px; 152 | } 153 | .span6 { 154 | width: 460px; 155 | } 156 | .span7 { 157 | width: 540px; 158 | } 159 | .span8 { 160 | width: 620px; 161 | } 162 | .span9 { 163 | width: 700px; 164 | } 165 | .span10 { 166 | width: 780px; 167 | } 168 | .span11 { 169 | width: 860px; 170 | } 171 | .span12, .container { 172 | width: 940px; 173 | } 174 | .offset1 { 175 | margin-left: 100px; 176 | } 177 | .offset2 { 178 | margin-left: 180px; 179 | } 180 | .offset3 { 181 | margin-left: 260px; 182 | } 183 | .offset4 { 184 | margin-left: 340px; 185 | } 186 | .offset5 { 187 | margin-left: 420px; 188 | } 189 | .offset6 { 190 | margin-left: 500px; 191 | } 192 | .offset7 { 193 | margin-left: 580px; 194 | } 195 | .offset8 { 196 | margin-left: 660px; 197 | } 198 | .offset9 { 199 | margin-left: 740px; 200 | } 201 | .offset10 { 202 | margin-left: 820px; 203 | } 204 | .offset11 { 205 | margin-left: 900px; 206 | } 207 | .row-fluid { 208 | width: 100%; 209 | *zoom: 1; 210 | } 211 | .row-fluid:before, .row-fluid:after { 212 | display: table; 213 | content: ""; 214 | } 215 | .row-fluid:after { 216 | clear: both; 217 | } 218 | .row-fluid > [class*="span"] { 219 | float: left; 220 | margin-left: 2.127659574%; 221 | } 222 | .row-fluid > [class*="span"]:first-child { 223 | margin-left: 0; 224 | } 225 | .row-fluid > .span1 { 226 | width: 6.382978723%; 227 | } 228 | .row-fluid > .span2 { 229 | width: 14.89361702%; 230 | } 231 | .row-fluid > .span3 { 232 | width: 23.404255317%; 233 | } 234 | .row-fluid > .span4 { 235 | width: 31.914893614%; 236 | } 237 | .row-fluid > .span5 { 238 | width: 40.425531911%; 239 | } 240 | .row-fluid > .span6 { 241 | width: 48.93617020799999%; 242 | } 243 | .row-fluid > .span7 { 244 | width: 57.446808505%; 245 | } 246 | .row-fluid > .span8 { 247 | width: 65.95744680199999%; 248 | } 249 | .row-fluid > .span9 { 250 | width: 74.468085099%; 251 | } 252 | .row-fluid > .span10 { 253 | width: 82.97872339599999%; 254 | } 255 | .row-fluid > .span11 { 256 | width: 91.489361693%; 257 | } 258 | .row-fluid > .span12 { 259 | width: 99.99999998999999%; 260 | } 261 | .container { 262 | width: 940px; 263 | margin-left: auto; 264 | margin-right: auto; 265 | *zoom: 1; 266 | } 267 | .container:before, .container:after { 268 | display: table; 269 | content: ""; 270 | } 271 | .container:after { 272 | clear: both; 273 | } 274 | .container-fluid { 275 | padding-left: 20px; 276 | padding-right: 20px; 277 | *zoom: 1; 278 | } 279 | .container-fluid:before, .container-fluid:after { 280 | display: table; 281 | content: ""; 282 | } 283 | .container-fluid:after { 284 | clear: both; 285 | } 286 | p { 287 | margin: 0 0 9px; 288 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 289 | font-size: 13px; 290 | line-height: 18px; 291 | } 292 | p small { 293 | font-size: 11px; 294 | color: #999999; 295 | } 296 | .lead { 297 | margin-bottom: 18px; 298 | font-size: 20px; 299 | font-weight: 200; 300 | line-height: 27px; 301 | } 302 | h1, 303 | h2, 304 | h3, 305 | h4, 306 | h5, 307 | h6 { 308 | margin: 0; 309 | font-weight: bold; 310 | color: #333333; 311 | text-rendering: optimizelegibility; 312 | } 313 | h1 small, 314 | h2 small, 315 | h3 small, 316 | h4 small, 317 | h5 small, 318 | h6 small { 319 | font-weight: normal; 320 | color: #999999; 321 | } 322 | h1 { 323 | font-size: 30px; 324 | line-height: 36px; 325 | } 326 | h1 small { 327 | font-size: 18px; 328 | } 329 | h2 { 330 | font-size: 24px; 331 | line-height: 36px; 332 | } 333 | h2 small { 334 | font-size: 18px; 335 | } 336 | h3 { 337 | line-height: 27px; 338 | font-size: 18px; 339 | } 340 | h3 small { 341 | font-size: 14px; 342 | } 343 | h4, h5, h6 { 344 | line-height: 18px; 345 | } 346 | h4 { 347 | font-size: 14px; 348 | } 349 | h4 small { 350 | font-size: 12px; 351 | } 352 | h5 { 353 | font-size: 12px; 354 | } 355 | h6 { 356 | font-size: 11px; 357 | color: #999999; 358 | text-transform: uppercase; 359 | } 360 | .page-header { 361 | padding-bottom: 17px; 362 | margin: 18px 0; 363 | border-bottom: 1px solid #eeeeee; 364 | } 365 | .page-header h1 { 366 | line-height: 1; 367 | } 368 | ul, ol { 369 | padding: 0; 370 | margin: 0 0 9px 25px; 371 | } 372 | ul ul, 373 | ul ol, 374 | ol ol, 375 | ol ul { 376 | margin-bottom: 0; 377 | } 378 | ul { 379 | list-style: disc; 380 | } 381 | ol { 382 | list-style: decimal; 383 | } 384 | li { 385 | line-height: 18px; 386 | } 387 | ul.unstyled, ol.unstyled { 388 | margin-left: 0; 389 | list-style: none; 390 | } 391 | dl { 392 | margin-bottom: 18px; 393 | } 394 | dt, dd { 395 | line-height: 18px; 396 | } 397 | dt { 398 | font-weight: bold; 399 | } 400 | dd { 401 | margin-left: 9px; 402 | } 403 | hr { 404 | margin: 18px 0; 405 | border: 0; 406 | border-top: 1px solid #eeeeee; 407 | border-bottom: 1px solid #ffffff; 408 | } 409 | strong { 410 | font-weight: bold; 411 | } 412 | em { 413 | font-style: italic; 414 | } 415 | .muted { 416 | color: #999999; 417 | } 418 | abbr { 419 | font-size: 90%; 420 | text-transform: uppercase; 421 | border-bottom: 1px dotted #ddd; 422 | cursor: help; 423 | } 424 | blockquote { 425 | padding: 0 0 0 15px; 426 | margin: 0 0 18px; 427 | border-left: 5px solid #eeeeee; 428 | } 429 | blockquote p { 430 | margin-bottom: 0; 431 | font-size: 16px; 432 | font-weight: 300; 433 | line-height: 22.5px; 434 | } 435 | blockquote small { 436 | display: block; 437 | line-height: 18px; 438 | color: #999999; 439 | } 440 | blockquote small:before { 441 | content: '\2014 \00A0'; 442 | } 443 | blockquote.pull-right { 444 | float: right; 445 | padding-left: 0; 446 | padding-right: 15px; 447 | border-left: 0; 448 | border-right: 5px solid #eeeeee; 449 | } 450 | blockquote.pull-right p, blockquote.pull-right small { 451 | text-align: right; 452 | } 453 | q:before, 454 | q:after, 455 | blockquote:before, 456 | blockquote:after { 457 | content: ""; 458 | } 459 | address { 460 | display: block; 461 | margin-bottom: 18px; 462 | line-height: 18px; 463 | font-style: normal; 464 | } 465 | small { 466 | font-size: 100%; 467 | } 468 | cite { 469 | font-style: normal; 470 | } 471 | code, pre { 472 | padding: 0 3px 2px; 473 | font-family: Menlo, Monaco, "Courier New", monospace; 474 | font-size: 12px; 475 | color: #333333; 476 | -webkit-border-radius: 3px; 477 | -moz-border-radius: 3px; 478 | border-radius: 3px; 479 | } 480 | code { 481 | padding: 3px 4px; 482 | color: #d14; 483 | background-color: #f7f7f9; 484 | border: 1px solid #e1e1e8; 485 | } 486 | pre { 487 | display: block; 488 | padding: 8.5px; 489 | margin: 0 0 9px; 490 | font-size: 12px; 491 | line-height: 18px; 492 | background-color: #f5f5f5; 493 | border: 1px solid #ccc; 494 | border: 1px solid rgba(0, 0, 0, 0.15); 495 | -webkit-border-radius: 4px; 496 | -moz-border-radius: 4px; 497 | border-radius: 4px; 498 | white-space: pre; 499 | white-space: pre-wrap; 500 | word-break: break-all; 501 | word-wrap: break-word; 502 | } 503 | pre.prettyprint { 504 | margin-bottom: 18px; 505 | } 506 | pre code { 507 | padding: 0; 508 | color: inherit; 509 | background-color: transparent; 510 | border: 0; 511 | } 512 | .pre-scrollable { 513 | max-height: 340px; 514 | overflow-y: scroll; 515 | } 516 | form { 517 | margin: 0 0 18px; 518 | } 519 | fieldset { 520 | padding: 0; 521 | margin: 0; 522 | border: 0; 523 | } 524 | legend { 525 | display: block; 526 | width: 100%; 527 | padding: 0; 528 | margin-bottom: 27px; 529 | font-size: 19.5px; 530 | line-height: 36px; 531 | color: #333333; 532 | border: 0; 533 | border-bottom: 1px solid #eee; 534 | } 535 | legend small { 536 | font-size: 13.5px; 537 | color: #999999; 538 | } 539 | label, 540 | input, 541 | button, 542 | select, 543 | textarea { 544 | font-size: 13px; 545 | font-weight: normal; 546 | line-height: 18px; 547 | } 548 | input, 549 | button, 550 | select, 551 | textarea { 552 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 553 | } 554 | label { 555 | display: block; 556 | margin-bottom: 5px; 557 | color: #333333; 558 | } 559 | input, 560 | textarea, 561 | select, 562 | .uneditable-input { 563 | display: inline-block; 564 | width: 210px; 565 | height: 18px; 566 | padding: 4px; 567 | margin-bottom: 9px; 568 | font-size: 13px; 569 | line-height: 18px; 570 | color: #555555; 571 | border: 1px solid #ccc; 572 | -webkit-border-radius: 3px; 573 | -moz-border-radius: 3px; 574 | border-radius: 3px; 575 | } 576 | .uneditable-textarea { 577 | width: auto; 578 | height: auto; 579 | } 580 | label input, label textarea, label select { 581 | display: block; 582 | } 583 | input[type="image"], input[type="checkbox"], input[type="radio"] { 584 | width: auto; 585 | height: auto; 586 | padding: 0; 587 | margin: 3px 0; 588 | *margin-top: 0; 589 | /* IE7 */ 590 | 591 | line-height: normal; 592 | cursor: pointer; 593 | -webkit-border-radius: 0; 594 | -moz-border-radius: 0; 595 | border-radius: 0; 596 | border: 0 \9; 597 | /* IE9 and down */ 598 | 599 | } 600 | input[type="image"] { 601 | border: 0; 602 | } 603 | input[type="file"] { 604 | width: auto; 605 | padding: initial; 606 | line-height: initial; 607 | border: initial; 608 | background-color: #ffffff; 609 | background-color: initial; 610 | -webkit-box-shadow: none; 611 | -moz-box-shadow: none; 612 | box-shadow: none; 613 | } 614 | input[type="button"], input[type="reset"], input[type="submit"] { 615 | width: auto; 616 | height: auto; 617 | } 618 | select, input[type="file"] { 619 | height: 28px; 620 | /* In IE7, the height of the select element cannot be changed by height, only font-size */ 621 | 622 | *margin-top: 4px; 623 | /* For IE7, add top margin to align select with labels */ 624 | 625 | line-height: 28px; 626 | } 627 | input[type="file"] { 628 | line-height: 18px \9; 629 | } 630 | select { 631 | width: 220px; 632 | background-color: #ffffff; 633 | } 634 | select[multiple], select[size] { 635 | height: auto; 636 | } 637 | input[type="image"] { 638 | -webkit-box-shadow: none; 639 | -moz-box-shadow: none; 640 | box-shadow: none; 641 | } 642 | textarea { 643 | height: auto; 644 | } 645 | input[type="hidden"] { 646 | display: none; 647 | } 648 | .radio, .checkbox { 649 | padding-left: 18px; 650 | } 651 | .radio input[type="radio"], .checkbox input[type="checkbox"] { 652 | float: left; 653 | margin-left: -18px; 654 | } 655 | .controls > .radio:first-child, .controls > .checkbox:first-child { 656 | padding-top: 5px; 657 | } 658 | .radio.inline, .checkbox.inline { 659 | display: inline-block; 660 | padding-top: 5px; 661 | margin-bottom: 0; 662 | vertical-align: middle; 663 | } 664 | .radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline { 665 | margin-left: 10px; 666 | } 667 | input, textarea { 668 | -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); 669 | -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); 670 | box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); 671 | -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; 672 | -moz-transition: border linear 0.2s, box-shadow linear 0.2s; 673 | -ms-transition: border linear 0.2s, box-shadow linear 0.2s; 674 | -o-transition: border linear 0.2s, box-shadow linear 0.2s; 675 | transition: border linear 0.2s, box-shadow linear 0.2s; 676 | } 677 | input:focus, textarea:focus { 678 | border-color: rgba(82, 168, 236, 0.8); 679 | -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); 680 | -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); 681 | box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); 682 | outline: 0; 683 | outline: thin dotted \9; 684 | /* IE6-9 */ 685 | 686 | } 687 | input[type="file"]:focus, 688 | input[type="radio"]:focus, 689 | input[type="checkbox"]:focus, 690 | select:focus { 691 | -webkit-box-shadow: none; 692 | -moz-box-shadow: none; 693 | box-shadow: none; 694 | outline: thin dotted #333; 695 | outline: 5px auto -webkit-focus-ring-color; 696 | outline-offset: -2px; 697 | } 698 | .input-mini { 699 | width: 60px; 700 | } 701 | .input-small { 702 | width: 90px; 703 | } 704 | .input-medium { 705 | width: 150px; 706 | } 707 | .input-large { 708 | width: 210px; 709 | } 710 | .input-xlarge { 711 | width: 270px; 712 | } 713 | .input-xxlarge { 714 | width: 530px; 715 | } 716 | input[class*="span"], 717 | select[class*="span"], 718 | textarea[class*="span"], 719 | .uneditable-input { 720 | float: none; 721 | margin-left: 0; 722 | } 723 | input.span1, textarea.span1, .uneditable-input.span1 { 724 | width: 50px; 725 | } 726 | input.span2, textarea.span2, .uneditable-input.span2 { 727 | width: 130px; 728 | } 729 | input.span3, textarea.span3, .uneditable-input.span3 { 730 | width: 210px; 731 | } 732 | input.span4, textarea.span4, .uneditable-input.span4 { 733 | width: 290px; 734 | } 735 | input.span5, textarea.span5, .uneditable-input.span5 { 736 | width: 370px; 737 | } 738 | input.span6, textarea.span6, .uneditable-input.span6 { 739 | width: 450px; 740 | } 741 | input.span7, textarea.span7, .uneditable-input.span7 { 742 | width: 530px; 743 | } 744 | input.span8, textarea.span8, .uneditable-input.span8 { 745 | width: 610px; 746 | } 747 | input.span9, textarea.span9, .uneditable-input.span9 { 748 | width: 690px; 749 | } 750 | input.span10, textarea.span10, .uneditable-input.span10 { 751 | width: 770px; 752 | } 753 | input.span11, textarea.span11, .uneditable-input.span11 { 754 | width: 850px; 755 | } 756 | input.span12, textarea.span12, .uneditable-input.span12 { 757 | width: 930px; 758 | } 759 | input[disabled], 760 | select[disabled], 761 | textarea[disabled], 762 | input[readonly], 763 | select[readonly], 764 | textarea[readonly] { 765 | background-color: #f5f5f5; 766 | border-color: #ddd; 767 | cursor: not-allowed; 768 | } 769 | .control-group.warning > label, .control-group.warning .help-block, .control-group.warning .help-inline { 770 | color: #c09853; 771 | } 772 | .control-group.warning input, .control-group.warning select, .control-group.warning textarea { 773 | color: #c09853; 774 | border-color: #c09853; 775 | } 776 | .control-group.warning input:focus, .control-group.warning select:focus, .control-group.warning textarea:focus { 777 | border-color: #a47e3c; 778 | -webkit-box-shadow: 0 0 6px #dbc59e; 779 | -moz-box-shadow: 0 0 6px #dbc59e; 780 | box-shadow: 0 0 6px #dbc59e; 781 | } 782 | .control-group.warning .input-prepend .add-on, .control-group.warning .input-append .add-on { 783 | color: #c09853; 784 | background-color: #fcf8e3; 785 | border-color: #c09853; 786 | } 787 | .control-group.error > label, .control-group.error .help-block, .control-group.error .help-inline { 788 | color: #b94a48; 789 | } 790 | .control-group.error input, .control-group.error select, .control-group.error textarea { 791 | color: #b94a48; 792 | border-color: #b94a48; 793 | } 794 | .control-group.error input:focus, .control-group.error select:focus, .control-group.error textarea:focus { 795 | border-color: #953b39; 796 | -webkit-box-shadow: 0 0 6px #d59392; 797 | -moz-box-shadow: 0 0 6px #d59392; 798 | box-shadow: 0 0 6px #d59392; 799 | } 800 | .control-group.error .input-prepend .add-on, .control-group.error .input-append .add-on { 801 | color: #b94a48; 802 | background-color: #f2dede; 803 | border-color: #b94a48; 804 | } 805 | .control-group.success > label, .control-group.success .help-block, .control-group.success .help-inline { 806 | color: #468847; 807 | } 808 | .control-group.success input, .control-group.success select, .control-group.success textarea { 809 | color: #468847; 810 | border-color: #468847; 811 | } 812 | .control-group.success input:focus, .control-group.success select:focus, .control-group.success textarea:focus { 813 | border-color: #356635; 814 | -webkit-box-shadow: 0 0 6px #7aba7b; 815 | -moz-box-shadow: 0 0 6px #7aba7b; 816 | box-shadow: 0 0 6px #7aba7b; 817 | } 818 | .control-group.success .input-prepend .add-on, .control-group.success .input-append .add-on { 819 | color: #468847; 820 | background-color: #dff0d8; 821 | border-color: #468847; 822 | } 823 | input:focus:required:invalid, textarea:focus:required:invalid, select:focus:required:invalid { 824 | color: #b94a48; 825 | border-color: #ee5f5b; 826 | } 827 | input:focus:required:invalid:focus, textarea:focus:required:invalid:focus, select:focus:required:invalid:focus { 828 | border-color: #e9322d; 829 | -webkit-box-shadow: 0 0 6px #f8b9b7; 830 | -moz-box-shadow: 0 0 6px #f8b9b7; 831 | box-shadow: 0 0 6px #f8b9b7; 832 | } 833 | .form-actions { 834 | padding: 17px 20px 18px; 835 | margin-top: 18px; 836 | margin-bottom: 18px; 837 | background-color: #f5f5f5; 838 | border-top: 1px solid #ddd; 839 | } 840 | .uneditable-input { 841 | display: block; 842 | background-color: #ffffff; 843 | border-color: #eee; 844 | -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); 845 | -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); 846 | box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); 847 | cursor: not-allowed; 848 | } 849 | :-moz-placeholder { 850 | color: #999999; 851 | } 852 | ::-webkit-input-placeholder { 853 | color: #999999; 854 | } 855 | .help-block { 856 | display: block; 857 | margin-top: 5px; 858 | margin-bottom: 0; 859 | color: #999999; 860 | } 861 | .help-inline { 862 | display: inline-block; 863 | *display: inline; 864 | /* IE7 inline-block hack */ 865 | 866 | *zoom: 1; 867 | margin-bottom: 9px; 868 | vertical-align: middle; 869 | padding-left: 5px; 870 | } 871 | .input-prepend, .input-append { 872 | margin-bottom: 5px; 873 | *zoom: 1; 874 | } 875 | .input-prepend:before, 876 | .input-append:before, 877 | .input-prepend:after, 878 | .input-append:after { 879 | display: table; 880 | content: ""; 881 | } 882 | .input-prepend:after, .input-append:after { 883 | clear: both; 884 | } 885 | .input-prepend input, 886 | .input-append input, 887 | .input-prepend .uneditable-input, 888 | .input-append .uneditable-input { 889 | -webkit-border-radius: 0 3px 3px 0; 890 | -moz-border-radius: 0 3px 3px 0; 891 | border-radius: 0 3px 3px 0; 892 | } 893 | .input-prepend input:focus, 894 | .input-append input:focus, 895 | .input-prepend .uneditable-input:focus, 896 | .input-append .uneditable-input:focus { 897 | position: relative; 898 | z-index: 2; 899 | } 900 | .input-prepend .uneditable-input, .input-append .uneditable-input { 901 | border-left-color: #ccc; 902 | } 903 | .input-prepend .add-on, .input-append .add-on { 904 | float: left; 905 | display: block; 906 | width: auto; 907 | min-width: 16px; 908 | height: 18px; 909 | margin-right: -1px; 910 | padding: 4px 5px; 911 | font-weight: normal; 912 | line-height: 18px; 913 | color: #999999; 914 | text-align: center; 915 | text-shadow: 0 1px 0 #ffffff; 916 | background-color: #f5f5f5; 917 | border: 1px solid #ccc; 918 | -webkit-border-radius: 3px 0 0 3px; 919 | -moz-border-radius: 3px 0 0 3px; 920 | border-radius: 3px 0 0 3px; 921 | } 922 | .input-prepend .active, .input-append .active { 923 | background-color: #a9dba9; 924 | border-color: #46a546; 925 | } 926 | .input-prepend .add-on { 927 | *margin-top: 1px; 928 | /* IE6-7 */ 929 | 930 | } 931 | .input-append input, .input-append .uneditable-input { 932 | float: left; 933 | -webkit-border-radius: 3px 0 0 3px; 934 | -moz-border-radius: 3px 0 0 3px; 935 | border-radius: 3px 0 0 3px; 936 | } 937 | .input-append .uneditable-input { 938 | border-left-color: #eee; 939 | border-right-color: #ccc; 940 | } 941 | .input-append .add-on { 942 | margin-right: 0; 943 | margin-left: -1px; 944 | -webkit-border-radius: 0 3px 3px 0; 945 | -moz-border-radius: 0 3px 3px 0; 946 | border-radius: 0 3px 3px 0; 947 | } 948 | .input-append input:first-child { 949 | *margin-left: -160px; 950 | } 951 | .input-append input:first-child + .add-on { 952 | *margin-left: -21px; 953 | } 954 | .search-query { 955 | padding-left: 14px; 956 | padding-right: 14px; 957 | margin-bottom: 0; 958 | -webkit-border-radius: 14px; 959 | -moz-border-radius: 14px; 960 | border-radius: 14px; 961 | } 962 | .form-search input, 963 | .form-inline input, 964 | .form-horizontal input, 965 | .form-search textarea, 966 | .form-inline textarea, 967 | .form-horizontal textarea, 968 | .form-search select, 969 | .form-inline select, 970 | .form-horizontal select, 971 | .form-search .help-inline, 972 | .form-inline .help-inline, 973 | .form-horizontal .help-inline, 974 | .form-search .uneditable-input, 975 | .form-inline .uneditable-input, 976 | .form-horizontal .uneditable-input { 977 | display: inline-block; 978 | margin-bottom: 0; 979 | } 980 | .form-search .hide, .form-inline .hide, .form-horizontal .hide { 981 | display: none; 982 | } 983 | .form-search label, 984 | .form-inline label, 985 | .form-search .input-append, 986 | .form-inline .input-append, 987 | .form-search .input-prepend, 988 | .form-inline .input-prepend { 989 | display: inline-block; 990 | } 991 | .form-search .input-append .add-on, 992 | .form-inline .input-prepend .add-on, 993 | .form-search .input-append .add-on, 994 | .form-inline .input-prepend .add-on { 995 | vertical-align: middle; 996 | } 997 | .form-search .radio, 998 | .form-inline .radio, 999 | .form-search .checkbox, 1000 | .form-inline .checkbox { 1001 | margin-bottom: 0; 1002 | vertical-align: middle; 1003 | } 1004 | .control-group { 1005 | margin-bottom: 9px; 1006 | } 1007 | legend + .control-group { 1008 | margin-top: 18px; 1009 | -webkit-margin-top-collapse: separate; 1010 | } 1011 | .form-horizontal .control-group { 1012 | margin-bottom: 18px; 1013 | *zoom: 1; 1014 | } 1015 | .form-horizontal .control-group:before, .form-horizontal .control-group:after { 1016 | display: table; 1017 | content: ""; 1018 | } 1019 | .form-horizontal .control-group:after { 1020 | clear: both; 1021 | } 1022 | .form-horizontal .control-label { 1023 | float: left; 1024 | width: 140px; 1025 | padding-top: 5px; 1026 | text-align: right; 1027 | } 1028 | .form-horizontal .controls { 1029 | margin-left: 160px; 1030 | } 1031 | .form-horizontal .form-actions { 1032 | padding-left: 160px; 1033 | } 1034 | table { 1035 | max-width: 100%; 1036 | border-collapse: collapse; 1037 | border-spacing: 0; 1038 | } 1039 | .table { 1040 | width: 100%; 1041 | margin-bottom: 18px; 1042 | } 1043 | .table th, .table td { 1044 | padding: 8px; 1045 | line-height: 18px; 1046 | text-align: left; 1047 | vertical-align: top; 1048 | border-top: 1px solid #ddd; 1049 | } 1050 | .table th { 1051 | font-weight: bold; 1052 | } 1053 | .table thead th { 1054 | vertical-align: bottom; 1055 | } 1056 | .table thead:first-child tr th, .table thead:first-child tr td { 1057 | border-top: 0; 1058 | } 1059 | .table tbody + tbody { 1060 | border-top: 2px solid #ddd; 1061 | } 1062 | .table-condensed th, .table-condensed td { 1063 | padding: 4px 5px; 1064 | } 1065 | .table-bordered { 1066 | border: 1px solid #ddd; 1067 | border-collapse: separate; 1068 | *border-collapse: collapsed; 1069 | -webkit-border-radius: 4px; 1070 | -moz-border-radius: 4px; 1071 | border-radius: 4px; 1072 | } 1073 | .table-bordered th + th, 1074 | .table-bordered td + td, 1075 | .table-bordered th + td, 1076 | .table-bordered td + th { 1077 | border-left: 1px solid #ddd; 1078 | } 1079 | .table-bordered thead:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child td { 1080 | border-top: 0; 1081 | } 1082 | .table-bordered thead:first-child tr:first-child th:first-child, .table-bordered tbody:first-child tr:first-child td:first-child { 1083 | -webkit-border-radius: 4px 0 0 0; 1084 | -moz-border-radius: 4px 0 0 0; 1085 | border-radius: 4px 0 0 0; 1086 | } 1087 | .table-bordered thead:first-child tr:first-child th:last-child, .table-bordered tbody:first-child tr:first-child td:last-child { 1088 | -webkit-border-radius: 0 4px 0 0; 1089 | -moz-border-radius: 0 4px 0 0; 1090 | border-radius: 0 4px 0 0; 1091 | } 1092 | .table-bordered thead:last-child tr:last-child th:first-child, .table-bordered tbody:last-child tr:last-child td:first-child { 1093 | -webkit-border-radius: 0 0 0 4px; 1094 | -moz-border-radius: 0 0 0 4px; 1095 | border-radius: 0 0 0 4px; 1096 | } 1097 | .table-bordered thead:last-child tr:last-child th:last-child, .table-bordered tbody:last-child tr:last-child td:last-child { 1098 | -webkit-border-radius: 0 0 4px 0; 1099 | -moz-border-radius: 0 0 4px 0; 1100 | border-radius: 0 0 4px 0; 1101 | } 1102 | .table-striped tbody tr:nth-child(odd) td, .table-striped tbody tr:nth-child(odd) th { 1103 | background-color: #f9f9f9; 1104 | } 1105 | .table tbody tr:hover td, .table tbody tr:hover th { 1106 | background-color: #f5f5f5; 1107 | } 1108 | table .span1 { 1109 | float: none; 1110 | width: 44px; 1111 | margin-left: 0; 1112 | } 1113 | table .span2 { 1114 | float: none; 1115 | width: 124px; 1116 | margin-left: 0; 1117 | } 1118 | table .span3 { 1119 | float: none; 1120 | width: 204px; 1121 | margin-left: 0; 1122 | } 1123 | table .span4 { 1124 | float: none; 1125 | width: 284px; 1126 | margin-left: 0; 1127 | } 1128 | table .span5 { 1129 | float: none; 1130 | width: 364px; 1131 | margin-left: 0; 1132 | } 1133 | table .span6 { 1134 | float: none; 1135 | width: 444px; 1136 | margin-left: 0; 1137 | } 1138 | table .span7 { 1139 | float: none; 1140 | width: 524px; 1141 | margin-left: 0; 1142 | } 1143 | table .span8 { 1144 | float: none; 1145 | width: 604px; 1146 | margin-left: 0; 1147 | } 1148 | table .span9 { 1149 | float: none; 1150 | width: 684px; 1151 | margin-left: 0; 1152 | } 1153 | table .span10 { 1154 | float: none; 1155 | width: 764px; 1156 | margin-left: 0; 1157 | } 1158 | table .span11 { 1159 | float: none; 1160 | width: 844px; 1161 | margin-left: 0; 1162 | } 1163 | table .span12 { 1164 | float: none; 1165 | width: 924px; 1166 | margin-left: 0; 1167 | } 1168 | [class^="icon-"], [class*=" icon-"] { 1169 | display: inline-block; 1170 | width: 14px; 1171 | height: 14px; 1172 | line-height: 14px; 1173 | vertical-align: text-top; 1174 | background-image: url("../img/glyphicons-halflings.png"); 1175 | background-position: 14px 14px; 1176 | background-repeat: no-repeat; 1177 | *margin-right: .3em; 1178 | } 1179 | [class^="icon-"]:last-child, [class*=" icon-"]:last-child { 1180 | *margin-left: 0; 1181 | } 1182 | .icon-white { 1183 | background-image: url("../img/glyphicons-halflings-white.png"); 1184 | } 1185 | .icon-glass { 1186 | background-position: 0 0; 1187 | } 1188 | .icon-music { 1189 | background-position: -24px 0; 1190 | } 1191 | .icon-search { 1192 | background-position: -48px 0; 1193 | } 1194 | .icon-envelope { 1195 | background-position: -72px 0; 1196 | } 1197 | .icon-heart { 1198 | background-position: -96px 0; 1199 | } 1200 | .icon-star { 1201 | background-position: -120px 0; 1202 | } 1203 | .icon-star-empty { 1204 | background-position: -144px 0; 1205 | } 1206 | .icon-user { 1207 | background-position: -168px 0; 1208 | } 1209 | .icon-film { 1210 | background-position: -192px 0; 1211 | } 1212 | .icon-th-large { 1213 | background-position: -216px 0; 1214 | } 1215 | .icon-th { 1216 | background-position: -240px 0; 1217 | } 1218 | .icon-th-list { 1219 | background-position: -264px 0; 1220 | } 1221 | .icon-ok { 1222 | background-position: -288px 0; 1223 | } 1224 | .icon-remove { 1225 | background-position: -312px 0; 1226 | } 1227 | .icon-zoom-in { 1228 | background-position: -336px 0; 1229 | } 1230 | .icon-zoom-out { 1231 | background-position: -360px 0; 1232 | } 1233 | .icon-off { 1234 | background-position: -384px 0; 1235 | } 1236 | .icon-signal { 1237 | background-position: -408px 0; 1238 | } 1239 | .icon-cog { 1240 | background-position: -432px 0; 1241 | } 1242 | .icon-trash { 1243 | background-position: -456px 0; 1244 | } 1245 | .icon-home { 1246 | background-position: 0 -24px; 1247 | } 1248 | .icon-file { 1249 | background-position: -24px -24px; 1250 | } 1251 | .icon-time { 1252 | background-position: -48px -24px; 1253 | } 1254 | .icon-road { 1255 | background-position: -72px -24px; 1256 | } 1257 | .icon-download-alt { 1258 | background-position: -96px -24px; 1259 | } 1260 | .icon-download { 1261 | background-position: -120px -24px; 1262 | } 1263 | .icon-upload { 1264 | background-position: -144px -24px; 1265 | } 1266 | .icon-inbox { 1267 | background-position: -168px -24px; 1268 | } 1269 | .icon-play-circle { 1270 | background-position: -192px -24px; 1271 | } 1272 | .icon-repeat { 1273 | background-position: -216px -24px; 1274 | } 1275 | .icon-refresh { 1276 | background-position: -240px -24px; 1277 | } 1278 | .icon-list-alt { 1279 | background-position: -264px -24px; 1280 | } 1281 | .icon-lock { 1282 | background-position: -287px -24px; 1283 | } 1284 | .icon-flag { 1285 | background-position: -312px -24px; 1286 | } 1287 | .icon-headphones { 1288 | background-position: -336px -24px; 1289 | } 1290 | .icon-volume-off { 1291 | background-position: -360px -24px; 1292 | } 1293 | .icon-volume-down { 1294 | background-position: -384px -24px; 1295 | } 1296 | .icon-volume-up { 1297 | background-position: -408px -24px; 1298 | } 1299 | .icon-qrcode { 1300 | background-position: -432px -24px; 1301 | } 1302 | .icon-barcode { 1303 | background-position: -456px -24px; 1304 | } 1305 | .icon-tag { 1306 | background-position: 0 -48px; 1307 | } 1308 | .icon-tags { 1309 | background-position: -25px -48px; 1310 | } 1311 | .icon-book { 1312 | background-position: -48px -48px; 1313 | } 1314 | .icon-bookmark { 1315 | background-position: -72px -48px; 1316 | } 1317 | .icon-print { 1318 | background-position: -96px -48px; 1319 | } 1320 | .icon-camera { 1321 | background-position: -120px -48px; 1322 | } 1323 | .icon-font { 1324 | background-position: -144px -48px; 1325 | } 1326 | .icon-bold { 1327 | background-position: -167px -48px; 1328 | } 1329 | .icon-italic { 1330 | background-position: -192px -48px; 1331 | } 1332 | .icon-text-height { 1333 | background-position: -216px -48px; 1334 | } 1335 | .icon-text-width { 1336 | background-position: -240px -48px; 1337 | } 1338 | .icon-align-left { 1339 | background-position: -264px -48px; 1340 | } 1341 | .icon-align-center { 1342 | background-position: -288px -48px; 1343 | } 1344 | .icon-align-right { 1345 | background-position: -312px -48px; 1346 | } 1347 | .icon-align-justify { 1348 | background-position: -336px -48px; 1349 | } 1350 | .icon-list { 1351 | background-position: -360px -48px; 1352 | } 1353 | .icon-indent-left { 1354 | background-position: -384px -48px; 1355 | } 1356 | .icon-indent-right { 1357 | background-position: -408px -48px; 1358 | } 1359 | .icon-facetime-video { 1360 | background-position: -432px -48px; 1361 | } 1362 | .icon-picture { 1363 | background-position: -456px -48px; 1364 | } 1365 | .icon-pencil { 1366 | background-position: 0 -72px; 1367 | } 1368 | .icon-map-marker { 1369 | background-position: -24px -72px; 1370 | } 1371 | .icon-adjust { 1372 | background-position: -48px -72px; 1373 | } 1374 | .icon-tint { 1375 | background-position: -72px -72px; 1376 | } 1377 | .icon-edit { 1378 | background-position: -96px -72px; 1379 | } 1380 | .icon-share { 1381 | background-position: -120px -72px; 1382 | } 1383 | .icon-check { 1384 | background-position: -144px -72px; 1385 | } 1386 | .icon-move { 1387 | background-position: -168px -72px; 1388 | } 1389 | .icon-step-backward { 1390 | background-position: -192px -72px; 1391 | } 1392 | .icon-fast-backward { 1393 | background-position: -216px -72px; 1394 | } 1395 | .icon-backward { 1396 | background-position: -240px -72px; 1397 | } 1398 | .icon-play { 1399 | background-position: -264px -72px; 1400 | } 1401 | .icon-pause { 1402 | background-position: -288px -72px; 1403 | } 1404 | .icon-stop { 1405 | background-position: -312px -72px; 1406 | } 1407 | .icon-forward { 1408 | background-position: -336px -72px; 1409 | } 1410 | .icon-fast-forward { 1411 | background-position: -360px -72px; 1412 | } 1413 | .icon-step-forward { 1414 | background-position: -384px -72px; 1415 | } 1416 | .icon-eject { 1417 | background-position: -408px -72px; 1418 | } 1419 | .icon-chevron-left { 1420 | background-position: -432px -72px; 1421 | } 1422 | .icon-chevron-right { 1423 | background-position: -456px -72px; 1424 | } 1425 | .icon-plus-sign { 1426 | background-position: 0 -96px; 1427 | } 1428 | .icon-minus-sign { 1429 | background-position: -24px -96px; 1430 | } 1431 | .icon-remove-sign { 1432 | background-position: -48px -96px; 1433 | } 1434 | .icon-ok-sign { 1435 | background-position: -72px -96px; 1436 | } 1437 | .icon-question-sign { 1438 | background-position: -96px -96px; 1439 | } 1440 | .icon-info-sign { 1441 | background-position: -120px -96px; 1442 | } 1443 | .icon-screenshot { 1444 | background-position: -144px -96px; 1445 | } 1446 | .icon-remove-circle { 1447 | background-position: -168px -96px; 1448 | } 1449 | .icon-ok-circle { 1450 | background-position: -192px -96px; 1451 | } 1452 | .icon-ban-circle { 1453 | background-position: -216px -96px; 1454 | } 1455 | .icon-arrow-left { 1456 | background-position: -240px -96px; 1457 | } 1458 | .icon-arrow-right { 1459 | background-position: -264px -96px; 1460 | } 1461 | .icon-arrow-up { 1462 | background-position: -289px -96px; 1463 | } 1464 | .icon-arrow-down { 1465 | background-position: -312px -96px; 1466 | } 1467 | .icon-share-alt { 1468 | background-position: -336px -96px; 1469 | } 1470 | .icon-resize-full { 1471 | background-position: -360px -96px; 1472 | } 1473 | .icon-resize-small { 1474 | background-position: -384px -96px; 1475 | } 1476 | .icon-plus { 1477 | background-position: -408px -96px; 1478 | } 1479 | .icon-minus { 1480 | background-position: -433px -96px; 1481 | } 1482 | .icon-asterisk { 1483 | background-position: -456px -96px; 1484 | } 1485 | .icon-exclamation-sign { 1486 | background-position: 0 -120px; 1487 | } 1488 | .icon-gift { 1489 | background-position: -24px -120px; 1490 | } 1491 | .icon-leaf { 1492 | background-position: -48px -120px; 1493 | } 1494 | .icon-fire { 1495 | background-position: -72px -120px; 1496 | } 1497 | .icon-eye-open { 1498 | background-position: -96px -120px; 1499 | } 1500 | .icon-eye-close { 1501 | background-position: -120px -120px; 1502 | } 1503 | .icon-warning-sign { 1504 | background-position: -144px -120px; 1505 | } 1506 | .icon-plane { 1507 | background-position: -168px -120px; 1508 | } 1509 | .icon-calendar { 1510 | background-position: -192px -120px; 1511 | } 1512 | .icon-random { 1513 | background-position: -216px -120px; 1514 | } 1515 | .icon-comment { 1516 | background-position: -240px -120px; 1517 | } 1518 | .icon-magnet { 1519 | background-position: -264px -120px; 1520 | } 1521 | .icon-chevron-up { 1522 | background-position: -288px -120px; 1523 | } 1524 | .icon-chevron-down { 1525 | background-position: -313px -119px; 1526 | } 1527 | .icon-retweet { 1528 | background-position: -336px -120px; 1529 | } 1530 | .icon-shopping-cart { 1531 | background-position: -360px -120px; 1532 | } 1533 | .icon-folder-close { 1534 | background-position: -384px -120px; 1535 | } 1536 | .icon-folder-open { 1537 | background-position: -408px -120px; 1538 | } 1539 | .icon-resize-vertical { 1540 | background-position: -432px -119px; 1541 | } 1542 | .icon-resize-horizontal { 1543 | background-position: -456px -118px; 1544 | } 1545 | .dropdown { 1546 | position: relative; 1547 | } 1548 | .dropdown-toggle { 1549 | *margin-bottom: -3px; 1550 | } 1551 | .dropdown-toggle:active, .open .dropdown-toggle { 1552 | outline: 0; 1553 | } 1554 | .caret { 1555 | display: inline-block; 1556 | width: 0; 1557 | height: 0; 1558 | text-indent: -99999px; 1559 | *text-indent: 0; 1560 | vertical-align: top; 1561 | border-left: 4px solid transparent; 1562 | border-right: 4px solid transparent; 1563 | border-top: 4px solid #000000; 1564 | opacity: 0.3; 1565 | filter: alpha(opacity=30); 1566 | content: "\2193"; 1567 | } 1568 | .dropdown .caret { 1569 | margin-top: 8px; 1570 | margin-left: 2px; 1571 | } 1572 | .dropdown:hover .caret, .open.dropdown .caret { 1573 | opacity: 1; 1574 | filter: alpha(opacity=100); 1575 | } 1576 | .dropdown-menu { 1577 | position: absolute; 1578 | top: 100%; 1579 | left: 0; 1580 | z-index: 1000; 1581 | float: left; 1582 | display: none; 1583 | min-width: 160px; 1584 | _width: 160px; 1585 | padding: 4px 0; 1586 | margin: 0; 1587 | list-style: none; 1588 | background-color: #ffffff; 1589 | border-color: #ccc; 1590 | border-color: rgba(0, 0, 0, 0.2); 1591 | border-style: solid; 1592 | border-width: 1px; 1593 | -webkit-border-radius: 0 0 5px 5px; 1594 | -moz-border-radius: 0 0 5px 5px; 1595 | border-radius: 0 0 5px 5px; 1596 | -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); 1597 | -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); 1598 | box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); 1599 | -webkit-background-clip: padding-box; 1600 | -moz-background-clip: padding; 1601 | background-clip: padding-box; 1602 | *border-right-width: 2px; 1603 | *border-bottom-width: 2px; 1604 | } 1605 | .dropdown-menu.bottom-up { 1606 | top: auto; 1607 | bottom: 100%; 1608 | margin-bottom: 2px; 1609 | } 1610 | .dropdown-menu .divider { 1611 | height: 1px; 1612 | margin: 5px 1px; 1613 | overflow: hidden; 1614 | background-color: #e5e5e5; 1615 | border-bottom: 1px solid #ffffff; 1616 | *width: 100%; 1617 | *margin: -5px 0 5px; 1618 | } 1619 | .dropdown-menu a { 1620 | display: block; 1621 | padding: 3px 15px; 1622 | clear: both; 1623 | font-weight: normal; 1624 | line-height: 18px; 1625 | color: #555555; 1626 | white-space: nowrap; 1627 | } 1628 | .dropdown-menu li > a:hover, .dropdown-menu .active > a, .dropdown-menu .active > a:hover { 1629 | color: #ffffff; 1630 | text-decoration: none; 1631 | background-color: #0088cc; 1632 | } 1633 | .dropdown.open { 1634 | *z-index: 1000; 1635 | } 1636 | .dropdown.open .dropdown-toggle { 1637 | color: #ffffff; 1638 | background: #ccc; 1639 | background: rgba(0, 0, 0, 0.3); 1640 | } 1641 | .dropdown.open .dropdown-menu { 1642 | display: block; 1643 | } 1644 | .typeahead { 1645 | margin-top: 2px; 1646 | -webkit-border-radius: 4px; 1647 | -moz-border-radius: 4px; 1648 | border-radius: 4px; 1649 | } 1650 | .well { 1651 | min-height: 20px; 1652 | padding: 19px; 1653 | margin-bottom: 20px; 1654 | background-color: #f5f5f5; 1655 | border: 1px solid #eee; 1656 | border: 1px solid rgba(0, 0, 0, 0.05); 1657 | -webkit-border-radius: 4px; 1658 | -moz-border-radius: 4px; 1659 | border-radius: 4px; 1660 | -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); 1661 | -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); 1662 | box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); 1663 | } 1664 | .well blockquote { 1665 | border-color: #ddd; 1666 | border-color: rgba(0, 0, 0, 0.15); 1667 | } 1668 | .fade { 1669 | -webkit-transition: opacity 0.15s linear; 1670 | -moz-transition: opacity 0.15s linear; 1671 | -ms-transition: opacity 0.15s linear; 1672 | -o-transition: opacity 0.15s linear; 1673 | transition: opacity 0.15s linear; 1674 | opacity: 0; 1675 | } 1676 | .fade.in { 1677 | opacity: 1; 1678 | } 1679 | .collapse { 1680 | -webkit-transition: height 0.35s ease; 1681 | -moz-transition: height 0.35s ease; 1682 | -ms-transition: height 0.35s ease; 1683 | -o-transition: height 0.35s ease; 1684 | transition: height 0.35s ease; 1685 | position: relative; 1686 | overflow: hidden; 1687 | height: 0; 1688 | } 1689 | .collapse.in { 1690 | height: auto; 1691 | } 1692 | .close { 1693 | float: right; 1694 | font-size: 20px; 1695 | font-weight: bold; 1696 | line-height: 18px; 1697 | color: #000000; 1698 | text-shadow: 0 1px 0 #ffffff; 1699 | opacity: 0.2; 1700 | filter: alpha(opacity=20); 1701 | } 1702 | .close:hover { 1703 | color: #000000; 1704 | text-decoration: none; 1705 | opacity: 0.4; 1706 | filter: alpha(opacity=40); 1707 | cursor: pointer; 1708 | } 1709 | .btn { 1710 | display: inline-block; 1711 | padding: 4px 10px 4px; 1712 | margin-bottom: 0; 1713 | font-size: 13px; 1714 | line-height: 18px; 1715 | color: #333333; 1716 | text-align: center; 1717 | text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); 1718 | vertical-align: middle; 1719 | background-color: #f5f5f5; 1720 | background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); 1721 | background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6); 1722 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); 1723 | background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); 1724 | background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); 1725 | background-image: linear-gradient(top, #ffffff, #e6e6e6); 1726 | background-repeat: repeat-x; 1727 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0); 1728 | border-color: #e6e6e6 #e6e6e6 #bfbfbf; 1729 | border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); 1730 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 1731 | border: 1px solid #ccc; 1732 | border-bottom-color: #bbb; 1733 | -webkit-border-radius: 4px; 1734 | -moz-border-radius: 4px; 1735 | border-radius: 4px; 1736 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); 1737 | -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); 1738 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); 1739 | cursor: pointer; 1740 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 1741 | *margin-left: .3em; 1742 | } 1743 | .btn:hover, 1744 | .btn:active, 1745 | .btn.active, 1746 | .btn.disabled, 1747 | .btn[disabled] { 1748 | background-color: #e6e6e6; 1749 | } 1750 | .btn:active, .btn.active { 1751 | background-color: #cccccc \9; 1752 | } 1753 | .btn:first-child { 1754 | *margin-left: 0; 1755 | } 1756 | .btn:hover { 1757 | color: #333333; 1758 | text-decoration: none; 1759 | background-color: #e6e6e6; 1760 | background-position: 0 -15px; 1761 | -webkit-transition: background-position 0.1s linear; 1762 | -moz-transition: background-position 0.1s linear; 1763 | -ms-transition: background-position 0.1s linear; 1764 | -o-transition: background-position 0.1s linear; 1765 | transition: background-position 0.1s linear; 1766 | } 1767 | .btn:focus { 1768 | outline: thin dotted #333; 1769 | outline: 5px auto -webkit-focus-ring-color; 1770 | outline-offset: -2px; 1771 | } 1772 | .btn.active, .btn:active { 1773 | background-image: none; 1774 | -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); 1775 | -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); 1776 | box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); 1777 | background-color: #e6e6e6; 1778 | background-color: #d9d9d9 \9; 1779 | outline: 0; 1780 | } 1781 | .btn.disabled, .btn[disabled] { 1782 | cursor: default; 1783 | background-image: none; 1784 | background-color: #e6e6e6; 1785 | opacity: 0.65; 1786 | filter: alpha(opacity=65); 1787 | -webkit-box-shadow: none; 1788 | -moz-box-shadow: none; 1789 | box-shadow: none; 1790 | } 1791 | .btn-large { 1792 | padding: 9px 14px; 1793 | font-size: 15px; 1794 | line-height: normal; 1795 | -webkit-border-radius: 5px; 1796 | -moz-border-radius: 5px; 1797 | border-radius: 5px; 1798 | } 1799 | .btn-large [class^="icon-"] { 1800 | margin-top: 1px; 1801 | } 1802 | .btn-small { 1803 | padding: 5px 9px; 1804 | font-size: 11px; 1805 | line-height: 16px; 1806 | } 1807 | .btn-small [class^="icon-"] { 1808 | margin-top: -1px; 1809 | } 1810 | .btn-mini { 1811 | padding: 2px 6px; 1812 | font-size: 11px; 1813 | line-height: 14px; 1814 | } 1815 | .btn-primary, 1816 | .btn-primary:hover, 1817 | .btn-warning, 1818 | .btn-warning:hover, 1819 | .btn-danger, 1820 | .btn-danger:hover, 1821 | .btn-success, 1822 | .btn-success:hover, 1823 | .btn-info, 1824 | .btn-info:hover, 1825 | .btn-inverse, 1826 | .btn-inverse:hover { 1827 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); 1828 | color: #ffffff; 1829 | } 1830 | .btn-primary.active, 1831 | .btn-warning.active, 1832 | .btn-danger.active, 1833 | .btn-success.active, 1834 | .btn-info.active, 1835 | .btn-dark.active { 1836 | color: rgba(255, 255, 255, 0.75); 1837 | } 1838 | .btn-primary { 1839 | background-color: #006dcc; 1840 | background-image: -moz-linear-gradient(top, #0088cc, #0044cc); 1841 | background-image: -ms-linear-gradient(top, #0088cc, #0044cc); 1842 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); 1843 | background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); 1844 | background-image: -o-linear-gradient(top, #0088cc, #0044cc); 1845 | background-image: linear-gradient(top, #0088cc, #0044cc); 1846 | background-repeat: repeat-x; 1847 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0); 1848 | border-color: #0044cc #0044cc #002a80; 1849 | border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); 1850 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 1851 | } 1852 | .btn-primary:hover, 1853 | .btn-primary:active, 1854 | .btn-primary.active, 1855 | .btn-primary.disabled, 1856 | .btn-primary[disabled] { 1857 | background-color: #0044cc; 1858 | } 1859 | .btn-primary:active, .btn-primary.active { 1860 | background-color: #003399 \9; 1861 | } 1862 | .btn-warning { 1863 | background-color: #faa732; 1864 | background-image: -moz-linear-gradient(top, #fbb450, #f89406); 1865 | background-image: -ms-linear-gradient(top, #fbb450, #f89406); 1866 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); 1867 | background-image: -webkit-linear-gradient(top, #fbb450, #f89406); 1868 | background-image: -o-linear-gradient(top, #fbb450, #f89406); 1869 | background-image: linear-gradient(top, #fbb450, #f89406); 1870 | background-repeat: repeat-x; 1871 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0); 1872 | border-color: #f89406 #f89406 #ad6704; 1873 | border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); 1874 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 1875 | } 1876 | .btn-warning:hover, 1877 | .btn-warning:active, 1878 | .btn-warning.active, 1879 | .btn-warning.disabled, 1880 | .btn-warning[disabled] { 1881 | background-color: #f89406; 1882 | } 1883 | .btn-warning:active, .btn-warning.active { 1884 | background-color: #c67605 \9; 1885 | } 1886 | .btn-danger { 1887 | background-color: #da4f49; 1888 | background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); 1889 | background-image: -ms-linear-gradient(top, #ee5f5b, #bd362f); 1890 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); 1891 | background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f); 1892 | background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); 1893 | background-image: linear-gradient(top, #ee5f5b, #bd362f); 1894 | background-repeat: repeat-x; 1895 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0); 1896 | border-color: #bd362f #bd362f #802420; 1897 | border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); 1898 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 1899 | } 1900 | .btn-danger:hover, 1901 | .btn-danger:active, 1902 | .btn-danger.active, 1903 | .btn-danger.disabled, 1904 | .btn-danger[disabled] { 1905 | background-color: #bd362f; 1906 | } 1907 | .btn-danger:active, .btn-danger.active { 1908 | background-color: #942a25 \9; 1909 | } 1910 | .btn-success { 1911 | background-color: #5bb75b; 1912 | background-image: -moz-linear-gradient(top, #62c462, #51a351); 1913 | background-image: -ms-linear-gradient(top, #62c462, #51a351); 1914 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); 1915 | background-image: -webkit-linear-gradient(top, #62c462, #51a351); 1916 | background-image: -o-linear-gradient(top, #62c462, #51a351); 1917 | background-image: linear-gradient(top, #62c462, #51a351); 1918 | background-repeat: repeat-x; 1919 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0); 1920 | border-color: #51a351 #51a351 #387038; 1921 | border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); 1922 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 1923 | } 1924 | .btn-success:hover, 1925 | .btn-success:active, 1926 | .btn-success.active, 1927 | .btn-success.disabled, 1928 | .btn-success[disabled] { 1929 | background-color: #51a351; 1930 | } 1931 | .btn-success:active, .btn-success.active { 1932 | background-color: #408140 \9; 1933 | } 1934 | .btn-info { 1935 | background-color: #49afcd; 1936 | background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); 1937 | background-image: -ms-linear-gradient(top, #5bc0de, #2f96b4); 1938 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); 1939 | background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4); 1940 | background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); 1941 | background-image: linear-gradient(top, #5bc0de, #2f96b4); 1942 | background-repeat: repeat-x; 1943 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0); 1944 | border-color: #2f96b4 #2f96b4 #1f6377; 1945 | border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); 1946 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 1947 | } 1948 | .btn-info:hover, 1949 | .btn-info:active, 1950 | .btn-info.active, 1951 | .btn-info.disabled, 1952 | .btn-info[disabled] { 1953 | background-color: #2f96b4; 1954 | } 1955 | .btn-info:active, .btn-info.active { 1956 | background-color: #24748c \9; 1957 | } 1958 | .btn-inverse { 1959 | background-color: #393939; 1960 | background-image: -moz-linear-gradient(top, #454545, #262626); 1961 | background-image: -ms-linear-gradient(top, #454545, #262626); 1962 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#454545), to(#262626)); 1963 | background-image: -webkit-linear-gradient(top, #454545, #262626); 1964 | background-image: -o-linear-gradient(top, #454545, #262626); 1965 | background-image: linear-gradient(top, #454545, #262626); 1966 | background-repeat: repeat-x; 1967 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#454545', endColorstr='#262626', GradientType=0); 1968 | border-color: #262626 #262626 #000000; 1969 | border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); 1970 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 1971 | } 1972 | .btn-inverse:hover, 1973 | .btn-inverse:active, 1974 | .btn-inverse.active, 1975 | .btn-inverse.disabled, 1976 | .btn-inverse[disabled] { 1977 | background-color: #262626; 1978 | } 1979 | .btn-inverse:active, .btn-inverse.active { 1980 | background-color: #0c0c0c \9; 1981 | } 1982 | button.btn, input[type="submit"].btn { 1983 | *padding-top: 2px; 1984 | *padding-bottom: 2px; 1985 | } 1986 | button.btn::-moz-focus-inner, input[type="submit"].btn::-moz-focus-inner { 1987 | padding: 0; 1988 | border: 0; 1989 | } 1990 | button.btn.large, input[type="submit"].btn.large { 1991 | *padding-top: 7px; 1992 | *padding-bottom: 7px; 1993 | } 1994 | button.btn.small, input[type="submit"].btn.small { 1995 | *padding-top: 3px; 1996 | *padding-bottom: 3px; 1997 | } 1998 | .btn-group { 1999 | position: relative; 2000 | *zoom: 1; 2001 | *margin-left: .3em; 2002 | } 2003 | .btn-group:before, .btn-group:after { 2004 | display: table; 2005 | content: ""; 2006 | } 2007 | .btn-group:after { 2008 | clear: both; 2009 | } 2010 | .btn-group:first-child { 2011 | *margin-left: 0; 2012 | } 2013 | .btn-group + .btn-group { 2014 | margin-left: 5px; 2015 | } 2016 | .btn-toolbar { 2017 | margin-top: 9px; 2018 | margin-bottom: 9px; 2019 | } 2020 | .btn-toolbar .btn-group { 2021 | display: inline-block; 2022 | *display: inline; 2023 | /* IE7 inline-block hack */ 2024 | 2025 | *zoom: 1; 2026 | } 2027 | .btn-group .btn { 2028 | position: relative; 2029 | float: left; 2030 | margin-left: -1px; 2031 | -webkit-border-radius: 0; 2032 | -moz-border-radius: 0; 2033 | border-radius: 0; 2034 | } 2035 | .btn-group .btn:first-child { 2036 | margin-left: 0; 2037 | -webkit-border-top-left-radius: 4px; 2038 | -moz-border-radius-topleft: 4px; 2039 | border-top-left-radius: 4px; 2040 | -webkit-border-bottom-left-radius: 4px; 2041 | -moz-border-radius-bottomleft: 4px; 2042 | border-bottom-left-radius: 4px; 2043 | } 2044 | .btn-group .btn:last-child, .btn-group .dropdown-toggle { 2045 | -webkit-border-top-right-radius: 4px; 2046 | -moz-border-radius-topright: 4px; 2047 | border-top-right-radius: 4px; 2048 | -webkit-border-bottom-right-radius: 4px; 2049 | -moz-border-radius-bottomright: 4px; 2050 | border-bottom-right-radius: 4px; 2051 | } 2052 | .btn-group .btn.large:first-child { 2053 | margin-left: 0; 2054 | -webkit-border-top-left-radius: 6px; 2055 | -moz-border-radius-topleft: 6px; 2056 | border-top-left-radius: 6px; 2057 | -webkit-border-bottom-left-radius: 6px; 2058 | -moz-border-radius-bottomleft: 6px; 2059 | border-bottom-left-radius: 6px; 2060 | } 2061 | .btn-group .btn.large:last-child, .btn-group .large.dropdown-toggle { 2062 | -webkit-border-top-right-radius: 6px; 2063 | -moz-border-radius-topright: 6px; 2064 | border-top-right-radius: 6px; 2065 | -webkit-border-bottom-right-radius: 6px; 2066 | -moz-border-radius-bottomright: 6px; 2067 | border-bottom-right-radius: 6px; 2068 | } 2069 | .btn-group .btn:hover, 2070 | .btn-group .btn:focus, 2071 | .btn-group .btn:active, 2072 | .btn-group .btn.active { 2073 | z-index: 2; 2074 | } 2075 | .btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle { 2076 | outline: 0; 2077 | } 2078 | .btn-group .dropdown-toggle { 2079 | padding-left: 8px; 2080 | padding-right: 8px; 2081 | -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); 2082 | -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); 2083 | box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); 2084 | *padding-top: 5px; 2085 | *padding-bottom: 5px; 2086 | } 2087 | .btn-group.open { 2088 | *z-index: 1000; 2089 | } 2090 | .btn-group.open .dropdown-menu { 2091 | display: block; 2092 | margin-top: 1px; 2093 | -webkit-border-radius: 5px; 2094 | -moz-border-radius: 5px; 2095 | border-radius: 5px; 2096 | } 2097 | .btn-group.open .dropdown-toggle { 2098 | background-image: none; 2099 | -webkit-box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); 2100 | -moz-box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); 2101 | box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); 2102 | } 2103 | .btn .caret { 2104 | margin-top: 7px; 2105 | margin-left: 0; 2106 | } 2107 | .btn:hover .caret, .open.btn-group .caret { 2108 | opacity: 1; 2109 | filter: alpha(opacity=100); 2110 | } 2111 | .btn-primary .caret, 2112 | .btn-danger .caret, 2113 | .btn-info .caret, 2114 | .btn-success .caret, 2115 | .btn-inverse .caret { 2116 | border-top-color: #ffffff; 2117 | opacity: 0.75; 2118 | filter: alpha(opacity=75); 2119 | } 2120 | .btn-small .caret { 2121 | margin-top: 4px; 2122 | } 2123 | .alert { 2124 | padding: 8px 35px 8px 14px; 2125 | margin-bottom: 18px; 2126 | text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); 2127 | background-color: #fcf8e3; 2128 | border: 1px solid #fbeed5; 2129 | -webkit-border-radius: 4px; 2130 | -moz-border-radius: 4px; 2131 | border-radius: 4px; 2132 | } 2133 | .alert, .alert-heading { 2134 | color: #c09853; 2135 | } 2136 | .alert .close { 2137 | position: relative; 2138 | top: -2px; 2139 | right: -21px; 2140 | line-height: 18px; 2141 | } 2142 | .alert-success { 2143 | background-color: #dff0d8; 2144 | border-color: #d6e9c6; 2145 | } 2146 | .alert-success, .alert-success .alert-heading { 2147 | color: #468847; 2148 | } 2149 | .alert-danger, .alert-error { 2150 | background-color: #f2dede; 2151 | border-color: #eed3d7; 2152 | } 2153 | .alert-danger, 2154 | .alert-error, 2155 | .alert-danger .alert-heading, 2156 | .alert-error .alert-heading { 2157 | color: #b94a48; 2158 | } 2159 | .alert-info { 2160 | background-color: #d9edf7; 2161 | border-color: #bce8f1; 2162 | } 2163 | .alert-info, .alert-info .alert-heading { 2164 | color: #3a87ad; 2165 | } 2166 | .alert-block { 2167 | padding-top: 14px; 2168 | padding-bottom: 14px; 2169 | } 2170 | .alert-block > p, .alert-block > ul { 2171 | margin-bottom: 0; 2172 | } 2173 | .alert-block p + p { 2174 | margin-top: 5px; 2175 | } 2176 | .nav { 2177 | margin-left: 0; 2178 | margin-bottom: 18px; 2179 | list-style: none; 2180 | } 2181 | .nav > li > a { 2182 | display: block; 2183 | } 2184 | .nav > li > a:hover { 2185 | text-decoration: none; 2186 | background-color: #eeeeee; 2187 | } 2188 | .nav .nav-header { 2189 | display: block; 2190 | padding: 3px 15px; 2191 | font-size: 11px; 2192 | font-weight: bold; 2193 | line-height: 18px; 2194 | color: #999999; 2195 | text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); 2196 | text-transform: uppercase; 2197 | } 2198 | .nav li + .nav-header { 2199 | margin-top: 9px; 2200 | } 2201 | .nav-list { 2202 | padding-left: 14px; 2203 | padding-right: 14px; 2204 | margin-bottom: 0; 2205 | } 2206 | .nav-list > li > a, .nav-list .nav-header { 2207 | margin-left: -15px; 2208 | margin-right: -15px; 2209 | text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); 2210 | } 2211 | .nav-list > li > a { 2212 | padding: 3px 15px; 2213 | } 2214 | .nav-list .active > a, .nav-list .active > a:hover { 2215 | color: #ffffff; 2216 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); 2217 | background-color: #0088cc; 2218 | } 2219 | .nav-list [class^="icon-"] { 2220 | margin-right: 2px; 2221 | } 2222 | .nav-tabs, .nav-pills { 2223 | *zoom: 1; 2224 | } 2225 | .nav-tabs:before, 2226 | .nav-pills:before, 2227 | .nav-tabs:after, 2228 | .nav-pills:after { 2229 | display: table; 2230 | content: ""; 2231 | } 2232 | .nav-tabs:after, .nav-pills:after { 2233 | clear: both; 2234 | } 2235 | .nav-tabs > li, .nav-pills > li { 2236 | float: left; 2237 | } 2238 | .nav-tabs > li > a, .nav-pills > li > a { 2239 | padding-right: 12px; 2240 | padding-left: 12px; 2241 | margin-right: 2px; 2242 | line-height: 14px; 2243 | } 2244 | .nav-tabs { 2245 | border-bottom: 1px solid #ddd; 2246 | } 2247 | .nav-tabs > li { 2248 | margin-bottom: -1px; 2249 | } 2250 | .nav-tabs > li > a { 2251 | padding-top: 9px; 2252 | padding-bottom: 9px; 2253 | border: 1px solid transparent; 2254 | -webkit-border-radius: 4px 4px 0 0; 2255 | -moz-border-radius: 4px 4px 0 0; 2256 | border-radius: 4px 4px 0 0; 2257 | } 2258 | .nav-tabs > li > a:hover { 2259 | border-color: #eeeeee #eeeeee #dddddd; 2260 | } 2261 | .nav-tabs > .active > a, .nav-tabs > .active > a:hover { 2262 | color: #555555; 2263 | background-color: #ffffff; 2264 | border: 1px solid #ddd; 2265 | border-bottom-color: transparent; 2266 | cursor: default; 2267 | } 2268 | .nav-pills > li > a { 2269 | padding-top: 8px; 2270 | padding-bottom: 8px; 2271 | margin-top: 2px; 2272 | margin-bottom: 2px; 2273 | -webkit-border-radius: 5px; 2274 | -moz-border-radius: 5px; 2275 | border-radius: 5px; 2276 | } 2277 | .nav-pills .active > a, .nav-pills .active > a:hover { 2278 | color: #ffffff; 2279 | background-color: #0088cc; 2280 | } 2281 | .nav-stacked > li { 2282 | float: none; 2283 | } 2284 | .nav-stacked > li > a { 2285 | margin-right: 0; 2286 | } 2287 | .nav-tabs.nav-stacked { 2288 | border-bottom: 0; 2289 | } 2290 | .nav-tabs.nav-stacked > li > a { 2291 | border: 1px solid #ddd; 2292 | -webkit-border-radius: 0; 2293 | -moz-border-radius: 0; 2294 | border-radius: 0; 2295 | } 2296 | .nav-tabs.nav-stacked > li:first-child > a { 2297 | -webkit-border-radius: 4px 4px 0 0; 2298 | -moz-border-radius: 4px 4px 0 0; 2299 | border-radius: 4px 4px 0 0; 2300 | } 2301 | .nav-tabs.nav-stacked > li:last-child > a { 2302 | -webkit-border-radius: 0 0 4px 4px; 2303 | -moz-border-radius: 0 0 4px 4px; 2304 | border-radius: 0 0 4px 4px; 2305 | } 2306 | .nav-tabs.nav-stacked > li > a:hover { 2307 | border-color: #ddd; 2308 | z-index: 2; 2309 | } 2310 | .nav-pills.nav-stacked > li > a { 2311 | margin-bottom: 3px; 2312 | } 2313 | .nav-pills.nav-stacked > li:last-child > a { 2314 | margin-bottom: 1px; 2315 | } 2316 | .nav-tabs .dropdown-menu, .nav-pills .dropdown-menu { 2317 | margin-top: 1px; 2318 | border-width: 1px; 2319 | } 2320 | .nav-pills .dropdown-menu { 2321 | -webkit-border-radius: 4px; 2322 | -moz-border-radius: 4px; 2323 | border-radius: 4px; 2324 | } 2325 | .nav-tabs .dropdown-toggle .caret, .nav-pills .dropdown-toggle .caret { 2326 | border-top-color: #0088cc; 2327 | margin-top: 6px; 2328 | } 2329 | .nav-tabs .dropdown-toggle:hover .caret, .nav-pills .dropdown-toggle:hover .caret { 2330 | border-top-color: #005580; 2331 | } 2332 | .nav-tabs .active .dropdown-toggle .caret, .nav-pills .active .dropdown-toggle .caret { 2333 | border-top-color: #333333; 2334 | } 2335 | .nav > .dropdown.active > a:hover { 2336 | color: #000000; 2337 | cursor: pointer; 2338 | } 2339 | .nav-tabs .open .dropdown-toggle, .nav-pills .open .dropdown-toggle, .nav > .open.active > a:hover { 2340 | color: #ffffff; 2341 | background-color: #999999; 2342 | border-color: #999999; 2343 | } 2344 | .nav .open .caret, .nav .open.active .caret, .nav .open a:hover .caret { 2345 | border-top-color: #ffffff; 2346 | opacity: 1; 2347 | filter: alpha(opacity=100); 2348 | } 2349 | .tabs-stacked .open > a:hover { 2350 | border-color: #999999; 2351 | } 2352 | .tabbable { 2353 | *zoom: 1; 2354 | } 2355 | .tabbable:before, .tabbable:after { 2356 | display: table; 2357 | content: ""; 2358 | } 2359 | .tabbable:after { 2360 | clear: both; 2361 | } 2362 | .tab-content { 2363 | overflow: hidden; 2364 | } 2365 | .tabs-below .nav-tabs, .tabs-right .nav-tabs, .tabs-left .nav-tabs { 2366 | border-bottom: 0; 2367 | } 2368 | .tab-content > .tab-pane, .pill-content > .pill-pane { 2369 | display: none; 2370 | } 2371 | .tab-content > .active, .pill-content > .active { 2372 | display: block; 2373 | } 2374 | .tabs-below .nav-tabs { 2375 | border-top: 1px solid #ddd; 2376 | } 2377 | .tabs-below .nav-tabs > li { 2378 | margin-top: -1px; 2379 | margin-bottom: 0; 2380 | } 2381 | .tabs-below .nav-tabs > li > a { 2382 | -webkit-border-radius: 0 0 4px 4px; 2383 | -moz-border-radius: 0 0 4px 4px; 2384 | border-radius: 0 0 4px 4px; 2385 | } 2386 | .tabs-below .nav-tabs > li > a:hover { 2387 | border-bottom-color: transparent; 2388 | border-top-color: #ddd; 2389 | } 2390 | .tabs-below .nav-tabs .active > a, .tabs-below .nav-tabs .active > a:hover { 2391 | border-color: transparent #ddd #ddd #ddd; 2392 | } 2393 | .tabs-left .nav-tabs > li, .tabs-right .nav-tabs > li { 2394 | float: none; 2395 | } 2396 | .tabs-left .nav-tabs > li > a, .tabs-right .nav-tabs > li > a { 2397 | min-width: 74px; 2398 | margin-right: 0; 2399 | margin-bottom: 3px; 2400 | } 2401 | .tabs-left .nav-tabs { 2402 | float: left; 2403 | margin-right: 19px; 2404 | border-right: 1px solid #ddd; 2405 | } 2406 | .tabs-left .nav-tabs > li > a { 2407 | margin-right: -1px; 2408 | -webkit-border-radius: 4px 0 0 4px; 2409 | -moz-border-radius: 4px 0 0 4px; 2410 | border-radius: 4px 0 0 4px; 2411 | } 2412 | .tabs-left .nav-tabs > li > a:hover { 2413 | border-color: #eeeeee #dddddd #eeeeee #eeeeee; 2414 | } 2415 | .tabs-left .nav-tabs .active > a, .tabs-left .nav-tabs .active > a:hover { 2416 | border-color: #ddd transparent #ddd #ddd; 2417 | *border-right-color: #ffffff; 2418 | } 2419 | .tabs-right .nav-tabs { 2420 | float: right; 2421 | margin-left: 19px; 2422 | border-left: 1px solid #ddd; 2423 | } 2424 | .tabs-right .nav-tabs > li > a { 2425 | margin-left: -1px; 2426 | -webkit-border-radius: 0 4px 4px 0; 2427 | -moz-border-radius: 0 4px 4px 0; 2428 | border-radius: 0 4px 4px 0; 2429 | } 2430 | .tabs-right .nav-tabs > li > a:hover { 2431 | border-color: #eeeeee #eeeeee #eeeeee #dddddd; 2432 | } 2433 | .tabs-right .nav-tabs .active > a, .tabs-right .nav-tabs .active > a:hover { 2434 | border-color: #ddd #ddd #ddd transparent; 2435 | *border-left-color: #ffffff; 2436 | } 2437 | .navbar { 2438 | overflow: visible; 2439 | margin-bottom: 18px; 2440 | } 2441 | .navbar-inner { 2442 | padding-left: 20px; 2443 | padding-right: 20px; 2444 | background-color: #2c2c2c; 2445 | background-image: -moz-linear-gradient(top, #333333, #222222); 2446 | background-image: -ms-linear-gradient(top, #333333, #222222); 2447 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222)); 2448 | background-image: -webkit-linear-gradient(top, #333333, #222222); 2449 | background-image: -o-linear-gradient(top, #333333, #222222); 2450 | background-image: linear-gradient(top, #333333, #222222); 2451 | background-repeat: repeat-x; 2452 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0); 2453 | -webkit-border-radius: 4px; 2454 | -moz-border-radius: 4px; 2455 | border-radius: 4px; 2456 | -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); 2457 | -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); 2458 | box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); 2459 | } 2460 | .btn-navbar { 2461 | display: none; 2462 | float: right; 2463 | padding: 7px 10px; 2464 | margin-left: 5px; 2465 | margin-right: 5px; 2466 | background-color: #2c2c2c; 2467 | background-image: -moz-linear-gradient(top, #333333, #222222); 2468 | background-image: -ms-linear-gradient(top, #333333, #222222); 2469 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222)); 2470 | background-image: -webkit-linear-gradient(top, #333333, #222222); 2471 | background-image: -o-linear-gradient(top, #333333, #222222); 2472 | background-image: linear-gradient(top, #333333, #222222); 2473 | background-repeat: repeat-x; 2474 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0); 2475 | border-color: #222222 #222222 #000000; 2476 | border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); 2477 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 2478 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); 2479 | -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); 2480 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); 2481 | } 2482 | .btn-navbar:hover, 2483 | .btn-navbar:active, 2484 | .btn-navbar.active, 2485 | .btn-navbar.disabled, 2486 | .btn-navbar[disabled] { 2487 | background-color: #222222; 2488 | } 2489 | .btn-navbar:active, .btn-navbar.active { 2490 | background-color: #080808 \9; 2491 | } 2492 | .btn-navbar .icon-bar { 2493 | display: block; 2494 | width: 18px; 2495 | height: 2px; 2496 | background-color: #f5f5f5; 2497 | -webkit-border-radius: 1px; 2498 | -moz-border-radius: 1px; 2499 | border-radius: 1px; 2500 | -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); 2501 | -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); 2502 | box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); 2503 | } 2504 | .btn-navbar .icon-bar + .icon-bar { 2505 | margin-top: 3px; 2506 | } 2507 | .nav-collapse.collapse { 2508 | height: auto; 2509 | } 2510 | .navbar .brand:hover { 2511 | text-decoration: none; 2512 | } 2513 | .navbar .brand { 2514 | float: left; 2515 | display: block; 2516 | padding: 8px 20px 12px; 2517 | margin-left: -20px; 2518 | font-size: 20px; 2519 | font-weight: 200; 2520 | line-height: 1; 2521 | color: #ffffff; 2522 | } 2523 | .navbar .navbar-text { 2524 | margin-bottom: 0; 2525 | line-height: 40px; 2526 | color: #999999; 2527 | } 2528 | .navbar .navbar-text a:hover { 2529 | color: #ffffff; 2530 | background-color: transparent; 2531 | } 2532 | .navbar .btn, .navbar .btn-group { 2533 | margin-top: 5px; 2534 | } 2535 | .navbar .btn-group .btn { 2536 | margin-top: 0; 2537 | } 2538 | .navbar-form { 2539 | margin-bottom: 0; 2540 | *zoom: 1; 2541 | } 2542 | .navbar-form:before, .navbar-form:after { 2543 | display: table; 2544 | content: ""; 2545 | } 2546 | .navbar-form:after { 2547 | clear: both; 2548 | } 2549 | .navbar-form input, .navbar-form select { 2550 | display: inline-block; 2551 | margin-top: 5px; 2552 | margin-bottom: 0; 2553 | } 2554 | .navbar-form .radio, .navbar-form .checkbox { 2555 | margin-top: 5px; 2556 | } 2557 | .navbar-form input[type="image"], .navbar-form input[type="checkbox"], .navbar-form input[type="radio"] { 2558 | margin-top: 3px; 2559 | } 2560 | .navbar-form .input-append, .navbar-form .input-prepend { 2561 | margin-top: 6px; 2562 | white-space: nowrap; 2563 | } 2564 | .navbar-form .input-append input, .navbar-form .input-prepend input { 2565 | margin-top: 0; 2566 | } 2567 | .navbar-search { 2568 | position: relative; 2569 | float: left; 2570 | margin-top: 6px; 2571 | margin-bottom: 0; 2572 | } 2573 | .navbar-search .search-query { 2574 | padding: 4px 9px; 2575 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 2576 | font-size: 13px; 2577 | font-weight: normal; 2578 | line-height: 1; 2579 | color: #ffffff; 2580 | color: rgba(255, 255, 255, 0.75); 2581 | background: #666; 2582 | background: rgba(255, 255, 255, 0.3); 2583 | border: 1px solid #111; 2584 | -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15); 2585 | -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15); 2586 | box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15); 2587 | -webkit-transition: none; 2588 | -moz-transition: none; 2589 | -ms-transition: none; 2590 | -o-transition: none; 2591 | transition: none; 2592 | } 2593 | .navbar-search .search-query :-moz-placeholder { 2594 | color: #eeeeee; 2595 | } 2596 | .navbar-search .search-query::-webkit-input-placeholder { 2597 | color: #eeeeee; 2598 | } 2599 | .navbar-search .search-query:hover { 2600 | color: #ffffff; 2601 | background-color: #999999; 2602 | background-color: rgba(255, 255, 255, 0.5); 2603 | } 2604 | .navbar-search .search-query:focus, .navbar-search .search-query.focused { 2605 | padding: 5px 10px; 2606 | color: #333333; 2607 | text-shadow: 0 1px 0 #ffffff; 2608 | background-color: #ffffff; 2609 | border: 0; 2610 | -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); 2611 | -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); 2612 | box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); 2613 | outline: 0; 2614 | } 2615 | .navbar-fixed-top { 2616 | position: fixed; 2617 | top: 0; 2618 | right: 0; 2619 | left: 0; 2620 | z-index: 1030; 2621 | } 2622 | .navbar-fixed-top .navbar-inner { 2623 | padding-left: 0; 2624 | padding-right: 0; 2625 | -webkit-border-radius: 0; 2626 | -moz-border-radius: 0; 2627 | border-radius: 0; 2628 | } 2629 | .navbar .nav { 2630 | position: relative; 2631 | left: 0; 2632 | display: block; 2633 | float: left; 2634 | margin: 0 10px 0 0; 2635 | } 2636 | .navbar .nav.pull-right { 2637 | float: right; 2638 | } 2639 | .navbar .nav > li { 2640 | display: block; 2641 | float: left; 2642 | } 2643 | .navbar .nav > li > a { 2644 | float: none; 2645 | padding: 10px 10px 11px; 2646 | line-height: 19px; 2647 | color: #999999; 2648 | text-decoration: none; 2649 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); 2650 | } 2651 | .navbar .nav > li > a:hover { 2652 | background-color: transparent; 2653 | color: #ffffff; 2654 | text-decoration: none; 2655 | } 2656 | .navbar .nav .active > a, .navbar .nav .active > a:hover { 2657 | color: #ffffff; 2658 | text-decoration: none; 2659 | background-color: #222222; 2660 | } 2661 | .navbar .divider-vertical { 2662 | height: 40px; 2663 | width: 1px; 2664 | margin: 0 9px; 2665 | overflow: hidden; 2666 | background-color: #222222; 2667 | border-right: 1px solid #333333; 2668 | } 2669 | .navbar .nav.pull-right { 2670 | margin-left: 10px; 2671 | margin-right: 0; 2672 | } 2673 | .navbar .dropdown-menu { 2674 | margin-top: 1px; 2675 | -webkit-border-radius: 4px; 2676 | -moz-border-radius: 4px; 2677 | border-radius: 4px; 2678 | } 2679 | .navbar .dropdown-menu:before { 2680 | content: ''; 2681 | display: inline-block; 2682 | border-left: 7px solid transparent; 2683 | border-right: 7px solid transparent; 2684 | border-bottom: 7px solid #ccc; 2685 | border-bottom-color: rgba(0, 0, 0, 0.2); 2686 | position: absolute; 2687 | top: -7px; 2688 | left: 9px; 2689 | } 2690 | .navbar .dropdown-menu:after { 2691 | content: ''; 2692 | display: inline-block; 2693 | border-left: 6px solid transparent; 2694 | border-right: 6px solid transparent; 2695 | border-bottom: 6px solid #ffffff; 2696 | position: absolute; 2697 | top: -6px; 2698 | left: 10px; 2699 | } 2700 | .navbar .nav .dropdown-toggle .caret, .navbar .nav .open.dropdown .caret { 2701 | border-top-color: #ffffff; 2702 | } 2703 | .navbar .nav .active .caret { 2704 | opacity: 1; 2705 | filter: alpha(opacity=100); 2706 | } 2707 | .navbar .nav .open > .dropdown-toggle, .navbar .nav .active > .dropdown-toggle, .navbar .nav .open.active > .dropdown-toggle { 2708 | background-color: transparent; 2709 | } 2710 | .navbar .nav .active > .dropdown-toggle:hover { 2711 | color: #ffffff; 2712 | } 2713 | .navbar .nav.pull-right .dropdown-menu { 2714 | left: auto; 2715 | right: 0; 2716 | } 2717 | .navbar .nav.pull-right .dropdown-menu:before { 2718 | left: auto; 2719 | right: 12px; 2720 | } 2721 | .navbar .nav.pull-right .dropdown-menu:after { 2722 | left: auto; 2723 | right: 13px; 2724 | } 2725 | .breadcrumb { 2726 | padding: 7px 14px; 2727 | margin: 0 0 18px; 2728 | background-color: #fbfbfb; 2729 | background-image: -moz-linear-gradient(top, #ffffff, #f5f5f5); 2730 | background-image: -ms-linear-gradient(top, #ffffff, #f5f5f5); 2731 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f5f5f5)); 2732 | background-image: -webkit-linear-gradient(top, #ffffff, #f5f5f5); 2733 | background-image: -o-linear-gradient(top, #ffffff, #f5f5f5); 2734 | background-image: linear-gradient(top, #ffffff, #f5f5f5); 2735 | background-repeat: repeat-x; 2736 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0); 2737 | border: 1px solid #ddd; 2738 | -webkit-border-radius: 3px; 2739 | -moz-border-radius: 3px; 2740 | border-radius: 3px; 2741 | -webkit-box-shadow: inset 0 1px 0 #ffffff; 2742 | -moz-box-shadow: inset 0 1px 0 #ffffff; 2743 | box-shadow: inset 0 1px 0 #ffffff; 2744 | } 2745 | .breadcrumb li { 2746 | display: inline-block; 2747 | text-shadow: 0 1px 0 #ffffff; 2748 | } 2749 | .breadcrumb .divider { 2750 | padding: 0 5px; 2751 | color: #999999; 2752 | } 2753 | .breadcrumb .active a { 2754 | color: #333333; 2755 | } 2756 | .pagination { 2757 | height: 36px; 2758 | margin: 18px 0; 2759 | } 2760 | .pagination ul { 2761 | display: inline-block; 2762 | *display: inline; 2763 | /* IE7 inline-block hack */ 2764 | 2765 | *zoom: 1; 2766 | margin-left: 0; 2767 | margin-bottom: 0; 2768 | -webkit-border-radius: 3px; 2769 | -moz-border-radius: 3px; 2770 | border-radius: 3px; 2771 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); 2772 | -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); 2773 | box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); 2774 | } 2775 | .pagination li { 2776 | display: inline; 2777 | } 2778 | .pagination a { 2779 | float: left; 2780 | padding: 0 14px; 2781 | line-height: 34px; 2782 | text-decoration: none; 2783 | border: 1px solid #ddd; 2784 | border-left-width: 0; 2785 | } 2786 | .pagination a:hover, .pagination .active a { 2787 | background-color: #f5f5f5; 2788 | } 2789 | .pagination .active a { 2790 | color: #999999; 2791 | cursor: default; 2792 | } 2793 | .pagination .disabled a, .pagination .disabled a:hover { 2794 | color: #999999; 2795 | background-color: transparent; 2796 | cursor: default; 2797 | } 2798 | .pagination li:first-child a { 2799 | border-left-width: 1px; 2800 | -webkit-border-radius: 3px 0 0 3px; 2801 | -moz-border-radius: 3px 0 0 3px; 2802 | border-radius: 3px 0 0 3px; 2803 | } 2804 | .pagination li:last-child a { 2805 | -webkit-border-radius: 0 3px 3px 0; 2806 | -moz-border-radius: 0 3px 3px 0; 2807 | border-radius: 0 3px 3px 0; 2808 | } 2809 | .pagination-centered { 2810 | text-align: center; 2811 | } 2812 | .pagination-right { 2813 | text-align: right; 2814 | } 2815 | .pager { 2816 | margin-left: 0; 2817 | margin-bottom: 18px; 2818 | list-style: none; 2819 | text-align: center; 2820 | *zoom: 1; 2821 | } 2822 | .pager:before, .pager:after { 2823 | display: table; 2824 | content: ""; 2825 | } 2826 | .pager:after { 2827 | clear: both; 2828 | } 2829 | .pager li { 2830 | display: inline; 2831 | } 2832 | .pager a { 2833 | display: inline-block; 2834 | padding: 5px 14px; 2835 | background-color: #fff; 2836 | border: 1px solid #ddd; 2837 | -webkit-border-radius: 15px; 2838 | -moz-border-radius: 15px; 2839 | border-radius: 15px; 2840 | } 2841 | .pager a:hover { 2842 | text-decoration: none; 2843 | background-color: #f5f5f5; 2844 | } 2845 | .pager .next a { 2846 | float: right; 2847 | } 2848 | .pager .previous a { 2849 | float: left; 2850 | } 2851 | .modal-open .dropdown-menu { 2852 | z-index: 2050; 2853 | } 2854 | .modal-open .dropdown.open { 2855 | *z-index: 2050; 2856 | } 2857 | .modal-open .popover { 2858 | z-index: 2060; 2859 | } 2860 | .modal-open .tooltip { 2861 | z-index: 2070; 2862 | } 2863 | .modal-backdrop { 2864 | position: fixed; 2865 | top: 0; 2866 | right: 0; 2867 | bottom: 0; 2868 | left: 0; 2869 | z-index: 1040; 2870 | background-color: #000000; 2871 | } 2872 | .modal-backdrop.fade { 2873 | opacity: 0; 2874 | } 2875 | .modal-backdrop, .modal-backdrop.fade.in { 2876 | opacity: 0.8; 2877 | filter: alpha(opacity=80); 2878 | } 2879 | .modal { 2880 | position: fixed; 2881 | top: 50%; 2882 | left: 50%; 2883 | z-index: 1050; 2884 | max-height: 500px; 2885 | overflow: auto; 2886 | width: 560px; 2887 | margin: -250px 0 0 -280px; 2888 | background-color: #ffffff; 2889 | border: 1px solid #999; 2890 | border: 1px solid rgba(0, 0, 0, 0.3); 2891 | *border: 1px solid #999; 2892 | /* IE6-7 */ 2893 | 2894 | -webkit-border-radius: 6px; 2895 | -moz-border-radius: 6px; 2896 | border-radius: 6px; 2897 | -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); 2898 | -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); 2899 | box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); 2900 | -webkit-background-clip: padding-box; 2901 | -moz-background-clip: padding-box; 2902 | background-clip: padding-box; 2903 | } 2904 | .modal.fade { 2905 | -webkit-transition: opacity .3s linear, top .3s ease-out; 2906 | -moz-transition: opacity .3s linear, top .3s ease-out; 2907 | -ms-transition: opacity .3s linear, top .3s ease-out; 2908 | -o-transition: opacity .3s linear, top .3s ease-out; 2909 | transition: opacity .3s linear, top .3s ease-out; 2910 | top: -25%; 2911 | } 2912 | .modal.fade.in { 2913 | top: 50%; 2914 | } 2915 | .modal-header { 2916 | padding: 9px 15px; 2917 | border-bottom: 1px solid #eee; 2918 | } 2919 | .modal-header .close { 2920 | margin-top: 2px; 2921 | } 2922 | .modal-body { 2923 | padding: 15px; 2924 | } 2925 | .modal-body .modal-form { 2926 | margin-bottom: 0; 2927 | } 2928 | .modal-footer { 2929 | padding: 14px 15px 15px; 2930 | margin-bottom: 0; 2931 | background-color: #f5f5f5; 2932 | border-top: 1px solid #ddd; 2933 | -webkit-border-radius: 0 0 6px 6px; 2934 | -moz-border-radius: 0 0 6px 6px; 2935 | border-radius: 0 0 6px 6px; 2936 | -webkit-box-shadow: inset 0 1px 0 #ffffff; 2937 | -moz-box-shadow: inset 0 1px 0 #ffffff; 2938 | box-shadow: inset 0 1px 0 #ffffff; 2939 | *zoom: 1; 2940 | } 2941 | .modal-footer:before, .modal-footer:after { 2942 | display: table; 2943 | content: ""; 2944 | } 2945 | .modal-footer:after { 2946 | clear: both; 2947 | } 2948 | .modal-footer .btn { 2949 | float: right; 2950 | margin-left: 5px; 2951 | margin-bottom: 0; 2952 | } 2953 | .tooltip { 2954 | position: absolute; 2955 | z-index: 1020; 2956 | display: block; 2957 | visibility: visible; 2958 | padding: 5px; 2959 | font-size: 11px; 2960 | opacity: 0; 2961 | filter: alpha(opacity=0); 2962 | } 2963 | .tooltip.in { 2964 | opacity: 0.8; 2965 | filter: alpha(opacity=80); 2966 | } 2967 | .tooltip.top { 2968 | margin-top: -2px; 2969 | } 2970 | .tooltip.right { 2971 | margin-left: 2px; 2972 | } 2973 | .tooltip.bottom { 2974 | margin-top: 2px; 2975 | } 2976 | .tooltip.left { 2977 | margin-left: -2px; 2978 | } 2979 | .tooltip.top .tooltip-arrow { 2980 | bottom: 0; 2981 | left: 50%; 2982 | margin-left: -5px; 2983 | border-left: 5px solid transparent; 2984 | border-right: 5px solid transparent; 2985 | border-top: 5px solid #000000; 2986 | } 2987 | .tooltip.left .tooltip-arrow { 2988 | top: 50%; 2989 | right: 0; 2990 | margin-top: -5px; 2991 | border-top: 5px solid transparent; 2992 | border-bottom: 5px solid transparent; 2993 | border-left: 5px solid #000000; 2994 | } 2995 | .tooltip.bottom .tooltip-arrow { 2996 | top: 0; 2997 | left: 50%; 2998 | margin-left: -5px; 2999 | border-left: 5px solid transparent; 3000 | border-right: 5px solid transparent; 3001 | border-bottom: 5px solid #000000; 3002 | } 3003 | .tooltip.right .tooltip-arrow { 3004 | top: 50%; 3005 | left: 0; 3006 | margin-top: -5px; 3007 | border-top: 5px solid transparent; 3008 | border-bottom: 5px solid transparent; 3009 | border-right: 5px solid #000000; 3010 | } 3011 | .tooltip-inner { 3012 | max-width: 200px; 3013 | padding: 3px 8px; 3014 | color: #ffffff; 3015 | text-align: center; 3016 | text-decoration: none; 3017 | background-color: #000000; 3018 | -webkit-border-radius: 4px; 3019 | -moz-border-radius: 4px; 3020 | border-radius: 4px; 3021 | } 3022 | .tooltip-arrow { 3023 | position: absolute; 3024 | width: 0; 3025 | height: 0; 3026 | } 3027 | .popover { 3028 | position: absolute; 3029 | top: 0; 3030 | left: 0; 3031 | z-index: 1010; 3032 | display: none; 3033 | padding: 5px; 3034 | } 3035 | .popover.top { 3036 | margin-top: -5px; 3037 | } 3038 | .popover.right { 3039 | margin-left: 5px; 3040 | } 3041 | .popover.bottom { 3042 | margin-top: 5px; 3043 | } 3044 | .popover.left { 3045 | margin-left: -5px; 3046 | } 3047 | .popover.top .arrow { 3048 | bottom: 0; 3049 | left: 50%; 3050 | margin-left: -5px; 3051 | border-left: 5px solid transparent; 3052 | border-right: 5px solid transparent; 3053 | border-top: 5px solid #000000; 3054 | } 3055 | .popover.right .arrow { 3056 | top: 50%; 3057 | left: 0; 3058 | margin-top: -5px; 3059 | border-top: 5px solid transparent; 3060 | border-bottom: 5px solid transparent; 3061 | border-right: 5px solid #000000; 3062 | } 3063 | .popover.bottom .arrow { 3064 | top: 0; 3065 | left: 50%; 3066 | margin-left: -5px; 3067 | border-left: 5px solid transparent; 3068 | border-right: 5px solid transparent; 3069 | border-bottom: 5px solid #000000; 3070 | } 3071 | .popover.left .arrow { 3072 | top: 50%; 3073 | right: 0; 3074 | margin-top: -5px; 3075 | border-top: 5px solid transparent; 3076 | border-bottom: 5px solid transparent; 3077 | border-left: 5px solid #000000; 3078 | } 3079 | .popover .arrow { 3080 | position: absolute; 3081 | width: 0; 3082 | height: 0; 3083 | } 3084 | .popover-inner { 3085 | padding: 3px; 3086 | width: 280px; 3087 | overflow: hidden; 3088 | background: #000000; 3089 | background: rgba(0, 0, 0, 0.8); 3090 | -webkit-border-radius: 6px; 3091 | -moz-border-radius: 6px; 3092 | border-radius: 6px; 3093 | -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); 3094 | -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); 3095 | box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); 3096 | } 3097 | .popover-title { 3098 | padding: 9px 15px; 3099 | line-height: 1; 3100 | background-color: #f5f5f5; 3101 | border-bottom: 1px solid #eee; 3102 | -webkit-border-radius: 3px 3px 0 0; 3103 | -moz-border-radius: 3px 3px 0 0; 3104 | border-radius: 3px 3px 0 0; 3105 | } 3106 | .popover-content { 3107 | padding: 14px; 3108 | background-color: #ffffff; 3109 | -webkit-border-radius: 0 0 3px 3px; 3110 | -moz-border-radius: 0 0 3px 3px; 3111 | border-radius: 0 0 3px 3px; 3112 | -webkit-background-clip: padding-box; 3113 | -moz-background-clip: padding-box; 3114 | background-clip: padding-box; 3115 | } 3116 | .popover-content p, .popover-content ul, .popover-content ol { 3117 | margin-bottom: 0; 3118 | } 3119 | .thumbnails { 3120 | margin-left: -20px; 3121 | list-style: none; 3122 | *zoom: 1; 3123 | } 3124 | .thumbnails:before, .thumbnails:after { 3125 | display: table; 3126 | content: ""; 3127 | } 3128 | .thumbnails:after { 3129 | clear: both; 3130 | } 3131 | .thumbnails > li { 3132 | float: left; 3133 | margin: 0 0 18px 20px; 3134 | } 3135 | .thumbnail { 3136 | display: block; 3137 | padding: 4px; 3138 | line-height: 1; 3139 | border: 1px solid #ddd; 3140 | -webkit-border-radius: 4px; 3141 | -moz-border-radius: 4px; 3142 | border-radius: 4px; 3143 | -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075); 3144 | -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075); 3145 | box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075); 3146 | } 3147 | a.thumbnail:hover { 3148 | border-color: #0088cc; 3149 | -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); 3150 | -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); 3151 | box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); 3152 | } 3153 | .thumbnail > img { 3154 | display: block; 3155 | max-width: 100%; 3156 | margin-left: auto; 3157 | margin-right: auto; 3158 | } 3159 | .thumbnail .caption { 3160 | padding: 9px; 3161 | } 3162 | .label { 3163 | padding: 2px 4px 3px; 3164 | font-size: 11.049999999999999px; 3165 | font-weight: bold; 3166 | color: #ffffff; 3167 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); 3168 | background-color: #999999; 3169 | -webkit-border-radius: 3px; 3170 | -moz-border-radius: 3px; 3171 | border-radius: 3px; 3172 | } 3173 | .label:hover { 3174 | color: #ffffff; 3175 | text-decoration: none; 3176 | } 3177 | .label-important { 3178 | background-color: #b94a48; 3179 | } 3180 | .label-important:hover { 3181 | background-color: #953b39; 3182 | } 3183 | .label-warning { 3184 | background-color: #f89406; 3185 | } 3186 | .label-warning:hover { 3187 | background-color: #c67605; 3188 | } 3189 | .label-success { 3190 | background-color: #468847; 3191 | } 3192 | .label-success:hover { 3193 | background-color: #356635; 3194 | } 3195 | .label-info { 3196 | background-color: #3a87ad; 3197 | } 3198 | .label-info:hover { 3199 | background-color: #2d6987; 3200 | } 3201 | @-webkit-keyframes progress-bar-stripes { 3202 | from { 3203 | background-position: 0 0; 3204 | } 3205 | to { 3206 | background-position: 40px 0; 3207 | } 3208 | } 3209 | @-moz-keyframes progress-bar-stripes { 3210 | from { 3211 | background-position: 0 0; 3212 | } 3213 | to { 3214 | background-position: 40px 0; 3215 | } 3216 | } 3217 | @keyframes progress-bar-stripes { 3218 | from { 3219 | background-position: 0 0; 3220 | } 3221 | to { 3222 | background-position: 40px 0; 3223 | } 3224 | } 3225 | .progress { 3226 | overflow: hidden; 3227 | height: 18px; 3228 | margin-bottom: 18px; 3229 | background-color: #f7f7f7; 3230 | background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); 3231 | background-image: -ms-linear-gradient(top, #f5f5f5, #f9f9f9); 3232 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); 3233 | background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); 3234 | background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); 3235 | background-image: linear-gradient(top, #f5f5f5, #f9f9f9); 3236 | background-repeat: repeat-x; 3237 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', GradientType=0); 3238 | -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); 3239 | -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); 3240 | box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); 3241 | -webkit-border-radius: 4px; 3242 | -moz-border-radius: 4px; 3243 | border-radius: 4px; 3244 | } 3245 | .progress .bar { 3246 | width: 0%; 3247 | height: 18px; 3248 | color: #ffffff; 3249 | font-size: 12px; 3250 | text-align: center; 3251 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); 3252 | background-color: #0e90d2; 3253 | background-image: -moz-linear-gradient(top, #149bdf, #0480be); 3254 | background-image: -ms-linear-gradient(top, #149bdf, #0480be); 3255 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); 3256 | background-image: -webkit-linear-gradient(top, #149bdf, #0480be); 3257 | background-image: -o-linear-gradient(top, #149bdf, #0480be); 3258 | background-image: linear-gradient(top, #149bdf, #0480be); 3259 | background-repeat: repeat-x; 3260 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#149bdf', endColorstr='#0480be', GradientType=0); 3261 | -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); 3262 | -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); 3263 | box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); 3264 | -webkit-box-sizing: border-box; 3265 | -moz-box-sizing: border-box; 3266 | box-sizing: border-box; 3267 | -webkit-transition: width 0.6s ease; 3268 | -moz-transition: width 0.6s ease; 3269 | -ms-transition: width 0.6s ease; 3270 | -o-transition: width 0.6s ease; 3271 | transition: width 0.6s ease; 3272 | } 3273 | .progress-striped .bar { 3274 | background-color: #62c462; 3275 | background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); 3276 | background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 3277 | background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 3278 | background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 3279 | background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 3280 | background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 3281 | -webkit-background-size: 40px 40px; 3282 | -moz-background-size: 40px 40px; 3283 | -o-background-size: 40px 40px; 3284 | background-size: 40px 40px; 3285 | } 3286 | .progress.active .bar { 3287 | -webkit-animation: progress-bar-stripes 2s linear infinite; 3288 | -moz-animation: progress-bar-stripes 2s linear infinite; 3289 | animation: progress-bar-stripes 2s linear infinite; 3290 | } 3291 | .progress-danger .bar { 3292 | background-color: #dd514c; 3293 | background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); 3294 | background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35); 3295 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); 3296 | background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); 3297 | background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); 3298 | background-image: linear-gradient(top, #ee5f5b, #c43c35); 3299 | background-repeat: repeat-x; 3300 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0); 3301 | } 3302 | .progress-danger.progress-striped .bar { 3303 | background-color: #ee5f5b; 3304 | background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); 3305 | background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 3306 | background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 3307 | background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 3308 | background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 3309 | background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 3310 | } 3311 | .progress-success .bar { 3312 | background-color: #5eb95e; 3313 | background-image: -moz-linear-gradient(top, #62c462, #57a957); 3314 | background-image: -ms-linear-gradient(top, #62c462, #57a957); 3315 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); 3316 | background-image: -webkit-linear-gradient(top, #62c462, #57a957); 3317 | background-image: -o-linear-gradient(top, #62c462, #57a957); 3318 | background-image: linear-gradient(top, #62c462, #57a957); 3319 | background-repeat: repeat-x; 3320 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0); 3321 | } 3322 | .progress-success.progress-striped .bar { 3323 | background-color: #62c462; 3324 | background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); 3325 | background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 3326 | background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 3327 | background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 3328 | background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 3329 | background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 3330 | } 3331 | .progress-info .bar { 3332 | background-color: #4bb1cf; 3333 | background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); 3334 | background-image: -ms-linear-gradient(top, #5bc0de, #339bb9); 3335 | background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); 3336 | background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); 3337 | background-image: -o-linear-gradient(top, #5bc0de, #339bb9); 3338 | background-image: linear-gradient(top, #5bc0de, #339bb9); 3339 | background-repeat: repeat-x; 3340 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0); 3341 | } 3342 | .progress-info.progress-striped .bar { 3343 | background-color: #5bc0de; 3344 | background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); 3345 | background-image: -webkit-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 3346 | background-image: -moz-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 3347 | background-image: -ms-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 3348 | background-image: -o-linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 3349 | background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 3350 | } 3351 | .accordion { 3352 | margin-bottom: 18px; 3353 | } 3354 | .accordion-group { 3355 | margin-bottom: 2px; 3356 | border: 1px solid #e5e5e5; 3357 | -webkit-border-radius: 4px; 3358 | -moz-border-radius: 4px; 3359 | border-radius: 4px; 3360 | } 3361 | .accordion-heading { 3362 | border-bottom: 0; 3363 | } 3364 | .accordion-heading .accordion-toggle { 3365 | display: block; 3366 | padding: 8px 15px; 3367 | } 3368 | .accordion-inner { 3369 | padding: 9px 15px; 3370 | border-top: 1px solid #e5e5e5; 3371 | } 3372 | .carousel { 3373 | position: relative; 3374 | margin-bottom: 18px; 3375 | line-height: 1; 3376 | } 3377 | .carousel-inner { 3378 | overflow: hidden; 3379 | width: 100%; 3380 | position: relative; 3381 | } 3382 | .carousel .item { 3383 | display: none; 3384 | position: relative; 3385 | -webkit-transition: 0.6s ease-in-out left; 3386 | -moz-transition: 0.6s ease-in-out left; 3387 | -ms-transition: 0.6s ease-in-out left; 3388 | -o-transition: 0.6s ease-in-out left; 3389 | transition: 0.6s ease-in-out left; 3390 | } 3391 | .carousel .item > img { 3392 | display: block; 3393 | line-height: 1; 3394 | } 3395 | .carousel .active, .carousel .next, .carousel .prev { 3396 | display: block; 3397 | } 3398 | .carousel .active { 3399 | left: 0; 3400 | } 3401 | .carousel .next, .carousel .prev { 3402 | position: absolute; 3403 | top: 0; 3404 | width: 100%; 3405 | } 3406 | .carousel .next { 3407 | left: 100%; 3408 | } 3409 | .carousel .prev { 3410 | left: -100%; 3411 | } 3412 | .carousel .next.left, .carousel .prev.right { 3413 | left: 0; 3414 | } 3415 | .carousel .active.left { 3416 | left: -100%; 3417 | } 3418 | .carousel .active.right { 3419 | left: 100%; 3420 | } 3421 | .carousel-control { 3422 | position: absolute; 3423 | top: 40%; 3424 | left: 15px; 3425 | width: 40px; 3426 | height: 40px; 3427 | margin-top: -20px; 3428 | font-size: 60px; 3429 | font-weight: 100; 3430 | line-height: 30px; 3431 | color: #ffffff; 3432 | text-align: center; 3433 | background: #222222; 3434 | border: 3px solid #ffffff; 3435 | -webkit-border-radius: 23px; 3436 | -moz-border-radius: 23px; 3437 | border-radius: 23px; 3438 | opacity: 0.5; 3439 | filter: alpha(opacity=50); 3440 | } 3441 | .carousel-control.right { 3442 | left: auto; 3443 | right: 15px; 3444 | } 3445 | .carousel-control:hover { 3446 | color: #ffffff; 3447 | text-decoration: none; 3448 | opacity: 0.9; 3449 | filter: alpha(opacity=90); 3450 | } 3451 | .carousel-caption { 3452 | position: absolute; 3453 | left: 0; 3454 | right: 0; 3455 | bottom: 0; 3456 | padding: 10px 15px 5px; 3457 | background: #333333; 3458 | background: rgba(0, 0, 0, 0.75); 3459 | } 3460 | .carousel-caption h4, .carousel-caption p { 3461 | color: #ffffff; 3462 | } 3463 | .hero-unit { 3464 | padding: 60px; 3465 | margin-bottom: 30px; 3466 | background-color: #f5f5f5; 3467 | -webkit-border-radius: 6px; 3468 | -moz-border-radius: 6px; 3469 | border-radius: 6px; 3470 | } 3471 | .hero-unit h1 { 3472 | margin-bottom: 0; 3473 | font-size: 60px; 3474 | line-height: 1; 3475 | letter-spacing: -1px; 3476 | } 3477 | .hero-unit p { 3478 | font-size: 18px; 3479 | font-weight: 200; 3480 | line-height: 27px; 3481 | } 3482 | .pull-right { 3483 | float: right; 3484 | } 3485 | .pull-left { 3486 | float: left; 3487 | } 3488 | .hide { 3489 | display: none; 3490 | } 3491 | .show { 3492 | display: block; 3493 | } 3494 | .invisible { 3495 | visibility: hidden; 3496 | } 3497 | --------------------------------------------------------------------------------