Loading js/theme-helper-main.js +26 −14 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ if (OCA.Accessibility.highcontrast) { } const activeIconColorCode = "007fff"; const whiteColorCode = "ffffff"; const notifButtonSelector = "#header .notifications .notifications-button"; function getSvgLinkCore(folder, svgName, color) { if (color.length) { Loading Loading @@ -56,7 +57,7 @@ function replaceNavbarIcon(appId, currentLi, selector) { function replaceNotificationIcon(imgSelector) { $(imgSelector).hide(); const src = $(imgSelector).attr("src") || ""; const notifButtonSelector = "#header .notifications .notifications-button"; $(notifButtonSelector).css('visibility', 'visible'); if (src.includes("notifications-new.svg")) { $(notifButtonSelector).removeClass("icon-notifications"); $(notifButtonSelector).addClass("icon-notifications-new"); Loading Loading @@ -86,13 +87,6 @@ function replaceNavbarIcons() { /* Empty Search icon(Set through CSS) */ $("#header .header-right .magnify-icon").empty(); /* Notifications icon(Replace src on load) */ const notifImgSelector = "#header .notifications .notifications-button img"; replaceNotificationIcon(notifImgSelector); $(notifImgSelector).on("load", function () { replaceNotificationIcon(notifImgSelector); }); } function replaceActivityIcons() { Loading @@ -109,7 +103,7 @@ function replaceActivityIcons() { comments: getSvgLinkCore("actions", "comment", ""), deck: getSvgLinkApp("deck", "deck-dark", ""), contacts: getSvgLinkCore("places", "contacts", ""), user_settings: getSvgLinkApp("e-user-support-center", "app", "") user_settings: getSvgLinkApp("e-user-support-center", "app", ""), }; let currentActive = ""; Loading Loading @@ -237,10 +231,28 @@ function replaceSettingsMenuIcons() { // TODO: fix the logout icon for highcontrast(it is not working well with SVG Controller) } function hideNotificationButton() { if (!($(notifButtonSelector).hasClass('icon-notifications') || $(notifButtonSelector).hasClass('icon-notifications-new'))) { $(notifButtonSelector).css('visibility', 'hidden'); } } jQuery(window).load(function () { /* Notifications icon(Replace src on load) */ const notifImgSelector = "#header .notifications .notifications-button img"; replaceNotificationIcon(notifImgSelector); $(notifImgSelector).on("load", function () { replaceNotificationIcon(notifImgSelector); }); }); $(document).ready(function () { const bodyId = $("body").attr("id"); if (bodyId === "body-user" || bodyId === "body-settings") { hideNotificationButton(); /* Navbar and navbar menus */ replaceNavbarIcons(); Loading @@ -265,6 +277,6 @@ $(document).ready(function () { replaceSettingsSectionIcons(); } } $('#app-navigation [data-id="trashbin"]').removeClass('pinned first-pinned'); $('#app-navigation [id="quota"]').addClass('pinned first-pinned'); $('#app-navigation [data-id="trashbin"]').removeClass("pinned first-pinned"); $('#app-navigation [id="quota"]').addClass("pinned first-pinned"); }); No newline at end of file Loading
js/theme-helper-main.js +26 −14 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ if (OCA.Accessibility.highcontrast) { } const activeIconColorCode = "007fff"; const whiteColorCode = "ffffff"; const notifButtonSelector = "#header .notifications .notifications-button"; function getSvgLinkCore(folder, svgName, color) { if (color.length) { Loading Loading @@ -56,7 +57,7 @@ function replaceNavbarIcon(appId, currentLi, selector) { function replaceNotificationIcon(imgSelector) { $(imgSelector).hide(); const src = $(imgSelector).attr("src") || ""; const notifButtonSelector = "#header .notifications .notifications-button"; $(notifButtonSelector).css('visibility', 'visible'); if (src.includes("notifications-new.svg")) { $(notifButtonSelector).removeClass("icon-notifications"); $(notifButtonSelector).addClass("icon-notifications-new"); Loading Loading @@ -86,13 +87,6 @@ function replaceNavbarIcons() { /* Empty Search icon(Set through CSS) */ $("#header .header-right .magnify-icon").empty(); /* Notifications icon(Replace src on load) */ const notifImgSelector = "#header .notifications .notifications-button img"; replaceNotificationIcon(notifImgSelector); $(notifImgSelector).on("load", function () { replaceNotificationIcon(notifImgSelector); }); } function replaceActivityIcons() { Loading @@ -109,7 +103,7 @@ function replaceActivityIcons() { comments: getSvgLinkCore("actions", "comment", ""), deck: getSvgLinkApp("deck", "deck-dark", ""), contacts: getSvgLinkCore("places", "contacts", ""), user_settings: getSvgLinkApp("e-user-support-center", "app", "") user_settings: getSvgLinkApp("e-user-support-center", "app", ""), }; let currentActive = ""; Loading Loading @@ -237,10 +231,28 @@ function replaceSettingsMenuIcons() { // TODO: fix the logout icon for highcontrast(it is not working well with SVG Controller) } function hideNotificationButton() { if (!($(notifButtonSelector).hasClass('icon-notifications') || $(notifButtonSelector).hasClass('icon-notifications-new'))) { $(notifButtonSelector).css('visibility', 'hidden'); } } jQuery(window).load(function () { /* Notifications icon(Replace src on load) */ const notifImgSelector = "#header .notifications .notifications-button img"; replaceNotificationIcon(notifImgSelector); $(notifImgSelector).on("load", function () { replaceNotificationIcon(notifImgSelector); }); }); $(document).ready(function () { const bodyId = $("body").attr("id"); if (bodyId === "body-user" || bodyId === "body-settings") { hideNotificationButton(); /* Navbar and navbar menus */ replaceNavbarIcons(); Loading @@ -265,6 +277,6 @@ $(document).ready(function () { replaceSettingsSectionIcons(); } } $('#app-navigation [data-id="trashbin"]').removeClass('pinned first-pinned'); $('#app-navigation [id="quota"]').addClass('pinned first-pinned'); $('#app-navigation [data-id="trashbin"]').removeClass("pinned first-pinned"); $('#app-navigation [id="quota"]').addClass("pinned first-pinned"); }); No newline at end of file