Loading js/theme-helper-main.js +13 −24 Original line number Diff line number Diff line Loading @@ -4,7 +4,6 @@ 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 @@ -57,7 +56,7 @@ function replaceNavbarIcon(appId, currentLi, selector) { function replaceNotificationIcon(imgSelector) { $(imgSelector).hide(); const src = $(imgSelector).attr("src") || ""; $(notifButtonSelector).css('visibility', 'visible'); const notifButtonSelector = "#header .notifications .notifications-button"; if (src.includes("notifications-new.svg")) { $(notifButtonSelector).removeClass("icon-notifications"); $(notifButtonSelector).addClass("icon-notifications-new"); Loading Loading @@ -87,6 +86,13 @@ 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 @@ -103,7 +109,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 @@ -231,27 +237,10 @@ 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) */ 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 @@ -276,6 +265,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'); }); Loading
js/theme-helper-main.js +13 −24 Original line number Diff line number Diff line Loading @@ -4,7 +4,6 @@ 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 @@ -57,7 +56,7 @@ function replaceNavbarIcon(appId, currentLi, selector) { function replaceNotificationIcon(imgSelector) { $(imgSelector).hide(); const src = $(imgSelector).attr("src") || ""; $(notifButtonSelector).css('visibility', 'visible'); const notifButtonSelector = "#header .notifications .notifications-button"; if (src.includes("notifications-new.svg")) { $(notifButtonSelector).removeClass("icon-notifications"); $(notifButtonSelector).addClass("icon-notifications-new"); Loading Loading @@ -87,6 +86,13 @@ 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 @@ -103,7 +109,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 @@ -231,27 +237,10 @@ 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) */ 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 @@ -276,6 +265,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'); });