footer update

This commit is contained in:
Serghey Rodin 2015-11-05 03:18:11 +02:00
commit b7461afe06

View file

@ -178,7 +178,8 @@
); );
$(window).bind('keypress', function(evt) { $(window).bind('keypress', function(evt) {
if (evt.charCode == 97) { var tag = evt.target.tagName.toLowerCase();
if (evt.charCode == 97 && tag != 'input' && tag != 'textarea' && tag != 'selectbox') {
evt.preventDefault(); evt.preventDefault();
if (!evt.ctrlKey && !evt.shiftKey) { if (!evt.ctrlKey && !evt.shiftKey) {
if ($('.l-sort__create-btn')[0]) { if ($('.l-sort__create-btn')[0]) {
@ -382,6 +383,21 @@
$('.shortcuts').toggle(); $('.shortcuts').toggle();
}); });
$(document).click(function(evt){
//close notification popup
if(!$(evt.target).hasClass('l-profile__notifications') && $(evt.target).parents('ul.notification-container').length == 0){
$('.notification-container').hide();
$('.l-profile__notifications').removeClass('active');
}
});
// focusing on the first input at form
if(location.href.indexOf('lead=') == -1){
$('#vstobjects .vst-input:not([disabled]), #vstobjects .vst-list:not([disabled])').first().focus();
}
$('.l-profile__notifications').click(function(){ $('.l-profile__notifications').click(function(){
if(!$('.l-profile__notifications').hasClass('active')){ if(!$('.l-profile__notifications').hasClass('active')){
VE.notifications.get_list(); VE.notifications.get_list();
@ -432,11 +448,8 @@
}); });
} }
$(document).click(function(evt){
//close notification popup
$('.notification-container').hide();
$('.l-profile__notifications').removeClass('active');
});
}); });
</script> </script>