From 43371f941650d3ebcab424e94a162eea26ddace2 Mon Sep 17 00:00:00 2001 From: Nir Izraeli Date: Sat, 3 Sep 2016 16:52:58 +0300 Subject: [PATCH 01/23] Add template renderer And a template viewset mixin to provide an action based template path. Without any template this will error on every browser access Signed-off-by: Nir Izraeli --- idaplugin/rematch/network.py | 2 +- server/collab/views.py | 12 ++++++++---- server/rematch/settings.py | 8 +++++++- server/utils/__init__.py | 9 +++++++++ 4 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 server/utils/__init__.py diff --git a/idaplugin/rematch/network.py b/idaplugin/rematch/network.py index ef9760748..3254269f0 100755 --- a/idaplugin/rematch/network.py +++ b/idaplugin/rematch/network.py @@ -156,7 +156,7 @@ def get_headers(token, json): headers = {} if json: - headers['Accept'] = 'application/json, text/html, */*' + headers['Accept'] = 'application/json; indent=2, application/json, */*' headers['Content-Type'] = 'application/json' if token is None and 'token' in config['login']: token = config['login']['token'] diff --git a/server/collab/views.py b/server/collab/views.py index 39dc62fab..e7acb1fe5 100644 --- a/server/collab/views.py +++ b/server/collab/views.py @@ -9,6 +9,7 @@ SimpleInstanceSerializer, AnnotationSerializer) from collab.permissions import IsOwnerOrReadOnly from collab import tasks +from utils import ViewSetTemplateMixin class ViewSetOwnerMixin(object): @@ -30,14 +31,16 @@ def get_serializer(self, *args, **kwargs): return super(ViewSetManyAllowedMixin, self).get_serializer(*args, **kwargs) -class ProjectViewSet(ViewSetOwnerMixin, viewsets.ModelViewSet): +class ProjectViewSet(ViewSetOwnerMixin, ViewSetTemplateMixin, + viewsets.ModelViewSet): queryset = Project.objects.all() serializer_class = ProjectSerializer permission_classes = (permissions.IsAuthenticatedOrReadOnly,) filter_fields = ('created', 'owner', 'name', 'description', 'private') -class FileViewSet(ViewSetOwnerMixin, viewsets.ModelViewSet): +class FileViewSet(ViewSetOwnerMixin, ViewSetTemplateMixin, + viewsets.ModelViewSet): queryset = File.objects.all() serializer_class = FileSerializer permission_classes = (permissions.IsAuthenticatedOrReadOnly,) @@ -156,13 +159,14 @@ class MatchViewSet(viewsets.ReadOnlyModelViewSet): class InstanceViewSet(ViewSetManyAllowedMixin, ViewSetOwnerMixin, - viewsets.ModelViewSet): + ViewSetTemplateMixin, viewsets.ModelViewSet): queryset = Instance.objects.all() serializer_class = InstanceVectorSerializer filter_fields = ('owner', 'file_version', 'type') -class VectorViewSet(ViewSetManyAllowedMixin, viewsets.ModelViewSet): +class VectorViewSet(ViewSetManyAllowedMixin, ViewSetTemplateMixin, + viewsets.ModelViewSet): queryset = Vector.objects.all() serializer_class = VectorSerializer permission_classes = (permissions.IsAuthenticatedOrReadOnly,) diff --git a/server/rematch/settings.py b/server/rematch/settings.py index faaa51b3c..a22a0a43a 100644 --- a/server/rematch/settings.py +++ b/server/rematch/settings.py @@ -100,7 +100,13 @@ 'django_filters.rest_framework.DjangoFilterBackend', ), - 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination' + 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination', + + 'DEFAULT_RENDERER_CLASSES': ( + 'rest_framework.renderers.TemplateHTMLRenderer', + 'rest_framework.renderers.JSONRenderer', + 'rest_framework.renderers.BrowsableAPIRenderer', + ) } REST_SESSION_LOGIN = False diff --git a/server/utils/__init__.py b/server/utils/__init__.py new file mode 100644 index 000000000..e5cfe1268 --- /dev/null +++ b/server/utils/__init__.py @@ -0,0 +1,9 @@ +import os + + +class ViewSetTemplateMixin(object): + def get_template_names(self): + name_parts = [self.__class__.__name__.lower(), + "{}.html".format(self.action)] + template_name = os.path.join(*name_parts) + return [template_name] From 6b0d19eabe27ada01918b3b68c8c045173f80aed Mon Sep 17 00:00:00 2001 From: Nir Izraeli Date: Sun, 6 Nov 2016 19:13:49 -0800 Subject: [PATCH 02/23] Add a basic template and include registration urls Signed-off-by: Nir Izraeli --- server/accounts/urls.py | 2 + server/accounts/views.py | 2 +- server/rematch/settings.py | 10 +- server/template/base.html | 331 +++ .../template/static/css/style-responsive.css | 295 +++ server/template/static/css/style.css | 2254 +++++++++++++++++ 6 files changed, 2891 insertions(+), 3 deletions(-) create mode 100755 server/template/base.html create mode 100755 server/template/static/css/style-responsive.css create mode 100755 server/template/static/css/style.css diff --git a/server/accounts/urls.py b/server/accounts/urls.py index 33b23ce15..57aad5946 100644 --- a/server/accounts/urls.py +++ b/server/accounts/urls.py @@ -4,4 +4,6 @@ urlpatterns = [ url(r'^profile/$', views.profile, name='profile'), url(r'', include('rest_auth.urls')), + url(r'', include('registration.backends.default.urls')), + # url('^/', include('django.contrib.auth.urls')), ] diff --git a/server/accounts/views.py b/server/accounts/views.py index 585943680..68543540d 100644 --- a/server/accounts/views.py +++ b/server/accounts/views.py @@ -16,4 +16,4 @@ def profile(request): "last_name": request.user.last_name, "email": request.user.email, }) - return Response(user) + return Response(user, template_name='profile.html') diff --git a/server/rematch/settings.py b/server/rematch/settings.py index a22a0a43a..e21e1424e 100644 --- a/server/rematch/settings.py +++ b/server/rematch/settings.py @@ -25,7 +25,6 @@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True - # As of django 1.10, allowed hosts are validated in debug as well, # this disables that and makes sure all hosts are acceptible when # running in debug mode. for more details see @@ -47,6 +46,7 @@ 'rest_framework.authtoken', 'rest_auth', 'djcelery', + 'registration', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', @@ -72,7 +72,9 @@ TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], + 'DIRS': [ + os.path.join(BASE_DIR, 'template') + ], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ @@ -168,6 +170,7 @@ STATIC_URL = '/static/' +STATICFILES_DIRS = [os.path.join(BASE_DIR, "template/static")] # Celery configuration @@ -175,3 +178,6 @@ CELERY_ACCEPT_CONTENT = ['json'] CELERY_TASK_SERIALIZER = 'json' CELERY_RESULT_SERIALIZER = 'json' + +# Django Registration Redux configuration +ACCOUNT_ACTIVATION_DAYS = 1 diff --git a/server/template/base.html b/server/template/base.html new file mode 100755 index 000000000..68ecf7220 --- /dev/null +++ b/server/template/base.html @@ -0,0 +1,331 @@ +{% load staticfiles %} + + + + + + + + + + + Rematch + + + + + + + + + + + + + + + +
+ + +
+ + + + + +
+ +
+
+ + + + + + + + +
+
+
+
+
+

{% block title %}{% endblock %}

+
+
+

{% block content %}{% endblock %}

+
+
+
+
+
+
+
+ + + + +
+ + + + + + + + + + + + + + + diff --git a/server/template/static/css/style-responsive.css b/server/template/static/css/style-responsive.css new file mode 100755 index 000000000..f59934538 --- /dev/null +++ b/server/template/static/css/style-responsive.css @@ -0,0 +1,295 @@ +@media (min-width: 980px) { + /*-----*/ + .custom-bar-chart { + margin-bottom: 40px; + } + +} + +@media (min-width: 768px) and (max-width: 979px) { + + /*-----*/ + .custom-bar-chart { + margin-bottom: 40px; + } + + /*chat room*/ + + +} + +@media (max-width: 768px) { + + .header { + position: absolute; + } + + /*sidebar*/ + + #sidebar { + height: auto; + overflow: hidden; + position: absolute; + width: 100%; + z-index: 1001; + } + + + /* body container */ + #main-content { + margin: 0px!important; + position: none !important; + } + + #sidebar > ul > li > a > span { + line-height: 35px; + } + + #sidebar > ul > li { + margin: 0 10px 5px 10px; + } + #sidebar > ul > li > a { + height:35px; + line-height:35px; + padding: 0 10px; + text-align: left; + } + #sidebar > ul > li > a i{ + /*display: none !important;*/ + } + + #sidebar ul > li > a .arrow, #sidebar > ul > li > a .arrow.open { + margin-right: 10px; + margin-top: 15px; + } + + #sidebar ul > li.active > a .arrow, #sidebar ul > li > a:hover .arrow, #sidebar ul > li > a:focus .arrow, + #sidebar > ul > li.active > a .arrow.open, #sidebar > ul > li > a:hover .arrow.open, #sidebar > ul > li > a:focus .arrow.open{ + margin-top: 15px; + } + + #sidebar > ul > li > a, #sidebar > ul > li > ul.sub > li { + width: 100%; + } + #sidebar > ul > li > ul.sub > li > a { + background: transparent !important ; + } + #sidebar > ul > li > ul.sub > li > a:hover { + + } + + + /* sidebar */ + #sidebar { + margin: 0px !important; + } + + /* sidebar collabler */ + #sidebar .btn-navbar.collapsed .arrow { + display: none; + } + + #sidebar .btn-navbar .arrow { + position: absolute; + right: 35px; + width: 0; + height: 0; + top:48px; + border-bottom: 15px solid #282e36; + border-left: 15px solid transparent; + border-right: 15px solid transparent; + } + + + /*---------*/ + + .modal-footer .btn { + margin-bottom: 0px !important; + } + + .btn { + margin-bottom: 5px; + } + + + /* full calendar fix */ + .fc-header-right { + left:25px; + position: absolute; + } + + .fc-header-left .fc-button { + margin: 0px !important; + top: -10px !important; + } + + .fc-header-right .fc-button { + margin: 0px !important; + top: -50px !important; + } + + .fc-state-active, .fc-state-active .fc-button-inner, .fc-state-hover, .fc-state-hover .fc-button-inner { + background: none !important; + color: #FFFFFF !important; + } + + .fc-state-default, .fc-state-default .fc-button-inner { + background: none !important; + } + + .fc-button { + border: none !important; + margin-right: 2px; + } + + .fc-view { + top: 0px !important; + } + + .fc-button .fc-button-inner { + margin: 0px !important; + padding: 2px !important; + border: none !important; + margin-right: 2px !important; + background-color: #fafafa !important; + background-image: -moz-linear-gradient(top, #fafafa, #efefef) !important; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fafafa), to(#efefef)) !important; + background-image: -webkit-linear-gradient(top, #fafafa, #efefef) !important; + background-image: -o-linear-gradient(top, #fafafa, #efefef) !important; + background-image: linear-gradient(to bottom, #fafafa, #efefef) !important; + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#fafafa', endColorstr='#efefef', GradientType=0) !important; + -webkit-box-shadow: 0 1px 0px rgba(255, 255, 255, .8) !important; + -moz-box-shadow: 0 1px 0px rgba(255, 255, 255, .8) !important; + box-shadow: 0 1px 0px rgba(255, 255, 255, .8) !important; + -webkit-border-radius: 3px !important; + -moz-border-radius: 3px !important; + border-radius: 3px !important; + color: #646464 !important; + border: 1px solid #ddd !important; + text-shadow: 0 1px 0px rgba(255, 255, 255, .6) !important; + text-align: center; + } + + .fc-button.fc-state-disabled .fc-button-inner { + color: #bcbbbb !important; + } + + .fc-button.fc-state-active .fc-button-inner { + background-color: #e5e4e4 !important; + background-image: -moz-linear-gradient(top, #e5e4e4, #dddcdc) !important; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e5e4e4), to(#dddcdc)) !important; + background-image: -webkit-linear-gradient(top, #e5e4e4, #dddcdc) !important; + background-image: -o-linear-gradient(top, #e5e4e4, #dddcdc) !important; + background-image: linear-gradient(to bottom, #e5e4e4, #dddcdc) !important; + filter: progid:dximagetransform.microsoft.gradient(startColorstr='#e5e4e4', endColorstr='#dddcdc', GradientType=0) !important; + } + + .fc-content { + margin-top: 50px; + } + + .fc-header-title h2 { + line-height: 40px !important; + font-size: 12px !important; + } + + .fc-header { + margin-bottom:0px !important; + } + + /*--*/ + + /*.chart-position {*/ + /*margin-top: 0px;*/ + /*}*/ + + .stepy-titles li { + margin: 10px 3px; + } + + /*-----*/ + .custom-bar-chart { + margin-bottom: 40px; + } + + /*menu icon plus minus*/ + .dcjq-icon { + top: 10px; + } + ul.sidebar-menu li ul.sub li a { + padding: 0; + } + + /*---*/ + + .img-responsive { + width: 100%; + } + +} + + + +@media (max-width: 480px) { + + .notify-row, .search, .dont-show , .inbox-head .sr-input, .inbox-head .sr-btn{ + display: none; + } + + #top_menu .nav > li, ul.top-menu > li { + float: right; + } + .hidden-phone { + display: none !important; + } + + .chart-position { + margin-top: 0px; + } + + .navbar-inverse .navbar-toggle:hover, .navbar-inverse .navbar-toggle:focus { + background-color: #ccc; + border-color:#ccc ; + } + +} + +@media (max-width:320px) { + .login-social-link a { + padding: 15px 17px !important; + } + + .notify-row, .search, .dont-show, .inbox-head .sr-input, .inbox-head .sr-btn { + display: none; + } + + #top_menu .nav > li, ul.top-menu > li { + float: right; + } + + .hidden-phone { + display: none !important; + } + + .chart-position { + margin-top: 0px; + } + + .lock-wrapper { + margin: 10% auto; + max-width: 310px; + } + .lock-input { + width: 82%; + } + + .cmt-form { + display: inline-block; + width: 75%; + } + +} + + + + diff --git a/server/template/static/css/style.css b/server/template/static/css/style.css new file mode 100755 index 000000000..d1655bdec --- /dev/null +++ b/server/template/static/css/style.css @@ -0,0 +1,2254 @@ +/* +Template Name: DASHGUM FREE - Bootstrap 3.2 Admin Theme +Template Version: 1.0 +Author: Carlos Alvarez +Website: http://blacktie.co +Premium: http://www.gridgum.com +*/ + +/* Import fonts */ +@import url(http://fonts.googleapis.com/css?family=Ruda:400,700,900); + +/* BASIC THEME CONFIGURATION */ +body { + color: #797979; + background: #f2f2f2; + font-family: 'Ruda', sans-serif; + padding: 0px !important; + margin: 0px !important; + font-size:13px; +} + +ul li { + list-style: none; +} + +a, a:hover, a:focus { + text-decoration: none; + outline: none; +} +::selection { + + background: #68dff0; + color: #fff; +} +::-moz-selection { + background: #68dff0; + color: #fff; +} + +#container { + width: 100%; + height: 100%; +} + +/* Bootstrap Modifications */ +.modal-header { + background: #68dff0; +} + +.modal-title { + color: white; +} + +.btn-round { + border-radius: 20px; + -webkit-border-radius: 20px; +} + +.accordion-heading .accordion-toggle { + display: block; + cursor: pointer; + border-top: 1px solid #F5F5F5; + padding: 5px 0px; + line-height: 28.75px; + text-transform: uppercase; + color: #1a1a1a; + background-color: #ffffff; + outline: none !important; + text-decoration: none; +} + + + +/*Theme Backgrounds*/ + +.bg-theme { + background-color: #68dff0; +} + +.bg-theme02 { + background-color: #ac92ec; +} + +.bg-theme03 { + background-color: #48cfad; +} + +.bg-theme04 { + background-color: #ed5565; +} +/*Theme Buttons*/ + +.btn-theme { + color: #fff; + background-color: #68dff0; + border-color: #48bcb4; +} +.btn-theme:hover, +.btn-theme:focus, +.btn-theme:active, +.btn-theme.active, +.open .dropdown-toggle.btn-theme { + color: #fff; + background-color: #48bcb4; + border-color: #48bcb4; +} + +.btn-theme02 { + color: #fff; + background-color: #ac92ec; + border-color: #967adc; +} +.btn-theme02:hover, +.btn-theme02:focus, +.btn-theme02:active, +.btn-theme02.active, +.open .dropdown-toggle.btn-theme02 { + color: #fff; + background-color: #967adc; + border-color: #967adc; +} + +.btn-theme03 { + color: #fff; + background-color: #48cfad; + border-color: #37bc9b; +} +.btn-theme03:hover, +.btn-theme03:focus, +.btn-theme03:active, +.btn-theme03.active, +.open .dropdown-toggle.btn-theme03 { + color: #fff; + background-color: #37bc9b; + border-color: #37bc9b; +} + +.btn-theme04 { + color: #fff; + background-color: #ed5565; + border-color: #da4453; +} +.btn-theme04:hover, +.btn-theme04:focus, +.btn-theme04:active, +.btn-theme04.active, +.open .dropdown-toggle.btn-theme04 { + color: #fff; + background-color: #da4453; + border-color: #da4453; +} + +.btn-clear-g { + color: #48bcb4; + background: transparent; + border-color: #48bcb4; +} + +.btn-clear-g:hover { + color: white; +} + +hr { + margin-top: 20px; + margin-bottom: 20px; + border: 0; + border-top: 1px solid #797979; +} + + + +/*Helpers*/ + +.centered { + text-align: center; +} + +.goleft { + text-align: left; +} + +.goright { + text-align: right; +} + +.mt { + margin-top: 25px; +} + +.mb { + margin-bottom: 25px; +} + +.ml { + margin-left: 5px; + } + +.no-padding { + padding: 0 !important; +} + +.no-margin { + margin: 0 !important; +} + +/*Exclusive Theme Colors Configuration*/ + +.label-theme { + background-color: #68dff0; +} + +.bg-theme { + background-color: #68dff0; +} + +ul.top-menu > li > .logout { + color: #f2f2f2; + font-size: 12px; + border-radius: 4px; + -webkit-border-radius: 4px; + border: 1px solid #64c3c2 !important; + padding: 5px 15px; + margin-right: 15px; + background: #68dff0; + margin-top: 15px; +} + +ul.top-menu > li > .login { + color: #f2f2f2; + font-size: 12px; + border-radius: 4px; + -webkit-border-radius: 4px; + border: 1px solid #64c3c2 !important; + padding: 5px 15px; + margin-right: 15px; + background: #68dff0; + margin-top: 15px; +} + +/*sidebar navigation*/ + +#sidebar { + width: 210px; + height: 100%; + position: fixed; + background: #424a5d; +} + +#sidebar h5 { + color: #f2f2f2; + font-weight: 700; +} + +#sidebar ul li { + position: relative; +} + +#sidebar .sub-menu > .sub li { + padding-left: 32px; +} + +#sidebar .sub-menu > .sub li:last-child { + padding-bottom: 10px; +} + +/*LEFT NAVIGATION ICON*/ +.dcjq-icon { + height:17px; + width:17px; + display:inline-block; + background: url("../img/nav-expand.png") no-repeat top; + border-radius:3px; + -moz-border-radius:3px; + -webkit-border-radius:3px; + position:absolute; + right:10px; + top:15px; +} +.active .dcjq-icon { + background: url("../img/nav-expand.png") no-repeat bottom; + border-radius:3px; + -moz-border-radius:3px; + -webkit-border-radius:3px; +} +/*---*/ + +.nav-collapse.collapse { + display: inline; +} + +ul.sidebar-menu , ul.sidebar-menu li ul.sub{ + margin: -2px 0 0; + padding: 0; +} + +ul.sidebar-menu { + margin-top: 75px; +} + +#sidebar > ul > li > ul.sub { + display: none; +} + +#sidebar > ul > li.active > ul.sub, #sidebar > ul > li > ul.sub > li > a { + display: block; +} + +ul.sidebar-menu li ul.sub li{ + background: #424a5d; + margin-bottom: 0; + margin-left: 0; + margin-right: 0; +} + +ul.sidebar-menu li ul.sub li:last-child{ + border-radius: 0 0 4px 4px; + -webkit-border-radius: 0 0 4px 4px; +} + +ul.sidebar-menu li ul.sub li a { + font-size: 12px; + padding: 6px 0; + line-height: 35px; + height: 35px; + -webkit-transition: all 0.3s ease; + -moz-transition: all 0.3s ease; + -o-transition: all 0.3s ease; + -ms-transition: all 0.3s ease; + transition: all 0.3s ease; + color: #aeb2b7; +} + +ul.sidebar-menu li ul.sub li a:hover { + color: white; + background: transparent; +} + +ul.sidebar-menu li ul.sub li.active a { + color: #68dff0; + -webkit-transition: all 0.3s ease; + -moz-transition: all 0.3s ease; + -o-transition: all 0.3s ease; + -ms-transition: all 0.3s ease; + transition: all 0.3s ease; + display: block; +} + +ul.sidebar-menu li{ + /*line-height: 20px !important;*/ + margin-bottom: 5px; + margin-left:10px; + margin-right:10px; +} + +ul.sidebar-menu li.sub-menu{ + line-height: 15px; +} + +ul.sidebar-menu li a span{ + display: inline-block; +} + +ul.sidebar-menu li a{ + color: #aeb2b7; + text-decoration: none; + display: block; + padding: 15px 0 15px 10px; + font-size: 12px; + outline: none; + -webkit-transition: all 0.3s ease; + -moz-transition: all 0.3s ease; + -o-transition: all 0.3s ease; + -ms-transition: all 0.3s ease; + transition: all 0.3s ease; +} + +ul.sidebar-menu li a.active, ul.sidebar-menu li a:hover, ul.sidebar-menu li a:focus { + background: #68dff0; + color: #fff; + display: block; + + -webkit-transition: all 0.3s ease; + -moz-transition: all 0.3s ease; + -o-transition: all 0.3s ease; + -ms-transition: all 0.3s ease; + transition: all 0.3s ease; +} + + +ul.sidebar-menu li a i { + font-size: 15px; + padding-right: 6px; +} + +ul.sidebar-menu li a:hover i, ul.sidebar-menu li a:focus i { + color: #fff; +} + +ul.sidebar-menu li a.active i { + color: #fff; +} + + +.mail-info, .mail-info:hover { + margin: -3px 6px 0 0; + font-size: 11px; +} + +/* MAIN CONTENT CONFIGURATION */ +#main-content { + margin-left: 210px; +} + +.header, .footer { + min-height: 60px; + padding: 0 15px; +} + +.header { + position: fixed; + left: 0; + right: 0; + z-index: 1002; +} + +.black-bg { + background: #ffd777; + border-bottom: 1px solid #c9aa5f; +} + +.wrapper { + display: inline-block; + margin-top: 60px; + padding-left: 15px; + padding-right: 15px; + padding-bottom: 15px; + padding-top: 0px; + width: 100%; +} + +a.logo { + font-size: 20px; + color: #ffffff; + float: left; + margin-top: 15px; + text-transform: uppercase; +} + +a.logo b { + font-weight: 900; +} + +a.logo:hover, a.logo:focus { + text-decoration: none; + outline: none; +} + +a.logo span { + color: #68dff0; +} + + +/*notification*/ +#top_menu .nav > li, ul.top-menu > li { + float: left; +} + +.notify-row { + float: left; + margin-top: 15px; + margin-left: 92px; +} + +.notify-row .notification span.label { + display: inline-block; + height: 18px; + width: 20px; + padding: 5px; +} + +ul.top-menu > li > a { + color: #666666; + font-size: 16px; + border-radius: 4px; + -webkit-border-radius: 4px; + border:1px solid #666666 !important; + padding: 2px 6px; + margin-right: 15px; +} + +ul.top-menu > li > a:hover, ul.top-menu > li > a:focus { + border:1px solid #b6b6b6 !important; + background-color: transparent !important; + border-color: #b6b6b6 !important; + text-decoration: none; + border-radius: 4px; + -webkit-border-radius: 4px; + color: #b6b6b6 !important; +} + +.notify-row .badge { + position: absolute; + right: -10px; + top: -10px; + z-index: 100; +} + +.dropdown-menu.extended { + max-width: 300px !important; + min-width: 160px !important; + top: 42px; + width: 235px !important; + padding: 0; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.176) !important; + border: none !important; + border-radius: 4px; + -webkit-border-radius: 4px; +} + +@media screen and (-webkit-min-device-pixel-ratio:0) { + /* Safari and Chrome */ + .dropdown-menu.extended { + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.176) !important; + }; + } + +.dropdown-menu.extended li p { + background-color: #F1F2F7; + color: #666666; + margin: 0; + padding: 10px; + border-radius: 4px 4px 0px 0px; + -webkit-border-radius: 4px 4px 0px 0px; +} + +.dropdown-menu.extended li p.green { + background-color: #68dff0; + color: #fff; +} + +.dropdown-menu.extended li p.yellow { + background-color: #fcb322; + color: #fff; +} + +.dropdown-menu.extended li a { + border-bottom: 1px solid #EBEBEB !important; + font-size: 12px; + list-style: none; +} + +.dropdown-menu.extended li a { + padding: 15px 10px !important; + width: 100%; + display: inline-block; +} + +.dropdown-menu.extended li a:hover { + background-color: #F7F8F9 !important; + color: #2E2E2E; +} + +.dropdown-menu.tasks-bar .task-info .desc { + font-size: 13px; + font-weight: normal; +} + +.dropdown-menu.tasks-bar .task-info .percent { + display: inline-block; + float: right; + font-size: 13px; + font-weight: 600; + padding-left: 10px; + margin-top: -4px; +} + +.dropdown-menu.extended .progress { + margin-bottom: 0 !important; + height: 10px; +} + +.dropdown-menu.inbox li a .photo img { + border-radius: 2px 2px 2px 2px; + float: left; + height: 40px; + margin-right: 4px; + width: 40px; +} + +.dropdown-menu.inbox li a .subject { + display: block; +} + +.dropdown-menu.inbox li a .subject .from { + font-size: 12px; + font-weight: 600; +} + +.dropdown-menu.inbox li a .subject .time { + font-size: 11px; + font-style: italic; + font-weight: bold; + position: absolute; + right: 5px; +} + +.dropdown-menu.inbox li a .message { + display: block !important; + font-size: 11px; +} + +.top-nav { + margin-top: 7px; +} + +.top-nav ul.top-menu > li .dropdown-menu.logout { + width: 268px !important; + +} + +.top-nav li.dropdown .dropdown-menu { + float: right; + right: 0; + left: auto; +} + +.dropdown-menu.extended.logout > li { + float: left; + text-align: center; + width: 33.3%; +} + +.dropdown-menu.extended.logout > li:last-child { + float: left; + text-align: center; + width: 100%; + background: #a9d96c; + border-radius: 0 0 3px 3px; +} + +.dropdown-menu.extended.logout > li:last-child > a, .dropdown-menu.extended.logout > li:last-child > a:hover { + color: #fff; + border-bottom: none !important; + text-transform: uppercase; +} + +.dropdown-menu.extended.logout > li:last-child > a:hover > i{ + color: #fff; +} + +.dropdown-menu.extended.logout > li > a { + color: #a4abbb; + border-bottom: none !important; +} + +.full-width .dropdown-menu.extended.logout > li > a:hover { + background: none !important; + color: #50c8ea !important; +} + +.dropdown-menu.extended.logout > li > a:hover { + background: none !important; +} + +.dropdown-menu.extended.logout > li > a:hover i { + color: #50c8ea; +} + +.dropdown-menu.extended.logout > li > a i { + font-size: 17px; +} + +.dropdown-menu.extended.logout > li > a > i { + display: block; +} + +.top-nav ul.top-menu > li > a { + border: 1px solid #eeeeee; + border-radius: 4px; + -webkit-border-radius: 4px; + padding: 6px; + background: none; + margin-right: 0; +} +.top-nav ul.top-menu > li { + margin-left: 10px; +} + +.top-nav ul.top-menu > li > a:hover, .top-nav ul.top-menu > li > a:focus { + border:1px solid #F1F2F7; + background: #F1F2F7; + +} + +.top-nav .dropdown-menu.extended.logout { + top: 50px; +} + +.top-nav .nav .caret { + border-bottom-color: #A4AABA; + border-top-color: #A4AABA; +} +.top-nav ul.top-menu > li > a:hover .caret { + border-bottom-color: #000; + border-top-color: #000; +} + +.log-arrow-up { + background: url("../img/arrow-up.png") no-repeat; + width: 20px; + height: 11px; + position: absolute; + right: 20px; + top: -10px; +} + +/*----*/ + +.notify-arrow { + border-style: solid; + border-width: 0 9px 9px; + height: 0; + margin-top: 0; + opacity: 0; + position: absolute; + left: 7px; + top: -18px; + transition: all 0.25s ease 0s; + width: 0; + z-index: 10; + margin-top: 10px; + opacity: 1; +} + +.notify-arrow-yellow { + border-color: transparent transparent #FCB322; + border-bottom-color: #FCB322 !important; + border-top-color: #FCB322 !important; +} +.notify-arrow-green { + border-color: transparent transparent #68dff0; + border-bottom-color: #68dff0 !important; + border-top-color: #68dff0 !important; +} + + + +/*--sidebar toggle---*/ + +.sidebar-toggle-box { + float: left; + padding-right: 15px; + margin-top: 20px; +} + +.sidebar-toggle-box .fa-bars { + cursor: pointer; + display: inline-block; + font-size: 20px; +} + + +.sidebar-closed > #sidebar > ul { + display: none; +} + +.sidebar-closed #main-content { + margin-left: 0px; +} + +.sidebar-closed #sidebar { + margin-left: -180px; +} + + +/* Dash Side */ + +.ds { + background: #ffffff; + padding-top: 20px; +} + +.ds h4 { + font-size: 14px; + font-weight: 700; +} + +.ds h3 { + color: #ffffff; + font-size: 16px; + padding: 0 10px; + line-height: 60px; + height: 60px; + margin: 0; + background: #ff865c; + text-align: center; +} + +.ds i { + font-size: 12px; + line-height: 16px; +} + +.ds .desc { + border-bottom: 1px solid #eaeaea; + display: inline-block; + padding: 15px 0; + width: 100%; +} + +.ds .desc:hover { + background: #f2f2f2; +} + +.ds .thumb { + width: 30px; + margin: 0 10px 0 20px; + display: block; + float: left; +} + +.ds .details { + width: 170px; + float: left; +} + +.ds > .desc p { + font-size: 11px; +} + +.ds p > muted { + font-size: 9px; + text-transform: uppercase; + font-style: italic; + color: #666666 +} + +.ds a { + color: #68dff0; +} + +/* LINE ICONS CONFIGURATION */ + +.mtbox { + margin-top: 80px; + margin-bottom: 40px; +} + +.box1 { + padding: 15px; + text-align: center; + color: #989898; + border-bottom: 1px solid #989898; +} + +.box1 span { + font-size: 50px; + +} + +.box1 h3 { + text-align: center; +} + +.box0:hover .box1 { + border-bottom: 1px solid #ffffff; +} + +.box0 p { + text-align: center; + font-size: 12px; + color: #f2f2f2; +} + +.box0:hover p { + color: #ff865c; +} + +.box0:hover { + background: #ffffff; + box-shadow: 0 2px 1px rgba(0, 0, 0, 0.2); +} + +/* MAIN CHART CONFIGURATION */ +.main-chart { + padding-top: 20px; +} + +.mleft { +} + +.border-head h3 { + margin-top: 20px; + margin-bottom: 20px; + margin-left: 15px; + padding-bottom: 5px; + font-weight: normal; + font-size: 18px; + display: inline-block; + width: 100%; + font-weight: 700; + color: #989898; +} + +.custom-bar-chart { + height: 290px; + margin-top: 20px; + margin-left: 20px; + position: relative; + border-bottom: 1px solid #c9cdd7; +} + +.custom-bar-chart .bar { + height: 100%; + position: relative; + width: 6%; + margin: 0px 4%; + float: left; + text-align: center; + z-index: 10; +} + +.custom-bar-chart .bar .title { + position: absolute; + bottom: -30px; + width: 100%; + text-align: center; + font-size: 11px; +} + +.custom-bar-chart .bar .value { + position: absolute; + bottom: 0; + background: #ff865c; + color: #68dff0; + width: 100%; + -webkit-border-radius: 5px 5px 0 0; + -moz-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; + -webkit-transition: all .3s ease; + -moz-transition: all .3s ease; + -ms-transition: all .3s ease; + -o-transition: all .3s ease; + transition: all .3s ease; +} + + + +.custom-bar-chart .bar .value:hover { + background: #2f2f2f; + color: #fff; +} + +.y-axis { + color: #555555; + position: absolute; + text-align: left; + width: 100%; + font-size: 11px; +} + +.y-axis li { + border-top: 1px dashed #dbdce0; + display: block; + height: 58px; + width: 100%; +} + +.y-axis li:last-child { + border-top: none; +} + +.y-axis li span { + display: block; + margin: -10px 0 0 -60px; + padding: 0 10px; + width: 40px; +} + + +/*Donut Chart Main Page Conf*/ +.donut-main { + display: block; + text-align: center; +} + +.donut-main h4 { + font-weight: 700; + font-size: 16px; +} + +/* ************************************************************************************* +PANELS CONFIGURATIONS +*************************************************************************************** */ + +/*Panel Size*/ + +.pn { + height: 250px; + box-shadow: 0 2px 1px rgba(0, 0, 0, 0.2); +} + +.pn:hover { + box-shadow: 2px 3px 2px rgba(0, 0, 0, 0.3); + +} + +/*Grey Panel*/ + +.grey-panel { + text-align: center; + background: #dfdfe1; +} +.grey-panel .grey-header { + background: #ccd1d9; + padding: 3px; + margin-bottom: 15px; +} +.grey-panel h5 { + font-weight: 200; + margin-top: 10px; +} +.grey-panel p { + margin-left: 5px; +} +/* Specific Conf for Donut Charts*/ +.donut-chart p { + margin-top: 5px; + font-weight: 700; + margin-left: 15px; +} +.donut-chart h2 { + font-weight: 900; + color: #FF6B6B; + font-size: 38px; +} + +/* Dark Blue*/ + +.darkblue-panel { + text-align: center; + background: #444c57; +} +.darkblue-panel .darkblue-header { + background: transparent; + padding: 3px; + margin-bottom: 15px; +} +.darkblue-panel h1 { + color: #f2f2f2; +} +.darkblue-panel h5 { + font-weight: 200; + margin-top: 10px; + color: white; +} +.darkblue-panel footer { + color: white; +} +.darkblue-panel footer h5 { + margin-left:10px; + margin-right: 10px; + font-weight: 700; +} + +/*Green Panel*/ +.green-panel { + text-align: center; + background: #68dff0; +} +.green-panel .green-header { + background: #43b1a9; + padding: 3px; + margin-bottom: 15px; +} +.green-panel h5 { + color: white; + font-weight: 200; + margin-top: 10px; +} +.green-panel h3 { + color: white; + font-weight: 100; +} +.green-panel p { + color: white; +} + +/*White Panel */ +.white-panel { + text-align: center; + background: #ffffff; + color: #ccd1d9; +} + +.white-panel p { + margin-top: 5px; + font-weight: 700; + margin-left: 15px; +} +.white-panel .white-header { + background: #f4f4f4; + padding: 3px; + margin-bottom: 15px; + color: #c6c6c6; +} +.white-panel .small { + font-size: 10px; + color: #ccd1d9; +} + +.white-panel i { + color: #68dff0; + padding-right: 4px; + font-size: 14px; +} + +/*STOCK CARD Panel*/ +.card { + background: white; + box-shadow: 0 2px 1px rgba(0, 0, 0, 0.2); + margin-bottom: 1em; + height: 250px; +} +.stock .stock-chart { + background: #00c5de; +} +.stock .stock-chart #chart { + height: 10.7em; + background: url(http://i.imgbox.com/abmuNQx2) center bottom no-repeat; +} +.stock .current-price { + background: #1d2122; + padding: 10px; +} +.stock .current-price .info abbr { + display: block; + color: #f8f8f8; + font-size: 1.5em; + font-weight: 600; + margin-top: 0.18em; +} +.stock .current-price .changes { + text-align: right; +} +.stock .changes .up { + color: #4fd98b +} +.stock .current-price .changes .value { + font-size: 1.8em; + font-weight: 700; +} +.stock .summary { + color: #2f2f2f; + display: block; + background: #f2f2f2; + padding: 10px; + text-align: center; +} +.stock .summary strong { + font-weight: 900; + font-size: 14px; +} + +/*Content Panel*/ +.content-panel { + background: #ffffff; + box-shadow: 0px 3px 2px #aab2bd; + padding-top: 15px; + padding-bottom: 5px; +} +.content-panel h4 { + margin-left: 10px; +} + +/*WEATHER PANELS*/ + +/* Weather 1 */ +.weather { + background: url(../img/weather.jpg) no-repeat center top; + text-align: center; + background-position: center center; +} +.weather i { + color: white; + margin-top: 45px; +} +.weather h2 { + color: white; + font-weight: 900; +} +.weather h4 { + color: white; + font-weight: 900; + letter-spacing: 1px; +} + +/* Weather 2 */ +.weather-2 { + background: #e9f0f4; +} +.weather-2 .weather-2-header { + background: #54bae6; + padding-top: 5px; + margin-bottom: 5px; +} +.weather-2 .weather-2-header p { + color: white; + margin-left: 5px; + margin-right: 5px; +} +.weather-2 .weather-2-header p small { + font-size: 10px; +} +.weather-2 .data { + margin-right: 10px; + margin-left: 10px; + color: #272b34; +} +.weather-2 .data h5 { + margin-top: 0px; + font-weight: lighter; +} +.weather-2 .data h1{ + margin-top: 2px; +} + +/* Weather 3 */ +.weather-3 { + background: #ffcf00; +} + +.weather-3 i { + color: white; + margin-top: 30px; + font-size: 70px; +} +.weather-3 h1 { + margin-top: 10px; + color: white; + font-weight: 900; +} +.weather-3 .info { + background: #f2f2f2; +} +.weather-3 .info i { + font-size: 15px; + color: #c2c2c2; + margin-bottom: 0px; + margin-top: 10px; +} +.weather-3 .info h3 { + font-weight: 900; + margin-bottom: 0px; +} +.weather-3 .info p { + margin-left: 10px; + margin-right: 10px; + margin-bottom: 16px; + color: #c2c2c2; + font-size: 15px; + font-weight: 700; +} + + +/*Twitter Panel*/ +.twitter-panel { + background: #4fc1e9; + text-align: center; +} +.twitter-panel i { + color: white; + margin-top: 40px; +} +.twitter-panel p { + color: #f5f5f5; + margin: 10px; +} +.twitter-panel .user { + color: white; + font-weight: 900; +} + + +/* Instagram Panel*/ +.instagram-panel { + background: url(../img/instagram.jpg) no-repeat center top; + text-align: center; + background-position: center center; +} +.instagram-panel i { + color: white; + margin-top: 35px; +} +.instagram-panel p { + margin: 5px; + color: white; +} + +/* Product Panel */ +.product-panel { + background: #dadad2; + text-align: center; + padding-top: 50px; + height: 100%; +} + +/* Product Panel 2*/ +.product-panel-2 { + background: #dadad2; + text-align: center; +} +.product-panel-2 .badge { + position: absolute; + top: 20px; + left: 35px; +} +.badge-hot { + background: #ed5565; + width: 70px; + height: 70px; + line-height: 70px; + font-size: 18px; + color: #fff; + text-align: center; + border-radius: 100%; +} + +/* Soptify Panel */ +#spotify { + background: url(../img/lorde.jpg) no-repeat center top; + margin-top: -15px; + background-attachment: relative; + background-position: center center; + min-height: 220px; + width: 100%; + -webkit-background-size: 100%; + -moz-background-size: 100%; + -o-background-size: 100%; + background-size: 100%; + -webkit-background-size: cover; + -moz-background-size: cover; + -o-background-size: cover; + background-size: cover; +} +#spotify .btn-clear-g { + top: 15%; + right: 10px; + position: absolute; + margin-top: 5px; +} +#spotify .sp-title { + bottom: 15%; + left: 25px; + position: absolute; + color: #efefef; +} +#spotify .sp-title h3 { + font-weight: 900; +} +#spotify .play{ + bottom: 18%; + right: 25px; + position: absolute; + color: #efefef; + font-size: 20px +} +.followers { + margin-left: 5px; + margin-top: 5px; +} + +/* BLOG PANEL */ +#blog-bg { + background: url(../img/blog-bg.jpg) no-repeat center top; + margin-top: -15px; + background-attachment: relative; + background-position: center center; + min-height: 150px; + width: 100%; + -webkit-background-size: 100%; + -moz-background-size: 100%; + -o-background-size: 100%; + background-size: 100%; + -webkit-background-size: cover; + -moz-background-size: cover; + -o-background-size: cover; + background-size: cover; +} +#blog-bg .badge { + position: absolute; + top: 20px; + left: 35px; +} +.badge-popular { + background: #3498db; + width: 70px; + height: 70px; + line-height: 70px; + font-size: 13px; + color: #fff; + text-align: center; + border-radius: 100%; +} +.blog-title { + background: rgba(0,0,0,0.5); + bottom: 100px; + padding: 6px; + color: white; + font-weight: 700; + position: absolute; + display: block; + width: 120px; +} +.blog-text { + margin-left: 8px; + margin-right: 8px; + margin-top: 15px; + font-size: 12px; +} + +/* Calendar Configuration */ +#calendar { + color: white; + padding: 0px !important; +} +.calendar-month-header { + background: #43b1a9; +} + +/* TODO PANEL */ +.steps{ + display: block; +} +.steps input[type=checkbox] { + display: none; +} +.steps input[type=submit]{ + background: #f1783c; + border: none; + padding: 0px; + margin: 0 auto; + width: 100%; + height: 55px; + color: white; + text-transform: uppercase; + font-weight: 900; + font-size: 11px; + letter-spacing: 1px; + cursor: pointer; + transition: background 0.5s ease +} +.steps input[type=submit]:hover{ + background: #8fde9c; +} +.steps label{ + background: #393D40; + height: 65px; + line-height: 65px; + width: 100%; + display: block; + border-bottom: 1px solid #44494e; + color: #889199; + text-transform: uppercase; + font-weight: 900; + font-size: 11px; + letter-spacing: 1px; + text-indent: 52px; + cursor: pointer; + transition: all 0.7s ease; + margin: 0px; +} +.steps label:before{ + content:""; + width: 12px; + height: 12px; + display: block; + position: absolute; + margin: 26px 0px 0px 18px; + border-radius: 100%; + transition: border 0.7s ease +} +.steps label:hover{ + background: #2B2E30; + color: #46b7e5 +} +.steps label:hover:before{ + border: 1px solid #46b7e5; +} +#op1:checked ~ label[for=op1]:before, +#op2:checked ~ label[for=op2]:before, +#op3:checked ~ label[for=op3]:before{ + border: 2px solid #96c93c; + background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAYAAAA1WQxeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGFJREFUeNpinHLMhgEHKADia0xQThIQs6JJ9gPxZhYQAcS6QHwDiI8hSYJAC0gBPxDLAvFcIJ6JJJkDxFNBVtgBcQ8Qa6BLghgwN4A4a9ElQYAFSj8C4mwg3o8sCQIAAQYA78QTYqnPZuEAAAAASUVORK5CYII=') no-repeat center center; +} + +/* PROFILE PANELS */ +/* Profile 01*/ +#profile-01 { + background: url(../img/profile-01.jpg) no-repeat center top; + margin-top: -15px; + background-attachment: relative; + background-position: center center; + min-height: 150px; + width: 100%; + -webkit-background-size: 100%; + -moz-background-size: 100%; + -o-background-size: 100%; + background-size: 100%; + -webkit-background-size: cover; + -moz-background-size: cover; + -o-background-size: cover; + background-size: cover; +} +#profile-01 h3 { + color: white; + padding-top: 50px; + margin: 0px; + text-align: center; +} +#profile-01 h6 { + color: white; + text-align: center; + margin-bottom: 0px; + font-weight: 900; +} +.profile-01 { + background: #68dff0; + height: 50px; +} +.profile-01:hover { + background: #2f2f2f; + -webkit-transition: background-color 0.6s; + -moz-transition: background-color 0.6s; + -o-transition: background-color 0.6s; + transition: background-color 0.6s; + cursor: pointer; +} +.profile-01 p { + color: white; + padding-top: 15px; + font-weight: 400; + font-size: 15px; +} + +/* Profile 02*/ +#profile-02 { + background: url(../img/profile-02.jpg) no-repeat center top; + margin-top: -15px; + background-attachment: relative; + background-position: center center; + min-height: 200px; + width: 100%; + -webkit-background-size: 100%; + -moz-background-size: 100%; + -o-background-size: 100%; + background-size: 100%; + -webkit-background-size: cover; + -moz-background-size: cover; + -o-background-size: cover; + background-size: cover; +} +#profile-02 .user { + padding-top: 40px; + text-align: center; +} +#profile-02 h4 { + color: white; + margin:0px; + padding-top: 8px; +} +.pr2-social a { + color: #cdcdcd; +} +.pr2-social a:hover { + color: #68dff0; +} +.pr2-social i { + margin-top: 15px; + margin-right: 12px; + font-size: 20px; +} + + +/*spark line*/ +.chart { + display: inline-block; + text-align: center; + width: 100%; +} +.chart .heading { + text-align: left; +} +.chart .heading span { + display: block; +} +.panel.green-chart .chart-tittle { + font-size: 16px; + padding: 15px; + display: inline-block; + font-weight:normal; + background: #99c262; + width: 100%; + -webkit-border-radius: 0px 0px 4px 4px; + border-radius: 0px 0px 4px 4px; +} +#barchart { + margin-bottom: -15px; + display: inline-block; +} +.panel.green-chart .chart-tittle .value { + float: right; + color: #c0f080; +} +.panel.green-chart { + background: #a9d96c; + color: #fff; +} +.panel.terques-chart { + background: transparent; + color: #797979; +} +.panel.terques-chart .chart-tittle .value { + float: right; + color: #fff; +} +.panel.terques-chart .chart-tittle .value a { + color: #2f2f2f; + font-size: 12px; +} +.panel.terques-chart .chart-tittle .value a:hover, .panel.terques-chart .chart-tittle .value a.active { + color: #68dff0; + font-size: 12px; +} +.panel.terques-chart .chart-tittle { + font-size: 16px; + padding: 15px; + display: inline-block; + font-weight:normal; + background: #39b7ac; + width: 100%; + -webkit-border-radius: 0px 0px 4px 4px; + border-radius: 0px 0px 4px 4px; +} +.inline-block { + display: inline-block; +} + +/* showcase background */ +.showback { + background: #ffffff; + padding: 15px; + margin-bottom: 15px; + box-shadow: 0px 3px 2px #aab2bd; +} + + + +/* Calendar Events - Calendar.html*/ +.external-event { + cursor: move; + display: inline-block !important; + margin-bottom: 7px !important; + margin-right: 7px !important; + padding: 10px; +} + +.drop-after { + padding-top: 15px; + margin-top: 15px; + border-top: 1px solid #ccc; +} + +.fc-state-default, .fc-state-default .fc-button-inner { + background: #f2f2f2; +} + +.fc-state-active .fc-button-inner { + background: #FFFFFF; +} + +/* Gallery Configuration */ +.photo-wrapper { + display: block; + position: relative; + overflow: hidden; + background-color: #68dff0; + -webkit-transition: background-color 0.4s; + -moz-transition: background-color 0.4s; + -o-transition: background-color 0.4s; + transition: background-color 0.4s; +} +.project .overlay { + position: absolute; + text-align: center; + color: #fff; + opacity: 0; + filter: alpha(opacity=0); + -webkit-transition: opacity 0.4s; + -moz-transition: opacity 0.4s; + -o-transition: opacity 0.4s; + transition: opacity 0.4s; + +} + +.project:hover .photo-wrapper { + background-color: #68dff0; + background-image:url(../img/zoom.png); + background-repeat:no-repeat; + background-position:center; + top: 0; + bottom: 0; + left: 0; + right: 0; + position: relative; +} +.project:hover .photo { + opacity: 10; + filter: alpha(opacity=4000); + opacity: 0.1; + filter: alpha(opacity=40); +} +.project:hover .overlay { + opacity: 100; + filter: alpha(opacity=10000); + opacity: 1; + filter: alpha(opacity=100); +} + + + +/* EZ Checklist */ +.ez-checkbox { + margin-right: 5px; +} + +.ez-checkbox, .ez-radio { + height: 20px; + width: 20px; +} + +.brand-highlight { +background: #fffbcc !important; +} + + +/* FORMS CONFIGURATION */ +.form-panel { + background: #ffffff; + margin: 10px; + padding: 10px; + box-shadow: 0px 3px 2px #aab2bd; + text-align: left; +} + +label { + font-weight: 400; +} + +.form-horizontal.style-form .form-group { + border-bottom: 1px solid #eff2f7; + padding-bottom: 15px; + margin-bottom: 15px; +} + +.round-form { + border-radius: 500px; + -webkit-border-radius: 500px; +} + +@media (min-width: 768px) { + .form-horizontal .control-label { + text-align: left; + } +} + +#focusedInput { + border: 1px solid #ed5565; + box-shadow: none; +} + +.add-on { + float: right; + margin-top: -37px; + padding: 3px; + text-align: center; +} + +.add-on .btn { + height: 34px; +} + +/* TOGGLE CONFIGURATION */ +.has-switch { + border-radius: 30px; + -webkit-border-radius: 30px; + display: inline-block; + cursor: pointer; + line-height: 1.231; + overflow: hidden; + position: relative; + text-align: left; + width: 80px; + -webkit-mask: url('../img/mask.png') 0 0 no-repeat; + mask: url('../img/mask.png') 0 0 no-repeat; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; +} +.has-switch.deactivate { + opacity: 0.5; + filter: alpha(opacity=50); + cursor: default !important; +} +.has-switch.deactivate label, +.has-switch.deactivate span { + cursor: default !important; +} +.has-switch > div { + width: 162%; + position: relative; + top: 0; +} +.has-switch > div.switch-animate { + -webkit-transition: left 0.25s ease-out; + -moz-transition: left 0.25s ease-out; + -o-transition: left 0.25s ease-out; + transition: left 0.25s ease-out; + -webkit-backface-visibility: hidden; +} +.has-switch > div.switch-off { + left: -63%; +} +.has-switch > div.switch-off label { + background-color: #7f8c9a; + border-color: #bdc3c7; + -webkit-box-shadow: -1px 0 0 rgba(255, 255, 255, 0.5); + -moz-box-shadow: -1px 0 0 rgba(255, 255, 255, 0.5); + box-shadow: -1px 0 0 rgba(255, 255, 255, 0.5); +} +.has-switch > div.switch-on { + left: 0%; +} +.has-switch > div.switch-on label { + background-color: #41cac0; +} +.has-switch input[type=checkbox] { + display: none; +} +.has-switch span { + cursor: pointer; + font-size: 14.994px; + font-weight: 700; + float: left; + height: 29px; + line-height: 19px; + margin: 0; + padding-bottom: 6px; + padding-top: 5px; + position: relative; + text-align: center; + width: 50%; + z-index: 1; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition: 0.25s ease-out; + -moz-transition: 0.25s ease-out; + -o-transition: 0.25s ease-out; + transition: 0.25s ease-out; + -webkit-backface-visibility: hidden; +} +.has-switch span.switch-left { + border-radius: 30px 0 0 30px; + background-color: #2A3542; + color: #41cac0; + border-left: 1px solid transparent; +} +.has-switch span.switch-right { + border-radius: 0 30px 30px 0; + background-color: #bdc3c7; + color: #ffffff; + text-indent: 7px; +} +.has-switch span.switch-right [class*="fui-"] { + text-indent: 0; +} +.has-switch label { + border: 4px solid #2A3542; + border-radius: 50%; + -webkit-border-radius: 50%; + float: left; + height: 29px; + margin: 0 -21px 0 -14px; + padding: 0; + position: relative; + vertical-align: middle; + width: 29px; + z-index: 100; + -webkit-transition: 0.25s ease-out; + -moz-transition: 0.25s ease-out; + -o-transition: 0.25s ease-out; + transition: 0.25s ease-out; + -webkit-backface-visibility: hidden; +} +.switch-square { + border-radius: 6px; + -webkit-border-radius: 6px; + -webkit-mask: url('../img/mask.png') 0 0 no-repeat; + mask: url('../img/mask.png') 0 0 no-repeat; +} +.switch-square > div.switch-off label { + border-color: #7f8c9a; + border-radius: 6px 0 0 6px; +} +.switch-square span.switch-left { + border-radius: 6px 0 0 6px; +} +.switch-square span.switch-left [class*="fui-"] { + text-indent: -10px; +} +.switch-square span.switch-right { + border-radius: 0 6px 6px 0; +} +.switch-square span.switch-right [class*="fui-"] { + text-indent: 5px; +} +.switch-square label { + border-radius: 0 6px 6px 0; + border-color: #41cac0; +} + + + +/*LOGIN CONFIGURATION PAGE*/ +.form-login { + max-width: 330px; + margin: 100px auto 0; + background: #fff; + border-radius: 5px; + -webkit-border-radius: 5px; +} + +.form-login h2.form-login-heading { + margin: 0; + padding: 25px 20px; + text-align: center; + background: #68dff0; + border-radius: 5px 5px 0 0; + -webkit-border-radius: 5px 5px 0 0; + color: #fff; + font-size: 20px; + text-transform: uppercase; + font-weight: 300; +} +.login-wrap { + padding: 20px; +} +.login-wrap .registration { + text-align: center; +} +.login-social-link { + display: block; + margin-top: 20px; + margin-bottom: 15px; +} + + +/*LOCK SCREEN CONF*/ +#showtime { + width: 100%; + color: #fff; + font-size: 90px; + margin-bottom: 30px; + margin-top: 250px; + display: inline-block; + text-align: center; + font-weight: 400; +} + +.lock-screen { + text-align: center; +} + +.lock-screen a { + color: white; +} + +.lock-screen a:hover { + color: #48cfad +} + +.lock-screen i { + font-size: 60px; +} + +.lock-screen .modal-content { + position: relative; + background-color: #f2f2f2; + background-clip: padding-box; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, .2); + border-radius: 5px; +} + + +.btn-facebook { + color: #fff; + background-color: #5193ea; + border-color: #2775e2; +} +.btn-facebook:hover, +.btn-facebook:focus, +.btn-facebook:active, +.btn-facebook.active, +.open .dropdown-toggle.btn-facebook { + color: #fff; + background-color: #2775e2; + border-color: #2775e2; +} + +.btn-twitter { + color: #fff; + background-color: #44ccfe; + border-color: #2bb4e8; +} +.btn-twitter:hover, +.btn-twitter:focus, +.btn-twitter:active, +.btn-twitter.active, +.open .dropdown-toggle.btn-twitter { + color: #fff; + background-color: #2bb4e8; + border-color: #2bb4e8; +} + + +/*badge*/ +.badge.bg-primary { + background: #8075c4; +} + +.badge.bg-success { + background: #a9d86e; +} + +.badge.bg-warning { + background: #FCB322; +} + +.badge.bg-important { + background: #ff6c60; +} + +.badge.bg-info { + background: #41cac0; +} + +.badge.bg-inverse { + background: #2A3542; +} + + +/*easy pie chart*/ +.easy-pie-chart { + display: inline-block; + padding: 30px 0; +} + +.chart-info, .chart-info .increase, .chart-info .decrease { + display: inline-block; +} + +.chart-info { + width: 100%; + margin-bottom:5px; +} + +.chart-position { + margin-top: 70px; +} + +.chart-info span { + margin: 0 3px; +} + +.chart-info .increase { + background: #ff6c60; + width: 10px; + height: 10px; +} + +.chart-info .decrease { + background: #f2f2f2; + width: 10px; + height: 10px; +} + +.panel-footer.revenue-foot { + background-color: #e6e7ec; + -webkit-border-radius: 0px 0px 4px 4px; + border-radius: 0px 0px 4px 4px; + border: none; + padding: 0; + width: 100%; + display: inline-block; +} + +@media screen and (-webkit-min-device-pixel-ratio:0) { + /* Safari and Chrome */ + .panel-footer.revenue-foot { + margin-bottom: -4px; + }; + } + + +.panel-footer.revenue-foot ul { + margin: 0; + padding: 0; + width: 100%; + display: inline-flex; +} + +.panel-footer.revenue-foot ul li { + float: left; + width: 33.33%; +} + +.panel-footer.revenue-foot ul li.first a:hover, .panel-footer.revenue-foot ul li.first a { + -webkit-border-radius: 0px 0px 0px 4px; + border-radius: 0px 0px 0px 4px; +} + +.panel-footer.revenue-foot ul li.last a:hover, .panel-footer.revenue-foot ul li.last a { + -webkit-border-radius: 0px 0px 4px 0px; + border-radius: 0px 0px 4px 0px; + border-right: none; + +} + +.panel-footer.revenue-foot ul li a{ + display: inline-block; + width: 100%; + padding: 14px 15px; + text-align: center; + border-right: 1px solid #d5d8df; + color: #797979; +} + +.panel-footer.revenue-foot ul li a:hover, .panel-footer.revenue-foot ul li.active a { + background: #fff; + position: relative; +} + +.panel-footer.revenue-foot ul li a i { + color: #c6cad5; + display: block; + font-size: 16px; +} +.panel-footer.revenue-foot ul li a:hover i, .panel-footer.revenue-foot ul li.active a i { + color: #ff6c60; + display: block; + font-size: 16px; +} + + +/*flot chart*/ +.flot-chart .chart, .flot-chart .pie, .flot-chart .bars { + height: 300px; +} + +/*todolist*/ +#sortable { + list-style-type: none; + margin: 0 0 20px 0; + padding: 0; + width: 100%; +} +#sortable li { + padding-left: 3em; + font-size: 12px; +} +#sortable li i { + position: absolute; + left:6px; + padding:4px 10px 0 10px; + cursor: pointer; +} + +#sortable li input[type=checkbox]{ + margin-top: 0; +} + +.ui-sortable > li { + padding: 15px 0 15px 35px !important ; + position: relative; + background: #f5f6f8; + margin-bottom: 2px; + border-bottom : none !important; +} + +.ui-sortable li.list-primary { + border-left: 3px solid #41CAC0; +} + +.ui-sortable li.list-success { + border-left: 3px solid #78CD51; +} + +.ui-sortable li.list-danger { + border-left: 3px solid #FF6C60; +} + +.ui-sortable li.list-warning { + border-left: 3px solid #F1C500; +} + +.ui-sortable li.list-info { + border-left: 3px solid #58C9F3; +} + +.ui-sortable li.list-inverse { + border-left: 3px solid #BEC3C7; +} + +/*footer*/ +.site-footer { + background: #68dff0; + color: #fff; + padding: 10px 0; +} + + +.go-top { + margin-right: 1%; + float: right; + background: rgba(255,255,255,.5); + width: 20px; + height: 20px; + border-radius: 50%; + -webkit-border-radius: 50%; +} + +.go-top i { + color: #2A3542; +} + +.site-min-height { + min-height: 900px; +} + + From 1ac4d204578324e837de439ad5acaa7ee3d2f0bb Mon Sep 17 00:00:00 2001 From: Nir Izraeli Date: Thu, 22 Dec 2016 09:49:46 +0200 Subject: [PATCH 03/23] Add accounts/profile template Signed-off-by: Nir Izraeli --- server/accounts/templates/profile.html | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 server/accounts/templates/profile.html diff --git a/server/accounts/templates/profile.html b/server/accounts/templates/profile.html new file mode 100644 index 000000000..96dffa152 --- /dev/null +++ b/server/accounts/templates/profile.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} + +{% block title %} +Welcome, {{ username }}! +{% endblock %} + +{% block content %} +This is your personal space! +{% endblock %} From a11ba74ee4b6afcf073187528239b71ca22e1e09 Mon Sep 17 00:00:00 2001 From: Nir Izraeli Date: Thu, 22 Dec 2016 10:18:52 +0200 Subject: [PATCH 04/23] Add additional js scripts Signed-off-by: Nir Izraeli --- server/template/static/js/common-scripts.js | 119 +++++++++ .../static/js/jquery.dcjqaccordion.2.7.js | 225 ++++++++++++++++++ .../template/static/js/jquery.nicescroll.js | 113 +++++++++ .../template/static/js/jquery.scrollTo.min.js | 7 + .../static/js/jquery.ui.touch-punch.min.js | 11 + 5 files changed, 475 insertions(+) create mode 100755 server/template/static/js/common-scripts.js create mode 100755 server/template/static/js/jquery.dcjqaccordion.2.7.js create mode 100755 server/template/static/js/jquery.nicescroll.js create mode 100755 server/template/static/js/jquery.scrollTo.min.js create mode 100755 server/template/static/js/jquery.ui.touch-punch.min.js diff --git a/server/template/static/js/common-scripts.js b/server/template/static/js/common-scripts.js new file mode 100755 index 000000000..af96609bd --- /dev/null +++ b/server/template/static/js/common-scripts.js @@ -0,0 +1,119 @@ +/*---LEFT BAR ACCORDION----*/ +$(function() { + $('#nav-accordion').dcAccordion({ + eventType: 'click', + autoClose: true, + saveState: true, + disableLink: true, + speed: 'slow', + showCount: false, + autoExpand: true, +// cookie: 'dcjq-accordion-1', + classExpand: 'dcjq-current-parent' + }); +}); + +var Script = function () { + + +// sidebar dropdown menu auto scrolling + + jQuery('#sidebar .sub-menu > a').click(function () { + var o = ($(this).offset()); + diff = 250 - o.top; + if(diff>0) + $("#sidebar").scrollTo("-="+Math.abs(diff),500); + else + $("#sidebar").scrollTo("+="+Math.abs(diff),500); + }); + + + +// sidebar toggle + + $(function() { + function responsiveView() { + var wSize = $(window).width(); + if (wSize <= 768) { + $('#container').addClass('sidebar-close'); + $('#sidebar > ul').hide(); + } + + if (wSize > 768) { + $('#container').removeClass('sidebar-close'); + $('#sidebar > ul').show(); + } + } + $(window).on('load', responsiveView); + $(window).on('resize', responsiveView); + }); + + $('.fa-bars').click(function () { + if ($('#sidebar > ul').is(":visible") === true) { + $('#main-content').css({ + 'margin-left': '0px' + }); + $('#sidebar').css({ + 'margin-left': '-210px' + }); + $('#sidebar > ul').hide(); + $("#container").addClass("sidebar-closed"); + } else { + $('#main-content').css({ + 'margin-left': '210px' + }); + $('#sidebar > ul').show(); + $('#sidebar').css({ + 'margin-left': '0' + }); + $("#container").removeClass("sidebar-closed"); + } + }); + +// custom scrollbar + $("#sidebar").niceScroll({styler:"fb",cursorcolor:"#4ECDC4", cursorwidth: '3', cursorborderradius: '10px', background: '#404040', spacebarenabled:false, cursorborder: ''}); + + $("html").niceScroll({styler:"fb",cursorcolor:"#4ECDC4", cursorwidth: '6', cursorborderradius: '10px', background: '#404040', spacebarenabled:false, cursorborder: '', zindex: '1000'}); + +// widget tools + + jQuery('.panel .tools .fa-chevron-down').click(function () { + var el = jQuery(this).parents(".panel").children(".panel-body"); + if (jQuery(this).hasClass("fa-chevron-down")) { + jQuery(this).removeClass("fa-chevron-down").addClass("fa-chevron-up"); + el.slideUp(200); + } else { + jQuery(this).removeClass("fa-chevron-up").addClass("fa-chevron-down"); + el.slideDown(200); + } + }); + + jQuery('.panel .tools .fa-times').click(function () { + jQuery(this).parents(".panel").parent().remove(); + }); + + +// tool tips + + $('.tooltips').tooltip(); + +// popovers + + $('.popovers').popover(); + + + +// custom bar chart + + if ($(".custom-bar-chart")) { + $(".bar").each(function () { + var i = $(this).find(".value").html(); + $(this).find(".value").html(""); + $(this).find(".value").animate({ + height: i + }, 2000) + }) + } + + +}(); diff --git a/server/template/static/js/jquery.dcjqaccordion.2.7.js b/server/template/static/js/jquery.dcjqaccordion.2.7.js new file mode 100755 index 000000000..28d2856d3 --- /dev/null +++ b/server/template/static/js/jquery.dcjqaccordion.2.7.js @@ -0,0 +1,225 @@ +/* + * DC jQuery Vertical Accordion Menu - jQuery vertical accordion menu plugin + * Copyright (c) 2011 Design Chemical + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + */ + +(function($){ + + $.fn.dcAccordion = function(options) { + + //set default options + var defaults = { + classParent : 'dcjq-parent', + classActive : 'active', + classArrow : 'dcjq-icon', + classCount : 'dcjq-count', + classExpand : 'dcjq-current-parent', + eventType : 'click', + hoverDelay : 300, + menuClose : true, + autoClose : true, + autoExpand : false, + speed : 'slow', + saveState : true, + disableLink : true, + showCount : false, +// cookie : 'dcjq-accordion' + }; + + //call in the default otions + var options = $.extend(defaults, options); + + this.each(function(options){ + + var obj = this; + setUpAccordion(); +// if(defaults.saveState == true){ +// checkCookie(defaults.cookie, obj); +// } + if(defaults.autoExpand == true){ + $('li.'+defaults.classExpand+' > a').addClass(defaults.classActive); + } + resetAccordion(); + + if(defaults.eventType == 'hover'){ + + var config = { + sensitivity: 2, // number = sensitivity threshold (must be 1 or higher) + interval: defaults.hoverDelay, // number = milliseconds for onMouseOver polling interval + over: linkOver, // function = onMouseOver callback (REQUIRED) + timeout: defaults.hoverDelay, // number = milliseconds delay before onMouseOut + out: linkOut // function = onMouseOut callback (REQUIRED) + }; + + $('li a',obj).hoverIntent(config); + var configMenu = { + sensitivity: 2, // number = sensitivity threshold (must be 1 or higher) + interval: 1000, // number = milliseconds for onMouseOver polling interval + over: menuOver, // function = onMouseOver callback (REQUIRED) + timeout: 1000, // number = milliseconds delay before onMouseOut + out: menuOut // function = onMouseOut callback (REQUIRED) + }; + + $(obj).hoverIntent(configMenu); + + // Disable parent links + if(defaults.disableLink == true){ + + $('li a',obj).click(function(e){ + if($(this).siblings('ul').length >0){ + e.preventDefault(); + } + }); + } + + } else { + + $('li a',obj).click(function(e){ + + $activeLi = $(this).parent('li'); + $parentsLi = $activeLi.parents('li'); + $parentsUl = $activeLi.parents('ul'); + + // Prevent browsing to link if has child links + if(defaults.disableLink == true){ + if($(this).siblings('ul').length >0){ + e.preventDefault(); + } + } + + // Auto close sibling menus + if(defaults.autoClose == true){ + autoCloseAccordion($parentsLi, $parentsUl); + } + + if ($('> ul',$activeLi).is(':visible')){ + $('ul',$activeLi).slideUp(defaults.speed); + $('a',$activeLi).removeClass(defaults.classActive); + } else { + $(this).siblings('ul').slideToggle(defaults.speed); + $('> a',$activeLi).addClass(defaults.classActive); + } + +// // Write cookie if save state is on +// if(defaults.saveState == true){ +// createCookie(defaults.cookie, obj); +// } + }); + } + + // Set up accordion + function setUpAccordion(){ + + $arrow = ''; + var classParentLi = defaults.classParent+'-li'; + $('> ul',obj).show(); + $('li',obj).each(function(){ + if($('> ul',this).length > 0){ + $(this).addClass(classParentLi); + $('> a',this).addClass(defaults.classParent).append($arrow); + } + }); + $('> ul',obj).hide(); + if(defaults.showCount == true){ + $('li.'+classParentLi,obj).each(function(){ + if(defaults.disableLink == true){ + var getCount = parseInt($('ul a:not(.'+defaults.classParent+')',this).length); + } else { + var getCount = parseInt($('ul a',this).length); + } + $('> a',this).append(' '+getCount+''); + }); + } + } + + function linkOver(){ + + $activeLi = $(this).parent('li'); + $parentsLi = $activeLi.parents('li'); + $parentsUl = $activeLi.parents('ul'); + + // Auto close sibling menus + if(defaults.autoClose == true){ + autoCloseAccordion($parentsLi, $parentsUl); + + } + + if ($('> ul',$activeLi).is(':visible')){ + $('ul',$activeLi).slideUp(defaults.speed); + $('a',$activeLi).removeClass(defaults.classActive); + } else { + $(this).siblings('ul').slideToggle(defaults.speed); + $('> a',$activeLi).addClass(defaults.classActive); + } + + // Write cookie if save state is on + if(defaults.saveState == true){ + createCookie(defaults.cookie, obj); + } + } + + function linkOut(){ + } + + function menuOver(){ + } + + function menuOut(){ + + if(defaults.menuClose == true){ + $('ul',obj).slideUp(defaults.speed); + // Reset active links + $('a',obj).removeClass(defaults.classActive); + createCookie(defaults.cookie, obj); + } + } + + // Auto-Close Open Menu Items + function autoCloseAccordion($parentsLi, $parentsUl){ + $('ul',obj).not($parentsUl).slideUp(defaults.speed); + // Reset active links + $('a',obj).removeClass(defaults.classActive); + $('> a',$parentsLi).addClass(defaults.classActive); + } + // Reset accordion using active links + function resetAccordion(){ + $('ul',obj).hide(); + $allActiveLi = $('a.'+defaults.classActive,obj); + $allActiveLi.siblings('ul').show(); + } + }); + + // Retrieve cookie value and set active items +// function checkCookie(cookieId, obj){ +// var cookieVal = $.cookie(cookieId); +// if(cookieVal != null){ +// // create array from cookie string +// var activeArray = cookieVal.split(','); +// $.each(activeArray, function(index,value){ +// var $cookieLi = $('li:eq('+value+')',obj); +// $('> a',$cookieLi).addClass(defaults.classActive); +// var $parentsLi = $cookieLi.parents('li'); +// $('> a',$parentsLi).addClass(defaults.classActive); +// }); +// } +// } + + // Write cookie +// function createCookie(cookieId, obj){ +// var activeIndex = []; +// // Create array of active items index value +// $('li a.'+defaults.classActive,obj).each(function(i){ +// var $arrayItem = $(this).parent('li'); +// var itemIndex = $('li',obj).index($arrayItem); +// activeIndex.push(itemIndex); +// }); +// // Store in cookie +// $.cookie(cookieId, activeIndex, { path: '/' }); +// } + }; +})(jQuery); \ No newline at end of file diff --git a/server/template/static/js/jquery.nicescroll.js b/server/template/static/js/jquery.nicescroll.js new file mode 100755 index 000000000..856031d5c --- /dev/null +++ b/server/template/static/js/jquery.nicescroll.js @@ -0,0 +1,113 @@ +/* jquery.nicescroll 3.5.0 InuYaksa*2013 MIT http://areaaperta.com/nicescroll */(function(e){var z=!1,E=!1,L=5E3,M=2E3,y=0,N=function(){var e=document.getElementsByTagName("script"),e=e[e.length-1].src.split("?")[0];return 0e){if(b.getScrollTop()>=b.page.maxh)return!0}else if(0>=b.getScrollTop())return!0; + b.scrollmom&&b.scrollmom.stop();b.lastdeltay+=e;b.debounced("mousewheely",function(){var d=b.lastdeltay;b.lastdeltay=0;b.rail.drag||b.doScrollBy(d)},120)}d.stopImmediatePropagation();return d.preventDefault()}var b=this;this.version="3.5.0";this.name="nicescroll";this.me=c;this.opt={doc:e("body"),win:!1};e.extend(this.opt,I);this.opt.snapbackspeed=80;if(h)for(var p in b.opt)"undefined"!=typeof h[p]&&(b.opt[p]=h[p]);this.iddoc=(this.doc=b.opt.doc)&&this.doc[0]?this.doc[0].id||"":"";this.ispage=/BODY|HTML/.test(b.opt.win? + b.opt.win[0].nodeName:this.doc[0].nodeName);this.haswrapper=!1!==b.opt.win;this.win=b.opt.win||(this.ispage?e(window):this.doc);this.docscroll=this.ispage&&!this.haswrapper?e(window):this.win;this.body=e("body");this.iframe=this.isfixed=this.viewport=!1;this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName;this.istextarea="TEXTAREA"==this.win[0].nodeName;this.forcescreen=!1;this.canshowonmouseevent="scroll"!=b.opt.autohidemode;this.page=this.view=this.onzoomout=this.onzoomin= + this.onscrollcancel=this.onscrollend=this.onscrollstart=this.onclick=this.ongesturezoom=this.onkeypress=this.onmousewheel=this.onmousemove=this.onmouseup=this.onmousedown=!1;this.scroll={x:0,y:0};this.scrollratio={x:0,y:0};this.cursorheight=20;this.scrollvaluemax=0;this.observerremover=this.observer=this.scrollmom=this.scrollrunning=this.checkrtlmode=!1;do this.id="ascrail"+M++;while(document.getElementById(this.id));this.hasmousefocus=this.hasfocus=this.zoomactive=this.zoom=this.selectiondrag=this.cursorfreezed= + this.cursor=this.rail=!1;this.visibility=!0;this.hidden=this.locked=!1;this.cursoractive=!0;this.overflowx=b.opt.overflowx;this.overflowy=b.opt.overflowy;this.nativescrollingarea=!1;this.checkarea=0;this.events=[];this.saved={};this.delaylist={};this.synclist={};this.lastdeltay=this.lastdeltax=0;this.detected=P();var g=e.extend({},this.detected);this.ishwscroll=(this.canhwscroll=g.hastransform&&b.opt.hwacceleration)&&b.haswrapper;this.istouchcapable=!1;g.cantouch&&(g.ischrome&&!g.isios&&!g.isandroid)&& +(this.istouchcapable=!0,g.cantouch=!1);g.cantouch&&(g.ismozilla&&!g.isios&&!g.isandroid)&&(this.istouchcapable=!0,g.cantouch=!1);b.opt.enablemouselockapi||(g.hasmousecapture=!1,g.haspointerlock=!1);this.delayed=function(d,c,f,g){var e=b.delaylist[d],k=(new Date).getTime();if(!g&&e&&e.tt)return!1;e&&e.tt&&clearTimeout(e.tt);if(e&&e.last+f>k&&!e.tt)b.delaylist[d]={last:k+f,tt:setTimeout(function(){b.delaylist[d].tt=0;c.call()},f)};else if(!e||!e.tt)b.delaylist[d]={last:k,tt:0},setTimeout(function(){c.call()}, + 0)};this.debounced=function(d,c,f){var g=b.delaylist[d];(new Date).getTime();b.delaylist[d]=c;g||setTimeout(function(){var c=b.delaylist[d];b.delaylist[d]=!1;c.call()},f)};this.synched=function(d,c){b.synclist[d]=c;(function(){b.onsync||(v(function(){b.onsync=!1;for(d in b.synclist){var c=b.synclist[d];c&&c.call(b);b.synclist[d]=!1}}),b.onsync=!0)})();return d};this.unsynched=function(d){b.synclist[d]&&(b.synclist[d]=!1)};this.css=function(d,c){for(var f in c)b.saved.css.push([d,f,d.css(f)]),d.css(f, + c[f])};this.scrollTop=function(d){return"undefined"==typeof d?b.getScrollTop():b.setScrollTop(d)};this.scrollLeft=function(d){return"undefined"==typeof d?b.getScrollLeft():b.setScrollLeft(d)};BezierClass=function(b,c,f,g,e,k,l){this.st=b;this.ed=c;this.spd=f;this.p1=g||0;this.p2=e||1;this.p3=k||0;this.p4=l||1;this.ts=(new Date).getTime();this.df=this.ed-this.st};BezierClass.prototype={B2:function(b){return 3*b*b*(1-b)},B3:function(b){return 3*b*(1-b)*(1-b)},B4:function(b){return(1-b)*(1-b)*(1-b)}, + getNow:function(){var b=1-((new Date).getTime()-this.ts)/this.spd,c=this.B2(b)+this.B3(b)+this.B4(b);return 0>b?this.ed:this.st+Math.round(this.df*c)},update:function(b,c){this.st=this.getNow();this.ed=b;this.spd=c;this.ts=(new Date).getTime();this.df=this.ed-this.st;return this}};if(this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"};g.hastranslate3d&&g.isios&&this.doc.css("-webkit-backface-visibility","hidden");var s=function(){var d=b.doc.css(g.trstyle);return d&&"matrix"==d.substr(0, + 6)?d.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/):!1};this.getScrollTop=function(d){if(!d){if(d=s())return 16==d.length?-d[13]:-d[5];if(b.timerscroll&&b.timerscroll.bz)return b.timerscroll.bz.getNow()}return b.doc.translate.y};this.getScrollLeft=function(d){if(!d){if(d=s())return 16==d.length?-d[12]:-d[4];if(b.timerscroll&&b.timerscroll.bh)return b.timerscroll.bh.getNow()}return b.doc.translate.x};this.notifyScrollEvent=document.createEvent?function(b){var c=document.createEvent("UIEvents"); + c.initUIEvent("scroll",!1,!0,window,1);b.dispatchEvent(c)}:document.fireEvent?function(b){var c=document.createEventObject();b.fireEvent("onscroll");c.cancelBubble=!0}:function(b,c){};g.hastranslate3d&&b.opt.enabletranslate3d?(this.setScrollTop=function(d,c){b.doc.translate.y=d;b.doc.translate.ty=-1*d+"px";b.doc.css(g.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0px)");c||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(d,c){b.doc.translate.x=d;b.doc.translate.tx=-1* + d+"px";b.doc.css(g.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0px)");c||b.notifyScrollEvent(b.win[0])}):(this.setScrollTop=function(d,c){b.doc.translate.y=d;b.doc.translate.ty=-1*d+"px";b.doc.css(g.trstyle,"translate("+b.doc.translate.tx+","+b.doc.translate.ty+")");c||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(d,c){b.doc.translate.x=d;b.doc.translate.tx=-1*d+"px";b.doc.css(g.trstyle,"translate("+b.doc.translate.tx+","+b.doc.translate.ty+")");c||b.notifyScrollEvent(b.win[0])})}else this.getScrollTop= + function(){return b.docscroll.scrollTop()},this.setScrollTop=function(d){return b.docscroll.scrollTop(d)},this.getScrollLeft=function(){return b.docscroll.scrollLeft()},this.setScrollLeft=function(d){return b.docscroll.scrollLeft(d)};this.getTarget=function(b){return!b?!1:b.target?b.target:b.srcElement?b.srcElement:!1};this.hasParent=function(b,c){if(!b)return!1;for(var f=b.target||b.srcElement||b||!1;f&&f.id!=c;)f=f.parentNode||!1;return!1!==f};var u={thin:1,medium:3,thick:5};this.getOffset=function(){if(b.isfixed)return{top:parseFloat(b.win.css("top")), + left:parseFloat(b.win.css("left"))};if(!b.viewport)return b.win.offset();var d=b.win.offset(),c=b.viewport.offset();return{top:d.top-c.top+b.viewport.scrollTop(),left:d.left-c.left+b.viewport.scrollLeft()}};this.updateScrollBar=function(d){if(b.ishwscroll)b.rail.css({height:b.win.innerHeight()}),b.railh&&b.railh.css({width:b.win.innerWidth()});else{var c=b.getOffset(),f=c.top,g=c.left,f=f+l(b.win,"border-top-width",!0);b.win.outerWidth();b.win.innerWidth();var g=g+(b.rail.align?b.win.outerWidth()- + l(b.win,"border-right-width")-b.rail.width:l(b.win,"border-left-width")),e=b.opt.railoffset;e&&(e.top&&(f+=e.top),b.rail.align&&e.left&&(g+=e.left));b.locked||b.rail.css({top:f,left:g,height:d?d.h:b.win.innerHeight()});b.zoom&&b.zoom.css({top:f+1,left:1==b.rail.align?g-20:g+b.rail.width+4});b.railh&&!b.locked&&(f=c.top,g=c.left,d=b.railh.align?f+l(b.win,"border-top-width",!0)+b.win.innerHeight()-b.railh.height:f+l(b.win,"border-top-width",!0),g+=l(b.win,"border-left-width"),b.railh.css({top:d,left:g, + width:b.railh.width}))}};this.doRailClick=function(d,c,f){var g;b.locked||(b.cancelEvent(d),c?(c=f?b.doScrollLeft:b.doScrollTop,g=f?(d.pageX-b.railh.offset().left-b.cursorwidth/2)*b.scrollratio.x:(d.pageY-b.rail.offset().top-b.cursorheight/2)*b.scrollratio.y,c(g)):(c=f?b.doScrollLeftBy:b.doScrollBy,g=f?b.scroll.x:b.scroll.y,d=f?d.pageX-b.railh.offset().left:d.pageY-b.rail.offset().top,f=f?b.view.w:b.view.h,g>=d?c(f):c(-f)))};b.hasanimationframe=v;b.hascancelanimationframe=w;b.hasanimationframe?b.hascancelanimationframe|| + (w=function(){b.cancelAnimationFrame=!0}):(v=function(b){return setTimeout(b,15-Math.floor(+new Date/1E3)%16)},w=clearInterval);this.init=function(){b.saved.css=[];if(g.isie7mobile||g.isoperamini)return!0;g.hasmstouch&&b.css(b.ispage?e("html"):b.win,{"-ms-touch-action":"none"});b.zindex="auto";b.zindex=!b.ispage&&"auto"==b.opt.zindex?k()||"auto":b.opt.zindex;!b.ispage&&"auto"!=b.zindex&&b.zindex>y&&(y=b.zindex);b.isie&&(0==b.zindex&&"auto"==b.opt.zindex)&&(b.zindex="auto");if(!b.ispage||!g.cantouch&& + !g.isieold&&!g.isie9mobile){var d=b.docscroll;b.ispage&&(d=b.haswrapper?b.win:b.doc);g.isie9mobile||b.css(d,{"overflow-y":"hidden"});b.ispage&&g.isie7&&("BODY"==b.doc[0].nodeName?b.css(e("html"),{"overflow-y":"hidden"}):"HTML"==b.doc[0].nodeName&&b.css(e("body"),{"overflow-y":"hidden"}));g.isios&&(!b.ispage&&!b.haswrapper)&&b.css(e("body"),{"-webkit-overflow-scrolling":"touch"});var c=e(document.createElement("div"));c.css({position:"relative",top:0,"float":"right",width:b.opt.cursorwidth,height:"0px", + "background-color":b.opt.cursorcolor,border:b.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":b.opt.cursorborderradius,"-moz-border-radius":b.opt.cursorborderradius,"border-radius":b.opt.cursorborderradius});c.hborder=parseFloat(c.outerHeight()-c.innerHeight());b.cursor=c;var f=e(document.createElement("div"));f.attr("id",b.id);f.addClass("nicescroll-rails");var l,h,x=["left","right"],q;for(q in x)h=x[q],(l=b.opt.railpadding[h])?f.css("padding-"+h,l+"px"):b.opt.railpadding[h]= + 0;f.append(c);f.width=Math.max(parseFloat(b.opt.cursorwidth),c.outerWidth())+b.opt.railpadding.left+b.opt.railpadding.right;f.css({width:f.width+"px",zIndex:b.zindex,background:b.opt.background,cursor:"default"});f.visibility=!0;f.scrollable=!0;f.align="left"==b.opt.railalign?0:1;b.rail=f;c=b.rail.drag=!1;b.opt.boxzoom&&(!b.ispage&&!g.isieold)&&(c=document.createElement("div"),b.bind(c,"click",b.doZoom),b.zoom=e(c),b.zoom.css({cursor:"pointer","z-index":b.zindex,backgroundImage:"url("+N+"zoomico.png)", + height:18,width:18,backgroundPosition:"0px 0px"}),b.opt.dblclickzoom&&b.bind(b.win,"dblclick",b.doZoom),g.cantouch&&b.opt.gesturezoom&&(b.ongesturezoom=function(d){1.5d.scale&&b.doZoomOut(d);return b.cancelEvent(d)},b.bind(b.win,"gestureend",b.ongesturezoom)));b.railh=!1;if(b.opt.horizrailenabled){b.css(d,{"overflow-x":"hidden"});c=e(document.createElement("div"));c.css({position:"relative",top:0,height:b.opt.cursorwidth,width:"0px","background-color":b.opt.cursorcolor, + border:b.opt.cursorborder,"background-clip":"padding-box","-webkit-border-radius":b.opt.cursorborderradius,"-moz-border-radius":b.opt.cursorborderradius,"border-radius":b.opt.cursorborderradius});c.wborder=parseFloat(c.outerWidth()-c.innerWidth());b.cursorh=c;var m=e(document.createElement("div"));m.attr("id",b.id+"-hr");m.addClass("nicescroll-rails");m.height=Math.max(parseFloat(b.opt.cursorwidth),c.outerHeight());m.css({height:m.height+"px",zIndex:b.zindex,background:b.opt.background});m.append(c); + m.visibility=!0;m.scrollable=!0;m.align="top"==b.opt.railvalign?0:1;b.railh=m;b.railh.drag=!1}b.ispage?(f.css({position:"fixed",top:"0px",height:"100%"}),f.align?f.css({right:"0px"}):f.css({left:"0px"}),b.body.append(f),b.railh&&(m.css({position:"fixed",left:"0px",width:"100%"}),m.align?m.css({bottom:"0px"}):m.css({top:"0px"}),b.body.append(m))):(b.ishwscroll?("static"==b.win.css("position")&&b.css(b.win,{position:"relative"}),d="HTML"==b.win[0].nodeName?b.body:b.win,b.zoom&&(b.zoom.css({position:"absolute", + top:1,right:0,"margin-right":f.width+4}),d.append(b.zoom)),f.css({position:"absolute",top:0}),f.align?f.css({right:0}):f.css({left:0}),d.append(f),m&&(m.css({position:"absolute",left:0,bottom:0}),m.align?m.css({bottom:0}):m.css({top:0}),d.append(m))):(b.isfixed="fixed"==b.win.css("position"),d=b.isfixed?"fixed":"absolute",b.isfixed||(b.viewport=b.getViewport(b.win[0])),b.viewport&&(b.body=b.viewport,!1==/fixed|relative|absolute/.test(b.viewport.css("position"))&&b.css(b.viewport,{position:"relative"})), + f.css({position:d}),b.zoom&&b.zoom.css({position:d}),b.updateScrollBar(),b.body.append(f),b.zoom&&b.body.append(b.zoom),b.railh&&(m.css({position:d}),b.body.append(m))),g.isios&&b.css(b.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),g.isie&&b.opt.disableoutline&&b.win.attr("hideFocus","true"),g.iswebkit&&b.opt.disableoutline&&b.win.css({outline:"none"}));!1===b.opt.autohidemode?(b.autohidedom=!1,b.rail.css({opacity:b.opt.cursoropacitymax}),b.railh&&b.railh.css({opacity:b.opt.cursoropacitymax})): + !0===b.opt.autohidemode||"leave"===b.opt.autohidemode?(b.autohidedom=e().add(b.rail),g.isie8&&(b.autohidedom=b.autohidedom.add(b.cursor)),b.railh&&(b.autohidedom=b.autohidedom.add(b.railh)),b.railh&&g.isie8&&(b.autohidedom=b.autohidedom.add(b.cursorh))):"scroll"==b.opt.autohidemode?(b.autohidedom=e().add(b.rail),b.railh&&(b.autohidedom=b.autohidedom.add(b.railh))):"cursor"==b.opt.autohidemode?(b.autohidedom=e().add(b.cursor),b.railh&&(b.autohidedom=b.autohidedom.add(b.cursorh))):"hidden"==b.opt.autohidemode&& + (b.autohidedom=!1,b.hide(),b.locked=!1);if(g.isie9mobile)b.scrollmom=new J(b),b.onmangotouch=function(d){d=b.getScrollTop();var c=b.getScrollLeft();if(d==b.scrollmom.lastscrolly&&c==b.scrollmom.lastscrollx)return!0;var f=d-b.mangotouch.sy,g=c-b.mangotouch.sx;if(0!=Math.round(Math.sqrt(Math.pow(g,2)+Math.pow(f,2)))){var n=0>f?-1:1,e=0>g?-1:1,k=+new Date;b.mangotouch.lazy&&clearTimeout(b.mangotouch.lazy);80r?r=Math.round(r/2):r>b.page.maxh&&(r=b.page.maxh+Math.round((r-b.page.maxh)/ + 2)):(0>r&&(k=r=0),r>b.page.maxh&&(r=b.page.maxh,k=0));if(b.railh&&b.railh.scrollable){var m=b.rail.drag.sl-h;b.ishwscroll&&b.opt.bouncescroll?0>m?m=Math.round(m/2):m>b.page.maxw&&(m=b.page.maxw+Math.round((m-b.page.maxw)/2)):(0>m&&(l=m=0),m>b.page.maxw&&(m=b.page.maxw,l=0))}f=!1;if(b.rail.drag.dl)f=!0,"v"==b.rail.drag.dl?m=b.rail.drag.sl:"h"==b.rail.drag.dl&&(r=b.rail.drag.st);else{var n=Math.abs(n),h=Math.abs(h),x=b.opt.directionlockdeadzone;if("v"==b.rail.drag.ck){if(n>x&&h<=0.3*n)return b.rail.drag= + !1,!0;h>x&&(b.rail.drag.dl="f",e("body").scrollTop(e("body").scrollTop()))}else if("h"==b.rail.drag.ck){if(h>x&&n<=0.3*h)return b.rail.drag=!1,!0;n>x&&(b.rail.drag.dl="f",e("body").scrollLeft(e("body").scrollLeft()))}}b.synched("touchmove",function(){b.rail.drag&&2==b.rail.drag.pt&&(b.prepareTransition&&b.prepareTransition(0),b.rail.scrollable&&b.setScrollTop(r),b.scrollmom.update(l,k),b.railh&&b.railh.scrollable?(b.setScrollLeft(m),b.showCursor(r,m)):b.showCursor(r),g.isie10&&document.selection.clear())}); + g.ischrome&&b.istouchcapable&&(f=!1);if(f)return b.cancelEvent(d)}}}b.onmousedown=function(d,c){if(!(b.rail.drag&&1!=b.rail.drag.pt)){if(b.locked)return b.cancelEvent(d);b.cancelScroll();b.rail.drag={x:d.clientX,y:d.clientY,sx:b.scroll.x,sy:b.scroll.y,pt:1,hr:!!c};var f=b.getTarget(d);!b.ispage&&g.hasmousecapture&&f.setCapture();b.isiframe&&!g.hasmousecapture&&(b.saved.csspointerevents=b.doc.css("pointer-events"),b.css(b.doc,{"pointer-events":"none"}));return b.cancelEvent(d)}};b.onmouseup=function(d){if(b.rail.drag&& + (g.hasmousecapture&&document.releaseCapture(),b.isiframe&&!g.hasmousecapture&&b.doc.css("pointer-events",b.saved.csspointerevents),1==b.rail.drag.pt))return b.rail.drag=!1,b.cancelEvent(d)};b.onmousemove=function(d){if(b.rail.drag&&1==b.rail.drag.pt){if(g.ischrome&&0==d.which)return b.onmouseup(d);b.cursorfreezed=!0;if(b.rail.drag.hr){b.scroll.x=b.rail.drag.sx+(d.clientX-b.rail.drag.x);0>b.scroll.x&&(b.scroll.x=0);var c=b.scrollvaluemaxw;b.scroll.x>c&&(b.scroll.x=c)}else b.scroll.y=b.rail.drag.sy+ + (d.clientY-b.rail.drag.y),0>b.scroll.y&&(b.scroll.y=0),c=b.scrollvaluemax,b.scroll.y>c&&(b.scroll.y=c);b.synched("mousemove",function(){b.rail.drag&&1==b.rail.drag.pt&&(b.showCursor(),b.rail.drag.hr?b.doScrollLeft(Math.round(b.scroll.x*b.scrollratio.x),b.opt.cursordragspeed):b.doScrollTop(Math.round(b.scroll.y*b.scrollratio.y),b.opt.cursordragspeed))});return b.cancelEvent(d)}};if(g.cantouch||b.opt.touchbehavior)b.onpreventclick=function(d){if(b.preventclick)return b.preventclick.tg.onclick=b.preventclick.click, + b.preventclick=!1,b.cancelEvent(d)},b.bind(b.win,"mousedown",b.ontouchstart),b.onclick=g.isios?!1:function(d){return b.lastmouseup?(b.lastmouseup=!1,b.cancelEvent(d)):!0},b.opt.grabcursorenabled&&g.cursorgrabvalue&&(b.css(b.ispage?b.doc:b.win,{cursor:g.cursorgrabvalue}),b.css(b.rail,{cursor:g.cursorgrabvalue}));else{var p=function(d){if(b.selectiondrag){if(d){var c=b.win.outerHeight();d=d.pageY-b.selectiondrag.top;0=c&&(d-=c);b.selectiondrag.df=d}0!=b.selectiondrag.df&&(b.doScrollBy(2* + -Math.floor(b.selectiondrag.df/6)),b.debounced("doselectionscroll",function(){p()},50))}};b.hasTextSelected="getSelection"in document?function(){return 0b.page.maxh?b.doScrollTop(b.page.maxh):(b.scroll.y=Math.round(b.getScrollTop()*(1/b.scrollratio.y)),b.scroll.x=Math.round(b.getScrollLeft()* + (1/b.scrollratio.x)),b.cursoractive&&b.noticeCursor());b.scroll.y&&0==b.getScrollTop()&&b.doScrollTo(Math.floor(b.scroll.y*b.scrollratio.y));return b};this.resize=b.onResize;this.lazyResize=function(d){d=isNaN(d)?30:d;b.delayed("resize",b.resize,d);return b};this._bind=function(d,c,f,g){b.events.push({e:d,n:c,f:f,b:g,q:!1});d.addEventListener?d.addEventListener(c,f,g||!1):d.attachEvent?d.attachEvent("on"+c,f):d["on"+c]=f};this.jqbind=function(d,c,f){b.events.push({e:d,n:c,f:f,q:!0});e(d).bind(c,f)}; + this.bind=function(d,c,f,e){var k="jquery"in d?d[0]:d;"mousewheel"==c?"onwheel"in b.win?b._bind(k,"wheel",f,e||!1):(d="undefined"!=typeof document.onmousewheel?"mousewheel":"DOMMouseScroll",q(k,d,f,e||!1),"DOMMouseScroll"==d&&q(k,"MozMousePixelScroll",f,e||!1)):k.addEventListener?(g.cantouch&&/mouseup|mousedown|mousemove/.test(c)&&b._bind(k,"mousedown"==c?"touchstart":"mouseup"==c?"touchend":"touchmove",function(b){if(b.touches){if(2>b.touches.length){var d=b.touches.length?b.touches[0]:b;d.original= + b;f.call(this,d)}}else b.changedTouches&&(d=b.changedTouches[0],d.original=b,f.call(this,d))},e||!1),b._bind(k,c,f,e||!1),g.cantouch&&"mouseup"==c&&b._bind(k,"touchcancel",f,e||!1)):b._bind(k,c,function(d){if((d=d||window.event||!1)&&d.srcElement)d.target=d.srcElement;"pageY"in d||(d.pageX=d.clientX+document.documentElement.scrollLeft,d.pageY=d.clientY+document.documentElement.scrollTop);return!1===f.call(k,d)||!1===e?b.cancelEvent(d):!0})};this._unbind=function(b,c,f,g){b.removeEventListener?b.removeEventListener(c, + f,g):b.detachEvent?b.detachEvent("on"+c,f):b["on"+c]=!1};this.unbindAll=function(){for(var d=0;d(b.newscrolly-k)*(e-k)||0>(b.newscrollx-l)*(c-l))&&b.cancelScroll();!1==b.opt.bouncescroll&&(0>e?e=0:e>b.page.maxh&&(e=b.page.maxh),0>c?c=0:c>b.page.maxw&&(c=b.page.maxw)); + if(b.scrollrunning&&c==b.newscrollx&&e==b.newscrolly)return!1;b.newscrolly=e;b.newscrollx=c;b.newscrollspeed=f||!1;if(b.timer)return!1;b.timer=setTimeout(function(){var f=b.getScrollTop(),k=b.getScrollLeft(),l,h;l=c-k;h=e-f;l=Math.round(Math.sqrt(Math.pow(l,2)+Math.pow(h,2)));l=b.newscrollspeed&&1=b.newscrollspeed&&(l*=b.newscrollspeed);b.prepareTransition(l,!0);b.timerscroll&&b.timerscroll.tm&&clearInterval(b.timerscroll.tm); + 0c?c=0:c>b.page.maxh&&(c=b.page.maxh);0>e?e=0:e>b.page.maxw&&(e=b.page.maxw);if(c!=b.newscrolly||e!=b.newscrollx)return b.doScrollPos(e,c,b.opt.snapbackspeed);b.onscrollend&&b.scrollrunning&&b.onscrollend.call(b,{type:"scrollend",current:{x:e,y:c},end:{x:b.newscrollx,y:b.newscrolly}});b.scrollrunning=!1}):(this.doScrollLeft=function(c,g){var f=b.scrollrunning?b.newscrolly:b.getScrollTop();b.doScrollPos(c,f,g)},this.doScrollTop=function(c, + g){var f=b.scrollrunning?b.newscrollx:b.getScrollLeft();b.doScrollPos(f,c,g)},this.doScrollPos=function(c,g,f){function e(){if(b.cancelAnimationFrame)return!0;b.scrollrunning=!0;if(p=1-p)return b.timer=v(e)||1;var c=0,d=sy=b.getScrollTop();if(b.dst.ay){var d=b.bzscroll?b.dst.py+b.bzscroll.getNow()*b.dst.ay:b.newscrolly,f=d-sy;if(0>f&&db.newscrolly)d=b.newscrolly;b.setScrollTop(d);d==b.newscrolly&&(c=1)}else c=1;var g=sx=b.getScrollLeft();if(b.dst.ax){g=b.bzscroll?b.dst.px+b.bzscroll.getNow()* + b.dst.ax:b.newscrollx;f=g-sx;if(0>f&&gb.newscrollx)g=b.newscrollx;b.setScrollLeft(g);g==b.newscrollx&&(c+=1)}else c+=1;2==c?(b.timer=0,b.cursorfreezed=!1,b.bzscroll=!1,b.scrollrunning=!1,0>d?d=0:d>b.page.maxh&&(d=b.page.maxh),0>g?g=0:g>b.page.maxw&&(g=b.page.maxw),g!=b.newscrollx||d!=b.newscrolly?b.doScrollPos(g,d):b.onscrollend&&b.onscrollend.call(b,{type:"scrollend",current:{x:sx,y:sy},end:{x:b.newscrollx,y:b.newscrolly}})):b.timer=v(e)||1}g="undefined"==typeof g||!1===g?b.getScrollTop(!0): + g;if(b.timer&&b.newscrolly==g&&b.newscrollx==c)return!0;b.timer&&w(b.timer);b.timer=0;var k=b.getScrollTop(),l=b.getScrollLeft();(0>(b.newscrolly-k)*(g-k)||0>(b.newscrollx-l)*(c-l))&&b.cancelScroll();b.newscrolly=g;b.newscrollx=c;if(!b.bouncescroll||!b.rail.visibility)0>b.newscrolly?b.newscrolly=0:b.newscrolly>b.page.maxh&&(b.newscrolly=b.page.maxh);if(!b.bouncescroll||!b.railh.visibility)0>b.newscrollx?b.newscrollx=0:b.newscrollx>b.page.maxw&&(b.newscrollx=b.page.maxw);b.dst={};b.dst.x=c-l;b.dst.y= + g-k;b.dst.px=l;b.dst.py=k;var h=Math.round(Math.sqrt(Math.pow(b.dst.x,2)+Math.pow(b.dst.y,2)));b.dst.ax=b.dst.x/h;b.dst.ay=b.dst.y/h;var m=0,q=h;0==b.dst.x?(m=k,q=g,b.dst.ay=1,b.dst.py=0):0==b.dst.y&&(m=l,q=c,b.dst.ax=1,b.dst.px=0);h=b.getTransitionSpeed(h);f&&1>=f&&(h*=f);b.bzscroll=0=b.page.maxh||l==b.page.maxw&&c>=b.page.maxw)&&b.checkContentSize();var p=1;b.cancelAnimationFrame=!1;b.timer=1; + b.onscrollstart&&!b.scrollrunning&&b.onscrollstart.call(b,{type:"scrollstart",current:{x:l,y:k},request:{x:c,y:g},end:{x:b.newscrollx,y:b.newscrolly},speed:h});e();(k==b.page.maxh&&g>=k||l==b.page.maxw&&c>=l)&&b.checkContentSize();b.noticeCursor()}},this.cancelScroll=function(){b.timer&&w(b.timer);b.timer=0;b.bzscroll=!1;b.scrollrunning=!1;return b}):(this.doScrollLeft=function(c,g){var f=b.getScrollTop();b.doScrollPos(c,f,g)},this.doScrollTop=function(c,g){var f=b.getScrollLeft();b.doScrollPos(f, + c,g)},this.doScrollPos=function(c,g,f){var e=c>b.page.maxw?b.page.maxw:c;0>e&&(e=0);var k=g>b.page.maxh?b.page.maxh:g;0>k&&(k=0);b.synched("scroll",function(){b.setScrollTop(k);b.setScrollLeft(e)})},this.cancelScroll=function(){});this.doScrollBy=function(c,g){var f=0,f=g?Math.floor((b.scroll.y-c)*b.scrollratio.y):(b.timer?b.newscrolly:b.getScrollTop(!0))-c;if(b.bouncescroll){var e=Math.round(b.view.h/2);f<-e?f=-e:f>b.page.maxh+e&&(f=b.page.maxh+e)}b.cursorfreezed=!1;py=b.getScrollTop(!0);if(0>f&& + 0>=py)return b.noticeCursor();if(f>b.page.maxh&&py>=b.page.maxh)return b.checkContentSize(),b.noticeCursor();b.doScrollTop(f)};this.doScrollLeftBy=function(c,g){var f=0,f=g?Math.floor((b.scroll.x-c)*b.scrollratio.x):(b.timer?b.newscrollx:b.getScrollLeft(!0))-c;if(b.bouncescroll){var e=Math.round(b.view.w/2);f<-e?f=-e:f>b.page.maxw+e&&(f=b.page.maxw+e)}b.cursorfreezed=!1;px=b.getScrollLeft(!0);if(0>f&&0>=px||f>b.page.maxw&&px>=b.page.maxw)return b.noticeCursor();b.doScrollLeft(f)};this.doScrollTo= + function(c,g){g&&Math.round(c*b.scrollratio.y);b.cursorfreezed=!1;b.doScrollTop(c)};this.checkContentSize=function(){var c=b.getContentSize();(c.h!=b.page.h||c.w!=b.page.w)&&b.resize(!1,c)};b.onscroll=function(c){b.rail.drag||b.cursorfreezed||b.synched("scroll",function(){b.scroll.y=Math.round(b.getScrollTop()*(1/b.scrollratio.y));b.railh&&(b.scroll.x=Math.round(b.getScrollLeft()*(1/b.scrollratio.x)));b.noticeCursor()})};b.bind(b.docscroll,"scroll",b.onscroll);this.doZoomIn=function(c){if(!b.zoomactive){b.zoomactive= + !0;b.zoomrestore={style:{}};var k="position top left zIndex backgroundColor marginTop marginBottom marginLeft marginRight".split(" "),f=b.win[0].style,l;for(l in k){var h=k[l];b.zoomrestore.style[h]="undefined"!=typeof f[h]?f[h]:""}b.zoomrestore.style.width=b.win.css("width");b.zoomrestore.style.height=b.win.css("height");b.zoomrestore.padding={w:b.win.outerWidth()-b.win.width(),h:b.win.outerHeight()-b.win.height()};g.isios4&&(b.zoomrestore.scrollTop=e(window).scrollTop(),e(window).scrollTop(0)); + b.win.css({position:g.isios4?"absolute":"fixed",top:0,left:0,"z-index":y+100,margin:"0px"});k=b.win.css("backgroundColor");(""==k||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(k))&&b.win.css("backgroundColor","#fff");b.rail.css({"z-index":y+101});b.zoom.css({"z-index":y+102});b.zoom.css("backgroundPosition","0px -18px");b.resizeZoom();b.onzoomin&&b.onzoomin.call(b);return b.cancelEvent(c)}};this.doZoomOut=function(c){if(b.zoomactive)return b.zoomactive=!1,b.win.css("margin",""),b.win.css(b.zoomrestore.style), + g.isios4&&e(window).scrollTop(b.zoomrestore.scrollTop),b.rail.css({"z-index":b.zindex}),b.zoom.css({"z-index":b.zindex}),b.zoomrestore=!1,b.zoom.css("backgroundPosition","0px 0px"),b.onResize(),b.onzoomout&&b.onzoomout.call(b),b.cancelEvent(c)};this.doZoom=function(c){return b.zoomactive?b.doZoomOut(c):b.doZoomIn(c)};this.resizeZoom=function(){if(b.zoomactive){var c=b.getScrollTop();b.win.css({width:e(window).width()-b.zoomrestore.padding.w+"px",height:e(window).height()-b.zoomrestore.padding.h+"px"}); + b.onResize();b.setScrollTop(Math.min(b.page.maxh,c))}};this.init();e.nicescroll.push(this)},J=function(e){var c=this;this.nc=e;this.steptime=this.lasttime=this.speedy=this.speedx=this.lasty=this.lastx=0;this.snapy=this.snapx=!1;this.demuly=this.demulx=0;this.lastscrolly=this.lastscrollx=-1;this.timer=this.chky=this.chkx=0;this.time=function(){return+new Date};this.reset=function(e,l){c.stop();var h=c.time();c.steptime=0;c.lasttime=h;c.speedx=0;c.speedy=0;c.lastx=e;c.lasty=l;c.lastscrollx=-1;c.lastscrolly= + -1};this.update=function(e,l){var h=c.time();c.steptime=h-c.lasttime;c.lasttime=h;var h=l-c.lasty,t=e-c.lastx,b=c.nc.getScrollTop(),p=c.nc.getScrollLeft(),b=b+h,p=p+t;c.snapx=0>p||p>c.nc.page.maxw;c.snapy=0>b||b>c.nc.page.maxh;c.speedx=t;c.speedy=h;c.lastx=e;c.lasty=l};this.stop=function(){c.nc.unsynched("domomentum2d");c.timer&&clearTimeout(c.timer);c.timer=0;c.lastscrollx=-1;c.lastscrolly=-1};this.doSnapy=function(e,l){var h=!1;0>l?(l=0,h=!0):l>c.nc.page.maxh&&(l=c.nc.page.maxh,h=!0);0>e?(e=0,h= + !0):e>c.nc.page.maxw&&(e=c.nc.page.maxw,h=!0);h&&c.nc.doScrollPos(e,l,c.nc.opt.snapbackspeed)};this.doMomentum=function(e){var l=c.time(),h=e?l+e:c.lasttime;e=c.nc.getScrollLeft();var t=c.nc.getScrollTop(),b=c.nc.page.maxh,p=c.nc.page.maxw;c.speedx=0=l-h;if(0>t||t>b||0>e||e>p)h=!1;e=c.speedx&&h?c.speedx:!1;if(c.speedy&&h&&c.speedy||e){var g=Math.max(16,c.steptime);50s||s>p))e=0.1;if(c.speedy&&(u=Math.floor(c.lastscrolly-c.speedy*(1-c.demulxy)),c.lastscrolly=u,0>u||u>b))e=0.1;c.demulxy=Math.min(1,c.demulxy+e);c.nc.synched("domomentum2d",function(){c.speedx&&(c.nc.getScrollLeft()!=c.chkx&&c.stop(),c.chkx= + s,c.nc.setScrollLeft(s));c.speedy&&(c.nc.getScrollTop()!=c.chky&&c.stop(),c.chky=u,c.nc.setScrollTop(u));c.timer||(c.nc.hideCursor(),c.doSnapy(s,u))});1>c.demulxy?c.timer=setTimeout(d,g):(c.stop(),c.nc.hideCursor(),c.doSnapy(s,u))};d()}else c.doSnapy(c.nc.getScrollLeft(),c.nc.getScrollTop())}},B=e.fn.scrollTop;e.cssHooks.pageYOffset={get:function(h,c,k){return(c=e.data(h,"__nicescroll")||!1)&&c.ishwscroll?c.getScrollTop():B.call(h)},set:function(h,c){var k=e.data(h,"__nicescroll")||!1;k&&k.ishwscroll? + k.setScrollTop(parseInt(c)):B.call(h,c);return this}};e.fn.scrollTop=function(h){if("undefined"==typeof h){var c=this[0]?e.data(this[0],"__nicescroll")||!1:!1;return c&&c.ishwscroll?c.getScrollTop():B.call(this)}return this.each(function(){var c=e.data(this,"__nicescroll")||!1;c&&c.ishwscroll?c.setScrollTop(parseInt(h)):B.call(e(this),h)})};var C=e.fn.scrollLeft;e.cssHooks.pageXOffset={get:function(h,c,k){return(c=e.data(h,"__nicescroll")||!1)&&c.ishwscroll?c.getScrollLeft():C.call(h)},set:function(h, + c){var k=e.data(h,"__nicescroll")||!1;k&&k.ishwscroll?k.setScrollLeft(parseInt(c)):C.call(h,c);return this}};e.fn.scrollLeft=function(h){if("undefined"==typeof h){var c=this[0]?e.data(this[0],"__nicescroll")||!1:!1;return c&&c.ishwscroll?c.getScrollLeft():C.call(this)}return this.each(function(){var c=e.data(this,"__nicescroll")||!1;c&&c.ishwscroll?c.setScrollLeft(parseInt(h)):C.call(e(this),h)})};var D=function(h){var c=this;this.length=0;this.name="nicescrollarray";this.each=function(e){for(var h= + 0,k=0;hgmailcom | http://flesler.blogspot.com + * Dual licensed under MIT and GPL. + * @author Ariel Flesler + * @version 1.4.6 + */ +;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,targ,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery); diff --git a/server/template/static/js/jquery.ui.touch-punch.min.js b/server/template/static/js/jquery.ui.touch-punch.min.js new file mode 100755 index 000000000..31272ce6f --- /dev/null +++ b/server/template/static/js/jquery.ui.touch-punch.min.js @@ -0,0 +1,11 @@ +/*! + * jQuery UI Touch Punch 0.2.3 + * + * Copyright 2011–2014, Dave Furfero + * Dual licensed under the MIT or GPL Version 2 licenses. + * + * Depends: + * jquery.ui.widget.js + * jquery.ui.mouse.js + */ +!function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery); \ No newline at end of file From fe59ef5d2a06840da6152eed4243e5b23841414b Mon Sep 17 00:00:00 2001 From: Nir Izraeli Date: Thu, 22 Dec 2016 10:54:57 +0200 Subject: [PATCH 05/23] Use Font-Awesome from CDN instead of local copy Signed-off-by: Nir Izraeli --- server/template/base.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/server/template/base.html b/server/template/base.html index 68ecf7220..e358211d7 100755 --- a/server/template/base.html +++ b/server/template/base.html @@ -1,5 +1,4 @@ {% load staticfiles %} - @@ -13,8 +12,8 @@ - - + + @@ -316,7 +315,7 @@

{% block title %}{% endblock %}

- + From 3e3c290d8fb9f9413360e5f098421eaa4f82f85c Mon Sep 17 00:00:00 2001 From: Nir Izraeli Date: Thu, 22 Dec 2016 10:55:25 +0200 Subject: [PATCH 06/23] Move sidebar from base.html to sidebar.html Signed-off-by: Nir Izraeli --- server/template/base.html | 87 +----------------------------------- server/template/sidebar.html | 85 +++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 86 deletions(-) create mode 100755 server/template/sidebar.html diff --git a/server/template/base.html b/server/template/base.html index e358211d7..59ed6ce9a 100755 --- a/server/template/base.html +++ b/server/template/base.html @@ -194,93 +194,8 @@ - - + {% include 'sidebar.html' %} - -
- - - - - -
- -
-
- + + {% include 'topbar.html' %} + - + {% include 'sidebar.html' %} - + diff --git a/server/template/topbar.html b/server/template/topbar.html new file mode 100644 index 000000000..36488f8f4 --- /dev/null +++ b/server/template/topbar.html @@ -0,0 +1,161 @@ +{% load staticfiles %} +
+ + + + + +
+ +
+
From 6007c5a439aa3c5984df46312d1efea41a271b45 Mon Sep 17 00:00:00 2001 From: Nir Izraeli Date: Thu, 22 Dec 2016 11:21:47 +0200 Subject: [PATCH 09/23] Adjust spaces Signed-off-by: Nir Izraeli --- server/template/base.html | 53 +++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/server/template/base.html b/server/template/base.html index a76ca8bea..a72fc0677 100644 --- a/server/template/base.html +++ b/server/template/base.html @@ -29,42 +29,41 @@
- {% include 'topbar.html' %} + {% include 'topbar.html' %} - {% include 'sidebar.html' %} + {% include 'sidebar.html' %} - - -
-
-
+ + +
+
+
+
+
+

{% block title %}{% endblock %}

-
-

{% block title %}{% endblock %}

-
-
-

{% block content %}{% endblock %}

-
-
+
+

{% block content %}{% endblock %}

-
-
- - - - +
+
+
+ + + + +
From 59b3114f89d68b2042ab276d0850e7b52a46965c Mon Sep 17 00:00:00 2001 From: Nir Izraeli Date: Thu, 22 Dec 2016 11:36:09 +0200 Subject: [PATCH 10/23] Fix footer size by adding an nbsp Signed-off-by: Nir Izraeli --- server/template/base.html | 1 + 1 file changed, 1 insertion(+) diff --git a/server/template/base.html b/server/template/base.html index a72fc0677..b298db9d0 100644 --- a/server/template/base.html +++ b/server/template/base.html @@ -58,6 +58,7 @@

{% block title %}{% endblock %}