├── cgi ├── __init__.py ├── db.pyc ├── easymeeting.db ├── db.py └── app.py ├── .gitignore ├── doc ├── 周视图.png ├── 月视图.png ├── 注册页面.jpg ├── 登陆页面.png ├── 预定会议对话框.png └── 预订会议详情.png ├── images ├── logo.png └── logo.xcf ├── em-uwsgi.ini ├── bootstrap ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── css │ ├── bootstrap-theme.min.css │ └── bootstrap-theme.css └── js │ └── bootstrap.min.js ├── nginx-uwsgi.conf ├── README.md ├── gulpfile.js ├── sign.html ├── css ├── sign.css └── main.css └── js ├── sign.js └── calendar.js /cgi/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | __pycache__/ 3 | .eslintrc.json 4 | *~ 5 | -------------------------------------------------------------------------------- /cgi/db.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PepperPapa/easyMeeting/HEAD/cgi/db.pyc -------------------------------------------------------------------------------- /doc/周视图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PepperPapa/easyMeeting/HEAD/doc/周视图.png -------------------------------------------------------------------------------- /doc/月视图.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PepperPapa/easyMeeting/HEAD/doc/月视图.png -------------------------------------------------------------------------------- /doc/注册页面.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PepperPapa/easyMeeting/HEAD/doc/注册页面.jpg -------------------------------------------------------------------------------- /doc/登陆页面.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PepperPapa/easyMeeting/HEAD/doc/登陆页面.png -------------------------------------------------------------------------------- /doc/预定会议对话框.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PepperPapa/easyMeeting/HEAD/doc/预定会议对话框.png -------------------------------------------------------------------------------- /doc/预订会议详情.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PepperPapa/easyMeeting/HEAD/doc/预订会议详情.png -------------------------------------------------------------------------------- /images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PepperPapa/easyMeeting/HEAD/images/logo.png -------------------------------------------------------------------------------- /images/logo.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PepperPapa/easyMeeting/HEAD/images/logo.xcf -------------------------------------------------------------------------------- /cgi/easymeeting.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PepperPapa/easyMeeting/HEAD/cgi/easymeeting.db -------------------------------------------------------------------------------- /em-uwsgi.ini: -------------------------------------------------------------------------------- 1 | [uwsgi] 2 | socket = :9090 3 | plugin = python3 4 | wsgi-file = /home/zx/projects/easyMeeting/cgi/app.py 5 | process = 3 -------------------------------------------------------------------------------- /bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PepperPapa/easyMeeting/HEAD/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PepperPapa/easyMeeting/HEAD/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PepperPapa/easyMeeting/HEAD/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PepperPapa/easyMeeting/HEAD/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /nginx-uwsgi.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80 default_server; 3 | listen [::]:80 default_server; 4 | 5 | server_name *.easymeeting.com; 6 | root /home/zx/projects/; 7 | 8 | location /easyMeeting { 9 | index index.html; 10 | try_files $uri $uri/ =404; 11 | } 12 | 13 | location ~ \/easyMeeting\/(signup|signin|addmeeting|querymeetings) { 14 | include uwsgi_params; 15 | uwsgi_pass 127.0.0.1:9090; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # easyMeeting 2 | ## 会议室预定系统 3 | > 使用jQuery库和Bootstrap框架开发 4 | 1. 系统环境: 5 | Ubuntu16.04 LTS 6 | 2. Nginx配置: 7 | nginx配置文件路径为/etc/nginx/sites-available/default, 其他配置为默认 8 | 9 | ### 1. 注册页面 10 | ![注册页面](/doc/注册页面.jpg) 11 | ### 2. 登陆页面 12 | ![登陆页面](/doc/登陆页面.png) 13 | ### 3. 月视图 14 | ![月视图](/doc/月视图.png) 15 | ### 4. 预定会议对话框 16 | ![预定会议对话框](/doc/预定会议对话框.png) 17 | ### 5. 预定会议详情 18 | ![预定会议详情](/doc/预订会议详情.png) 19 | ### 6. 周视图 20 | ![周视图](/doc/周视图.png) -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var browserSync = require("browser-sync"); 3 | var reload = browserSync.reload; 4 | 5 | gulp.task("default", ["watch", "serve"]); 6 | 7 | gulp.task("serve", function() { 8 | browserSync.init({ 9 | server: './' 10 | }); 11 | }); 12 | 13 | gulp.task("watch", function() { 14 | gulp.watch("*.html").on("change", reload); 15 | gulp.watch("css/*.css").on("change", reload); 16 | gulp.watch("bootstrap/css/*.css").on("change", reload); 17 | gulp.watch("js/*.js").on("change", reload); 18 | }); 19 | -------------------------------------------------------------------------------- /sign.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | login easyMeeting 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |
19 |

easyMeeting

20 |

简单地预定、管理会议

21 |
22 | 23 |
24 |
25 | 26 | 27 |
28 | 29 |
30 | 31 | 51 | 52 | 53 | 66 |
67 |
68 |
69 | 70 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /css/sign.css: -------------------------------------------------------------------------------- 1 | /* 通用样式 */ 2 | html { 3 | height: 100%; 4 | } 5 | 6 | body { 7 | margin: 0 auto; 8 | width: 360px; 9 | height: 100%; 10 | min-height: 545px; 11 | font-family: 'Helvetica Neue',Helvetica,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',Arial,sans-serif; 12 | color: #555; 13 | background-color: #f7fafc; 14 | } 15 | 16 | header { 17 | padding-top: 120px; 18 | } 19 | 20 | h1 { 21 | margin: 0; 22 | font-size: 3em; 23 | color: #1d80cf; 24 | } 25 | 26 | h2 { 27 | margin: 30px 0 20px; 28 | font-size: 18px; 29 | font-weight: normal; 30 | line-height: 1; 31 | } 32 | 33 | .pull-left { 34 | float: left; 35 | } 36 | 37 | .pull-right { 38 | float: right; 39 | } 40 | 41 | .hide { 42 | display: none; 43 | } 44 | 45 | .signup-info { 46 | position: relative; 47 | } 48 | 49 | .error { 50 | position: absolute; 51 | top: 0; 52 | left: 376px; 53 | width: 300px; 54 | color: red; 55 | height: 47px; 56 | line-height: 47px; 57 | border: 1px solid red; 58 | border-radius: 3px !important; 59 | box-shadow: 0 0 8px rgba(255, 0, 0, 0.5); 60 | background-color: #fff; 61 | } 62 | 63 | .error div { 64 | position: absolute; 65 | border-bottom: 1px solid red; 66 | border-left: 1px solid red; 67 | border-top: 1px solid #fff; 68 | border-right: 1px solid #fff; 69 | border-radius: 0 !important; 70 | width: 16px; 71 | height: 16px; 72 | top: 15px; 73 | left: -8px; 74 | background-color: #fff; 75 | transform: rotate(45deg); 76 | } 77 | 78 | input { 79 | outline: none; 80 | } 81 | 82 | input[type="text"], 83 | input[type="password"] { 84 | height: 47px; 85 | width: 100%; 86 | box-sizing: border-box; 87 | border: none; 88 | padding: 0 10px; 89 | } 90 | 91 | a, 92 | a:hover, 93 | a:link, 94 | a:active { 95 | color: #555; 96 | text-decoration: none; 97 | } 98 | 99 | .sign-tab-navs { 100 | margin-bottom: 20px; 101 | } 102 | 103 | .to-signup, 104 | .to-signin { 105 | display: inline-block; 106 | margin: 0 30px; 107 | font-size: 1.2em; 108 | line-height: 35px; 109 | cursor: pointer; 110 | } 111 | 112 | .active { 113 | color: #1d80cf; 114 | border-bottom: 2px solid #1d80cf; 115 | } 116 | 117 | .btn { 118 | display: block; 119 | margin: 15px 0; 120 | height: 47px; 121 | width: 100%; 122 | border: none; 123 | border-radius: 3px; 124 | font-size: 1em; 125 | font-weight: bold; 126 | color: #fff; 127 | } 128 | 129 | .btn-signin { 130 | background-color: #80c3f7; 131 | } 132 | 133 | .btn-signin:hover { 134 | background-color: #1d80cf; 135 | } 136 | 137 | .btn-signup { 138 | background-color: #8add6d; 139 | } 140 | 141 | .btn-signup:hover { 142 | background-color: #5ca941; 143 | } 144 | 145 | .signup-input > :not(:first-child), 146 | .signin-input > :not(:first-child) { 147 | border-top: 1px solid #d5d5d5; 148 | } 149 | 150 | .signup-input :first-child, 151 | .signin-input :first-child { 152 | border-radius: 3px 3px 0 0; 153 | } 154 | 155 | .signup-input :last-child, 156 | .signin-input :last-child { 157 | border-radius: 0 0 3px 3px; 158 | } 159 | 160 | 161 | .signup-or-signin { 162 | box-sizing: border-box; 163 | height: 100%; 164 | padding-bottom: 42px; 165 | text-align: center; 166 | } 167 | 168 | .signup-input, 169 | .signin-input { 170 | border: 1px solid #d5d5d5; 171 | border-radius: 3px; 172 | margin-bottom: 5px; 173 | } 174 | 175 | footer { 176 | position: relative; 177 | margin-top: -42px; 178 | height: 42px; 179 | text-align: center; 180 | line-height: 42px; 181 | font-size: 0.8em; 182 | color: #555; 183 | } 184 | -------------------------------------------------------------------------------- /cgi/db.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | #!usr/bin/python3 3 | # ubuntu16.04LTS 4 | 5 | import sqlite3 6 | import time 7 | 8 | def connectDatabase(): 9 | conn = sqlite3.connect("/home/zx/projects/easyMeeting/cgi/easymeeting.db") 10 | return (conn, conn.cursor()) 11 | 12 | """ 13 | 用户注册、登录等相关 14 | """ 15 | def createUserTable(): 16 | conn, cursor = connectDatabase() 17 | 18 | # get all table name in database 19 | cursor.execute("SELECT NAME FROM sqlite_master WHERE TYPE='table'") 20 | table_list = [name[0] for name in cursor.fetchall()] 21 | 22 | if not 'users' in table_list: 23 | cursor.execute("""CREATE TABLE users 24 | (NAME TEXT PRIMARY KEY NOT NULL, 25 | PASSWORD TEXT NOT NULL);""") 26 | return (conn, cursor) 27 | 28 | 29 | def createUser(name, pwd, repeate_pwd): 30 | # 如果users不存在则首先创建表users 31 | conn, cursor = createUserTable() 32 | 33 | # TODO: 用户名格式和密码格式校验, 密码重复验证 34 | # TODO: 密码的加密处理 35 | # 检查name是否存在,不存在才能插入值 36 | cursor.execute("SELECT NAME FROM users WHERE NAME='{}'".format(name)) 37 | if (not cursor.fetchall()): 38 | cursor.execute("""INSERT INTO users (NAME, PASSWORD) 39 | VALUES ('{}', '{}')""".format(name, pwd)) 40 | conn.commit() 41 | cursor.execute("SELECT * FROM users WHERE NAME='{}'".format(name)) 42 | user = cursor.fetchone() 43 | conn.close() 44 | # s_: 表示已经加密处理 45 | return {'name': user[0], 's_password': user[1]} 46 | 47 | def loginUser(name, pwd): 48 | conn, cursor = connectDatabase() 49 | cursor.execute("SELECT * FROM users WHERE NAME='{}'".format(name)) 50 | query_user = cursor.fetchone() 51 | if query_user: 52 | if (name == query_user[0] and pwd == query_user[1]): 53 | return {'name': query_user[0], 's_password': query_user[1]} 54 | 55 | 56 | """ 57 | 预定会议相关 58 | """ 59 | def createMeetingTable(): 60 | conn, cursor = connectDatabase() 61 | 62 | # query all tables name in database 63 | cursor.execute("SELECT NAME FROM sqlite_master WHERE TYPE='table'") 64 | table_list = [name[0] for name in cursor.fetchall()] 65 | 66 | if not "meetings" in table_list: 67 | cursor.execute("""CREATE TABLE meetings 68 | (ID INT PRIMARY KEY NOT NULL, 69 | TIMESTAMP TEXT NOT NULL, 70 | TITLE TEXT NOT NULL, 71 | ROOM TEXT NOT NULL, 72 | START TEXT NOT NULL, 73 | END TEXT NOT NULL);""") 74 | return (conn, cursor) 75 | 76 | def addMeeting(timestamp, title, room, start, end): 77 | id = int(time.time() * 10000000) 78 | # 如果meetings不存在则首先创建表meetings 79 | conn, cursor = createMeetingTable() 80 | 81 | # 首先查询是否有重复的会议室预定数据,无则增加,否则返回None 82 | cursor.execute(""" SELECT * FROM meetings 83 | WHERE TIMESTAMP='{}' and 84 | TITLE='{}' and 85 | ROOM='{}' and 86 | START='{}' and 87 | END='{}'""".format(timestamp, title, room, start, end)) 88 | if not cursor.fetchone(): 89 | cursor.execute("""INSERT INTO meetings (ID, TIMESTAMP, TITLE, ROOM, START, END) 90 | VALUES ('{}', '{}', '{}', '{}', '{}', '{}')""" 91 | .format(id, timestamp, title, room, start, end)) 92 | conn.commit() 93 | cursor.execute("SELECT * FROM meetings WHERE ID={}".format(id)) 94 | meeting = cursor.fetchone() 95 | conn.close() 96 | # s_: 表示已经加密处理 97 | return { 98 | "id": meeting[0], 99 | "timestamp": meeting[1], 100 | "title": meeting[2], 101 | "room": meeting[3], 102 | "start": meeting[4], 103 | "end": meeting[5] 104 | } 105 | 106 | def queryMeetings(start_timestamp, end_timestamp): 107 | conn, cursor = createMeetingTable() 108 | cursor.execute("""SELECT * FROM meetings 109 | WHERE TIMESTAMP >= {} and 110 | TIMESTAMP <= {}""".format(start_timestamp, end_timestamp)) 111 | meetings = cursor.fetchall() 112 | return meetings 113 | 114 | if __name__ == '__main__': 115 | print(queryMeetings("1464451200000", "1478966400000")) 116 | -------------------------------------------------------------------------------- /cgi/app.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | #!/usr/bin/python3 3 | # ubuntu16.04LTS 4 | 5 | import json 6 | import time 7 | import datetime 8 | 9 | if __name__ == '__main__': 10 | import db 11 | else: 12 | from cgi import db 13 | 14 | """ 15 | 用户登录、注册相关 16 | """ 17 | def newCookieExpires(exdays): 18 | t = time.time() + exdays * 24 * 60 * 60 19 | return time.strftime("%A, %d-%b-%y %H:%M:%S GMT", time.localtime(t)) 20 | 21 | def handleSignup(environ): 22 | json_body_length = int(environ['CONTENT_LENGTH']) 23 | json_body = environ['wsgi.input'].read(json_body_length).decode('utf-8') 24 | # json format- {name: xx, password: xx, verify: xx} 25 | json_body = json.loads(json_body) 26 | 27 | new_user = db.createUser(json_body['name'], 28 | json_body['password'], 29 | json_body['verify']) 30 | return json.dumps(new_user) 31 | 32 | def handleSignin(environ): 33 | json_body_length = int(environ['CONTENT_LENGTH']) 34 | json_body = environ['wsgi.input'].read(json_body_length).decode('utf-8') 35 | # json format- {name: xx, password: xx, verify: xx} 36 | json_body = json.loads(json_body) 37 | 38 | # TODO: 返回值需要重新考虑 39 | new_user = db.loginUser(json_body['name'], json_body['s_password']) 40 | if new_user: 41 | return json_body 42 | 43 | """ 44 | 预定会议室相关 45 | """ 46 | def handleAddMeeting(environ): 47 | json_body_length = int(environ['CONTENT_LENGTH']) 48 | json_body = environ['wsgi.input'].read(json_body_length).decode('utf-8') 49 | # json format- 50 | # {timestamp: xx, title: xx, room: xx, start: xx, end: xx} 51 | json_body = json.loads(json_body) 52 | new_meeting = db.addMeeting(json_body["timestamp"], 53 | json_body["title"], 54 | json_body["room"], 55 | json_body["start"], 56 | json_body["end"]) 57 | return new_meeting 58 | 59 | def handleQueryMeeting(environ): 60 | json_body_length = int(environ['CONTENT_LENGTH']) 61 | json_body = environ['wsgi.input'].read(json_body_length).decode('utf-8') 62 | # json format- 63 | # {start_timestamp: xx, end_timestamp: xx} 64 | json_body = json.loads(json_body) 65 | print(json_body) 66 | meetings = db.queryMeetings(json_body["start_timestamp"], 67 | json_body["end_timestamp"]) 68 | return meetings 69 | 70 | def showEnviron(environ): 71 | html = "\n" 72 | for k, v in environ.items(): 73 | html += "\n".format(k, v) 74 | html += "
{}{}
\n" 75 | return html 76 | 77 | 78 | def application(environ, start_response): 79 | url = environ['PATH_INFO'] # /easyMeeting/xxxx 80 | url = url.split("/")[2] 81 | print(url) 82 | if url == "signup": 83 | start_response('200 OK', 84 | [('Content-Type','application/json;charset="utf-8"')]) 85 | body = handleSignup(environ) 86 | #html += showEnviron(environ) 87 | return [body.encode("utf-8")] 88 | elif url == "signin": 89 | body = handleSignin(environ) 90 | #html += showEnviron(environ) 91 | 92 | # 登录成功则发送cookie到client保存用户名和密码信息 93 | # TODO: 密码需加密处理 94 | headers = [('Content-Type','application/json;charset="utf-8"')] 95 | if body: 96 | if body["rember_me"]: 97 | headers.append(('Set-Cookie', 98 | 'name={};Expires={};' 99 | .format(body['name'], newCookieExpires(30)))) 100 | headers.append(('Set-Cookie', 101 | 's_password={};Expires={};' 102 | .format(body['s_password'], newCookieExpires(30)))) 103 | else: 104 | headers.append(('Set-Cookie', 'name={};'.format(body['name']))) 105 | headers.append(('Set-Cookie', 's_password={};'.format(body['s_password']))) 106 | 107 | start_response('200 OK', headers) 108 | body = json.dumps(body) 109 | return [body.encode("utf-8")] 110 | elif url == "addmeeting": 111 | start_response('200 OK', 112 | [('Content-Type','application/json;charset="utf-8"')]) 113 | body = handleAddMeeting(environ) 114 | #html += showEnviron(environ) 115 | return [json.dumps(body).encode("utf-8")] 116 | elif url == "querymeetings": 117 | start_response('200 OK', 118 | [('Content-Type','application/json;charset="utf-8"')]) 119 | body = handleQueryMeeting(environ) 120 | #html += showEnviron(environ) 121 | return [json.dumps(body).encode("utf-8")] 122 | 123 | if __name__ == '__main__': 124 | print(newCookieExpires(30)) 125 | print(newCookieExpires(-1)) 126 | -------------------------------------------------------------------------------- /js/sign.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | var el_signup = document.querySelector(".to-signup"); 3 | var el_signin = document.querySelector(".to-signin"); 4 | var form_signup = document.getElementsByClassName("signup-form")[0]; 5 | var form_signin = document.getElementsByClassName("signin-form")[0]; 6 | var input_rember_me = document.querySelector("input[name=rember-me]"); 7 | var lb_rember_me = document.querySelector("label[for=rember-me]"); 8 | 9 | // 判断某个dom元素是否包含某个类名 10 | function hasClass(element, name) { 11 | var class_lists = element.classList; 12 | for (var i in class_lists) { 13 | if (name === class_lists[i]) { 14 | return true; 15 | } 16 | } 17 | return false; 18 | } 19 | 20 | // 校验用户名格式 21 | function formatUsername(username) { 22 | if (username.length > 0) { 23 | return true; 24 | } 25 | return false; 26 | } 27 | 28 | // 校验密码格式 29 | function formatPassword(password) { 30 | if (password.length > 0) { 31 | return true; 32 | } 33 | return false; 34 | } 35 | 36 | // 校验重复输入的密码是否相同 37 | function verifyPassword(password, repeate_password) { 38 | return password === repeate_password; 39 | } 40 | 41 | $(".signup-info input").on("input", function(e) { 42 | var info = e.target.name; 43 | if (info === "username") { 44 | if (!formatUsername(this.value)) { 45 | $(this).next().attr("class", "error"); 46 | } else { 47 | $(this).next().attr("class", "hide"); 48 | } 49 | } 50 | 51 | if (info === "password") { 52 | if (!formatPassword(this.value)) { 53 | $(this).next().attr("class", "error"); 54 | } else { 55 | $(this).next().attr("class", "hide"); 56 | } 57 | } 58 | 59 | if (info === "re-password") { 60 | var pwd = $(".signup-info input[name=password]").val(); 61 | if (!verifyPassword(pwd, this.value)) { 62 | $(this).next().attr("class", "error"); 63 | } else { 64 | $(this).next().attr("class", "hide"); 65 | } 66 | } 67 | 68 | }); 69 | 70 | // 点击注册进入注册页面处理 71 | el_signup.addEventListener("click", function() { 72 | if (hasClass(form_signup, "hide")) { 73 | // 增加signup相关的元素的显示及样式 74 | form_signup.className = form_signup.className.replace(/ hide/g, ""); 75 | this.className += " active"; 76 | 77 | 78 | // 取消signin相关的元素的显示及样式 79 | form_signin.className += " hide"; 80 | el_signin.className = el_signin.className.replace(/ active/g, ""); 81 | } 82 | }); 83 | 84 | // 点击登录进入登录页面处理 85 | $(".to-signin").on("click", function() { 86 | if (hasClass(form_signin, "hide")) { 87 | // 增加signin相关的元素的显示及样式 88 | form_signin.className = form_signin.className.replace(/ hide/g, ""); 89 | this.className += " active"; 90 | 91 | 92 | // 取消signup相关的元素的显示及样式 93 | form_signup.className += " hide"; 94 | el_signup.className = el_signup.className.replace(/ active/g, ""); 95 | } 96 | }); 97 | 98 | // 登录选项,点击label-"记住我"也设置为checkbox切换选中功能 99 | lb_rember_me.addEventListener("click", function() { 100 | input_rember_me.checked = !input_rember_me.checked; 101 | }); 102 | 103 | /* 104 | * 注册和登录页面,用户名改变则初始化alert 105 | */ 106 | $("input[name=username]").on("textInput", function() { 107 | // TODO: 每次输入文本都触发该事件是否合理哪? 108 | $(".alert").each(function() { 109 | this.className = "alert hide"; 110 | }); 111 | }); 112 | 113 | /* 114 | * 点击注册按钮处理:ajax请求发往server端进行注册,server端返回json数据传达 115 | * 注册是否成功的信息 116 | */ 117 | $(".btn-signup").on("click", function() { 118 | // 获取注册信息 119 | var signup_info = {}; 120 | signup_info.name = $(".signup-input input").eq(0).val(); 121 | signup_info.password = $(".signup-input input").eq(1).val(); 122 | signup_info.verify = $(".signup-input input").eq(2).val(); 123 | 124 | $(".signup-info input").trigger("input"); 125 | if (formatUsername(signup_info.name) && 126 | formatPassword(signup_info.password) && 127 | verifyPassword(signup_info.password, signup_info.verify)) { 128 | // 发送ajax请求到server进行用户注册 129 | $.ajax({ 130 | method: "POST", 131 | url: "/easyMeeting/signup", 132 | contentType: "application/json;charset='utf-8'", 133 | data: JSON.stringify(signup_info) 134 | }).done(function(response_body) { 135 | // 注册成功则切换至登录页面并自动补全用户名和密码 136 | if (response_body !== null) { 137 | $(".to-signin").trigger("click"); 138 | $(".signin-input input").eq(0).val(signup_info.name); 139 | $(".signin-input input").eq(1).val(signup_info.password); 140 | $(".signin-form .alert").text("注册成功,请登录...") 141 | .addClass("alert-success").removeClass("hide"); 142 | // 注册失败则给出错误提示"用户名已经存在" 143 | } else { 144 | $(".signup-form .alert").text("用户已注册,请直接登录或选择其他的用户名进行注册...") 145 | .addClass("alert-warning").removeClass("hide"); 146 | } 147 | }); 148 | } else { 149 | $(".signup-form .alert").text("注册信息不满足格式要求,请重新输入...") 150 | .addClass("alert-warning").removeClass("hide"); 151 | } 152 | }); 153 | 154 | /* 155 | * 跳转到path指定的页面 156 | */ 157 | function redirect(path) { 158 | window.location.pathname = "/easyMeeting" + path; 159 | } 160 | 161 | function requestLogin(data) { 162 | $.ajax({ 163 | method: "POST", 164 | url: "/easyMeeting/signin", 165 | contentType: "application/json;charset='utf-8'", 166 | data: JSON.stringify(data) 167 | }).done(function(response_body) { 168 | // 登录成功则切换至index.html页面并显示在index.html页面显示用户信息 169 | if (response_body !== null) { 170 | // 登录成功增加登录状态的cookie信息 171 | document.cookie = "islogin=true"; 172 | // 跳转到主页面,主页面通过cookie信息刷新用户信息 173 | redirect("/index.html"); 174 | // 登录失败则给出错误提示"用户名或密码错误..." 175 | } else { 176 | $(".signin-form .alert").text("用户名或密码错误...") 177 | .addClass("alert-warning").removeClass("hide"); 178 | } 179 | }); 180 | } 181 | 182 | /* 183 | * 点击登录按钮处理:ajax请求发往server端进行登录处理,登录成功跳转到 184 | * index.html页面,失败进行错误提示 185 | */ 186 | $(".btn-signin").on("click", function() { 187 | // 获取登录信息 188 | var signin_info = {}; 189 | signin_info.name = $(".signin-input input").eq(0).val(); 190 | signin_info.s_password = $(".signin-input input").eq(1).val(); 191 | signin_info.rember_me = document.querySelector("input[name=rember-me").checked; 192 | 193 | // 发送ajax请求到server进行用户登录 194 | requestLogin(signin_info); 195 | }); 196 | }); 197 | -------------------------------------------------------------------------------- /css/main.css: -------------------------------------------------------------------------------- 1 | /*comman style*/ 2 | .error { 3 | border: 1px solid red !important; 4 | box-shadow: 0 0 8px rgba(255, 0, 0, 0.5); 5 | } 6 | 7 | /*header style*/ 8 | .container-fluid { 9 | font-weight: bold; 10 | background-color: #026aa7; 11 | } 12 | 13 | header.navbar-default { 14 | border: 0; 15 | } 16 | 17 | .menu, .search { 18 | text-align: left; 19 | margin-left: 5px; 20 | float: left; 21 | } 22 | 23 | .search { 24 | width: 190px; 25 | } 26 | 27 | .search input { 28 | background-color: #3784c6; 29 | } 30 | 31 | .search input:focus { 32 | width: 380px; 33 | background-color: #f5f5f5; 34 | } 35 | 36 | .logo { 37 | position: absolute; 38 | top: 5px; 39 | left: 50%; 40 | text-align: center; 41 | line-height: 34px; 42 | margin-left: -67px; 43 | } 44 | 45 | .logo img { 46 | height: 34px; 47 | width: auto; 48 | } 49 | 50 | .logo a { 51 | color: #fff; 52 | text-decoration: none; 53 | } 54 | 55 | .logo span { 56 | font-size: 1.2em; 57 | font-weight: bold; 58 | } 59 | 60 | .user { 61 | text-align: right; 62 | float: right; 63 | margin-right: 10px; 64 | } 65 | 66 | /*making .menu, .search, .user verical align center*/ 67 | header .row { 68 | margin-top: 5px; 69 | margin-bottom: 5px; 70 | } 71 | 72 | 73 | /*calendar style*/ 74 | .calendar-wrapper { 75 | position: fixed; 76 | top: 57px; 77 | left: 10px; 78 | right: 10px; 79 | bottom: 10px; 80 | overflow: hidden; 81 | } 82 | 83 | .calendar-header .row { 84 | position: relative; 85 | /* z-index这里设置非auto会针对子元素创建新的context */ 86 | z-index: 1; 87 | } 88 | 89 | .calendar-title { 90 | text-align: center; 91 | position: absolute; 92 | top: 0; 93 | left: 0; 94 | right: 0; 95 | /*这里设置z-index为负值使title元素不遮挡周视图、月视图、回到今天等按钮,使其丧失hover和点击效果*/ 96 | z-index: -1; 97 | margin-top: 0; 98 | margin-bottom: 0; 99 | line-height: 34px; 100 | font-size: 18px; 101 | color: #4d4d4d; 102 | font-weight: bold; 103 | background-color: transparent; 104 | } 105 | 106 | .calendar-today { 107 | float: left; 108 | margin-left: 8px; 109 | } 110 | 111 | .calendar-next-pre { 112 | float: left; 113 | margin-left: 8px; 114 | } 115 | 116 | .calendar-view { 117 | float: right; 118 | margin-right: 15px; 119 | text-align: right; 120 | } 121 | 122 | /* 垂直方向 */ 123 | .scroll-bar-ver { 124 | position: absolute; 125 | top: 85px; 126 | bottom: 0; 127 | width: 100%; 128 | overflow-x: hidden; 129 | overflow-y: scroll; 130 | } 131 | 132 | .day-of-week { 133 | margin: 10px 0; 134 | } 135 | 136 | .day-of-week div { 137 | float: left; 138 | width: 14.2857%; 139 | text-align: center; 140 | } 141 | 142 | .day-cell { 143 | position: relative; 144 | width: 14.2857%; 145 | background-color: #f0efee; 146 | } 147 | 148 | @media (max-width: 768px) { 149 | .day-cell { 150 | height: 50px; 151 | } 152 | 153 | .scroll-bar-ver { 154 | overflow-y: hidden; 155 | } 156 | } 157 | 158 | @media (max-width: 1199px) and (min-width: 769px) { 159 | .day-cell { 160 | height: 105px; 161 | } 162 | } 163 | 164 | @media (min-width: 1200px) { 165 | .day-cell { 166 | height: 140px; 167 | } 168 | } 169 | 170 | .day-cell:hover { 171 | background-color: #d6d6d6; 172 | } 173 | 174 | .in-month { 175 | background-color: #e4e4e4; 176 | } 177 | 178 | /* 月视图下前5列点击向右扩展 */ 179 | .calendar-table tr td:nth-child(1) .active, 180 | .calendar-table tr td:nth-child(2) .active, 181 | .calendar-table tr td:nth-child(3) .active, 182 | .calendar-table tr td:nth-child(4) .active, 183 | .calendar-table tr td:nth-child(5) .active 184 | { 185 | position: absolute; 186 | top: 0; 187 | left: 0; 188 | width: 270px; 189 | height: 350px; 190 | z-index: 1; 191 | border: 1px solid #ddd; 192 | border-radius: 4px; 193 | background-color: inherit; 194 | box-shadow: 0 0 6px rgba(0,0,0,.35), 195 | 0 0 1px rgba(0,0,0,.1); 196 | } 197 | 198 | /* 月视图下6、7列点击向左扩展 */ 199 | .calendar-table tr td:last-child .active, 200 | .calendar-table tr td:nth-last-child(2) .active 201 | { 202 | position: absolute; 203 | top: 0; 204 | right: 0; 205 | width: 270px; 206 | height: 350px; 207 | z-index: 1; 208 | border: 1px solid #ddd; 209 | border-radius: 4px; 210 | background-color: inherit; 211 | box-shadow: 0 0 6px rgba(0,0,0,.35), 212 | 0 0 1px rgba(0,0,0,.1); 213 | } 214 | 215 | .calendar-day { 216 | padding: 8px; 217 | } 218 | 219 | .calendar-day:not(.active) { 220 | height: 100%; 221 | } 222 | 223 | .calendar-table tr td { 224 | border: 5px solid #f5f5f5; 225 | border-radius: 12px; 226 | } 227 | 228 | .calendar-table tr > td:not(:first-child) .day-cell { 229 | border-left: 0; 230 | } 231 | 232 | /*滚动条样式*/ 233 | ::-webkit-scrollbar { 234 | width: 10px; 235 | height: 10px; 236 | } /* 这是针对缺省样式 (必须的) */ 237 | ::-webkit-scrollbar-track { 238 | border-radius: 5px; 239 | background-color: #eee; 240 | } /* 滚动条的滑轨背景颜色 */ 241 | ::-webkit-scrollbar-thumb { 242 | border-radius: 5px; 243 | background-color: #ccc; 244 | } /* 滑块颜色 */ 245 | ::-webkit-scrollbar-button { 246 | display: none; 247 | } /* 滑轨两头的监听按钮颜色 */ 248 | ::-webkit-scrollbar-corner { 249 | background-color: #eee; 250 | } /* 横向滚动条和纵向滚动条相交处尖角的颜色 */ 251 | 252 | /*水平方向*/ 253 | .scroll-bar-hor { 254 | position: absolute; 255 | top: 85px; 256 | bottom: 0; 257 | width: 100%; 258 | overflow: hidden; 259 | } 260 | 261 | .calendar-weeks-wrapper { 262 | position: relative; 263 | height: 100%; 264 | } 265 | 266 | .week { 267 | float: left; 268 | height: 100%; 269 | } 270 | 271 | .day-col { 272 | position: relative; 273 | float: left; 274 | margin-left: 5px; 275 | margin-right: 5px; 276 | border-top-left-radius: 4px; 277 | border-top-right-radius: 4px; 278 | height: 100%; 279 | background-color: #e2e4e6; 280 | } 281 | 282 | .day-col:hover { 283 | /* 通过调节l通道使hover的背景色更暗一些 借用color-picker插件可以获取非hover状态下的hsl值*/ 284 | background-color: hsl(209, 7%, 86%); 285 | } 286 | 287 | .day-col.today:hover, 288 | .day-cell.today:hover { 289 | background-color: #ede5cf; 290 | } 291 | 292 | .day-header { 293 | cursor: pointer; 294 | } 295 | 296 | .day-header h3 { 297 | display: inline-block; 298 | margin: 0; 299 | font-size: 14px; 300 | font-weight: bold; 301 | color: #4d4d4d; 302 | } 303 | 304 | .day-header .close-btn { 305 | float: right; 306 | } 307 | 308 | .close-btn { 309 | font-size: 12px; 310 | color: #8c8c8c; 311 | } 312 | 313 | .close-btn:before { 314 | content: "\2716"; 315 | } 316 | 317 | .close-btn:hover, 318 | .close-btn:link, 319 | .close-btn:active { 320 | color: #666; 321 | text-decoration: none; 322 | } 323 | 324 | .calendar-day:not(.active) .close-btn { 325 | display: none; 326 | } 327 | 328 | .num-meetings { 329 | display: inline-block; 330 | color: #8c8c8c; 331 | } 332 | 333 | .calendar-day .meeting-lists { 334 | position: absolute; 335 | top: 34px; 336 | left: 8px; 337 | right: 5px; 338 | bottom: 0; 339 | overflow-x: hidden; 340 | overflow-y: auto; 341 | } 342 | 343 | .calendar-day.active .meeting-lists { 344 | bottom: 34px; 345 | } 346 | 347 | .calendar-day .link-book-meeting { 348 | position: absolute; 349 | bottom: 0; 350 | left: 0; 351 | right: 0; 352 | margin: 5px; 353 | } 354 | 355 | .calendar-day:not(.active) .link-book-meeting { 356 | display: none; 357 | } 358 | 359 | .quiet-btn { 360 | display: block; 361 | color: #8c8c8c; 362 | padding: 6px 8px; 363 | border-radius: 3px; 364 | text-decoration: underline; 365 | background-color: transparent; 366 | } 367 | 368 | .quiet-btn:hover { 369 | color: #8c8c8c; 370 | background-color: #ccc; 371 | } 372 | 373 | .week .day-col:nth-child(1) .active, 374 | .week .day-col:nth-child(2) .active, 375 | .week .day-col:nth-child(3) .active, 376 | .week .day-col:nth-child(4) .active, 377 | .week .day-col:nth-child(5) .active { 378 | position: absolute; 379 | top: 2px; 380 | left: 0; 381 | bottom: 2px; 382 | width: 270px; 383 | z-index: 1; 384 | border: 1px solid #ddd; 385 | border-radius: 4px; 386 | background-color: inherit; 387 | box-shadow: 0 0 6px rgba(0,0,0,.35), 388 | 0 0 1px rgba(0,0,0,.1); 389 | } 390 | 391 | .week .day-col:nth-child(6) .active, 392 | .week .day-col:last-child .active { 393 | position: absolute; 394 | top: 2px; 395 | right: 0; 396 | bottom: 2px; 397 | width: 270px; 398 | z-index: 1; 399 | border: 1px solid #ddd; 400 | border-radius: 4px; 401 | background-color: inherit; 402 | box-shadow: 0 0 6px rgba(0,0,0,.35), 403 | 0 0 1px rgba(0,0,0,.1); 404 | } 405 | 406 | /*弹出框样式*/ 407 | .pop-over { 408 | display: none; 409 | position: absolute; 410 | /*top: 200px;*/ 411 | z-index: 70; 412 | padding: 8px; 413 | width: 300px; 414 | border: 1px solid #ddd; 415 | border-radius: 3px; 416 | background-color: #fff; 417 | box-shadow: 0 0 6px rgba(0,0,0,.15); 418 | } 419 | 420 | .is-shown { 421 | display: block; 422 | } 423 | 424 | .pop-over-header { 425 | position: relative; 426 | margin-bottom: 8px; 427 | } 428 | 429 | .pop-over-header-title { 430 | display: block; 431 | padding-left: 32px; 432 | padding-right: 32px; 433 | padding-bottom: 8px; 434 | text-align: center; 435 | border-bottom: 1px solid #d6dadc; 436 | color: #8c8c8c; 437 | } 438 | 439 | .position-right { 440 | position: absolute; 441 | top: 0; 442 | right: 8px; 443 | } 444 | 445 | .input-meeting-title { 446 | margin: 2px 0 8px 0; 447 | padding: 7px; 448 | resize: vertical; 449 | box-sizing: border-box; 450 | width: 100%; 451 | height: 72px; 452 | border: 1px solid #cdd2d4; 453 | border-radius: 3px; 454 | background-color: #e2e4e6; 455 | } 456 | 457 | .input-meeting-title:focus { 458 | background-color: #fff; 459 | } 460 | 461 | .list-btn-link { 462 | margin-bottom: 8px; 463 | } 464 | 465 | .list-btn-link.setting { 466 | position: relative; 467 | padding: 7px; 468 | height: 52px; 469 | border: 1px solid #e2e4e6; 470 | border-bottom-color: #cdd2d4; 471 | border-radius: 3px; 472 | cursor: pointer; 473 | overflow: hidden; 474 | z-index: 99; 475 | background: linear-gradient(to bottom,#fff 0,#f8f9f9 100%); 476 | } 477 | 478 | .list-btn-link:hover { 479 | color: #fff; 480 | background: linear-gradient(to bottom,#5cadd6,#5cadd6); 481 | } 482 | 483 | .list-btn-link:hover .setting-label { 484 | color: #fff; 485 | } 486 | 487 | .setting-label { 488 | display: block; 489 | font-size: 9px; 490 | line-height: 14px; 491 | color: #8c8c8c; 492 | } 493 | 494 | .setting-value { 495 | display: block; 496 | font-size: 18px; 497 | line-height: 24px; 498 | overflow: hidden; 499 | } 500 | 501 | .list-btn-link.setting select { 502 | position: absolute; 503 | top: 0; 504 | left: 0; 505 | width: 100%; 506 | height: 50px; 507 | border: none; 508 | opacity: 0; 509 | z-index: 2; 510 | color: #4d4d4d; 511 | font-size: 14px; 512 | cursor: pointer; 513 | } 514 | 515 | .meeting-duration .list-btn-link:first-child { 516 | margin-right: 8px; 517 | } 518 | 519 | .btn-book-meeting { 520 | font-size: 16px; 521 | font-weight: 600; 522 | } 523 | 524 | .today { 525 | background-color: #ede5cf; 526 | } 527 | 528 | /* 日历中显示的会议室是预定信息样式定义 */ 529 | .meeting-card { 530 | margin: 0 0 5px 0; 531 | padding: 4px; 532 | border-bottom: 1px solid #ccc; 533 | border-radius: 3px; 534 | background-color: #fff; 535 | } 536 | 537 | .card-title { 538 | padding-top: 2px; 539 | padding-bottom: 2px; 540 | } 541 | 542 | .badge-normal { 543 | background-color: #5cb85c; 544 | } 545 | 546 | .badge-warning { 547 | background-color: #f0ad4e; 548 | } 549 | 550 | .badge-danger { 551 | background-color: #d9534f; 552 | } 553 | -------------------------------------------------------------------------------- /bootstrap/css/bootstrap-theme.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.5 (http://getbootstrap.com) 3 | * Copyright 2011-2016 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | 7 | /*! 8 | * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=93bc882a2c88ce6aed852cd61cc8abc8) 9 | * Config saved to config.json and https://gist.github.com/93bc882a2c88ce6aed852cd61cc8abc8 10 | *//*! 11 | * Bootstrap v3.3.6 (http://getbootstrap.com) 12 | * Copyright 2011-2015 Twitter, Inc. 13 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 14 | */.btn-default,.btn-primary,.btn-success,.btn-info,.btn-warning,.btn-danger{text-shadow:0 -1px 0 rgba(0,0,0,0.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.15),0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.15),0 1px 1px rgba(0,0,0,0.075)}.btn-default:active,.btn-primary:active,.btn-success:active,.btn-info:active,.btn-warning:active,.btn-danger:active,.btn-default.active,.btn-primary.active,.btn-success.active,.btn-info.active,.btn-warning.active,.btn-danger.active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn-default.disabled,.btn-primary.disabled,.btn-success.disabled,.btn-info.disabled,.btn-warning.disabled,.btn-danger.disabled,.btn-default[disabled],.btn-primary[disabled],.btn-success[disabled],.btn-info[disabled],.btn-warning[disabled],.btn-danger[disabled],fieldset[disabled] .btn-default,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-success,fieldset[disabled] .btn-info,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-danger{-webkit-box-shadow:none;box-shadow:none}.btn-default .badge,.btn-primary .badge,.btn-success .badge,.btn-info .badge,.btn-warning .badge,.btn-danger .badge{text-shadow:none}.btn:active,.btn.active{background-image:none}.btn-default{background-image:-webkit-linear-gradient(top, #fff 0, #e0e0e0 100%);background-image:-o-linear-gradient(top, #fff 0, #e0e0e0 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), to(#e0e0e0));background-image:linear-gradient(to bottom, #fff 0, #e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background-repeat:repeat-x;border-color:#dbdbdb;text-shadow:0 1px 0 #fff;border-color:#ccc}.btn-default:hover,.btn-default:focus{background-color:#e0e0e0;background-position:0 -15px}.btn-default:active,.btn-default.active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled.focus,.btn-default[disabled].focus,fieldset[disabled] .btn-default.focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top, #337ab7 0, #265a88 100%);background-image:-o-linear-gradient(top, #337ab7 0, #265a88 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #337ab7), to(#265a88));background-image:linear-gradient(to bottom, #337ab7 0, #265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background-repeat:repeat-x;border-color:#245580}.btn-primary:hover,.btn-primary:focus{background-color:#265a88;background-position:0 -15px}.btn-primary:active,.btn-primary.active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled.focus,.btn-primary[disabled].focus,fieldset[disabled] .btn-primary.focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top, #5cb85c 0, #419641 100%);background-image:-o-linear-gradient(top, #5cb85c 0, #419641 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #5cb85c), to(#419641));background-image:linear-gradient(to bottom, #5cb85c 0, #419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:hover,.btn-success:focus{background-color:#419641;background-position:0 -15px}.btn-success:active,.btn-success.active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled.focus,.btn-success[disabled].focus,fieldset[disabled] .btn-success.focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top, #5bc0de 0, #2aabd2 100%);background-image:-o-linear-gradient(top, #5bc0de 0, #2aabd2 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #5bc0de), to(#2aabd2));background-image:linear-gradient(to bottom, #5bc0de 0, #2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:hover,.btn-info:focus{background-color:#2aabd2;background-position:0 -15px}.btn-info:active,.btn-info.active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled.focus,.btn-info[disabled].focus,fieldset[disabled] .btn-info.focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top, #f0ad4e 0, #eb9316 100%);background-image:-o-linear-gradient(top, #f0ad4e 0, #eb9316 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #f0ad4e), to(#eb9316));background-image:linear-gradient(to bottom, #f0ad4e 0, #eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:hover,.btn-warning:focus{background-color:#eb9316;background-position:0 -15px}.btn-warning:active,.btn-warning.active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled.focus,.btn-warning[disabled].focus,fieldset[disabled] .btn-warning.focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top, #d9534f 0, #c12e2a 100%);background-image:-o-linear-gradient(top, #d9534f 0, #c12e2a 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #d9534f), to(#c12e2a));background-image:linear-gradient(to bottom, #d9534f 0, #c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:hover,.btn-danger:focus{background-color:#c12e2a;background-position:0 -15px}.btn-danger:active,.btn-danger.active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled.focus,.btn-danger[disabled].focus,fieldset[disabled] .btn-danger.focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#c12e2a;background-image:none}.thumbnail,.img-thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.075);box-shadow:0 1px 2px rgba(0,0,0,0.075)}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{background-image:-webkit-linear-gradient(top, #f5f5f5 0, #e8e8e8 100%);background-image:-o-linear-gradient(top, #f5f5f5 0, #e8e8e8 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #f5f5f5), to(#e8e8e8));background-image:linear-gradient(to bottom, #f5f5f5 0, #e8e8e8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-color:#e8e8e8}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{background-image:-webkit-linear-gradient(top, #337ab7 0, #2e6da4 100%);background-image:-o-linear-gradient(top, #337ab7 0, #2e6da4 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #337ab7), to(#2e6da4));background-image:linear-gradient(to bottom, #337ab7 0, #2e6da4 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-color:#2e6da4}.navbar-default{background-image:-webkit-linear-gradient(top, #fff 0, #f8f8f8 100%);background-image:-o-linear-gradient(top, #fff 0, #f8f8f8 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), to(#f8f8f8));background-image:linear-gradient(to bottom, #fff 0, #f8f8f8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.15),0 1px 5px rgba(0,0,0,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.15),0 1px 5px rgba(0,0,0,0.075)}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top, #dbdbdb 0, #e2e2e2 100%);background-image:-o-linear-gradient(top, #dbdbdb 0, #e2e2e2 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #dbdbdb), to(#e2e2e2));background-image:linear-gradient(to bottom, #dbdbdb 0, #e2e2e2 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,0.075);box-shadow:inset 0 3px 9px rgba(0,0,0,0.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,0.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top, #3c3c3c 0, #222 100%);background-image:-o-linear-gradient(top, #3c3c3c 0, #222 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #3c3c3c), to(#222));background-image:linear-gradient(to bottom, #3c3c3c 0, #222 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);border-radius:4px}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top, #080808 0, #0f0f0f 100%);background-image:-o-linear-gradient(top, #080808 0, #0f0f0f 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #080808), to(#0f0f0f));background-image:linear-gradient(to bottom, #080808 0, #0f0f0f 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,0.25);box-shadow:inset 0 3px 9px rgba(0,0,0,0.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-static-top,.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-image:-webkit-linear-gradient(top, #337ab7 0, #2e6da4 100%);background-image:-o-linear-gradient(top, #337ab7 0, #2e6da4 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #337ab7), to(#2e6da4));background-image:linear-gradient(to bottom, #337ab7 0, #2e6da4 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0)}}.alert{text-shadow:0 1px 0 rgba(255,255,255,0.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.25),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.25),0 1px 2px rgba(0,0,0,0.05)}.alert-success{background-image:-webkit-linear-gradient(top, #dff0d8 0, #c8e5bc 100%);background-image:-o-linear-gradient(top, #dff0d8 0, #c8e5bc 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #dff0d8), to(#c8e5bc));background-image:linear-gradient(to bottom, #dff0d8 0, #c8e5bc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top, #d9edf7 0, #b9def0 100%);background-image:-o-linear-gradient(top, #d9edf7 0, #b9def0 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #d9edf7), to(#b9def0));background-image:linear-gradient(to bottom, #d9edf7 0, #b9def0 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top, #fcf8e3 0, #f8efc0 100%);background-image:-o-linear-gradient(top, #fcf8e3 0, #f8efc0 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #fcf8e3), to(#f8efc0));background-image:linear-gradient(to bottom, #fcf8e3 0, #f8efc0 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top, #f2dede 0, #e7c3c3 100%);background-image:-o-linear-gradient(top, #f2dede 0, #e7c3c3 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #f2dede), to(#e7c3c3));background-image:linear-gradient(to bottom, #f2dede 0, #e7c3c3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top, #ebebeb 0, #f5f5f5 100%);background-image:-o-linear-gradient(top, #ebebeb 0, #f5f5f5 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #ebebeb), to(#f5f5f5));background-image:linear-gradient(to bottom, #ebebeb 0, #f5f5f5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0)}.progress-bar{background-image:-webkit-linear-gradient(top, #337ab7 0, #286090 100%);background-image:-o-linear-gradient(top, #337ab7 0, #286090 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #337ab7), to(#286090));background-image:linear-gradient(to bottom, #337ab7 0, #286090 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0)}.progress-bar-success{background-image:-webkit-linear-gradient(top, #5cb85c 0, #449d44 100%);background-image:-o-linear-gradient(top, #5cb85c 0, #449d44 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #5cb85c), to(#449d44));background-image:linear-gradient(to bottom, #5cb85c 0, #449d44 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0)}.progress-bar-info{background-image:-webkit-linear-gradient(top, #5bc0de 0, #31b0d5 100%);background-image:-o-linear-gradient(top, #5bc0de 0, #31b0d5 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #5bc0de), to(#31b0d5));background-image:linear-gradient(to bottom, #5bc0de 0, #31b0d5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0)}.progress-bar-warning{background-image:-webkit-linear-gradient(top, #f0ad4e 0, #ec971f 100%);background-image:-o-linear-gradient(top, #f0ad4e 0, #ec971f 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #f0ad4e), to(#ec971f));background-image:linear-gradient(to bottom, #f0ad4e 0, #ec971f 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0)}.progress-bar-danger{background-image:-webkit-linear-gradient(top, #d9534f 0, #c9302c 100%);background-image:-o-linear-gradient(top, #d9534f 0, #c9302c 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #d9534f), to(#c9302c));background-image:linear-gradient(to bottom, #d9534f 0, #c9302c 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0)}.progress-bar-striped{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);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);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)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.075);box-shadow:0 1px 2px rgba(0,0,0,0.075)}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top, #337ab7 0, #2b669a 100%);background-image:-o-linear-gradient(top, #337ab7 0, #2b669a 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #337ab7), to(#2b669a));background-image:linear-gradient(to bottom, #337ab7 0, #2b669a 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:hover .badge,.list-group-item.active:focus .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top, #f5f5f5 0, #e8e8e8 100%);background-image:-o-linear-gradient(top, #f5f5f5 0, #e8e8e8 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #f5f5f5), to(#e8e8e8));background-image:linear-gradient(to bottom, #f5f5f5 0, #e8e8e8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0)}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top, #337ab7 0, #2e6da4 100%);background-image:-o-linear-gradient(top, #337ab7 0, #2e6da4 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #337ab7), to(#2e6da4));background-image:linear-gradient(to bottom, #337ab7 0, #2e6da4 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0)}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top, #dff0d8 0, #d0e9c6 100%);background-image:-o-linear-gradient(top, #dff0d8 0, #d0e9c6 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #dff0d8), to(#d0e9c6));background-image:linear-gradient(to bottom, #dff0d8 0, #d0e9c6 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0)}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top, #d9edf7 0, #c4e3f3 100%);background-image:-o-linear-gradient(top, #d9edf7 0, #c4e3f3 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #d9edf7), to(#c4e3f3));background-image:linear-gradient(to bottom, #d9edf7 0, #c4e3f3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0)}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top, #fcf8e3 0, #faf2cc 100%);background-image:-o-linear-gradient(top, #fcf8e3 0, #faf2cc 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #fcf8e3), to(#faf2cc));background-image:linear-gradient(to bottom, #fcf8e3 0, #faf2cc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0)}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top, #f2dede 0, #ebcccc 100%);background-image:-o-linear-gradient(top, #f2dede 0, #ebcccc 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #f2dede), to(#ebcccc));background-image:linear-gradient(to bottom, #f2dede 0, #ebcccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0)}.well{background-image:-webkit-linear-gradient(top, #e8e8e8 0, #f5f5f5 100%);background-image:-o-linear-gradient(top, #e8e8e8 0, #f5f5f5 100%);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #e8e8e8), to(#f5f5f5));background-image:linear-gradient(to bottom, #e8e8e8 0, #f5f5f5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,0.05),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 3px rgba(0,0,0,0.05),0 1px 0 rgba(255,255,255,0.1)} -------------------------------------------------------------------------------- /bootstrap/css/bootstrap-theme.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.5 (http://getbootstrap.com) 3 | * Copyright 2011-2016 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | 7 | /*! 8 | * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=93bc882a2c88ce6aed852cd61cc8abc8) 9 | * Config saved to config.json and https://gist.github.com/93bc882a2c88ce6aed852cd61cc8abc8 10 | */ 11 | /*! 12 | * Bootstrap v3.3.6 (http://getbootstrap.com) 13 | * Copyright 2011-2015 Twitter, Inc. 14 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 15 | */ 16 | .btn-default, 17 | .btn-primary, 18 | .btn-success, 19 | .btn-info, 20 | .btn-warning, 21 | .btn-danger { 22 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); 23 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); 24 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); 25 | } 26 | .btn-default:active, 27 | .btn-primary:active, 28 | .btn-success:active, 29 | .btn-info:active, 30 | .btn-warning:active, 31 | .btn-danger:active, 32 | .btn-default.active, 33 | .btn-primary.active, 34 | .btn-success.active, 35 | .btn-info.active, 36 | .btn-warning.active, 37 | .btn-danger.active { 38 | -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); 39 | box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); 40 | } 41 | .btn-default.disabled, 42 | .btn-primary.disabled, 43 | .btn-success.disabled, 44 | .btn-info.disabled, 45 | .btn-warning.disabled, 46 | .btn-danger.disabled, 47 | .btn-default[disabled], 48 | .btn-primary[disabled], 49 | .btn-success[disabled], 50 | .btn-info[disabled], 51 | .btn-warning[disabled], 52 | .btn-danger[disabled], 53 | fieldset[disabled] .btn-default, 54 | fieldset[disabled] .btn-primary, 55 | fieldset[disabled] .btn-success, 56 | fieldset[disabled] .btn-info, 57 | fieldset[disabled] .btn-warning, 58 | fieldset[disabled] .btn-danger { 59 | -webkit-box-shadow: none; 60 | box-shadow: none; 61 | } 62 | .btn-default .badge, 63 | .btn-primary .badge, 64 | .btn-success .badge, 65 | .btn-info .badge, 66 | .btn-warning .badge, 67 | .btn-danger .badge { 68 | text-shadow: none; 69 | } 70 | .btn:active, 71 | .btn.active { 72 | background-image: none; 73 | } 74 | .btn-default { 75 | background-image: -webkit-linear-gradient(top, #ffffff 0%, #e0e0e0 100%); 76 | background-image: -o-linear-gradient(top, #ffffff 0%, #e0e0e0 100%); 77 | background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e0e0e0)); 78 | background-image: linear-gradient(to bottom, #ffffff 0%, #e0e0e0 100%); 79 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0); 80 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 81 | background-repeat: repeat-x; 82 | border-color: #dbdbdb; 83 | text-shadow: 0 1px 0 #fff; 84 | border-color: #ccc; 85 | } 86 | .btn-default:hover, 87 | .btn-default:focus { 88 | background-color: #e0e0e0; 89 | background-position: 0 -15px; 90 | } 91 | .btn-default:active, 92 | .btn-default.active { 93 | background-color: #e0e0e0; 94 | border-color: #dbdbdb; 95 | } 96 | .btn-default.disabled, 97 | .btn-default[disabled], 98 | fieldset[disabled] .btn-default, 99 | .btn-default.disabled:hover, 100 | .btn-default[disabled]:hover, 101 | fieldset[disabled] .btn-default:hover, 102 | .btn-default.disabled:focus, 103 | .btn-default[disabled]:focus, 104 | fieldset[disabled] .btn-default:focus, 105 | .btn-default.disabled.focus, 106 | .btn-default[disabled].focus, 107 | fieldset[disabled] .btn-default.focus, 108 | .btn-default.disabled:active, 109 | .btn-default[disabled]:active, 110 | fieldset[disabled] .btn-default:active, 111 | .btn-default.disabled.active, 112 | .btn-default[disabled].active, 113 | fieldset[disabled] .btn-default.active { 114 | background-color: #e0e0e0; 115 | background-image: none; 116 | } 117 | .btn-primary { 118 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%); 119 | background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%); 120 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88)); 121 | background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%); 122 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0); 123 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 124 | background-repeat: repeat-x; 125 | border-color: #245580; 126 | } 127 | .btn-primary:hover, 128 | .btn-primary:focus { 129 | background-color: #265a88; 130 | background-position: 0 -15px; 131 | } 132 | .btn-primary:active, 133 | .btn-primary.active { 134 | background-color: #265a88; 135 | border-color: #245580; 136 | } 137 | .btn-primary.disabled, 138 | .btn-primary[disabled], 139 | fieldset[disabled] .btn-primary, 140 | .btn-primary.disabled:hover, 141 | .btn-primary[disabled]:hover, 142 | fieldset[disabled] .btn-primary:hover, 143 | .btn-primary.disabled:focus, 144 | .btn-primary[disabled]:focus, 145 | fieldset[disabled] .btn-primary:focus, 146 | .btn-primary.disabled.focus, 147 | .btn-primary[disabled].focus, 148 | fieldset[disabled] .btn-primary.focus, 149 | .btn-primary.disabled:active, 150 | .btn-primary[disabled]:active, 151 | fieldset[disabled] .btn-primary:active, 152 | .btn-primary.disabled.active, 153 | .btn-primary[disabled].active, 154 | fieldset[disabled] .btn-primary.active { 155 | background-color: #265a88; 156 | background-image: none; 157 | } 158 | .btn-success { 159 | background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%); 160 | background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%); 161 | background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641)); 162 | background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%); 163 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0); 164 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 165 | background-repeat: repeat-x; 166 | border-color: #3e8f3e; 167 | } 168 | .btn-success:hover, 169 | .btn-success:focus { 170 | background-color: #419641; 171 | background-position: 0 -15px; 172 | } 173 | .btn-success:active, 174 | .btn-success.active { 175 | background-color: #419641; 176 | border-color: #3e8f3e; 177 | } 178 | .btn-success.disabled, 179 | .btn-success[disabled], 180 | fieldset[disabled] .btn-success, 181 | .btn-success.disabled:hover, 182 | .btn-success[disabled]:hover, 183 | fieldset[disabled] .btn-success:hover, 184 | .btn-success.disabled:focus, 185 | .btn-success[disabled]:focus, 186 | fieldset[disabled] .btn-success:focus, 187 | .btn-success.disabled.focus, 188 | .btn-success[disabled].focus, 189 | fieldset[disabled] .btn-success.focus, 190 | .btn-success.disabled:active, 191 | .btn-success[disabled]:active, 192 | fieldset[disabled] .btn-success:active, 193 | .btn-success.disabled.active, 194 | .btn-success[disabled].active, 195 | fieldset[disabled] .btn-success.active { 196 | background-color: #419641; 197 | background-image: none; 198 | } 199 | .btn-info { 200 | background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); 201 | background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); 202 | background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2)); 203 | background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%); 204 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0); 205 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 206 | background-repeat: repeat-x; 207 | border-color: #28a4c9; 208 | } 209 | .btn-info:hover, 210 | .btn-info:focus { 211 | background-color: #2aabd2; 212 | background-position: 0 -15px; 213 | } 214 | .btn-info:active, 215 | .btn-info.active { 216 | background-color: #2aabd2; 217 | border-color: #28a4c9; 218 | } 219 | .btn-info.disabled, 220 | .btn-info[disabled], 221 | fieldset[disabled] .btn-info, 222 | .btn-info.disabled:hover, 223 | .btn-info[disabled]:hover, 224 | fieldset[disabled] .btn-info:hover, 225 | .btn-info.disabled:focus, 226 | .btn-info[disabled]:focus, 227 | fieldset[disabled] .btn-info:focus, 228 | .btn-info.disabled.focus, 229 | .btn-info[disabled].focus, 230 | fieldset[disabled] .btn-info.focus, 231 | .btn-info.disabled:active, 232 | .btn-info[disabled]:active, 233 | fieldset[disabled] .btn-info:active, 234 | .btn-info.disabled.active, 235 | .btn-info[disabled].active, 236 | fieldset[disabled] .btn-info.active { 237 | background-color: #2aabd2; 238 | background-image: none; 239 | } 240 | .btn-warning { 241 | background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); 242 | background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); 243 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316)); 244 | background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%); 245 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0); 246 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 247 | background-repeat: repeat-x; 248 | border-color: #e38d13; 249 | } 250 | .btn-warning:hover, 251 | .btn-warning:focus { 252 | background-color: #eb9316; 253 | background-position: 0 -15px; 254 | } 255 | .btn-warning:active, 256 | .btn-warning.active { 257 | background-color: #eb9316; 258 | border-color: #e38d13; 259 | } 260 | .btn-warning.disabled, 261 | .btn-warning[disabled], 262 | fieldset[disabled] .btn-warning, 263 | .btn-warning.disabled:hover, 264 | .btn-warning[disabled]:hover, 265 | fieldset[disabled] .btn-warning:hover, 266 | .btn-warning.disabled:focus, 267 | .btn-warning[disabled]:focus, 268 | fieldset[disabled] .btn-warning:focus, 269 | .btn-warning.disabled.focus, 270 | .btn-warning[disabled].focus, 271 | fieldset[disabled] .btn-warning.focus, 272 | .btn-warning.disabled:active, 273 | .btn-warning[disabled]:active, 274 | fieldset[disabled] .btn-warning:active, 275 | .btn-warning.disabled.active, 276 | .btn-warning[disabled].active, 277 | fieldset[disabled] .btn-warning.active { 278 | background-color: #eb9316; 279 | background-image: none; 280 | } 281 | .btn-danger { 282 | background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%); 283 | background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%); 284 | background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a)); 285 | background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%); 286 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0); 287 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 288 | background-repeat: repeat-x; 289 | border-color: #b92c28; 290 | } 291 | .btn-danger:hover, 292 | .btn-danger:focus { 293 | background-color: #c12e2a; 294 | background-position: 0 -15px; 295 | } 296 | .btn-danger:active, 297 | .btn-danger.active { 298 | background-color: #c12e2a; 299 | border-color: #b92c28; 300 | } 301 | .btn-danger.disabled, 302 | .btn-danger[disabled], 303 | fieldset[disabled] .btn-danger, 304 | .btn-danger.disabled:hover, 305 | .btn-danger[disabled]:hover, 306 | fieldset[disabled] .btn-danger:hover, 307 | .btn-danger.disabled:focus, 308 | .btn-danger[disabled]:focus, 309 | fieldset[disabled] .btn-danger:focus, 310 | .btn-danger.disabled.focus, 311 | .btn-danger[disabled].focus, 312 | fieldset[disabled] .btn-danger.focus, 313 | .btn-danger.disabled:active, 314 | .btn-danger[disabled]:active, 315 | fieldset[disabled] .btn-danger:active, 316 | .btn-danger.disabled.active, 317 | .btn-danger[disabled].active, 318 | fieldset[disabled] .btn-danger.active { 319 | background-color: #c12e2a; 320 | background-image: none; 321 | } 322 | .thumbnail, 323 | .img-thumbnail { 324 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075); 325 | box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075); 326 | } 327 | .dropdown-menu > li > a:hover, 328 | .dropdown-menu > li > a:focus { 329 | background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 330 | background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 331 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); 332 | background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); 333 | background-repeat: repeat-x; 334 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); 335 | background-color: #e8e8e8; 336 | } 337 | .dropdown-menu > .active > a, 338 | .dropdown-menu > .active > a:hover, 339 | .dropdown-menu > .active > a:focus { 340 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 341 | background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 342 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); 343 | background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); 344 | background-repeat: repeat-x; 345 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); 346 | background-color: #2e6da4; 347 | } 348 | .navbar-default { 349 | background-image: -webkit-linear-gradient(top, #ffffff 0%, #f8f8f8 100%); 350 | background-image: -o-linear-gradient(top, #ffffff 0%, #f8f8f8 100%); 351 | background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#f8f8f8)); 352 | background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%); 353 | background-repeat: repeat-x; 354 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0); 355 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 356 | border-radius: 4px; 357 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075); 358 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075); 359 | } 360 | .navbar-default .navbar-nav > .open > a, 361 | .navbar-default .navbar-nav > .active > a { 362 | background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); 363 | background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); 364 | background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2)); 365 | background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%); 366 | background-repeat: repeat-x; 367 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0); 368 | -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075); 369 | box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075); 370 | } 371 | .navbar-brand, 372 | .navbar-nav > li > a { 373 | text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25); 374 | } 375 | .navbar-inverse { 376 | background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222222 100%); 377 | background-image: -o-linear-gradient(top, #3c3c3c 0%, #222222 100%); 378 | background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222222)); 379 | background-image: linear-gradient(to bottom, #3c3c3c 0%, #222222 100%); 380 | background-repeat: repeat-x; 381 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0); 382 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 383 | border-radius: 4px; 384 | } 385 | .navbar-inverse .navbar-nav > .open > a, 386 | .navbar-inverse .navbar-nav > .active > a { 387 | background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%); 388 | background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%); 389 | background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f)); 390 | background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%); 391 | background-repeat: repeat-x; 392 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0); 393 | -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25); 394 | box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25); 395 | } 396 | .navbar-inverse .navbar-brand, 397 | .navbar-inverse .navbar-nav > li > a { 398 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); 399 | } 400 | .navbar-static-top, 401 | .navbar-fixed-top, 402 | .navbar-fixed-bottom { 403 | border-radius: 0; 404 | } 405 | @media (max-width: 767px) { 406 | .navbar .navbar-nav .open .dropdown-menu > .active > a, 407 | .navbar .navbar-nav .open .dropdown-menu > .active > a:hover, 408 | .navbar .navbar-nav .open .dropdown-menu > .active > a:focus { 409 | color: #fff; 410 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 411 | background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 412 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); 413 | background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); 414 | background-repeat: repeat-x; 415 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); 416 | } 417 | } 418 | .alert { 419 | text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2); 420 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05); 421 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05); 422 | } 423 | .alert-success { 424 | background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); 425 | background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); 426 | background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc)); 427 | background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%); 428 | background-repeat: repeat-x; 429 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0); 430 | border-color: #b2dba1; 431 | } 432 | .alert-info { 433 | background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%); 434 | background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%); 435 | background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0)); 436 | background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%); 437 | background-repeat: repeat-x; 438 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0); 439 | border-color: #9acfea; 440 | } 441 | .alert-warning { 442 | background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); 443 | background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); 444 | background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0)); 445 | background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%); 446 | background-repeat: repeat-x; 447 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0); 448 | border-color: #f5e79e; 449 | } 450 | .alert-danger { 451 | background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); 452 | background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); 453 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3)); 454 | background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%); 455 | background-repeat: repeat-x; 456 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0); 457 | border-color: #dca7a7; 458 | } 459 | .progress { 460 | background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); 461 | background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); 462 | background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5)); 463 | background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%); 464 | background-repeat: repeat-x; 465 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0); 466 | } 467 | .progress-bar { 468 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%); 469 | background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%); 470 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090)); 471 | background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%); 472 | background-repeat: repeat-x; 473 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0); 474 | } 475 | .progress-bar-success { 476 | background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%); 477 | background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%); 478 | background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44)); 479 | background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%); 480 | background-repeat: repeat-x; 481 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0); 482 | } 483 | .progress-bar-info { 484 | background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); 485 | background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); 486 | background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5)); 487 | background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%); 488 | background-repeat: repeat-x; 489 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0); 490 | } 491 | .progress-bar-warning { 492 | background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); 493 | background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); 494 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f)); 495 | background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%); 496 | background-repeat: repeat-x; 497 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0); 498 | } 499 | .progress-bar-danger { 500 | background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%); 501 | background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%); 502 | background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c)); 503 | background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%); 504 | background-repeat: repeat-x; 505 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0); 506 | } 507 | .progress-bar-striped { 508 | 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); 509 | 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); 510 | 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); 511 | } 512 | .list-group { 513 | border-radius: 4px; 514 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075); 515 | box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075); 516 | } 517 | .list-group-item.active, 518 | .list-group-item.active:hover, 519 | .list-group-item.active:focus { 520 | text-shadow: 0 -1px 0 #286090; 521 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%); 522 | background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%); 523 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a)); 524 | background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%); 525 | background-repeat: repeat-x; 526 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0); 527 | border-color: #2b669a; 528 | } 529 | .list-group-item.active .badge, 530 | .list-group-item.active:hover .badge, 531 | .list-group-item.active:focus .badge { 532 | text-shadow: none; 533 | } 534 | .panel { 535 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); 536 | box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); 537 | } 538 | .panel-default > .panel-heading { 539 | background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 540 | background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 541 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); 542 | background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); 543 | background-repeat: repeat-x; 544 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); 545 | } 546 | .panel-primary > .panel-heading { 547 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 548 | background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 549 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); 550 | background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); 551 | background-repeat: repeat-x; 552 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); 553 | } 554 | .panel-success > .panel-heading { 555 | background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); 556 | background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); 557 | background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6)); 558 | background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%); 559 | background-repeat: repeat-x; 560 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0); 561 | } 562 | .panel-info > .panel-heading { 563 | background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); 564 | background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); 565 | background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3)); 566 | background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%); 567 | background-repeat: repeat-x; 568 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0); 569 | } 570 | .panel-warning > .panel-heading { 571 | background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); 572 | background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); 573 | background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc)); 574 | background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%); 575 | background-repeat: repeat-x; 576 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0); 577 | } 578 | .panel-danger > .panel-heading { 579 | background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%); 580 | background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%); 581 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc)); 582 | background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%); 583 | background-repeat: repeat-x; 584 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0); 585 | } 586 | .well { 587 | background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); 588 | background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); 589 | background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5)); 590 | background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%); 591 | background-repeat: repeat-x; 592 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0); 593 | border-color: #dcdcdc; 594 | -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1); 595 | box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1); 596 | } 597 | -------------------------------------------------------------------------------- /bootstrap/js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.5 (http://getbootstrap.com) 3 | * Copyright 2011-2016 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | 7 | /*! 8 | * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=93bc882a2c88ce6aed852cd61cc8abc8) 9 | * Config saved to config.json and https://gist.github.com/93bc882a2c88ce6aed852cd61cc8abc8 10 | */ 11 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),n=i.data("bs.alert");n||i.data("bs.alert",n=new o(this)),"string"==typeof e&&n[e].call(i)})}var i='[data-dismiss="alert"]',o=function(e){t(e).on("click",i,this.close)};o.VERSION="3.3.6",o.TRANSITION_DURATION=150,o.prototype.close=function(e){function i(){a.detach().trigger("closed.bs.alert").remove()}var n=t(this),s=n.attr("data-target");s||(s=n.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,""));var a=t(s);e&&e.preventDefault(),a.length||(a=n.closest(".alert")),a.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(a.removeClass("in"),t.support.transition&&a.hasClass("fade")?a.one("bsTransitionEnd",i).emulateTransitionEnd(o.TRANSITION_DURATION):i())};var n=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=o,t.fn.alert.noConflict=function(){return t.fn.alert=n,this},t(document).on("click.bs.alert.data-api",i,o.prototype.close)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.button"),s="object"==typeof e&&e;n||o.data("bs.button",n=new i(this,s)),"toggle"==e?n.toggle():e&&n.setState(e)})}var i=function(e,o){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,o),this.isLoading=!1};i.VERSION="3.3.6",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var i="disabled",o=this.$element,n=o.is("input")?"val":"html",s=o.data();e+="Text",null==s.resetText&&o.data("resetText",o[n]()),setTimeout(t.proxy(function(){o[n](null==s[e]?this.options[e]:s[e]),"loadingText"==e?(this.isLoading=!0,o.addClass(i).attr(i,i)):this.isLoading&&(this.isLoading=!1,o.removeClass(i).removeAttr(i))},this),0)},i.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var i=this.$element.find("input");"radio"==i.prop("type")?(i.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==i.prop("type")&&(i.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),i.prop("checked",this.$element.hasClass("active")),t&&i.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var o=t.fn.button;t.fn.button=e,t.fn.button.Constructor=i,t.fn.button.noConflict=function(){return t.fn.button=o,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(i){var o=t(i.target);o.hasClass("btn")||(o=o.closest(".btn")),e.call(o,"toggle"),t(i.target).is('input[type="radio"]')||t(i.target).is('input[type="checkbox"]')||i.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.carousel"),s=t.extend({},i.DEFAULTS,o.data(),"object"==typeof e&&e),a="string"==typeof e?e:s.slide;n||o.data("bs.carousel",n=new i(this,s)),"number"==typeof e?n.to(e):a?n[a]():s.interval&&n.pause().cycle()})}var i=function(e,i){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=i,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};i.VERSION="3.3.6",i.TRANSITION_DURATION=600,i.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},i.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},i.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},i.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},i.prototype.getItemForDirection=function(t,e){var i=this.getItemIndex(e),o="prev"==t&&0===i||"next"==t&&i==this.$items.length-1;if(o&&!this.options.wrap)return e;var n="prev"==t?-1:1,s=(i+n)%this.$items.length;return this.$items.eq(s)},i.prototype.to=function(t){var e=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));return t>this.$items.length-1||0>t?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",this.$items.eq(t))},i.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},i.prototype.next=function(){return this.sliding?void 0:this.slide("next")},i.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},i.prototype.slide=function(e,o){var n=this.$element.find(".item.active"),s=o||this.getItemForDirection(e,n),a=this.interval,r="next"==e?"left":"right",l=this;if(s.hasClass("active"))return this.sliding=!1;var h=s[0],d=t.Event("slide.bs.carousel",{relatedTarget:h,direction:r});if(this.$element.trigger(d),!d.isDefaultPrevented()){if(this.sliding=!0,a&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var p=t(this.$indicators.children()[this.getItemIndex(s)]);p&&p.addClass("active")}var c=t.Event("slid.bs.carousel",{relatedTarget:h,direction:r});return t.support.transition&&this.$element.hasClass("slide")?(s.addClass(e),s[0].offsetWidth,n.addClass(r),s.addClass(r),n.one("bsTransitionEnd",function(){s.removeClass([e,r].join(" ")).addClass("active"),n.removeClass(["active",r].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(c)},0)}).emulateTransitionEnd(i.TRANSITION_DURATION)):(n.removeClass("active"),s.addClass("active"),this.sliding=!1,this.$element.trigger(c)),a&&this.cycle(),this}};var o=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=i,t.fn.carousel.noConflict=function(){return t.fn.carousel=o,this};var n=function(i){var o,n=t(this),s=t(n.attr("data-target")||(o=n.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,""));if(s.hasClass("carousel")){var a=t.extend({},s.data(),n.data()),r=n.attr("data-slide-to");r&&(a.interval=!1),e.call(s,a),r&&s.data("bs.carousel").to(r),i.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",n).on("click.bs.carousel.data-api","[data-slide-to]",n),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var i=t(this);e.call(i,i.data())})})}(jQuery),+function(t){"use strict";function e(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var o=i&&t(i);return o&&o.length?o:e.parent()}function i(i){i&&3===i.which||(t(n).remove(),t(s).each(function(){var o=t(this),n=e(o),s={relatedTarget:this};n.hasClass("open")&&(i&&"click"==i.type&&/input|textarea/i.test(i.target.tagName)&&t.contains(n[0],i.target)||(n.trigger(i=t.Event("hide.bs.dropdown",s)),i.isDefaultPrevented()||(o.attr("aria-expanded","false"),n.removeClass("open").trigger(t.Event("hidden.bs.dropdown",s)))))}))}function o(e){return this.each(function(){var i=t(this),o=i.data("bs.dropdown");o||i.data("bs.dropdown",o=new a(this)),"string"==typeof e&&o[e].call(i)})}var n=".dropdown-backdrop",s='[data-toggle="dropdown"]',a=function(e){t(e).on("click.bs.dropdown",this.toggle)};a.VERSION="3.3.6",a.prototype.toggle=function(o){var n=t(this);if(!n.is(".disabled, :disabled")){var s=e(n),a=s.hasClass("open");if(i(),!a){"ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",i);var r={relatedTarget:this};if(s.trigger(o=t.Event("show.bs.dropdown",r)),o.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),s.toggleClass("open").trigger(t.Event("shown.bs.dropdown",r))}return!1}},a.prototype.keydown=function(i){if(/(38|40|27|32)/.test(i.which)&&!/input|textarea/i.test(i.target.tagName)){var o=t(this);if(i.preventDefault(),i.stopPropagation(),!o.is(".disabled, :disabled")){var n=e(o),a=n.hasClass("open");if(!a&&27!=i.which||a&&27==i.which)return 27==i.which&&n.find(s).trigger("focus"),o.trigger("click");var r=" li:not(.disabled):visible a",l=n.find(".dropdown-menu"+r);if(l.length){var h=l.index(i.target);38==i.which&&h>0&&h--,40==i.which&&hdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},i.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},i.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},i.prototype.init=function(e,i,o){if(this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(o),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var n=this.options.trigger.split(" "),s=n.length;s--;){var a=n[s];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var r="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(r+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},i.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,o){i[t]!=o&&(e[t]=o)}),e},i.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusin"==e.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show())},i.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},i.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusout"==e.type?"focus":"hover"]=!1),i.isInStateTrue()?void 0:(clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide())},i.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var o=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!o)return;var n=this,s=this.tip(),a=this.getUID(this.type);this.setContent(),s.attr("id",a),this.$element.attr("aria-describedby",a),this.options.animation&&s.addClass("fade");var r="function"==typeof this.options.placement?this.options.placement.call(this,s[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,h=l.test(r);h&&(r=r.replace(l,"")||"top"),s.detach().css({top:0,left:0,display:"block"}).addClass(r).data("bs."+this.type,this),this.options.container?s.appendTo(this.options.container):s.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var d=this.getPosition(),p=s[0].offsetWidth,c=s[0].offsetHeight;if(h){var f=r,u=this.getPosition(this.$viewport);r="bottom"==r&&d.bottom+c>u.bottom?"top":"top"==r&&d.top-cu.width?"left":"left"==r&&d.left-pa.top+a.height&&(n.top=a.top+a.height-l)}else{var h=e.left-s,d=e.left+s+i;ha.right&&(n.left=a.left+a.width-d)}return n},i.prototype.getTitle=function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},i.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},i.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},i.prototype.enable=function(){this.enabled=!0},i.prototype.disable=function(){this.enabled=!1},i.prototype.toggleEnabled=function(){this.enabled=!this.enabled},i.prototype.toggle=function(e){var i=this;e&&(i=t(e.currentTarget).data("bs."+this.type),i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),e?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)},i.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null})};var o=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=i,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=o,this}}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.popover"),s="object"==typeof e&&e;(n||!/destroy|hide/.test(e))&&(n||o.data("bs.popover",n=new i(this,s)),"string"==typeof e&&n[e]())})}var i=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");i.VERSION="3.3.6",i.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),i.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),i.prototype.constructor=i,i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof i?"html":"append":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},i.prototype.hasContent=function(){return this.getTitle()||this.getContent()},i.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var o=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=i,t.fn.popover.noConflict=function(){return t.fn.popover=o,this}}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.tab");n||o.data("bs.tab",n=new i(this)),"string"==typeof e&&n[e]()})}var i=function(e){this.element=t(e)};i.VERSION="3.3.6",i.TRANSITION_DURATION=150,i.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),o=e.data("target");if(o||(o=e.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var n=i.find(".active:last a"),s=t.Event("hide.bs.tab",{relatedTarget:e[0]}),a=t.Event("show.bs.tab",{relatedTarget:n[0]});if(n.trigger(s),e.trigger(a),!a.isDefaultPrevented()&&!s.isDefaultPrevented()){var r=t(o);this.activate(e.closest("li"),i),this.activate(r,r.parent(),function(){n.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:n[0]})})}}},i.prototype.activate=function(e,o,n){function s(){a.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),n&&n()}var a=o.find("> .active"),r=n&&t.support.transition&&(a.length&&a.hasClass("fade")||!!o.find("> .fade").length);a.length&&r?a.one("bsTransitionEnd",s).emulateTransitionEnd(i.TRANSITION_DURATION):s(),a.removeClass("in")};var o=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=o,this};var n=function(i){i.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',n).on("click.bs.tab.data-api",'[data-toggle="pill"]',n)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.affix"),s="object"==typeof e&&e;n||o.data("bs.affix",n=new i(this,s)),"string"==typeof e&&n[e]()})}var i=function(e,o){this.options=t.extend({},i.DEFAULTS,o),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};i.VERSION="3.3.6",i.RESET="affix affix-top affix-bottom",i.DEFAULTS={offset:0,target:window},i.prototype.getState=function(t,e,i,o){var n=this.$target.scrollTop(),s=this.$element.offset(),a=this.$target.height();if(null!=i&&"top"==this.affixed)return i>n?"top":!1;if("bottom"==this.affixed)return null!=i?n+this.unpin<=s.top?!1:"bottom":t-o>=n+a?!1:"bottom";var r=null==this.affixed,l=r?n:s.top,h=r?a:e;return null!=i&&i>=n?"top":null!=o&&l+h>=t-o?"bottom":!1},i.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(i.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},i.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},i.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),o=this.options.offset,n=o.top,s=o.bottom,a=Math.max(t(document).height(),t(document.body).height());"object"!=typeof o&&(s=n=o),"function"==typeof n&&(n=o.top(this.$element)),"function"==typeof s&&(s=o.bottom(this.$element));var r=this.getState(a,e,n,s);if(this.affixed!=r){null!=this.unpin&&this.$element.css("top","");var l="affix"+(r?"-"+r:""),h=t.Event(l+".bs.affix");if(this.$element.trigger(h),h.isDefaultPrevented())return;this.affixed=r,this.unpin="bottom"==r?this.getPinnedOffset():null,this.$element.removeClass(i.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==r&&this.$element.offset({top:a-e-s})}};var o=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=i,t.fn.affix.noConflict=function(){return t.fn.affix=o,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var i=t(this),o=i.data();o.offset=o.offset||{},null!=o.offsetBottom&&(o.offset.bottom=o.offsetBottom),null!=o.offsetTop&&(o.offset.top=o.offsetTop),e.call(i,o)})})}(jQuery),+function(t){"use strict";function e(e){var i,o=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(o)}function i(e){return this.each(function(){var i=t(this),n=i.data("bs.collapse"),s=t.extend({},o.DEFAULTS,i.data(),"object"==typeof e&&e);!n&&s.toggle&&/show|hide/.test(e)&&(s.toggle=!1),n||i.data("bs.collapse",n=new o(this,s)),"string"==typeof e&&n[e]()})}var o=function(e,i){this.$element=t(e),this.options=t.extend({},o.DEFAULTS,i),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};o.VERSION="3.3.6",o.TRANSITION_DURATION=350,o.DEFAULTS={toggle:!0},o.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},o.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,n=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(n&&n.length&&(e=n.data("bs.collapse"),e&&e.transitioning))){var s=t.Event("show.bs.collapse");if(this.$element.trigger(s),!s.isDefaultPrevented()){n&&n.length&&(i.call(n,"hide"),e||n.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var r=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return r.call(this);var l=t.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(o.TRANSITION_DURATION)[a](this.$element[0][l]); 12 | }}}},o.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var n=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[i](0).one("bsTransitionEnd",t.proxy(n,this)).emulateTransitionEnd(o.TRANSITION_DURATION):n.call(this)}}},o.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},o.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(i,o){var n=t(o);this.addAriaAndCollapsedClass(e(n),n)},this)).end()},o.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var n=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=o,t.fn.collapse.noConflict=function(){return t.fn.collapse=n,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(o){var n=t(this);n.attr("data-target")||o.preventDefault();var s=e(n),a=s.data("bs.collapse"),r=a?"toggle":n.data();i.call(s,r)})}(jQuery),+function(t){"use strict";function e(i,o){this.$body=t(document.body),this.$scrollElement=t(t(i).is(document.body)?window:i),this.options=t.extend({},e.DEFAULTS,o),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function i(i){return this.each(function(){var o=t(this),n=o.data("bs.scrollspy"),s="object"==typeof i&&i;n||o.data("bs.scrollspy",n=new e(this,s)),"string"==typeof i&&n[i]()})}e.VERSION="3.3.6",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,i="offset",o=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(i="position",o=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),n=e.data("target")||e.attr("href"),s=/^#./.test(n)&&t(n);return s&&s.length&&s.is(":visible")&&[[s[i]().top+o,n]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.getScrollHeight(),o=this.options.offset+i-this.$scrollElement.height(),n=this.offsets,s=this.targets,a=this.activeTarget;if(this.scrollHeight!=i&&this.refresh(),e>=o)return a!=(t=s[s.length-1])&&this.activate(t);if(a&&e=n[t]&&(void 0===n[t+1]||e start_index_last_month; i--) { 137 | $(".day-cell").eq(i).addClass("in-month"); 138 | } 139 | } else { 140 | var start_index_next_month = $(".in-month:last").index(".day-cell") + 1; 141 | // 刷新日历title值 142 | setMonthTitle($(".day-cell").eq(start_index_next_month).attr("name")); 143 | $(".in-month").removeClass("in-month"); 144 | // 每月最大天数为31天,最大循环次数为31次 145 | for (var j = start_index_next_month; j < start_index_next_month + 31; j++) { 146 | var $day_cell_index = $(".day-cell").eq(j); 147 | $day_cell_index.addClass("in-month"); 148 | if (($day_cell_index.find(".date").text().length > 2) && 149 | (j > start_index_next_month)) { 150 | break; 151 | } 152 | } 153 | } 154 | } 155 | 156 | function setMonthTitle(name_attr) { 157 | var start_date = parseTime(name_attr); 158 | var title = [start_date.year, start_date.month].join("-"); 159 | $(".js-calendar-title").text(title) 160 | .attr("title-month-view", title); 161 | } 162 | 163 | // 判断name_attr代表的日期是否为当月一天 164 | function isFirstDay(name_attr) { 165 | var date = new Date(Number(name_attr)); 166 | if (Number(date.getDate()) === 1) { 167 | return date.toString().split(" ")[1] + " "; 168 | } else { 169 | return ""; 170 | } 171 | } 172 | 173 | // 判断name_attr代表的日期是否为当月最后一天 174 | function isLastDay(name_attr) { 175 | var date = new Date(Number(name_attr)); 176 | var next_date = new Date(date.getTime() + 86400000); 177 | if (Number(next_date.getDate()) === 1) { 178 | return date.toString().split(" ")[1] + " "; 179 | } else { 180 | return ""; 181 | } 182 | } 183 | 184 | /* 185 | * 周视图下设计共包含5个.week元素 0,1,2,3,4 186 | * 1.如当前在第1页继续回退则需要刷新所有的name属性值,己日期毫秒数均减少一个day_time或week_time 187 | * 2.如当前在第3页继续回退则需要刷新所有的name属性值,己日期毫秒数均增加一个day_time或week_time 188 | * 之所以这么设计是为了保持动画效果的一致 189 | * back_or_forward: -1: 表示回退; 1:表示向前 190 | */ 191 | function updateWeekNameAttr(back_or_forward) { 192 | var direction; 193 | if (back_or_forward === "backward") { 194 | direction = -1; 195 | } else { 196 | direction = 1; 197 | } 198 | var day_time = 86400000; 199 | var week_time = day_time * 7; 200 | 201 | // 由于日期发生了变动,要取消当前的today样式 202 | $(".week .today").removeClass("today"); 203 | $(".week").each(function() { 204 | $(this).attr("name", Number($(this).attr("name")) + direction * week_time); 205 | $(this).children().each(function() { 206 | var name_attr = Number($(this).attr("name")) + direction * week_time; 207 | $(this).attr("name", name_attr); 208 | $(this).find(".date").text(isFirstDay(name_attr) + 209 | isLastDay(name_attr) + 210 | parseTime(name_attr).date); 211 | // 更新today样式到新的元素 212 | if (name_attr == parseToday().time) { 213 | $(this).addClass("today"); 214 | } 215 | }); 216 | }); 217 | 218 | // 清空会议室预定信息,因为time发生改变需要重新刷新 219 | $(".meeting-card").remove(); 220 | } 221 | 222 | /* 223 | * 月视图下上下滚动条滚动到边界时需要刷新日期信息 224 | * 实现思路: 225 | * 1.无论是向上一月或下一月刷新,都以当前显示月的第一天为起点,获取当月第一天的name值 226 | * 2.根据该name表示的时间计算出上一月或下一月的第一天的值,使用setMonth()。 227 | * 3.将新name值作为基准,更新到中间的.mweek元素即行号(12),依次计算出所有元素的name值。 228 | * 4.根据.day-cell元素的name值刷新日期信息和title信息。 229 | * 5.scrollTop的位置定位到新显示月的第一天所在的行。 230 | * dir: -1-上一月, 1-下一月 231 | */ 232 | function updateCalendarDate($weeks, dir) { 233 | var $start_in_month = $(".in-month"); 234 | var next_month_start = new Date(Number($start_in_month.attr("name"))); 235 | next_month_start.setMonth(next_month_start.getMonth() + dir); 236 | var current_show_month = parseTime(next_month_start.getTime()); 237 | 238 | var center_pos = 12; 239 | var day_time = 86400000; 240 | var week_time = day_time * 7; 241 | var current_start_time = getStartWeekTime(next_month_start.getTime()); 242 | 243 | //清空.in-month类的day-cell元素 244 | $(".in-month").removeClass("in-month"); 245 | $(".mweek .today").removeClass("today"); 246 | 247 | 248 | 249 | $weeks.each(function(page) { 250 | var $self = $(this); 251 | $self.attr("name", current_start_time + (page - center_pos) * week_time); 252 | $self.children().each(function(index) { 253 | var name_attr = Number($self.attr("name")) + index * day_time; 254 | $(this).attr("name", name_attr); 255 | $(this).find(".date").text(isFirstDay(name_attr) + 256 | isLastDay(name_attr) + 257 | parseTime(name_attr).date); 258 | 259 | // 月视图下需要当前显示月添加.in-month类样式,加深背景色以示区分 260 | var date_daycell = parseTime(name_attr); 261 | if ((date_daycell.year === current_show_month.year) && 262 | (date_daycell.month === current_show_month.month)) { 263 | // console.log(date_daycell.year, date_daycell.month); 264 | $(this).addClass("in-month"); 265 | } 266 | 267 | // 更新today样式到新的元素 268 | if (name_attr == parseToday().time) { 269 | $(this).addClass("today"); 270 | } 271 | }); 272 | }); 273 | 274 | 275 | // 更新calendar-tile信息 276 | setMonthTitle(current_show_month.time); 277 | // 设置scroll-bar的位置使当天能够显示出来 278 | setScrollTop(12); 279 | 280 | //清空会议室预定信息,因为time发生改变需要重新刷新 281 | $(".meeting-card").remove(); 282 | } 283 | 284 | /* 285 | * 读取cookie并转换为hash形式对象 286 | */ 287 | function getCookie() { 288 | // 读取cookie 289 | var cookie = document.cookie; 290 | var dict_cookie = {}; 291 | 292 | if (cookie.length > 0) { 293 | // 解析cookie为hash形式对象 294 | cookie = cookie.split(";"); 295 | cookie.map(function(item) { 296 | var tem = item.trim().split("="); 297 | dict_cookie[tem[0]] = tem[1]; 298 | }); 299 | } 300 | return dict_cookie; 301 | } 302 | 303 | /* 304 | * 加载index.html页面检查cookie信息确定用户名和登录状态 305 | * cookie需包含两条选项:username, islogin 306 | */ 307 | function updateLoginInfo() { 308 | // 读取cookie 309 | var cookie = getCookie(); 310 | 311 | if ("name" in cookie) { 312 | if (cookie.name.length > 0) { 313 | if (JSON.parse(cookie.islogin)) { 314 | $("a.register").text(cookie.name) 315 | .attr("href", "#"); 316 | $("a.login").text("注销"); 317 | } 318 | } 319 | } 320 | } 321 | 322 | /* 323 | * 跳转到path指定的页面 324 | */ 325 | function redirect(path) { 326 | window.location.pathname = "/easyMeeting" + path; 327 | } 328 | 329 | /* 330 | * 根据用户名和密码请求server端验证登录 331 | * user_info- {name: xx, password: xx, rember_me: xx} 332 | */ 333 | function requestLogin(user_info) { 334 | $.ajax({ 335 | method: "POST", 336 | url: "/easyMeeting/signin", 337 | contentType: "application/json;charset='utf-8'", 338 | data: JSON.stringify(user_info) 339 | }).done(function(response_body) { 340 | // 登录成功则切换至index.html页面并显示在index.html页面显示用户信息 341 | if (response_body !== null) { 342 | // 登录成功增加登录状态的cookie信息 343 | document.cookie = "islogin=true"; 344 | updateLoginInfo(); 345 | // 登录失败则给出错误提示"用户名或密码错误..." 346 | } else { 347 | redirect("/sign.html"); 348 | } 349 | }); 350 | } 351 | 352 | function autoLogin() { 353 | // 读取cookie 354 | var cookie = getCookie(); 355 | cookie.rember_me = true; 356 | 357 | if ("name" in cookie) { 358 | if (cookie.name.length > 0) { 359 | // 发送ajax请求到server进行用户登录 360 | requestLogin(cookie); 361 | } 362 | } else { 363 | redirect("/sign.html"); 364 | } 365 | } 366 | 367 | /* 368 | * 格式化预定会议室模板 369 | */ 370 | function meetingCardFormat(ishide, id, title, room, start, end) { 371 | var meeting_card_template = 372 | "
" + 373 | "
{{title}}
" + 374 | "
" + 375 | "
{{room}}
" + 376 | "{{start}}{{end}}" + 377 | "
" + 378 | "
"; 379 | 380 | meeting_card_template = meeting_card_template.replace(/{{ishide}}/, ishide ? " hide" : ""); 381 | meeting_card_template = meeting_card_template.replace(/{{id}}/, id); 382 | meeting_card_template = meeting_card_template.replace(/{{title}}/, title); 383 | meeting_card_template = meeting_card_template.replace(/{{room}}/, room); 384 | meeting_card_template = meeting_card_template.replace(/{{start}}/, start); 385 | meeting_card_template = meeting_card_template.replace(/{{end}}/, end); 386 | return meeting_card_template; 387 | } 388 | 389 | /* 390 | * ajax方式从server端请求会议室预定数据(月视图) 391 | * range_timestamp- {start_timestamp: xx, end_timestamp: xx} 392 | */ 393 | function queryMeetingsForMonthView(range_timestamp) { 394 | $.ajax({ 395 | method: "POST", 396 | url: "/easyMeeting/querymeetings", 397 | contentType: "application/json;charset='utf-8'", 398 | data: JSON.stringify(range_timestamp) 399 | }).done(function(response_meetings) { 400 | // 使用全局变量记录当前页面显示的月视图下的会议室信息,用于定时刷新会议室任务与server端 401 | // 返回的数据进行比对 402 | window.last_month_meetings = response_meetings; 403 | 404 | response_meetings.forEach(function(meeting) { 405 | var $meeting_lists = $("td[name=" + meeting[1] + "] .meeting-lists"); 406 | var ishide = $meeting_lists.parent().hasClass("active")? "" : true; 407 | var meeting_card = meetingCardFormat(ishide, meeting[0], meeting[2], meeting[3], 408 | meeting[4], meeting[5]); 409 | $meeting_lists.append(meeting_card); 410 | }); 411 | }); 412 | } 413 | 414 | /* 415 | * ajax方式从server端请求会议室预定数据(周视图) 416 | * range_timestamp- {start_timestamp: xx, end_timestamp: xx} 417 | */ 418 | function queryMeetingsForWeekView(range_timestamp) { 419 | $.ajax({ 420 | method: "POST", 421 | url: "/easyMeeting/querymeetings", 422 | contentType: "application/json;charset='utf-8'", 423 | data: JSON.stringify(range_timestamp) 424 | }).done(function(response_meetings) { 425 | // 使用全局变量记录当前页面显示的周视图下的会议室信息,用于定时刷新会议室任务与server端 426 | // 返回的数据进行比对 427 | window.last_week_meetings = response_meetings; 428 | 429 | response_meetings.forEach(function(meeting) { 430 | var $meeting_lists = $(".day-col[name=" + meeting[1] + "] .meeting-lists"); 431 | var ishide = $meeting_lists.parent().hasClass("active")? "" : true; 432 | var meeting_card = meetingCardFormat(ishide, meeting[0], meeting[2], meeting[3], 433 | meeting[4], meeting[5]); 434 | $meeting_lists.append(meeting_card); 435 | }); 436 | }); 437 | } 438 | 439 | /* 440 | * 比对当前会议室信息和上一次会议室信息的不同 441 | * last_meetings: [[id, timestamp, title, room. start, end], []...] 442 | * current_meetings: [[id, timestamp, title, room. start, end], []...] 443 | * return value: [[id, timestamp, title, room. start, end, update_sate], []...] 444 | * tips: update_state: "+":新增, "-":删除 445 | */ 446 | function diffMeetings(last_meetings, current_meetings) { 447 | var change_meetings = []; 448 | 449 | // last_meetings中没有在current_meetings出现的为待删除项目 450 | last_meetings.forEach(function(last_meeting) { 451 | var state = false; 452 | for (var m = 0; m < current_meetings.length; m++) { 453 | // 由于server端id不会重复,id相同则说明该项数据相同 454 | if (last_meeting[0] === current_meetings[m][0]) { 455 | state = true; 456 | } 457 | } 458 | if (!state) { 459 | change_meetings.push(last_meeting.concat("-")); 460 | } 461 | }); 462 | 463 | // current_meetings中没有在last_meetings中出现的待新增项目 464 | current_meetings.forEach(function(meeting) { 465 | var state = false; 466 | for (var l = 0; l < last_meetings.length; l++) { 467 | // 由于server端id不会重复,id相同则说明该项数据相同 468 | if (meeting[0] == last_meetings[l][0]) { 469 | state = true; 470 | } 471 | } 472 | if (!state) { 473 | change_meetings.push(meeting.concat("+")); 474 | } 475 | }); 476 | return change_meetings; 477 | } 478 | 479 | // 根据cookie进行自动验证登录 480 | autoLogin(); 481 | 482 | // 注销登录处理(仅修改islogin的状态为false) 483 | $("a.login").on("click", function() { 484 | if (this.text === "注销") { 485 | document.cookie = "islogin=false"; 486 | } 487 | }); 488 | 489 | // 根据浏览器窗口变化动态计算week视图下的各元素宽度 490 | $(window).on("resize", function() { 491 | // 获取.calendar-week-view元素的当前宽度 492 | var last_week_width = $one_week.width(); 493 | 494 | // 获取当前.calendar_weeks_wrapper当前显示的page值 495 | var current_week_page = 2; 496 | if ($calendar_weeks_wrapper.css("left") !== "auto") { 497 | current_week_page = Math.floor( 498 | Math.abs($calendar_weeks_wrapper.css("left").slice(0, -2)) 499 | / last_week_width); 500 | } 501 | 502 | // 获取一周所占据的窗口宽度 = .calendar-content元素的宽度 503 | var new_week_width = $calendar_week_view.width(); 504 | // 计算week元素宽度变化量 505 | var offset_width = current_week_page * (new_week_width - last_week_width); 506 | 507 | // 更新.calendar-weeks-wrapper元素的css的left属性值 508 | $calendar_weeks_wrapper.css("left", "-=" + offset_width); 509 | 510 | // 设置包裹所有week的外层元素的宽度 511 | $calendar_weeks_wrapper.css("width", new_week_width * 5); 512 | 513 | // 设置每一有.week元素的宽度等于一周所占据的宽度 514 | $one_week.css("width", new_week_width); 515 | 516 | // 设置每一天.day-col所占的宽度 = (一周的宽度 - 所有margin的宽度) / 7 517 | var day_width = (new_week_width - 70) / 7; 518 | $day_col.css("width", day_width); 519 | }).trigger("resize"); 520 | 521 | // 初始情况下不显示周视图 522 | $calendar_week_view.addClass("hide"); 523 | // 周视图元素的日期和title初始化 524 | initCalendarDate($(".week"), 2, "week"); 525 | // 月视图元素的日期和title初始化 526 | initCalendarDate($(".mweek"), 12, "month"); 527 | 528 | // 切换至月视图 529 | var $calendar_month_view = $(".calendar-month-view"); 530 | $("#btn-show-month").on("click", function() { 531 | if ($calendar_month_view.hasClass("hide")) { 532 | $calendar_week_view.addClass("hide"); 533 | $calendar_month_view.removeClass("hide"); 534 | $calendar_title.text($calendar_title.attr("title-month-view")); 535 | } 536 | }); 537 | 538 | //切换至周视图 539 | $("#btn-show-week").on("click", function() { 540 | if ($calendar_week_view.hasClass("hide")) { 541 | $calendar_month_view.addClass("hide"); 542 | $calendar_week_view.removeClass("hide"); 543 | $calendar_title.text($calendar_title.attr("title-week-view")); 544 | 545 | // 刷新一次周视图元素的布局 546 | $(window).trigger("resize"); 547 | } 548 | }); 549 | 550 | // 月视图下点击某一天扩展显示 551 | $(".calendar-month-view").on("click", ".js-expand-day", function() { 552 | // 首先删除当前的active元素扩展显示 553 | $(".js-expand-day.active").removeClass("active") 554 | .find(".card-info").addClass("hide"); 555 | $(this).addClass("active") // 该元素扩展显示 556 | .find(".card-info").removeClass("hide"); 557 | }); 558 | 559 | // 周视图下点击某一天扩展显示 560 | $(".calendar-week-view").on("click", ".js-expand-day", function() { 561 | // 首先删除当前的active元素扩展显示 562 | $(".js-expand-day.active").removeClass("active") 563 | .find(".card-info").addClass("hide"); 564 | 565 | $(this).addClass("active") // 该元素扩展显示 566 | .find(".card-info").removeClass("hide"); 567 | }); 568 | 569 | // 通过关闭按钮关闭某一天的扩展显示 570 | $(".calendar-content").on("click", ".close-btn", function() { 571 | $(this).parent().parent().removeClass("active") 572 | .find(".card-info").addClass("hide"); 573 | }); 574 | 575 | // 周视图、月视图某日扩展下点击预定会议室链接弹出预定会议室弹出框,采用事件委托方式 576 | var $pop_over = $(".pop-over"); 577 | $(".calendar-content").on("click", ".link-book-meeting", function(e) { 578 | $pop_over.addClass("is-shown"); 579 | // 如果以鼠标的x,y坐标为起点分别向右向下增加弹出的宽度和高度后超出了浏览器视口的范围 580 | // 则需要适当调整弹出框的位置以使弹出框能够完整显示 581 | if (e.clientX + $pop_over.width() > window.innerWidth) { 582 | $pop_over.css("left", "auto"); // left参数设为默认值, right参数优先 583 | $pop_over.css("right", 10 + "px"); 584 | } else { 585 | $pop_over.css("right", "auto"); 586 | $pop_over.css("left", e.clientX + "px"); 587 | } 588 | 589 | if (e.clientY + $pop_over.height() > window.innerHeight) { 590 | $pop_over.css("top", "auto"); // top参数设为默认值, bottom参数优先 591 | $pop_over.css("bottom", 10 + "px"); 592 | } else { 593 | $pop_over.css("bottom", "auto"); 594 | $pop_over.css("top", e.clientY + "px"); 595 | } 596 | }); 597 | 598 | // 关闭按钮关闭预定会议室弹出框 599 | $(".pop-over .close-btn").on("click", function() { 600 | $(".pop-over").removeClass("is-shown"); 601 | }); 602 | 603 | // 月视图下上月按钮切换 604 | $(".previous-month").on("click", function() { 605 | if (!$(".calendar-month-view").hasClass("hide")) { 606 | updateCalendarDate($(".mweek"), -1); 607 | 608 | // ajax方式请求server端返回预定会议室的数据 609 | // 刷新月视图会议室信息 610 | queryMeetingsForMonthView({start_timestamp: $("td").eq(0).attr("name"), 611 | end_timestamp: $("td").eq(-1).attr("name")}); 612 | // 刷新周视图会议室信息 613 | queryMeetingsForWeekView({start_timestamp: $(".day-col").eq(0).attr("name"), 614 | end_timestamp: $(".day-col").eq(-1).attr("name")}); 615 | } 616 | }); 617 | 618 | // 月视图下上月按钮切换 619 | $(".next-month").on("click", function() { 620 | if (!$(".calendar-month-view").hasClass("hide")) { 621 | updateCalendarDate($(".mweek"), +1); 622 | 623 | // ajax方式请求server端返回预定会议室的数据 624 | // 刷新月视图会议室信息 625 | queryMeetingsForMonthView({start_timestamp: $("td").eq(0).attr("name"), 626 | end_timestamp: $("td").eq(-1).attr("name")}); 627 | // 刷新周视图会议室信息 628 | queryMeetingsForWeekView({start_timestamp: $(".day-col").eq(0).attr("name"), 629 | end_timestamp: $(".day-col").eq(-1).attr("name")}); 630 | } 631 | }); 632 | 633 | // 周视图下上周按钮切换 634 | $(".previous-week").on("click", function() { 635 | // 周视图下的处理 636 | if (!$(".calendar-week-view").hasClass("hide")) { 637 | // 获取.week元素 638 | var $el_week = $(".calendar-week-view .week"); 639 | // .week元素的宽度 640 | var width_of_week = $el_week[0].clientWidth; 641 | 642 | // 计算目前显示的是第几个.week元素 643 | var current_page = $(".calendar-weeks-wrapper").css("left").slice(1, -2) / width_of_week; 644 | if (current_page > 1) { 645 | if (!$(".calendar-weeks-wrapper").is(":animated")) { 646 | $(".calendar-weeks-wrapper").animate({"left": "+=" + width_of_week}, "slow"); 647 | } 648 | // 更新calendar title显示的日期范围 649 | setWeekTitle($(".week").eq(current_page - 1).attr("name")); 650 | } else if (current_page === 1) { 651 | // 以下处理主要使为了实现和其他情况一样的动画滚动效果,page 0是预留的缓冲部分 652 | if (!$(".calendar-weeks-wrapper").is(":animated")) { 653 | $(".calendar-weeks-wrapper").animate({"left": "+=" + width_of_week}, 654 | { 655 | duration: "slow", 656 | complete: function() { 657 | $(".calendar-weeks-wrapper").css("left", "-=" + width_of_week); 658 | updateWeekNameAttr("backward"); 659 | // 更新calendar title显示的日期范围 660 | setWeekTitle($(".week").eq(current_page).attr("name")); 661 | 662 | // ajax方式请求server端返回预定会议室的数据 663 | // 刷新月视图会议室信息 664 | queryMeetingsForMonthView({start_timestamp: $("td").eq(0).attr("name"), 665 | end_timestamp: $("td").eq(-1).attr("name")}); 666 | // 刷新周视图会议室信息 667 | queryMeetingsForWeekView({start_timestamp: $(".day-col").eq(0).attr("name"), 668 | end_timestamp: $(".day-col").eq(-1).attr("name")}); 669 | } 670 | }); 671 | } 672 | } 673 | } 674 | }); 675 | 676 | // 周视图下下周按钮切换 677 | $(".next-week").on("click", function() { 678 | // 周视图下的处理 679 | if (!$(".calendar-week-view").hasClass("hide")) { 680 | // 获取.week元素 681 | var $el_week = $(".calendar-week-view .week"); 682 | // .week元素的宽度 683 | var width_of_week = $el_week[0].clientWidth; 684 | // .week元素的数量 685 | var num_of_weeks = $el_week.length; 686 | 687 | // 计算目前显示的是第几个.week元素 688 | var current_page = $(".calendar-weeks-wrapper").css("left").slice(1, -2) / width_of_week; 689 | if (current_page < (num_of_weeks - 2)) { 690 | if (!$(".calendar-weeks-wrapper").is(":animated")) { 691 | $(".calendar-weeks-wrapper").animate({"left": "-=" + width_of_week}, "slow"); 692 | } 693 | // 更新calendar title显示的日期范围 694 | setWeekTitle($(".week").eq(current_page + 1).attr("name")); 695 | } else if (current_page === (num_of_weeks - 2)) { 696 | // 以下处理主要使为了实现和其他情况一样的动画滚动效果,page 0是预留的缓冲部分 697 | if (!$(".calendar-weeks-wrapper").is(":animated")) { 698 | $(".calendar-weeks-wrapper").animate({"left": "-=" + width_of_week}, 699 | { 700 | duration: "slow", 701 | complete: function() { 702 | $(".calendar-weeks-wrapper").css("left", "+=" + width_of_week); 703 | updateWeekNameAttr("forward"); 704 | // 更新calendar title显示的日期范围 705 | setWeekTitle($(".week").eq(current_page).attr("name")); 706 | 707 | // ajax方式请求server端返回预定会议室的数据 708 | // 刷新月视图会议室信息 709 | queryMeetingsForMonthView({start_timestamp: $("td").eq(0).attr("name"), 710 | end_timestamp: $("td").eq(-1).attr("name")}); 711 | // 刷新周视图会议室信息 712 | queryMeetingsForWeekView({start_timestamp: $(".day-col").eq(0).attr("name"), 713 | end_timestamp: $(".day-col").eq(-1).attr("name")}); 714 | } 715 | }); 716 | } 717 | } 718 | } 719 | }); 720 | 721 | 722 | // 周视图回到今天按钮点击处理 723 | $(".back-to-today").on("click", function() { 724 | if (!$(".calendar-week-view").hasClass("hide")) { 725 | // week视图下日历title、日期、当天背景颜色等初始化 726 | initCalendarDate($(".week"), 2, "week"); 727 | } else { 728 | // month视图下日历title、日期、当前背景颜色等初始化 729 | initCalendarDate($(".mweek"), 12, "month"); 730 | } 731 | 732 | // ajax方式请求server端返回预定会议室的数据 733 | // 刷新月视图会议室信息 734 | queryMeetingsForMonthView({start_timestamp: $("td").eq(0).attr("name"), 735 | end_timestamp: $("td").eq(-1).attr("name")}); 736 | // 刷新周视图会议室信息 737 | queryMeetingsForWeekView({start_timestamp: $(".day-col").eq(0).attr("name"), 738 | end_timestamp: $(".day-col").eq(-1).attr("name")}); 739 | }); 740 | 741 | // 月视图下.scroll-bar-ver的scroll事件处理 742 | // 1. 某一月的.day-cell元素的背景颜色,title随着scroll事件进行改变。 743 | // 2. 到达上下边界位置的日期和title刷新。 744 | $(".scroll-bar-ver").on("scroll", function() { 745 | // scrollTop所对应的行数位置 746 | var row_scrollTop = parseInt(this.scrollTop / $(".mweek").height()); 747 | // .in-month类的第一个元素所在行数位置 748 | var row_first_in_month = parseInt($(".in-month:first").index(".day-cell") / 7); 749 | // .in-month类的最后一个元素所在行数位置 750 | var row_last_in_month = parseInt($(".in-month:last").index(".day-cell") / 7); 751 | 752 | // 需向上一月刷新样式和title 753 | if ((row_scrollTop - row_first_in_month) < -2) { 754 | if (row_scrollTop < 4) { 755 | updateCalendarDate($(".mweek"), -1); 756 | 757 | // ajax方式请求server端返回预定会议室的数据 758 | // 刷新月视图会议室信息 759 | queryMeetingsForMonthView({start_timestamp: $("td").eq(0).attr("name"), 760 | end_timestamp: $("td").eq(-1).attr("name")}); 761 | // 刷新周视图会议室信息 762 | queryMeetingsForWeekView({start_timestamp: $(".day-col").eq(0).attr("name"), 763 | end_timestamp: $(".day-col").eq(-1).attr("name")}); 764 | } else { 765 | updateShowMonth("backward"); 766 | } 767 | } 768 | 769 | // 需向下一月刷新样式和title 770 | if ((row_scrollTop - row_last_in_month) > -1) { 771 | if (row_scrollTop > 15) { 772 | updateCalendarDate($(".mweek"), 1); 773 | 774 | // ajax方式请求server端返回预定会议室的数据 775 | // 刷新月视图会议室信息 776 | queryMeetingsForMonthView({start_timestamp: $("td").eq(0).attr("name"), 777 | end_timestamp: $("td").eq(-1).attr("name")}); 778 | // 刷新周视图会议室信息 779 | queryMeetingsForWeekView({start_timestamp: $(".day-col").eq(0).attr("name"), 780 | end_timestamp: $(".day-col").eq(-1).attr("name")}); 781 | } else { 782 | updateShowMonth("forward"); 783 | } 784 | } 785 | }); 786 | 787 | 788 | // 预定会议室弹出框的select选项处理 789 | $(".js-select-list").on("change", function(e) { 790 | $(this).prev().text(this.value); 791 | 792 | // 预定会议室结束时间判断,必须晚于开始时间,否则添加error提示 793 | var start_time = $(".start-time").val().replace(":", "."); 794 | var end_time = $(".end-time").val().replace(":", "."); 795 | if (end_time <= start_time) { 796 | $(".end-time").parent().addClass("error"); 797 | } else { 798 | $(".end-time").parent().removeClass("error"); 799 | } 800 | }); 801 | 802 | // 会议室标题textarea元素失去焦点判断是否为空,为空则添加红色边框进行提醒 803 | $(".input-meeting-title").on("blur", function() { 804 | var text = $(this).val().trim(); 805 | if (text.length === 0) { 806 | $(this).addClass("error"); 807 | } 808 | }); 809 | 810 | // 会议室标题textarea元素获取焦点清空.error类 811 | $(".input-meeting-title").on("focus", function() { 812 | $(this).removeClass("error"); 813 | }); 814 | 815 | // 会议室预定按钮点击处理效果 816 | $(".btn-book-meeting").on("click", function(e) { 817 | var meeting_info = {}; 818 | meeting_info.timestamp = $(".active").parent().attr("name"); 819 | meeting_info.title = $(".input-meeting-title").val(); 820 | meeting_info.room = $(".js-list-value").eq(0).text(); 821 | meeting_info.start = $(".js-list-value").eq(1).text(); 822 | meeting_info.end = $(".js-list-value").eq(2).text(); 823 | 824 | // 模拟触发一次textarea元素的blur事件、select元素的change事件,使UI错误提示工作 825 | $(".input-meeting-title").trigger("blur"); 826 | $(".js-select-list").trigger("change"); 827 | 828 | // 未发现.error类的元素才允许预定会议室 829 | if ($(".pop-over .error").length === 0) { 830 | // 发送ajax请求到server进行预定会议室 831 | $.ajax({ 832 | method: "POST", 833 | url: "/easyMeeting/addmeeting", 834 | contentType: "application/json;charset='utf-8'", 835 | data: JSON.stringify(meeting_info) 836 | }).done(function(meeting_info) { 837 | // 注册成功则切换至登录页面并自动补全用户名和密码 838 | if (meeting_info !== null) { 839 | var meeting_card = meetingCardFormat(false, meeting_info.id, 840 | meeting_info.title, meeting_info.room, 841 | meeting_info.start, meeting_info.end); 842 | $(".calendar-day.active .meeting-lists").append(meeting_card); 843 | 844 | // 上一次会议室信息全局变量中需增加该条记录 845 | if ($calendar_month_view.hasClass("hide")) { 846 | window.last_week_meetings.push([meeting_info.id, 847 | meeting_info.timestamp, 848 | meeting_info.title, 849 | meeting_info.room, 850 | meeting_info.start, 851 | meeting_info.end]); 852 | } else { 853 | window.last_month_meetings.push([meeting_info.id, 854 | meeting_info.timestamp, 855 | meeting_info.title, 856 | meeting_info.room, 857 | meeting_info.start, 858 | meeting_info.end]); 859 | } 860 | } else { 861 | console.log("预定会议室失败!"); 862 | } 863 | }); 864 | } 865 | }); 866 | 867 | // ajax方式请求server端返回预定会议室的数据 868 | // 刷新月视图会议室信息 869 | queryMeetingsForMonthView({start_timestamp: $("td").eq(0).attr("name"), 870 | end_timestamp: $("td").eq(-1).attr("name")}); 871 | // 刷新周视图会议室信息 872 | queryMeetingsForWeekView({start_timestamp: $(".day-col").eq(0).attr("name"), 873 | end_timestamp: $(".day-col").eq(-1).attr("name")}); 874 | 875 | setInterval(function() { 876 | // TODO: zx 全部刷新会导致页面闪烁问题,需要考虑只针对变化的信息进行刷新 877 | 878 | // 月视图请求范围 879 | var month_view_range = {start_timestamp: $("td").eq(0).attr("name"), 880 | end_timestamp: $("td").eq(-1).attr("name")}; 881 | // 周视图请求范围 882 | var week_view_range = {start_timestamp: $(".day-col").eq(0).attr("name"), 883 | end_timestamp: $(".day-col").eq(-1).attr("name")}; 884 | 885 | // 请求月视图会议室数据 886 | $.ajax({ 887 | method: "POST", 888 | url: "/easyMeeting/querymeetings", 889 | contentType: "application/json;charset='utf-8'", 890 | data: JSON.stringify(month_view_range) 891 | }).done(function(response_meetings) { 892 | // 使用全局变量记录当前页面显示的月视图下的会议室信息,用于定时刷新会议室任务与server端 893 | // 返回的数据进行比对 894 | window.month_meetings = response_meetings; 895 | var change_meetings = diffMeetings(window.last_month_meetings, 896 | window.month_meetings); 897 | // 更新last_month_meetings为当前值 898 | window.last_month_meetings = response_meetings; 899 | 900 | // 刷新month view页面的会议室预定信息 901 | change_meetings.forEach(function(meeting) { 902 | // 新增会议室 903 | if (meeting[6] === "+") { 904 | var $meeting_lists = $("td[name=" + meeting[1] + "] .meeting-lists"); 905 | var ishide = $meeting_lists.parent().hasClass("active")? "" : true; 906 | var meeting_card = meetingCardFormat(ishide, meeting[0], meeting[2], 907 | meeting[3], meeting[4], meeting[5]); 908 | $meeting_lists.append(meeting_card); 909 | } else { // 删除会议 910 | $("#" + meeting[0]).remove(); 911 | } 912 | }); 913 | }); 914 | 915 | // 请求周视图会议室数据 916 | $.ajax({ 917 | method: "POST", 918 | url: "/easyMeeting/querymeetings", 919 | contentType: "application/json;charset='utf-8'", 920 | data: JSON.stringify(week_view_range) 921 | }).done(function(response_meetings) { 922 | // 使用全局变量记录当前页面显示的月视图下的会议室信息,用于定时刷新会议室任务与server端 923 | // 返回的数据进行比对 924 | window.week_meetings = response_meetings; 925 | var change_meetings = diffMeetings(window.last_week_meetings, 926 | window.month_meetings); 927 | // 更新last_month_meetings为当前值 928 | window.last_week_meetings = response_meetings; 929 | 930 | // 刷新month view页面的会议室预定信息 931 | change_meetings.forEach(function(meeting) { 932 | // 新增会议室 933 | if (meeting[6] === "+") { 934 | var $meeting_lists = $(".day-col[name=" + meeting[1] + "] .meeting-lists"); 935 | var ishide = $meeting_lists.parent().hasClass("active")? "" : true; 936 | var meeting_card = meetingCardFormat(ishide, meeting[0], meeting[2], 937 | meeting[3], meeting[4], meeting[5]); 938 | $meeting_lists.append(meeting_card); 939 | } else { // 删除会议 940 | $("#" + meeting[0]).remove(); 941 | } 942 | }); 943 | }); 944 | }, 5000); 945 | }); 946 | --------------------------------------------------------------------------------