This commit is contained in:
gsinghpal
2026-03-14 12:04:20 -04:00
parent fc3c966484
commit e9cf75ee48
75 changed files with 6991 additions and 873 deletions

View File

@@ -1,40 +0,0 @@
/** @odoo-module **/
// Fusion Claims - Chatter Topbar Tooltips
// Copyright 2024-2026 Nexa Systems Inc.
// License OPL-1
//
// Adds title (tooltip) attributes to chatter topbar buttons that have
// their text hidden via CSS (icon-only mode).
const TOOLTIPS = {
'.o-mail-Chatter-sendMessage': 'Send Message',
'.o-mail-Chatter-logNote': 'Log Note',
'button[data-hotkey="shift+w"]': 'WhatsApp',
'.o-mail-Chatter-activity': 'Schedule Activity',
'.fusion-notes-mic-btn': 'Record Voice Note',
'.o-mail-Chatter-messageAuthorizer': 'Message Authorizer',
};
function applyTooltips() {
for (const [selector, title] of Object.entries(TOOLTIPS)) {
for (const btn of document.querySelectorAll(selector)) {
if (!btn.getAttribute('title')) {
btn.setAttribute('title', title);
}
}
}
}
// Run on DOM changes (OWL re-renders)
const observer = new MutationObserver(() => applyTooltips());
// Start observing once DOM is ready
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', () => {
observer.observe(document.body, { childList: true, subtree: true });
applyTooltips();
});
} else {
observer.observe(document.body, { childList: true, subtree: true });
applyTooltips();
}