Herzlich willkommen im SEO Forum der ABAKUS Internet Marketing GmbH
registrieren registriertes Mitglied
Page Speed : Specify image dimensions - wie gehe ich das an
htaccess frage alle unterseiten auf root leiten
Code: Alles auswählen
$(function() {
$('.notification-link').click(function(e) {
var box = $('.notification-box:first'),
action = $(this).attr('href');
if(box.css('display') == 'block')
{
close_box();
e.preventDefault();
return false;
}
if(box.length == 1)
{
var pointer = box.children('.popup-pointer');
var offset = $(this).offset(),
poffset = pointer.offset(),
page_w = $(window).width() + $(document).scrollLeft(),
page_h = $(window).height() + $(document).scrollTop();
var new_css = {
width : box.width(),
left : offset.left - 75,
top : 14 + offset.top + $(this).height() + parseInt(pointer.css('border-right-width')) //poffset.top - parseInt(pointer.css('bottom'))
};
if((new_css.left + box.outerWidth()) > page_w)
{
new_css.left = (offset.left + $(this).outerWidth() + 20) - box.outerWidth();
box.addClass('fromright');
}
box
.css(new_css)
.show();
setTimeout(function() {
$('body').bind('click.notificationbox contextmenu.notificationbox', function(e) {
var target = $(e.target);
if(!target.is('.notification-box') && !target.parents().is('.notification-box'))
{
close_box();
}
});
}, 200);
if(box.attr('data-loaded') != 'true')
{
box.children('.boxcontent').html('<div class="ajaxload"></div>');
$('.notification-link .navibubble').remove();
$.ajax({
url : action,
data : {
ntsmode : 'read'
},
dataType : 'html',
type : 'POST',
success: function(data, textStatus, jqXHR) {
if(data.indexOf('<b>Fatal error</b>:') != -1)
{
close_box();
console.log(data);
return;
}
box
.attr('data-loaded', 'true')
.children('.boxcontent').html($.trim(data));
box.find('.nrow').hover(
function() { $(this).children('.row-actions').show(); },
function() { $(this).children('.row-actions').hide(); }
);
box.find('.row-actions a').click(function(e) {
var url = $(this).attr('href'),
params = {};
var parts = url.split('?');
if(parts.length == 2)
{
url = parts[0];
parts = parts[1].replace('&', '&').split('&');
for(i = 0; i < parts.length; i++)
{
var tmp = parts[i].split('=');
if(tmp[1])
{
params[tmp[0]] = tmp[1];
}
}
}
if(params.ntsmode)
{
$.ajax({
url : url,
data : params,
dataType : 'html',
type : 'POST',
success: function(data, textStatus, jqXHR) {
switch(params.ntsmode)
{
case 'delete':
$('#nrow-' + params.nid).fadeOut();
break;
case 'mark':
$('#nrow-' + params.nid).removeClass('unread');
break;
}
},
error: function(jqXHR) {
close_box();
}
});
}
e.preventDefault();
});
},
error: function(jqXHR) {
close_box();
}
});
box.find('.js-mark-read').click(function(e) {
$.ajax({
url : action,
data : {
ntsmode : 'markall'
},
dataType : 'html',
type : 'POST',
success: function(data, textStatus, jqXHR) {
box.find('.nrow').removeClass('unread');
},
error: function(jqXHR) {}
});
e.preventDefault();
});
}
}
e.preventDefault();
});
function close_box()
{
$('body').unbind('click.notificationbox contextmenu.notificationbox');
$('.notification-box').hide();
$('.notification-link').children('.popup-pointer').remove();
}
});