Чернівці

У Чернівцях відбувся щорічний новорічний турнір із фехтування


(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({‘gtm.start’:
new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!=’dataLayer’?’&l=’+l:”;j.async=true;j.src=
‘https://www.googletagmanager.com/gtm.js?id=’+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,’script’,’dataLayer’,’GTM-WJHQWMD’);

У Чернівцях відбувся щорічний новорічний турнір із фехтування – Погляд – новини Чернівці

window.url_tickets=”//pogliad.ua/other/addticket.json”;
window.HIGHLIGHT_QUOTE=”Виділіть цитату”;

window.comments_lang = window.comments_lang || {
‘USER_NAME’: “Ваше ім’я”
};

$(document).ready(function(){
var hash = window.location.hash.substr(1);
if(hash.substr(0,7)==’comment’){
var elem = $(window.location.hash+’-item’);
if((elem!=undefined)&&(elem.length>0)){
var scrollto=elem.offset().top;
if(scrollto > 50){
scrollto -= 50;
}
$(‘html, body’).animate({
scrollTop: scrollto + ‘px’
}, ‘fast’,function(){

elem.fadeIn(100).fadeOut(100).fadeIn(100);

});
}
}

$(‘.cm-reply-btn’).click(function(e){
e.preventDefault();
var replyForm = $(this).parent().find(‘.comment-reply-form’);
var textArea = replyForm.find(‘.comment-textarea’);

if(replyForm.length > 0) {
(textArea.val() == ”) && replyForm.slideUp(function(){
$(this).remove();
});
} else {
replyForm = $(‘.comment-form-template .comment-reply-form’).clone();

replyForm.find(‘[name=”comment_parent”]’).val($(this).data(‘parentid’));

$().brilliantSelect && replyForm.find(‘.socialnetworks’).brilliantSelect();

if(window.getUID()) {
replyForm.find(‘.cm-options-block’).hide();
window.getUserAvatar && replyForm.find(‘.cm-avatar’).html(‘‘);
}

replyForm.find(‘.socialnetworks’).change(handleSocialNetworksChange);

var closeBtn = replyForm.find(‘.cm-close’);
replyForm.insertAfter($(this));

replyForm.slideDown();
closeBtn.click(function(){
replyForm.slideUp(function(){
$(this).remove();
});
});
textArea = replyForm.find(‘.comment-textarea’);
$().jqEasyCounter && textArea.jqEasyCounter({
maxChars: 1000,
maxCharsWarning: 900,
msgTextAlign: ‘left’,
msgFontSize: ’11px’
});
textArea.change(handleTextChange);
textArea.keyup(handleTextChange);

textArea.focus(handleTextareaChange);
textArea.keyup(handleTextareaChange);
textArea.change(handleTextareaChange);
replyForm.submit(function(e){
var textArea = $(this).find(‘.comment-textarea’);
if(textArea.val().length < 5) {
e.preventDefault();
$(this).find('.comment-block').addClass('invalid');
}
if($(this).find('.socialnetworks').val() == 'anon') {
var email = $(this).find('[name="comment_user_email"]');
var name = $(this).find('[name="comment_user_name"]');
var result = handleNameValidation.apply(name);
//result = handleEmailValidation.apply(email) && result;
!result && e.preventDefault();
}
});
}
});
});

function handleTextareaChange() {
var commentBlock = $(this).parents('.comment-block');
if($(this).val().length < 5) {
commentBlock.addClass('invalid');
}else{
commentBlock.removeClass('invalid');
}
}

function handleSocialNetworksChange() {
var langs = window.comments_lang || {};
var html = '' +
'

‘ +

‘ +
” +

‘ +

‘ +
” +

‘ +

‘;

if($(this).val() == ‘anon’) {
$(this).parent().find(‘.cm-additional-data’).length == 0 && $(this).parent().append(html);
var email = $(this).parent().find(‘[name=”comment_user_email”]’);
var name = $(this).parent().find(‘[name=”comment_user_name”]’);
//$(email).keyup(handleEmailValidation);
//$(email).focus(handleEmailValidation);
$(name).keyup(handleNameValidation);
$(name).focus(handleNameValidation);
} else {
$(this).parent().find(‘.cm-additional-data’).remove();
}
}

function handleTextChange() {
var closeBtn = $(this).parent().find(‘.cm-close’);
if($(this).val() != ”) {
closeBtn.hide();
} else if($(this).val() == ” && !closeBtn.is(‘:visible’)){
closeBtn.show();
}
}

function handleNameValidation(){
if($(this).val() == ”) {
$(this).addClass(‘invalid’);
return false
}
$(this).removeClass(‘invalid’);
return true;
}

function handleEmailValidation(){
if(!validateEmail($(this).val())) {
$(this).addClass(‘invalid’);
return false;
}
$(this).removeClass(‘invalid’);
return true;
}

function validateEmail(email) {
var re = /^(([^()[]\.,;:s@”]+(.[^()[]\.,;:s@”]+)*)|(“.+”))@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}])|(([a-zA-Z-0-9]+.)+[a-zA-Z]{2,}))$/;
return re.test(email);
}
window.comments_lang = window.comments_lang || {
“USER_NAME”: “Ваше ім’я”
};
window.chars_white_list=”ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzАБВГҐДЕЁЄЖЗИЙІЇКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгґдеёєжзийіїклмнопрстуфхцчшщъыьэюя0123456789\\\\\\\\\\\\”‘№%:*()\-+=\/.,?!& #\r\n”;

$(document).ready(function(){
$(‘textarea’).on(‘input’, function() {
var c = this.selectionStart,
r = new RegExp(‘[^’+window.chars_white_list+’]’,’gm’),
v = $(this).val();
if(r.test(v)) {
$(this).val(v.replace(r, ”));
c–;
}
this.setSelectionRange(c, c);
});

if(window.getUID()) {
$(‘.cm-options-block’).hide();
$(‘.cm-logout-link’).show();
window.getUserAvatar && $(‘.comment-form .cm-avatar’).html(‘‘);
}

$(‘.comment_socialnetwork’).brilliantSelect();
$(‘.comment_socialnetwork’).change(handleSocialNetworksChange);

$().jqEasyCounter && $(‘.comment-form-block .comment-textarea’).jqEasyCounter({
maxChars: 1000,
maxCharsWarning: 900,
msgTextAlign: ‘left’,
msgFontSize: ’11px’
});

$(‘.comment-textarea’).focus(function(){
var commentBlock = $(this).parents(‘.comment-block’);
commentBlock.addClass(‘focused’);
});

$(‘.comment-textarea’).focus(handleTextareaChange);
$(‘.comment-textarea’).keyup(handleTextareaChange);

$(‘.cm-close’).click(function(){
var commentBlock = $(this).parents(‘.comment-block’);
commentBlock.removeClass(‘focused’).removeClass(‘invalid’);
});

$(‘.comment-form’).submit(handleFormSubmit);

$(‘.comment_socialnetwork’).change();
});

function handleTextareaChange() {
var commentBlock = $(this).parents(‘.comment-block’);
if($(this).val().length < 5) {
commentBlock.addClass('invalid');
}else{
commentBlock.removeClass('invalid');
}
}

function handleFormSubmit(e) {
var textArea = $(this).find('.comment-textarea');
if(textArea.val().length < 5) {
e.preventDefault();
$(this).find('.comment-block').addClass('invalid');
}
if($(this).find('.comment_socialnetwork').val() == 'anon') {
var email = $(this).find('[name="comment_user_email"]');
var name = $(this).find('[name="comment_user_name"]');
var result = handleNameValidation.apply(name);
//result = handleEmailValidation.apply(email) && result;
!result && e.preventDefault();
}
}

function handleSocialNetworksChange() {
var langs = window.comments_lang || {};
var html = '' +
'

‘ +

‘ +
” +

‘ +

‘ +
” +

‘ +

‘;

if($(this).val() == ‘anon’) {
$(this).parent().find(‘.cm-additional-data’).length == 0 && $(this).parent().append(html);
var email = $(this).parent().find(‘[name=”comment_user_email”]’);
var name = $(this).parent().find(‘[name=”comment_user_name”]’);
//$(email).keyup(handleEmailValidation);
//$(email).focus(handleEmailValidation);
$(name).keyup(handleNameValidation);
$(name).focus(handleNameValidation);
} else {
$(this).parent().find(‘.cm-additional-data’).remove();
}
}

function handleNameValidation(){
if($(this).val() == ”) {
$(this).addClass(‘invalid’);
return false
}
$(this).removeClass(‘invalid’);
return true;
}

function handleEmailValidation(){
if(!validateEmail($(this).val())) {
$(this).addClass(‘invalid’);
return false;
}
$(this).removeClass(‘invalid’);
return true;
}

function validateEmail(email) {
var re = /^(([^()[]\.,;:s@”]+(.[^()[]\.,;:s@”]+)*)|(“.+”))@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}])|(([a-zA-Z-0-9]+.)+[a-zA-Z]{2,}))$/;
return re.test(email);
}
window.roothostname=”pogliad.ua”;
window.lang={}
window.lang.OUT_THE_FIELD=”Заповніть поля!”
window.lang.REQUEST_SUCCESS=”Ваш запит відправлено успішно!”
window.lang.INCORRECT_CAPTCHA=”Невірна капча!”

$(document).ready(function(){
$(‘body’).on(‘click’, ‘.search’, function(e){
e.preventDefault();
$(‘#searchModal’).modal().open();
document.getElementById(“search”).focus();
});
$(‘#searchModal .search-close’).on(‘click’, function(e){
e.preventDefault();
$(‘#searchModal’).modal().close();
});
});
/**
* Кнопка добавления объявления.
*
* @author: Andrii Stadniychuck
*
* @copyright © Brilliant IT corporation, http://it.brilliant.ua
*/
$(document).ready(function(){
$(‘body’).on(‘click’, ‘#addofferbutton’, function(e){
e.preventDefault();
$(‘#addofferModal’).modal().open();
});
$(‘#addofferModal .addoffer_close’).on(‘click’, function(e){
e.preventDefault();
$(‘#addofferModal’).modal().close();
});

$(‘#addofferModal .addnewsonthis’).click(function(){
$(‘#addofferModal’).modal().close();
$(‘#AddNewsModal’).modal().open();
createRecaptcha();

//Add photo
$(‘#addnewsmodal-startupload’).click(function(){
$(“#addnewsmodaluploadimage”).click();
});
$(‘#addnewsmodaluploadimage’).change(function(){
var file = this.files[0];
if (!file.type.match(“image.*”)) {
return;
}
var formData = new FormData();
formData.append(“file”, file, file.name);
var xhr = new XMLHttpRequest();
var UploadUrl = $(‘#addnewsmodaluploadform’).data(‘url’);
console.log(‘————‘);
console.log(‘UploadUrl ‘+UploadUrl);
xhr.open(“POST”, UploadUrl, true);
xhr.onload = function(){
if (xhr.status === 200){
response=xhr.responseText;
console.log(response);
obj = JSON.parse(response);
//console.log(obj.photo);
if(obj.error!=0){
window.console&&console.log(“Server error: “+obj.error);
return;
}
document.getElementById(‘photo-field’).value=obj.file.url;
document.getElementById(‘addnewssubmitimage’).src=obj.file.thumbnailUrl;
}
};
xhr.onerror = function() {
window.console&&console.log(“An error occurred!”);
window.console&&console.log(‘Ошибка ‘ + this.status );
};
xhr.send(formData);
});

$(‘#AddNewsModal .phone’).mask(“(999) 999-99-99”);
$(‘.addnewsmodal-button’).bind(‘click’,function(){
var url = $(‘.addnewsmodal-form’).data(‘url’);
console.log(‘[BOTHER] submit news url ‘ +url);
var name = $(‘#name-field’).val();
var tel = $(‘#phone-field’).val();
var text = $(‘#text-field’).val();
var photo = $(‘#photo-field’).val();
console.log(‘textModalForm ‘ +text);
if((name.length>0) && (tel.length>0) && (text.length>0)){
$.ajax({
url: url,
type: “POST”,
data: {“name”:name,”phone”:tel,”text”:text,”action”:”save”,”photo”:photo},
dataType: ‘json’
}).done(function(data){
if(data.result==0){
$(‘#AddNewsModal .addnewsmodal-form’).hide();
$(‘.addnewsmodal-alert’).html(‘

‘+window.lang.REQUEST_SUCCESS+’

‘);
}else if(data.result==4){
$(‘.addnewsmodal-alert’).html(‘

‘+window.lang.INCORRECT_CAPTCHA+’

‘);
}
}).fail(function(){
console.log(‘Error XMLHTTPRequest’);
});
}else{
$(‘.addnewsmodal-alert’).html(‘

‘+window.lang.OUT_THE_FIELD+’

‘);
return false;
}
});
return false;
});
$(‘#AddNewsModal .addnewsmodal-close’).on(‘click’, function(e){
e.preventDefault();
$(‘#AddNewsModal’).modal().close();
$(‘#addofferModal’).modal().open();
});

$(‘#addofferModal .addvidido’).on(‘click’,function(){
$(‘#addofferModal’).modal().close();
$(‘#AddVidIdoModal’).modal().open();
createRecaptcha();
$(‘#AddVidIdoModal .phone’).mask(“(999) 999-99-99”);
$(‘.callback-modal-agree’).click(function(){
if($(this).is(‘:checked’)){
$(‘#amb’).removeAttr(“disabled”);
}else{
$(“#amb”).attr(“disabled”,”disabled”);
}
});

$(‘.addvididomodal-button’).bind(‘click’,function(){
var url = $(‘.callbackModalForm’).data(‘url’);
var phoneModalForm = $(‘#phoneModalForm’).val();
var textModalForm = $(‘#textModalForm’).val();
if((phoneModalForm.length>0) && (textModalForm.length>0)){
var rubric = $(‘#rubricModalForm option:selected’).val();
$.ajax({
url: url,
type: “POST”,
data: {“phone”: phoneModalForm,”text”:textModalForm,”rubric”:rubric,”action”:”save”},
dataType: ‘json’
}).done(function(data){
if(data.error==0){
$(‘#AddVidIdoModal .addvidido-body’).hide();
$(‘.addvididomodal-alert’).html(‘

‘+window.lang.REQUEST_SUCCESS+’

‘);
}else if(data.error==4){
$(‘.addvididomodal-alert’).html(‘

‘+window.lang.INCORRECT_CAPTCHA+’

‘);
}
}).fail(function(){
console.log(‘Error XMLHTTPRequest’);
});
}else{
$(‘.addvididomodal-alert’).html(‘

‘+window.lang.OUT_THE_FIELD+’

‘);
return false;
}
});

return false;
});

$(‘#AddVidIdoModal .addvididomodal-close’).on(‘click’, function(e){
e.preventDefault();
$(‘#AddVidIdoModal’).modal().close();
$(‘#addofferModal’).modal().open();
});

});
function createRecaptcha() {
grecaptcha.render(“captcha”, {sitekey: “6Lc6Sh0TAAAAAGpM3pm9dlGUH7z_4-Vxbi18tIaE”, theme: “light”});
}
window.useravatar=””

$(document).ready(function(){
$(‘.article-left-button-share’).click(function(){
$(‘.article-left-button-socpopup’).toggle();
});

$(‘.article-main-text’).css(‘font-size’,’16px’);
$(‘.article-main-intro’).css(‘font-size’,’18px’);

$(‘.article-textsize span’).click(function(){
var spanclass = $(this).attr(‘class’);
$(‘.article-textsize span’).removeClass(‘active’);
$(this).addClass(‘active’);
var text = $(‘.article-main-text’);
var intro = $(‘.article-main-intro’);
switch (spanclass){
case ‘small’:
text.css(‘font-size’,’16px’);
text.css(‘line-height’,’24px’);
intro.css(‘font-size’,’18px’);
intro.css(‘line-height’,’24px’);
break;
case ‘medium’:
text.css(‘font-size’,’18px’);
text.css(‘line-height’,’26px’);
intro.css(‘font-size’,’20px’);
intro.css(‘line-height’,’26px’);
break;
case ‘large’:
text.css(‘font-size’,’21px’);
text.css(‘line-height’,’28px’);
intro.css(‘font-size’,’22px’);
intro.css(‘line-height’,’28px’);
break;
}
});

// Ctrl + Enter
$(‘body’).keydown(function(e) {
console.log(e);
if (e.ctrlKey && e.keyCode == 13) {
var str = ”;
str += window.getSelection();
if(str==” || str == undefined){
alert(window.HIGHLIGHT_QUOTE);
return false;
}else{
$(‘#CEModal’).modal().open();
$(‘.modal-wrapper-errortext’).text(str);
$(‘#CEModal .blog-item-modal-close’).on(‘click’, function(e){
e.preventDefault();
$(‘#CEModal’).modal().close();
});
$(‘.CE-send’).each(function(){
$(this).click(function(){
var PageType = $(‘#pagetype’).val();
var ArticleId = $(‘#articleid’).val();
var UserComment = $(‘#errorformtext’).val();
var data = {type: PageType, id: ArticleId, text: str, UserComment: UserComment, action: “ok”};
console.log(data);
$.ajax({
url : window.url_tickets,
data : data,
dataType: ‘json’
}).done(function(data){
if(data.result==0){
$(‘#CEModal’).modal().close();
$(‘.alert-success’).css(‘display’,’block’);
}
}).fail(function(){
console.log(‘ERROR XMLHTTPRequest’);
});
});
});
}
}
});

/*var ArticleLeftTop = parseInt($(‘.article-left-inner’).offset().top);
console.log(‘Начало левого блока = ‘+ArticleLeftTop);
var ArticleLeftBottom = (ArticleLeftTop + parseInt($(“.article-left-inner”).outerHeight()));
console.log(‘Конец левого блока = ‘+ArticleLeftBottom);
var ArticleRightTop = $(“.article-main”).offset().top;
console.log(‘Начало правого блока = ‘+ArticleLeftTop);
var ArticleRightBottom = parseInt((ArticleRightTop + parseInt($(“.article-main”).outerHeight())));
console.log(‘Конец правого блока = ‘+ArticleRightBottom);
var line = parseInt($(‘.article-main-info’).offset().top);
var Difference = parseInt((ArticleRightBottom-ArticleLeftBottom));
console.log(‘Разница = ‘+Difference);

$(window).scroll(function(){
var WindowScrollTop = $(window).scrollTop();
//console.log(‘Скрол = ‘+(WindowScrollTop));
if((WindowScrollTop>ArticleLeftTop) && (WindowScrollTopline){
$(“.article-left-inner”).addClass(“absolute”);
$(“.article-left-inner”).removeClass(“leftactive”);
}else if(WindowScrollTop<ArticleLeftTop){
$(".article-left-inner").removeClass("leftactive");
$(".article-left-inner").removeClass("absolute");
}
});*/
});

(function(i,s,o,g,r,a,m){
i[“esSdk”] = r;
i[r] = i[r] || function() {
(i[r].q = i[r].q || []).push(arguments)
}, a=s.createElement(o), m=s.getElementsByTagName(o)[0]; a.async=1; a.src=g;
m.parentNode.insertBefore(a,m)}
) (window, document, “script”, “https://esputnik.com/scripts/v1/public/scripts?apiKey=eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI0NTI0ZWZhYTJkYzI2MGRmYTM4YTE1NDBlMWI1YjY0NWQzYjQzYjBiM2MxY2ZhOTQwM2FiNDk3MzljODA0MzAwNjRlZGIxM2M0NWExYTQzMzJhMDg3MGQ5ZDU2YThlNTc1N2I1YjQwYTRmMjIzM2ZiZTY3MjM5YzU3MjU3YmM0MmEzY2RhNzI4MjQzMTNmMGRmMDczYmEyN2I3ODA0NDE5MDU4Y2U2OTQ5ZTFjNjc1Y2JmIn0.KQibApZDzweR-GmEyCiRB7WhN9rdXgtO3nV8zFUDNyoqed0Gr71dSAtvNjxhbxb3oQFHtE5k0jAAg7pSj_CuZw&domain=5131872D-07E5-4D2C-9454-3E17B9D847AA”, “es”);
es(“pushOn”);

(function (d, w, c) {
(w[c] = w[c] || []).push(function() {
try {
w.yaCounter51339661 = new Ya.Metrika2({
id:51339661,
clickmap:true,
trackLinks:true,
accurateTrackBounce:true,
webvisor:true
});
} catch(e) { }
});

var n = d.getElementsByTagName(“script”)[0],
s = d.createElement(“script”),
f = function () { n.parentNode.insertBefore(s, n); };
s.type = “text/javascript”;
s.async = true;
s.src = “https://cdn.jsdelivr.net/npm/yandex-metrica-watch/tag.js”;

if (w.opera == “[object Opera]”) {
d.addEventListener(“DOMContentLoaded”, f, false);
} else { f(); }
})(document, window, “yandex_metrika_callbacks2”);

Back to top button