diff --git a/.gitignore b/.gitignore index 2f21471..a7ee446 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,11 @@ ar/ archilance/settings/local.py media/* +static/* +*.log.* +*.log !media/_sample_files/ ++Temp/* chat/settings.py todo/ diff --git a/BingSiteAuth.xml b/BingSiteAuth.xml new file mode 100644 index 0000000..c93bb56 --- /dev/null +++ b/BingSiteAuth.xml @@ -0,0 +1,4 @@ + + + 4C79F1DB9A1FE199063E733A4FB34C31 + \ No newline at end of file diff --git a/api/urls.py b/api/urls.py index 884a968..ac4d6e2 100755 --- a/api/urls.py +++ b/api/urls.py @@ -6,6 +6,7 @@ from .views import ( ContractorResumeViewSet, DocumentViewSet, LocationViewSet, + LocationViewSetFlat, MessageViewSet, NoteViewSet, OrderViewSet, @@ -14,7 +15,10 @@ from .views import ( ProjectViewSet, RealtyViewSet, ReviewViewSet, + BuildingClassificationViewSet, SpecializationViewSet, + SpecializationViewSetFlat, + ConstructionTypeViewSet, StageViewSet, TeamViewSet, UserViewSet, @@ -29,6 +33,7 @@ router.register(r'contractorresume', ContractorResumeViewSet) router.register(r'contractorresumefiles', ContractorResumeFilesViewSet) router.register(r'documents', DocumentViewSet) router.register(r'locations', LocationViewSet) +router.register(r'locations_flat', LocationViewSetFlat) router.register(r'message', MessageViewSet, base_name='Message') router.register(r'note', NoteViewSet) router.register(r'orders', OrderViewSet) @@ -36,8 +41,11 @@ router.register(r'portfolio-photos', PortfolioPhotoViewSet) router.register(r'portfolios', PortfolioViewSet) router.register(r'projects', ProjectViewSet) router.register(r'realties', RealtyViewSet) +router.register(r'building_classifications', BuildingClassificationViewSet) +router.register(r'construction_type', ConstructionTypeViewSet) router.register(r'reviews', ReviewViewSet) router.register(r'specializations', SpecializationViewSet) +router.register(r'specializations_flat', SpecializationViewSetFlat) router.register(r'stages', StageViewSet) router.register(r'teams', TeamViewSet) router.register(r'users', UserViewSet) diff --git a/api/views.py b/api/views.py index 3819bd5..b2fae08 100755 --- a/api/views.py +++ b/api/views.py @@ -9,21 +9,23 @@ from chat.models import Message, Notes, Documents, NewMessage from chat.serializers import MessageSerializer, NoteSerializer, DocumentsSerializer from common.filters import LocationFilterSet from common.models import Location -from common.serializers import LocationSerializer +from common.serializers import LocationSerializer, LocationSerializerFlat from projects.filters import ( ProjectFilterSet, RealtyFilterSet, StageFilterSet, PortfolioFilterSet, OrderFilterSet, - PortfolioPhotoFilterSet, AnswerFilterSet, + PortfolioPhotoFilterSet, AnswerFilterSet, BuildingClassficationFilterSet, ConstructionTypeFilterSet ) -from projects.models import Project, Realty, Stage, Portfolio, PortfolioPhoto, Answer, Order +from projects.models import (Project, Realty, Stage, Portfolio, PortfolioPhoto, Answer, Order, + BuildingClassfication, ConstructionType) from projects.serializers import ( ProjectSerializer, RealtySerializer, StageSerializer, PortfolioSerializer, - PortfolioPhotoSerializer, AnswerSerializer, OrderSerializer, ) + PortfolioPhotoSerializer, AnswerSerializer, OrderSerializer, BuildingClassificationSerializeFlat, + ConstructionTypeSerializer) from reviews.filters import ReviewFilterSet from reviews.models import Review from reviews.serializers import ReviewSerializer from specializations.filters import SpecializationFilterSet from specializations.models import Specialization -from specializations.serializers import SpecializationSerializer +from specializations.serializers import SpecializationSerializer, SpecializationSerializerFlat from users.filters import UserFilterSet, TeamFilterSet from users.models import User, ContractorResumeFiles, ContractorResume, Team from users.serializers import UserSerializer, ContractorResumeFilesSerializer, ContractorResumeSerializer, \ @@ -151,6 +153,18 @@ class RealtyViewSet(ModelViewSet): filter_class = RealtyFilterSet +class BuildingClassificationViewSet(ModelViewSet): + queryset = BuildingClassfication.objects.all() + serializer_class = BuildingClassificationSerializeFlat + filter_class = BuildingClassficationFilterSet + + +class ConstructionTypeViewSet(ModelViewSet): + queryset = ConstructionType.objects.all() + serializer_class = ConstructionTypeSerializer + filter_class = ConstructionTypeFilterSet + + class OrderViewSet(ModelViewSet): queryset = Order.objects.all() serializer_class = OrderSerializer @@ -167,6 +181,12 @@ class SpecializationViewSet(ModelViewSet): filter_class = SpecializationFilterSet +class SpecializationViewSetFlat(ModelViewSet): + queryset = Specialization.objects.all() + serializer_class = SpecializationSerializerFlat + filter_class = SpecializationFilterSet + + class UserViewSet(ModelViewSet): queryset = User.objects.all() serializer_class = UserSerializer @@ -183,6 +203,12 @@ class LocationViewSet(ModelViewSet): filter_class = LocationFilterSet +class LocationViewSetFlat(ModelViewSet): + queryset = Location.objects.all().order_by('name') + serializer_class = LocationSerializerFlat + filter_class = LocationFilterSet + + class PortfolioPagination(PageNumberPagination): page_size = settings.API_PAGE_SIZE # Default page size page_size_query_param = 'page_size' # Provide custom page size through a query param diff --git a/archilance/local.py b/archilance/local.py new file mode 100644 index 0000000..b26e8e8 --- /dev/null +++ b/archilance/local.py @@ -0,0 +1,12 @@ +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql_psycopg2', + 'NAME': 'proekton2', + 'USER': 'postgres', + 'PASSWORD': 'gum1756', + 'HOST': 'localhost', + 'PORT': '', + } +} + +TEMPLATE_DEBUG = True diff --git a/archilance/management/commands/ishell.py b/archilance/management/commands/ishell.py new file mode 100644 index 0000000..73ad361 --- /dev/null +++ b/archilance/management/commands/ishell.py @@ -0,0 +1,16 @@ +from django.core.management.base import BaseCommand +from IPython.terminal.embed import InteractiveShellEmbed +from django.db.models import Model + + +class Command(BaseCommand): + def handle(self, *args, **options): + modules = ('specializations.models', ) + for module in modules: + m = __import__(module, fromlist='non-empty') + for a in m.__dict__: + v = getattr(m, a) + if hasattr(v, '__base__') and issubclass(v, Model): + globals()[a] = v + + InteractiveShellEmbed()() \ No newline at end of file diff --git a/assets/css/font-awesome.min.css b/assets/css/font-awesome.min.css index d0603cb..9b27f8e 100644 --- a/assets/css/font-awesome.min.css +++ b/assets/css/font-awesome.min.css @@ -1,4 +1,4 @@ /*! - * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome + * Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) - */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.5.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.5.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.5.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.5.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"} + */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.6.3');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.6.3') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.6.3') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.6.3') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.6.3') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.6.3#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto} diff --git a/assets/css/main.css b/assets/css/main.css index 5feeb00..595b0ac 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -2519,7 +2519,7 @@ input[type="checkbox"]:checked + span { } .exButton .btn-group .btn span { - font-family: Arial. Verdana, Helvetica, sans-serif; + font-family: Arial, Verdana, Helvetica, sans-serif; font-weight: bold; } diff --git a/assets/fonts/FontAwesome.otf b/assets/fonts/FontAwesome.otf old mode 100644 new mode 100755 index 3ed7f8b..d4de13e Binary files a/assets/fonts/FontAwesome.otf and b/assets/fonts/FontAwesome.otf differ diff --git a/assets/fonts/fontawesome-webfont.eot b/assets/fonts/fontawesome-webfont.eot old mode 100644 new mode 100755 index 9b6afae..c7b00d2 Binary files a/assets/fonts/fontawesome-webfont.eot and b/assets/fonts/fontawesome-webfont.eot differ diff --git a/assets/fonts/fontawesome-webfont.svg b/assets/fonts/fontawesome-webfont.svg old mode 100644 new mode 100755 index d05688e..8b66187 --- a/assets/fonts/fontawesome-webfont.svg +++ b/assets/fonts/fontawesome-webfont.svg @@ -169,7 +169,7 @@ - + @@ -178,7 +178,7 @@ - + @@ -363,7 +363,7 @@ - + @@ -484,7 +484,7 @@ - + @@ -626,7 +626,7 @@ - + @@ -641,15 +641,45 @@ - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/fonts/fontawesome-webfont.ttf b/assets/fonts/fontawesome-webfont.ttf old mode 100644 new mode 100755 index 26dea79..f221e50 Binary files a/assets/fonts/fontawesome-webfont.ttf and b/assets/fonts/fontawesome-webfont.ttf differ diff --git a/assets/fonts/fontawesome-webfont.woff b/assets/fonts/fontawesome-webfont.woff old mode 100644 new mode 100755 index dc35ce3..6e7483c Binary files a/assets/fonts/fontawesome-webfont.woff and b/assets/fonts/fontawesome-webfont.woff differ diff --git a/assets/fonts/fontawesome-webfont.woff2 b/assets/fonts/fontawesome-webfont.woff2 old mode 100644 new mode 100755 index 500e517..7eb74fd Binary files a/assets/fonts/fontawesome-webfont.woff2 and b/assets/fonts/fontawesome-webfont.woff2 differ diff --git a/assets/img/ajax-loader.gif b/assets/img/ajax-loader.gif new file mode 100644 index 0000000..716cd78 Binary files /dev/null and b/assets/img/ajax-loader.gif differ diff --git a/assets/lib/proekton-components/css/other.css b/assets/lib/proekton-components/css/other.css new file mode 100644 index 0000000..375262d --- /dev/null +++ b/assets/lib/proekton-components/css/other.css @@ -0,0 +1,117 @@ +label { + all: initial; +} + +.selected-container { + /*display: inline-block;*/ + /*width: 100%;*/ + min-height: 40px; + padding-bottom: 20px; +} + +.selected-container .selected-element { + display: inline-block; + padding: 5px 25px 5px 10px; + margin-top: 8px; + min-height: 45px; + background-color: #e3e3e3; + border: 1px solid #dbdbdb; + position: relative; + -moz-border-radius: 10px; /* Firefox */ + -webkit-border-radius: 10px; /* Safari 4 */ + border-radius: 10px; /* IE 9, Safari 5, Chrome */ +} + +.selected-element .header{ + font-size: 9pt; + color: #979494; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + word-wrap: break-word; +} + +.selected-element .name { + font-size: 14pt; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + vertical-align: middle; + width: 100%; +} + + +.selected-element .icon-remove{ + background-image: url('../img/cross01.png'); + background-size: 24px 24px; + /*display: inline-block;*/ + position: absolute; + right: 5px; + top: 15px; + width: 16px; + height: 16px; + cursor: pointer; + margin-left: -20px; +} + +/*DEMO*/ +.wrapper{ + background-color: #f2f2f2; + padding: 40px; + margin: 50px 30px; +} + +.form-container { + padding: 50px 45px; +} + +.separator { + margin: 20px 0; +} + +.max-width { + display: table !important; + width: 100% +} + +.vertical{ + width: 100%; +} + +.cell { + display: table-cell; +} +.custom-check { + background: url("../img/rect01.png") no-repeat center; + background-size: 200px 40px; + width: 200px; + height: 40px; + cursor: pointer; +} + +.custom-check.checked { + background: url("../img/rect02.png") no-repeat center; + background-size: 200px 40px; + width: 200px; + height: 40px; +} + +#page-preloader { + position: fixed; + left: 0; + top: 0; + right: 0; + bottom: 0; + background: #000; + z-index: 100500; +} + +#page-preloader .spinner { + width: 32px; + height: 32px; + position: absolute; + left: 50%; + top: 50%; + background: url('../img/ajax-loader.gif') no-repeat 50% 50%; + margin: -16px 0 0 -16px; +} \ No newline at end of file diff --git a/assets/lib/proekton-components/css/select-box.css b/assets/lib/proekton-components/css/select-box.css new file mode 100644 index 0000000..15d067e --- /dev/null +++ b/assets/lib/proekton-components/css/select-box.css @@ -0,0 +1,171 @@ +.select-box-container { + display: block; + /*margin-top: 40px;*/ + /*min-width: 200px;*/ +} + +.select-box-header{ + font-size: 14pt; + white-space: nowrap; + word-wrap: break-word; + /*position: relative;*/ + /*top:10px;*/ +} + +.select-box-header .header{ + display: inline-block; + color: black; + text-overflow: ellipsis; + overflow: hidden; + word-wrap: break-word; + max-width: 220px; + +} + +/*.select-box-header i {*/ + /*position: relative;*/ + /*top: -5px;*/ +/*}*/ + +.select-box-header .fa:hover{ + cursor: pointer; +} + +.select-box-bottom { + clear: both; +} + +.select-box-results, .select-box-options { + display: block; + /*clear: both;*/ + position: absolute; + /*margin-top: -5px;*/ + z-index: 99999; + opacity: 0.9; +} + +.box-wrapper { + display: block; + max-height: 200px; + overflow-y: scroll; + border: 1px solid #868686; + background-color: #F2F2F2; +} + +.select-box-results input[type=checkbox] { + margin: 0 5px 0 5px; +} + +.select-box-results i { + font-weight: normal; + font-style: normal; +} + +.select-box-results, .select-box-options li, ul { + margin: 0; + padding: 0; +} + +.select-box-results li, .select-box-options li { + padding: 2px 10px; + border-bottom: 1px solid #afb2b6; + list-style: none; +} + +.select-box-results label, .select-box-options label, +.select-box-results li, .select-box-options li { + cursor: pointer; + width: 100%; +} + +.select-box-results li:hover, .select-box-options li:hover { + background-color: #dcdcdc; + border-left: 2px solid red; +} + +.select-box-search { + display: block; +} + +input.select-box-search { + height: 40px; + width: 100%; + border: 1px solid #cccccc; + outline: none; + padding: 5px 40px 5px 20px; + background: url("../img/magnifying-glass-308581.svg") no-repeat right; + background-size: 40px 40px; + background-color: white; + /*padding-left: 40px;*/ +} + +.select-box-results .other-part { + color: darkgray; + /*border: 1px solid #00fa17;*/ + display: block; +} + +.select-box-results .other-header { + color: #000; + font-weight: bold; + margin-left: 10px; +} + +.select-box-results .main-part { + border-bottom: 1px solid #000000; + display: block; +} + +.select-box-options .box-wrapper, .select-box-results { + /*padding: 0 10px;*/ + min-width: 300px; + max-width: 400px; +} + +.button-add { + -moz-border-radius: 15px; /* Firefox */ + -webkit-border-radius: 15px; /* Safari 4 */ + border-radius: 15px; /* IE 9, Safari 5, Chrome */ + background-color: red; + padding: 0 15px; + /*border: none;*/ + text-decoration: none; + color: white; + +} + +.button-add .results { + position: absolute; + left: 280px; + z-index: 999; +} + +.button-add.options { + position: absolute; + /*FIXME: костыль*/ + left: 160px; + z-index: 999; + /*right: auto;*/ + /*@position: absolute;*/ + /*top: 40px;*/ +} + +.highlight { + color: red; +} + +.editable-container { + display: block; + float: left; + /*max-width: 400px;*/ + background-color: #e5e5e5; + min-height: 40px; + padding: 5px 10px; + /*min-width: 40px;*/ + position: relative; + left: -30px; +} + +.vertical-child{ + margin-top: 30px; +} \ No newline at end of file diff --git a/assets/lib/proekton-components/img/ajax-loader.gif b/assets/lib/proekton-components/img/ajax-loader.gif new file mode 100644 index 0000000..716cd78 Binary files /dev/null and b/assets/lib/proekton-components/img/ajax-loader.gif differ diff --git a/assets/lib/proekton-components/img/cross.ico b/assets/lib/proekton-components/img/cross.ico new file mode 100644 index 0000000..1c7fde2 Binary files /dev/null and b/assets/lib/proekton-components/img/cross.ico differ diff --git a/assets/lib/proekton-components/img/cross01.png b/assets/lib/proekton-components/img/cross01.png new file mode 100644 index 0000000..9b39ed6 Binary files /dev/null and b/assets/lib/proekton-components/img/cross01.png differ diff --git a/assets/lib/proekton-components/img/magnifying-glass-308581.svg b/assets/lib/proekton-components/img/magnifying-glass-308581.svg new file mode 100644 index 0000000..aa33afa --- /dev/null +++ b/assets/lib/proekton-components/img/magnifying-glass-308581.svg @@ -0,0 +1,55 @@ + + + + + + image/svg+xml + + + + + + + + diff --git a/assets/lib/proekton-components/img/rect01.png b/assets/lib/proekton-components/img/rect01.png new file mode 100644 index 0000000..841209e Binary files /dev/null and b/assets/lib/proekton-components/img/rect01.png differ diff --git a/assets/lib/proekton-components/img/rect02.png b/assets/lib/proekton-components/img/rect02.png new file mode 100644 index 0000000..a46d1d4 Binary files /dev/null and b/assets/lib/proekton-components/img/rect02.png differ diff --git a/assets/lib/proekton-components/js/SelectBox.js b/assets/lib/proekton-components/js/SelectBox.js new file mode 100644 index 0000000..59f6ece --- /dev/null +++ b/assets/lib/proekton-components/js/SelectBox.js @@ -0,0 +1,299 @@ +// ` +class SelectBox { + constructor($container, data, has_editable_container, vertical_child) { + this.container_id = $container.attr("id"); + this.tree_data = new SpecTree(data); + // Вариант не выбран + this.selected_id = undefined; + let template = SelectBox.getTemplate("Header", this.container_id, has_editable_container, vertical_child); + $container.replaceWith(template); + this._buildComponents(); + this._bindEvents(); + if (!has_editable_container) this.hide(); + } + + static getTemplate(header, id, editable_container, vertical_child) { + let main = ` +
+
+ + +
+
+ +
+
+`; + let child = ` + + + +`; + let insert_template = editable_container ? main : child; + vertical_child = vertical_child ? 'vertical-child': ''; + let htmlTemplate = + ` + +
+ ${header} + +
+ + ${insert_template} + + + +
    + +
+
+
+ + + +
    +
+
+ + Из других категорий +
    +
+
+
+ +
+ +
+`; + return htmlTemplate; + } + + _buildComponents() { + this.$select_box = $(`#${this.container_id}`); + this.$header = this.$select_box.find('.select-box-header .header'); + this.$results_box = this.$select_box.find('.select-box-results'); + this.$options_box = this.$select_box.find('.select-box-options'); + this.$search_input = this.$select_box.find('input.select-box-search'); + this.$button_add = this.$results_box.find('.button-add'); + this.$button_add_options = this.$select_box.find('.button-add.options'); + this.$editable_container = this.$select_box.find('.editable-container'); + this._fillOptionsData(); + this.$results_box.hide(); + this.$options_box.hide(); + this.$button_add_options.hide(); + // TODO: сделать проверку на наличие всех нужных элементов и их корректый jq select + } + + static highlight(string, sub_string) { + let index = string.toLowerCase().indexOf(sub_string.toLowerCase()); + if (index === -1) return string; + let light_template = (el) => `${el}`; + let [to, select, after] = [string.slice(0, index), + string.slice(index, index + sub_string.length), + string.slice(index + sub_string.length)]; + return `${to}${light_template(select)}${after}` + } + + hide() { + this.$select_box.hide(); + } + + show() { + this.$select_box.show(); + } + + clear() { + this.$search_input.val(""); + this.$options_box.hide(); + this.$results_box.hide(); + // this.$button_add.hide(); + this.$button_add_options.hide(); + this.element_id = undefined; + this.parent_id = undefined; + this.$editable_container.html(""); + if (this.prev_select_box) this.hide(); + } + + clearAll(only_next) { + console.log("only_next = ", only_next); + if (this.next_select_box) { + this.next_select_box.clear() + } + if (!only_next) { + this.clear(); + if (this.prev_select_box) this.prev_select_box.clearAll(only_next) + } else { + if (this.next_select_box) this.next_select_box.clearAll(only_next) + } + + } + + setHeader(header) { + this.$header.html(header); + this.show(); + } + + setParent(parent_id) { + // console.log("setParent id -->", parent_id); + this.parent_id = parent_id; + this._fillOptionsData(); + } + + setNearbySelectBox(next, prev) { + this.next_select_box = next; + this.prev_select_box = prev; + } + + getSelectedElements() { + let all_checked = this.$results_box.find(":checked"); + return all_checked.map(function () { + return $(this).data("id"); + }) + } + + connectSelectedContainer(selected_container) { + this.selected_container = selected_container; + this.selected_container = selected_container; + + } + + updateEditableContainer(el_id) { + // Если нет контейнера для отображения ... + if (this.$editable_container.length) { + let chain_header = SelectedContainer.getHeader( + this.tree_data.getSpecChain(el_id, true), " / "); + let el_template = `${chain_header}`; + this.$editable_container.html(el_template); + return; + } + //..., передаем отображение предыдущему selectBox + if (this.prev_select_box) this.prev_select_box.updateEditableContainer(el_id); + } + + _onclickOptionsElement(e) { + this.clearAll(true); + let el_id = $(e.target).data("id"); + this.selected_id = el_id; + this.updateEditableContainer(el_id); + this.$search_input.val($(e.target).html()); + this.element_id = el_id; + if (this.next_select_box) { + this.next_select_box.setParent(el_id); + this.next_select_box.setHeader($(e.target).html()); + } + if (this.prev_select_box) this.prev_select_box.$button_add_options.hide(); + + this.$button_add_options.show(); + this.$options_box.hide(); + } + + _onButtonAdd(e) { + let self = this; + + this.getSelectedElements().each(function () { + console.log("add el -->", this); + self.selected_container.add(this, 40); + }); + this.clearAll(); + e.preventDefault(); + return false; + } + + _onButtonAddOptions(e) { + this.selected_container.add(this.element_id, 40); + this.clearAll(); + e.preventDefault(); + return false; + } + + _fillOptionsData() { + let self = this; + let spec_list = this.tree_data.dataToList(this.parent_id); + let $container = this.$options_box.find('ul'); + $container.html(""); + spec_list.forEach(function (el) { + let el_html = `
  • ${el.name}
  • `; + $container.append($(el_html)) + }); + this.$select_box.find('li').on("click", this._onclickOptionsElement.bind(self)); + + } + + _fillResultsData(search_text) { + let self = this; + + function search(search_text, parent_id, exclude_id) { + // :FORMAT spec_list [{name, id}, ...] + let spec_list = self.tree_data.dataToList(parent_id, true, exclude_id); + // console.log("search -->", spec_list.length); + console.log("parent_id ", parent_id); + return spec_list.filter(function (el) { + return el.name.toLowerCase().indexOf(search_text.toLowerCase()) !== -1; + }); + } + + function fillContainer($container, template, search_text, parent_id, exclude_id) { + $container.html(""); + let search_res = search(search_text, parent_id, exclude_id); + if (!search_res.length || (!exclude_id && parent_id === null)) { + $container.append('No Found'); + return; + } + search_res.forEach(function (el) { + $container.append(template(SelectBox.highlight(el.name, search_text), el.id)); + }); + } + + // FILL RESULTS + let result_template = (el, id) => `
  • `; + // MAIN PART + let $container = this.$results_box.find('.main-part ul'); + fillContainer($container, result_template, search_text, self.parent_id); + + // OTHER PART + $container = this.$results_box.find('.other-part ul'); + fillContainer($container, result_template, search_text, null, self.parent_id); + } + + _looseFocus() { + this.$results_box.hide(); + this.$options_box.hide(); + if (!this.selected_id) this.$search_input.val(""); + } + + _bindEvents() { + let self = this; + $(document).click(function (event) { + if ($(event.target).closest(`#${self.container_id}`).length) { + return; + } + self._looseFocus(); + }); + // console.log("out ", this.$options_box); + this.$search_input.on("input", function (e) { + self._fillResultsData(self.$search_input.val()); + self.$results_box.show(); + self.$options_box.hide(); + + }); + + this.$search_input.on("click", function (e) { + // console.log("in ", self.$options_box); + self.$options_box.show(); + self.$results_box.hide(); + self.$button_add_options.hide(); + self.$search_input.val(""); + + }); + + + this.$button_add.on("click", function (e) { + self._onButtonAdd(e); + }); + + this.$button_add_options.on("click", this._onButtonAddOptions.bind(self)) + } + +} + + diff --git a/assets/lib/proekton-components/js/SelectedContainer.js b/assets/lib/proekton-components/js/SelectedContainer.js new file mode 100644 index 0000000..fccc924 --- /dev/null +++ b/assets/lib/proekton-components/js/SelectedContainer.js @@ -0,0 +1,99 @@ +// ` +class SelectedContainer { + constructor($container, data) { + this.$self = $container; + this.elements_id = []; // [spec_id, spec_id, ...] + this.tree_data = new SpecTree(data); + this.$input = this.$self.find('input[type="hidden"]'); + this.restoreElements(); + } + + restoreElements(){ + const self = this; + if (this.$input && this.$input.val()){ + let data = this.$input.val().split(',').filter((el) => el); + console.log("restore data = ", data); + this.elements_id = []; + data.forEach((el) => self.add(el)); + } + } + + static getTemplate(header, name, id) { + let htmlTemplate = + ` +
    + + ${header} + +
    + ${name} +
    + +
    +`; + return htmlTemplate + } + + static getHeader(spec_chain, separator, max_len) { + function toShortString(string, max_len) { + return string.slice(0, max_len) + (string.length > max_len ? "..." : ""); + } + + separator = separator || ' / '; + let str_chain = ""; + + spec_chain.forEach(function (el) { + str_chain = (max_len ? toShortString(el.name, max_len) : el.name) + (str_chain ? separator : "") + str_chain; + }); + + return str_chain; + } + + _removeById(spec_id) { + let index = this.elements_id.indexOf(spec_id); + if (index >= 0) { + this.elements_id.splice(index, 1); + } + $(`span[data-id='${spec_id}']`).parents('.selected-element').remove(); + } + + remove(e) { + let spec_id = $(e.target).data("id"); + this._removeById(spec_id); + if (this.$input) this.$input.val(this.elements_id.join(',')); + e.preventDefault(); + } + + add(_id, max_len) { + const id = Number(_id); + let self = this; + + let has_already = this.elements_id.filter(function (el) { + return self.tree_data.hasChildren(el, id) + }); + + // console.log(has_already); + if (has_already.length || (this.elements_id).indexOf(Number(id)) != -1) { + //TODO: do popup messages + console.log("Not actually"); + return; + } + + let not_valid = this.elements_id.filter(function (el) { + return self.tree_data.hasChildren(id, el) + }); + + not_valid.forEach(function (el) { + self._removeById(el); + }); + + const header = SelectedContainer.getHeader(this.tree_data.getSpecChain(id), "", max_len); + // console.log("header = ", header); + const name = this.tree_data.getElementById(id).name; + this.elements_id.push(id); + if (this.$input) this.$input.val(this.elements_id.join(',')); + this.$self.append(SelectedContainer.getTemplate(header || "root", name, id)); + this.btn_remove = this.$self.find('.icon-remove'); + this.btn_remove.on("click", this.remove.bind(self)); + } +} diff --git a/assets/lib/proekton-components/js/SimpleSelect.js b/assets/lib/proekton-components/js/SimpleSelect.js new file mode 100644 index 0000000..a1ad262 --- /dev/null +++ b/assets/lib/proekton-components/js/SimpleSelect.js @@ -0,0 +1,184 @@ +// ` +class SimpleSelect { + constructor($container, data) { + this.container_id = $container.attr("id"); + this.data = data || SimpleSelect._collectData($container); + let template = SimpleSelect.getTemplate("Header", this.container_id); + $container.replaceWith(template); + this._buildComponents(); + this._bindEvents(); + } + + static getTemplate(header, id) { + let insert_template = ` + + +`; + + let htmlTemplate = + ` + +
    + ${header} + +
    + + ${insert_template} + + + +
      + +
    +
    +
    + + + +
      +
    +
    +
    +
    + +
    +`; + return htmlTemplate; + } + + clear() { + this.$search_input.val(""); + this.$options_box.hide(); + this.$results_box.hide(); + this.selected_id = undefined; + } + + connectSelectedContainer(selected_container) { + this.selected_container = selected_container; + + } + + + setHeader(header) { + this.$header.html(header); + } + + + static _collectData($container) { + let $options = $container.find('option'); + let data = []; + $options.each(function () { + data.push({id: $(this).val(), name: $(this).html()}); + // $(this).remove(); + }); + return data + } + + _fillOptionsData() { + let self = this; + let $container = this.$options_box.find('ul'); + $container.html(""); + this.data.forEach(function (el) { + let el_html = `
  • ${el.name}
  • `; + $container.append($(el_html)) + }); + this.$select_box.find('li').on("click", this._onclickOptionsElement.bind(self)); + } + + _fillResultsData(search_text) { + let self = this; + + function search(search_text) { + // :FORMAT spec_list [{name, id}, ...] + return self.data.filter(function (el) { + return el.name.toLowerCase().indexOf(search_text.toLowerCase()) !== -1; + }); + } + + function fillContainer($container, template, search_text, parent_id, exclude_id) { + $container.html(""); + let search_res = search(search_text, parent_id, exclude_id); + if (!search_res.length || (!exclude_id && parent_id === null)) { + $container.append('No Found'); + return; + } + search_res.forEach(function (el) { + $container.append(template(SelectBox.highlight(el.name, search_text), el.id)); + }); + } + + // FILL RESULTS + let result_template = (el, id) => `
  • `; + // MAIN PART + let $container = this.$results_box.find('.main-part ul'); + fillContainer($container, result_template, search_text, self.parent_id); + + // OTHER PART + $container = this.$results_box.find('.other-part ul'); + fillContainer($container, result_template, search_text, null, self.parent_id); + //FIXME: duplicate code --^ + } + + _buildComponents() { + this.$select_box = $(`#${this.container_id}`); + this.$header = this.$select_box.find('.select-box-header .header'); + this.$results_box = this.$select_box.find('.select-box-results'); + this.$options_box = this.$select_box.find('.select-box-options'); + this.$search_input = this.$select_box.find('input.select-box-search'); + // this.$button_add = this.$results_box.find('.button-add'); + // this.$button_add_options = this.$select_box.find('.button-add.options'); + // this.$editable_container = this.$select_box.find('.editable-container'); + this._fillOptionsData(); + this.$results_box.hide(); + this.$options_box.hide(); + // this.$button_add_options.hide(); + // TODO: сделать проверку на наличие всех нужных элементов и их корректый jq select + } + + _looseFocus() { + this.$results_box.hide(); + this.$options_box.hide(); + if (!this.selected_id) this.$search_input.val(""); + } + + _bindEvents() { + let self = this; + $(document).click(function (event) { + if ($(event.target).closest(`#${self.container_id}`).length) { + return; + } + self._looseFocus(); + }); + // console.log("out ", this.$options_box); + this.$search_input.on("input", function (e) { + self._fillResultsData(self.$search_input.val()); + self.$results_box.show(); + self.$options_box.hide(); + + }); + + this.$search_input.on("click", function (e) { + self.$options_box.show(); + self.$results_box.hide(); + self.$search_input.val(""); + + }); + + + // this.$button_add.on("click", function (e) { + // self._onButtonAdd(e); + // }); + + } + + _onclickOptionsElement(e) { + console.log("selelc with id =", $(e.target).data("id")); + let el_id = $(e.target).data("id"); + this.selected_id = el_id; + // this.$search_input.val($(e.target).html()); + if (this.selected_container) this.selected_container.add(this.selected_id, 40); + this.$options_box.hide(); + } + + +} \ No newline at end of file diff --git a/assets/lib/proekton-components/js/SimpleSelectedContainer.js b/assets/lib/proekton-components/js/SimpleSelectedContainer.js new file mode 100644 index 0000000..6c77e57 --- /dev/null +++ b/assets/lib/proekton-components/js/SimpleSelectedContainer.js @@ -0,0 +1,74 @@ +// ` +class SimpleSelectedContainer { + constructor($container, data) { + this.$self = $container; + this.elements_id = []; // [spec_id, spec_id, ...] + this.data = data; + this.$input = this.$self.find('input[type="hidden"]'); + this.restoreElements(); + } + + restoreElements() { + const self = this; + if (this.$input && this.$input.val()){ + let data = this.$input.val().split(',').filter((el) => el); + console.log("restore data = ", data); + this.elements_id = []; + data.forEach((el) => self.add(el)); + } + } + + static getTemplate(name, id) { + let htmlTemplate = + ` +
    +
    + ${name} +
    + +
    +`; + return htmlTemplate + } + + + _removeById(spec_id) { + let index = this.elements_id.indexOf(spec_id); + if (index >= 0) { + this.elements_id.splice(index, 1); + } + $(`span[data-id='${spec_id}']`).parents('.selected-element').remove(); + } + + remove(e) { + let spec_id = $(e.target).data("id"); + this._removeById(spec_id); + if (this.$input) this.$input.val(this.elements_id.join(',')); + e.preventDefault(); + } + + getElementById(id) { + for (let i = 0; i < this.data.length; i++) { + if (this.data[i].id == id) return this.data[i] + } + } + + add(_id, max_len) { + const id = Number(_id); + // TODO: добавить учет max_len + let self = this; + if ((this.elements_id).indexOf(id) != -1) { + //TODO: do popup messages + console.log("Not actually"); + return; + } + // console.log("!", this.getElementById(id)); + const name = this.getElementById(id).name; + this.elements_id.push(id); + if (this.$input) this.$input.val(this.elements_id.join(',')); + this.$self.append(SimpleSelectedContainer.getTemplate(name, id)); + this.btn_remove = this.$self.find('.icon-remove'); + this.btn_remove.on("click", this.remove.bind(self)); + console.log(); + } +} diff --git a/assets/lib/proekton-components/js/SpecTree.js b/assets/lib/proekton-components/js/SpecTree.js new file mode 100644 index 0000000..633984e --- /dev/null +++ b/assets/lib/proekton-components/js/SpecTree.js @@ -0,0 +1,115 @@ +class Node { + constructor(data, tree) { + this.name = data.name; + this.id = data.id; + if (data.parent === null) { + this.parent = "root"; + data.parent = {id:"root"}; + this.name = "" + } + if (data.parent.id && data.parent.id !== 'root') { + let el = tree._getElementById(data.parent.id); + this.parent = el.node || new Node(el, tree); + } + data.node = this; + this.children = data.children.map(function (el_obj) { + let el = tree._getElementById(el_obj.id); + if(!el) console.log("el not found with id", el_obj.id); + // console.log("el = ", el, "el.id = ", el_obj.id); + if (el.node) return el.node; + el.node = new Node(el, tree); + return el.node + }); + + this.children = this.children || []; + } +} + +class SpecTree { + constructor(data) { + this.baseData = data; + this._root = new Node(data[0], this); + } + + /** + * получить element в базовой структуре + */ + _getElementById(id) { + for (let i = 0; i < this.baseData.length; i++) { + // console.log(this.baseData[i].id, " / ", id); + if (this.baseData[i].id == id) return this.baseData[i] + } + } + + /** + * получить element в дереве + */ + getElementById(id) { + function searchInChildren(children) { + for (let i = 0; i < children.length; i++) { + if (children[i].id == id) return children[i]; + let res = searchInChildren(children[i].children); + if (res) return res + } + } + + return searchInChildren(this._root.children) + } + + /** + * Является ли узел c el_id дочерним для parent_id + * @param el_id + * @param parent_id + */ + hasChildren(el_id, parent_id){ + function checkParent(el, parent) { + if (el.parent == parent) return true; + if (el.parent && el.parent != 'root') return checkParent(el.parent, parent); + return false; + } + return checkParent(this.getElementById(el_id), this.getElementById(parent_id)) + } + + /** + * @param start_parent_id(number) - начиная с + * @param attached(bool) - включая вложенные/дочерние + * @param exclude_id - исключая узел c exclude_id и всеми его вложенными узлами + * @returns [{name, id}, ...] + */ + dataToList(start_parent_id, attached, exclude_id) { + let data_list = []; + + function goInChildren(children) { + for (let i = 0; i < children.length; i++) { + if (children[i].id == exclude_id) continue; + data_list.push({name: children[i].name, id: children[i].id}); + if (attached) goInChildren(children[i].children); + } + } + let start = start_parent_id ? this.getElementById(start_parent_id) : this._root; + goInChildren(start.children); + return data_list + } + + /** + * + * @param id + * @param incl(bool) - исключая сам элемент + * @returns {Array} всех узлов/элементов от элемента с id до корня + */ + getSpecChain(id, incl){ + let chain = []; + let el = this.getElementById(id); + // console.log("el = ", el); + function getParent(el) { + if (el.parent && el.parent != "root"){ + chain.push(el.parent); + getParent(el.parent) + } + } + getParent(el); + // console.log("chain = ", chain); + if (incl) chain.unshift(el); + return chain + } +} \ No newline at end of file diff --git a/assets/lib/proekton-components/js/init.js b/assets/lib/proekton-components/js/init.js new file mode 100644 index 0000000..e10053b --- /dev/null +++ b/assets/lib/proekton-components/js/init.js @@ -0,0 +1,158 @@ +// ` +function findProjects() { + console.log("Find"); + const url = '/projects/test_page'; + let keywords = $('input[name=keywords]').val(); + let obj = {keywords}; + console.log("obj --> string", JSON.stringify(obj)); + window.location.href = `${url}?keywords=про`; + // $.ajax({ + // url: "/projects/test_page", + // data: {'foo': 'bar'}, + // async: false + // }); +} +$(function () { + function createFilterSpecs(_data) { + // SPECIALIZATIONS FILTER + let data = _data.results; + let sb_main = new SelectBox($('#select-box-1'), data, true); + sb_main.setHeader("Специализации"); + let select_container = new SelectedContainer($('#selected-spec'), data); + sb_main.connectSelectedContainer(select_container); + let sb_1 = new SelectBox($('#select-box-2'), data, null, true); + let sb_2 = new SelectBox($('#select-box-3'), data, null, true); + let sb_3 = new SelectBox($('#select-box-4'), data, null, true); + let sb_4 = new SelectBox($('#select-box-5'), data, null, true); + + sb_1.connectSelectedContainer(select_container); + sb_2.connectSelectedContainer(select_container); + sb_3.connectSelectedContainer(select_container); + sb_4.connectSelectedContainer(select_container); + + sb_main.setNearbySelectBox(sb_1); + sb_1.setNearbySelectBox(sb_2, sb_main); + sb_2.setNearbySelectBox(sb_3, sb_1); + sb_3.setNearbySelectBox(sb_4, sb_2); + sb_4.setNearbySelectBox("", sb_3); + + } + + function createFilterBuildingClass(_data) { + // BUILDING-CLASSIFICATION FILTER + let data = _data.results; + let sb_build_main = new SelectBox($('#sb-building-classification'), data, false); + sb_build_main.setHeader("Классификация здания"); + let sb_build_1 = new SelectBox($('#sb-building-sub-classification'), data, null, true); + let select_build_container = new SelectedContainer($('#selected-building-classification'), data, true); + sb_build_main.connectSelectedContainer(select_build_container); + sb_build_1.connectSelectedContainer(select_build_container); + + sb_build_main.setNearbySelectBox(sb_build_1); + sb_build_1.setNearbySelectBox("", sb_build_main); + } + + function createFilterConstructionType(_data) { + let data = _data.results; + let sb_constr_main = new SimpleSelect($('#sb-construction-type'), data); + sb_constr_main.setHeader("Вид строительства"); + let select_constr_type = new SimpleSelectedContainer($('#selected-construction-type'), data); + sb_constr_main.connectSelectedContainer(select_constr_type); + } + + function createFilerLocations(data) { + let sb_loc_main = new SelectBox($('#sb-location-1'), data); + sb_loc_main.setHeader("Местоположение"); + let select_loc = new SelectedContainer($('#selected-location'), data, true); + sb_loc_main.connectSelectedContainer(select_loc); + let sb_loc_1 = new SelectBox($('#sb-location-2'), data, null, true); + let sb_loc_2 = new SelectBox($('#sb-location-3'), data, null, true); + + sb_loc_1.connectSelectedContainer(select_loc); + sb_loc_2.connectSelectedContainer(select_loc); + + sb_loc_main.setNearbySelectBox(sb_loc_1); + sb_loc_1.setNearbySelectBox(sb_loc_2, sb_loc_main); + sb_loc_2.setNearbySelectBox("", sb_loc_1); + //TODO: Временно прелоадер на самом тяжелом объекте + hidePreloader() + + } + + $.ajax({ + url: '/api/specializations_flat', + dataType: 'json', + data: {}, + success: createFilterSpecs + }); + + $.ajax({ + url: '/api/building_classifications', + dataType: 'json', + data: {}, + success: createFilterBuildingClass + }); + + $.ajax({ + url: '/api/construction_type', + dataType: 'json', + data: {}, + success: createFilterConstructionType + }); + + let data = []; + + function fullData(_data) { + data = data.concat(_data.results.length ? _data.results : []); + let url = _data.next; + if (url) { + $.ajax({ + url: url, + dataType: 'json', + data: {}, + success: fullData + }); + } else { + createFilerLocations(data); + } + return data; + } + + fullData({next: '/api/locations_flat', results: []}); + + function tuneCheckBoxes($boxes) { + $boxes.each(function () { + if ($(this).find("input").prop("checked")) $(this).toggleClass('checked') + }); + $boxes.on("click", function (e) { + $(e.target).toggleClass('checked'); + $(e.target).attr('data-state', $(e.target).attr('data-state') == 'enabled' ? 'disabled' : 'enabled') + let inside_checkBox = $(e.target).find("input"); + inside_checkBox.prop("checked", !inside_checkBox.prop("checked")); + + }); + } + + tuneCheckBoxes($('.custom-check')); + + // $(window).on('load', + function hidePreloader() { + var $preloader = $('#page-preloader'), + $spinner = $preloader.find('.spinner'); + $spinner.fadeOut(); + $preloader.delay(350).fadeOut('slow'); + } + + + // $("#myBtn").click(function () { + // $('
    ' + + // '' + + // 'modal info...' + + // '
    ').appendTo("#alerts"); + // }); + + +}); \ No newline at end of file diff --git a/common/serializers.py b/common/serializers.py index edc407e..39be952 100644 --- a/common/serializers.py +++ b/common/serializers.py @@ -21,6 +21,15 @@ class NestedLocationSerializer(ModelSerializer): ) +class NestedLocationSerializerFlat(ModelSerializer): + class Meta: + model = Location + + fields = ( + 'id', + ) + + class LocationSerializer(ModelSerializer): children = NestedLocationSerializer(many=True) parent = NestedLocationSerializer() @@ -41,6 +50,20 @@ class LocationSerializer(ModelSerializer): ) +class LocationSerializerFlat(ModelSerializer): + children = NestedLocationSerializerFlat(many=True) + parent = NestedLocationSerializerFlat() + + class Meta: + model = Location + + fields = ( + 'id', + 'name', + 'children', + 'parent') + + class ContentTypeSerializer(ModelSerializer): class Meta: model = ContentType diff --git a/google5a3cd420b0160075.html b/google5a3cd420b0160075.html new file mode 100644 index 0000000..255ae88 --- /dev/null +++ b/google5a3cd420b0160075.html @@ -0,0 +1 @@ +google-site-verification: google5a3cd420b0160075.html \ No newline at end of file diff --git a/projects/models.py b/projects/models.py index 6c9869a..d5ed112 100644 --- a/projects/models.py +++ b/projects/models.py @@ -83,6 +83,7 @@ class Realty(models.Model): class Project(models.Model, HitCountMixin): + # FIXME: костыль! WORK_TYPES = tuple([(x.pk, x.name) for x in Specialization.objects.filter(level=1)]) DEAL_TYPES = ( @@ -111,6 +112,7 @@ class Project(models.Model, HitCountMixin): term = models.IntegerField(default=0) term_type = models.CharField(max_length=20, choices=TERM_TYPES, default='hour') text = models.TextField(blank=True) + # FIXME: set deprecated http://djbook.ru/rel1.8/topics/migrations.html#considerations-when-removing-model-fields work_type = models.IntegerField(default=1, choices=WORK_TYPES) def __init__(self, *args, **kwargs): diff --git a/projects/serializers.py b/projects/serializers.py index 4106bb5..c14606c 100755 --- a/projects/serializers.py +++ b/projects/serializers.py @@ -48,6 +48,29 @@ class BuildingClassficationSerializer(ModelSerializer): ) +class NestedBuildingClassificationSerializerOnlyId(ModelSerializer): + class Meta: + model = BuildingClassfication + + fields = ( + 'id', + ) + + +class BuildingClassificationSerializeFlat(ModelSerializer): + children = NestedBuildingClassificationSerializerOnlyId(many=True) + parent = NestedBuildingClassificationSerializerOnlyId() + + class Meta: + model = BuildingClassfication + + fields = ( + 'id', + 'name', + 'children', + 'parent') + + class ConstructionTypeSerializer(ModelSerializer): class Meta: model = ConstructionType diff --git a/projects/templates/project_filter.html b/projects/templates/project_filter.html index 1f3b9d5..ca7b083 100644 --- a/projects/templates/project_filter.html +++ b/projects/templates/project_filter.html @@ -1,184 +1,173 @@ {% extends 'partials/base.html' %} - -{% load common_tags i18n %} - +{% load staticfiles %} +{% block head_css %} + + + +{% endblock %} {% block content %} - {% include 'partials/header.html' %} - -
    -
    -
    -

    Поиск заказов

    -
    - -
    -
    -
    -
    - - -
    -
    {% trans 'project_stage0' %}
    -
    -
    -
    - {{ form.work_type }} -
    + {% include 'partials/header.html' %} +
    +
    +
    +
    +

    Поиск заказов

    - - -
    -
    - -
    -
    -
    {% trans 'project_stage1' %} {{ form.specialization.errors.as_text }}
    - -
    -
    -
    {% trans 'project_stage2' %}
    - -
    -
    -
    {% trans 'project_stage3' %}
    - -
    -
    -
    {% trans 'project_stage4' %}
    - -
    - - -
    - - - - - -
    -
    -

    Расширенные поля

    - -
    -
    -
    -
    -
    - - -
    -
    -
    Классификация здания
    -
    Вид строительства
    -
    -
    - -
    -
    - {{ realty_form.building_classification }} -
    - -
    - {{ realty_form.construction_type }} -
    -
    -
    - - -
    -
    -
    Местоположение
    -
    - -
    -
    - -
    - -
    - -
    - -
    - -
    - - -
    - -
    +
    - -

    Требуется допуск (СРО)

    -
    -
    -
    -
    -
    - - -
    -

    {{ display_msg }}

    -
    -

    Сортировать по:

    - - {% for val, text in form.order_by.field.choices %} - - {% endfor %} - - - -
    -
    - - - -
    - {% for project in projects %} -
    -
    -

    - {{ project.name }} -

    - - {% if project.realty and project.realty.name %} - - {% endif %} - -

    {{ project.text|linebreaksbr|truncatechars:300 }}

    - - {% if TEMPLATE_DEBUG %} -
    Specialization: {{ project.specialization }}

    Realty location: {{ project.realty.location }}

    Build. classif.: {{ project.realty.building_classification }}
    - {% endif %} - -
      -
    • {{ project.created }}
    • -
    • {{ project.hit_count.hits }}
    • -
    • {{ project.answers.count }}
    • - - {% if request.user.is_authenticated %} -
    • {{ project.customer.username }}
    • - {% endif %} -
    -
    -
    -

    - {{ project.budget }} -

    - -
      - {% if project.secure_deal %} -
    • Безопасная сделка
    • - {% endif %} - -
    • - {{ project.specialization.name }} -
    • -
    -
    -
    - {% endfor %} -
    - - -
    - {% include 'partials/pagination.html' %} -
    - + {% endif %} + +
      +
    • {{ project.created }}
    • +
    • {{ project.hit_count.hits }}
    • +
    • {{ project.answers.count }}
    • + + {% if request.user.is_authenticated %} +
    • {{ project.customer.username }}
    • + {% endif %} +
    +
    +
    +

    + {{ project.budget }} +

    + +
      + {% if project.secure_deal %} +
    • Безопасная сделка
    • + {% endif %} + +
    • + {{ project.specialization.name }} +
    • +
    +
    +
    + {% endfor %} +
    + + +
    + {% include 'partials/pagination.html' %} +
    + + + {% include 'partials/footer.html' %} +
    + - {% include 'partials/footer.html' %} +
    - {% endblock %} +{% block js_block %} + {{ block.super }} + {# #} + + + + + + + + +{% endblock %} \ No newline at end of file diff --git a/projects/views.py b/projects/views.py index 586abc0..9f7d88e 100644 --- a/projects/views.py +++ b/projects/views.py @@ -2,7 +2,7 @@ import json from pprint import pformat import natsort -import pydash as _; +import pydash as _ from django.conf import settings from django.contrib import messages from django.contrib.auth.mixins import LoginRequiredMixin @@ -13,12 +13,10 @@ from django.core.urlresolvers import reverse, reverse_lazy from django.db.models import Q from django.http import HttpResponseForbidden, JsonResponse, HttpResponseRedirect, HttpResponse, Http404 from django.shortcuts import render, get_object_or_404, redirect -from django.views.generic import DetailView, CreateView, DeleteView, View, UpdateView +from django.views.generic import DetailView, CreateView, DeleteView, View, UpdateView, TemplateView from hitcount.models import HitCount from hitcount.views import HitCountMixin -_.map = _.map_; -_.filter = _.filter_ import re from archilance import util @@ -33,6 +31,7 @@ from .models import ( AnswerFile, AnswerMessage, Arbitration, + BuildingClassfication, Candidate, Order, Portfolio, @@ -58,6 +57,12 @@ from .forms import ( RealtyForm, ) +from specializations.models import Specialization +from common.models import Location + +_.map = _.map_ +_.filter = _.filter_ + class ProjectDetailWithAnswerView(BaseMixin, View): form_class = ProjectAnswerForm @@ -268,103 +273,88 @@ class RestoreProjectAnswerView(NoCsrfMixin, LoginRequiredMixin, BaseMixin, View) return redirect(redirect_to) +def build_query(id_str, _class, *args): + query = Q() + id_list = tuple(filter(None, re.split(r'\s|,|;', id_str))) + for id in id_list: + obj = _class.objects.get(id=id) + kwargs = dict(zip(args, (obj.lft, obj.rght))) + query |= Q(**kwargs) + + return query + + class ProjectFilterView(BaseMixin, View): template_name = 'project_filter.html' form_class = ProjectFilterForm - realty_form = ProjectFilterRealtyForm def get(self, request, *args, **kwargs): - form = self.form_class(request.GET, request=request) - realty_form = self.realty_form(request.GET, request=request, prefix='realty_form') context = self.get_context_data(**_.merge({}, request.GET, kwargs)) + form = self.form_class(request.GET, request=request) projects = Project.objects.filter(state='active') + specialization = request.GET.get('specialization') + keywords = request.GET.get('keywords') + building_classification = request.GET.get('building_classification') + construction_type = request.GET.get('construction_type') + location = request.GET.get('location') + cro = request.GET.get('cro') + order_by = request.GET.get('order_by') + last_order_by = request.GET.get('last_order_by') + reverse_order = request.GET.get('reverse_order') + ord = None manual_sort = None - if form.is_valid() and realty_form.is_valid(): - ord = None - - keywords = form.cleaned_data.get('keywords') - cro = form.cleaned_data.get('cro') - work_type = form.cleaned_data.get('work_type') - specialization = form.cleaned_data.get('specialization') - realty = form.cleaned_data.get('realty') - - building_classification = realty_form.cleaned_data.get('building_classification') - construction_type = realty_form.cleaned_data.get('construction_type') - location = realty_form.cleaned_data.get('location') - - if keywords: - keywords = tuple(filter(None, re.split(r'\s|,|;', keywords))) - - for k in keywords: - projects = projects.filter(Q(name__icontains=k.lower()) | Q(text__icontains=k.lower())) - - if cro: - projects = projects.filter(cro=cro) - - if work_type: - projects = projects.filter(work_type=work_type) - - if specialization: - projects = projects.filter( - specialization__lft__gte=specialization.lft, - specialization__rght__lte=specialization.rght, - ) - - if building_classification: - projects = projects.filter(realty__building_classification=building_classification) - - if construction_type: - projects = projects.filter(realty__construction_type=construction_type) + if keywords: + keywords = tuple(filter(None, re.split(r'\s|,|;', keywords))) + + for k in keywords: + projects = projects.filter(Q(name__icontains=k.lower()) | Q(text__icontains=k.lower())) + + if specialization: + query = build_query(specialization, Specialization, + 'specialization__lft__gte', 'specialization__rght__lte') + projects = projects.filter(query) + + if building_classification: + query = build_query(building_classification, BuildingClassfication, + 'realty__building_classification__lft__gte', + 'realty__building_classification__rght__lte') + projects = projects.filter(query) + + if construction_type: + projects = projects.filter(realty__construction_type__in= + tuple(filter(None, re.split(r'\s|,|;', construction_type)))) + if location: + query = build_query(location, Location, + 'realty__location__lft__gte', + 'realty__location__rght__lte') + projects = projects.filter(query) + + if cro: + projects = projects.filter(cro=True) + + # ORDERS + if order_by: + reverse_order = not reverse_order if order_by == last_order_by else False + ord = order_by + last_order_by = ord + elif last_order_by: + ord = last_order_by + + if ord and ord == 'views': + projects = natsort.natsorted(projects.all(), key=lambda p: p.hit_count.hits, reverse=reverse_order) + manual_sort = True + elif ord: + projects = projects.order_by('-%s' % ord if reverse_order else ord) - if location: - projects = projects.filter( - realty__location__lft__gte=location.lft, - realty__location__rght__lte=location.rght, - ) - - if realty: - projects = projects.filter(realty=realty) - - order_by = form.cleaned_data.get('order_by') - last_order_by = form.cleaned_data.get('last_order_by') - reverse_order = form.cleaned_data.get('reverse_order') - - if order_by: - reverse_order = not reverse_order if order_by == last_order_by else False - ord = order_by - last_order_by = ord - elif last_order_by: - ord = last_order_by - - if ord and ord == 'views': - projects = natsort.natsorted(projects.all(), key=lambda p: p.hit_count.hits, reverse=reverse_order) - manual_sort = True - elif ord: - projects = projects.order_by('-%s' % ord if reverse_order else ord) - - context.update({ - 'last_order_by': last_order_by, - 'reverse_order': reverse_order, - }) - - project_count = len(projects) if manual_sort else projects.count() - display_msg = 'Найдено %s проектов' % project_count if project_count > 0 else 'Ничего не найдено' - else: - display_msg = 'Пожалуйста, введите корректные данные' - - if form.errors: - messages.info(request, ( - '

    Произошла ошибка (form)

    ' - '
    {form}
    ' - ).format(form=pformat(form.errors))) + context.update({ + 'last_order_by': last_order_by, + 'reverse_order': reverse_order, + }) - if realty_form and realty_form.errors: - messages.info(request, ( - '

    Произошла ошибка (realty_form)

    ' - '
    {realty_form}
    ' - ).format(realty_form=pformat(realty_form.errors))) + project_count = len(projects) + display_msg = 'Найдено %s проектов' % project_count if project_count > 0 else 'Ничего не найдено' paginator = Paginator(projects if manual_sort else projects.all(), settings.PAGE_SIZE) page = request.GET.get('page') @@ -378,10 +368,10 @@ class ProjectFilterView(BaseMixin, View): context.update({ 'form': form, - 'realty_form': realty_form, + # 'realty_form': realty_form, 'projects': projects, 'is_paginated': True, - 'page_obj': projects, + # 'page_obj': projects, 'display_msg': display_msg, }) diff --git a/robots/robots.txt b/robots/robots.txt old mode 100644 new mode 100755 index 28cbe7f..1ef0174 --- a/robots/robots.txt +++ b/robots/robots.txt @@ -1,8 +1,8 @@ User-agent: Yandex Allow: /$ Disallow: / +Host: https://proekton.com -Host: proekton.com User-agent: * Allow: /$ Disallow: / \ No newline at end of file diff --git a/specializations/serializers.py b/specializations/serializers.py index a615eb9..8026e9d 100755 --- a/specializations/serializers.py +++ b/specializations/serializers.py @@ -39,3 +39,26 @@ class SpecializationSerializer(ModelSerializer): 'rght', 'tree_id', ) + + +class NestedSpecializationSerializerOnlyId(ModelSerializer): + class Meta: + model = Specialization + + fields = ( + 'id', + ) + + +class SpecializationSerializerFlat(ModelSerializer): + children = NestedSpecializationSerializerOnlyId(many=True) + parent = NestedSpecializationSerializerOnlyId() + + class Meta: + model = Specialization + + fields = ( + 'id', + 'name', + 'children', + 'parent') diff --git a/templates/partials/base.html b/templates/partials/base.html index 5a036e3..9f0382a 100644 --- a/templates/partials/base.html +++ b/templates/partials/base.html @@ -22,11 +22,11 @@ - - {% block head_css %}{% endblock %} - + {% block head_css %} + + {% endblock %} {% if TEMPLATE_DEBUG %} {% endif %} @@ -40,6 +40,7 @@ {# {% endcompress %}#} + diff --git a/wmail_e27d8c2662ff63f11978e0e73616f2fc.html b/wmail_e27d8c2662ff63f11978e0e73616f2fc.html new file mode 100644 index 0000000..c5ee363 --- /dev/null +++ b/wmail_e27d8c2662ff63f11978e0e73616f2fc.html @@ -0,0 +1,6 @@ + + + + +Verification: e27d8c2662ff63f11978e0e73616f2fc + \ No newline at end of file diff --git a/yandex_58d23691715ef942.html b/yandex_58d23691715ef942.html new file mode 100644 index 0000000..21350b4 --- /dev/null +++ b/yandex_58d23691715ef942.html @@ -0,0 +1,6 @@ + + + + + Verification: 58d23691715ef942 + \ No newline at end of file