sito per le richieste......
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 

123 righe
3.6 KiB

var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
$(document).ready(function () {
var doAsUserId = getParameterByName('doAsUserId');
if(doAsUserId != null){
$.each($('.doasuser-class a'), function(index, val) {
$(this).attr('href', $(this).attr('href')+'?doAsUserId='+doAsUserId);
});
}
function getParameterByName(name) {
var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
}
/*optionalRadio();*/
$(".button-menu-right").click(function (e) {
e.preventDefault();
$("body").toggleClass("toggled");
});
$(".title-controll").click(function (e) {
e.preventDefault();
$(this).toggleClass('open');
$(this).closest('.sidebar-wrapper__admin').find("#_145_navAddControls").slideToggle(200);
});
$(".notification-header__dropdown .user-notification-link").click(function (e) {
e.preventDefault();
$(this).closest('#_2_WAR_notificationsportlet_userNotifications').find(".dockbar-user-notifications-container").toggleClass("open");
});
$("#_145_dockbarbodyContent .user-notification-link").click(function (e) {
e.preventDefault();
$(this).closest('#_2_WAR_notificationsportlet_userNotifications').find(".user-notifications-list").slideToggle(200);
});
$(window).scroll(function () {
var height_header = $('.header').height(),
height_menu,
height_navigation = $('.navigation').outerHeight();
if ($(window).scrollTop() < height_header) {
//when the header reaches the top of the window change position to fixed
$(".navigation").removeClass("fixing");
/* $(".navigation-overlay").addClass("hidden"); */
height_menu = $('header').outerHeight() - $(window).scrollTop();
$("#page-content-wrapper").css('padding-top', '0px');
} else {
//put position back to relative
$(".navigation").addClass("fixing");
/* $(".navigation-overlay").removeClass("hidden");
$(".navigation-overlay").height($(".navigation").height()+4);*/
height_menu = $('.navigation.fixing').outerHeight();
$("#page-content-wrapper").css('padding-top', height_navigation);
}
adaptiveMenu(height_menu)
});
function adaptiveMenu(menuHeight) {
if (check_xs() || check_sm()) {
$('#sidebar-wrapper').css('margin-top', menuHeight);
} else {
$('#sidebar-wrapper').css('margin-top', 0);
}
}
$('#myCarousel').carousel({
interval: 6000
});
$(".carousel-inner .item:first-child").addClass("active");
});
function setMenuOnLoad() {
if (check_xs() || check_sm()) {
$('#sidebar-wrapper').css('margin-top', $('header').outerHeight());
}
};
window.onresize = function () {
setMenuOnLoad();
};
window.onload = function () {
setMenuOnLoad();
};
function check_xs() {
return window.matchMedia('(max-width: 767px)').matches
}
function check_sm() {
return window.matchMedia('(min-width: 768px) and (max-width: 991px)').matches
}
function check_md() {
return window.matchMedia('(min-width: 992px) and (max-width: 1199px)').matches
}
function check_lg() {
return window.matchMedia('(min-width: 1200px)').matches
}
function addLoading() {
$('.loader').addClass('active');
$('#wrapper').addClass('blur');
}
function removeLoading() {
$('.loader').removeClass('active');
$('#wrapper').removeClass('blur');
}