Per maintainer feedback on #38307: "adding a popup (without leaving
current page) is better than opening a complete page".
The AI Assistant top-toolbar icon (added in develop by e735bed1 via
top_menu_ai() in main.inc.php) is a plain <a href> that navigates
the user away from whatever page they were on. This patch makes the
icon open the Assistant in a popup overlay instead, so the user
keeps their working context while interacting with the assistant.
Approach:
Reuses the existing Dolibarr core helper dolButtonToOpenUrlInDialogPopup()
(htdocs/core/lib/functions.lib.php) which:
- Builds an <a> with accesskey, title, and an icon
- On click, injects an <iframe src="$url" width="100%" height="98%">
into a hidden <div id="idfordialog$name">
- Opens the div as a jQuery UI dialog: modal:true, width:'80%',
height: window.innerHeight - 150
- Auto-appends "dol_hide_topmenu=1&dol_hide_leftmenu=1&dol_openinpopup=$name"
to the URL so the embedded page renders without the surrounding
top/left chrome (Dolibarr core handles these URL params in
main.inc.php; no change needed to /ai/assistant/index.php)
- Falls back gracefully to target="_blank" when JavaScript is off
Zero changes are needed to /ai/assistant/index.php itself: the
dol_openinpopup / dol_hide_topmenu / dol_hide_leftmenu URL params
are already handled generically by main.inc.php (the same way
modulebuilder, ECM and other popup-friendly screens are loaded).
Visible behaviour:
- Click on the AI top-toolbar icon -> Assistant opens centered as
a modal dialog over the current page; the chat UI loads inside
the iframe; closing the dialog returns the user to their original
page with no navigation.
- Accesskey 'a' (unchanged from e735bed1) still focuses/triggers the
icon.
- Tooltip switches from "AI (Ctrl+Alt+a)" to the localized
"AI Assistant" string (the helper uses $label for both the title
attribute and the dialog title -- one string for both is the
helper's design).
Other top_menu_* icons (bookmark, quickadd, search, import) are
unchanged.
Tested:
- Click icon -> popup opens, Assistant chat works inside iframe.
- Close dialog -> back on the original page with no navigation.
- JavaScript disabled -> link degrades to opening in a new tab
(target="_blank"), Assistant page renders normally with its full
chrome.
- Accesskey Ctrl+Alt+a still triggers the icon.
* Exclude doctemplates as DB dependencies
* FIX: Add Ghostscript installation and caching for Windows CI
# FIX: Add Ghostscript installation and caching for Windows CI
Ghostscript is necessary for one of the tests that converts an image into a PDF.
This commit adds the necessary steps to install Ghostscript and cache it for the Windows CI workflow.
* Fix#37675 API Post eventattendee sets ref to same as id
* Move empty ref check after fetch #38274
---------
Co-authored-by: Jon Bendtsen <jonbendtsen@jonb.dk>
* FIX#37356 Category Products not listed
* Will now show product and service categories when 1 or both modules for products or services are enabled #38264
---------
Co-authored-by: Jon Bendtsen <jonbendtsen@jonb.dk>
# Qual: Better error message for missing translation
Update error message to include 'error - ' after the line:offset: text
to correspond to an emacs like error message recognized by logToCs
which allows it to appear as a github annotation
# Qual: Fix Phan notices observed in #38164
Notices appear in #38164 in unchanged files, probably because the analysis is more selective in PRs.
This fixes notices in the observed files
# Qual: Fix PHPStan for ldap, pgsql, odtphp
- Adjust typing in ldap and pgsql class to fix PHPStan notices;
- Exclude all files for odtphp from analysis (external lib);
- Update PHPStan baseline.