@font-face {
font-family: Inter;
font-display: swap;
src: url("/wp-content/themes/bs-base-vite/assets/fonts/Inter-Bold.woff2") format("woff2"),
url("/wp-content/themes/bs-base-vite/assets/fonts/Inter-Bold.woff") format("woff");
font-weight: 700;
font-style: normal;
}
onSubmit() {
let form = new FormData();
for (let key in this.form) {
form.append(key, this.form[key]);
}
form.append('_method', 'PUT');
axios
.post("/api/auth/employee/" + this.$route.params.id, form)
.then((res) => {
console.log(res.data, "res");
// this.$router.push({ name: "admin.employee" });
})
.catch((error) => {
this.errors = error.response.data.errors;
// this.form_submitting = false;
});
},
if ($('html').attr('lang') === 'it-IT') {
$.datepicker.setDefaults(
$.extend(
{'dateFormat': 'dd-mm-yy'},
$.datepicker.regional['it']
)
);
} else {
$.datepicker.setDefaults(
$.extend(
{'dateFormat': 'dd-mm-yy'},
$.datepicker.regional['en']
)
);
}
$('.datepicker-class').datepicker({
minDate: 0,
altField: "#your-date",
beforeShowDay: $.datepicker.noWeekends,
})
var re = /яблоки/gi;
var str = 'Яблоки круглые и яблоки сочные.';
var newstr = str.replace(re, 'апельсины');
console.log(newstr); // апельсины круглые и апельсины сочные.
$('#js-gallery-content .gallery__item .gallery__title a').on('click', function(e) {
e.preventDefault();
$('body').addClass('hidden');
$('#js-overlay').fadeIn('300');
$('#js-gallery-modal').css('display', 'block');
$('#js-gallery-slider-big').slick("refresh");
$('#js-gallery-slider-small').slick("refresh");
});
let modalsRequest = $('#js-modals_request');
modalsRequest.on('submit', function(e){
e.preventDefault();
modalsRequest.validate({
rules: {
modals_request_user: {
required: true
},
modals_request_phone: {
required: true
}
},
messages: {
modals_request_user: {
required: 'Поле обязательно!'
},
modals_request_phone: {
required: 'Поле обязательно!'
}
},
submitHandler: function(form) {
$('.modal-request').fadeOut(200);
$('.thanks-content').fadeIn(600);
setTimeout(function(){
form.submit();
}, 6000);
}
});
});
$('#options_c label').on('click', function(e) {
if(e.target.classList[0] === 'label' || e.target.classList[0] === 'checkbox-custom'){
$(this).find('.checkbox-custom').toggleClass('btn-outline-danger').toggleClass('btn-success');
reCalc();
}
});
/* show tabs subitems min 1200
====================================================*/
function showTabs(){
let tabsContentItems = $('#js-tabs-content .tabs-content__item .row');
let jsTabsBtn = tabsContentItems.find('.btn-tabs');
jsTabsBtn.nextAll().hide();
$('#js-tabs-content .btn-tabs').on('click', function(){
let $this = $(this);
$this.hide();
$this.nextAll().fadeIn();
});
}
if($(window).width() < 1200){
showTabs();
}
$(window).resize(function(){
if($(window).width() < 1200){
showTabs();
}else{
$('#js-tabs-content .btn-tabs').nextAll().show();
}
});
$('#js-sidebar__list .sidebar__list-item').on('click', function(e){
e.preventDefault();
var sidebarListLink = 'sidebar__list-link';
var sidebarInnerLink = 'sidebar__inner-list-link';
//console.log(e.target.className);
if(e.target.getAttribute('class') === sidebarListLink){
var innerList = $(this).find('.sidebar__inner-list');
if(innerList.is(':visible')){
$(this).removeClass('active');
innerList.slideUp();
}else{
$('#js-sidebar__list .sidebar__inner-list').slideUp();
$('#js-sidebar__list .sidebar__list-item').removeClass('active');
$(this).addClass('active');
innerList.slideDown();
}
}else if(e.target.getAttribute('class') === sidebarInnerLink){
if($(e.target).parent('li').hasClass('active')) {
$(e.target).parent('li').removeClass('active');
}else{
$('#js-sidebar__list .sidebar__inner-list-item').removeClass('active');
$(e.target).parent('li').addClass('active');
}
}
});
var now = moment();
var clock = document.getElementById("js-clock-content");
moment.locale('en-gb');
window.setInterval(function(){
clock.innerHTML = moment().tz("Europe/London").format('HH:mm:ss');
}, 1000);