Merge branch 'develop' of git.general-servers.com:expomap/expomap into develop

remotes/origin/1203
Ivan_Home_PC 11 years ago
commit 36caf23343
  1. 2
      article/models.py
  2. 3
      conference/forms.py
  3. 6
      exposition/forms.py
  4. 6
      functions/custom_views.py
  5. 18
      specialist_catalog/urls.py
  6. 23
      specialist_catalog/views.py
  7. 1
      static/client
  8. 1
      static/client
  9. 49
      templates/client/article/article.html
  10. 2
      templates/client/includes/article/news_on_main_logo.html
  11. 12
      templates/client/includes/conference/conference_list.html
  12. 23
      templates/client/includes/conference/conference_object.html
  13. 15
      templates/client/includes/exposition/exposition_list.html
  14. 26
      templates/client/includes/exposition/exposition_object.html
  15. 1
      templates/client/static_client/css/main.css
  16. 2625
      templates/client/static_client/css/vendor.css
  17. 4
      templates/client/static_client/css_min/vendor.min.css
  18. BIN
      templates/client/static_client/img/exporating_logo.png
  19. BIN
      templates/client/static_client/img/rsva.jpg
  20. 10
      templates/client/static_client/js/_modules/block.common.js
  21. 1
      templates/client/static_client/js/_modules/page.exposition.object.js
  22. 87
      templates/client/static_client/js/banners.js
  23. 268
      templates/client/static_client/js/vendor.js
  24. 2
      templates/client/static_client/js_min/_modules/block.common.min.js
  25. 2
      templates/client/static_client/js_min/_modules/block.newsFilter.min.js
  26. 2
      templates/client/static_client/js_min/_modules/block.search.min.js
  27. 2
      templates/client/static_client/js_min/_modules/page.company.min.js
  28. 2
      templates/client/static_client/js_min/_modules/page.events.feed.min.js
  29. 2
      templates/client/static_client/js_min/_modules/page.exposition.object.min.js
  30. 2
      templates/client/static_client/js_min/_modules/page.place.object.min.js
  31. 2
      templates/client/static_client/js_min/_modules/page.profile.min.js
  32. 14
      templates/client/static_client/js_min/vendor.min.js

@ -45,7 +45,7 @@ class ArticleManager(TranslationManager):
if cached_news: if cached_news:
return cached_news return cached_news
else: else:
news = list(self.news().filter(publish_date__isnull=False).order_by('-main_page', '-publish_date')[:3]) news = list(self.news().filter(publish_date__isnull=False).order_by('-main_page', '-publish_date', '-modified')[:3])
cache.set(key, news, self.cache_time) cache.set(key, news, self.cache_time)
return news return news

@ -132,7 +132,8 @@ class ConferenceCreateForm(forms.Form):
else: else:
conference = obj conference = obj
conference.theme.clear() conference.theme.clear()
conference.tag.clear() if data.get('tag'):
conference.tag.clear()
#simple fields #simple fields
if not getattr(conference, 'url'): if not getattr(conference, 'url'):

@ -161,9 +161,11 @@ class ExpositionCreateForm(forms.Form):
else: else:
exposition = obj exposition = obj
exposition.theme.clear() exposition.theme.clear()
exposition.tag.clear()
exposition.organiser.clear() exposition.organiser.clear()
#exposition.company.clear() if data.get('tag'):
exposition.tag.clear()
#simple fields #simple fields
if not getattr(exposition, 'url'): if not getattr(exposition, 'url'):

@ -20,8 +20,11 @@ import random
from django.views.generic import ListView as OldListView from django.views.generic import ListView as OldListView
class ListView(OldListView): class ListView(OldListView):
""" """
Default Django generic ListView with few overrided methods for redirecting
onto first page of pagination in case of entering big page number(for search engines)
List of modules, where overrided ListView is used: List of modules, where overrided ListView is used:
- accounts.views - accounts.views
- article.views - article.views
@ -60,7 +63,8 @@ class ListView(OldListView):
def get(self, request, *args, **kwargs): def get(self, request, *args, **kwargs):
response = super(ListView, self).get(request, *args, **kwargs) response = super(ListView, self).get(request, *args, **kwargs)
if self.kwargs.get("home"): if self.kwargs.get("home"):
return HttpResponseRedirect("/") path = self.request.path
return HttpResponseRedirect(path[:path.find('page')])
else: else:
return response return response

@ -1,11 +1,19 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from django.conf.urls import url, patterns from django.conf.urls import url, patterns
from .views import CatalogDetailedView, SpecCatalog from .views import CatalogDetailedView, SpecCatalog, redirect_old
urlpatterns = patterns('', urlpatterns = patterns('',
url(r'^city/$', SpecCatalog.as_view(), {'type': 'city'}, name="spec_city"), url(r'^city/(?P<city>.*)/all/page/(?P<page>\d+)/$', redirect_old, {'type': 'city'}),
url(r'^country/$', SpecCatalog.as_view(), {'type': 'country'}, name="spec_country"), url(r'^city/(?P<city>.*)/all/$', redirect_old, {'type': 'city'}),
url(r'^city/$', SpecCatalog.as_view(), {'type': 'city', 'meta_id': 86}, name="spec_city"),
url(r'^city/(?P<slug>.*)/$', CatalogDetailedView.as_view(), {'type': 'city', 'meta_id': 88}, name="spec_catalog_city"),
url(r'^city/(?P<slug>.*)/$', CatalogDetailedView.as_view(), {'type': 'city'}, name="spec_catalog_city"), url(r'^country/(?P<country>.*)/all/page/(?P<page>\d+)/$', redirect_old),
url(r'^country/(?P<slug>.*)/$', CatalogDetailedView.as_view(), {'type': 'country'}, name="spec_catalog_country"), url(r'^country/(?P<country>.*)/all/$', redirect_old),
url(r'^country/$', SpecCatalog.as_view(), {'type': 'country', 'meta_id': 86}, name="spec_country"),
url(r'^country/(?P<slug>.*)/$', CatalogDetailedView.as_view(), {'type': 'country', 'meta_id': 87}, name="spec_catalog_country"),
url(r'^(?P<slug>.*)/$', redirect_old),
url(r'^page/(?P<page>\d+)/$', redirect_old),
url(r'^$', redirect_old),
) )

@ -3,12 +3,13 @@ from django.views.generic import CreateView, UpdateView, DeleteView, FormView,
from functions.custom_views import ListView from functions.custom_views import ListView
from django.views.generic.detail import SingleObjectMixin from django.views.generic.detail import SingleObjectMixin
from django.utils.translation import ugettext as _ from django.utils.translation import ugettext as _
from meta.views import MetadataMixin
from .forms import * from .forms import *
from django.core.urlresolvers import reverse_lazy from django.core.urlresolvers import reverse_lazy
from django.conf import settings from django.conf import settings
from django.shortcuts import get_object_or_404 from django.shortcuts import get_object_or_404
from service.order_forms import TranslationForm from service.order_forms import TranslationForm
from django.http import HttpResponseRedirect, Http404 from django.http import HttpResponseRedirect, Http404, HttpResponsePermanentRedirect
from .models import _city, _country from .models import _city, _country
@ -147,7 +148,7 @@ class FeedbackDeleteView(DeleteView):
# ========= CLIENT VIEWS ============ # ========= CLIENT VIEWS ============
class CatalogDetailedView(SingleObjectMixin, FormView): class CatalogDetailedView(MetadataMixin, SingleObjectMixin, FormView):
model = SpecialistCatalog model = SpecialistCatalog
form_class = TranslationForm form_class = TranslationForm
template_name = "client/specialist_catalog/catalog_detailed.html" template_name = "client/specialist_catalog/catalog_detailed.html"
@ -156,12 +157,16 @@ class CatalogDetailedView(SingleObjectMixin, FormView):
def get_catalog_obj(self): def get_catalog_obj(self):
if self.kwargs.get('type') is "country": if self.kwargs.get('type') is "country":
try: try:
return self.model.objects.language().get(type=1, country__url=self.kwargs.get('slug')) spec_catalog = self.model.objects.language().get(type=1, country__url=self.kwargs.get('slug'))
self.kwargs['country'] = spec_catalog.country
return spec_catalog
except self.model.DoesNotExist: except self.model.DoesNotExist:
raise Http404 raise Http404
else: else:
try: try:
return self.model.objects.language().get(type=2, city__url=self.kwargs.get('slug')) spec_catalog = self.model.objects.language().get(type=2, city__url=self.kwargs.get('slug'))
self.kwargs['city'] = spec_catalog.city
return spec_catalog
except self.model.DoesNotExist: except self.model.DoesNotExist:
raise Http404 raise Http404
@ -189,7 +194,7 @@ class CatalogDetailedView(SingleObjectMixin, FormView):
init['city'] = obj.city.name init['city'] = obj.city.name
return init return init
class SpecCatalog(ListView): class SpecCatalog(MetadataMixin, ListView):
model = SpecialistCatalog model = SpecialistCatalog
template_name = 'client/specialist_catalog/catalog.html' template_name = 'client/specialist_catalog/catalog.html'
@ -215,3 +220,11 @@ class SpecCatalog(ListView):
else: else:
context['title'] = _(u'Переводчики по городам') context['title'] = _(u'Переводчики по городам')
return context return context
def redirect_old(request, *args, **kwargs):
if not kwargs.get('type'):
return HttpResponsePermanentRedirect('/translators/country/')
else:
return HttpResponsePermanentRedirect('/translators/city/')

@ -1 +0,0 @@
/home/www/proj/templates/client/static_client

@ -0,0 +1 @@
/home/www/proj/templates/client/static_client

@ -23,34 +23,35 @@
{% if request.user.is_admin %} {% if request.user.is_admin %}
<a target="_blank" class="button green " href="/admin/article/blog/{{ object.slug }}/">{% trans 'изменить' %}</a> <a target="_blank" class="button green " href="/admin/article/blog/{{ object.slug }}/">{% trans 'изменить' %}</a>
{% endif %} {% endif %}
<p style="text-align: justify" align="justify">&nbsp;</p><hr> <p style="text-align: justify" align="justify">&nbsp;</p>
<div class="content-text"> </div>
{{ object.description|safe }} <div class="content-text">
</div> {{ object.description|safe }}
</div>
<div class="blog_avtor">
<table>
<tr>
<th>{% trans 'Автор' %}:</th>
<td><a href="{{ object.author.get_permanent_url }}" title="">{% include 'includes/show_logo.html' with obj=object.author %}</a></td>
<td>
<h3><a href="{{ object.author.get_permanent_url }}" title="">{{ object.author.get_full_name }}</a></h3>
{% if object.author.profile.fb %}
<a href="{{ object.author.profile.fb }}" title="" class="facebook">{{ object.author.get_full_name }}</a>
{% endif %}
</td>
</tr>
</table>
{% if object.tag.all.exists %}
<div class="blog_avtor_right">
{% include 'includes/article_tags.html' with obj=object %}
</div>
{% endif %}
<div class="clear"></div> <div class="blog_avtor">
<table>
<tr>
<th>{% trans 'Автор' %}:</th>
<td><a href="{{ object.author.get_permanent_url }}" title="">{% include 'includes/show_logo.html' with obj=object.author %}</a></td>
<td>
<h3><a href="{{ object.author.get_permanent_url }}" title="">{{ object.author.get_full_name }}</a></h3>
{% if object.author.profile.fb %}
<a href="{{ object.author.profile.fb }}" title="" class="facebook">{{ object.author.get_full_name }}</a>
{% endif %}
</td>
</tr>
</table>
{% if object.tag.all.exists %}
<div class="blog_avtor_right">
{% include 'includes/article_tags.html' with obj=object %}
</div> </div>
{% endif %}
<div class="clear"></div>
</div> </div>
</div> </div>
{% with blogs=object.similars %} {% with blogs=object.similars %}
{% if blogs %} {% if blogs %}

@ -2,7 +2,7 @@
{% load thumbnail %} {% load thumbnail %}
{% if obj.logo %} {% if obj.logo %}
{% thumbnail obj.logo "80x80" format="PNG" as im %} {% thumbnail obj.logo "70x70" format="PNG" as im %}
<img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" class="pic" alt=""> <img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}" class="pic" alt="">
{% endthumbnail %} {% endthumbnail %}
{% else %} {% else %}

@ -24,9 +24,19 @@
</a> </a>
<div class="cli-info"> <div class="cli-info">
<div class="cli-top clearfix"> <div class="cli-top clearfix">
{% if obj.quality_label.rsva.is_set %}
<div class="cli-approved">
<img width="52" height="42" src="{% static 'client/img/rsva.jpg' %}" alt="" title="Approved Event" />
</div>
{% endif %}
{% if obj.quality_label.exporating.is_set %}
<div class="cli-approved">
<img width="52" height="42" src="{% static 'client/img/exporating_logo.png' %}" alt="" title="Approved Event" />
</div>
{% endif %}
{% if obj.quality_label.ufi.is_set %} {% if obj.quality_label.ufi.is_set %}
<div class="cli-approved"> <div class="cli-approved">
<img src="{% static 'client/img/approved-logo.png' %}" alt="" title="Approved Event" /> <img width="52" height="42" src="{% static 'client/img/approved-logo.png' %}" alt="" title="Approved Event" />
</div> </div>
{% endif %} {% endif %}
<header> <header>

@ -9,6 +9,9 @@
{% if event.expohit %} {% if event.expohit %}
<div class="hit"></div> <div class="hit"></div>
{% endif %} {% endif %}
{% if event.canceled %}
<div class="cancel"></div>
{% endif %}
<div class="i-pict"> <div class="i-pict">
{% with obj=event %} {% with obj=event %}
{% include 'client/includes/show_logo.html' %} {% include 'client/includes/show_logo.html' %}
@ -300,11 +303,21 @@
</a> </a>
<div class="cli-info"> <div class="cli-info">
<div class="cli-top clearfix"> <div class="cli-top clearfix">
{% if exp.approved %} {% if exp.quality_label.rsva.is_set %}
<div class="cli-approved"> <div class="cli-approved">
<img src="{% static 'client/img/approved-logo.png' %}" alt="" title="Approved Event" /> <img width="52" height="42" src="{% static 'client/img/rsva.jpg' %}" alt="" title="Approved Event" />
</div> </div>
{% endif %} {% endif %}
{% if exp.quality_label.exporating.is_set %}
<div class="cli-approved">
<img width="52" height="42" src="{% static 'client/img/exporating_logo.png' %}" alt="" title="Approved Event" />
</div>
{% endif %}
{% if exp.quality_label.ufi.is_set %}
<div class="cli-approved">
<img width="52" height="42" src="{% static 'client/img/approved-logo.png' %}" alt="" title="Approved Event" />
</div>
{% endif %}
<header> <header>
<div class="cli-title"><a href="{{ exp.get_permanent_url }}">{{ exp.name|safe }}</a></div> <div class="cli-title"><a href="{{ exp.get_permanent_url }}">{{ exp.name|safe }}</a></div>
</header> </header>

@ -31,11 +31,22 @@
{% endif %} {% endif %}
<div class="cli-info"> <div class="cli-info">
<div class="cli-top clearfix"> <div class="cli-top clearfix">
{% if obj.quality_label.ufi.is_set %} {% if obj.quality_label.rsva.is_set %}
<div class="cli-approved"> <div class="cli-approved">
<img src="{% static 'client/img/approved-logo.png' %}" alt="" title="Approved Event" /> <img width="52" height="42" src="{% static 'client/img/rsva.jpg' %}" alt="" title="Approved Event" />
</div> </div>
{% endif %} {% endif %}
{% if obj.quality_label.exporating.is_set %}
<div class="cli-approved">
<img width="52" height="42" src="{% static 'client/img/exporating_logo.png' %}" alt="" title="Approved Event" />
</div>
{% endif %}
{% if obj.quality_label.ufi.is_set %}
<div class="cli-approved">
<img width="52" height="42" src="{% static 'client/img/approved-logo.png' %}" alt="" title="Approved Event" />
</div>
{% endif %}
<header> <header>
<div class="cli-title"><a href="{% if not obj.paid_new_id %}{{ obj.get_permanent_url }}{% else %}{{ obj.get_paid_catalog_url }}{% endif %}">{{ obj.name|safe }}</a></div> <div class="cli-title"><a href="{% if not obj.paid_new_id %}{{ obj.get_permanent_url }}{% else %}{{ obj.get_paid_catalog_url }}{% endif %}">{{ obj.name|safe }}</a></div>
</header> </header>

@ -9,6 +9,11 @@
{% if exposition.expohit %} {% if exposition.expohit %}
<div class="hit"></div> <div class="hit"></div>
{% endif %} {% endif %}
{% if exposition.canceled %}
<div class="cancel"></div>
{% endif %}
<div class="i-pict"> <div class="i-pict">
{% with obj=exposition %} {% with obj=exposition %}
{% include 'client/includes/show_logo.html' %} {% include 'client/includes/show_logo.html' %}
@ -30,6 +35,7 @@
</div> </div>
</aside> </aside>
<div class="i-info"> <div class="i-info">
<header> <header>
<div class="i-title"> <div class="i-title">
{% if exposition.main_title %} {% if exposition.main_title %}
@ -324,11 +330,21 @@
</a> </a>
<div class="cli-info"> <div class="cli-info">
<div class="cli-top clearfix"> <div class="cli-top clearfix">
{% if exp.approved %} {% if exp.quality_label.rsva.is_set %}
<div class="cli-approved"> <div class="cli-approved">
<img src="{% static 'client/img/approved-logo.png' %}" alt="" title="Approved Event" /> <img width="52" height="42" src="{% static 'client/img/rsva.jpg' %}" alt="" title="Approved Event" />
</div> </div>
{% endif %} {% endif %}
{% if exp.quality_label.exporating.is_set %}
<div class="cli-approved">
<img width="52" height="42" src="{% static 'client/img/exporating_logo.png' %}" alt="" title="Approved Event" />
</div>
{% endif %}
{% if exp.quality_label.ufi.is_set %}
<div class="cli-approved">
<img width="52" height="42" src="{% static 'client/img/approved-logo.png' %}" alt="" title="Approved Event" />
</div>
{% endif %}
<header> <header>
<div class="cli-title"><a href="{{ exp.get_permanent_url }}">{{ exp.name|safe }}</a></div> <div class="cli-title"><a href="{{ exp.get_permanent_url }}">{{ exp.name|safe }}</a></div>
</header> </header>

@ -4979,6 +4979,7 @@ form.s-message {
-webkit-transition: opacity .3s; -webkit-transition: opacity .3s;
-o-transition: opacity .3s; -o-transition: opacity .3s;
transition: opacity .3s; transition: opacity .3s;
margin-right: 10px;
} }
.cat-list li.cl-item:hover .cli-approved, .cat-list li.cl-item:hover .cli-approved,

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

@ -179,12 +179,20 @@ if (EXPO.common){
e.preventDefault(); e.preventDefault();
var $form = $(this), var $form = $(this),
url = $form.attr('action'), url = $form.attr('action'),
id = $form.attr('id'),
formData = $(this).serialize(), formData = $(this).serialize(),
method = $form.attr("method"), method = $form.attr("method"),
callback = function (data) { callback = function (data) {
if (data.success){ if (data.success){
if (id == "advertise-form"){
dataLayer.push({'event': 'advertisingform'});
}
if (id == "callback-form"){
dataLayer.push({'event': 'callbackform'});
}
$.fancybox.close(); $.fancybox.close();
$(".error", $form).remove(); $(".error", $form).remove();
$(".required.err", $form).removeClass("required err"); $(".required.err", $form).removeClass("required err");
$("input:text", $form).val(''); $("input:text", $form).val('');
@ -223,7 +231,7 @@ if (EXPO.common){
callback = function (data) { callback = function (data) {
if (data.success){ if (data.success){
dataLayer.push({'event': 'regform'});
$(".error", $form).remove(); $(".error", $form).remove();
$(".required.err", $form).removeClass("required err"); $(".required.err", $form).removeClass("required err");

@ -134,6 +134,7 @@ if (EXPO.exposition.object){
}else{ }else{
clearValue(); clearValue();
dataLayer.push({'event': 'advmemberform'});
$('input:text',$form).val(''); $('input:text',$form).val('');
$.fancybox.close(); $.fancybox.close();

@ -1,87 +0,0 @@
(function () {
"use strict";
var API_URL_ROOT = "/expo-b/get-banners/";
var getUrl = function () {
var data = window.sendData;
if (data instanceof Object) {
var search = [];
for (var key in data) {
if (data.hasOwnProperty(key)) {
var value = data[key];
if (value instanceof Array) {
for (var i = 0, l = value.length; i < l; i++) {
search.push(encodeURIComponent(key) + "=" + encodeURIComponent(value[i]));
}
} else {
search.push(encodeURIComponent(key) + "=" + encodeURIComponent(value));
}
}
}
if (search.length) {
return API_URL_ROOT + "?" + search.join("&");
}
}
return API_URL_ROOT;
};
var getBanners = function (url, callback) {
var xhr = new XMLHttpRequest();
xhr.open("GET", url, true);
xhr.onreadystatechange = function (event) {
if (event.target.readyState === 4) {
if (event.target.status === 200) {
try {
callback(JSON.parse(event.target.responseText));
} catch (error) {
// do nothing
}
}
}
};
xhr.send();
};
var addBanner = function (banner) {
var parent = document.getElementById(banner.id);
if (parent) {
if (banner.is_img) {
var a = document.createElement("a");
a.href = banner.url;
var img = document.createElement("img");
img.src = banner.img;
img.alt = banner.alt;
a.appendChild(img);
parent.appendChild(a);
} else if (banner.is_html) {
parent.innerHTML = banner.text;
}
}
};
var insertBanners = function (data) {
if (data instanceof Array) {
for (var i = 0, l = data.length; i < l; i++) {
addBanner(data[i]);
}
}
};
var main = function () {
getBanners(getUrl(), insertBanners);
};
window.addEventListener("load", main);
})();

@ -3407,7 +3407,7 @@ function placeInput(width){
mode:'horizontal', mode:'horizontal',
loop: false, loop: false,
simulateTouch: false, simulateTouch: false,
autoplay:6200, autoplay:4200,
onInit: function () { onInit: function () {
$recPrev.addClass('disabled'); $recPrev.addClass('disabled');
}, },
@ -4431,137 +4431,137 @@ $(document).ready(function () {
}); });
var Base64 = { var Base64 = {
// private property // private property
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", _keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
// public method for encoding // public method for encoding
encode : function (input) { encode : function (input) {
var output = ""; var output = "";
var chr1, chr2, chr3, enc1, enc2, enc3, enc4; var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
var i = 0; var i = 0;
input = Base64._utf8_encode(input); input = Base64._utf8_encode(input);
while (i < input.length) { while (i < input.length) {
chr1 = input.charCodeAt(i++); chr1 = input.charCodeAt(i++);
chr2 = input.charCodeAt(i++); chr2 = input.charCodeAt(i++);
chr3 = input.charCodeAt(i++); chr3 = input.charCodeAt(i++);
enc1 = chr1 >> 2; enc1 = chr1 >> 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
enc4 = chr3 & 63; enc4 = chr3 & 63;
if (isNaN(chr2)) { if (isNaN(chr2)) {
enc3 = enc4 = 64; enc3 = enc4 = 64;
} else if (isNaN(chr3)) { } else if (isNaN(chr3)) {
enc4 = 64; enc4 = 64;
} }
output = output + output = output +
this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4); this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
} }
return output; return output;
}, },
// public method for decoding // public method for decoding
decode : function (input) { decode : function (input) {
var output = ""; var output = "";
var chr1, chr2, chr3; var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4; var enc1, enc2, enc3, enc4;
var i = 0; var i = 0;
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
while (i < input.length) { while (i < input.length) {
enc1 = this._keyStr.indexOf(input.charAt(i++)); enc1 = this._keyStr.indexOf(input.charAt(i++));
enc2 = this._keyStr.indexOf(input.charAt(i++)); enc2 = this._keyStr.indexOf(input.charAt(i++));
enc3 = this._keyStr.indexOf(input.charAt(i++)); enc3 = this._keyStr.indexOf(input.charAt(i++));
enc4 = this._keyStr.indexOf(input.charAt(i++)); enc4 = this._keyStr.indexOf(input.charAt(i++));
chr1 = (enc1 << 2) | (enc2 >> 4); chr1 = (enc1 << 2) | (enc2 >> 4);
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
chr3 = ((enc3 & 3) << 6) | enc4; chr3 = ((enc3 & 3) << 6) | enc4;
output = output + String.fromCharCode(chr1); output = output + String.fromCharCode(chr1);
if (enc3 != 64) { if (enc3 != 64) {
output = output + String.fromCharCode(chr2); output = output + String.fromCharCode(chr2);
} }
if (enc4 != 64) { if (enc4 != 64) {
output = output + String.fromCharCode(chr3); output = output + String.fromCharCode(chr3);
} }
} }
output = Base64._utf8_decode(output); output = Base64._utf8_decode(output);
return output; return output;
}, },
// private method for UTF-8 encoding // private method for UTF-8 encoding
_utf8_encode : function (string) { _utf8_encode : function (string) {
string = string.replace(/\r\n/g,"\n"); string = string.replace(/\r\n/g,"\n");
var utftext = ""; var utftext = "";
for (var n = 0; n < string.length; n++) { for (var n = 0; n < string.length; n++) {
var c = string.charCodeAt(n); var c = string.charCodeAt(n);
if (c < 128) { if (c < 128) {
utftext += String.fromCharCode(c); utftext += String.fromCharCode(c);
} }
else if((c > 127) && (c < 2048)) { else if((c > 127) && (c < 2048)) {
utftext += String.fromCharCode((c >> 6) | 192); utftext += String.fromCharCode((c >> 6) | 192);
utftext += String.fromCharCode((c & 63) | 128); utftext += String.fromCharCode((c & 63) | 128);
} }
else { else {
utftext += String.fromCharCode((c >> 12) | 224); utftext += String.fromCharCode((c >> 12) | 224);
utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode(((c >> 6) & 63) | 128);
utftext += String.fromCharCode((c & 63) | 128); utftext += String.fromCharCode((c & 63) | 128);
} }
} }
return utftext; return utftext;
}, },
// private method for UTF-8 decoding // private method for UTF-8 decoding
_utf8_decode : function (utftext) { _utf8_decode : function (utftext) {
var string = ""; var string = "";
var i = 0; var i = 0;
var c = c1 = c2 = 0; var c = c1 = c2 = 0;
while ( i < utftext.length ) { while ( i < utftext.length ) {
c = utftext.charCodeAt(i); c = utftext.charCodeAt(i);
if (c < 128) { if (c < 128) {
string += String.fromCharCode(c); string += String.fromCharCode(c);
i++; i++;
} }
else if((c > 191) && (c < 224)) { else if((c > 191) && (c < 224)) {
c2 = utftext.charCodeAt(i+1); c2 = utftext.charCodeAt(i+1);
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
i += 2; i += 2;
} }
else { else {
c2 = utftext.charCodeAt(i+1); c2 = utftext.charCodeAt(i+1);
c3 = utftext.charCodeAt(i+2); c3 = utftext.charCodeAt(i+2);
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
i += 3; i += 3;
} }
} }
return string; return string;
} }
} }

File diff suppressed because one or more lines are too long

@ -1 +1 @@
var EXPO=EXPO||{};EXPO.newsFilter?console.warn("WARNING: EXPO.newsFilter is already defined!"):EXPO.newsFilter=function(){var t={};t.opt={};EXPO.common;return t.init=function(t){$.extend(this.opt,t);var e=this;$(function(){var t=$(".news-filter-block"),i=$(".custom-select.theme select",t),a=$(".custom-select.tags input",t),l=t.children("form");i.attr("multiple","multiple"),i.select2({placeholder:e.opt.theme.placeholder,width:"368px",maximumSelectionSize:3}),a.val("0"),a.select2({placeholder:e.opt.tags.placeholder,width:"368px",multiple:!0,maximumSelectionSize:5,ajax:{url:e.opt.tags.url,dataType:"json",quietMillis:200,data:function(t,e){var a=i.val();return a||(a=[]),{term:t,page:e,themes:a}},results:function(t){var e=[];return $.each(t,function(t,i){e.push({id:i.id,text:i.label})}),{results:e}}},initSelection:function(t,i){var a;t.val(""),""!=$.trim(t.attr("data-predifined"))&&"[]"!=$.trim(t.attr("data-predifined"))?(a=JSON.parse(t.attr("data-predifined")),i(a)):$(" .custom-select.tags .select2-input").width(336).addClass("select2-default").val(e.opt.tags.placeholder)}}),a.on("change",function(){l.submit()}),i.on("change",function(){l.submit()})})},t}(); var EXPO=EXPO||{};EXPO.newsFilter?console.warn("WARNING: EXPO.newsFilter is already defined!"):EXPO.newsFilter=function(){var t={};t.opt={};EXPO.common;return t.init=function(t){$.extend(this.opt,t);var e=this;$(function(){var t=$(".news-filter-block"),i=$(".custom-select.theme select",t),a=$(".custom-select.tags input",t),l=t.children("form");i.attr("multiple","multiple"),i.select2({placeholder:e.opt.theme.placeholder,width:"368px",maximumSelectionSize:3}),a.val("0"),a.select2({placeholder:e.opt.tags.placeholder,width:"368px",multiple:!0,maximumSelectionSize:5,ajax:{url:e.opt.tags.url,dataType:"json",quietMillis:200,data:function(t,e){var a=i.val();return a||(a=[]),{term:t,page:e,themes:a}},results:function(t){var e=[];return $.each(t,function(t,i){e.push({id:i.id,text:i.label})}),{results:e}}},initSelection:function(t,i){var a;t.val(""),""!=$.trim(t.attr("data-predifined"))&&"[]"!=$.trim(t.attr("data-predifined"))?(a=JSON.parse(t.attr("data-predifined")),i(a)):$(" .custom-select.tags .select2-input").width(336).addClass("select2-default").val(e.opt.tags.placeholder)}}),a.on("change",function(t){l.submit()}),i.on("change",function(t){l.submit()})})},t}();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1 +1 @@
var EXPO=EXPO||{};EXPO.exposition=EXPO.exposition||{},EXPO.exposition.object?console.warn("WARNING: EXPO.exposition.object is already defined!"):EXPO.exposition.object=function(){var t,i=EXPO.common,s={},o=function(t,i){this.opt=i,this.DOMthis=t,this.DOMbutton=t.querySelector("."+i.buttonClass),this.DOMinput=t.querySelector("."+i.inputClass),this.inputName=this.DOMinput.getAttribute("name"),this.url=this.DOMbutton.getAttribute("href"),this._controller()};return o.prototype={_init:function(){},_controller:function(){var t=this;$(this.DOMinput).on("blur",function(){t.send()}),$(this.DOMbutton).on("click",function(){return!1})},send:function(){var t,s={},o=this,e=function(t){t.success?(console.log("ok"),$(o.DOMbutton).addClass("active")):console.log("data not send")};s[this.inputName]=this.DOMinput.value,t=i.getRequest(s,this.url,e)}},s.opt={},$(function(){t=$("#wait-ajax:not(.absolute)").css({"z-index":"8031"})}),s.init=function(s){$.extend(this.opt,s);var e=this,n=$("."+this.opt.visit.activeClass+", ."+this.opt.visit.passiveClass);this.notes=[],$("."+this.opt.note.wrapClass).each(function(){var t=new o(this,e.opt.note);e.notes.push(t)}),$("."+this.opt.note.wrapDisabledClass).on("click",function(){return $.fancybox.open("#pw-login"),!1}),i.opt.addCalendarText=this.opt.addCalendarText,i.opt.removeCalendarText=this.opt.removeCalendarText,n.off("click"),n.on("click",function(){return $(this).hasClass(e.opt.visit.activeClass)?($("."+e.opt.visit.activeClass).hide().siblings("."+e.opt.visit.passiveClass).show(),$("#"+e.opt.visit.visitorsListId).append(e.opt.visit.currentHtml),$("#"+e.opt.visit.somebodyId).removeClass("hidden"),$("#"+e.opt.visit.nobodyId).addClass("hidden")):($("."+e.opt.visit.passiveClass).hide().siblings("."+e.opt.visit.activeClass).show(),$("#"+e.opt.visit.visitorsListId).children(".current").remove(),0==$("#"+e.opt.visit.visitorsListId).children().length&&($("#"+e.opt.visit.somebodyId).addClass("hidden"),$("#"+e.opt.visit.nobodyId).removeClass("hidden"))),!1}),$("#"+this.opt.advertise.id).on("submit",function(){var s=$(this).serialize(),o=$(this).attr("action"),e=$(this),n=function(i){var s=function(){$(".err",e).removeClass("err"),$(".pwf-msg",e).text("")};if(1!=i.success){s();for(var o in i.errors)i.errors.hasOwnProperty(o)&&$('input[name="'+o+'"]',e).closest(".required").addClass("err").siblings(".pwf-msg").text(i.errors[o])}else s(),$("input:text",e).val(""),$.fancybox.close();t.hide()};return t.show(),i.postRequest(s,o,n),!1})},s}(); var EXPO=EXPO||{};EXPO.exposition=EXPO.exposition||{},EXPO.exposition.object?console.warn("WARNING: EXPO.exposition.object is already defined!"):EXPO.exposition.object=function(){var t,i=EXPO.common,s={},e=function(t,i){this.opt=i,this.DOMthis=t,this.DOMbutton=t.querySelector("."+i.buttonClass),this.DOMinput=t.querySelector("."+i.inputClass),this.inputName=this.DOMinput.getAttribute("name"),this.url=this.DOMbutton.getAttribute("href"),this._controller()};return e.prototype={_init:function(){},_controller:function(){var t=this;$(this.DOMinput).on("blur",function(){t.send()}),$(this.DOMbutton).on("click",function(){return!1})},send:function(){var t,s={},e=this,o=function(t){t.success?(console.log("ok"),$(e.DOMbutton).addClass("active")):console.log("data not send")};s[this.inputName]=this.DOMinput.value,t=i.getRequest(s,this.url,o)}},s.opt={},$(function(){t=$("#wait-ajax:not(.absolute)").css({"z-index":"8031"})}),s.init=function(s){$.extend(this.opt,s);var o=this,n=$("."+this.opt.visit.activeClass+", ."+this.opt.visit.passiveClass);this.notes=[],$("."+this.opt.note.wrapClass).each(function(){var t=new e(this,o.opt.note);o.notes.push(t)}),$("."+this.opt.note.wrapDisabledClass).on("click",function(){return $.fancybox.open("#pw-login"),!1}),i.opt.addCalendarText=this.opt.addCalendarText,i.opt.removeCalendarText=this.opt.removeCalendarText,n.off("click"),n.on("click",function(){return $(this).hasClass(o.opt.visit.activeClass)?($("."+o.opt.visit.activeClass).hide().siblings("."+o.opt.visit.passiveClass).show(),$("#"+o.opt.visit.visitorsListId).append(o.opt.visit.currentHtml),$("#"+o.opt.visit.somebodyId).removeClass("hidden"),$("#"+o.opt.visit.nobodyId).addClass("hidden")):($("."+o.opt.visit.passiveClass).hide().siblings("."+o.opt.visit.activeClass).show(),$("#"+o.opt.visit.visitorsListId).children(".current").remove(),0==$("#"+o.opt.visit.visitorsListId).children().length&&($("#"+o.opt.visit.somebodyId).addClass("hidden"),$("#"+o.opt.visit.nobodyId).removeClass("hidden"))),!1}),$("#"+this.opt.advertise.id).on("submit",function(){var s=$(this).serialize(),e=$(this).attr("action"),o=$(this),n=function(i){var s=function(){$(".err",o).removeClass("err"),$(".pwf-msg",o).text("")};if(1!=i.success){s();for(var e in i.errors)i.errors.hasOwnProperty(e)&&$('input[name="'+e+'"]',o).closest(".required").addClass("err").siblings(".pwf-msg").text(i.errors[e])}else s(),dataLayer.push({event:"advmemberform"}),$("input:text",o).val(""),$.fancybox.close();t.hide()};return t.show(),i.postRequest(s,e,n),!1})},s}();

@ -1 +1 @@
var EXPO=EXPO||{};EXPO.place=EXPO.place||{},EXPO.place.object?console.warn("WARNING: EXPO.place.object is already defined!"):EXPO.place.object=function(){var t={},n=function(t,n){this.$annotation=$("."+t.annotationClass,n),this.$fullPart=$("."+t.fullPartClass,n),this.$readMore=$("."+t.readMoreClass,n),this.cutLength=t.cutLength,this.fullText,this.init()};return n.prototype={init:function(){{var t=this;this.$annotation.text().slice(0,t.cutLength)}this.fullText=this.$annotation.html().trim(),this._setMoreLess(this.fullText,t.cutLength,10)},showMore:function(){this.$readMore.hide(),this.$annotation.hide(),this.$fullPart.removeClass("hidden")},_cutAnnotation:function(){},_setMoreLess:function(t,n,i){var a=t;if(!(a.length+i<n)){var e=a.substring(0,n),s='<span class="firstHalf">'+e+"</span>";this.$annotation.html(s),this.$annotation.find("p:last").append("..."),this.$fullPart.html(a)}}},t.opt={},$(function(){}),t.init=function(t){$.extend(this.opt,t);var i=this;this.articles=[],$("."+i.opt.article.class).each(function(){var t=new n(i.opt.article,this);t.$readMore.on("click",function(){t.showMore()}),i.articles.push(t)})},t}(); var EXPO=EXPO||{};EXPO.place=EXPO.place||{},EXPO.place.object?console.warn("WARNING: EXPO.place.object is already defined!"):EXPO.place.object=function(){var t={},n=function(t,n){this.$annotation=$("."+t.annotationClass,n),this.$fullPart=$("."+t.fullPartClass,n),this.$readMore=$("."+t.readMoreClass,n),this.cutLength=t.cutLength,this.fullText,this.init()};return n.prototype={init:function(){var t=this;this.$annotation.text().slice(0,t.cutLength);this.fullText=this.$annotation.html().trim(),this._setMoreLess(this.fullText,t.cutLength,10)},showMore:function(){this.$readMore.hide(),this.$annotation.hide(),this.$fullPart.removeClass("hidden")},_cutAnnotation:function(){},_setMoreLess:function(t,n,i){var a=t;if(!(a.length+i<n)){var e=a.substring(0,n),s='<span class="firstHalf">'+e+"</span>";this.$annotation.html(s),this.$annotation.find("p:last").append("..."),this.$fullPart.html(a)}}},t.opt={},$(function(){}),t.init=function(t){$.extend(this.opt,t);var i=this;this.articles=[],$("."+i.opt.article["class"]).each(function(){var t=new n(i.opt.article,this);t.$readMore.on("click",function(){t.showMore()}),i.articles.push(t)})},t}();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save