'+
'
'+
'
'+timeStart+''+getUnicalString(j)+'
'+
'
'+raspisanie[j].title+''+getUnicalString(j)+'
'+
'
'+raspisanie[j].trener+'
'+
'
'+raspisanie[j].where+'
'+
'
'+raspisanie[j].duration+'
'+
'
'+raspisanie[j].description+'
'+
'
'+moment(raspisanie[j].dateStart).format('dddd, D MMMM, в HH:mm')+'
'+
'

'+
'

'+
'
'+
'
');
}
updateHeightTimeLine ('weekview',0);
updateHeightTimeLineHeader('weekview',0);
// update_module_left('calendar');
addEventsToDom();
eventInit();
}
if(updateeventsBool){
update_moduleDown();
}
if(openTodayForMobileDevice != 0 && $(window).width() <= 768){
$('.calendarOneDaysColumn.dayOfWeekColumn[data-id = '+openTodayForMobileDevice+']').trigger('click');
}
// stickyTimeLineHeader();
}
function groupFilter(that){
$('.selectedMF').removeClass('selectedMF');
$(that).addClass('selectedMF');
if(that!=''){
if(that.hasClass('selectedEG') || that.hasClass('allEG')){
$('.iconAge,#age-range').hide();
$('.filterEventsGroup').removeClass('selectedEG');
if(openViewOneDay){
showHideEGR('poolEGR',false);
showHideEGR('adaultEGR',false);
showHideEGR('childEGR',false);
} else {
updateHeightTimeLineDefaultWeekView();
}
$('#allEGR').addClass('selectedEG');
} else {
$('.filterEventsGroup').removeClass('selectedEG');
$('.iconAge,#age-range').hide();
if(that.hasClass('childEG')){
ageFilterFrom = that.data('from');
ageFilterTo = that.data('to');
$("#age-range").slider('values',0,ageFilterFrom).slider('values',1,ageFilterTo);
ageRangeUpdate();
$('.iconAge,#age-range').show();
showHideEGR('childEGR',true);
} else if (that.hasClass('poolEG')){
showHideEGR('poolEGR',true);
} else {
showHideEGR('adaultEGR',true);
}
}
}
}
function addEventsToDom(){
$( ".calendarEventCell" )
.mouseenter(function() {
if(openViewOneDay==false){
$(this).addClass("mouseEntered");
} else {
$(this).css({backgroundColor:colorCellBottomBgSelected});
}
})
.mouseleave(function() {
if(openViewOneDay==false){
$(this).removeClass("mouseEntered");
} else {
$(this).css({backgroundColor:colorCellBottomBg});
}
});
$('.dayOfWeekColumn').mouseenter(function() {
if(noRaspisanie){} else {
if(directionUpdate == ''){
var id = $(this).data("id");
if(openViewOneDay==false){
$('.dayColumn'+id).css({'background-color':colorCellBottomBgSelected});
$(this).css({'background-color':colorCellBottomBgSelected});
} else {
if(animationViewOneDay==false){
$(this).css({'background-color':colorCellBottomBgSelected});
$('.dayColumn'+id).children().each(function() {
$(this).css({'background-color':colorCellBottomBg});
});
}
}
} else {
}
}
}).mouseleave(function() {
if(noRaspisanie){} else {
var id = $(this).data("id");
if(openViewOneDay==false){
$('.dayColumn'+id).css({'background-color':'rgba(3, 17, 43,0.0)'});
$(this).css({'background-color':'rgba(3, 17, 43,0.0)'});
} else {
if(animationViewOneDay==false){
$(this).css({'background-color':'rgba(3, 17, 43,0.0)'});
$('.dayColumn'+id).children().each(function() {
$(this).css({'background-color':colorCellBottomBg});
});
}
}
}
}).click(function() {
if(noRaspisanie){} else {
var id = $(this).data("id");
$('.dayOfWeekColumn').addClass('animate50');
if(selectedDay == id){//тот же день
changeWeekOrDayAddClass($('.weekOrDaySelectButtonWeek'));
closeOneDayView(id);
} else { //другой день
animationViewOneDay = true;
$('.dayColumn'+id).css({'background-color':'rgba(3, 17, 43,0.0)'});
if(openViewOneDay == false){ //просмотр дня не открыт
changeWeekOrDayAddClass($('.weekOrDaySelectButtonDay'));
selectedDay = id;
openViewOneDayWidth = $(this).width();
updateEventBg(selectedDay, id,'dayview');
updateHeightTimeLine ('dayview',id);
updateHeightTimeLineHeader('dayview', selectedDay, id);
updateEventFloat(id);
unwrapTimeLine(selectedDay);
openViewOneDay = true;
updateHeightTimeLineDefaultDayView();
showHideEGR(groupFilterselectedEG,true);
} else {//if onedayopen //другой день недели
updateHeightTimeLineHeader('dayview', selectedDay, id);
updateHeightTimeLine ('dayview',selectedDay, id);
updateEventBg(selectedDay, id,'dayview');
selectedDay = id; //важный порядок после updateHeightTimeLineHeader!
updateEventFloat(id);
}
animationViewOneDay = false;
}
$('.dayOfWeekColumn').removeClass('animate50');
}
});
}
function getHeight() {
var myWidth = 0, myHeight = 0;
if( typeof( window.innerWidth ) == 'number' ) {
//Non-IE
// myWidth = window.innerWidth;
myHeight = window.innerHeight;
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
//IE 6+ in 'standards compliant mode'
// myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
//IE 4 compatible
// myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
return myHeight;
}
function getWidth() {
var myWidth = 0, myHeight = 0;
if( typeof( window.innerWidth ) == 'number' ) {
//Non-IE
myWidth = window.innerWidth;
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
//IE 6+ in 'standards compliant mode'
myWidth = document.documentElement.clientWidth;
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
//IE 4 compatible
myWidth = document.body.clientWidth;
}
return myWidth;
}
function imageSizeWrapInsta(img){
var imageSize = {};
myHeight = getHeight() - 68 - 70;
myWidth = getWidth();
//console.log('myHeight = '+ (myWidth/myHeight));
naturalWidth = img.naturalWidth;
naturalHeight = img.naturalHeight;
//console.log('naturalWidth = '+ (naturalWidth/naturalHeight));
if((naturalWidth/naturalHeight) >= (myWidth/myHeight)){
imageSize.width = '100%';
imageSize.height = 'auto';
} else {
imageSize.width = 'auto';
imageSize.height = '100%';
}
return imageSize;
}
function imageSizeWrap(img){
var imageSize = {};
myHeight = getHeight() - 68 - 70;
myWidth = getWidth();
//console.log('myHeight = '+ (myWidth/myHeight));
naturalWidth = img.naturalWidth;
naturalHeight = img.naturalHeight;
//console.log('naturalWidth = '+ (naturalWidth/naturalHeight));
if((naturalWidth/naturalHeight) >= (myWidth/myHeight)){
imageSize.width = '100%';
imageSize.height = 'auto';
} else {
imageSize.width = 'auto';
imageSize.height = '100%';
}
return imageSize;
}
function initMap () {
myMap = new ymaps.Map('map', {
center: [54.332910, 48.394815],
zoom: 17,
controls: ['zoomControl']
});
var FormaClub = new ymaps.Placemark([54.332910, 48.394815], {
hintContent: 'Фитнес-клуб Форма',
balloonContent: 'ул. Федерации, д. 141,