* [perf] Adjust updateAllDot js function for ajaxgetdropmenuforold

This commit is contained in:
wangyidong
2024-08-02 15:29:30 +08:00
committed by 孙广明
parent f1f42c3696
commit 0b42c8af90
@@ -292,5 +292,24 @@ window.updateAllDot = function(showCount)
dotStyle += rightStyle;
let dotHtml = '<span class="label danger label-dot absolute' + (showCount ? ' rounded-sm' : '') + '" style="' + dotStyle + '">' + (showCount ? unreadCount : '') + '</span>';
top.$('#apps .app-container').each(function()
{
let $iframeMessageBar = $(this).find('iframe').contents().find('#messageBar');
if($iframeMessageBar.length > 0)
{
$iframeMessageBar.find('.label-dot.danger').remove();
if(unreadCount) $iframeMessageBar.append(dotHtml);
}
let $oldPage = $(this).find('iframe').contents().find('#oldPage');
if($oldPage.length > 0)
{
$iframeMessageBar = $oldPage.find('iframe').contents().find('#messageBar');
if($iframeMessageBar.length == 0) return;
$iframeMessageBar.find('.label-dot.danger').remove();
if(unreadCount) $iframeMessageBar.append(dotHtml);
}
});
};
</script>