Accept Merge Request #118 增加比赛的权限管理 decorator等 : (virusdefender-dev -> dev)

Merge Request: 增加比赛的权限管理 decorator等
Created By: @virusdefender
Accepted By: @virusdefender
URL: https://coding.net/u/virusdefender/p/qduoj/git/merge/118
This commit is contained in:
virusdefender 2015-08-23 14:33:50 +08:00
commit 86d33dd974
121 changed files with 134 additions and 26895 deletions

86
contest/decorators.py Normal file
View File

@ -0,0 +1,86 @@
# coding=utf-8
from functools import wraps
from django.http import HttpResponse
from django.shortcuts import render
from django.utils.timezone import now
from utils.shortcuts import error_response, error_page
from account.models import SUPER_ADMIN
from .models import Contest
def check_user_contest_permission(func):
@wraps(func)
def _check_user_contest_permission(*args, **kwargs):
"""
这个函数检查当前的这个比赛对于 request 的用户来说能不能参加
需要比较比赛的开始和结束时间比赛是否有密码比赛是不是限定指定小组参加
如果是有密码或者限定指定小组参加的话即使比赛已经结束那么也是可以看到所有的题目和结果的
否则不能看到这个比赛的题目结果排名等等
"""
# CBV 的情况第一个参数是self第二个参数是request
if len(args) == 2:
request = args[-1]
else:
request = args[0]
if not request.user.is_authenticated():
if request.is_ajax():
return error_response(u"请先登录")
else:
return error_page(request, u"请先登录")
# kwargs 就包含了url 里面的播或参数
if "contest_id" in kwargs:
contest_id = kwargs["contest_id"]
elif "contest_id" in request.data:
contest_id = request.data["contest_id"]
else:
if request.is_ajax():
return error_response(u"参数错误")
else:
return error_page(request, u"参数错误")
try:
contest = Contest.objects.get(id=contest_id)
except Contest.DoesNotExist:
if request.is_ajax():
return error_response(u"比赛不存在")
else:
return error_page(request, u"比赛不存在")
if request.user.admin_type == SUPER_ADMIN or request.user == contest.created_by:
return func(*args, **kwargs)
# 有密码的公开赛
if contest.contest_type == 2:
# 没有输入过密码
if contest.id not in request.session.get("contests", []):
if request.is_ajax():
return error_response(u"请先输入密码")
else:
return render(request, "oj/contest/no_contest_permission.html",
{"reason": "password_protect", "show_tab": False, "contest": contest})
# 指定小组参加的
if contest.contest_type == 0:
if not contest.groups.filter(id__in=request.user.group_set.all()).exists():
if request.is_ajax():
return error_response(u"只有指定小组的可以参加这场比赛")
else:
return render(request, "oj/contest/no_contest_permission.html",
{"reason": "group_limited", "show_tab": False, "contest": contest})
# 比赛没有开始
if contest.start_time > now():
if request.is_ajax():
return error_response(u"比赛还没有开始")
else:
return render(request, "oj/contest/no_contest_permission.html",
{"reason": "contest_not_start", "show_tab": False, "contest": contest})
return func(*args, **kwargs)
return _check_user_contest_permission

View File

@ -1,7 +1,8 @@
# coding=utf-8 # coding=utf-8
import json import json
import datetime import datetime
from django.utils.timezone import localtime from functools import wraps
from django.utils.timezone import now
from django.shortcuts import render from django.shortcuts import render
from django.db import IntegrityError from django.db import IntegrityError
from django.utils import dateparse from django.utils import dateparse
@ -17,6 +18,7 @@ from group.models import Group
from announcement.models import Announcement from announcement.models import Announcement
from .models import Contest, ContestProblem from .models import Contest, ContestProblem
from .decorators import check_user_contest_permission
from .serializers import (CreateContestSerializer, ContestSerializer, EditContestSerializer, from .serializers import (CreateContestSerializer, ContestSerializer, EditContestSerializer,
CreateContestProblemSerializer, ContestProblemSerializer, CreateContestProblemSerializer, ContestProblemSerializer,
EditContestProblemSerializer, ContestPasswordVerifySerializer, EditContestProblemSerializer, ContestPasswordVerifySerializer,
@ -240,44 +242,24 @@ class ContestPasswordVerifyAPIView(APIView):
if data["password"] != contest.password: if data["password"] != contest.password:
return error_response(u" 密码错误") return error_response(u" 密码错误")
else: else:
print request.session.get("contests", None)
if "contests" not in request.session: if "contests" not in request.session:
request.session["contests"] = [] request.session["contests"] = []
request.session["contests"].append(int(data["contest_id"])) request.session["contests"].append(int(data["contest_id"]))
print request.session["contests"] # https://docs.djangoproject.com/en/dev/topics/http/sessions/#when-sessions-are-saved
request.session.modified = True
return success_response(True) return success_response(True)
else: else:
return serializer_invalid_response(serializer) return serializer_invalid_response(serializer)
def check_user_contest_permission(request, contest): @check_user_contest_permission
# 有密码的公开赛
if contest.contest_type == 2:
# 没有输入过密码
if contest.id not in request.session.get("contests", []):
return {"result": False, "reason": "password_protect"}
# 指定小组参加的
if contest.contest_type == 0:
if not contest.groups.filter(id__in=request.user.group_set.all()).exists():
return {"result": False, "reason": "limited_group"}
return {"result": True}
@login_required
def contest_page(request, contest_id): def contest_page(request, contest_id):
try: try:
contest = Contest.objects.get(id=contest_id) contest = Contest.objects.get(id=contest_id)
except Contest.DoesNotExist: except Contest.DoesNotExist:
return error_page(request, u"比赛不存在") return error_page(request, u"比赛不存在")
Contest.objects.filter(Q(contest_type__in=[1, 2]) | Q(groups__in=request.user.group_set.all()))
result = check_user_contest_permission(request, contest)
if not result["result"]:
return render(request, "oj/contest/contest_no_privilege.html", {"contest": contest, "reason": result["reason"]})
return render(request, "oj/contest/contest_index.html", {"contest": contest}) return render(request, "oj/contest/contest_index.html", {"contest": contest})

View File

@ -1,587 +0,0 @@
/*!
* Bootstrap v3.3.5 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
.btn-default,
.btn-primary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger {
text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(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, .125);
box-shadow: inset 0 3px 5px rgba(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 {
text-shadow: 0 1px 0 #fff;
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, from(#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;
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, from(#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, from(#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, from(#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, from(#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, from(#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, .075);
box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
background-color: #e8e8e8;
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, from(#f5f5f5), to(#e8e8e8));
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
background-repeat: repeat-x;
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
background-color: #2e6da4;
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, from(#337ab7), to(#2e6da4));
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
background-repeat: repeat-x;
}
.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, from(#fff), to(#f8f8f8));
background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(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, from(#dbdbdb), to(#e2e2e2));
background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);
background-repeat: repeat-x;
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
}
.navbar-brand,
.navbar-nav > li > a {
text-shadow: 0 1px 0 rgba(255, 255, 255, .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, from(#3c3c3c), to(#222));
background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
background-repeat: repeat-x;
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, from(#080808), to(#0f0f0f));
background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);
background-repeat: repeat-x;
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
}
.navbar-inverse .navbar-brand,
.navbar-inverse .navbar-nav > li > a {
text-shadow: 0 -1px 0 rgba(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, from(#337ab7), to(#2e6da4));
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
background-repeat: repeat-x;
}
}
.alert {
text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(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, from(#dff0d8), to(#c8e5bc));
background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
background-repeat: repeat-x;
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, from(#d9edf7), to(#b9def0));
background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
background-repeat: repeat-x;
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, from(#fcf8e3), to(#f8efc0));
background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
background-repeat: repeat-x;
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, from(#f2dede), to(#e7c3c3));
background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
background-repeat: repeat-x;
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, from(#ebebeb), to(#f5f5f5));
background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
background-repeat: repeat-x;
}
.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, from(#337ab7), to(#286090));
background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);
background-repeat: repeat-x;
}
.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, from(#5cb85c), to(#449d44));
background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
background-repeat: repeat-x;
}
.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, from(#5bc0de), to(#31b0d5));
background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
background-repeat: repeat-x;
}
.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, from(#f0ad4e), to(#ec971f));
background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
background-repeat: repeat-x;
}
.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, from(#d9534f), to(#c9302c));
background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
background-repeat: repeat-x;
}
.progress-bar-striped {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
}
.list-group {
border-radius: 4px;
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
box-shadow: 0 1px 2px rgba(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, from(#337ab7), to(#2b669a));
background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);
background-repeat: repeat-x;
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, .05);
box-shadow: 0 1px 2px rgba(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, from(#f5f5f5), to(#e8e8e8));
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
background-repeat: repeat-x;
}
.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, from(#337ab7), to(#2e6da4));
background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
background-repeat: repeat-x;
}
.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, from(#dff0d8), to(#d0e9c6));
background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
background-repeat: repeat-x;
}
.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, from(#d9edf7), to(#c4e3f3));
background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
background-repeat: repeat-x;
}
.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, from(#fcf8e3), to(#faf2cc));
background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
background-repeat: repeat-x;
}
.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, from(#f2dede), to(#ebcccc));
background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
background-repeat: repeat-x;
}
.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, from(#e8e8e8), to(#f5f5f5));
background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
background-repeat: repeat-x;
border-color: #dcdcdc;
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
}
/*# sourceMappingURL=bootstrap-theme.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,40 +0,0 @@
/*
Name: 3024 day
Author: Jan T. Sott (http://github.com/idleberg)
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
*/
.cm-s-3024-day.CodeMirror {background: #f7f7f7; color: #3a3432;}
.cm-s-3024-day div.CodeMirror-selected {background: #d6d5d4 !important;}
.cm-s-3024-day.CodeMirror ::selection { background: #d6d5d4; }
.cm-s-3024-day.CodeMirror ::-moz-selection { background: #d9d9d9; }
.cm-s-3024-day .CodeMirror-gutters {background: #f7f7f7; border-right: 0px;}
.cm-s-3024-day .CodeMirror-guttermarker { color: #db2d20; }
.cm-s-3024-day .CodeMirror-guttermarker-subtle { color: #807d7c; }
.cm-s-3024-day .CodeMirror-linenumber {color: #807d7c;}
.cm-s-3024-day .CodeMirror-cursor {border-left: 1px solid #5c5855 !important;}
.cm-s-3024-day span.cm-comment {color: #cdab53;}
.cm-s-3024-day span.cm-atom {color: #a16a94;}
.cm-s-3024-day span.cm-number {color: #a16a94;}
.cm-s-3024-day span.cm-property, .cm-s-3024-day span.cm-attribute {color: #01a252;}
.cm-s-3024-day span.cm-keyword {color: #db2d20;}
.cm-s-3024-day span.cm-string {color: #fded02;}
.cm-s-3024-day span.cm-variable {color: #01a252;}
.cm-s-3024-day span.cm-variable-2 {color: #01a0e4;}
.cm-s-3024-day span.cm-def {color: #e8bbd0;}
.cm-s-3024-day span.cm-bracket {color: #3a3432;}
.cm-s-3024-day span.cm-tag {color: #db2d20;}
.cm-s-3024-day span.cm-link {color: #a16a94;}
.cm-s-3024-day span.cm-error {background: #db2d20; color: #5c5855;}
.cm-s-3024-day .CodeMirror-activeline-background {background: #e8f2ff !important;}
.cm-s-3024-day .CodeMirror-matchingbracket { text-decoration: underline; color: #a16a94 !important;}

View File

@ -1,39 +0,0 @@
/*
Name: 3024 night
Author: Jan T. Sott (http://github.com/idleberg)
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
*/
.cm-s-3024-night.CodeMirror {background: #090300; color: #d6d5d4;}
.cm-s-3024-night div.CodeMirror-selected {background: #3a3432 !important;}
.cm-s-3024-night.CodeMirror ::selection { background: rgba(58, 52, 50, .99); }
.cm-s-3024-night.CodeMirror ::-moz-selection { background: rgba(58, 52, 50, .99); }
.cm-s-3024-night .CodeMirror-gutters {background: #090300; border-right: 0px;}
.cm-s-3024-night .CodeMirror-guttermarker { color: #db2d20; }
.cm-s-3024-night .CodeMirror-guttermarker-subtle { color: #5c5855; }
.cm-s-3024-night .CodeMirror-linenumber {color: #5c5855;}
.cm-s-3024-night .CodeMirror-cursor {border-left: 1px solid #807d7c !important;}
.cm-s-3024-night span.cm-comment {color: #cdab53;}
.cm-s-3024-night span.cm-atom {color: #a16a94;}
.cm-s-3024-night span.cm-number {color: #a16a94;}
.cm-s-3024-night span.cm-property, .cm-s-3024-night span.cm-attribute {color: #01a252;}
.cm-s-3024-night span.cm-keyword {color: #db2d20;}
.cm-s-3024-night span.cm-string {color: #fded02;}
.cm-s-3024-night span.cm-variable {color: #01a252;}
.cm-s-3024-night span.cm-variable-2 {color: #01a0e4;}
.cm-s-3024-night span.cm-def {color: #e8bbd0;}
.cm-s-3024-night span.cm-bracket {color: #d6d5d4;}
.cm-s-3024-night span.cm-tag {color: #db2d20;}
.cm-s-3024-night span.cm-link {color: #a16a94;}
.cm-s-3024-night span.cm-error {background: #db2d20; color: #807d7c;}
.cm-s-3024-night .CodeMirror-activeline-background {background: #2F2F2F !important;}
.cm-s-3024-night .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}

View File

@ -1,5 +0,0 @@
.cm-s-ambiance.CodeMirror {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}

File diff suppressed because one or more lines are too long

View File

@ -1,38 +0,0 @@
/*
Name: Base16 Default Dark
Author: Chris Kempson (http://chriskempson.com)
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools)
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
*/
.cm-s-base16-dark.CodeMirror {background: #151515; color: #e0e0e0;}
.cm-s-base16-dark div.CodeMirror-selected {background: #303030 !important;}
.cm-s-base16-dark.CodeMirror ::selection { background: rgba(48, 48, 48, .99); }
.cm-s-base16-dark.CodeMirror ::-moz-selection { background: rgba(48, 48, 48, .99); }
.cm-s-base16-dark .CodeMirror-gutters {background: #151515; border-right: 0px;}
.cm-s-base16-dark .CodeMirror-guttermarker { color: #ac4142; }
.cm-s-base16-dark .CodeMirror-guttermarker-subtle { color: #505050; }
.cm-s-base16-dark .CodeMirror-linenumber {color: #505050;}
.cm-s-base16-dark .CodeMirror-cursor {border-left: 1px solid #b0b0b0 !important;}
.cm-s-base16-dark span.cm-comment {color: #8f5536;}
.cm-s-base16-dark span.cm-atom {color: #aa759f;}
.cm-s-base16-dark span.cm-number {color: #aa759f;}
.cm-s-base16-dark span.cm-property, .cm-s-base16-dark span.cm-attribute {color: #90a959;}
.cm-s-base16-dark span.cm-keyword {color: #ac4142;}
.cm-s-base16-dark span.cm-string {color: #f4bf75;}
.cm-s-base16-dark span.cm-variable {color: #90a959;}
.cm-s-base16-dark span.cm-variable-2 {color: #6a9fb5;}
.cm-s-base16-dark span.cm-def {color: #d28445;}
.cm-s-base16-dark span.cm-bracket {color: #e0e0e0;}
.cm-s-base16-dark span.cm-tag {color: #ac4142;}
.cm-s-base16-dark span.cm-link {color: #aa759f;}
.cm-s-base16-dark span.cm-error {background: #ac4142; color: #b0b0b0;}
.cm-s-base16-dark .CodeMirror-activeline-background {background: #202020 !important;}
.cm-s-base16-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}

View File

@ -1,38 +0,0 @@
/*
Name: Base16 Default Light
Author: Chris Kempson (http://chriskempson.com)
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools)
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
*/
.cm-s-base16-light.CodeMirror {background: #f5f5f5; color: #202020;}
.cm-s-base16-light div.CodeMirror-selected {background: #e0e0e0 !important;}
.cm-s-base16-light.CodeMirror ::selection { background: #e0e0e0; }
.cm-s-base16-light.CodeMirror ::-moz-selection { background: #e0e0e0; }
.cm-s-base16-light .CodeMirror-gutters {background: #f5f5f5; border-right: 0px;}
.cm-s-base16-light .CodeMirror-guttermarker { color: #ac4142; }
.cm-s-base16-light .CodeMirror-guttermarker-subtle { color: #b0b0b0; }
.cm-s-base16-light .CodeMirror-linenumber {color: #b0b0b0;}
.cm-s-base16-light .CodeMirror-cursor {border-left: 1px solid #505050 !important;}
.cm-s-base16-light span.cm-comment {color: #8f5536;}
.cm-s-base16-light span.cm-atom {color: #aa759f;}
.cm-s-base16-light span.cm-number {color: #aa759f;}
.cm-s-base16-light span.cm-property, .cm-s-base16-light span.cm-attribute {color: #90a959;}
.cm-s-base16-light span.cm-keyword {color: #ac4142;}
.cm-s-base16-light span.cm-string {color: #f4bf75;}
.cm-s-base16-light span.cm-variable {color: #90a959;}
.cm-s-base16-light span.cm-variable-2 {color: #6a9fb5;}
.cm-s-base16-light span.cm-def {color: #d28445;}
.cm-s-base16-light span.cm-bracket {color: #202020;}
.cm-s-base16-light span.cm-tag {color: #ac4142;}
.cm-s-base16-light span.cm-link {color: #aa759f;}
.cm-s-base16-light span.cm-error {background: #ac4142; color: #505050;}
.cm-s-base16-light .CodeMirror-activeline-background {background: #DDDCDC !important;}
.cm-s-base16-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}

View File

@ -1,32 +0,0 @@
/* Port of TextMate's Blackboard theme */
.cm-s-blackboard.CodeMirror { background: #0C1021; color: #F8F8F8; }
.cm-s-blackboard .CodeMirror-selected { background: #253B76 !important; }
.cm-s-blackboard.CodeMirror ::selection { background: rgba(37, 59, 118, .99); }
.cm-s-blackboard.CodeMirror ::-moz-selection { background: rgba(37, 59, 118, .99); }
.cm-s-blackboard .CodeMirror-gutters { background: #0C1021; border-right: 0; }
.cm-s-blackboard .CodeMirror-guttermarker { color: #FBDE2D; }
.cm-s-blackboard .CodeMirror-guttermarker-subtle { color: #888; }
.cm-s-blackboard .CodeMirror-linenumber { color: #888; }
.cm-s-blackboard .CodeMirror-cursor { border-left: 1px solid #A7A7A7 !important; }
.cm-s-blackboard .cm-keyword { color: #FBDE2D; }
.cm-s-blackboard .cm-atom { color: #D8FA3C; }
.cm-s-blackboard .cm-number { color: #D8FA3C; }
.cm-s-blackboard .cm-def { color: #8DA6CE; }
.cm-s-blackboard .cm-variable { color: #FF6400; }
.cm-s-blackboard .cm-operator { color: #FBDE2D;}
.cm-s-blackboard .cm-comment { color: #AEAEAE; }
.cm-s-blackboard .cm-string { color: #61CE3C; }
.cm-s-blackboard .cm-string-2 { color: #61CE3C; }
.cm-s-blackboard .cm-meta { color: #D8FA3C; }
.cm-s-blackboard .cm-builtin { color: #8DA6CE; }
.cm-s-blackboard .cm-tag { color: #8DA6CE; }
.cm-s-blackboard .cm-attribute { color: #8DA6CE; }
.cm-s-blackboard .cm-header { color: #FF6400; }
.cm-s-blackboard .cm-hr { color: #AEAEAE; }
.cm-s-blackboard .cm-link { color: #8DA6CE; }
.cm-s-blackboard .cm-error { background: #9D1E15; color: #F8F8F8; }
.cm-s-blackboard .CodeMirror-activeline-background {background: #3C3636 !important;}
.cm-s-blackboard .CodeMirror-matchingbracket {outline:1px solid grey;color:white !important}

View File

@ -1,25 +0,0 @@
.cm-s-cobalt.CodeMirror { background: #002240; color: white; }
.cm-s-cobalt div.CodeMirror-selected { background: #b36539 !important; }
.cm-s-cobalt.CodeMirror ::selection { background: rgba(179, 101, 57, .99); }
.cm-s-cobalt.CodeMirror ::-moz-selection { background: rgba(179, 101, 57, .99); }
.cm-s-cobalt .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
.cm-s-cobalt .CodeMirror-guttermarker { color: #ffee80; }
.cm-s-cobalt .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
.cm-s-cobalt .CodeMirror-linenumber { color: #d0d0d0; }
.cm-s-cobalt .CodeMirror-cursor { border-left: 1px solid white !important; }
.cm-s-cobalt span.cm-comment { color: #08f; }
.cm-s-cobalt span.cm-atom { color: #845dc4; }
.cm-s-cobalt span.cm-number, .cm-s-cobalt span.cm-attribute { color: #ff80e1; }
.cm-s-cobalt span.cm-keyword { color: #ffee80; }
.cm-s-cobalt span.cm-string { color: #3ad900; }
.cm-s-cobalt span.cm-meta { color: #ff9d00; }
.cm-s-cobalt span.cm-variable-2, .cm-s-cobalt span.cm-tag { color: #9effff; }
.cm-s-cobalt span.cm-variable-3, .cm-s-cobalt span.cm-def { color: white; }
.cm-s-cobalt span.cm-bracket { color: #d8d8d8; }
.cm-s-cobalt span.cm-builtin, .cm-s-cobalt span.cm-special { color: #ff9e59; }
.cm-s-cobalt span.cm-link { color: #845dc4; }
.cm-s-cobalt span.cm-error { color: #9d1e15; }
.cm-s-cobalt .CodeMirror-activeline-background {background: #002D57 !important;}
.cm-s-cobalt .CodeMirror-matchingbracket {outline:1px solid grey;color:white !important}

View File

@ -1,33 +0,0 @@
.cm-s-colorforth.CodeMirror { background: #000000; color: #f8f8f8; }
.cm-s-colorforth .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
.cm-s-colorforth .CodeMirror-guttermarker { color: #FFBD40; }
.cm-s-colorforth .CodeMirror-guttermarker-subtle { color: #78846f; }
.cm-s-colorforth .CodeMirror-linenumber { color: #bababa; }
.cm-s-colorforth .CodeMirror-cursor { border-left: 1px solid white !important; }
.cm-s-colorforth span.cm-comment { color: #ededed; }
.cm-s-colorforth span.cm-def { color: #ff1c1c; font-weight:bold; }
.cm-s-colorforth span.cm-keyword { color: #ffd900; }
.cm-s-colorforth span.cm-builtin { color: #00d95a; }
.cm-s-colorforth span.cm-variable { color: #73ff00; }
.cm-s-colorforth span.cm-string { color: #007bff; }
.cm-s-colorforth span.cm-number { color: #00c4ff; }
.cm-s-colorforth span.cm-atom { color: #606060; }
.cm-s-colorforth span.cm-variable-2 { color: #EEE; }
.cm-s-colorforth span.cm-variable-3 { color: #DDD; }
.cm-s-colorforth span.cm-property {}
.cm-s-colorforth span.cm-operator {}
.cm-s-colorforth span.cm-meta { color: yellow; }
.cm-s-colorforth span.cm-qualifier { color: #FFF700; }
.cm-s-colorforth span.cm-bracket { color: #cc7; }
.cm-s-colorforth span.cm-tag { color: #FFBD40; }
.cm-s-colorforth span.cm-attribute { color: #FFF700; }
.cm-s-colorforth span.cm-error { color: #f00; }
.cm-s-colorforth .CodeMirror-selected { background: #333d53 !important; }
.cm-s-colorforth span.cm-compilation { background: rgba(255, 255, 255, 0.12); }
.cm-s-colorforth .CodeMirror-activeline-background {background: #253540 !important;}

View File

@ -1,23 +0,0 @@
.cm-s-eclipse span.cm-meta {color: #FF1717;}
.cm-s-eclipse span.cm-keyword { line-height: 1em; font-weight: bold; color: #7F0055; }
.cm-s-eclipse span.cm-atom {color: #219;}
.cm-s-eclipse span.cm-number {color: #164;}
.cm-s-eclipse span.cm-def {color: #00f;}
.cm-s-eclipse span.cm-variable {color: black;}
.cm-s-eclipse span.cm-variable-2 {color: #0000C0;}
.cm-s-eclipse span.cm-variable-3 {color: #0000C0;}
.cm-s-eclipse span.cm-property {color: black;}
.cm-s-eclipse span.cm-operator {color: black;}
.cm-s-eclipse span.cm-comment {color: #3F7F5F;}
.cm-s-eclipse span.cm-string {color: #2A00FF;}
.cm-s-eclipse span.cm-string-2 {color: #f50;}
.cm-s-eclipse span.cm-qualifier {color: #555;}
.cm-s-eclipse span.cm-builtin {color: #30a;}
.cm-s-eclipse span.cm-bracket {color: #cc7;}
.cm-s-eclipse span.cm-tag {color: #170;}
.cm-s-eclipse span.cm-attribute {color: #00c;}
.cm-s-eclipse span.cm-link {color: #219;}
.cm-s-eclipse span.cm-error {color: #f00;}
.cm-s-eclipse .CodeMirror-activeline-background {background: #e8f2ff !important;}
.cm-s-eclipse .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;}

View File

@ -1,13 +0,0 @@
.cm-s-elegant span.cm-number, .cm-s-elegant span.cm-string, .cm-s-elegant span.cm-atom {color: #762;}
.cm-s-elegant span.cm-comment {color: #262; font-style: italic; line-height: 1em;}
.cm-s-elegant span.cm-meta {color: #555; font-style: italic; line-height: 1em;}
.cm-s-elegant span.cm-variable {color: black;}
.cm-s-elegant span.cm-variable-2 {color: #b11;}
.cm-s-elegant span.cm-qualifier {color: #555;}
.cm-s-elegant span.cm-keyword {color: #730;}
.cm-s-elegant span.cm-builtin {color: #30a;}
.cm-s-elegant span.cm-link {color: #762;}
.cm-s-elegant span.cm-error {background-color: #fdd;}
.cm-s-elegant .CodeMirror-activeline-background {background: #e8f2ff !important;}
.cm-s-elegant .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;}

View File

@ -1,34 +0,0 @@
.cm-s-erlang-dark.CodeMirror { background: #002240; color: white; }
.cm-s-erlang-dark div.CodeMirror-selected { background: #b36539 !important; }
.cm-s-erlang-dark.CodeMirror ::selection { background: rgba(179, 101, 57, .99); }
.cm-s-erlang-dark.CodeMirror ::-moz-selection { background: rgba(179, 101, 57, .99); }
.cm-s-erlang-dark .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
.cm-s-erlang-dark .CodeMirror-guttermarker { color: white; }
.cm-s-erlang-dark .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
.cm-s-erlang-dark .CodeMirror-linenumber { color: #d0d0d0; }
.cm-s-erlang-dark .CodeMirror-cursor { border-left: 1px solid white !important; }
.cm-s-erlang-dark span.cm-quote { color: #ccc; }
.cm-s-erlang-dark span.cm-atom { color: #f133f1; }
.cm-s-erlang-dark span.cm-attribute { color: #ff80e1; }
.cm-s-erlang-dark span.cm-bracket { color: #ff9d00; }
.cm-s-erlang-dark span.cm-builtin { color: #eaa; }
.cm-s-erlang-dark span.cm-comment { color: #77f; }
.cm-s-erlang-dark span.cm-def { color: #e7a; }
.cm-s-erlang-dark span.cm-keyword { color: #ffee80; }
.cm-s-erlang-dark span.cm-meta { color: #50fefe; }
.cm-s-erlang-dark span.cm-number { color: #ffd0d0; }
.cm-s-erlang-dark span.cm-operator { color: #d55; }
.cm-s-erlang-dark span.cm-property { color: #ccc; }
.cm-s-erlang-dark span.cm-qualifier { color: #ccc; }
.cm-s-erlang-dark span.cm-special { color: #ffbbbb; }
.cm-s-erlang-dark span.cm-string { color: #3ad900; }
.cm-s-erlang-dark span.cm-string-2 { color: #ccc; }
.cm-s-erlang-dark span.cm-tag { color: #9effff; }
.cm-s-erlang-dark span.cm-variable { color: #50fe50; }
.cm-s-erlang-dark span.cm-variable-2 { color: #e0e; }
.cm-s-erlang-dark span.cm-variable-3 { color: #ccc; }
.cm-s-erlang-dark span.cm-error { color: #9d1e15; }
.cm-s-erlang-dark .CodeMirror-activeline-background {background: #013461 !important;}
.cm-s-erlang-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}

View File

@ -1,47 +0,0 @@
/*
http://lesscss.org/ dark theme
Ported to CodeMirror by Peter Kroon
*/
.cm-s-lesser-dark {
line-height: 1.3em;
}
.cm-s-lesser-dark.CodeMirror { background: #262626; color: #EBEFE7; text-shadow: 0 -1px 1px #262626; }
.cm-s-lesser-dark div.CodeMirror-selected {background: #45443B !important;} /* 33322B*/
.cm-s-lesser-dark.CodeMirror ::selection { background: rgba(69, 68, 59, .99); }
.cm-s-lesser-dark.CodeMirror ::-moz-selection { background: rgba(69, 68, 59, .99); }
.cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white !important; }
.cm-s-lesser-dark pre { padding: 0 8px; }/*editable code holder*/
.cm-s-lesser-dark.CodeMirror span.CodeMirror-matchingbracket { color: #7EFC7E; }/*65FC65*/
.cm-s-lesser-dark .CodeMirror-gutters { background: #262626; border-right:1px solid #aaa; }
.cm-s-lesser-dark .CodeMirror-guttermarker { color: #599eff; }
.cm-s-lesser-dark .CodeMirror-guttermarker-subtle { color: #777; }
.cm-s-lesser-dark .CodeMirror-linenumber { color: #777; }
.cm-s-lesser-dark span.cm-header {color: #a0a;}
.cm-s-lesser-dark span.cm-quote {color: #090;}
.cm-s-lesser-dark span.cm-keyword { color: #599eff; }
.cm-s-lesser-dark span.cm-atom { color: #C2B470; }
.cm-s-lesser-dark span.cm-number { color: #B35E4D; }
.cm-s-lesser-dark span.cm-def {color: white;}
.cm-s-lesser-dark span.cm-variable { color:#D9BF8C; }
.cm-s-lesser-dark span.cm-variable-2 { color: #669199; }
.cm-s-lesser-dark span.cm-variable-3 { color: white; }
.cm-s-lesser-dark span.cm-property {color: #92A75C;}
.cm-s-lesser-dark span.cm-operator {color: #92A75C;}
.cm-s-lesser-dark span.cm-comment { color: #666; }
.cm-s-lesser-dark span.cm-string { color: #BCD279; }
.cm-s-lesser-dark span.cm-string-2 {color: #f50;}
.cm-s-lesser-dark span.cm-meta { color: #738C73; }
.cm-s-lesser-dark span.cm-qualifier {color: #555;}
.cm-s-lesser-dark span.cm-builtin { color: #ff9e59; }
.cm-s-lesser-dark span.cm-bracket { color: #EBEFE7; }
.cm-s-lesser-dark span.cm-tag { color: #669199; }
.cm-s-lesser-dark span.cm-attribute {color: #00c;}
.cm-s-lesser-dark span.cm-hr {color: #999;}
.cm-s-lesser-dark span.cm-link {color: #00c;}
.cm-s-lesser-dark span.cm-error { color: #9d1e15; }
.cm-s-lesser-dark .CodeMirror-activeline-background {background: #3C3A3A !important;}
.cm-s-lesser-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}

View File

@ -1,95 +0,0 @@
.cm-s-liquibyte.CodeMirror {
background-color: #000;
color: #fff;
line-height: 1.2em;
font-size: 1em;
}
.CodeMirror-focused .cm-matchhighlight {
text-decoration: underline;
text-decoration-color: #0f0;
text-decoration-style: wavy;
}
.cm-trailingspace {
text-decoration: line-through;
text-decoration-color: #f00;
text-decoration-style: dotted;
}
.cm-tab {
text-decoration: line-through;
text-decoration-color: #404040;
text-decoration-style: dotted;
}
.cm-s-liquibyte .CodeMirror-gutters { background-color: #262626; border-right: 1px solid #505050; padding-right: 0.8em; }
.cm-s-liquibyte .CodeMirror-gutter-elt div{ font-size: 1.2em; }
.cm-s-liquibyte .CodeMirror-guttermarker { }
.cm-s-liquibyte .CodeMirror-guttermarker-subtle { }
.cm-s-liquibyte .CodeMirror-linenumber { color: #606060; padding-left: 0;}
.cm-s-liquibyte .CodeMirror-cursor { border-left: 1px solid #eee !important; }
.cm-s-liquibyte span.cm-comment { color: #008000; }
.cm-s-liquibyte span.cm-def { color: #ffaf40; font-weight: bold; }
.cm-s-liquibyte span.cm-keyword { color: #c080ff; font-weight: bold; }
.cm-s-liquibyte span.cm-builtin { color: #ffaf40; font-weight: bold; }
.cm-s-liquibyte span.cm-variable { color: #5967ff; font-weight: bold; }
.cm-s-liquibyte span.cm-string { color: #ff8000; }
.cm-s-liquibyte span.cm-number { color: #0f0; font-weight: bold; }
.cm-s-liquibyte span.cm-atom { color: #bf3030; font-weight: bold; }
.cm-s-liquibyte span.cm-variable-2 { color: #007f7f; font-weight: bold; }
.cm-s-liquibyte span.cm-variable-3 { color: #c080ff; font-weight: bold; }
.cm-s-liquibyte span.cm-property { color: #999; font-weight: bold; }
.cm-s-liquibyte span.cm-operator { color: #fff; }
.cm-s-liquibyte span.cm-meta { color: #0f0; }
.cm-s-liquibyte span.cm-qualifier { color: #fff700; font-weight: bold; }
.cm-s-liquibyte span.cm-bracket { color: #cc7; }
.cm-s-liquibyte span.cm-tag { color: #ff0; font-weight: bold; }
.cm-s-liquibyte span.cm-attribute { color: #c080ff; font-weight: bold; }
.cm-s-liquibyte span.cm-error { color: #f00; }
.cm-s-liquibyte .CodeMirror-selected { background-color: rgba(255, 0, 0, 0.25) !important; }
.cm-s-liquibyte span.cm-compilation { background-color: rgba(255, 255, 255, 0.12); }
.cm-s-liquibyte .CodeMirror-activeline-background {background-color: rgba(0, 255, 0, 0.15) !important;}
/* Default styles for common addons */
div.CodeMirror span.CodeMirror-matchingbracket { color: #0f0; font-weight: bold; }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: #f00; font-weight: bold; }
.CodeMirror-matchingtag { background-color: rgba(150, 255, 0, .3); }
/* Scrollbars */
/* Simple */
div.CodeMirror-simplescroll-horizontal div:hover, div.CodeMirror-simplescroll-vertical div:hover {
background-color: rgba(80, 80, 80, .7);
}
div.CodeMirror-simplescroll-horizontal div, div.CodeMirror-simplescroll-vertical div {
background-color: rgba(80, 80, 80, .3);
border: 1px solid #404040;
border-radius: 5px;
}
div.CodeMirror-simplescroll-vertical div {
border-top: 1px solid #404040;
border-bottom: 1px solid #404040;
}
div.CodeMirror-simplescroll-horizontal div {
border-left: 1px solid #404040;
border-right: 1px solid #404040;
}
div.CodeMirror-simplescroll-vertical {
background-color: #262626;
}
div.CodeMirror-simplescroll-horizontal {
background-color: #262626;
border-top: 1px solid #404040;
}
/* Overlay */
div.CodeMirror-overlayscroll-horizontal div, div.CodeMirror-overlayscroll-vertical div {
background-color: #404040;
border-radius: 5px;
}
div.CodeMirror-overlayscroll-vertical div {
border: 1px solid #404040;
}
div.CodeMirror-overlayscroll-horizontal div {
border: 1px solid #404040;
}

View File

@ -1,37 +0,0 @@
/****************************************************************/
/* Based on mbonaci's Brackets mbo theme */
/* https://github.com/mbonaci/global/blob/master/Mbo.tmTheme */
/* Create your own: http://tmtheme-editor.herokuapp.com */
/****************************************************************/
.cm-s-mbo.CodeMirror {background: #2c2c2c; color: #ffffec;}
.cm-s-mbo div.CodeMirror-selected {background: #716C62 !important;}
.cm-s-mbo.CodeMirror ::selection { background: rgba(113, 108, 98, .99); }
.cm-s-mbo.CodeMirror ::-moz-selection { background: rgba(113, 108, 98, .99); }
.cm-s-mbo .CodeMirror-gutters {background: #4e4e4e; border-right: 0px;}
.cm-s-mbo .CodeMirror-guttermarker { color: white; }
.cm-s-mbo .CodeMirror-guttermarker-subtle { color: grey; }
.cm-s-mbo .CodeMirror-linenumber {color: #dadada;}
.cm-s-mbo .CodeMirror-cursor {border-left: 1px solid #ffffec !important;}
.cm-s-mbo span.cm-comment {color: #95958a;}
.cm-s-mbo span.cm-atom {color: #00a8c6;}
.cm-s-mbo span.cm-number {color: #00a8c6;}
.cm-s-mbo span.cm-property, .cm-s-mbo span.cm-attribute {color: #9ddfe9;}
.cm-s-mbo span.cm-keyword {color: #ffb928;}
.cm-s-mbo span.cm-string {color: #ffcf6c;}
.cm-s-mbo span.cm-string.cm-property {color: #ffffec;}
.cm-s-mbo span.cm-variable {color: #ffffec;}
.cm-s-mbo span.cm-variable-2 {color: #00a8c6;}
.cm-s-mbo span.cm-def {color: #ffffec;}
.cm-s-mbo span.cm-bracket {color: #fffffc; font-weight: bold;}
.cm-s-mbo span.cm-tag {color: #9ddfe9;}
.cm-s-mbo span.cm-link {color: #f54b07;}
.cm-s-mbo span.cm-error {border-bottom: #636363; color: #ffffec;}
.cm-s-mbo span.cm-qualifier {color: #ffffec;}
.cm-s-mbo .CodeMirror-activeline-background {background: #494b41 !important;}
.cm-s-mbo .CodeMirror-matchingbracket {color: #222 !important;}
.cm-s-mbo .CodeMirror-matchingtag {background: rgba(255, 255, 255, .37);}

View File

@ -1,46 +0,0 @@
/*
MDN-LIKE Theme - Mozilla
Ported to CodeMirror by Peter Kroon <plakroon@gmail.com>
Report bugs/issues here: https://github.com/codemirror/CodeMirror/issues
GitHub: @peterkroon
The mdn-like theme is inspired on the displayed code examples at: https://developer.mozilla.org/en-US/docs/Web/CSS/animation
*/
.cm-s-mdn-like.CodeMirror { color: #999; background-color: #fff; }
.cm-s-mdn-like .CodeMirror-selected { background: #cfc !important; }
.cm-s-mdn-like.CodeMirror ::selection { background: #cfc; }
.cm-s-mdn-like.CodeMirror ::-moz-selection { background: #cfc; }
.cm-s-mdn-like .CodeMirror-gutters { background: #f8f8f8; border-left: 6px solid rgba(0,83,159,0.65); color: #333; }
.cm-s-mdn-like .CodeMirror-linenumber { color: #aaa; padding-left: 8px; }
div.cm-s-mdn-like .CodeMirror-cursor { border-left: 2px solid #222; }
.cm-s-mdn-like .cm-keyword { color: #6262FF; }
.cm-s-mdn-like .cm-atom { color: #F90; }
.cm-s-mdn-like .cm-number { color: #ca7841; }
.cm-s-mdn-like .cm-def { color: #8DA6CE; }
.cm-s-mdn-like span.cm-variable-2, .cm-s-mdn-like span.cm-tag { color: #690; }
.cm-s-mdn-like span.cm-variable-3, .cm-s-mdn-like span.cm-def { color: #07a; }
.cm-s-mdn-like .cm-variable { color: #07a; }
.cm-s-mdn-like .cm-property { color: #905; }
.cm-s-mdn-like .cm-qualifier { color: #690; }
.cm-s-mdn-like .cm-operator { color: #cda869; }
.cm-s-mdn-like .cm-comment { color:#777; font-weight:normal; }
.cm-s-mdn-like .cm-string { color:#07a; font-style:italic; }
.cm-s-mdn-like .cm-string-2 { color:#bd6b18; } /*?*/
.cm-s-mdn-like .cm-meta { color: #000; } /*?*/
.cm-s-mdn-like .cm-builtin { color: #9B7536; } /*?*/
.cm-s-mdn-like .cm-tag { color: #997643; }
.cm-s-mdn-like .cm-attribute { color: #d6bb6d; } /*?*/
.cm-s-mdn-like .cm-header { color: #FF6400; }
.cm-s-mdn-like .cm-hr { color: #AEAEAE; }
.cm-s-mdn-like .cm-link { color:#ad9361; font-style:italic; text-decoration:none; }
.cm-s-mdn-like .cm-error { border-bottom: 1px solid red; }
div.cm-s-mdn-like .CodeMirror-activeline-background {background: #efefff;}
div.cm-s-mdn-like span.CodeMirror-matchingbracket {outline:1px solid grey; color: inherit;}
.cm-s-mdn-like.CodeMirror { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFcAAAAyCAYAAAAp8UeFAAAHvklEQVR42s2b63bcNgyEQZCSHCdt2vd/0tWF7I+Q6XgMXiTtuvU5Pl57ZQKkKHzEAOtF5KeIJBGJ8uvL599FRFREZhFx8DeXv8trn68RuGaC8TRfo3SNp9dlDDHedyLyTUTeRWStXKPZrjtpZxaRw5hPqozRs1N8/enzIiQRWcCgy4MUA0f+XWliDhyL8Lfyvx7ei/Ae3iQFHyw7U/59pQVIMEEPEz0G7XiwdRjzSfC3UTtz9vchIntxvry5iMgfIhJoEflOz2CQr3F5h/HfeFe+GTdLaKcu9L8LTeQb/R/7GgbsfKedyNdoHsN31uRPWrfZ5wsj/NzzRQHuToIdU3ahwnsKPxXCjJITuOsi7XLc7SG/v5GdALs7wf8JjTFiB5+QvTEfRyGOfX3Lrx8wxyQi3sNq46O7QahQiCsRFgqddjBouVEHOKDgXAQHD9gJCr5sMKkEdjwsarG/ww3BMHBU7OBjXnzdyY7SfCxf5/z6ATccrwlKuwC/jhznnPF4CgVzhhVf4xp2EixcBActO75iZ8/fM9zAs2OMzKdslgXWJ9XG8PQoOAMA5fGcsvORgv0doBXyHrCwfLJAOwo71QLNkb8n2Pl6EWiR7OCibtkPaz4Kc/0NNAze2gju3zOwekALDaCFPI5vjPFmgGY5AZqyGEvH1x7QfIb8YtxMnA/b+QQ0aQDAwc6JMFg8CbQZ4qoYEEHbRwNojuK3EHwd7VALSgq+MNDKzfT58T8qdpADrgW0GmgcAS1lhzztJmkAzcPNOQbsWEALBDSlMKUG0Eq4CLAQWvEVQ9WU57gZJwZtgPO3r9oBTQ9WO8TjqXINx8R0EYpiZEUWOF3FxkbJkgU9B2f41YBrIj5ZfsQa0M5kTgiAAqM3ShXLgu8XMqcrQBvJ0CL5pnTsfMB13oB8athpAq2XOQmcGmoACCLydx7nToa23ATaSIY2ichfOdPTGxlasXMLaL0MLZAOwAKIM+y8CmicobGdCcbbK9DzN+yYGVoNNI5iUKTMyYOjPse4A8SM1MmcXgU0toOq1yO/v8FOxlASyc7TgeYaAMBJHcY1CcCwGI/TK4AmDbDyKYBBtFUkRwto8gygiQEaByFgJ00BH2M8JWwQS1nafDXQCidWyOI8AcjDCSjCLk8ngObuAm3JAHAdubAmOaK06V8MNEsKPJOhobSprwQa6gD7DclRQdqcwL4zxqgBrQcabUiBLclRDKAlWp+etPkBaNMA0AKlrHwTdEByZAA4GM+SNluSY6wAzcMNewxmgig5Ks0nkrSpBvSaQHMdKTBAnLojOdYyGpQ254602ZILPdTD1hdlggdIm74jbTp8vDwF5ZYUeLWGJpWsh6XNyXgcYwVoJQTEhhTYkxzZjiU5npU2TaB979TQehlaAVq4kaGpiPwwwLkYUuBbQwocyQTv1tA0+1UFWoJF3iv1oq+qoSk8EQdJmwHkziIF7oOZk14EGitibAdjLYYK78H5vZOhtWpoI0ATGHs0Q8OMb4Ey+2bU2UYztCtA0wFAs7TplGLRVQCcqaFdGSPCeTI1QNIC52iWNzof6Uib7xjEp07mNNoUYmVosVItHrHzRlLgBn9LFyRHaQCtVUMbtTNhoXWiTOO9k/V8BdAc1Oq0ArSQs6/5SU0hckNy9NnXqQY0PGYo5dWJ7nINaN6o958FWin27aBaWRka1r5myvLOAm0j30eBJqCxHLReVclxhxOEN2JfDWjxBtAC7MIH1fVaGdoOp4qJYDgKtKPSFNID2gSnGldrCqkFZ+5UeQXQBIRrSwocbdZYQT/2LwRahBPBXoHrB8nxaGROST62DKUbQOMMzZIC9abkuELfQzQALWTnDNAm8KHWFOJgJ5+SHIvTPcmx1xQyZRhNL5Qci689aXMEaN/uNIWkEwDAvFpOZmgsBaaGnbs1NPa1Jm32gBZAIh1pCtG7TSH4aE0y1uVY4uqoFPisGlpP2rSA5qTecWn5agK6BzSpgAyD+wFaqhnYoSZ1Vwr8CmlTQbrcO3ZaX0NAEyMbYaAlyquFoLKK3SPby9CeVUPThrSJmkCAE0CrKUQadi4DrdSlWhmah0YL9z9vClH59YGbHx1J8VZTyAjQepJjmXwAKTDQI3omc3p1U4gDUf6RfcdYfrUp5ClAi2J3Ba6UOXGo+K+bQrjjssitG2SJzshaLwMtXgRagUNpYYoVkMSBLM+9GGiJZMvduG6DRZ4qc04DMPtQQxOjEtACmhO7K1AbNbQDEggZyJwscFpAGwENhoBeUwh3bWolhe8BTYVKxQEWrSUn/uhcM5KhvUu/+eQu0Lzhi+VrK0PrZZNDQKs9cpYUuFYgMVpD4/NxenJTiMCNqdUEUf1qZWjppLT5qSkkUZbCwkbZMSuVnu80hfSkzRbQeqCZSAh6huR4VtoM2gHAlLf72smuWgE+VV7XpE25Ab2WFDgyhnSuKbs4GuGzCjR+tIoUuMFg3kgcWKLTwRqanJQ2W00hAsenfaApRC42hbCvK1SlE0HtE9BGgneJO+ELamitD1YjjOYnNYVcraGhtKkW0EqVVeDx733I2NH581k1NNxNLG0i0IJ8/NjVaOZ0tYZ2Vtr0Xv7tPV3hkWp9EFkgS/J0vosngTaSoaG06WHi+xObQkaAdlbanP8B2+2l0f90LmUAAAAASUVORK5CYII=); }

View File

@ -1,47 +0,0 @@
/* Based on the theme at http://bonsaiden.github.com/JavaScript-Garden */
/*<!--match-->*/
.cm-s-midnight span.CodeMirror-matchhighlight { background: #494949; }
.cm-s-midnight.CodeMirror-focused span.CodeMirror-matchhighlight { background: #314D67 !important; }
/*<!--activeline-->*/
.cm-s-midnight .CodeMirror-activeline-background {background: #253540 !important;}
.cm-s-midnight.CodeMirror {
background: #0F192A;
color: #D1EDFF;
}
.cm-s-midnight.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
.cm-s-midnight div.CodeMirror-selected {background: #314D67 !important;}
.cm-s-midnight.CodeMirror ::selection { background: rgba(49, 77, 103, .99); }
.cm-s-midnight.CodeMirror ::-moz-selection { background: rgba(49, 77, 103, .99); }
.cm-s-midnight .CodeMirror-gutters {background: #0F192A; border-right: 1px solid;}
.cm-s-midnight .CodeMirror-guttermarker { color: white; }
.cm-s-midnight .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
.cm-s-midnight .CodeMirror-linenumber {color: #D0D0D0;}
.cm-s-midnight .CodeMirror-cursor {
border-left: 1px solid #F8F8F0 !important;
}
.cm-s-midnight span.cm-comment {color: #428BDD;}
.cm-s-midnight span.cm-atom {color: #AE81FF;}
.cm-s-midnight span.cm-number {color: #D1EDFF;}
.cm-s-midnight span.cm-property, .cm-s-midnight span.cm-attribute {color: #A6E22E;}
.cm-s-midnight span.cm-keyword {color: #E83737;}
.cm-s-midnight span.cm-string {color: #1DC116;}
.cm-s-midnight span.cm-variable {color: #FFAA3E;}
.cm-s-midnight span.cm-variable-2 {color: #FFAA3E;}
.cm-s-midnight span.cm-def {color: #4DD;}
.cm-s-midnight span.cm-bracket {color: #D1EDFF;}
.cm-s-midnight span.cm-tag {color: #449;}
.cm-s-midnight span.cm-link {color: #AE81FF;}
.cm-s-midnight span.cm-error {background: #F92672; color: #F8F8F0;}
.cm-s-midnight .CodeMirror-matchingbracket {
text-decoration: underline;
color: white !important;
}

View File

@ -1,35 +0,0 @@
/* Based on Sublime Text's Monokai theme */
.cm-s-monokai.CodeMirror {background: #272822; color: #f8f8f2;}
.cm-s-monokai div.CodeMirror-selected {background: #49483E !important;}
.cm-s-monokai.CodeMirror ::selection { background: rgba(73, 72, 62, .99); }
.cm-s-monokai.CodeMirror ::-moz-selection { background: rgba(73, 72, 62, .99); }
.cm-s-monokai .CodeMirror-gutters {background: #272822; border-right: 0px;}
.cm-s-monokai .CodeMirror-guttermarker { color: white; }
.cm-s-monokai .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
.cm-s-monokai .CodeMirror-linenumber {color: #d0d0d0;}
.cm-s-monokai .CodeMirror-cursor {border-left: 1px solid #f8f8f0 !important;}
.cm-s-monokai span.cm-comment {color: #75715e;}
.cm-s-monokai span.cm-atom {color: #ae81ff;}
.cm-s-monokai span.cm-number {color: #ae81ff;}
.cm-s-monokai span.cm-property, .cm-s-monokai span.cm-attribute {color: #a6e22e;}
.cm-s-monokai span.cm-keyword {color: #f92672;}
.cm-s-monokai span.cm-string {color: #e6db74;}
.cm-s-monokai span.cm-variable {color: #f8f8f2;}
.cm-s-monokai span.cm-variable-2 {color: #9effff;}
.cm-s-monokai span.cm-variable-3 {color: #66d9ef;}
.cm-s-monokai span.cm-def {color: #fd971f;}
.cm-s-monokai span.cm-bracket {color: #f8f8f2;}
.cm-s-monokai span.cm-tag {color: #f92672;}
.cm-s-monokai span.cm-header {color: #ae81ff;}
.cm-s-monokai span.cm-link {color: #ae81ff;}
.cm-s-monokai span.cm-error {background: #f92672; color: #f8f8f0;}
.cm-s-monokai .CodeMirror-activeline-background {background: #373831 !important;}
.cm-s-monokai .CodeMirror-matchingbracket {
text-decoration: underline;
color: white !important;
}

View File

@ -1,12 +0,0 @@
.cm-s-neat span.cm-comment { color: #a86; }
.cm-s-neat span.cm-keyword { line-height: 1em; font-weight: bold; color: blue; }
.cm-s-neat span.cm-string { color: #a22; }
.cm-s-neat span.cm-builtin { line-height: 1em; font-weight: bold; color: #077; }
.cm-s-neat span.cm-special { line-height: 1em; font-weight: bold; color: #0aa; }
.cm-s-neat span.cm-variable { color: black; }
.cm-s-neat span.cm-number, .cm-s-neat span.cm-atom { color: #3a3; }
.cm-s-neat span.cm-meta {color: #555;}
.cm-s-neat span.cm-link { color: #3a3; }
.cm-s-neat .CodeMirror-activeline-background {background: #e8f2ff !important;}
.cm-s-neat .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;}

View File

@ -1,43 +0,0 @@
/* neo theme for codemirror */
/* Color scheme */
.cm-s-neo.CodeMirror {
background-color:#ffffff;
color:#2e383c;
line-height:1.4375;
}
.cm-s-neo .cm-comment {color:#75787b}
.cm-s-neo .cm-keyword, .cm-s-neo .cm-property {color:#1d75b3}
.cm-s-neo .cm-atom,.cm-s-neo .cm-number {color:#75438a}
.cm-s-neo .cm-node,.cm-s-neo .cm-tag {color:#9c3328}
.cm-s-neo .cm-string {color:#b35e14}
.cm-s-neo .cm-variable,.cm-s-neo .cm-qualifier {color:#047d65}
/* Editor styling */
.cm-s-neo pre {
padding:0;
}
.cm-s-neo .CodeMirror-gutters {
border:none;
border-right:10px solid transparent;
background-color:transparent;
}
.cm-s-neo .CodeMirror-linenumber {
padding:0;
color:#e0e2e5;
}
.cm-s-neo .CodeMirror-guttermarker { color: #1d75b3; }
.cm-s-neo .CodeMirror-guttermarker-subtle { color: #e0e2e5; }
.cm-s-neo div.CodeMirror-cursor {
width: auto;
border: 0;
background: rgba(155,157,162,0.37);
z-index: 1;
}

View File

@ -1,28 +0,0 @@
/* Loosely based on the Midnight Textmate theme */
.cm-s-night.CodeMirror { background: #0a001f; color: #f8f8f8; }
.cm-s-night div.CodeMirror-selected { background: #447 !important; }
.cm-s-night.CodeMirror ::selection { background: rgba(68, 68, 119, .99); }
.cm-s-night.CodeMirror ::-moz-selection { background: rgba(68, 68, 119, .99); }
.cm-s-night .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
.cm-s-night .CodeMirror-guttermarker { color: white; }
.cm-s-night .CodeMirror-guttermarker-subtle { color: #bbb; }
.cm-s-night .CodeMirror-linenumber { color: #f8f8f8; }
.cm-s-night .CodeMirror-cursor { border-left: 1px solid white !important; }
.cm-s-night span.cm-comment { color: #6900a1; }
.cm-s-night span.cm-atom { color: #845dc4; }
.cm-s-night span.cm-number, .cm-s-night span.cm-attribute { color: #ffd500; }
.cm-s-night span.cm-keyword { color: #599eff; }
.cm-s-night span.cm-string { color: #37f14a; }
.cm-s-night span.cm-meta { color: #7678e2; }
.cm-s-night span.cm-variable-2, .cm-s-night span.cm-tag { color: #99b2ff; }
.cm-s-night span.cm-variable-3, .cm-s-night span.cm-def { color: white; }
.cm-s-night span.cm-bracket { color: #8da6ce; }
.cm-s-night span.cm-comment { color: #6900a1; }
.cm-s-night span.cm-builtin, .cm-s-night span.cm-special { color: #ff9e59; }
.cm-s-night span.cm-link { color: #845dc4; }
.cm-s-night span.cm-error { color: #9d1e15; }
.cm-s-night .CodeMirror-activeline-background {background: #1C005A !important;}
.cm-s-night .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}

View File

@ -1,38 +0,0 @@
/*
Name: Paraíso (Dark)
Author: Jan T. Sott
Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror)
Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
*/
.cm-s-paraiso-dark.CodeMirror {background: #2f1e2e; color: #b9b6b0;}
.cm-s-paraiso-dark div.CodeMirror-selected {background: #41323f !important;}
.cm-s-paraiso-dark.CodeMirror ::selection { background: rgba(65, 50, 63, .99); }
.cm-s-paraiso-dark.CodeMirror ::-moz-selection { background: rgba(65, 50, 63, .99); }
.cm-s-paraiso-dark .CodeMirror-gutters {background: #2f1e2e; border-right: 0px;}
.cm-s-paraiso-dark .CodeMirror-guttermarker { color: #ef6155; }
.cm-s-paraiso-dark .CodeMirror-guttermarker-subtle { color: #776e71; }
.cm-s-paraiso-dark .CodeMirror-linenumber {color: #776e71;}
.cm-s-paraiso-dark .CodeMirror-cursor {border-left: 1px solid #8d8687 !important;}
.cm-s-paraiso-dark span.cm-comment {color: #e96ba8;}
.cm-s-paraiso-dark span.cm-atom {color: #815ba4;}
.cm-s-paraiso-dark span.cm-number {color: #815ba4;}
.cm-s-paraiso-dark span.cm-property, .cm-s-paraiso-dark span.cm-attribute {color: #48b685;}
.cm-s-paraiso-dark span.cm-keyword {color: #ef6155;}
.cm-s-paraiso-dark span.cm-string {color: #fec418;}
.cm-s-paraiso-dark span.cm-variable {color: #48b685;}
.cm-s-paraiso-dark span.cm-variable-2 {color: #06b6ef;}
.cm-s-paraiso-dark span.cm-def {color: #f99b15;}
.cm-s-paraiso-dark span.cm-bracket {color: #b9b6b0;}
.cm-s-paraiso-dark span.cm-tag {color: #ef6155;}
.cm-s-paraiso-dark span.cm-link {color: #815ba4;}
.cm-s-paraiso-dark span.cm-error {background: #ef6155; color: #8d8687;}
.cm-s-paraiso-dark .CodeMirror-activeline-background {background: #4D344A !important;}
.cm-s-paraiso-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}

View File

@ -1,38 +0,0 @@
/*
Name: Paraíso (Light)
Author: Jan T. Sott
Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror)
Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
*/
.cm-s-paraiso-light.CodeMirror {background: #e7e9db; color: #41323f;}
.cm-s-paraiso-light div.CodeMirror-selected {background: #b9b6b0 !important;}
.cm-s-paraiso-light.CodeMirror ::selection { background: #b9b6b0; }
.cm-s-paraiso-light.CodeMirror ::-moz-selection { background: #b9b6b0; }
.cm-s-paraiso-light .CodeMirror-gutters {background: #e7e9db; border-right: 0px;}
.cm-s-paraiso-light .CodeMirror-guttermarker { color: black; }
.cm-s-paraiso-light .CodeMirror-guttermarker-subtle { color: #8d8687; }
.cm-s-paraiso-light .CodeMirror-linenumber {color: #8d8687;}
.cm-s-paraiso-light .CodeMirror-cursor {border-left: 1px solid #776e71 !important;}
.cm-s-paraiso-light span.cm-comment {color: #e96ba8;}
.cm-s-paraiso-light span.cm-atom {color: #815ba4;}
.cm-s-paraiso-light span.cm-number {color: #815ba4;}
.cm-s-paraiso-light span.cm-property, .cm-s-paraiso-light span.cm-attribute {color: #48b685;}
.cm-s-paraiso-light span.cm-keyword {color: #ef6155;}
.cm-s-paraiso-light span.cm-string {color: #fec418;}
.cm-s-paraiso-light span.cm-variable {color: #48b685;}
.cm-s-paraiso-light span.cm-variable-2 {color: #06b6ef;}
.cm-s-paraiso-light span.cm-def {color: #f99b15;}
.cm-s-paraiso-light span.cm-bracket {color: #41323f;}
.cm-s-paraiso-light span.cm-tag {color: #ef6155;}
.cm-s-paraiso-light span.cm-link {color: #815ba4;}
.cm-s-paraiso-light span.cm-error {background: #ef6155; color: #776e71;}
.cm-s-paraiso-light .CodeMirror-activeline-background {background: #CFD1C4 !important;}
.cm-s-paraiso-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}

View File

@ -1,53 +0,0 @@
/**
* Pastel On Dark theme ported from ACE editor
* @license MIT
* @copyright AtomicPages LLC 2014
* @author Dennis Thompson, AtomicPages LLC
* @version 1.1
* @source https://github.com/atomicpages/codemirror-pastel-on-dark-theme
*/
.cm-s-pastel-on-dark.CodeMirror {
background: #2c2827;
color: #8F938F;
line-height: 1.5;
font-size: 14px;
}
.cm-s-pastel-on-dark div.CodeMirror-selected { background: rgba(221,240,255,0.2) !important; }
.cm-s-pastel-on-dark.CodeMirror ::selection { background: rgba(221,240,255,0.2); }
.cm-s-pastel-on-dark.CodeMirror ::-moz-selection { background: rgba(221,240,255,0.2); }
.cm-s-pastel-on-dark .CodeMirror-gutters {
background: #34302f;
border-right: 0px;
padding: 0 3px;
}
.cm-s-pastel-on-dark .CodeMirror-guttermarker { color: white; }
.cm-s-pastel-on-dark .CodeMirror-guttermarker-subtle { color: #8F938F; }
.cm-s-pastel-on-dark .CodeMirror-linenumber { color: #8F938F; }
.cm-s-pastel-on-dark .CodeMirror-cursor { border-left: 1px solid #A7A7A7 !important; }
.cm-s-pastel-on-dark span.cm-comment { color: #A6C6FF; }
.cm-s-pastel-on-dark span.cm-atom { color: #DE8E30; }
.cm-s-pastel-on-dark span.cm-number { color: #CCCCCC; }
.cm-s-pastel-on-dark span.cm-property { color: #8F938F; }
.cm-s-pastel-on-dark span.cm-attribute { color: #a6e22e; }
.cm-s-pastel-on-dark span.cm-keyword { color: #AEB2F8; }
.cm-s-pastel-on-dark span.cm-string { color: #66A968; }
.cm-s-pastel-on-dark span.cm-variable { color: #AEB2F8; }
.cm-s-pastel-on-dark span.cm-variable-2 { color: #BEBF55; }
.cm-s-pastel-on-dark span.cm-variable-3 { color: #DE8E30; }
.cm-s-pastel-on-dark span.cm-def { color: #757aD8; }
.cm-s-pastel-on-dark span.cm-bracket { color: #f8f8f2; }
.cm-s-pastel-on-dark span.cm-tag { color: #C1C144; }
.cm-s-pastel-on-dark span.cm-link { color: #ae81ff; }
.cm-s-pastel-on-dark span.cm-qualifier,.cm-s-pastel-on-dark span.cm-builtin { color: #C1C144; }
.cm-s-pastel-on-dark span.cm-error {
background: #757aD8;
color: #f8f8f0;
}
.cm-s-pastel-on-dark .CodeMirror-activeline-background { background: rgba(255, 255, 255, 0.031) !important; }
.cm-s-pastel-on-dark .CodeMirror-matchingbracket {
border: 1px solid rgba(255,255,255,0.25);
color: #8F938F !important;
margin: -1px -1px 0 -1px;
}

View File

@ -1,25 +0,0 @@
.cm-s-rubyblue.CodeMirror { background: #112435; color: white; }
.cm-s-rubyblue div.CodeMirror-selected { background: #38566F !important; }
.cm-s-rubyblue.CodeMirror ::selection { background: rgba(56, 86, 111, 0.99); }
.cm-s-rubyblue.CodeMirror ::-moz-selection { background: rgba(56, 86, 111, 0.99); }
.cm-s-rubyblue .CodeMirror-gutters { background: #1F4661; border-right: 7px solid #3E7087; }
.cm-s-rubyblue .CodeMirror-guttermarker { color: white; }
.cm-s-rubyblue .CodeMirror-guttermarker-subtle { color: #3E7087; }
.cm-s-rubyblue .CodeMirror-linenumber { color: white; }
.cm-s-rubyblue .CodeMirror-cursor { border-left: 1px solid white !important; }
.cm-s-rubyblue span.cm-comment { color: #999; font-style:italic; line-height: 1em; }
.cm-s-rubyblue span.cm-atom { color: #F4C20B; }
.cm-s-rubyblue span.cm-number, .cm-s-rubyblue span.cm-attribute { color: #82C6E0; }
.cm-s-rubyblue span.cm-keyword { color: #F0F; }
.cm-s-rubyblue span.cm-string { color: #F08047; }
.cm-s-rubyblue span.cm-meta { color: #F0F; }
.cm-s-rubyblue span.cm-variable-2, .cm-s-rubyblue span.cm-tag { color: #7BD827; }
.cm-s-rubyblue span.cm-variable-3, .cm-s-rubyblue span.cm-def { color: white; }
.cm-s-rubyblue span.cm-bracket { color: #F0F; }
.cm-s-rubyblue span.cm-link { color: #F4C20B; }
.cm-s-rubyblue span.CodeMirror-matchingbracket { color:#F0F !important; }
.cm-s-rubyblue span.cm-builtin, .cm-s-rubyblue span.cm-special { color: #FF9D00; }
.cm-s-rubyblue span.cm-error { color: #AF2018; }
.cm-s-rubyblue .CodeMirror-activeline-background {background: #173047 !important;}

View File

@ -1,165 +0,0 @@
/*
Solarized theme for code-mirror
http://ethanschoonover.com/solarized
*/
/*
Solarized color pallet
http://ethanschoonover.com/solarized/img/solarized-palette.png
*/
.solarized.base03 { color: #002b36; }
.solarized.base02 { color: #073642; }
.solarized.base01 { color: #586e75; }
.solarized.base00 { color: #657b83; }
.solarized.base0 { color: #839496; }
.solarized.base1 { color: #93a1a1; }
.solarized.base2 { color: #eee8d5; }
.solarized.base3 { color: #fdf6e3; }
.solarized.solar-yellow { color: #b58900; }
.solarized.solar-orange { color: #cb4b16; }
.solarized.solar-red { color: #dc322f; }
.solarized.solar-magenta { color: #d33682; }
.solarized.solar-violet { color: #6c71c4; }
.solarized.solar-blue { color: #268bd2; }
.solarized.solar-cyan { color: #2aa198; }
.solarized.solar-green { color: #859900; }
/* Color scheme for code-mirror */
.cm-s-solarized {
line-height: 1.45em;
color-profile: sRGB;
rendering-intent: auto;
}
.cm-s-solarized.cm-s-dark {
color: #839496;
background-color: #002b36;
text-shadow: #002b36 0 1px;
}
.cm-s-solarized.cm-s-light {
background-color: #fdf6e3;
color: #657b83;
text-shadow: #eee8d5 0 1px;
}
.cm-s-solarized .CodeMirror-widget {
text-shadow: none;
}
.cm-s-solarized .cm-header { color: #586e75; }
.cm-s-solarized .cm-quote { color: #93a1a1; }
.cm-s-solarized .cm-keyword { color: #cb4b16 }
.cm-s-solarized .cm-atom { color: #d33682; }
.cm-s-solarized .cm-number { color: #d33682; }
.cm-s-solarized .cm-def { color: #2aa198; }
.cm-s-solarized .cm-variable { color: #839496; }
.cm-s-solarized .cm-variable-2 { color: #b58900; }
.cm-s-solarized .cm-variable-3 { color: #6c71c4; }
.cm-s-solarized .cm-property { color: #2aa198; }
.cm-s-solarized .cm-operator {color: #6c71c4;}
.cm-s-solarized .cm-comment { color: #586e75; font-style:italic; }
.cm-s-solarized .cm-string { color: #859900; }
.cm-s-solarized .cm-string-2 { color: #b58900; }
.cm-s-solarized .cm-meta { color: #859900; }
.cm-s-solarized .cm-qualifier { color: #b58900; }
.cm-s-solarized .cm-builtin { color: #d33682; }
.cm-s-solarized .cm-bracket { color: #cb4b16; }
.cm-s-solarized .CodeMirror-matchingbracket { color: #859900; }
.cm-s-solarized .CodeMirror-nonmatchingbracket { color: #dc322f; }
.cm-s-solarized .cm-tag { color: #93a1a1 }
.cm-s-solarized .cm-attribute { color: #2aa198; }
.cm-s-solarized .cm-hr {
color: transparent;
border-top: 1px solid #586e75;
display: block;
}
.cm-s-solarized .cm-link { color: #93a1a1; cursor: pointer; }
.cm-s-solarized .cm-special { color: #6c71c4; }
.cm-s-solarized .cm-em {
color: #999;
text-decoration: underline;
text-decoration-style: dotted;
}
.cm-s-solarized .cm-strong { color: #eee; }
.cm-s-solarized .cm-error,
.cm-s-solarized .cm-invalidchar {
color: #586e75;
border-bottom: 1px dotted #dc322f;
}
.cm-s-solarized.cm-s-dark .CodeMirror-selected { background: #073642; }
.cm-s-solarized.cm-s-dark.CodeMirror ::selection { background: rgba(7, 54, 66, 0.99); }
.cm-s-solarized.cm-s-dark.CodeMirror ::-moz-selection { background: rgba(7, 54, 66, 0.99); }
.cm-s-solarized.cm-s-light .CodeMirror-selected { background: #eee8d5; }
.cm-s-solarized.cm-s-light.CodeMirror ::selection { background: #eee8d5; }
.cm-s-solarized.cm-s-lightCodeMirror ::-moz-selection { background: #eee8d5; }
/* Editor styling */
/* Little shadow on the view-port of the buffer view */
.cm-s-solarized.CodeMirror {
-moz-box-shadow: inset 7px 0 12px -6px #000;
-webkit-box-shadow: inset 7px 0 12px -6px #000;
box-shadow: inset 7px 0 12px -6px #000;
}
/* Gutter border and some shadow from it */
.cm-s-solarized .CodeMirror-gutters {
border-right: 1px solid;
}
/* Gutter colors and line number styling based of color scheme (dark / light) */
/* Dark */
.cm-s-solarized.cm-s-dark .CodeMirror-gutters {
background-color: #002b36;
border-color: #00232c;
}
.cm-s-solarized.cm-s-dark .CodeMirror-linenumber {
text-shadow: #021014 0 -1px;
}
/* Light */
.cm-s-solarized.cm-s-light .CodeMirror-gutters {
background-color: #fdf6e3;
border-color: #eee8d5;
}
/* Common */
.cm-s-solarized .CodeMirror-linenumber {
color: #586e75;
padding: 0 5px;
}
.cm-s-solarized .CodeMirror-guttermarker-subtle { color: #586e75; }
.cm-s-solarized.cm-s-dark .CodeMirror-guttermarker { color: #ddd; }
.cm-s-solarized.cm-s-light .CodeMirror-guttermarker { color: #cb4b16; }
.cm-s-solarized .CodeMirror-gutter .CodeMirror-gutter-text {
color: #586e75;
}
.cm-s-solarized .CodeMirror-lines .CodeMirror-cursor {
border-left: 1px solid #819090;
}
/*
Active line. Negative margin compensates left padding of the text in the
view-port
*/
.cm-s-solarized.cm-s-dark .CodeMirror-activeline-background {
background: rgba(255, 255, 255, 0.10);
}
.cm-s-solarized.cm-s-light .CodeMirror-activeline-background {
background: rgba(0, 0, 0, 0.10);
}

View File

@ -1,30 +0,0 @@
.cm-s-the-matrix.CodeMirror { background: #000000; color: #00FF00; }
.cm-s-the-matrix div.CodeMirror-selected { background: #2D2D2D !important; }
.cm-s-the-matrix.CodeMirror ::selection { background: rgba(45, 45, 45, 0.99); }
.cm-s-the-matrix.CodeMirror ::-moz-selection { background: rgba(45, 45, 45, 0.99); }
.cm-s-the-matrix .CodeMirror-gutters { background: #060; border-right: 2px solid #00FF00; }
.cm-s-the-matrix .CodeMirror-guttermarker { color: #0f0; }
.cm-s-the-matrix .CodeMirror-guttermarker-subtle { color: white; }
.cm-s-the-matrix .CodeMirror-linenumber { color: #FFFFFF; }
.cm-s-the-matrix .CodeMirror-cursor { border-left: 1px solid #00FF00 !important; }
.cm-s-the-matrix span.cm-keyword {color: #008803; font-weight: bold;}
.cm-s-the-matrix span.cm-atom {color: #3FF;}
.cm-s-the-matrix span.cm-number {color: #FFB94F;}
.cm-s-the-matrix span.cm-def {color: #99C;}
.cm-s-the-matrix span.cm-variable {color: #F6C;}
.cm-s-the-matrix span.cm-variable-2 {color: #C6F;}
.cm-s-the-matrix span.cm-variable-3 {color: #96F;}
.cm-s-the-matrix span.cm-property {color: #62FFA0;}
.cm-s-the-matrix span.cm-operator {color: #999}
.cm-s-the-matrix span.cm-comment {color: #CCCCCC;}
.cm-s-the-matrix span.cm-string {color: #39C;}
.cm-s-the-matrix span.cm-meta {color: #C9F;}
.cm-s-the-matrix span.cm-qualifier {color: #FFF700;}
.cm-s-the-matrix span.cm-builtin {color: #30a;}
.cm-s-the-matrix span.cm-bracket {color: #cc7;}
.cm-s-the-matrix span.cm-tag {color: #FFBD40;}
.cm-s-the-matrix span.cm-attribute {color: #FFF700;}
.cm-s-the-matrix span.cm-error {color: #FF0000;}
.cm-s-the-matrix .CodeMirror-activeline-background {background: #040;}

View File

@ -1,35 +0,0 @@
/*
Name: Tomorrow Night - Bright
Author: Chris Kempson
Port done by Gerard Braad <me@gbraad.nl>
*/
.cm-s-tomorrow-night-bright.CodeMirror {background: #000000; color: #eaeaea;}
.cm-s-tomorrow-night-bright div.CodeMirror-selected {background: #424242 !important;}
.cm-s-tomorrow-night-bright .CodeMirror-gutters {background: #000000; border-right: 0px;}
.cm-s-tomorrow-night-bright .CodeMirror-guttermarker { color: #e78c45; }
.cm-s-tomorrow-night-bright .CodeMirror-guttermarker-subtle { color: #777; }
.cm-s-tomorrow-night-bright .CodeMirror-linenumber {color: #424242;}
.cm-s-tomorrow-night-bright .CodeMirror-cursor {border-left: 1px solid #6A6A6A !important;}
.cm-s-tomorrow-night-bright span.cm-comment {color: #d27b53;}
.cm-s-tomorrow-night-bright span.cm-atom {color: #a16a94;}
.cm-s-tomorrow-night-bright span.cm-number {color: #a16a94;}
.cm-s-tomorrow-night-bright span.cm-property, .cm-s-tomorrow-night-bright span.cm-attribute {color: #99cc99;}
.cm-s-tomorrow-night-bright span.cm-keyword {color: #d54e53;}
.cm-s-tomorrow-night-bright span.cm-string {color: #e7c547;}
.cm-s-tomorrow-night-bright span.cm-variable {color: #b9ca4a;}
.cm-s-tomorrow-night-bright span.cm-variable-2 {color: #7aa6da;}
.cm-s-tomorrow-night-bright span.cm-def {color: #e78c45;}
.cm-s-tomorrow-night-bright span.cm-bracket {color: #eaeaea;}
.cm-s-tomorrow-night-bright span.cm-tag {color: #d54e53;}
.cm-s-tomorrow-night-bright span.cm-link {color: #a16a94;}
.cm-s-tomorrow-night-bright span.cm-error {background: #d54e53; color: #6A6A6A;}
.cm-s-tomorrow-night-bright .CodeMirror-activeline-background {background: #2a2a2a !important;}
.cm-s-tomorrow-night-bright .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}

View File

@ -1,38 +0,0 @@
/*
Name: Tomorrow Night - Eighties
Author: Chris Kempson
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
*/
.cm-s-tomorrow-night-eighties.CodeMirror {background: #000000; color: #CCCCCC;}
.cm-s-tomorrow-night-eighties div.CodeMirror-selected {background: #2D2D2D !important;}
.cm-s-tomorrow-night-eighties.CodeMirror ::selection { background: rgba(45, 45, 45, 0.99); }
.cm-s-tomorrow-night-eighties.CodeMirror ::-moz-selection { background: rgba(45, 45, 45, 0.99); }
.cm-s-tomorrow-night-eighties .CodeMirror-gutters {background: #000000; border-right: 0px;}
.cm-s-tomorrow-night-eighties .CodeMirror-guttermarker { color: #f2777a; }
.cm-s-tomorrow-night-eighties .CodeMirror-guttermarker-subtle { color: #777; }
.cm-s-tomorrow-night-eighties .CodeMirror-linenumber {color: #515151;}
.cm-s-tomorrow-night-eighties .CodeMirror-cursor {border-left: 1px solid #6A6A6A !important;}
.cm-s-tomorrow-night-eighties span.cm-comment {color: #d27b53;}
.cm-s-tomorrow-night-eighties span.cm-atom {color: #a16a94;}
.cm-s-tomorrow-night-eighties span.cm-number {color: #a16a94;}
.cm-s-tomorrow-night-eighties span.cm-property, .cm-s-tomorrow-night-eighties span.cm-attribute {color: #99cc99;}
.cm-s-tomorrow-night-eighties span.cm-keyword {color: #f2777a;}
.cm-s-tomorrow-night-eighties span.cm-string {color: #ffcc66;}
.cm-s-tomorrow-night-eighties span.cm-variable {color: #99cc99;}
.cm-s-tomorrow-night-eighties span.cm-variable-2 {color: #6699cc;}
.cm-s-tomorrow-night-eighties span.cm-def {color: #f99157;}
.cm-s-tomorrow-night-eighties span.cm-bracket {color: #CCCCCC;}
.cm-s-tomorrow-night-eighties span.cm-tag {color: #f2777a;}
.cm-s-tomorrow-night-eighties span.cm-link {color: #a16a94;}
.cm-s-tomorrow-night-eighties span.cm-error {background: #f2777a; color: #6A6A6A;}
.cm-s-tomorrow-night-eighties .CodeMirror-activeline-background {background: #343600 !important;}
.cm-s-tomorrow-night-eighties .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}

View File

@ -1,65 +0,0 @@
.cm-quote {color: #090;}
.cm-negative {color: #d44;}
.cm-positive {color: #292;}
.cm-header, .cm-strong {font-weight: bold;}
.cm-em {font-style: italic;}
.cm-link {text-decoration: underline;}
.cm-strikethrough {text-decoration: line-through;}
.cm-header {color: #00f; font-weight: bold;}
.cm-atom {color: #219;}
.cm-attribute {color: #00c;}
.cm-bracket {color: #997;}
.cm-comment {color: #333333;}
.cm-def {color: #00f;}
.cm-em {font-style: italic;}
.cm-error {color: #f00;}
.cm-hr {color: #999;}
.cm-invalidchar {color: #f00;}
.cm-keyword {font-weight:bold}
.cm-link {color: #00c; text-decoration: underline;}
.cm-meta {color: #555;}
.cm-negative {color: #d44;}
.cm-positive {color: #292;}
.cm-qualifier {color: #555;}
.cm-strikethrough {text-decoration: line-through;}
.cm-string {color: #006400;}
.cm-string-2 {color: #f50;}
.cm-strong {font-weight: bold;}
.cm-tag {color: #170;}
.cm-variable {color: #8B2252;}
.cm-variable-2 {color: #05a;}
.cm-variable-3 {color: #085;}
.cm-s-default .cm-error {color: #f00;}
.cm-invalidchar {color: #f00;}
/* ASN */
.cm-s-ttcn .cm-accessTypes,
.cm-s-ttcn .cm-compareTypes {color: #27408B}
.cm-s-ttcn .cm-cmipVerbs {color: #8B2252}
.cm-s-ttcn .cm-modifier {color:#D2691E}
.cm-s-ttcn .cm-status {color:#8B4545}
.cm-s-ttcn .cm-storage {color:#A020F0}
.cm-s-ttcn .cm-tags {color:#006400}
/* CFG */
.cm-s-ttcn .cm-externalCommands {color: #8B4545; font-weight:bold}
.cm-s-ttcn .cm-fileNCtrlMaskOptions,
.cm-s-ttcn .cm-sectionTitle {color: #2E8B57; font-weight:bold}
/* TTCN */
.cm-s-ttcn .cm-booleanConsts,
.cm-s-ttcn .cm-otherConsts,
.cm-s-ttcn .cm-verdictConsts {color: #006400}
.cm-s-ttcn .cm-configOps,
.cm-s-ttcn .cm-functionOps,
.cm-s-ttcn .cm-portOps,
.cm-s-ttcn .cm-sutOps,
.cm-s-ttcn .cm-timerOps,
.cm-s-ttcn .cm-verdictOps {color: #0000FF}
.cm-s-ttcn .cm-preprocessor,
.cm-s-ttcn .cm-templateMatch,
.cm-s-ttcn .cm-ttcn3Macros {color: #27408B}
.cm-s-ttcn .cm-types {color: #A52A2A; font-weight:bold}
.cm-s-ttcn .cm-visibilityModifiers {font-weight:bold}

View File

@ -1,32 +0,0 @@
.cm-s-twilight.CodeMirror { background: #141414; color: #f7f7f7; } /**/
.cm-s-twilight .CodeMirror-selected { background: #323232 !important; } /**/
.cm-s-twilight.CodeMirror ::selection { background: rgba(50, 50, 50, 0.99); }
.cm-s-twilight.CodeMirror ::-moz-selection { background: rgba(50, 50, 50, 0.99); }
.cm-s-twilight .CodeMirror-gutters { background: #222; border-right: 1px solid #aaa; }
.cm-s-twilight .CodeMirror-guttermarker { color: white; }
.cm-s-twilight .CodeMirror-guttermarker-subtle { color: #aaa; }
.cm-s-twilight .CodeMirror-linenumber { color: #aaa; }
.cm-s-twilight .CodeMirror-cursor { border-left: 1px solid white !important; }
.cm-s-twilight .cm-keyword { color: #f9ee98; } /**/
.cm-s-twilight .cm-atom { color: #FC0; }
.cm-s-twilight .cm-number { color: #ca7841; } /**/
.cm-s-twilight .cm-def { color: #8DA6CE; }
.cm-s-twilight span.cm-variable-2, .cm-s-twilight span.cm-tag { color: #607392; } /**/
.cm-s-twilight span.cm-variable-3, .cm-s-twilight span.cm-def { color: #607392; } /**/
.cm-s-twilight .cm-operator { color: #cda869; } /**/
.cm-s-twilight .cm-comment { color:#777; font-style:italic; font-weight:normal; } /**/
.cm-s-twilight .cm-string { color:#8f9d6a; font-style:italic; } /**/
.cm-s-twilight .cm-string-2 { color:#bd6b18 } /*?*/
.cm-s-twilight .cm-meta { background-color:#141414; color:#f7f7f7; } /*?*/
.cm-s-twilight .cm-builtin { color: #cda869; } /*?*/
.cm-s-twilight .cm-tag { color: #997643; } /**/
.cm-s-twilight .cm-attribute { color: #d6bb6d; } /*?*/
.cm-s-twilight .cm-header { color: #FF6400; }
.cm-s-twilight .cm-hr { color: #AEAEAE; }
.cm-s-twilight .cm-link { color:#ad9361; font-style:italic; text-decoration:none; } /**/
.cm-s-twilight .cm-error { border-bottom: 1px solid red; }
.cm-s-twilight .CodeMirror-activeline-background {background: #27282E !important;}
.cm-s-twilight .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}

View File

@ -1,34 +0,0 @@
/* Taken from the popular Visual Studio Vibrant Ink Schema */
.cm-s-vibrant-ink.CodeMirror { background: black; color: white; }
.cm-s-vibrant-ink .CodeMirror-selected { background: #35493c !important; }
.cm-s-vibrant-ink.CodeMirror ::selection { background: rgba(53, 73, 60, 0.99); }
.cm-s-vibrant-ink.CodeMirror ::-moz-selection { background: rgba(53, 73, 60, 0.99); }
.cm-s-vibrant-ink .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
.cm-s-vibrant-ink .CodeMirror-guttermarker { color: white; }
.cm-s-vibrant-ink .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
.cm-s-vibrant-ink .CodeMirror-linenumber { color: #d0d0d0; }
.cm-s-vibrant-ink .CodeMirror-cursor { border-left: 1px solid white !important; }
.cm-s-vibrant-ink .cm-keyword { color: #CC7832; }
.cm-s-vibrant-ink .cm-atom { color: #FC0; }
.cm-s-vibrant-ink .cm-number { color: #FFEE98; }
.cm-s-vibrant-ink .cm-def { color: #8DA6CE; }
.cm-s-vibrant-ink span.cm-variable-2, .cm-s-vibrant span.cm-tag { color: #FFC66D }
.cm-s-vibrant-ink span.cm-variable-3, .cm-s-vibrant span.cm-def { color: #FFC66D }
.cm-s-vibrant-ink .cm-operator { color: #888; }
.cm-s-vibrant-ink .cm-comment { color: gray; font-weight: bold; }
.cm-s-vibrant-ink .cm-string { color: #A5C25C }
.cm-s-vibrant-ink .cm-string-2 { color: red }
.cm-s-vibrant-ink .cm-meta { color: #D8FA3C; }
.cm-s-vibrant-ink .cm-builtin { color: #8DA6CE; }
.cm-s-vibrant-ink .cm-tag { color: #8DA6CE; }
.cm-s-vibrant-ink .cm-attribute { color: #8DA6CE; }
.cm-s-vibrant-ink .cm-header { color: #FF6400; }
.cm-s-vibrant-ink .cm-hr { color: #AEAEAE; }
.cm-s-vibrant-ink .cm-link { color: blue; }
.cm-s-vibrant-ink .cm-error { border-bottom: 1px solid red; }
.cm-s-vibrant-ink .CodeMirror-activeline-background {background: #27282E !important;}
.cm-s-vibrant-ink .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}

View File

@ -1,53 +0,0 @@
/*
Copyright (C) 2011 by MarkLogic Corporation
Author: Mike Brevoort <mike@brevoort.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
.cm-s-xq-dark.CodeMirror { background: #0a001f; color: #f8f8f8; }
.cm-s-xq-dark .CodeMirror-selected { background: #27007A !important; }
.cm-s-xq-dark.CodeMirror ::selection { background: rgba(39, 0, 122, 0.99); }
.cm-s-xq-dark.CodeMirror ::-moz-selection { background: rgba(39, 0, 122, 0.99); }
.cm-s-xq-dark .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
.cm-s-xq-dark .CodeMirror-guttermarker { color: #FFBD40; }
.cm-s-xq-dark .CodeMirror-guttermarker-subtle { color: #f8f8f8; }
.cm-s-xq-dark .CodeMirror-linenumber { color: #f8f8f8; }
.cm-s-xq-dark .CodeMirror-cursor { border-left: 1px solid white !important; }
.cm-s-xq-dark span.cm-keyword {color: #FFBD40;}
.cm-s-xq-dark span.cm-atom {color: #6C8CD5;}
.cm-s-xq-dark span.cm-number {color: #164;}
.cm-s-xq-dark span.cm-def {color: #FFF; text-decoration:underline;}
.cm-s-xq-dark span.cm-variable {color: #FFF;}
.cm-s-xq-dark span.cm-variable-2 {color: #EEE;}
.cm-s-xq-dark span.cm-variable-3 {color: #DDD;}
.cm-s-xq-dark span.cm-property {}
.cm-s-xq-dark span.cm-operator {}
.cm-s-xq-dark span.cm-comment {color: gray;}
.cm-s-xq-dark span.cm-string {color: #9FEE00;}
.cm-s-xq-dark span.cm-meta {color: yellow;}
.cm-s-xq-dark span.cm-qualifier {color: #FFF700;}
.cm-s-xq-dark span.cm-builtin {color: #30a;}
.cm-s-xq-dark span.cm-bracket {color: #cc7;}
.cm-s-xq-dark span.cm-tag {color: #FFBD40;}
.cm-s-xq-dark span.cm-attribute {color: #FFF700;}
.cm-s-xq-dark span.cm-error {color: #f00;}
.cm-s-xq-dark .CodeMirror-activeline-background {background: #27282E !important;}
.cm-s-xq-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;}

View File

@ -1,43 +0,0 @@
/*
Copyright (C) 2011 by MarkLogic Corporation
Author: Mike Brevoort <mike@brevoort.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
.cm-s-xq-light span.cm-keyword {line-height: 1em; font-weight: bold; color: #5A5CAD; }
.cm-s-xq-light span.cm-atom {color: #6C8CD5;}
.cm-s-xq-light span.cm-number {color: #164;}
.cm-s-xq-light span.cm-def {text-decoration:underline;}
.cm-s-xq-light span.cm-variable {color: black; }
.cm-s-xq-light span.cm-variable-2 {color:black;}
.cm-s-xq-light span.cm-variable-3 {color: black; }
.cm-s-xq-light span.cm-property {}
.cm-s-xq-light span.cm-operator {}
.cm-s-xq-light span.cm-comment {color: #0080FF; font-style: italic;}
.cm-s-xq-light span.cm-string {color: red;}
.cm-s-xq-light span.cm-meta {color: yellow;}
.cm-s-xq-light span.cm-qualifier {color: grey}
.cm-s-xq-light span.cm-builtin {color: #7EA656;}
.cm-s-xq-light span.cm-bracket {color: #cc7;}
.cm-s-xq-light span.cm-tag {color: #3F7F7F;}
.cm-s-xq-light span.cm-attribute {color: #7F007F;}
.cm-s-xq-light span.cm-error {color: #f00;}
.cm-s-xq-light .CodeMirror-activeline-background {background: #e8f2ff !important;}
.cm-s-xq-light .CodeMirror-matchingbracket {outline:1px solid grey;color:black !important;background:yellow;}

View File

@ -1,37 +0,0 @@
/**
* "
* Using Zenburn color palette from the Emacs Zenburn Theme
* https://github.com/bbatsov/zenburn-emacs/blob/master/zenburn-theme.el
*
* Also using parts of https://github.com/xavi/coderay-lighttable-theme
* "
* From: https://github.com/wisenomad/zenburn-lighttable-theme/blob/master/zenburn.css
*/
.cm-s-zenburn .CodeMirror-gutters { background: #3f3f3f !important; }
.cm-s-zenburn .CodeMirror-foldgutter-open, .CodeMirror-foldgutter-folded { color: #999; }
.cm-s-zenburn .CodeMirror-cursor { border-left: 1px solid white !important; }
.cm-s-zenburn { background-color: #3f3f3f; color: #dcdccc; }
.cm-s-zenburn span.cm-builtin { color: #dcdccc; font-weight: bold; }
.cm-s-zenburn span.cm-comment { color: #7f9f7f; }
.cm-s-zenburn span.cm-keyword { color: #f0dfaf; font-weight: bold; }
.cm-s-zenburn span.cm-atom { color: #bfebbf; }
.cm-s-zenburn span.cm-def { color: #dcdccc; }
.cm-s-zenburn span.cm-variable { color: #dfaf8f; }
.cm-s-zenburn span.cm-variable-2 { color: #dcdccc; }
.cm-s-zenburn span.cm-string { color: #cc9393; }
.cm-s-zenburn span.cm-string-2 { color: #cc9393; }
.cm-s-zenburn span.cm-number { color: #dcdccc; }
.cm-s-zenburn span.cm-tag { color: #93e0e3; }
.cm-s-zenburn span.cm-property { color: #dfaf8f; }
.cm-s-zenburn span.cm-attribute { color: #dfaf8f; }
.cm-s-zenburn span.cm-qualifier { color: #7cb8bb; }
.cm-s-zenburn span.cm-meta { color: #f0dfaf; }
.cm-s-zenburn span.cm-header { color: #f0efd0; }
.cm-s-zenburn span.cm-operator { color: #f0efd0; }
.cm-s-zenburn span.CodeMirror-matchingbracket { box-sizing: border-box; background: transparent; border-bottom: 1px solid; }
.cm-s-zenburn span.CodeMirror-nonmatchingbracket { border-bottom: 1px solid; background: none; }
.cm-s-zenburn .CodeMirror-activeline { background: #000000; }
.cm-s-zenburn .CodeMirror-activeline-background { background: #000000; }
.cm-s-zenburn .CodeMirror-selected { background: #545454; }
.cm-s-zenburn .CodeMirror-focused .CodeMirror-selected { background: #4f4f4f; }

View File

@ -1,164 +0,0 @@
/**
* FormValidation (http://formvalidation.io)
* The best jQuery plugin to validate form fields. Support Bootstrap, Foundation, Pure, SemanticUI, UIKit and custom frameworks
*
* @author http://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
.fv-has-feedback {
position: relative;
}
.fv-control-feedback {
position: absolute;
top: 0;
right: 0;
z-index: 2;
display: block;
width: 34px;
height: 34px;
line-height: 34px;
text-align: center;
}
.fv-has-feedback .fv-control-feedback {
/*right: 15px;*/
}
.fv-help-block {
display: block;
}
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ~~~ For Bootstrap form ~~~ */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~ */
.fv-form-bootstrap .help-block {
margin-bottom: 0;
}
.fv-form-bootstrap .tooltip-inner {
text-align: left;
}
/* Bootstrap stacked form without label */
.fv-form-bootstrap .fv-icon-no-label {
top: 0;
}
.fv-form-bootstrap .fv-bootstrap-icon-input-group {
z-index: 100;
}
/* Bootstrap inline form */
.form-inline.fv-form-bootstrap .form-group {
vertical-align: top;
}
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ~~~ For Foundation form ~~~ */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
.fv-form-foundation .fv-control-feedback {
top: 21px; /* The height of Foundation label */
right: 15px; /* The padding-right of .columns */
width: 37px;
height: 37px;
line-height: 37px;
}
.fv-form-foundation .collapse .fv-control-feedback {
top: 0;
right: 0;
}
/* Foundation horizontal form */
.fv-form-horizontal.fv-form-foundation .fv-control-feedback {
top: 0;
}
/* Foundation stacked form without label */
.fv-form-foundation .fv-icon-no-label {
top: 0;
}
.fv-form-foundation .error .fv-control-feedback {
color: #f04124;
}
/**
* Foundation reset the bottom marin to 0 when the row has '.error' class
* I need to adjust it when using tooltip to show the error
*/
.fv-form-foundation .error.fv-has-tooltip input, .error.fv-has-tooltip textarea, .error.fv-has-tooltip select {
margin-bottom: 1rem;
}
/* ~~~~~~~~~~~~~~~~~~~~~ */
/* ~~~ For Pure form ~~~ */
/* ~~~~~~~~~~~~~~~~~~~~~ */
.fv-form-pure .fv-control-feedback {
top: 22px; /* Height of Pure label */
width: 36px; /* Height of Pure input */
height: 36px;
line-height: 36px;
}
.pure-form-stacked.fv-form-pure .fv-control-feedback {
top: 4px;
}
.pure-form-aligned .pure-control-group .fv-help-block {
margin-top: 5px;
margin-left: 180px;
}
.pure-form-aligned.fv-form-pure .fv-control-feedback, /* Pure horizontal form */
.fv-form-pure .fv-icon-no-label { /* Pure stacked form without label */
top: 0;
}
.fv-form-pure .fv-has-error label,
.fv-form-pure .fv-has-error .fv-help-block,
.fv-form-pure .fv-has-error .fv-control-feedback {
color: #CA3C3C; /* Same as .button-error */
}
.fv-form-pure .fv-has-success label,
.fv-form-pure .fv-has-success .fv-control-feedback {
/*color: #1CB841;*/ /* Same as .button-success */
}
/* ~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* ~~~ For Semantic form ~~~ */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~ */
.fv-form-semantic .fv-control-feedback.icon {
right: 7px;
}
.fv-form-semantic .error .icon {
color: #d95c5c;
}
/* Semantic horizontal form */
.fv-form-horizontal.fv-form-semantic .row {
padding-bottom: 0;
}
/* ~~~~~~~~~~~~~~~~~~~~~~ */
/* ~~~ For UIKit form ~~~ */
/* ~~~~~~~~~~~~~~~~~~~~~~ */
.fv-form-uikit .fv-control-feedback {
top: 25px; /* Height of UIKit label */
width: 30px; /* Height of UIKit input */
height: 30px;
line-height: 30px;
}
.fv-form-uikit .uk-text-danger {
display: block;
}
/* UIKit horizontal form */
.uk-form-horizontal.fv-form-uikit .fv-control-feedback {
/*line-height: normal;*/
top: 0;
}
.fv-form-uikit .fv-has-error label,
.fv-form-uikit .fv-has-error .uk-form-label,
.fv-form-uikit .fv-has-error .fv-control-feedback {
color: #D85030; /* Same as .uk-form-danger */
}
.fv-form-uikit .fv-has-success label,
.fv-form-uikit .fv-has-success .uk-form-label,
.fv-form-uikit .fv-has-success .fv-control-feedback {
/*color: #659F13;*/ /* Same as .uk-form-success */
}
/* UIKit stacked form without label */
.fv-form-uikit .fv-icon-no-label {
top: 0;
}

View File

@ -1 +0,0 @@
.fv-has-feedback{position:relative}.fv-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center}.fv-help-block{display:block}.fv-form-bootstrap .help-block{margin-bottom:0}.fv-form-bootstrap .tooltip-inner{text-align:left}.fv-form-bootstrap .fv-icon-no-label{top:0}.fv-form-bootstrap .fv-bootstrap-icon-input-group{z-index:100}.form-inline.fv-form-bootstrap .form-group{vertical-align:top}.fv-form-foundation .fv-control-feedback{top:21px;right:15px;width:37px;height:37px;line-height:37px}.fv-form-foundation .collapse .fv-control-feedback{top:0;right:0}.fv-form-foundation .fv-icon-no-label,.fv-form-horizontal.fv-form-foundation .fv-control-feedback{top:0}.fv-form-foundation .error .fv-control-feedback{color:#f04124}.error.fv-has-tooltip select,.error.fv-has-tooltip textarea,.fv-form-foundation .error.fv-has-tooltip input{margin-bottom:1rem}.fv-form-pure .fv-control-feedback{top:22px;width:36px;height:36px;line-height:36px}.pure-form-stacked.fv-form-pure .fv-control-feedback{top:4px}.pure-form-aligned .pure-control-group .fv-help-block{margin-top:5px;margin-left:180px}.fv-form-pure .fv-icon-no-label,.pure-form-aligned.fv-form-pure .fv-control-feedback{top:0}.fv-form-pure .fv-has-error .fv-control-feedback,.fv-form-pure .fv-has-error .fv-help-block,.fv-form-pure .fv-has-error label{color:#CA3C3C}.fv-form-semantic .fv-control-feedback.icon{right:7px}.fv-form-semantic .error .icon{color:#d95c5c}.fv-form-horizontal.fv-form-semantic .row{padding-bottom:0}.fv-form-uikit .fv-control-feedback{top:25px;width:30px;height:30px;line-height:30px}.fv-form-uikit .uk-text-danger{display:block}.uk-form-horizontal.fv-form-uikit .fv-control-feedback{top:0}.fv-form-uikit .fv-has-error .fv-control-feedback,.fv-form-uikit .fv-has-error .uk-form-label,.fv-form-uikit .fv-has-error label{color:#D85030}.fv-form-uikit .fv-icon-no-label{top:0}

View File

@ -1,544 +0,0 @@
/*! jQuery UI - v1.11.4 - 2015-08-10
* http://jqueryui.com
* Includes: core.css, autocomplete.css, menu.css, theme.css
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
/* Layout helpers
----------------------------------*/
.ui-helper-hidden {
display: none;
}
.ui-helper-hidden-accessible {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
.ui-helper-reset {
margin: 0;
padding: 0;
border: 0;
outline: 0;
line-height: 1.3;
text-decoration: none;
font-size: 100%;
list-style: none;
}
.ui-helper-clearfix:before,
.ui-helper-clearfix:after {
content: "";
display: table;
border-collapse: collapse;
}
.ui-helper-clearfix:after {
clear: both;
}
.ui-helper-clearfix {
min-height: 0; /* support: IE7 */
}
.ui-helper-zfix {
width: 100%;
height: 100%;
top: 0;
left: 0;
position: absolute;
opacity: 0;
filter:Alpha(Opacity=0); /* support: IE8 */
}
.ui-front {
z-index: 100;
}
/* Interaction Cues
----------------------------------*/
.ui-state-disabled {
cursor: default !important;
}
/* Icons
----------------------------------*/
/* states and images */
.ui-icon {
display: block;
text-indent: -99999px;
overflow: hidden;
background-repeat: no-repeat;
}
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.ui-autocomplete {
position: absolute;
top: 0;
left: 0;
cursor: default;
}
.ui-menu {
list-style: none;
padding: 0;
margin: 0;
display: block;
outline: none;
}
.ui-menu .ui-menu {
position: absolute;
}
.ui-menu .ui-menu-item {
position: relative;
margin: 0;
padding: 3px 1em 3px .4em;
cursor: pointer;
min-height: 0; /* support: IE7 */
/* support: IE10, see #8844 */
list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
}
.ui-menu .ui-menu-divider {
margin: 5px 0;
height: 0;
font-size: 0;
line-height: 0;
border-width: 1px 0 0 0;
}
.ui-menu .ui-state-focus,
.ui-menu .ui-state-active {
margin: -1px;
}
/* icon support */
.ui-menu-icons {
position: relative;
}
.ui-menu-icons .ui-menu-item {
padding-left: 2em;
}
/* left-aligned */
.ui-menu .ui-icon {
position: absolute;
top: 0;
bottom: 0;
left: .2em;
margin: auto 0;
}
/* right-aligned */
.ui-menu .ui-menu-icon {
left: auto;
right: 0;
}
/* Component containers
----------------------------------*/
.ui-widget {
font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;
font-size: 1.1em;
}
.ui-widget .ui-widget {
font-size: 1em;
}
.ui-widget input,
.ui-widget select,
.ui-widget textarea,
.ui-widget button {
font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;
font-size: 1em;
}
.ui-widget-content {
border: 1px solid #dddddd;
background: #eeeeee url("images/ui-bg_highlight-soft_100_eeeeee_1x100.png") 50% top repeat-x;
color: #333333;
}
.ui-widget-content a {
color: #333333;
}
.ui-widget-header {
border: 1px solid #e78f08;
background: #f6a828 url("images/ui-bg_gloss-wave_35_f6a828_500x100.png") 50% 50% repeat-x;
color: #ffffff;
font-weight: bold;
}
.ui-widget-header a {
color: #ffffff;
}
/* Interaction states
----------------------------------*/
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default {
border: 1px solid #cccccc;
background: #f6f6f6 url("images/ui-bg_glass_100_f6f6f6_1x400.png") 50% 50% repeat-x;
font-weight: bold;
color: #1c94c4;
}
.ui-state-default a,
.ui-state-default a:link,
.ui-state-default a:visited {
color: #1c94c4;
text-decoration: none;
}
.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover,
.ui-state-focus,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus {
border: 1px solid #fbcb09;
background: #fdf5ce url("images/ui-bg_glass_100_fdf5ce_1x400.png") 50% 50% repeat-x;
font-weight: bold;
color: #c77405;
}
.ui-state-hover a,
.ui-state-hover a:hover,
.ui-state-hover a:link,
.ui-state-hover a:visited,
.ui-state-focus a,
.ui-state-focus a:hover,
.ui-state-focus a:link,
.ui-state-focus a:visited {
color: #c77405;
text-decoration: none;
}
.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active {
border: 1px solid #fbd850;
background: #ffffff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;
font-weight: bold;
color: #eb8f00;
}
.ui-state-active a,
.ui-state-active a:link,
.ui-state-active a:visited {
color: #eb8f00;
text-decoration: none;
}
/* Interaction Cues
----------------------------------*/
.ui-state-highlight,
.ui-widget-content .ui-state-highlight,
.ui-widget-header .ui-state-highlight {
border: 1px solid #fed22f;
background: #ffe45c url("images/ui-bg_highlight-soft_75_ffe45c_1x100.png") 50% top repeat-x;
color: #363636;
}
.ui-state-highlight a,
.ui-widget-content .ui-state-highlight a,
.ui-widget-header .ui-state-highlight a {
color: #363636;
}
.ui-state-error,
.ui-widget-content .ui-state-error,
.ui-widget-header .ui-state-error {
border: 1px solid #cd0a0a;
background: #b81900 url("images/ui-bg_diagonals-thick_18_b81900_40x40.png") 50% 50% repeat;
color: #ffffff;
}
.ui-state-error a,
.ui-widget-content .ui-state-error a,
.ui-widget-header .ui-state-error a {
color: #ffffff;
}
.ui-state-error-text,
.ui-widget-content .ui-state-error-text,
.ui-widget-header .ui-state-error-text {
color: #ffffff;
}
.ui-priority-primary,
.ui-widget-content .ui-priority-primary,
.ui-widget-header .ui-priority-primary {
font-weight: bold;
}
.ui-priority-secondary,
.ui-widget-content .ui-priority-secondary,
.ui-widget-header .ui-priority-secondary {
opacity: .7;
filter:Alpha(Opacity=70); /* support: IE8 */
font-weight: normal;
}
.ui-state-disabled,
.ui-widget-content .ui-state-disabled,
.ui-widget-header .ui-state-disabled {
opacity: .35;
filter:Alpha(Opacity=35); /* support: IE8 */
background-image: none;
}
.ui-state-disabled .ui-icon {
filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
}
/* Icons
----------------------------------*/
/* states and images */
.ui-icon {
width: 16px;
height: 16px;
}
.ui-icon,
.ui-widget-content .ui-icon {
background-image: url("images/ui-icons_222222_256x240.png");
}
.ui-widget-header .ui-icon {
background-image: url("images/ui-icons_ffffff_256x240.png");
}
.ui-state-default .ui-icon {
background-image: url("images/ui-icons_ef8c08_256x240.png");
}
.ui-state-hover .ui-icon,
.ui-state-focus .ui-icon {
background-image: url("images/ui-icons_ef8c08_256x240.png");
}
.ui-state-active .ui-icon {
background-image: url("images/ui-icons_ef8c08_256x240.png");
}
.ui-state-highlight .ui-icon {
background-image: url("images/ui-icons_228ef1_256x240.png");
}
.ui-state-error .ui-icon,
.ui-state-error-text .ui-icon {
background-image: url("images/ui-icons_ffd27a_256x240.png");
}
/* positioning */
.ui-icon-blank { background-position: 16px 16px; }
.ui-icon-carat-1-n { background-position: 0 0; }
.ui-icon-carat-1-ne { background-position: -16px 0; }
.ui-icon-carat-1-e { background-position: -32px 0; }
.ui-icon-carat-1-se { background-position: -48px 0; }
.ui-icon-carat-1-s { background-position: -64px 0; }
.ui-icon-carat-1-sw { background-position: -80px 0; }
.ui-icon-carat-1-w { background-position: -96px 0; }
.ui-icon-carat-1-nw { background-position: -112px 0; }
.ui-icon-carat-2-n-s { background-position: -128px 0; }
.ui-icon-carat-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -64px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -64px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-on { background-position: -96px -144px; }
.ui-icon-radio-off { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
/* Misc visuals
----------------------------------*/
/* Corner radius */
.ui-corner-all,
.ui-corner-top,
.ui-corner-left,
.ui-corner-tl {
border-top-left-radius: 4px;
}
.ui-corner-all,
.ui-corner-top,
.ui-corner-right,
.ui-corner-tr {
border-top-right-radius: 4px;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-left,
.ui-corner-bl {
border-bottom-left-radius: 4px;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-right,
.ui-corner-br {
border-bottom-right-radius: 4px;
}
/* Overlays */
.ui-widget-overlay {
background: #666666 url("images/ui-bg_diagonals-thick_20_666666_40x40.png") 50% 50% repeat;
opacity: .5;
filter: Alpha(Opacity=50); /* support: IE8 */
}
.ui-widget-shadow {
margin: -5px 0 0 -5px;
padding: 5px;
background: #000000 url("images/ui-bg_flat_10_000000_40x100.png") 50% 50% repeat-x;
opacity: .2;
filter: Alpha(Opacity=20); /* support: IE8 */
border-radius: 5px;
}

File diff suppressed because one or more lines are too long

View File

@ -1,152 +0,0 @@
/*!
* jQuery UI CSS Framework 1.11.4
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/category/theming/
*/
/* Layout helpers
----------------------------------*/
.ui-helper-hidden {
display: none;
}
.ui-helper-hidden-accessible {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
.ui-helper-reset {
margin: 0;
padding: 0;
border: 0;
outline: 0;
line-height: 1.3;
text-decoration: none;
font-size: 100%;
list-style: none;
}
.ui-helper-clearfix:before,
.ui-helper-clearfix:after {
content: "";
display: table;
border-collapse: collapse;
}
.ui-helper-clearfix:after {
clear: both;
}
.ui-helper-clearfix {
min-height: 0; /* support: IE7 */
}
.ui-helper-zfix {
width: 100%;
height: 100%;
top: 0;
left: 0;
position: absolute;
opacity: 0;
filter:Alpha(Opacity=0); /* support: IE8 */
}
.ui-front {
z-index: 100;
}
/* Interaction Cues
----------------------------------*/
.ui-state-disabled {
cursor: default !important;
}
/* Icons
----------------------------------*/
/* states and images */
.ui-icon {
display: block;
text-indent: -99999px;
overflow: hidden;
background-repeat: no-repeat;
}
/* Misc visuals
----------------------------------*/
/* Overlays */
.ui-widget-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.ui-autocomplete {
position: absolute;
top: 0;
left: 0;
cursor: default;
}
.ui-menu {
list-style: none;
padding: 0;
margin: 0;
display: block;
outline: none;
}
.ui-menu .ui-menu {
position: absolute;
}
.ui-menu .ui-menu-item {
position: relative;
margin: 0;
padding: 3px 1em 3px .4em;
cursor: pointer;
min-height: 0; /* support: IE7 */
/* support: IE10, see #8844 */
list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
}
.ui-menu .ui-menu-divider {
margin: 5px 0;
height: 0;
font-size: 0;
line-height: 0;
border-width: 1px 0 0 0;
}
.ui-menu .ui-state-focus,
.ui-menu .ui-state-active {
margin: -1px;
}
/* icon support */
.ui-menu-icons {
position: relative;
}
.ui-menu-icons .ui-menu-item {
padding-left: 2em;
}
/* left-aligned */
.ui-menu .ui-icon {
position: absolute;
top: 0;
bottom: 0;
left: .2em;
margin: auto 0;
}
/* right-aligned */
.ui-menu .ui-menu-icon {
left: auto;
right: 0;
}

View File

@ -1,410 +0,0 @@
/*!
* jQuery UI CSS Framework 1.11.4
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/category/theming/
*
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
*/
/* Component containers
----------------------------------*/
.ui-widget {
font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;
font-size: 1.1em;
}
.ui-widget .ui-widget {
font-size: 1em;
}
.ui-widget input,
.ui-widget select,
.ui-widget textarea,
.ui-widget button {
font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;
font-size: 1em;
}
.ui-widget-content {
border: 1px solid #dddddd;
background: #eeeeee url("images/ui-bg_highlight-soft_100_eeeeee_1x100.png") 50% top repeat-x;
color: #333333;
}
.ui-widget-content a {
color: #333333;
}
.ui-widget-header {
border: 1px solid #e78f08;
background: #f6a828 url("images/ui-bg_gloss-wave_35_f6a828_500x100.png") 50% 50% repeat-x;
color: #ffffff;
font-weight: bold;
}
.ui-widget-header a {
color: #ffffff;
}
/* Interaction states
----------------------------------*/
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default {
border: 1px solid #cccccc;
background: #f6f6f6 url("images/ui-bg_glass_100_f6f6f6_1x400.png") 50% 50% repeat-x;
font-weight: bold;
color: #1c94c4;
}
.ui-state-default a,
.ui-state-default a:link,
.ui-state-default a:visited {
color: #1c94c4;
text-decoration: none;
}
.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover,
.ui-state-focus,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus {
border: 1px solid #fbcb09;
background: #fdf5ce url("images/ui-bg_glass_100_fdf5ce_1x400.png") 50% 50% repeat-x;
font-weight: bold;
color: #c77405;
}
.ui-state-hover a,
.ui-state-hover a:hover,
.ui-state-hover a:link,
.ui-state-hover a:visited,
.ui-state-focus a,
.ui-state-focus a:hover,
.ui-state-focus a:link,
.ui-state-focus a:visited {
color: #c77405;
text-decoration: none;
}
.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active {
border: 1px solid #fbd850;
background: #ffffff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;
font-weight: bold;
color: #eb8f00;
}
.ui-state-active a,
.ui-state-active a:link,
.ui-state-active a:visited {
color: #eb8f00;
text-decoration: none;
}
/* Interaction Cues
----------------------------------*/
.ui-state-highlight,
.ui-widget-content .ui-state-highlight,
.ui-widget-header .ui-state-highlight {
border: 1px solid #fed22f;
background: #ffe45c url("images/ui-bg_highlight-soft_75_ffe45c_1x100.png") 50% top repeat-x;
color: #363636;
}
.ui-state-highlight a,
.ui-widget-content .ui-state-highlight a,
.ui-widget-header .ui-state-highlight a {
color: #363636;
}
.ui-state-error,
.ui-widget-content .ui-state-error,
.ui-widget-header .ui-state-error {
border: 1px solid #cd0a0a;
background: #b81900 url("images/ui-bg_diagonals-thick_18_b81900_40x40.png") 50% 50% repeat;
color: #ffffff;
}
.ui-state-error a,
.ui-widget-content .ui-state-error a,
.ui-widget-header .ui-state-error a {
color: #ffffff;
}
.ui-state-error-text,
.ui-widget-content .ui-state-error-text,
.ui-widget-header .ui-state-error-text {
color: #ffffff;
}
.ui-priority-primary,
.ui-widget-content .ui-priority-primary,
.ui-widget-header .ui-priority-primary {
font-weight: bold;
}
.ui-priority-secondary,
.ui-widget-content .ui-priority-secondary,
.ui-widget-header .ui-priority-secondary {
opacity: .7;
filter:Alpha(Opacity=70); /* support: IE8 */
font-weight: normal;
}
.ui-state-disabled,
.ui-widget-content .ui-state-disabled,
.ui-widget-header .ui-state-disabled {
opacity: .35;
filter:Alpha(Opacity=35); /* support: IE8 */
background-image: none;
}
.ui-state-disabled .ui-icon {
filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
}
/* Icons
----------------------------------*/
/* states and images */
.ui-icon {
width: 16px;
height: 16px;
}
.ui-icon,
.ui-widget-content .ui-icon {
background-image: url("images/ui-icons_222222_256x240.png");
}
.ui-widget-header .ui-icon {
background-image: url("images/ui-icons_ffffff_256x240.png");
}
.ui-state-default .ui-icon {
background-image: url("images/ui-icons_ef8c08_256x240.png");
}
.ui-state-hover .ui-icon,
.ui-state-focus .ui-icon {
background-image: url("images/ui-icons_ef8c08_256x240.png");
}
.ui-state-active .ui-icon {
background-image: url("images/ui-icons_ef8c08_256x240.png");
}
.ui-state-highlight .ui-icon {
background-image: url("images/ui-icons_228ef1_256x240.png");
}
.ui-state-error .ui-icon,
.ui-state-error-text .ui-icon {
background-image: url("images/ui-icons_ffd27a_256x240.png");
}
/* positioning */
.ui-icon-blank { background-position: 16px 16px; }
.ui-icon-carat-1-n { background-position: 0 0; }
.ui-icon-carat-1-ne { background-position: -16px 0; }
.ui-icon-carat-1-e { background-position: -32px 0; }
.ui-icon-carat-1-se { background-position: -48px 0; }
.ui-icon-carat-1-s { background-position: -64px 0; }
.ui-icon-carat-1-sw { background-position: -80px 0; }
.ui-icon-carat-1-w { background-position: -96px 0; }
.ui-icon-carat-1-nw { background-position: -112px 0; }
.ui-icon-carat-2-n-s { background-position: -128px 0; }
.ui-icon-carat-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -64px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -64px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-on { background-position: -96px -144px; }
.ui-icon-radio-off { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
/* Misc visuals
----------------------------------*/
/* Corner radius */
.ui-corner-all,
.ui-corner-top,
.ui-corner-left,
.ui-corner-tl {
border-top-left-radius: 4px;
}
.ui-corner-all,
.ui-corner-top,
.ui-corner-right,
.ui-corner-tr {
border-top-right-radius: 4px;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-left,
.ui-corner-bl {
border-bottom-left-radius: 4px;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-right,
.ui-corner-br {
border-bottom-right-radius: 4px;
}
/* Overlays */
.ui-widget-overlay {
background: #666666 url("images/ui-bg_diagonals-thick_20_666666_40x40.png") 50% 50% repeat;
opacity: .5;
filter: Alpha(Opacity=50); /* support: IE8 */
}
.ui-widget-shadow {
margin: -5px 0 0 -5px;
padding: 5px;
background: #000000 url("images/ui-bg_flat_10_000000_40x100.png") 50% 50% repeat-x;
opacity: .2;
filter: Alpha(Opacity=20); /* support: IE8 */
border-radius: 5px;
}

View File

@ -3,47 +3,40 @@
baseUrl: "js/", baseUrl: "js/",
// 第三方脚本模块的别名,jquery比libs/jquery-1.11.1.min.js简洁明了 // 第三方脚本模块的别名,jquery比libs/jquery-1.11.1.min.js简洁明了
paths: { paths: {
//百度webuploader jquery: "lib/jquery/jquery",
webuploader: "lib/webuploader/webuploader",
jquery: "empty:",
avalon: "lib/avalon/avalon", avalon: "lib/avalon/avalon",
editor: "utils/editor", editor: "utils/editor",
uploader: "utils/uploader", uploader: "utils/uploader",
validation: "utils/validation", formValidation: "utils/formValidation",
code_mirror: "utils/code_mirror", codeMirror: "utils/codeMirror",
login: "app/oj/account/login", bsAlert: "utils/bsAlert",
"bs_alert": "utils/bs_alert", problem: "app/oj/problem/problem",
submit_code: "app/oj/problem/submit_code",
contest: "app/admin/contest/contest", contest: "app/admin/contest/contest",
csrfToken: "utils/csrfToken",
admin: "app/admin/admin",
chart: "lib/chart/Chart",
tagEditor: "lib/tagEditor/jquery.tag-editor.min",
jqueryUI: "lib/jqueryUI/jquery-ui",
bootstrap: "lib/bootstrap/bootstrap",
datetimePicker: "lib/datetime_picker/bootstrap-datetimepicker.zh-CN",
validator: "lib/validator/validator",
//formValidation 不要在代码中单独使用而是使用和修改utils/validation
base: "lib/formValidation/base",
helper: "lib/formValidation/helper",
"language/zh_CN": "lib/formValidation/language/zh_CN",
"framework/bootstrap": "lib/formValidation/framework/bootstrap",
"validator/notEmpty": "lib/formValidation/validator/notEmpty",
"validator/stringLength": "lib/formValidation/validator/stringLength",
"validator/date": "lib/formValidation/validator/date",
"validator/integer": "lib/formValidation/validator/integer",
"validator/between": "lib/formValidation/validator/between",
//富文本编辑器 不要直接使用而是使用上面的editor // ------ 下面写的都不要直接用,而是使用上面的封装版本 ------
//富文本编辑器simditor -> editor
simditor: "lib/simditor/simditor", simditor: "lib/simditor/simditor",
"simple-module": "lib/simditor/module", "simple-module": "lib/simditor/module",
"simple-hotkeys": "lib/simditor/hotkeys", "simple-hotkeys": "lib/simditor/hotkeys",
"simple-uploader": "lib/simditor/uploader", "simple-uploader": "lib/simditor/uploader",
//code mirroe 代码编辑器 //code mirror 代码编辑器 ->codeMirror
_code_mirror: "lib/codeMirror/codemirror", _codeMirror: "lib/codeMirror/codemirror",
code_mirror_clang: "lib/codeMirror/language/clike", codeMirrorClang: "lib/codeMirror/language/clike",
//bootstrap //百度webuploader -> uploader
bootstrap: "lib/bootstrap/bootstrap", webUploader: "lib/webuploader/webuploader",
// "_datetimePicker": "lib/datetime_picker/bootstrap-datetimepicker"
"_datetimepicker": "lib/datetime_picker/bootstrap-datetimepicker",
"datetimepicker": "lib/datetime_picker/bootstrap-datetimepicker.zh-CN"
}, },
shim: { shim: {

View File

@ -23,21 +23,6 @@ var require = {
// ------ 下面写的都不要直接用,而是使用上面的封装版本 ------ // ------ 下面写的都不要直接用,而是使用上面的封装版本 ------
//formValidation -> utils/validation
base: "lib/formValidation/base",
helper: "lib/formValidation/helper",
"language/zh_CN": "lib/formValidation/language/zh_CN",
"framework/bootstrap": "lib/formValidation/framework/bootstrap",
"validator/notEmpty": "lib/formValidation/validator/notEmpty",
"validator/stringLength": "lib/formValidation/validator/stringLength",
"validator/date": "lib/formValidation/validator/date",
"validator/integer": "lib/formValidation/validator/integer",
"validator/between": "lib/formValidation/validator/between",
"validator/confirm":"lib/formValidation/validator/confirm",
"validator/remote":"lib/formValidation/validator/remote",
"validator/emailAddress":"lib/formValidation/validator/emailAddress",
//富文本编辑器simditor -> editor //富文本编辑器simditor -> editor
simditor: "lib/simditor/simditor", simditor: "lib/simditor/simditor",
"simple-module": "lib/simditor/module", "simple-module": "lib/simditor/module",

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -1,54 +0,0 @@
/**
* !!!!!! dev-version and still in progress !!!!!!!
* this plugin loads all required components
* to start validaton process properly
* How to use this:
* include bsfvalidator according to the following pattern
* bsfvalidator!LANG:VALIDATORS
*
* Options:
* LANG - (optinal and single value) indicates which language will be used
* VALIDATORS - (required) defines which validators should be used
* Examples:
* 1) bsfvalidator!ua_UA:notEmpty,stringLength,regexp,emailAddress
* 2) bsfvalidator!notEmpty,stringLength,regexp,emailAddress
* 3) bsfvalidator!notEmpty
* There is simple requirejs based project in demo/amd folder
*/
define("bsfvalidator", ["base", "helper", "framework/bootstrap"], function (base) {
var buildMap = [];
function getDeps (name) {
var parts = name.match(/((.*):)?(.*)/),
lang = null,
deps = [],
all = [];
if (parts.length === 4) {
lang = parts[2];
deps = parts[3].split(',');
}
if (parts.length === 3) {
deps = parts[2].split(',');
}
for (var i = 0, len = deps.length; i < len; i++) {
deps[i] = './validator/' + deps[i];
}
if (lang) {
lang = './language/' + lang;
all.push(lang);
}
all = all.concat(deps);
return {
lang: lang,
deps: deps,
all: all
};
}
return {
load: function (name, req, onLoad, config) {
var deps = getDeps(name);
req(deps.all, function () {
onLoad(base);
});
}
}
});

View File

@ -1,294 +0,0 @@
/**
* FormValidation (http://formvalidation.io)
* The best jQuery plugin to validate form fields. Support Bootstrap, Foundation, Pure, SemanticUI, UIKit frameworks
*
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
/**
* This class supports validating Bootstrap form (http://getbootstrap.com/)
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("framework/bootstrap", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.Framework.Bootstrap = function(element, options, namespace) {
options = $.extend(true, {
button: {
selector: '[type="submit"]',
// The class of disabled button
// http://getbootstrap.com/css/#buttons-disabled
disabled: 'disabled'
},
err: {
// http://getbootstrap.com/css/#forms-help-text
clazz: 'help-block',
parent: '^(.*)col-(xs|sm|md|lg)-(offset-){0,1}[0-9]+(.*)$'
},
// This feature requires Bootstrap v3.1.0 or later (http://getbootstrap.com/css/#forms-control-validation).
// Since Bootstrap doesn't provide any methods to know its version, this option cannot be on/off automatically.
// In other word, to use this feature you have to upgrade your Bootstrap to v3.1.0 or later.
//
// Examples:
// - Use Glyphicons icons:
// icon: {
// valid: 'glyphicon glyphicon-ok',
// invalid: 'glyphicon glyphicon-remove',
// validating: 'glyphicon glyphicon-refresh',
// feedback: 'form-control-feedback'
// }
// - Use FontAwesome icons:
// icon: {
// valid: 'fa fa-check',
// invalid: 'fa fa-times',
// validating: 'fa fa-refresh',
// feedback: 'form-control-feedback'
// }
icon: {
valid: null,
invalid: null,
validating: null,
feedback: 'form-control-feedback'
},
row: {
// By default, each field is placed inside the <div class="form-group"></div>
// http://getbootstrap.com/css/#forms
selector: '.form-group',
valid: 'has-success',
invalid: 'has-error',
feedback: 'has-feedback'
}
}, options);
FormValidation.Base.apply(this, [element, options, namespace]);
};
FormValidation.Framework.Bootstrap.prototype = $.extend({}, FormValidation.Base.prototype, {
/**
* Specific framework might need to adjust the icon position
*
* @param {jQuery} $field The field element
* @param {jQuery} $icon The icon element
*/
_fixIcon: function($field, $icon) {
var ns = this._namespace,
type = $field.attr('type'),
field = $field.attr('data-' + ns + '-field'),
row = this.options.fields[field].row || this.options.row.selector,
$parent = $field.closest(row);
// Place it after the container of checkbox/radio
// so when clicking the icon, it doesn't effect to the checkbox/radio element
if ('checkbox' === type || 'radio' === type) {
var $fieldParent = $field.parent();
if ($fieldParent.hasClass(type)) {
$icon.insertAfter($fieldParent);
} else if ($fieldParent.parent().hasClass(type)) {
$icon.insertAfter($fieldParent.parent());
}
}
// The feedback icon does not render correctly if there is no label
// https://github.com/twbs/bootstrap/issues/12873
if ($parent.find('label').length === 0) {
$icon.addClass('fv-icon-no-label');
}
// Fix feedback icons in input-group
if ($parent.find('.input-group').length !== 0) {
$icon.addClass('fv-bootstrap-icon-input-group')
.insertAfter($parent.find('.input-group').eq(0));
}
},
/**
* Create a tooltip or popover
* It will be shown when focusing on the field
*
* @param {jQuery} $field The field element
* @param {String} message The message
* @param {String} type Can be 'tooltip' or 'popover'
*/
_createTooltip: function($field, message, type) {
var ns = this._namespace,
$icon = $field.data(ns + '.icon');
if ($icon) {
switch (type) {
case 'popover':
$icon
.css({
'cursor': 'pointer',
'pointer-events': 'auto'
})
.popover('destroy')
.popover({
container: 'body',
content: message,
html: true,
placement: 'auto top',
trigger: 'hover click'
});
break;
case 'tooltip':
/* falls through */
default:
$icon
.css({
'cursor': 'pointer',
'pointer-events': 'auto'
})
.tooltip('destroy')
.tooltip({
container: 'body',
html: true,
placement: 'auto top',
title: message
});
break;
}
}
},
/**
* Destroy the tooltip or popover
*
* @param {jQuery} $field The field element
* @param {String} type Can be 'tooltip' or 'popover'
*/
_destroyTooltip: function($field, type) {
var ns = this._namespace,
$icon = $field.data(ns + '.icon');
if ($icon) {
switch (type) {
case 'popover':
$icon
.css({
'cursor': '',
'pointer-events': 'none'
})
.popover('destroy');
break;
case 'tooltip':
/* falls through */
default:
$icon
.css({
'cursor': '',
'pointer-events': 'none'
})
.tooltip('destroy');
break;
}
}
},
/**
* Hide a tooltip or popover
*
* @param {jQuery} $field The field element
* @param {String} type Can be 'tooltip' or 'popover'
*/
_hideTooltip: function($field, type) {
var ns = this._namespace,
$icon = $field.data(ns + '.icon');
if ($icon) {
switch (type) {
case 'popover':
$icon.popover('hide');
break;
case 'tooltip':
/* falls through */
default:
$icon.tooltip('hide');
break;
}
}
},
/**
* Show a tooltip or popover
*
* @param {jQuery} $field The field element
* @param {String} type Can be 'tooltip' or 'popover'
*/
_showTooltip: function($field, type) {
var ns = this._namespace,
$icon = $field.data(ns + '.icon');
if ($icon) {
switch (type) {
case 'popover':
$icon.popover('show');
break;
case 'tooltip':
/* falls through */
default:
$icon.tooltip('show');
break;
}
}
}
});
/**
* Plugin definition
* Support backward
* @deprecated It will be removed soon. Instead of using $(form).bootstrapValidator(), use
* $(form).formValidation({
* framework: 'bootstrap' // It's equivalent to use data-fv-framework="bootstrap" for <form>
* });
*/
$.fn.bootstrapValidator = function(option) {
var params = arguments;
return this.each(function() {
var $this = $(this),
data = $this.data('formValidation') || $this.data('bootstrapValidator'),
options = 'object' === typeof option && option;
if (!data) {
data = new FormValidation.Framework.Bootstrap(this, $.extend({}, {
events: {
// Support backward
formInit: 'init.form.bv',
formError: 'error.form.bv',
formSuccess: 'success.form.bv',
fieldAdded: 'added.field.bv',
fieldRemoved: 'removed.field.bv',
fieldInit: 'init.field.bv',
fieldError: 'error.field.bv',
fieldSuccess: 'success.field.bv',
fieldStatus: 'status.field.bv',
localeChanged: 'changed.locale.bv',
validatorError: 'error.validator.bv',
validatorSuccess: 'success.validator.bv'
}
}, options), 'bv');
$this.addClass('fv-form-bootstrap')
.data('formValidation', data)
.data('bootstrapValidator', data);
}
// Allow to call plugin method
if ('string' === typeof option) {
data[option].apply(data, Array.prototype.slice.call(params, 1));
}
});
};
$.fn.bootstrapValidator.Constructor = FormValidation.Framework.Bootstrap;
return FormValidation.Framework.Bootstrap;
}));

View File

@ -1,177 +0,0 @@
/**
* FormValidation (http://formvalidation.io)
* The best jQuery plugin to validate form fields. Support Bootstrap, Foundation, Pure, SemanticUI, UIKit frameworks
*
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
/**
* This class supports validating Foundation form (http://foundation.zurb.com/)
*/
/* global Foundation: false */
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("framework/foundation", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.Framework.Foundation = function(element, options) {
options = $.extend(true, {
button: {
selector: '[type="submit"]',
// The class for disabled button
// http://foundation.zurb.com/docs/components/buttons.html#button-colors
disabled: 'disabled'
},
err: {
// http://foundation.zurb.com/docs/components/forms.html#error-states
clazz: 'error',
parent: '^.*((small|medium|large)-[0-9]+)\\s.*(columns).*$'
},
// Foundation doesn't support feedback icon
icon: {
valid: null,
invalid: null,
validating: null,
feedback: 'fv-control-feedback'
},
row: {
// http://foundation.zurb.com/docs/components/forms.html
selector: '.row',
valid: 'fv-has-success',
invalid: 'error',
feedback: 'fv-has-feedback'
}
}, options);
FormValidation.Base.apply(this, [element, options]);
};
FormValidation.Framework.Foundation.prototype = $.extend({}, FormValidation.Base.prototype, {
/**
* Specific framework might need to adjust the icon position
*
* @param {jQuery} $field The field element
* @param {jQuery} $icon The icon element
*/
_fixIcon: function($field, $icon) {
var ns = this._namespace,
type = $field.attr('type'),
field = $field.attr('data-' + ns + '-field'),
row = this.options.fields[field].row || this.options.row.selector,
$parent = $field.closest(row);
if ('checkbox' === type || 'radio' === type) {
var $next = $icon.next();
if ($next.is('label')) {
$icon.insertAfter($next);
}
}
if ($parent.find('label').length === 0) {
$icon.addClass('fv-icon-no-label');
}
},
/**
* Create a tooltip or popover
* It will be shown when focusing on the field
*
* @param {jQuery} $field The field element
* @param {String} message The message
* @param {String} type Can be 'tooltip' or 'popover'
*/
_createTooltip: function($field, message, type) {
var that = this,
$icon = $field.data('fv.icon');
if ($icon) {
$icon
.attr('title', message)
.css({
'cursor': 'pointer'
})
.off('mouseenter.container.fv focusin.container.fv')
.on('mouseenter.container.fv', function() {
that._showTooltip($field, type);
})
.off('mouseleave.container.fv focusout.container.fv')
.on('mouseleave.container.fv focusout.container.fv', function() {
that._hideTooltip($field, type);
});
Foundation.libs.tooltip.create($icon);
$icon.data('fv.foundation.tooltip', $icon);
}
},
/**
* Destroy the tooltip or popover
*
* @param {jQuery} $field The field element
* @param {String} type Can be 'tooltip' or 'popover'
*/
_destroyTooltip: function($field, type) {
var $icon = $field.data('fv.icon');
if ($icon) {
$icon.css({
'cursor': ''
});
var $tooltip = $icon.data('fv.foundation.tooltip');
if ($tooltip) {
// Foundation doesn't provide method to destroy particular tooltip instance
$tooltip.off('.fndtn.tooltip');
Foundation.libs.tooltip.hide($tooltip);
$icon.removeData('fv.foundation.tooltip');
}
}
},
/**
* Hide a tooltip or popover
*
* @param {jQuery} $field The field element
* @param {String} type Can be 'tooltip' or 'popover'
*/
_hideTooltip: function($field, type) {
var $icon = $field.data('fv.icon');
if ($icon) {
$icon.css({
'cursor': ''
});
var $tooltip = $icon.data('fv.foundation.tooltip');
if ($tooltip) {
Foundation.libs.tooltip.hide($tooltip);
}
}
},
/**
* Show a tooltip or popover
*
* @param {jQuery} $field The field element
* @param {String} type Can be 'tooltip' or 'popover'
*/
_showTooltip: function($field, type) {
var $icon = $field.data('fv.icon');
if ($icon) {
var $tooltip = $icon.data('fv.foundation.tooltip');
if ($tooltip) {
$icon.css({
'cursor': 'pointer'
});
Foundation.libs.tooltip.show($tooltip);
}
}
}
});
return FormValidation.Framework.Foundation;
}));

View File

@ -1,78 +0,0 @@
/**
* FormValidation (http://formvalidation.io)
* The best jQuery plugin to validate form fields. Support Bootstrap, Foundation, Pure, SemanticUI, UIKit frameworks
*
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
/**
* This class supports validating Pure framework (http://purecss.io/)
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("framework/pure", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.Framework.Pure = function(element, options) {
options = $.extend(true, {
button: {
selector: '[type="submit"]',
// The class of disabled button
// http://purecss.io/buttons/#disabled-buttons
disabled: 'pure-button-disabled'
},
err: {
clazz: 'fv-help-block',
parent: '^.*pure-control-group.*$'
},
// Pure doesn't support feedback icon
icon: {
valid: null,
invalid: null,
validating: null,
feedback: 'fv-control-feedback'
},
row: {
// http://purecss.io/forms/#aligned-form
selector: '.pure-control-group',
valid: 'fv-has-success',
invalid: 'fv-has-error',
feedback: 'fv-has-feedback'
}
}, options);
FormValidation.Base.apply(this, [element, options]);
};
FormValidation.Framework.Pure.prototype = $.extend({}, FormValidation.Base.prototype, {
/**
* Specific framework might need to adjust the icon position
*
* @param {jQuery} $field The field element
* @param {jQuery} $icon The icon element
*/
_fixIcon: function($field, $icon) {
var ns = this._namespace,
type = $field.attr('type'),
field = $field.attr('data-' + ns + '-field'),
row = this.options.fields[field].row || this.options.row.selector,
$parent = $field.closest(row);
if ($parent.find('label').length === 0) {
$icon.addClass('fv-icon-no-label');
}
}
});
return FormValidation.Framework.Pure;
}));

View File

@ -1,177 +0,0 @@
/**
* FormValidation (http://formvalidation.io)
* The best jQuery plugin to validate form fields. Support Bootstrap, Foundation, Pure, SemanticUI, UIKit frameworks
*
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
/**
* This class supports validating SemanticUI form (http://semantic-ui.com/)
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("framework/semantic", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.Framework.Semantic = function(element, options) {
options = $.extend(true, {
button: {
selector: '[type="submit"]',
// CSS class of disabled button
// http://semantic-ui.com/elements/button.html#disabled
disabled: 'disabled'
},
control: {
valid: '',
invalid: ''
},
err: {
// http://semantic-ui.com/elements/label.html#pointing
clazz: 'ui red pointing label transition',
parent: '^.*(field|column).*$'
},
// When using feedback icon, the input must place inside 'ui input icon' element
// <div class="ui input icon">
// <input type="text" />
// </div>
// See http://semantic-ui.com/elements/input.html#icon
icon: {
// http://semantic-ui.com/elements/icon.html
valid: null, // 'checkmark icon'
invalid: null, // 'remove icon'
validating: null, // 'refresh icon'
feedback: 'fv-control-feedback'
},
row: {
// http://semantic-ui.com/collections/form.html
selector: '.field',
valid: 'fv-has-success',
invalid: 'error',
feedback: 'fv-has-feedback'
}
}, options);
FormValidation.Base.apply(this, [element, options]);
};
FormValidation.Framework.Semantic.prototype = $.extend({}, FormValidation.Base.prototype, {
/**
* Specific framework might need to adjust the icon position
*
* @param {jQuery} $field The field element
* @param {jQuery} $icon The icon element
*/
_fixIcon: function($field, $icon) {
var type = $field.attr('type');
if ('checkbox' === type || 'radio' === type) {
var $fieldParent = $field.parent();
if ($fieldParent.hasClass(type)) {
$icon.insertAfter($fieldParent);
}
}
},
/**
* Create a tooltip or popover
* It will be shown when focusing on the field
*
* @param {jQuery} $field The field element
* @param {String} message The message
* @param {String} type Can be 'tooltip' or 'popover'
*/
_createTooltip: function($field, message, type) {
var $icon = $field.data('fv.icon');
if ($icon) {
// Remove the popup if it's already exists
if ($icon.popup('exists')) {
$icon.popup('remove popup')
.popup('destroy');
}
// http://semantic-ui.com/modules/popup.html
switch (type) {
case 'popover':
$icon
.css({
'cursor': 'pointer'
})
.popup({
content: message,
position: 'top center'
});
break;
case 'tooltip':
/* falls through */
default:
$icon
.css({
'cursor': 'pointer'
})
.popup({
content: message,
position: 'top center',
variation: 'inverted'
});
break;
}
}
},
/**
* Destroy the tooltip or popover
*
* @param {jQuery} $field The field element
* @param {String} type Can be 'tooltip' or 'popover'
*/
_destroyTooltip: function($field, type) {
var $icon = $field.data('fv.icon');
if ($icon && $icon.popup('exists')) {
$icon
.css({
'cursor': ''
})
.popup('remove popup')
.popup('destroy');
}
},
/**
* Hide a tooltip or popover
*
* @param {jQuery} $field The field element
* @param {String} type Can be 'tooltip' or 'popover'
*/
_hideTooltip: function($field, type) {
var $icon = $field.data('fv.icon');
if ($icon) {
$icon.popup('hide');
}
},
/**
* Show a tooltip or popover
*
* @param {jQuery} $field The field element
* @param {String} type Can be 'tooltip' or 'popover'
*/
_showTooltip: function($field, type) {
var $icon = $field.data('fv.icon');
if ($icon) {
$icon.popup('show');
}
}
});
return FormValidation.Framework.Semantic;
}));

View File

@ -1,179 +0,0 @@
/**
* FormValidation (http://formvalidation.io)
* The best jQuery plugin to validate form fields. Support Bootstrap, Foundation, Pure, SemanticUI, UIKit frameworks
*
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
/**
* This class supports validating UIKit form (http://getuikit.com/)
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("framework/uikit", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.Framework.UIKit = function(element, options) {
options = $.extend(true, {
button: {
selector: '[type="submit"]',
// The class for disabled button
// http://getuikit.com/docs/button.html
disabled: 'disabled'
},
control: {
valid: 'uk-form-success',
invalid: 'uk-form-danger'
},
err: {
// http://getuikit.com/docs/text.html#text-styles
clazz: 'uk-text-danger',
parent: '^.*(uk-form-controls|uk-width-[\\d+]-[\\d+]).*$'
},
// UIKit doesn't support feedback icon
icon: {
valid: null,
invalid: null,
validating: null,
feedback: 'fv-control-feedback'
},
row: {
// http://getuikit.com/docs/form.html
selector: '.uk-form-row',
valid: 'fv-has-success',
invalid: 'fv-has-error',
feedback: 'fv-has-feedback'
}
}, options);
FormValidation.Base.apply(this, [element, options]);
};
FormValidation.Framework.UIKit.prototype = $.extend({}, FormValidation.Base.prototype, {
/**
* Specific framework might need to adjust the icon position
*
* @param {jQuery} $field The field element
* @param {jQuery} $icon The icon element
*/
_fixIcon: function($field, $icon) {
var ns = this._namespace,
type = $field.attr('type'),
field = $field.attr('data-' + ns + '-field'),
row = this.options.fields[field].row || this.options.row.selector,
$parent = $field.closest(row);
if ('checkbox' === type || 'radio' === type) {
var $fieldParent = $field.parent();
if ($fieldParent.is('label')) {
$icon.insertAfter($fieldParent);
}
}
if ($parent.find('label').length === 0) {
$icon.addClass('fv-icon-no-label');
}
},
/**
* Create a tooltip or popover
* It will be shown when focusing on the field
*
* @param {jQuery} $field The field element
* @param {String} message The message
* @param {String} type Can be 'tooltip' or 'popover'
*/
_createTooltip: function($field, message, type) {
var $icon = $field.data('fv.icon');
if ($icon) {
// Remove the tooltip if it's already exists
if ($icon.data('tooltip')) {
$icon.data('tooltip').off();
$icon.removeData('tooltip');
}
$icon
.attr('title', message)
.css({
'cursor': 'pointer'
});
new $.UIkit.tooltip($icon);
// UIKit auto set the 'tooltip' data for the element
// so I can retrieve the tooltip later via $icon.data('tooltip')
}
},
/**
* Destroy the tooltip or popover
*
* @param {jQuery} $field The field element
* @param {String} type Can be 'tooltip' or 'popover'
*/
_destroyTooltip: function($field, type) {
var $icon = $field.data('fv.icon');
if ($icon) {
var tooltip = $icon.data('tooltip');
if (tooltip) {
tooltip.hide();
tooltip.off();
$icon.off('focus mouseenter')
.removeData('tooltip');
}
$icon.css({
'cursor': ''
});
}
},
/**
* Hide a tooltip or popover
*
* @param {jQuery} $field The field element
* @param {String} type Can be 'tooltip' or 'popover'
*/
_hideTooltip: function($field, type) {
var $icon = $field.data('fv.icon');
if ($icon) {
var tooltip = $icon.data('tooltip');
if (tooltip) {
tooltip.hide();
}
$icon.css({
'cursor': ''
});
}
},
/**
* Show a tooltip or popover
*
* @param {jQuery} $field The field element
* @param {String} type Can be 'tooltip' or 'popover'
*/
_showTooltip: function($field, type) {
var $icon = $field.data('fv.icon');
if ($icon) {
$icon.css({
'cursor': 'pointer'
});
var tooltip = $icon.data('tooltip');
if (tooltip) {
tooltip.show();
}
}
}
});
return FormValidation.Framework.UIKit;
}));

View File

@ -1,181 +0,0 @@
/**
* FormValidation (http://formvalidation.io)
* The best jQuery plugin to validate form fields. Support Bootstrap, Foundation, Pure, SemanticUI, UIKit frameworks
*
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("helper", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
// Helper methods, which can be used in validator class
FormValidation.Helper = {
/**
* Execute a callback function
*
* @param {String|Function} functionName Can be
* - name of global function
* - name of namespace function (such as A.B.C)
* - a function
* @param {Array} args The callback arguments
*/
call: function(functionName, args) {
if ('function' === typeof functionName) {
return functionName.apply(this, args);
} else if ('string' === typeof functionName) {
if ('()' === functionName.substring(functionName.length - 2)) {
functionName = functionName.substring(0, functionName.length - 2);
}
var ns = functionName.split('.'),
func = ns.pop(),
context = window;
for (var i = 0; i < ns.length; i++) {
context = context[ns[i]];
}
return (typeof context[func] === 'undefined') ? null : context[func].apply(this, args);
}
},
/**
* Validate a date
*
* @param {Number} year The full year in 4 digits
* @param {Number} month The month number
* @param {Number} day The day number
* @param {Boolean} [notInFuture] If true, the date must not be in the future
* @returns {Boolean}
*/
date: function(year, month, day, notInFuture) {
if (isNaN(year) || isNaN(month) || isNaN(day)) {
return false;
}
if (day.length > 2 || month.length > 2 || year.length > 4) {
return false;
}
day = parseInt(day, 10);
month = parseInt(month, 10);
year = parseInt(year, 10);
if (year < 1000 || year > 9999 || month <= 0 || month > 12) {
return false;
}
var numDays = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
// Update the number of days in Feb of leap year
if (year % 400 === 0 || (year % 100 !== 0 && year % 4 === 0)) {
numDays[1] = 29;
}
// Check the day
if (day <= 0 || day > numDays[month - 1]) {
return false;
}
if (notInFuture === true) {
var currentDate = new Date(),
currentYear = currentDate.getFullYear(),
currentMonth = currentDate.getMonth(),
currentDay = currentDate.getDate();
return (year < currentYear
|| (year === currentYear && month - 1 < currentMonth)
|| (year === currentYear && month - 1 === currentMonth && day < currentDay));
}
return true;
},
/**
* Format a string
* It's used to format the error message
* format('The field must between %s and %s', [10, 20]) = 'The field must between 10 and 20'
*
* @param {String} message
* @param {Array} parameters
* @returns {String}
*/
format: function(message, parameters) {
if (!$.isArray(parameters)) {
parameters = [parameters];
}
for (var i in parameters) {
message = message.replace('%s', parameters[i]);
}
return message;
},
/**
* Implement Luhn validation algorithm
* Credit to https://gist.github.com/ShirtlessKirk/2134376
*
* @see http://en.wikipedia.org/wiki/Luhn
* @param {String} value
* @returns {Boolean}
*/
luhn: function(value) {
var length = value.length,
mul = 0,
prodArr = [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9], [0, 2, 4, 6, 8, 1, 3, 5, 7, 9]],
sum = 0;
while (length--) {
sum += prodArr[mul][parseInt(value.charAt(length), 10)];
mul ^= 1;
}
return (sum % 10 === 0 && sum > 0);
},
/**
* Implement modulus 11, 10 (ISO 7064) algorithm
*
* @param {String} value
* @returns {Boolean}
*/
mod11And10: function(value) {
var check = 5,
length = value.length;
for (var i = 0; i < length; i++) {
check = (((check || 10) * 2) % 11 + parseInt(value.charAt(i), 10)) % 10;
}
return (check === 1);
},
/**
* Implements Mod 37, 36 (ISO 7064) algorithm
* Usages:
* mod37And36('A12425GABC1234002M')
* mod37And36('002006673085', '0123456789')
*
* @param {String} value
* @param {String} [alphabet]
* @returns {Boolean}
*/
mod37And36: function(value, alphabet) {
alphabet = alphabet || '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
var modulus = alphabet.length,
length = value.length,
check = Math.floor(modulus / 2);
for (var i = 0; i < length; i++) {
check = (((check || modulus) * 2) % (modulus + 1) + alphabet.indexOf(value.charAt(i))) % modulus;
}
return (check === 1);
}
};
return FormValidation.Helper;
}));

View File

@ -1,391 +0,0 @@
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("language/zh_CN", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
/**
* Simplified Chinese language package
* Translated by @shamiao
*/
FormValidation.I18n = $.extend(true, FormValidation.I18n, {
'zh_CN': {
base64: {
'default': '请输入有效的Base64编码'
},
between: {
'default': '请输入在 %s 和 %s 之间的数值',
notInclusive: '请输入在 %s 和 %s 之间(不含两端)的数值'
},
bic: {
'default': '请输入有效的BIC商品编码'
},
callback: {
'default': '请输入有效的值'
},
choice: {
'default': '请输入有效的值',
less: '请至少选中 %s 个选项',
more: '最多只能选中 %s 个选项',
between: '请选择 %s 至 %s 个选项'
},
color: {
'default': '请输入有效的颜色值'
},
creditCard: {
'default': '请输入有效的信用卡号码'
},
cusip: {
'default': '请输入有效的美国CUSIP代码'
},
cvv: {
'default': '请输入有效的CVV代码'
},
date: {
'default': '请输入有效的日期',
min: '请输入 %s 或之后的日期',
max: '请输入 %s 或以前的日期',
range: '请输入 %s 和 %s 之间的日期'
},
different: {
'default': '请输入不同的值'
},
digits: {
'default': '请输入有效的数字'
},
ean: {
'default': '请输入有效的EAN商品编码'
},
ein: {
'default': '请输入有效的EIN商品编码'
},
emailAddress: {
'default': '请输入有效的邮件地址'
},
file: {
'default': '请选择有效的文件'
},
greaterThan: {
'default': '请输入大于等于 %s 的数值',
notInclusive: '请输入大于 %s 的数值'
},
grid: {
'default': '请输入有效的GRId编码'
},
hex: {
'default': '请输入有效的16进制数'
},
iban: {
'default': '请输入有效的IBAN(国际银行账户)号码',
country: '请输入有效的 %s 国家或地区的IBAN(国际银行账户)号码',
countries: {
AD: '安道​​尔',
AE: '阿联酋',
AL: '阿尔巴尼亚',
AO: '安哥拉',
AT: '奥地利',
AZ: '阿塞拜疆',
BA: '波斯尼亚和黑塞哥维那',
BE: '比利时',
BF: '布基纳法索',
BG: '保加利亚',
BH: '巴林',
BI: '布隆迪',
BJ: '贝宁',
BR: '巴西',
CH: '瑞士',
CI: '科特迪瓦',
CM: '喀麦隆',
CR: '哥斯达黎加',
CV: '佛得角',
CY: '塞浦路斯',
CZ: '捷克共和国',
DE: '德国',
DK: '丹麦',
DO: '多米尼加共和国',
DZ: '阿尔及利亚',
EE: '爱沙尼亚',
ES: '西班牙',
FI: '芬兰',
FO: '法罗群岛',
FR: '法国',
GB: '英国',
GE: '格鲁吉亚',
GI: '直布罗陀',
GL: '格陵兰岛',
GR: '希腊',
GT: '危地马拉',
HR: '克罗地亚',
HU: '匈牙利',
IE: '爱尔兰',
IL: '以色列',
IR: '伊朗',
IS: '冰岛',
IT: '意大利',
JO: '约旦',
KW: '科威特',
KZ: '哈萨克斯坦',
LB: '黎巴嫩',
LI: '列支敦士登',
LT: '立陶宛',
LU: '卢森堡',
LV: '拉脱维亚',
MC: '摩纳哥',
MD: '摩尔多瓦',
ME: '黑山',
MG: '马达加斯加',
MK: '马其顿',
ML: '马里',
MR: '毛里塔尼亚',
MT: '马耳他',
MU: '毛里求斯',
MZ: '莫桑比克',
NL: '荷兰',
NO: '挪威',
PK: '巴基斯坦',
PL: '波兰',
PS: '巴勒斯坦',
PT: '葡萄牙',
QA: '卡塔尔',
RO: '罗马尼亚',
RS: '塞尔维亚',
SA: '沙特阿拉伯',
SE: '瑞典',
SI: '斯洛文尼亚',
SK: '斯洛伐克',
SM: '圣马力诺',
SN: '塞内加尔',
TN: '突尼斯',
TR: '土耳其',
VG: '英属维尔京群岛'
}
},
id: {
'default': '请输入有效的身份证件号码',
country: '请输入有效的 %s 国家或地区的身份证件号码',
countries: {
BA: '波黑',
BG: '保加利亚',
BR: '巴西',
CH: '瑞士',
CL: '智利',
CN: '中国',
CZ: '捷克共和国',
DK: '丹麦',
EE: '爱沙尼亚',
ES: '西班牙',
FI: '芬兰',
HR: '克罗地亚',
IE: '爱尔兰',
IS: '冰岛',
LT: '立陶宛',
LV: '拉脱维亚',
ME: '黑山',
MK: '马其顿',
NL: '荷兰',
RO: '罗马尼亚',
RS: '塞尔维亚',
SE: '瑞典',
SI: '斯洛文尼亚',
SK: '斯洛伐克',
SM: '圣马力诺',
TH: '泰国',
ZA: '南非'
}
},
identical: {
'default': '请输入相同的值'
},
imei: {
'default': '请输入有效的IMEI(手机串号)'
},
imo: {
'default': '请输入有效的国际海事组织(IMO)号码'
},
integer: {
'default': '请输入有效的整数值'
},
ip: {
'default': '请输入有效的IP地址',
ipv4: '请输入有效的IPv4地址',
ipv6: '请输入有效的IPv6地址'
},
isbn: {
'default': '请输入有效的ISBN(国际标准书号)'
},
isin: {
'default': '请输入有效的ISIN(国际证券编码)'
},
ismn: {
'default': '请输入有效的ISMN(印刷音乐作品编码)'
},
issn: {
'default': '请输入有效的ISSN(国际标准杂志书号)'
},
lessThan: {
'default': '请输入小于等于 %s 的数值',
notInclusive: '请输入小于 %s 的数值'
},
mac: {
'default': '请输入有效的MAC物理地址'
},
meid: {
'default': '请输入有效的MEID(移动设备识别码)'
},
notEmpty: {
'default': '请填写必填项目'
},
numeric: {
'default': '请输入有效的数值,允许小数'
},
phone: {
'default': '请输入有效的电话号码',
country: '请输入有效的 %s 国家或地区的电话号码',
countries: {
AE: '阿联酋',
BG: '保加利亚',
BR: '巴西',
CN: '中国',
CZ: '捷克共和国',
DE: '德国',
DK: '丹麦',
ES: '西班牙',
FR: '法国',
GB: '英国',
IN: '印度',
MA: '摩洛哥',
NL: '荷兰',
PK: '巴基斯坦',
RO: '罗马尼亚',
RU: '俄罗斯',
SK: '斯洛伐克',
TH: '泰国',
US: '美国',
VE: '委内瑞拉'
}
},
regexp: {
'default': '请输入符合正则表达式限制的值'
},
remote: {
'default': '请输入有效的值'
},
rtn: {
'default': '请输入有效的RTN号码'
},
sedol: {
'default': '请输入有效的SEDOL代码'
},
siren: {
'default': '请输入有效的SIREN号码'
},
siret: {
'default': '请输入有效的SIRET号码'
},
step: {
'default': '请输入在基础值上,增加 %s 的整数倍的数值'
},
stringCase: {
'default': '只能输入小写字母',
upper: '只能输入大写字母'
},
stringLength: {
'default': '请输入符合长度限制的值',
less: '最多只能输入 %s 个字符',
more: '需要输入至少 %s 个字符',
between: '请输入 %s 至 %s 个字符'
},
uri: {
'default': '请输入一个有效的URL地址'
},
uuid: {
'default': '请输入有效的UUID',
version: '请输入版本 %s 的UUID'
},
vat: {
'default': '请输入有效的VAT(税号)',
country: '请输入有效的 %s 国家或地区的VAT(税号)',
countries: {
AT: '奥地利',
BE: '比利时',
BG: '保加利亚',
BR: '巴西',
CH: '瑞士',
CY: '塞浦路斯',
CZ: '捷克共和国',
DE: '德国',
DK: '丹麦',
EE: '爱沙尼亚',
ES: '西班牙',
FI: '芬兰',
FR: '法语',
GB: '英国',
GR: '希腊',
EL: '希腊',
HU: '匈牙利',
HR: '克罗地亚',
IE: '爱尔兰',
IS: '冰岛',
IT: '意大利',
LT: '立陶宛',
LU: '卢森堡',
LV: '拉脱维亚',
MT: '马耳他',
NL: '荷兰',
NO: '挪威',
PL: '波兰',
PT: '葡萄牙',
RO: '罗马尼亚',
RU: '俄罗斯',
RS: '塞尔维亚',
SE: '瑞典',
SI: '斯洛文尼亚',
SK: '斯洛伐克',
VE: '委内瑞拉',
ZA: '南非'
}
},
vin: {
'default': '请输入有效的VIN(美国车辆识别号码)'
},
zipCode: {
'default': '请输入有效的邮政编码',
country: '请输入有效的 %s 国家或地区的邮政编码',
countries: {
AT: '奥地利',
BG: '保加利亚',
BR: '巴西',
CA: '加拿大',
CH: '瑞士',
CZ: '捷克共和国',
DE: '德国',
DK: '丹麦',
ES: '西班牙',
FR: '法国',
GB: '英国',
IE: '爱尔兰',
IN: '印度',
IT: '意大利',
MA: '摩洛哥',
NL: '荷兰',
PT: '葡萄牙',
RO: '罗马尼亚',
RU: '俄罗斯',
SE: '瑞典',
SG: '新加坡',
SK: '斯洛伐克',
US: '美国'
}
}
}
});
return FormValidation.I18n.zh_CN;
}));

View File

@ -1,391 +0,0 @@
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("language/zh_TW", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
/**
* Traditional Chinese language package
* Translated by @tureki
*/
FormValidation.I18n = $.extend(true, FormValidation.I18n, {
'zh_TW': {
base64: {
'default': '請輸入有效的Base64編碼'
},
between: {
'default': '請輸入不小於 %s 且不大於 %s 的值',
notInclusive: '請輸入不小於等於 %s 且不大於等於 %s 的值'
},
bic: {
'default': '請輸入有效的BIC商品編碼'
},
callback: {
'default': '請輸入有效的值'
},
choice: {
'default': '請輸入有效的值',
less: '最少選擇 %s 個選項',
more: '最多選擇 %s 個選項',
between: '請選擇 %s 至 %s 個選項'
},
color: {
'default': '請輸入有效的元色碼'
},
creditCard: {
'default': '請輸入有效的信用卡號碼'
},
cusip: {
'default': '請輸入有效的CUSIP(美國證券庫斯普)號碼'
},
cvv: {
'default': '請輸入有效的CVV(信用卡檢查碼)代碼'
},
date: {
'default': '請輸入有效的日期',
min: '請輸入 %s 或之後的日期',
max: '請輸入 %s 或以前的日期',
range: '請輸入 %s 至 %s 之間的日期'
},
different: {
'default': '請輸入不同的值'
},
digits: {
'default': '只能輸入數字'
},
ean: {
'default': '請輸入有效的EAN商品編碼'
},
ein: {
'default': '請輸入有效的EIN商品編碼'
},
emailAddress: {
'default': '請輸入有效的EMAIL'
},
file: {
'default': '請選擇有效的檔案'
},
greaterThan: {
'default': '請輸入大於等於 %s 的值',
notInclusive: '請輸入大於 %s 的值'
},
grid: {
'default': '請輸入有效的GRId編碼'
},
hex: {
'default': '請輸入有效的16位元碼'
},
iban: {
'default': '請輸入有效的IBAN(國際銀行賬戶)號碼',
country: '請輸入有效的 %s 國家的IBAN(國際銀行賬戶)號碼',
countries: {
AD: '安道​​爾',
AE: '阿聯酋',
AL: '阿爾巴尼亞',
AO: '安哥拉',
AT: '奧地利',
AZ: '阿塞拜疆',
BA: '波斯尼亞和黑塞哥維那',
BE: '比利時',
BF: '布基納法索',
BG: '保加利亞',
BH: '巴林',
BI: '布隆迪',
BJ: '貝寧',
BR: '巴西',
CH: '瑞士',
CI: '象牙海岸',
CM: '喀麥隆',
CR: '哥斯達黎加',
CV: '佛得角',
CY: '塞浦路斯',
CZ: '捷克共和國',
DE: '德國',
DK: '丹麥',
DO: '多明尼加共和國',
DZ: '阿爾及利亞',
EE: '愛沙尼亞',
ES: '西班牙',
FI: '芬蘭',
FO: '法羅群島',
FR: '法國',
GB: '英國',
GE: '格魯吉亞',
GI: '直布羅陀',
GL: '格陵蘭島',
GR: '希臘',
GT: '危地馬拉',
HR: '克羅地亞',
HU: '匈牙利',
IE: '愛爾蘭',
IL: '以色列',
IR: '伊朗',
IS: '冰島',
IT: '意大利',
JO: '約旦',
KW: '科威特',
KZ: '哈薩克斯坦',
LB: '黎巴嫩',
LI: '列支敦士登',
LT: '立陶宛',
LU: '盧森堡',
LV: '拉脫維亞',
MC: '摩納哥',
MD: '摩爾多瓦',
ME: '蒙特內哥羅',
MG: '馬達加斯加',
MK: '馬其頓',
ML: '馬里',
MR: '毛里塔尼亞',
MT: '馬耳他',
MU: '毛里求斯',
MZ: '莫桑比克',
NL: '荷蘭',
NO: '挪威',
PK: '巴基斯坦',
PL: '波蘭',
PS: '巴勒斯坦',
PT: '葡萄牙',
QA: '卡塔爾',
RO: '羅馬尼亞',
RS: '塞爾維亞',
SA: '沙特阿拉伯',
SE: '瑞典',
SI: '斯洛文尼亞',
SK: '斯洛伐克',
SM: '聖馬力諾',
SN: '塞內加爾',
TN: '突尼斯',
TR: '土耳其',
VG: '英屬維爾京群島'
}
},
id: {
'default': '請輸入有效的身份證字號',
country: '請輸入有效的 %s 身份證字號',
countries: {
BA: '波赫',
BG: '保加利亞',
BR: '巴西',
CH: '瑞士',
CL: '智利',
CN: '中國',
CZ: '捷克共和國',
DK: '丹麥',
EE: '愛沙尼亞',
ES: '西班牙',
FI: '芬蘭',
HR: '克羅地亞',
IE: '愛爾蘭',
IS: '冰島',
LT: '立陶宛',
LV: '拉脫維亞',
ME: '蒙特內哥羅',
MK: '馬其頓',
NL: '荷蘭',
RO: '羅馬尼亞',
RS: '塞爾維亞',
SE: '瑞典',
SI: '斯洛文尼亞',
SK: '斯洛伐克',
SM: '聖馬力諾',
TH: '泰國',
ZA: '南非'
}
},
identical: {
'default': '請輸入相同的值'
},
imei: {
'default': '請輸入有效的IMEI(手機序列號)'
},
imo: {
'default': '請輸入有效的國際海事組織(IMO)號碼'
},
integer: {
'default': '請輸入有效的整數'
},
ip: {
'default': '請輸入有效的IP位址',
ipv4: '請輸入有效的IPv4位址',
ipv6: '請輸入有效的IPv6位址'
},
isbn: {
'default': '請輸入有效的ISBN(國際標準書號)'
},
isin: {
'default': '請輸入有效的ISIN(國際證券號碼)'
},
ismn: {
'default': '請輸入有效的ISMN(國際標準音樂編號)'
},
issn: {
'default': '請輸入有效的ISSN(國際標準期刊號)'
},
lessThan: {
'default': '請輸入小於等於 %s 的值',
notInclusive: '請輸入小於 %s 的值'
},
mac: {
'default': '請輸入有效的MAC位址'
},
meid: {
'default': '請輸入有效的MEID(行動設備識別碼)'
},
notEmpty: {
'default': '請填寫必填欄位'
},
numeric: {
'default': '請輸入有效的數字(含浮點數)'
},
phone: {
'default': '請輸入有效的電話號碼',
country: '請輸入有效的 %s 國家的電話號碼',
countries: {
AE: '阿聯酋',
BG: '保加利亞',
BR: '巴西',
CN: '中国',
CZ: '捷克共和國',
DE: '德國',
DK: '丹麥',
ES: '西班牙',
FR: '法國',
GB: '英國',
IN: '印度',
MA: '摩洛哥',
NL: '荷蘭',
PK: '巴基斯坦',
RO: '罗马尼亚',
RU: '俄羅斯',
SK: '斯洛伐克',
TH: '泰國',
US: '美國',
VE: '委内瑞拉'
}
},
regexp: {
'default': '請輸入符合正規表示式所限制的值'
},
remote: {
'default': '請輸入有效的值'
},
rtn: {
'default': '請輸入有效的RTN號碼'
},
sedol: {
'default': '請輸入有效的SEDOL代碼'
},
siren: {
'default': '請輸入有效的SIREN號碼'
},
siret: {
'default': '請輸入有效的SIRET號碼'
},
step: {
'default': '請輸入 %s 的倍數'
},
stringCase: {
'default': '只能輸入小寫字母',
upper: '只能輸入大寫字母'
},
stringLength: {
'default': '請輸入符合長度限制的值',
less: '請輸入小於 %s 個字',
more: '請輸入大於 %s 個字',
between: '請輸入 %s 至 %s 個字'
},
uri: {
'default': '請輸入一個有效的鏈接'
},
uuid: {
'default': '請輸入有效的UUID',
version: '請輸入版本 %s 的UUID'
},
vat: {
'default': '請輸入有效的VAT(增值税)',
country: '請輸入有效的 %s 國家的VAT(增值税)',
countries: {
AT: '奧地利',
BE: '比利時',
BG: '保加利亞',
BR: '巴西',
CH: '瑞士',
CY: '塞浦路斯',
CZ: '捷克共和國',
DE: '德國',
DK: '丹麥',
EE: '愛沙尼亞',
ES: '西班牙',
FI: '芬蘭',
FR: '法語',
GB: '英國',
GR: '希臘',
EL: '希臘',
HU: '匈牙利',
HR: '克羅地亞',
IE: '愛爾蘭',
IS: '冰島',
IT: '意大利',
LT: '立陶宛',
LU: '盧森堡',
LV: '拉脫維亞',
MT: '馬耳他',
NL: '荷蘭',
NO: '挪威',
PL: '波蘭',
PT: '葡萄牙',
RO: '羅馬尼亞',
RU: '俄羅斯',
RS: '塞爾維亞',
SE: '瑞典',
SI: '斯洛文尼亞',
SK: '斯洛伐克',
VE: '委内瑞拉',
ZA: '南非'
}
},
vin: {
'default': '請輸入有效的VIN(車輛識別號碼)'
},
zipCode: {
'default': '請輸入有效的郵政編碼',
country: '請輸入有效的 %s 國家的郵政編碼',
countries: {
AT: '奧地利',
BG: '保加利亞',
BR: '巴西',
CA: '加拿大',
CH: '瑞士',
CZ: '捷克共和國',
DE: '德國',
DK: '丹麥',
ES: '西班牙',
FR: '法國',
GB: '英國',
IE: '愛爾蘭',
IN: '印度',
IT: '意大利',
MA: '摩洛哥',
NL: '荷蘭',
PT: '葡萄牙',
RO: '羅馬尼亞',
RU: '俄羅斯',
SE: '瑞典',
SG: '新加坡',
SK: '斯洛伐克',
US: '美國'
}
}
}
});
return FormValidation.I18n.zh_TW;
}));

View File

@ -1,52 +0,0 @@
/**
* base64 validator
*
* @link http://formvalidation.io/validators/base64/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/XXXXXXXXXXXXXXXXXXXXXXXXXbase64", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
base64: {
'default': 'Please enter a valid base 64 encoded'
}
}
});
FormValidation.Validator.base64 = {
/**
* Return true if the input value is a base 64 encoded string.
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - message: The invalid message
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'base64');
if (value === '') {
return true;
}
return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$/.test(value);
}
};
return FormValidation.Validator.base64;
}));

View File

@ -1,105 +0,0 @@
/**
* between validator
*
* @link http://formvalidation.io/validators/between/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/between", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
between: {
'default': 'Please enter a value between %s and %s',
notInclusive: 'Please enter a value between %s and %s strictly'
}
}
});
FormValidation.Validator.between = {
html5Attributes: {
message: 'message',
min: 'min',
max: 'max',
inclusive: 'inclusive'
},
enableByHtml5: function($field) {
if ('range' === $field.attr('type')) {
return {
min: $field.attr('min'),
max: $field.attr('max')
};
}
return false;
},
/**
* Return true if the input value is between (strictly or not) two given numbers
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - min
* - max
*
* The min, max keys define the number which the field value compares to. min, max can be
* - A number
* - Name of field which its value defines the number
* - Name of callback function that returns the number
* - A callback function that returns the number
*
* - inclusive [optional]: Can be true or false. Default is true
* - message: The invalid message
* @returns {Boolean|Object}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'between');
if (value === '') {
return true;
}
value = this._format(value);
if (!$.isNumeric(value)) {
return false;
}
var locale = validator.getLocale(),
min = $.isNumeric(options.min) ? options.min : validator.getDynamicOption($field, options.min),
max = $.isNumeric(options.max) ? options.max : validator.getDynamicOption($field, options.max),
minValue = this._format(min),
maxValue = this._format(max);
value = parseFloat(value);
return (options.inclusive === true || options.inclusive === undefined)
? {
valid: value >= minValue && value <= maxValue,
message: FormValidation.Helper.format(options.message || FormValidation.I18n[locale].between['default'], [min, max])
}
: {
valid: value > minValue && value < maxValue,
message: FormValidation.Helper.format(options.message || FormValidation.I18n[locale].between.notInclusive, [min, max])
};
},
_format: function(value) {
return (value + '').replace(',', '.');
}
};
return FormValidation.Validator.between;
}));

View File

@ -1,55 +0,0 @@
/**
* bic validator
*
* @link http://formvalidation.io/validators/bic/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/bic", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
bic: {
'default': 'Please enter a valid BIC number'
}
}
});
FormValidation.Validator.bic = {
/**
* Validate an Business Identifier Code (BIC), also known as ISO 9362, SWIFT-BIC, SWIFT ID or SWIFT code
*
* For more information see http://en.wikipedia.org/wiki/ISO_9362
*
* @todo The 5 and 6 characters are an ISO 3166-1 country code, this could also be validated
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - message: The invalid message
* @returns {Object}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'bic');
if (value === '') {
return true;
}
return /^[a-zA-Z]{6}[a-zA-Z0-9]{2}([a-zA-Z0-9]{3})?$/.test(value);
}
};
return FormValidation.Validator.bic;
}));

View File

@ -1,52 +0,0 @@
/**
* blank validator
*
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/blank", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.Validator.blank = {
/**
* Placeholder validator that can be used to display a custom validation message
* returned from the server
* Example:
*
* (1) a "blank" validator is applied to an input field.
* (2) data is entered via the UI that is unable to be validated client-side.
* (3) server returns a 400 with JSON data that contains the field that failed
* validation and an associated message.
* (4) ajax 400 call handler does the following:
*
* bv.updateMessage(field, 'blank', errorMessage);
* bv.updateStatus(field, 'INVALID');
*
* @see https://github.com/formvalidation/formvalidation/issues/542
* @see https://github.com/formvalidation/formvalidation/pull/666
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - message: The invalid message
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
return true;
}
};
return FormValidation.Validator.blank;
}));

View File

@ -1,69 +0,0 @@
/**
* callback validator
*
* @link http://formvalidation.io/validators/callback/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/callback", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
callback: {
'default': 'Please enter a valid value'
}
}
});
FormValidation.Validator.callback = {
html5Attributes: {
message: 'message',
callback: 'callback'
},
/**
* Return result from the callback method
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - callback: The callback method that passes 2 parameters:
* callback: function(fieldValue, validator, $field) {
* // fieldValue is the value of field
* // validator is instance of BootstrapValidator
* // $field is the field element
* }
* - message: The invalid message
* @returns {Deferred}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'callback'),
dfd = new $.Deferred(),
result = { valid: true };
if (options.callback) {
var response = FormValidation.Helper.call(options.callback, [value, validator, $field]);
result = ('boolean' === typeof response) ? { valid: response } : response;
}
dfd.resolve($field, 'callback', result);
return dfd;
}
};
return FormValidation.Validator.callback;
}));

View File

@ -1,97 +0,0 @@
/**
* choice validator
*
* @link http://formvalidation.io/validators/choice/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/choice", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
choice: {
'default': 'Please enter a valid value',
less: 'Please choose %s options at minimum',
more: 'Please choose %s options at maximum',
between: 'Please choose %s - %s options'
}
}
});
FormValidation.Validator.choice = {
html5Attributes: {
message: 'message',
min: 'min',
max: 'max'
},
/**
* Check if the number of checked boxes are less or more than a given number
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Consists of following keys:
* - min
* - max
*
* At least one of two keys is required
* The min, max keys define the number which the field value compares to. min, max can be
* - A number
* - Name of field which its value defines the number
* - Name of callback function that returns the number
* - A callback function that returns the number
*
* - message: The invalid message
* @returns {Object}
*/
validate: function(validator, $field, options) {
var locale = validator.getLocale(),
ns = validator.getNamespace(),
numChoices = $field.is('select')
? validator.getFieldElements($field.attr('data-' + ns + '-field')).find('option').filter(':selected').length
: validator.getFieldElements($field.attr('data-' + ns + '-field')).filter(':checked').length,
min = options.min ? ($.isNumeric(options.min) ? options.min : validator.getDynamicOption($field, options.min)) : null,
max = options.max ? ($.isNumeric(options.max) ? options.max : validator.getDynamicOption($field, options.max)) : null,
isValid = true,
message = options.message || FormValidation.I18n[locale].choice['default'];
if ((min && numChoices < parseInt(min, 10)) || (max && numChoices > parseInt(max, 10))) {
isValid = false;
}
switch (true) {
case (!!min && !!max):
message = FormValidation.Helper.format(options.message || FormValidation.I18n[locale].choice.between, [parseInt(min, 10), parseInt(max, 10)]);
break;
case (!!min):
message = FormValidation.Helper.format(options.message || FormValidation.I18n[locale].choice.less, parseInt(min, 10));
break;
case (!!max):
message = FormValidation.Helper.format(options.message || FormValidation.I18n[locale].choice.more, parseInt(max, 10));
break;
default:
break;
}
return { valid: isValid, message: message };
}
};
return FormValidation.Validator.choice;
}));

View File

@ -1,172 +0,0 @@
/**
* color validator
*
* @link http://formvalidation.io/validators/color/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/color", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
color: {
'default': 'Please enter a valid color'
}
}
});
FormValidation.Validator.color = {
html5Attributes: {
message: 'message',
type: 'type'
},
enableByHtml5: function($field) {
return ('color' === $field.attr('type'));
},
SUPPORTED_TYPES: [
'hex', 'rgb', 'rgba', 'hsl', 'hsla', 'keyword'
],
KEYWORD_COLORS: [
// Colors start with A
'aliceblue', 'antiquewhite', 'aqua', 'aquamarine', 'azure',
// B
'beige', 'bisque', 'black', 'blanchedalmond', 'blue', 'blueviolet', 'brown', 'burlywood',
// C
'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson', 'cyan',
// D
'darkblue', 'darkcyan', 'darkgoldenrod', 'darkgray', 'darkgreen', 'darkgrey', 'darkkhaki', 'darkmagenta',
'darkolivegreen', 'darkorange', 'darkorchid', 'darkred', 'darksalmon', 'darkseagreen', 'darkslateblue',
'darkslategray', 'darkslategrey', 'darkturquoise', 'darkviolet', 'deeppink', 'deepskyblue', 'dimgray',
'dimgrey', 'dodgerblue',
// F
'firebrick', 'floralwhite', 'forestgreen', 'fuchsia',
// G
'gainsboro', 'ghostwhite', 'gold', 'goldenrod', 'gray', 'green', 'greenyellow', 'grey',
// H
'honeydew', 'hotpink',
// I
'indianred', 'indigo', 'ivory',
// K
'khaki',
// L
'lavender', 'lavenderblush', 'lawngreen', 'lemonchiffon', 'lightblue', 'lightcoral', 'lightcyan',
'lightgoldenrodyellow', 'lightgray', 'lightgreen', 'lightgrey', 'lightpink', 'lightsalmon', 'lightseagreen',
'lightskyblue', 'lightslategray', 'lightslategrey', 'lightsteelblue', 'lightyellow', 'lime', 'limegreen',
'linen',
// M
'magenta', 'maroon', 'mediumaquamarine', 'mediumblue', 'mediumorchid', 'mediumpurple', 'mediumseagreen',
'mediumslateblue', 'mediumspringgreen', 'mediumturquoise', 'mediumvioletred', 'midnightblue', 'mintcream',
'mistyrose', 'moccasin',
// N
'navajowhite', 'navy',
// O
'oldlace', 'olive', 'olivedrab', 'orange', 'orangered', 'orchid',
// P
'palegoldenrod', 'palegreen', 'paleturquoise', 'palevioletred', 'papayawhip', 'peachpuff', 'peru', 'pink',
'plum', 'powderblue', 'purple',
// R
'red', 'rosybrown', 'royalblue',
// S
'saddlebrown', 'salmon', 'sandybrown', 'seagreen', 'seashell', 'sienna', 'silver', 'skyblue', 'slateblue',
'slategray', 'slategrey', 'snow', 'springgreen', 'steelblue',
// T
'tan', 'teal', 'thistle', 'tomato', 'transparent', 'turquoise',
// V
'violet',
// W
'wheat', 'white', 'whitesmoke',
// Y
'yellow', 'yellowgreen'
],
/**
* Return true if the input value is a valid color
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - message: The invalid message
* - type: The array of valid color types
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'color');
if (value === '') {
return true;
}
// Only accept 6 hex character values due to the HTML 5 spec
// See http://www.w3.org/TR/html-markup/input.color.html#input.color.attrs.value
if (this.enableByHtml5($field)) {
return /^#[0-9A-F]{6}$/i.test(value);
}
var types = options.type || this.SUPPORTED_TYPES;
if (!$.isArray(types)) {
types = types.replace(/s/g, '').split(',');
}
var method,
type,
isValid = false;
for (var i = 0; i < types.length; i++) {
type = types[i];
method = '_' + type.toLowerCase();
isValid = isValid || this[method](value);
if (isValid) {
return true;
}
}
return false;
},
_hex: function(value) {
return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(value);
},
_hsl: function(value) {
return /^hsl\((\s*(-?\d+)\s*,)(\s*(\b(0?\d{1,2}|100)\b%)\s*,)(\s*(\b(0?\d{1,2}|100)\b%)\s*)\)$/.test(value);
},
_hsla: function(value) {
return /^hsla\((\s*(-?\d+)\s*,)(\s*(\b(0?\d{1,2}|100)\b%)\s*,){2}(\s*(0?(\.\d+)?|1(\.0+)?)\s*)\)$/.test(value);
},
_keyword: function(value) {
return $.inArray(value, this.KEYWORD_COLORS) >= 0;
},
_rgb: function(value) {
var regexInteger = /^rgb\((\s*(\b([01]?\d{1,2}|2[0-4]\d|25[0-5])\b)\s*,){2}(\s*(\b([01]?\d{1,2}|2[0-4]\d|25[0-5])\b)\s*)\)$/,
regexPercent = /^rgb\((\s*(\b(0?\d{1,2}|100)\b%)\s*,){2}(\s*(\b(0?\d{1,2}|100)\b%)\s*)\)$/;
return regexInteger.test(value) || regexPercent.test(value);
},
_rgba: function(value) {
var regexInteger = /^rgba\((\s*(\b([01]?\d{1,2}|2[0-4]\d|25[0-5])\b)\s*,){3}(\s*(0?(\.\d+)?|1(\.0+)?)\s*)\)$/,
regexPercent = /^rgba\((\s*(\b(0?\d{1,2}|100)\b%)\s*,){3}(\s*(0?(\.\d+)?|1(\.0+)?)\s*)\)$/;
return regexInteger.test(value) || regexPercent.test(value);
}
};
return FormValidation.Validator.color;
}));

View File

@ -1,32 +0,0 @@
/**
* confirm validator
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/confirm", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
confirm: {
'default': 'Please input the same value'
}
}
});
FormValidation.Validator.confirm = {
validate: function(validator, $field, options) {
if (options.original.val() == $field.val() || $field.val()== '')
return true;
return false;
}
};
}));

View File

@ -1,134 +0,0 @@
/**
* creditCard validator
*
* @link http://formvalidation.io/validators/creditCard/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/creditCard", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
creditCard: {
'default': 'Please enter a valid credit card number'
}
}
});
FormValidation.Validator.creditCard = {
/**
* Return true if the input value is valid credit card number
* Based on https://gist.github.com/DiegoSalazar/4075533
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} [options] Can consist of the following key:
* - message: The invalid message
* @returns {Boolean|Object}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'creditCard');
if (value === '') {
return true;
}
// Accept only digits, dashes or spaces
if (/[^0-9-\s]+/.test(value)) {
return false;
}
value = value.replace(/\D/g, '');
if (!FormValidation.Helper.luhn(value)) {
return false;
}
// Validate the card number based on prefix (IIN ranges) and length
var cards = {
AMERICAN_EXPRESS: {
length: [15],
prefix: ['34', '37']
},
DINERS_CLUB: {
length: [14],
prefix: ['300', '301', '302', '303', '304', '305', '36']
},
DINERS_CLUB_US: {
length: [16],
prefix: ['54', '55']
},
DISCOVER: {
length: [16],
prefix: ['6011', '622126', '622127', '622128', '622129', '62213',
'62214', '62215', '62216', '62217', '62218', '62219',
'6222', '6223', '6224', '6225', '6226', '6227', '6228',
'62290', '62291', '622920', '622921', '622922', '622923',
'622924', '622925', '644', '645', '646', '647', '648',
'649', '65']
},
JCB: {
length: [16],
prefix: ['3528', '3529', '353', '354', '355', '356', '357', '358']
},
LASER: {
length: [16, 17, 18, 19],
prefix: ['6304', '6706', '6771', '6709']
},
MAESTRO: {
length: [12, 13, 14, 15, 16, 17, 18, 19],
prefix: ['5018', '5020', '5038', '6304', '6759', '6761', '6762', '6763', '6764', '6765', '6766']
},
MASTERCARD: {
length: [16],
prefix: ['51', '52', '53', '54', '55']
},
SOLO: {
length: [16, 18, 19],
prefix: ['6334', '6767']
},
UNIONPAY: {
length: [16, 17, 18, 19],
prefix: ['622126', '622127', '622128', '622129', '62213', '62214',
'62215', '62216', '62217', '62218', '62219', '6222', '6223',
'6224', '6225', '6226', '6227', '6228', '62290', '62291',
'622920', '622921', '622922', '622923', '622924', '622925']
},
VISA: {
length: [16],
prefix: ['4']
}
};
var type, i;
for (type in cards) {
for (i in cards[type].prefix) {
if (value.substr(0, cards[type].prefix[i].length) === cards[type].prefix[i] // Check the prefix
&& $.inArray(value.length, cards[type].length) !== -1) // and length
{
return {
valid: true,
type: type
};
}
}
}
return false;
}
};
return FormValidation.Validator.creditCard;
}));

View File

@ -1,83 +0,0 @@
/**
* cusip validator
*
* @link http://formvalidation.io/validators/cusip/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/cusip", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
cusip: {
'default': 'Please enter a valid CUSIP number'
}
}
});
FormValidation.Validator.cusip = {
/**
* Validate a CUSIP number
* Examples:
* - Valid: 037833100, 931142103, 14149YAR8, 126650BG6
* - Invalid: 31430F200, 022615AC2
*
* @see http://en.wikipedia.org/wiki/CUSIP
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} [options] Can consist of the following keys:
* - message: The invalid message
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'cusip');
if (value === '') {
return true;
}
value = value.toUpperCase();
if (!/^[0-9A-Z]{9}$/.test(value)) {
return false;
}
var converted = $.map(value.split(''), function(item) {
var code = item.charCodeAt(0);
return (code >= 'A'.charCodeAt(0) && code <= 'Z'.charCodeAt(0))
// Replace A, B, C, ..., Z with 10, 11, ..., 35
? (code - 'A'.charCodeAt(0) + 10)
: item;
}),
length = converted.length,
sum = 0;
for (var i = 0; i < length - 1; i++) {
var num = parseInt(converted[i], 10);
if (i % 2 !== 0) {
num *= 2;
}
if (num > 9) {
num -= 9;
}
sum += num;
}
sum = (10 - (sum % 10)) % 10;
return sum === parseInt(converted[length - 1], 10);
}
};
return FormValidation.Validator.cusip;
}));

View File

@ -1,179 +0,0 @@
/**
* cvv validator
*
* @link http://formvalidation.io/validators/cvv/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/cvv", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
cvv: {
'default': 'Please enter a valid CVV number'
}
}
});
FormValidation.Validator.cvv = {
html5Attributes: {
message: 'message',
ccfield: 'creditCardField'
},
/**
* Bind the validator on the live change of the credit card field
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Consists of the following key:
* - creditCardField: The credit card number field
*/
init: function(validator, $field, options) {
if (options.creditCardField) {
var creditCardField = validator.getFieldElements(options.creditCardField);
validator.onLiveChange(creditCardField, 'live_cvv', function() {
var status = validator.getStatus($field, 'cvv');
if (status !== validator.STATUS_NOT_VALIDATED) {
validator.revalidateField($field);
}
});
}
},
/**
* Unbind the validator on the live change of the credit card field
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Consists of the following key:
* - creditCardField: The credit card number field
*/
destroy: function(validator, $field, options) {
if (options.creditCardField) {
var creditCardField = validator.getFieldElements(options.creditCardField);
validator.offLiveChange(creditCardField, 'live_cvv');
}
},
/**
* Return true if the input value is a valid CVV number.
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - creditCardField: The credit card number field. It can be null
* - message: The invalid message
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'cvv');
if (value === '') {
return true;
}
if (!/^[0-9]{3,4}$/.test(value)) {
return false;
}
if (!options.creditCardField) {
return true;
}
// Get the credit card number
var creditCard = validator.getFieldElements(options.creditCardField).val();
if (creditCard === '') {
return true;
}
creditCard = creditCard.replace(/\D/g, '');
// Supported credit card types
var cards = {
AMERICAN_EXPRESS: {
length: [15],
prefix: ['34', '37']
},
DINERS_CLUB: {
length: [14],
prefix: ['300', '301', '302', '303', '304', '305', '36']
},
DINERS_CLUB_US: {
length: [16],
prefix: ['54', '55']
},
DISCOVER: {
length: [16],
prefix: ['6011', '622126', '622127', '622128', '622129', '62213',
'62214', '62215', '62216', '62217', '62218', '62219',
'6222', '6223', '6224', '6225', '6226', '6227', '6228',
'62290', '62291', '622920', '622921', '622922', '622923',
'622924', '622925', '644', '645', '646', '647', '648',
'649', '65']
},
JCB: {
length: [16],
prefix: ['3528', '3529', '353', '354', '355', '356', '357', '358']
},
LASER: {
length: [16, 17, 18, 19],
prefix: ['6304', '6706', '6771', '6709']
},
MAESTRO: {
length: [12, 13, 14, 15, 16, 17, 18, 19],
prefix: ['5018', '5020', '5038', '6304', '6759', '6761', '6762', '6763', '6764', '6765', '6766']
},
MASTERCARD: {
length: [16],
prefix: ['51', '52', '53', '54', '55']
},
SOLO: {
length: [16, 18, 19],
prefix: ['6334', '6767']
},
UNIONPAY: {
length: [16, 17, 18, 19],
prefix: ['622126', '622127', '622128', '622129', '62213', '62214',
'62215', '62216', '62217', '62218', '62219', '6222', '6223',
'6224', '6225', '6226', '6227', '6228', '62290', '62291',
'622920', '622921', '622922', '622923', '622924', '622925']
},
VISA: {
length: [16],
prefix: ['4']
}
};
var type, i, creditCardType = null;
for (type in cards) {
for (i in cards[type].prefix) {
if (creditCard.substr(0, cards[type].prefix[i].length) === cards[type].prefix[i] // Check the prefix
&& $.inArray(creditCard.length, cards[type].length) !== -1) // and length
{
creditCardType = type;
break;
}
}
}
return (creditCardType === null)
? false
: (('AMERICAN_EXPRESS' === creditCardType) ? (value.length === 4) : (value.length === 3));
}
};
return FormValidation.Validator.cvv;
}));

View File

@ -1,381 +0,0 @@
/**
* date validator
*
* @link http://formvalidation.io/validators/date/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/date", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
date: {
'default': 'Please enter a valid date',
min: 'Please enter a date after %s',
max: 'Please enter a date before %s',
range: 'Please enter a date in the range %s - %s'
}
}
});
FormValidation.Validator.date = {
html5Attributes: {
message: 'message',
format: 'format',
min: 'min',
max: 'max',
separator: 'separator'
},
/**
* Return true if the input value is valid date
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - message: The invalid message
* - min: the minimum date
* - max: the maximum date
* - separator: Use to separate the date, month, and year.
* By default, it is /
* - format: The date format. Default is MM/DD/YYYY
* The format can be:
*
* i) date: Consist of DD, MM, YYYY parts which are separated by the separator option
* ii) date and time:
* The time can consist of h, m, s parts which are separated by :
* ii) date, time and A (indicating AM or PM)
* @returns {Boolean|Object}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'date');
if (value === '') {
return true;
}
options.format = options.format || 'MM/DD/YYYY';
// #683: Force the format to YYYY-MM-DD as the default browser behaviour when using type="date" attribute
if ($field.attr('type') === 'date') {
options.format = 'YYYY-MM-DD';
}
var locale = validator.getLocale(),
message = options.message || FormValidation.I18n[locale].date['default'],
formats = options.format.split(' '),
dateFormat = formats[0],
timeFormat = (formats.length > 1) ? formats[1] : null,
amOrPm = (formats.length > 2) ? formats[2] : null,
sections = value.split(' '),
date = sections[0],
time = (sections.length > 1) ? sections[1] : null;
if (formats.length !== sections.length) {
return {
valid: false,
message: message
};
}
// Determine the separator
var separator = options.separator;
if (!separator) {
separator = (date.indexOf('/') !== -1) ? '/' : ((date.indexOf('-') !== -1) ? '-' : null);
}
if (separator === null || date.indexOf(separator) === -1) {
return {
valid: false,
message: message
};
}
// Determine the date
date = date.split(separator);
dateFormat = dateFormat.split(separator);
if (date.length !== dateFormat.length) {
return {
valid: false,
message: message
};
}
var year = date[$.inArray('YYYY', dateFormat)],
month = date[$.inArray('MM', dateFormat)],
day = date[$.inArray('DD', dateFormat)];
if (!year || !month || !day || year.length !== 4) {
return {
valid: false,
message: message
};
}
// Determine the time
var minutes = null, hours = null, seconds = null;
if (timeFormat) {
timeFormat = timeFormat.split(':');
time = time.split(':');
if (timeFormat.length !== time.length) {
return {
valid: false,
message: message
};
}
hours = time.length > 0 ? time[0] : null;
minutes = time.length > 1 ? time[1] : null;
seconds = time.length > 2 ? time[2] : null;
if (hours === '' || minutes === '' || seconds === '') {
return {
valid: false,
message: message
};
}
// Validate seconds
if (seconds) {
if (isNaN(seconds) || seconds.length > 2) {
return {
valid: false,
message: message
};
}
seconds = parseInt(seconds, 10);
if (seconds < 0 || seconds > 60) {
return {
valid: false,
message: message
};
}
}
// Validate hours
if (hours) {
if (isNaN(hours) || hours.length > 2) {
return {
valid: false,
message: message
};
}
hours = parseInt(hours, 10);
if (hours < 0 || hours >= 24 || (amOrPm && hours > 12)) {
return {
valid: false,
message: message
};
}
}
// Validate minutes
if (minutes) {
if (isNaN(minutes) || minutes.length > 2) {
return {
valid: false,
message: message
};
}
minutes = parseInt(minutes, 10);
if (minutes < 0 || minutes > 59) {
return {
valid: false,
message: message
};
}
}
}
// Validate day, month, and year
var valid = FormValidation.Helper.date(year, month, day),
// declare the date, min and max objects
min = null,
max = null,
minOption = options.min,
maxOption = options.max;
if (minOption) {
if (isNaN(Date.parse(minOption))) {
minOption = validator.getDynamicOption($field, minOption);
}
min = minOption instanceof Date ? minOption : this._parseDate(minOption, dateFormat, separator);
// In order to avoid displaying a date string like "Mon Dec 08 2014 19:14:12 GMT+0000 (WET)"
minOption = minOption instanceof Date ? this._formatDate(minOption, options.format) : minOption;
}
if (maxOption) {
if (isNaN(Date.parse(maxOption))) {
maxOption = validator.getDynamicOption($field, maxOption);
}
max = maxOption instanceof Date ? maxOption : this._parseDate(maxOption, dateFormat, separator);
// In order to avoid displaying a date string like "Mon Dec 08 2014 19:14:12 GMT+0000 (WET)"
maxOption = maxOption instanceof Date ? this._formatDate(maxOption, options.format) : maxOption;
}
date = new Date(year, month -1, day, hours, minutes, seconds);
switch (true) {
case (minOption && !maxOption && valid):
valid = date.getTime() >= min.getTime();
message = options.message || FormValidation.Helper.format(FormValidation.I18n[locale].date.min, minOption);
break;
case (maxOption && !minOption && valid):
valid = date.getTime() <= max.getTime();
message = options.message || FormValidation.Helper.format(FormValidation.I18n[locale].date.max, maxOption);
break;
case (maxOption && minOption && valid):
valid = date.getTime() <= max.getTime() && date.getTime() >= min.getTime();
message = options.message || FormValidation.Helper.format(FormValidation.I18n[locale].date.range, [minOption, maxOption]);
break;
default:
break;
}
return {
valid: valid,
message: message
};
},
/**
* Return a date object after parsing the date string
*
* @param {String} date The date string to parse
* @param {String} format The date format
* The format can be:
* - date: Consist of DD, MM, YYYY parts which are separated by the separator option
* - date and time:
* The time can consist of h, m, s parts which are separated by :
* @param {String} separator The separator used to separate the date, month, and year
* @returns {Date}
*/
_parseDate: function(date, format, separator) {
var minutes = 0, hours = 0, seconds = 0,
sections = date.split(' '),
dateSection = sections[0],
timeSection = (sections.length > 1) ? sections[1] : null;
dateSection = dateSection.split(separator);
var year = dateSection[$.inArray('YYYY', format)],
month = dateSection[$.inArray('MM', format)],
day = dateSection[$.inArray('DD', format)];
if (timeSection) {
timeSection = timeSection.split(':');
hours = timeSection.length > 0 ? timeSection[0] : null;
minutes = timeSection.length > 1 ? timeSection[1] : null;
seconds = timeSection.length > 2 ? timeSection[2] : null;
}
return new Date(year, month -1, day, hours, minutes, seconds);
},
/**
* Format date
*
* @param {Date} date The date object to format
* @param {String} format The date format
* The format can consist of the following tokens:
* d Day of the month without leading zeros (1 through 31)
* dd Day of the month with leading zeros (01 through 31)
* m Month without leading zeros (1 through 12)
* mm Month with leading zeros (01 through 12)
* yy Last two digits of year (for example: 14)
* yyyy Full four digits of year (for example: 2014)
* h Hours without leading zeros (1 through 12)
* hh Hours with leading zeros (01 through 12)
* H Hours without leading zeros (0 through 23)
* HH Hours with leading zeros (00 through 23)
* M Minutes without leading zeros (0 through 59)
* MM Minutes with leading zeros (00 through 59)
* s Seconds without leading zeros (0 through 59)
* ss Seconds with leading zeros (00 through 59)
* @returns {String}
*/
_formatDate: function(date, format) {
format = format
.replace(/Y/g, 'y')
.replace(/M/g, 'm')
.replace(/D/g, 'd')
.replace(/:m/g, ':M')
.replace(/:mm/g, ':MM')
.replace(/:S/, ':s')
.replace(/:SS/, ':ss');
var replacer = {
d: function(date) {
return date.getDate();
},
dd: function(date) {
var d = date.getDate();
return (d < 10) ? '0' + d : d;
},
m: function(date) {
return date.getMonth() + 1;
},
mm: function(date) {
var m = date.getMonth() + 1;
return m < 10 ? '0' + m : m;
},
yy: function(date) {
return ('' + date.getFullYear()).substr(2);
},
yyyy: function(date) {
return date.getFullYear();
},
h: function(date) {
return date.getHours() % 12 || 12;
},
hh: function(date) {
var h = date.getHours() % 12 || 12;
return h < 10 ? '0' + h : h;
},
H: function(date) {
return date.getHours();
},
HH: function(date) {
var H = date.getHours();
return H < 10 ? '0' + H : H;
},
M: function(date) {
return date.getMinutes();
},
MM: function(date) {
var M = date.getMinutes();
return M < 10 ? '0' + M : M;
},
s: function(date) {
return date.getSeconds();
},
ss: function(date) {
var s = date.getSeconds();
return s < 10 ? '0' + s : s;
}
};
return format.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMs])\1?|"[^"]*"|'[^']*'/g, function(match) {
return replacer[match] ? replacer[match](date) : match.slice(1, match.length - 1);
});
}
};
return FormValidation.Validator.date;
}));

View File

@ -1,113 +0,0 @@
/**
* different validator
*
* @link http://formvalidation.io/validators/different/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/different", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
different: {
'default': 'Please enter a different value'
}
}
});
FormValidation.Validator.different = {
html5Attributes: {
message: 'message',
field: 'field'
},
/**
* Bind the validator on the live change of the field to compare with current one
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Consists of the following key:
* - field: The name of field that will be used to compare with current one
*/
init: function(validator, $field, options) {
var fields = options.field.split(',');
for (var i = 0; i < fields.length; i++) {
var compareWith = validator.getFieldElements(fields[i]);
validator.onLiveChange(compareWith, 'live_different', function() {
var status = validator.getStatus($field, 'different');
if (status !== validator.STATUS_NOT_VALIDATED) {
validator.revalidateField($field);
}
});
}
},
/**
* Unbind the validator on the live change of the field to compare with current one
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Consists of the following key:
* - field: The name of field that will be used to compare with current one
*/
destroy: function(validator, $field, options) {
var fields = options.field.split(',');
for (var i = 0; i < fields.length; i++) {
var compareWith = validator.getFieldElements(fields[i]);
validator.offLiveChange(compareWith, 'live_different');
}
},
/**
* Return true if the input value is different with given field's value
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Consists of the following key:
* - field: The name of field that will be used to compare with current one
* - message: The invalid message
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'different');
if (value === '') {
return true;
}
var fields = options.field.split(','),
isValid = true;
for (var i = 0; i < fields.length; i++) {
var compareWith = validator.getFieldElements(fields[i]);
if (compareWith == null || compareWith.length === 0) {
continue;
}
var compareValue = validator.getFieldValue(compareWith, 'different');
if (value === compareValue) {
isValid = false;
} else if (compareValue !== '') {
validator.updateStatus(compareWith, validator.STATUS_VALID, 'different');
}
}
return isValid;
}
};
return FormValidation.Validator.different;
}));

View File

@ -1,52 +0,0 @@
/**
* digits validator
*
* @link http://formvalidation.io/validators/digits/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/digits", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
digits: {
'default': 'Please enter only digits'
}
}
});
FormValidation.Validator.digits = {
/**
* Return true if the input value contains digits only
*
* @param {FormValidation.Base} validator Validate plugin instance
* @param {jQuery} $field Field element
* @param {Object} [options]
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'digits');
if (value === '') {
return true;
}
return /^\d+$/.test(value);
}
};
return FormValidation.Validator.digits;
}));

View File

@ -1,68 +0,0 @@
/**
* ean validator
*
* @link http://formvalidation.io/validators/ean/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/ean", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
ean: {
'default': 'Please enter a valid EAN number'
}
}
});
FormValidation.Validator.ean = {
/**
* Validate EAN (International Article Number)
* Examples:
* - Valid: 73513537, 9780471117094, 4006381333931
* - Invalid: 73513536
*
* @see http://en.wikipedia.org/wiki/European_Article_Number
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - message: The invalid message
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'ean');
if (value === '') {
return true;
}
if (!/^(\d{8}|\d{12}|\d{13})$/.test(value)) {
return false;
}
var length = value.length,
sum = 0,
weight = (length === 8) ? [3, 1] : [1, 3];
for (var i = 0; i < length - 1; i++) {
sum += parseInt(value.charAt(i), 10) * weight[i % 2];
}
sum = (10 - sum % 10) % 10;
return (sum + '' === value.charAt(length - 1));
}
};
return FormValidation.Validator.ean;
}));

View File

@ -1,86 +0,0 @@
/**
* ein validator
*
* @link http://formvalidation.io/validators/ein/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/ein", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
ein: {
'default': 'Please enter a valid EIN number'
}
}
});
FormValidation.Validator.ein = {
// The first two digits are called campus
// See http://en.wikipedia.org/wiki/Employer_Identification_Number
// http://www.irs.gov/Businesses/Small-Businesses-&-Self-Employed/How-EINs-are-Assigned-and-Valid-EIN-Prefixes
CAMPUS: {
ANDOVER: ['10', '12'],
ATLANTA: ['60', '67'],
AUSTIN: ['50', '53'],
BROOKHAVEN: ['01', '02', '03', '04', '05', '06', '11', '13', '14', '16', '21', '22', '23', '25', '34', '51', '52', '54', '55', '56', '57', '58', '59', '65'],
CINCINNATI: ['30', '32', '35', '36', '37', '38', '61'],
FRESNO: ['15', '24'],
KANSAS_CITY: ['40', '44'],
MEMPHIS: ['94', '95'],
OGDEN: ['80', '90'],
PHILADELPHIA: ['33', '39', '41', '42', '43', '46', '48', '62', '63', '64', '66', '68', '71', '72', '73', '74', '75', '76', '77', '81', '82', '83', '84', '85', '86', '87', '88', '91', '92', '93', '98', '99'],
INTERNET: ['20', '26', '27', '45', '46'],
SMALL_BUSINESS_ADMINISTRATION: ['31']
},
/**
* Validate EIN (Employer Identification Number) which is also known as
* Federal Employer Identification Number (FEIN) or Federal Tax Identification Number
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - message: The invalid message
* @returns {Object|Boolean}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'ein');
if (value === '') {
return true;
}
if (!/^[0-9]{2}-?[0-9]{7}$/.test(value)) {
return false;
}
// Check the first two digits
var campus = value.substr(0, 2) + '';
for (var key in this.CAMPUS) {
if ($.inArray(campus, this.CAMPUS[key]) !== -1) {
return {
valid: true,
campus: key
};
}
}
return false;
}
};
return FormValidation.Validator.ein;
}));

View File

@ -1,115 +0,0 @@
/**
* emailAddress validator
*
* @link http://formvalidation.io/validators/emailAddress/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/emailAddress", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
emailAddress: {
'default': 'Please enter a valid email address'
}
}
});
FormValidation.Validator.emailAddress = {
html5Attributes: {
message: 'message',
multiple: 'multiple',
separator: 'separator'
},
enableByHtml5: function($field) {
return ('email' === $field.attr('type'));
},
/**
* Return true if and only if the input value is a valid email address
*
* @param {FormValidation.Base} validator Validate plugin instance
* @param {jQuery} $field Field element
* @param {Object} [options]
* - multiple: Allow multiple email addresses, separated by a comma or semicolon; default is false.
* - separator: Regex for character or characters expected as separator between addresses; default is comma /[,;]/, i.e. comma or semicolon.
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'emailAddress');
if (value === '') {
return true;
}
// Email address regular expression
// http://stackoverflow.com/questions/46155/validate-email-address-in-javascript
var emailRegExp = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,
allowMultiple = options.multiple === true || options.multiple === 'true';
if (allowMultiple) {
var separator = options.separator || /[,;]/,
addresses = this._splitEmailAddresses(value, separator);
for (var i = 0; i < addresses.length; i++) {
if (!emailRegExp.test(addresses[i])) {
return false;
}
}
return true;
} else {
return emailRegExp.test(value);
}
},
_splitEmailAddresses: function(emailAddresses, separator) {
var quotedFragments = emailAddresses.split(/"/),
quotedFragmentCount = quotedFragments.length,
emailAddressArray = [],
nextEmailAddress = '';
for (var i = 0; i < quotedFragmentCount; i++) {
if (i % 2 === 0) {
var splitEmailAddressFragments = quotedFragments[i].split(separator),
splitEmailAddressFragmentCount = splitEmailAddressFragments.length;
if (splitEmailAddressFragmentCount === 1) {
nextEmailAddress += splitEmailAddressFragments[0];
} else {
emailAddressArray.push(nextEmailAddress + splitEmailAddressFragments[0]);
for (var j = 1; j < splitEmailAddressFragmentCount - 1; j++) {
emailAddressArray.push(splitEmailAddressFragments[j]);
}
nextEmailAddress = splitEmailAddressFragments[splitEmailAddressFragmentCount - 1];
}
} else {
nextEmailAddress += '"' + quotedFragments[i];
if (i < quotedFragmentCount - 1) {
nextEmailAddress += '"';
}
}
}
emailAddressArray.push(nextEmailAddress);
return emailAddressArray;
}
};
return FormValidation.Validator.emailAddress;
}));

View File

@ -1,116 +0,0 @@
/**
* file validator
*
* @link http://formvalidation.io/validators/file/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/file", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
file: {
'default': 'Please choose a valid file'
}
}
});
FormValidation.Validator.file = {
html5Attributes: {
extension: 'extension',
maxfiles: 'maxFiles',
minfiles: 'minFiles',
maxsize: 'maxSize',
minsize: 'minSize',
maxtotalsize: 'maxTotalSize',
mintotalsize: 'minTotalSize',
message: 'message',
type: 'type'
},
/**
* Validate upload file. Use HTML 5 API if the browser supports
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - extension: The allowed extensions, separated by a comma
* - maxFiles: The maximum number of files
* - minFiles: The minimum number of files
* - maxSize: The maximum size in bytes
* - minSize: The minimum size in bytes
* - maxTotalSize: The maximum size in bytes for all files
* - minTotalSize: The minimum size in bytes for all files
* - message: The invalid message
* - type: The allowed MIME type, separated by a comma
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'file');
if (value === '') {
return true;
}
var ext,
extensions = options.extension ? options.extension.toLowerCase().split(',') : null,
types = options.type ? options.type.toLowerCase().split(',') : null,
html5 = (window.File && window.FileList && window.FileReader);
if (html5) {
// Get FileList instance
var files = $field.get(0).files,
total = files.length,
totalSize = 0;
if ((options.maxFiles && total > parseInt(options.maxFiles, 10)) // Check the maxFiles
|| (options.minFiles && total < parseInt(options.minFiles, 10))) // Check the minFiles
{
return false;
}
for (var i = 0; i < total; i++) {
totalSize += files[i].size;
ext = files[i].name.substr(files[i].name.lastIndexOf('.') + 1);
if ((options.minSize && files[i].size < parseInt(options.minSize, 10)) // Check the minSize
|| (options.maxSize && files[i].size > parseInt(options.maxSize, 10)) // Check the maxSize
|| (extensions && $.inArray(ext.toLowerCase(), extensions) === -1) // Check file extension
|| (files[i].type && types && $.inArray(files[i].type.toLowerCase(), types) === -1)) // Check file type
{
return false;
}
}
if ((options.maxTotalSize && totalSize > parseInt(options.maxTotalSize, 10)) // Check the maxTotalSize
|| (options.minTotalSize && totalSize < parseInt(options.minTotalSize, 10))) // Check the minTotalSize
{
return false;
}
} else {
// Check file extension
ext = value.substr(value.lastIndexOf('.') + 1);
if (extensions && $.inArray(ext.toLowerCase(), extensions) === -1) {
return false;
}
}
return true;
}
};
return FormValidation.Validator.file;
}));

View File

@ -1,101 +0,0 @@
/**
* greaterThan validator
*
* @link http://formvalidation.io/validators/greaterThan/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/greaterThan", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
greaterThan: {
'default': 'Please enter a value greater than or equal to %s',
notInclusive: 'Please enter a value greater than %s'
}
}
});
FormValidation.Validator.greaterThan = {
html5Attributes: {
message: 'message',
value: 'value',
inclusive: 'inclusive'
},
enableByHtml5: function($field) {
var type = $field.attr('type'),
min = $field.attr('min');
if (min && type !== 'date') {
return {
value: min
};
}
return false;
},
/**
* Return true if the input value is greater than or equals to given number
*
* @param {FormValidation.Base} validator Validate plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - value: Define the number to compare with. It can be
* - A number
* - Name of field which its value defines the number
* - Name of callback function that returns the number
* - A callback function that returns the number
*
* - inclusive [optional]: Can be true or false. Default is true
* - message: The invalid message
* @returns {Boolean|Object}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'greaterThan');
if (value === '') {
return true;
}
value = this._format(value);
if (!$.isNumeric(value)) {
return false;
}
var locale = validator.getLocale(),
compareTo = $.isNumeric(options.value) ? options.value : validator.getDynamicOption($field, options.value),
compareToValue = this._format(compareTo);
value = parseFloat(value);
return (options.inclusive === true || options.inclusive === undefined)
? {
valid: value >= compareToValue,
message: FormValidation.Helper.format(options.message || FormValidation.I18n[locale].greaterThan['default'], compareTo)
}
: {
valid: value > compareToValue,
message: FormValidation.Helper.format(options.message || FormValidation.I18n[locale].greaterThan.notInclusive, compareTo)
};
},
_format: function(value) {
return (value + '').replace(',', '.');
}
};
return FormValidation.Validator.greaterThan;
}));

View File

@ -1,65 +0,0 @@
/**
* grid validator
*
* @link http://formvalidation.io/validators/grid/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/grid", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
grid: {
'default': 'Please enter a valid GRId number'
}
}
});
FormValidation.Validator.grid = {
/**
* Validate GRId (Global Release Identifier)
* Examples:
* - Valid: A12425GABC1234002M, A1-2425G-ABC1234002-M, A1 2425G ABC1234002 M, Grid:A1-2425G-ABC1234002-M
* - Invalid: A1-2425G-ABC1234002-Q
*
* @see http://en.wikipedia.org/wiki/Global_Release_Identifier
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - message: The invalid message
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'grid');
if (value === '') {
return true;
}
value = value.toUpperCase();
if (!/^[GRID:]*([0-9A-Z]{2})[-\s]*([0-9A-Z]{5})[-\s]*([0-9A-Z]{10})[-\s]*([0-9A-Z]{1})$/g.test(value)) {
return false;
}
value = value.replace(/\s/g, '').replace(/-/g, '');
if ('GRID:' === value.substr(0, 5)) {
value = value.substr(5);
}
return FormValidation.Helper.mod37And36(value);
}
};
return FormValidation.Validator.grid;
}));

View File

@ -1,53 +0,0 @@
/**
* hex validator
*
* @link http://formvalidation.io/validators/hex/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/hex", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
hex: {
'default': 'Please enter a valid hexadecimal number'
}
}
});
FormValidation.Validator.hex = {
/**
* Return true if and only if the input value is a valid hexadecimal number
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Consist of key:
* - message: The invalid message
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'hex');
if (value === '') {
return true;
}
return /^[0-9a-fA-F]+$/.test(value);
}
};
return FormValidation.Validator.hex;
}));

View File

@ -1,271 +0,0 @@
/**
* iban validator
*
* @link http://formvalidation.io/validators/iban/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/iban", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
iban: {
'default': 'Please enter a valid IBAN number',
country: 'Please enter a valid IBAN number in %s',
countries: {
AD: 'Andorra',
AE: 'United Arab Emirates',
AL: 'Albania',
AO: 'Angola',
AT: 'Austria',
AZ: 'Azerbaijan',
BA: 'Bosnia and Herzegovina',
BE: 'Belgium',
BF: 'Burkina Faso',
BG: 'Bulgaria',
BH: 'Bahrain',
BI: 'Burundi',
BJ: 'Benin',
BR: 'Brazil',
CH: 'Switzerland',
CI: 'Ivory Coast',
CM: 'Cameroon',
CR: 'Costa Rica',
CV: 'Cape Verde',
CY: 'Cyprus',
CZ: 'Czech Republic',
DE: 'Germany',
DK: 'Denmark',
DO: 'Dominican Republic',
DZ: 'Algeria',
EE: 'Estonia',
ES: 'Spain',
FI: 'Finland',
FO: 'Faroe Islands',
FR: 'France',
GB: 'United Kingdom',
GE: 'Georgia',
GI: 'Gibraltar',
GL: 'Greenland',
GR: 'Greece',
GT: 'Guatemala',
HR: 'Croatia',
HU: 'Hungary',
IE: 'Ireland',
IL: 'Israel',
IR: 'Iran',
IS: 'Iceland',
IT: 'Italy',
JO: 'Jordan',
KW: 'Kuwait',
KZ: 'Kazakhstan',
LB: 'Lebanon',
LI: 'Liechtenstein',
LT: 'Lithuania',
LU: 'Luxembourg',
LV: 'Latvia',
MC: 'Monaco',
MD: 'Moldova',
ME: 'Montenegro',
MG: 'Madagascar',
MK: 'Macedonia',
ML: 'Mali',
MR: 'Mauritania',
MT: 'Malta',
MU: 'Mauritius',
MZ: 'Mozambique',
NL: 'Netherlands',
NO: 'Norway',
PK: 'Pakistan',
PL: 'Poland',
PS: 'Palestine',
PT: 'Portugal',
QA: 'Qatar',
RO: 'Romania',
RS: 'Serbia',
SA: 'Saudi Arabia',
SE: 'Sweden',
SI: 'Slovenia',
SK: 'Slovakia',
SM: 'San Marino',
SN: 'Senegal',
TN: 'Tunisia',
TR: 'Turkey',
VG: 'Virgin Islands, British'
}
}
}
});
FormValidation.Validator.iban = {
html5Attributes: {
message: 'message',
country: 'country'
},
// http://www.swift.com/dsp/resources/documents/IBAN_Registry.pdf
// http://en.wikipedia.org/wiki/International_Bank_Account_Number#IBAN_formats_by_country
REGEX: {
AD: 'AD[0-9]{2}[0-9]{4}[0-9]{4}[A-Z0-9]{12}', // Andorra
AE: 'AE[0-9]{2}[0-9]{3}[0-9]{16}', // United Arab Emirates
AL: 'AL[0-9]{2}[0-9]{8}[A-Z0-9]{16}', // Albania
AO: 'AO[0-9]{2}[0-9]{21}', // Angola
AT: 'AT[0-9]{2}[0-9]{5}[0-9]{11}', // Austria
AZ: 'AZ[0-9]{2}[A-Z]{4}[A-Z0-9]{20}', // Azerbaijan
BA: 'BA[0-9]{2}[0-9]{3}[0-9]{3}[0-9]{8}[0-9]{2}', // Bosnia and Herzegovina
BE: 'BE[0-9]{2}[0-9]{3}[0-9]{7}[0-9]{2}', // Belgium
BF: 'BF[0-9]{2}[0-9]{23}', // Burkina Faso
BG: 'BG[0-9]{2}[A-Z]{4}[0-9]{4}[0-9]{2}[A-Z0-9]{8}', // Bulgaria
BH: 'BH[0-9]{2}[A-Z]{4}[A-Z0-9]{14}', // Bahrain
BI: 'BI[0-9]{2}[0-9]{12}', // Burundi
BJ: 'BJ[0-9]{2}[A-Z]{1}[0-9]{23}', // Benin
BR: 'BR[0-9]{2}[0-9]{8}[0-9]{5}[0-9]{10}[A-Z][A-Z0-9]', // Brazil
CH: 'CH[0-9]{2}[0-9]{5}[A-Z0-9]{12}', // Switzerland
CI: 'CI[0-9]{2}[A-Z]{1}[0-9]{23}', // Ivory Coast
CM: 'CM[0-9]{2}[0-9]{23}', // Cameroon
CR: 'CR[0-9]{2}[0-9]{3}[0-9]{14}', // Costa Rica
CV: 'CV[0-9]{2}[0-9]{21}', // Cape Verde
CY: 'CY[0-9]{2}[0-9]{3}[0-9]{5}[A-Z0-9]{16}', // Cyprus
CZ: 'CZ[0-9]{2}[0-9]{20}', // Czech Republic
DE: 'DE[0-9]{2}[0-9]{8}[0-9]{10}', // Germany
DK: 'DK[0-9]{2}[0-9]{14}', // Denmark
DO: 'DO[0-9]{2}[A-Z0-9]{4}[0-9]{20}', // Dominican Republic
DZ: 'DZ[0-9]{2}[0-9]{20}', // Algeria
EE: 'EE[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{11}[0-9]{1}', // Estonia
ES: 'ES[0-9]{2}[0-9]{4}[0-9]{4}[0-9]{1}[0-9]{1}[0-9]{10}', // Spain
FI: 'FI[0-9]{2}[0-9]{6}[0-9]{7}[0-9]{1}', // Finland
FO: 'FO[0-9]{2}[0-9]{4}[0-9]{9}[0-9]{1}', // Faroe Islands
FR: 'FR[0-9]{2}[0-9]{5}[0-9]{5}[A-Z0-9]{11}[0-9]{2}', // France
GB: 'GB[0-9]{2}[A-Z]{4}[0-9]{6}[0-9]{8}', // United Kingdom
GE: 'GE[0-9]{2}[A-Z]{2}[0-9]{16}', // Georgia
GI: 'GI[0-9]{2}[A-Z]{4}[A-Z0-9]{15}', // Gibraltar
GL: 'GL[0-9]{2}[0-9]{4}[0-9]{9}[0-9]{1}', // Greenland
GR: 'GR[0-9]{2}[0-9]{3}[0-9]{4}[A-Z0-9]{16}', // Greece
GT: 'GT[0-9]{2}[A-Z0-9]{4}[A-Z0-9]{20}', // Guatemala
HR: 'HR[0-9]{2}[0-9]{7}[0-9]{10}', // Croatia
HU: 'HU[0-9]{2}[0-9]{3}[0-9]{4}[0-9]{1}[0-9]{15}[0-9]{1}', // Hungary
IE: 'IE[0-9]{2}[A-Z]{4}[0-9]{6}[0-9]{8}', // Ireland
IL: 'IL[0-9]{2}[0-9]{3}[0-9]{3}[0-9]{13}', // Israel
IR: 'IR[0-9]{2}[0-9]{22}', // Iran
IS: 'IS[0-9]{2}[0-9]{4}[0-9]{2}[0-9]{6}[0-9]{10}', // Iceland
IT: 'IT[0-9]{2}[A-Z]{1}[0-9]{5}[0-9]{5}[A-Z0-9]{12}', // Italy
JO: 'JO[0-9]{2}[A-Z]{4}[0-9]{4}[0]{8}[A-Z0-9]{10}', // Jordan
KW: 'KW[0-9]{2}[A-Z]{4}[0-9]{22}', // Kuwait
KZ: 'KZ[0-9]{2}[0-9]{3}[A-Z0-9]{13}', // Kazakhstan
LB: 'LB[0-9]{2}[0-9]{4}[A-Z0-9]{20}', // Lebanon
LI: 'LI[0-9]{2}[0-9]{5}[A-Z0-9]{12}', // Liechtenstein
LT: 'LT[0-9]{2}[0-9]{5}[0-9]{11}', // Lithuania
LU: 'LU[0-9]{2}[0-9]{3}[A-Z0-9]{13}', // Luxembourg
LV: 'LV[0-9]{2}[A-Z]{4}[A-Z0-9]{13}', // Latvia
MC: 'MC[0-9]{2}[0-9]{5}[0-9]{5}[A-Z0-9]{11}[0-9]{2}', // Monaco
MD: 'MD[0-9]{2}[A-Z0-9]{20}', // Moldova
ME: 'ME[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}', // Montenegro
MG: 'MG[0-9]{2}[0-9]{23}', // Madagascar
MK: 'MK[0-9]{2}[0-9]{3}[A-Z0-9]{10}[0-9]{2}', // Macedonia
ML: 'ML[0-9]{2}[A-Z]{1}[0-9]{23}', // Mali
MR: 'MR13[0-9]{5}[0-9]{5}[0-9]{11}[0-9]{2}', // Mauritania
MT: 'MT[0-9]{2}[A-Z]{4}[0-9]{5}[A-Z0-9]{18}', // Malta
MU: 'MU[0-9]{2}[A-Z]{4}[0-9]{2}[0-9]{2}[0-9]{12}[0-9]{3}[A-Z]{3}', // Mauritius
MZ: 'MZ[0-9]{2}[0-9]{21}', // Mozambique
NL: 'NL[0-9]{2}[A-Z]{4}[0-9]{10}', // Netherlands
NO: 'NO[0-9]{2}[0-9]{4}[0-9]{6}[0-9]{1}', // Norway
PK: 'PK[0-9]{2}[A-Z]{4}[A-Z0-9]{16}', // Pakistan
PL: 'PL[0-9]{2}[0-9]{8}[0-9]{16}', // Poland
PS: 'PS[0-9]{2}[A-Z]{4}[A-Z0-9]{21}', // Palestinian
PT: 'PT[0-9]{2}[0-9]{4}[0-9]{4}[0-9]{11}[0-9]{2}', // Portugal
QA: 'QA[0-9]{2}[A-Z]{4}[A-Z0-9]{21}', // Qatar
RO: 'RO[0-9]{2}[A-Z]{4}[A-Z0-9]{16}', // Romania
RS: 'RS[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}', // Serbia
SA: 'SA[0-9]{2}[0-9]{2}[A-Z0-9]{18}', // Saudi Arabia
SE: 'SE[0-9]{2}[0-9]{3}[0-9]{16}[0-9]{1}', // Sweden
SI: 'SI[0-9]{2}[0-9]{5}[0-9]{8}[0-9]{2}', // Slovenia
SK: 'SK[0-9]{2}[0-9]{4}[0-9]{6}[0-9]{10}', // Slovakia
SM: 'SM[0-9]{2}[A-Z]{1}[0-9]{5}[0-9]{5}[A-Z0-9]{12}', // San Marino
SN: 'SN[0-9]{2}[A-Z]{1}[0-9]{23}', // Senegal
TN: 'TN59[0-9]{2}[0-9]{3}[0-9]{13}[0-9]{2}', // Tunisia
TR: 'TR[0-9]{2}[0-9]{5}[A-Z0-9]{1}[A-Z0-9]{16}', // Turkey
VG: 'VG[0-9]{2}[A-Z]{4}[0-9]{16}' // Virgin Islands, British
},
/**
* Validate an International Bank Account Number (IBAN)
* To test it, take the sample IBAN from
* http://www.nordea.com/Our+services/International+products+and+services/Cash+Management/IBAN+countries/908462.html
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - message: The invalid message
* - country: The ISO 3166-1 country code. It can be
* - A country code
* - Name of field which its value defines the country code
* - Name of callback function that returns the country code
* - A callback function that returns the country code
* @returns {Boolean|Object}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'iban');
if (value === '') {
return true;
}
value = value.replace(/[^a-zA-Z0-9]/g, '').toUpperCase();
var country = options.country;
if (!country) {
country = value.substr(0, 2);
} else if (typeof country !== 'string' || !this.REGEX[country]) {
// Determine the country code
country = validator.getDynamicOption($field, country);
}
var locale = validator.getLocale();
if (!this.REGEX[country]) {
return true;
}
if (!(new RegExp('^' + this.REGEX[country] + '$')).test(value)) {
return {
valid: false,
message: FormValidation.Helper.format(options.message || FormValidation.I18n[locale].iban.country, FormValidation.I18n[locale].iban.countries[country])
};
}
value = value.substr(4) + value.substr(0, 4);
value = $.map(value.split(''), function(n) {
var code = n.charCodeAt(0);
return (code >= 'A'.charCodeAt(0) && code <= 'Z'.charCodeAt(0))
// Replace A, B, C, ..., Z with 10, 11, ..., 35
? (code - 'A'.charCodeAt(0) + 10)
: n;
});
value = value.join('');
var temp = parseInt(value.substr(0, 1), 10),
length = value.length;
for (var i = 1; i < length; ++i) {
temp = (temp * 10 + parseInt(value.substr(i, 1), 10)) % 97;
}
return {
valid: (temp === 1),
message: FormValidation.Helper.format(options.message || FormValidation.I18n[locale].iban.country, FormValidation.I18n[locale].iban.countries[country])
};
}
};
return FormValidation.Validator.iban;
}));

File diff suppressed because it is too large Load Diff

View File

@ -1,96 +0,0 @@
/**
* identical validator
*
* @link http://formvalidation.io/validators/identical/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/identical", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
identical: {
'default': 'Please enter the same value'
}
}
});
FormValidation.Validator.identical = {
html5Attributes: {
message: 'message',
field: 'field'
},
/**
* Bind the validator on the live change of the field to compare with current one
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Consists of the following key:
* - field: The name of field that will be used to compare with current one
*/
init: function(validator, $field, options) {
var compareWith = validator.getFieldElements(options.field);
validator.onLiveChange(compareWith, 'live_identical', function() {
var status = validator.getStatus($field, 'identical');
if (status !== validator.STATUS_NOT_VALIDATED) {
validator.revalidateField($field);
}
});
},
/**
* Unbind the validator on the live change of the field to compare with current one
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Consists of the following key:
* - field: The name of field that will be used to compare with current one
*/
destroy: function(validator, $field, options) {
var compareWith = validator.getFieldElements(options.field);
validator.offLiveChange(compareWith, 'live_identical');
},
/**
* Check if input value equals to value of particular one
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Consists of the following key:
* - field: The name of field that will be used to compare with current one
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'identical'),
compareWith = validator.getFieldElements(options.field);
if (compareWith === null || compareWith.length === 0) {
return true;
}
var compareValue = validator.getFieldValue(compareWith, 'identical');
if (value === compareValue) {
validator.updateStatus(compareWith, validator.STATUS_VALID, 'identical');
return true;
}
return false;
}
};
return FormValidation.Validator.identical;
}));

View File

@ -1,72 +0,0 @@
/**
* imei validator
*
* @link http://formvalidation.io/validators/imei/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/imei", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
imei: {
'default': 'Please enter a valid IMEI number'
}
}
});
FormValidation.Validator.imei = {
/**
* Validate IMEI (International Mobile Station Equipment Identity)
* Examples:
* - Valid: 35-209900-176148-1, 35-209900-176148-23, 3568680000414120, 490154203237518
* - Invalid: 490154203237517
*
* @see http://en.wikipedia.org/wiki/International_Mobile_Station_Equipment_Identity
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - message: The invalid message
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'imei');
if (value === '') {
return true;
}
switch (true) {
case /^\d{15}$/.test(value):
case /^\d{2}-\d{6}-\d{6}-\d{1}$/.test(value):
case /^\d{2}\s\d{6}\s\d{6}\s\d{1}$/.test(value):
value = value.replace(/[^0-9]/g, '');
return FormValidation.Helper.luhn(value);
case /^\d{14}$/.test(value):
case /^\d{16}$/.test(value):
case /^\d{2}-\d{6}-\d{6}(|-\d{2})$/.test(value):
case /^\d{2}\s\d{6}\s\d{6}(|\s\d{2})$/.test(value):
return true;
default:
return false;
}
}
};
return FormValidation.Validator.imei;
}));

View File

@ -1,73 +0,0 @@
/**
* imo validator
*
* @link http://formvalidation.io/validators/imo/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/imo", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
imo: {
'default': 'Please enter a valid IMO number'
}
}
});
FormValidation.Validator.imo = {
/**
* Validate IMO (International Maritime Organization)
* Examples:
* - Valid: IMO 8814275, IMO 9176187
* - Invalid: IMO 8814274
*
* @see http://en.wikipedia.org/wiki/IMO_Number
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - message: The invalid message
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'imo');
if (value === '') {
return true;
}
if (!/^IMO \d{7}$/i.test(value)) {
return false;
}
// Grab just the digits
var sum = 0,
digits = value.replace(/^.*(\d{7})$/, '$1');
// Go over each char, multiplying by the inverse of it's position
// IMO 9176187
// (9 * 7) + (1 * 6) + (7 * 5) + (6 * 4) + (1 * 3) + (8 * 2) = 147
// Take the last digit of that, that's the check digit (7)
for (var i = 6; i >= 1; i--) {
sum += (digits.slice((6 - i), -i) * (i + 1));
}
return sum % 10 === parseInt(digits.charAt(6), 10);
}
};
return FormValidation.Validator.imo;
}));

View File

@ -1,60 +0,0 @@
/**
* integer validator
*
* @link http://formvalidation.io/validators/integer/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/integer", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
integer: {
'default': 'Please enter a valid number'
}
}
});
FormValidation.Validator.integer = {
enableByHtml5: function($field) {
return ('number' === $field.attr('type')) && ($field.attr('step') === undefined || $field.attr('step') % 1 === 0);
},
/**
* Return true if the input value is an integer
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following key:
* - message: The invalid message
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
if (this.enableByHtml5($field) && $field.get(0).validity && $field.get(0).validity.badInput === true) {
return false;
}
var value = validator.getFieldValue($field, 'integer');
if (value === '') {
return true;
}
return /^(?:-?(?:0|[1-9][0-9]*))$/.test(value);
}
};
return FormValidation.Validator.integer;
}));

View File

@ -1,92 +0,0 @@
/**
* ip validator
*
* @link http://formvalidation.io/validators/ip/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/ip", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
ip: {
'default': 'Please enter a valid IP address',
ipv4: 'Please enter a valid IPv4 address',
ipv6: 'Please enter a valid IPv6 address'
}
}
});
FormValidation.Validator.ip = {
html5Attributes: {
message: 'message',
ipv4: 'ipv4',
ipv6: 'ipv6'
},
/**
* Return true if the input value is a IP address.
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - ipv4: Enable IPv4 validator, default to true
* - ipv6: Enable IPv6 validator, default to true
* - message: The invalid message
* @returns {Boolean|Object}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'ip');
if (value === '') {
return true;
}
options = $.extend({}, { ipv4: true, ipv6: true }, options);
var locale = validator.getLocale(),
ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,
ipv6Regex = /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,
valid = false,
message;
switch (true) {
case (options.ipv4 && !options.ipv6):
valid = ipv4Regex.test(value);
message = options.message || FormValidation.I18n[locale].ip.ipv4;
break;
case (!options.ipv4 && options.ipv6):
valid = ipv6Regex.test(value);
message = options.message || FormValidation.I18n[locale].ip.ipv6;
break;
case (options.ipv4 && options.ipv6):
/* falls through */
default:
valid = ipv4Regex.test(value) || ipv6Regex.test(value);
message = options.message || FormValidation.I18n[locale].ip['default'];
break;
}
return {
valid: valid,
message: message
};
}
};
return FormValidation.Validator.ip;
}));

View File

@ -1,114 +0,0 @@
/**
* isbn validator
*
* @link http://formvalidation.io/validators/isbn/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/isbn", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
isbn: {
'default': 'Please enter a valid ISBN number'
}
}
});
FormValidation.Validator.isbn = {
/**
* Return true if the input value is a valid ISBN 10 or ISBN 13 number
* Examples:
* - Valid:
* ISBN 10: 99921-58-10-7, 9971-5-0210-0, 960-425-059-0, 80-902734-1-6, 85-359-0277-5, 1-84356-028-3, 0-684-84328-5, 0-8044-2957-X, 0-85131-041-9, 0-943396-04-2, 0-9752298-0-X
* ISBN 13: 978-0-306-40615-7
* - Invalid:
* ISBN 10: 99921-58-10-6
* ISBN 13: 978-0-306-40615-6
*
* @see http://en.wikipedia.org/wiki/International_Standard_Book_Number
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} [options] Can consist of the following keys:
* - message: The invalid message
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'isbn');
if (value === '') {
return true;
}
// http://en.wikipedia.org/wiki/International_Standard_Book_Number#Overview
// Groups are separated by a hyphen or a space
var type;
switch (true) {
case /^\d{9}[\dX]$/.test(value):
case (value.length === 13 && /^(\d+)-(\d+)-(\d+)-([\dX])$/.test(value)):
case (value.length === 13 && /^(\d+)\s(\d+)\s(\d+)\s([\dX])$/.test(value)):
type = 'ISBN10';
break;
case /^(978|979)\d{9}[\dX]$/.test(value):
case (value.length === 17 && /^(978|979)-(\d+)-(\d+)-(\d+)-([\dX])$/.test(value)):
case (value.length === 17 && /^(978|979)\s(\d+)\s(\d+)\s(\d+)\s([\dX])$/.test(value)):
type = 'ISBN13';
break;
default:
return false;
}
// Replace all special characters except digits and X
value = value.replace(/[^0-9X]/gi, '');
var chars = value.split(''),
length = chars.length,
sum = 0,
i,
checksum;
switch (type) {
case 'ISBN10':
sum = 0;
for (i = 0; i < length - 1; i++) {
sum += parseInt(chars[i], 10) * (10 - i);
}
checksum = 11 - (sum % 11);
if (checksum === 11) {
checksum = 0;
} else if (checksum === 10) {
checksum = 'X';
}
return (checksum + '' === chars[length - 1]);
case 'ISBN13':
sum = 0;
for (i = 0; i < length - 1; i++) {
sum += ((i % 2 === 0) ? parseInt(chars[i], 10) : (parseInt(chars[i], 10) * 3));
}
checksum = 10 - (sum % 10);
if (checksum === 10) {
checksum = '0';
}
return (checksum + '' === chars[length - 1]);
default:
return false;
}
}
};
return FormValidation.Validator.isbn;
}));

View File

@ -1,87 +0,0 @@
/**
* isin validator
*
* @link http://formvalidation.io/validators/isin/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/isin", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
isin: {
'default': 'Please enter a valid ISIN number'
}
}
});
FormValidation.Validator.isin = {
// Available country codes
// See http://isin.net/country-codes/
COUNTRY_CODES: 'AF|AX|AL|DZ|AS|AD|AO|AI|AQ|AG|AR|AM|AW|AU|AT|AZ|BS|BH|BD|BB|BY|BE|BZ|BJ|BM|BT|BO|BQ|BA|BW|BV|BR|IO|BN|BG|BF|BI|KH|CM|CA|CV|KY|CF|TD|CL|CN|CX|CC|CO|KM|CG|CD|CK|CR|CI|HR|CU|CW|CY|CZ|DK|DJ|DM|DO|EC|EG|SV|GQ|ER|EE|ET|FK|FO|FJ|FI|FR|GF|PF|TF|GA|GM|GE|DE|GH|GI|GR|GL|GD|GP|GU|GT|GG|GN|GW|GY|HT|HM|VA|HN|HK|HU|IS|IN|ID|IR|IQ|IE|IM|IL|IT|JM|JP|JE|JO|KZ|KE|KI|KP|KR|KW|KG|LA|LV|LB|LS|LR|LY|LI|LT|LU|MO|MK|MG|MW|MY|MV|ML|MT|MH|MQ|MR|MU|YT|MX|FM|MD|MC|MN|ME|MS|MA|MZ|MM|NA|NR|NP|NL|NC|NZ|NI|NE|NG|NU|NF|MP|NO|OM|PK|PW|PS|PA|PG|PY|PE|PH|PN|PL|PT|PR|QA|RE|RO|RU|RW|BL|SH|KN|LC|MF|PM|VC|WS|SM|ST|SA|SN|RS|SC|SL|SG|SX|SK|SI|SB|SO|ZA|GS|SS|ES|LK|SD|SR|SJ|SZ|SE|CH|SY|TW|TJ|TZ|TH|TL|TG|TK|TO|TT|TN|TR|TM|TC|TV|UG|UA|AE|GB|US|UM|UY|UZ|VU|VE|VN|VG|VI|WF|EH|YE|ZM|ZW',
/**
* Validate an ISIN (International Securities Identification Number)
* Examples:
* - Valid: US0378331005, AU0000XVGZA3, GB0002634946
* - Invalid: US0378331004, AA0000XVGZA3
*
* @see http://en.wikipedia.org/wiki/International_Securities_Identifying_Number
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - message: The invalid message
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'isin');
if (value === '') {
return true;
}
value = value.toUpperCase();
var regex = new RegExp('^(' + this.COUNTRY_CODES + ')[0-9A-Z]{10}$');
if (!regex.test(value)) {
return false;
}
var converted = '',
length = value.length;
// Convert letters to number
for (var i = 0; i < length - 1; i++) {
var c = value.charCodeAt(i);
converted += ((c > 57) ? (c - 55).toString() : value.charAt(i));
}
var digits = '',
n = converted.length,
group = (n % 2 !== 0) ? 0 : 1;
for (i = 0; i < n; i++) {
digits += (parseInt(converted[i], 10) * ((i % 2) === group ? 2 : 1) + '');
}
var sum = 0;
for (i = 0; i < digits.length; i++) {
sum += parseInt(digits.charAt(i), 10);
}
sum = (10 - (sum % 10)) % 10;
return sum + '' === value.charAt(length - 1);
}
};
return FormValidation.Validator.isin;
}));

View File

@ -1,87 +0,0 @@
/**
* ismn validator
*
* @link http://formvalidation.io/validators/ismn/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/ismn", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
ismn: {
'default': 'Please enter a valid ISMN number'
}
}
});
FormValidation.Validator.ismn = {
/**
* Validate ISMN (International Standard Music Number)
* Examples:
* - Valid: M230671187, 979-0-0601-1561-5, 979 0 3452 4680 5, 9790060115615
* - Invalid: 9790060115614
*
* @see http://en.wikipedia.org/wiki/International_Standard_Music_Number
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - message: The invalid message
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'ismn');
if (value === '') {
return true;
}
// Groups are separated by a hyphen or a space
var type;
switch (true) {
case /^M\d{9}$/.test(value):
case /^M-\d{4}-\d{4}-\d{1}$/.test(value):
case /^M\s\d{4}\s\d{4}\s\d{1}$/.test(value):
type = 'ISMN10';
break;
case /^9790\d{9}$/.test(value):
case /^979-0-\d{4}-\d{4}-\d{1}$/.test(value):
case /^979\s0\s\d{4}\s\d{4}\s\d{1}$/.test(value):
type = 'ISMN13';
break;
default:
return false;
}
if ('ISMN10' === type) {
value = '9790' + value.substr(1);
}
// Replace all special characters except digits
value = value.replace(/[^0-9]/gi, '');
var length = value.length,
sum = 0,
weight = [1, 3];
for (var i = 0; i < length - 1; i++) {
sum += parseInt(value.charAt(i), 10) * weight[i % 2];
}
sum = 10 - sum % 10;
return (sum + '' === value.charAt(length - 1));
}
};
return FormValidation.Validator.ismn;
}));

View File

@ -1,74 +0,0 @@
/**
* issn validator
*
* @link http://formvalidation.io/validators/issn/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/issn", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
issn: {
'default': 'Please enter a valid ISSN number'
}
}
});
FormValidation.Validator.issn = {
/**
* Validate ISSN (International Standard Serial Number)
* Examples:
* - Valid: 0378-5955, 0024-9319, 0032-1478
* - Invalid: 0032-147X
*
* @see http://en.wikipedia.org/wiki/International_Standard_Serial_Number
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - message: The invalid message
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'issn');
if (value === '') {
return true;
}
// Groups are separated by a hyphen or a space
if (!/^\d{4}\-\d{3}[\dX]$/.test(value)) {
return false;
}
// Replace all special characters except digits and X
value = value.replace(/[^0-9X]/gi, '');
var chars = value.split(''),
length = chars.length,
sum = 0;
if (chars[7] === 'X') {
chars[7] = 10;
}
for (var i = 0; i < length; i++) {
sum += parseInt(chars[i], 10) * (8 - i);
}
return (sum % 11 === 0);
}
};
return FormValidation.Validator.issn;
}));

View File

@ -1,101 +0,0 @@
/**
* lessThan validator
*
* @link http://formvalidation.io/validators/lessThan/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/lessThan", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
lessThan: {
'default': 'Please enter a value less than or equal to %s',
notInclusive: 'Please enter a value less than %s'
}
}
});
FormValidation.Validator.lessThan = {
html5Attributes: {
message: 'message',
value: 'value',
inclusive: 'inclusive'
},
enableByHtml5: function($field) {
var type = $field.attr('type'),
max = $field.attr('max');
if (max && type !== 'date') {
return {
value: max
};
}
return false;
},
/**
* Return true if the input value is less than or equal to given number
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - value: The number used to compare to. It can be
* - A number
* - Name of field which its value defines the number
* - Name of callback function that returns the number
* - A callback function that returns the number
*
* - inclusive [optional]: Can be true or false. Default is true
* - message: The invalid message
* @returns {Boolean|Object}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'lessThan');
if (value === '') {
return true;
}
value = this._format(value);
if (!$.isNumeric(value)) {
return false;
}
var locale = validator.getLocale(),
compareTo = $.isNumeric(options.value) ? options.value : validator.getDynamicOption($field, options.value),
compareToValue = this._format(compareTo);
value = parseFloat(value);
return (options.inclusive === true || options.inclusive === undefined)
? {
valid: value <= compareToValue,
message: FormValidation.Helper.format(options.message || FormValidation.I18n[locale].lessThan['default'], compareTo)
}
: {
valid: value < compareToValue,
message: FormValidation.Helper.format(options.message || FormValidation.I18n[locale].lessThan.notInclusive, compareTo)
};
},
_format: function(value) {
return (value + '').replace(',', '.');
}
};
return FormValidation.Validator.lessThan;
}));

View File

@ -1,53 +0,0 @@
/**
* mac validator
*
* @link http://formvalidation.io/validators/mac/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/mac", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
mac: {
'default': 'Please enter a valid MAC address'
}
}
});
FormValidation.Validator.mac = {
/**
* Return true if the input value is a MAC address.
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - message: The invalid message
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'mac');
if (value === '') {
return true;
}
return /^([0-9A-F]{2}[:-]){5}([0-9A-F]{2})$/.test(value);
}
};
return FormValidation.Validator.mac;
}));

View File

@ -1,111 +0,0 @@
/**
* meid validator
*
* @link http://formvalidation.io/validators/meid/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/meid", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
meid: {
'default': 'Please enter a valid MEID number'
}
}
});
FormValidation.Validator.meid = {
/**
* Validate MEID (Mobile Equipment Identifier)
* Examples:
* - Valid: 293608736500703710, 29360-87365-0070-3710, AF0123450ABCDE, AF-012345-0ABCDE
* - Invalid: 2936087365007037101
*
* @see http://en.wikipedia.org/wiki/Mobile_equipment_identifier
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Can consist of the following keys:
* - message: The invalid message
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
var value = validator.getFieldValue($field, 'meid');
if (value === '') {
return true;
}
switch (true) {
// 14 digit hex representation (no check digit)
case /^[0-9A-F]{15}$/i.test(value):
// 14 digit hex representation + dashes or spaces (no check digit)
case /^[0-9A-F]{2}[- ][0-9A-F]{6}[- ][0-9A-F]{6}[- ][0-9A-F]$/i.test(value):
// 18 digit decimal representation (no check digit)
case /^\d{19}$/.test(value):
// 18 digit decimal representation + dashes or spaces (no check digit)
case /^\d{5}[- ]\d{5}[- ]\d{4}[- ]\d{4}[- ]\d$/.test(value):
// Grab the check digit
var cd = value.charAt(value.length - 1);
// Strip any non-hex chars
value = value.replace(/[- ]/g, '');
// If it's all digits, luhn base 10 is used
if (value.match(/^\d*$/i)) {
return FormValidation.Helper.luhn(value);
}
// Strip the check digit
value = value.slice(0, -1);
// Get every other char, and double it
var cdCalc = '';
for (var i = 1; i <= 13; i += 2) {
cdCalc += (parseInt(value.charAt(i), 16) * 2).toString(16);
}
// Get the sum of each char in the string
var sum = 0;
for (i = 0; i < cdCalc.length; i++) {
sum += parseInt(cdCalc.charAt(i), 16);
}
// If the last digit of the calc is 0, the check digit is 0
return (sum % 10 === 0)
? (cd === '0')
// Subtract it from the next highest 10s number (64 goes to 70) and subtract the sum
// Double it and turn it into a hex char
: (cd === ((Math.floor((sum + 10) / 10) * 10 - sum) * 2).toString(16));
// 14 digit hex representation (no check digit)
case /^[0-9A-F]{14}$/i.test(value):
// 14 digit hex representation + dashes or spaces (no check digit)
case /^[0-9A-F]{2}[- ][0-9A-F]{6}[- ][0-9A-F]{6}$/i.test(value):
// 18 digit decimal representation (no check digit)
case /^\d{18}$/.test(value):
// 18 digit decimal representation + dashes or spaces (no check digit)
case /^\d{5}[- ]\d{5}[- ]\d{4}[- ]\d{4}$/.test(value):
return true;
default:
return false;
}
}
};
return FormValidation.Validator.meid;
}));

View File

@ -1,65 +0,0 @@
/**
* notEmpty validator
*
* @link http://formvalidation.io/validators/notEmpty/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/notEmpty", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
notEmpty: {
'default': 'Please enter a value'
}
}
});
FormValidation.Validator.notEmpty = {
enableByHtml5: function($field) {
var required = $field.attr('required') + '';
return ('required' === required || 'true' === required);
},
/**
* Check if input value is empty or not
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
var type = $field.attr('type');
if ('radio' === type || 'checkbox' === type) {
var ns = validator.getNamespace();
return validator
.getFieldElements($field.attr('data-' + ns + '-field'))
.filter(':checked')
.length > 0;
}
if ('number' === type && $field.get(0).validity && $field.get(0).validity.badInput === true) {
return true;
}
return $.trim($field.val()) !== '';
}
};
return FormValidation.Validator.notEmpty;
}));

View File

@ -1,71 +0,0 @@
/**
* numeric validator
*
* @link http://formvalidation.io/validators/numeric/
* @author https://twitter.com/nghuuphuoc
* @copyright (c) 2013 - 2015 Nguyen Huu Phuoc
* @license http://formvalidation.io/license/
*/
(function(root, factory) {
"use strict";
// AMD module is defined
if (typeof define === "function" && define.amd) {
define("validator/numeric", ["jquery", "base"], factory);
} else {
// planted over the root!
factory(root.jQuery, root.FormValidation);
}
}(this, function ($, FormValidation) {
FormValidation.I18n = $.extend(true, FormValidation.I18n || {}, {
'en_US': {
numeric: {
'default': 'Please enter a valid float number'
}
}
});
FormValidation.Validator.numeric = {
html5Attributes: {
message: 'message',
separator: 'separator'
},
enableByHtml5: function($field) {
return ('number' === $field.attr('type')) && ($field.attr('step') !== undefined) && ($field.attr('step') % 1 !== 0);
},
/**
* Validate decimal number
*
* @param {FormValidation.Base} validator The validator plugin instance
* @param {jQuery} $field Field element
* @param {Object} options Consist of key:
* - message: The invalid message
* - separator: The decimal separator. Can be "." (default), ","
* @returns {Boolean}
*/
validate: function(validator, $field, options) {
if (this.enableByHtml5($field) && $field.get(0).validity && $field.get(0).validity.badInput === true) {
return false;
}
var value = validator.getFieldValue($field, 'numeric');
if (value === '') {
return true;
}
var separator = options.separator || '.';
if (separator !== '.') {
value = value.replace(separator, '.');
}
return !isNaN(parseFloat(value)) && isFinite(value);
}
};
return FormValidation.Validator.numeric;
}));

Some files were not shown because too many files have changed in this diff Show More