System32 wrote:
Code:
if(_userdata['session_logged_in']) {
if (!FA.Notification.registered()) {
FA.Notification.register();
}
Toolbar.init;
var timeout = setInterval(reloadNotif, 1000);
};
Admin wrote:Hello @System32,
We found the error, and we hide it until we found a fix for it (maybe you can help)Code:
if(_userdata['session_logged_in']) {
if (!FA.Notification.registered()) {
FA.Notification.register();
}
Toolbar.init;
var timeout = setInterval(reloadNotif, 1000);
};
System32 wrote:I know where the issue is, I saw in the console but it is clear that FA.Notification.registered() function returns undefined value which causes the issue here. I don't know where is the class named FA and it's objects. So I can't help you without that.
Code:
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
function headerAdjust() {
var banner_headline = $('#header-banner h1, #header-banner h2'),
banner_headline_height = banner_headline.height();
if (banner_headline_height > 90) {
banner_headline.css('font-size', parseInt(banner_headline.css('font-size')) - 1 + 'px');
requestAnimationFrame(headerAdjust);
} else {
banner_headline.css('opacity', 1);
}
}
requestAnimationFrame(headerAdjust);
/* BUG found - hiding until we found a fix for it
if(_userdata['session_logged_in']) {
if (!FA.Notification.registered()) {
FA.Notification.register();
} /*
Toolbar.init;
var timeout = setInterval(reloadNotif, 1000);
};
function reloadNotif() {
if (_toolbar.notifications.unread > 0) {
if (!$("#unread_notif").length) {
$("#header-notif > i").before('<span id="unread_notif">' + _toolbar.notifications.unread + '</span>');
$('#menu_notifications > span').before('<span id="unread_notif_menu">' + _toolbar.notifications.unread + '</span>');
}
var unread_notif = $("#unread_notif");
var unread_notif_menu = $("#unread_notif_menu");
unread_notif.html(_toolbar.notifications.unread);
unread_notif_menu.html(_toolbar.notifications.unread);
if(! unread_notif.hasClass("notification-new")) {
unread_notif.addClass('notification-new');
unread_notif_menu.addClass('notification-new');
$("#mNotificationBtn").addClass('notification-new');
}
} else if ($("#unread_notif").length) {
$("#unread_notif, #unread_notif_menu").remove();
}
};
var scroll_top = $('html').scrollTop();
$('#main-menu-btn').on('click', function () {
scroll_top = $('html').scrollTop();
$('body').css({
overflow: 'hidden',
maxHeight: '100%'
}).scrollTop(scroll_top);
});
$('#header-user').on('click', function () {
scroll_top = $('html').scrollTop();
$('body').css({
overflow: 'hidden',
maxHeight: '100%'
}).scrollTop(scroll_top);
});
$('#header-notif').on('click', function () {
scroll_top = $('html').scrollTop();
$('body').css({
overflow: 'hidden',
maxHeight: '100%'
}).scrollTop(scroll_top);
});
$('#dimmer').on('click', function () {
scroll_top = $('body').scrollTop();
$('body').attr('style', '');
$('html').scrollTop(scroll_top);
});
});
//]]>
</script>
System32 wrote:First of, where did you get the script?
Second of all, you don't just bulk all the scripts from other forums, you need to integrate one by one and fix on the go. Like this you will have an issue knowing things.
System32 wrote:What's that?
Admin wrote:System32 wrote:What's that?
You dont receive notifications?
System32 wrote:I do not.
|
|