https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40788
--- Comment #15 from Paul Derscheid <[email protected]> --- Created attachment 196774 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196774&action=edit Bug 40788: (follow-up) Add custom Vue events to all Vue apps and islands Extends the koha:vue-loaded event to all Vue app entry points and adds koha:island-loaded / koha:islands-ready events for Vue Islands, so that IntranetUserJS can reliably interact with Vue-rendered content across the entire staff interface. For full Vue apps (ERM, Acquisitions, Preservation, SIP2) the event fires after async initialization completes and nextTick ensures the DOM has updated. For admin/record_sources, which has no async init, the event fires right after app.mount(). For Vue Islands the koha:island-loaded event fires per island after customElements.define(), and koha:islands-ready fires once all islands on the page are hydrated. To test: - Apply patch and run: yarn build - Add the following to IntranetUserJS: document.addEventListener("koha:vue-loaded", function(e) { console.log("Vue loaded:", e.detail.module); }); document.addEventListener("koha:island-loaded", function(e) { console.log("Island loaded:", e.detail.name); }); document.addEventListener("koha:islands-ready", function() { console.log("All islands ready"); }); - Open the browser console and navigate to each of: - /cgi-bin/koha/erm/erm.pl => console shows "Vue loaded: erm" - /cgi-bin/koha/acqui/vendors.pl => console shows "Vue loaded: acquisitions" - /cgi-bin/koha/preservation/home.pl => console shows "Vue loaded: preservation" - /cgi-bin/koha/admin/sip2/servers.pl => console shows "Vue loaded: sip2" - /cgi-bin/koha/admin/record_sources => console shows "Vue loaded: admin/record_sources" - /cgi-bin/koha/acqui/acqui-home.pl (has acquisitions-menu island) => console shows "Island loaded: acquisitions-menu" and "All islands ready" - /cgi-bin/koha/admin/admin-home.pl (has admin-menu island) => console shows "Island loaded: admin-menu" and "All islands ready" - Verify that each event fires only after the page content is actually rendered (menus, tables, etc. are visible) -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
