Short reference for declarative loading of JS-Libs without long data-dbxchains.
Basic rule
| What | How |
|---|---|
| Behaviour | CSS class on the element |
| Options | Short data* Attributes (only deviations from the default) |
| Complexity | data-dbx="lib" =...\|.. only for grid, CMS, report, process, mapping |
core.js scans the page when loading ()dbx.scan), invites Libs lazy and turns Defaults If attributes are missing.
Standard form (most common case)
Automatically loaded: Form + ajax + Confirmation (if applicable) dbxConfirm or data-confirm in the form.
Defaults ajax: Mode mode =html, url = form, Target target From dbx form {i} → dbx target {i}, replace=target.
Class overview
| Category | Lib(s) | Purpose |
|---|---|---|
| dbxAjax | Form, ajax | Admin Forms, AJAX Submit |
| dbxConfirm | Confirmation | Question before action |
| dbx-win | OpenWin | Windows instead of Bootstrap modal |
| dbx-ajax-root | ajax | AJAX panel without form (e.g. B. Report target |
| dbx-win-preload | OpenWin | Lib preload (invisible) |
| dbx-grid + data-dbx | grid | Table grid (many options) |
| dbx-cms + data-dbx | cms | Content editor |
ajax – Attributes
| Attribute | Default | Aliases |
|---|---|---|
| Data target | inferred from form ID | data-ajax target, data-dbx target |
| Data URL | Form | data-ajax-url |
| data-replace | Target target | data-ajax-replace |
| Data mode | html | data-ajax mode |
Set a different target only if not dbx form N / dbx target N:
confirm – attributes
| Attribute | Default | Aliases |
|---|---|---|
| data-confirm | — | Data Confirm Quest |
| Data titles | "" | Data-confirm-title |
| data-hint | "" | data-confirm-hint |
| Data buttons | yesno | data-confirm buttons |
openWin – Attributes
| Attribute | Default |
|---|---|
| Data URL | href |
| Data titles | Title or ‘Window’ |
| Data width | 1280 |
| Data-height | 760 |
| Data modal | 1 |
| Data scroll | 1 |
| Data position | Centre |
Size only in case of deviation: data-height="500" data-width="600".
When else data-dbx?
For Libs with many URLs/Optionen – not Place on standard forms:
- lib=report|form=0 Report Panel
- lib=grid | ... – Grid configuration
- lib=cms|tree=...|save = ... CMS
- lib=menu|id = ... – Menu
- lib=process | ... – Polling
Mistakes and diagnosis
| Channel | Content |
|---|---|
| Browsers core.js?log=on | Defaults, Scan, Lib-Init ()[dbx][ajax[TARGET DEFAULT) |
| dbx.error / dbx.warning | Console + red indicator |
| dbx.diag warn/error | Optional → dbxSysMsg (Admin → SysMsg) |
| dbx()->Debug() | PHP log at sys msg |
Defaults are not written in SysMsg This is normal behavior.
Client Diagnosis Endpoint: ?dbx module=dbxAdmin&dbx run1=sysmsg&dbx run2=client diag
Migration (old → new)
| Old | New |
|---|---|
| data-dbx="lib=form\|\|lib=ajax\|...\|lib=confirm\|..." | class="dbxAjax" |
| data-dbx="lib=openWin\|url=...\|title=...\|height=760 \|.. | class="dbx-win" data-url=..." data-title=.. |
| data-confirm-question=.. | data-confirm=.. |
| data-confirm-title=.. | data-title=.. (optional) |
Old aliases ()data-ajax target, data-dbx) Work in parallel.
Technical details: dbx/js/lib/DECLARE.md