fix: pfeil groesser, tab ohne fokus-kasten, version 1.1.0 (cache-bust)
- Aufklapp-Pfeil deutlich groesser (26px). - Tabs: kein Fokus-Kasten mehr, nur untere Linie markiert den aktiven Tab. - CB_VERSION + Header auf 1.1.0 -> bricht gecachte alte admin.js/frontend.js (Ursache, dass ein Dienst auf einer Seite nicht aufklappbar war). - Aufklappen via Event-Delegation (robust gegen Load-Order/dynamische Zeilen). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -30,16 +30,15 @@
|
||||
const $btn = $( '.cb-service-toggle', box );
|
||||
$btn.attr( 'aria-expanded', open ? 'true' : 'false' ).text( open ? '▾' : '▸' );
|
||||
}
|
||||
/* Delegated once on document → works for existing AND dynamically added rows,
|
||||
* and is resilient to load-order issues. */
|
||||
$( document ).on( 'click', '.cb-service-toggle, .cb-service-title', function () {
|
||||
const box = $( this ).closest( '.cb-service-box' );
|
||||
const open = $( '.cb-service-toggle', box ).attr( 'aria-expanded' ) !== 'true';
|
||||
setExpanded( box, open );
|
||||
} );
|
||||
function bindToggle( box ) {
|
||||
$( '.cb-service-toggle', box ).on( 'click', function () {
|
||||
const open = $( this ).attr( 'aria-expanded' ) !== 'true';
|
||||
setExpanded( box, open );
|
||||
} );
|
||||
// Clicking the title also expands/collapses.
|
||||
$( '.cb-service-title', box ).on( 'click', function () {
|
||||
const open = $( '.cb-service-toggle', box ).attr( 'aria-expanded' ) !== 'true';
|
||||
setExpanded( box, open );
|
||||
} );
|
||||
// No-op kept for call sites; toggling is handled by delegation above.
|
||||
}
|
||||
|
||||
/* ── Re-index a row's field names after a remove ── */
|
||||
|
||||
Reference in New Issue
Block a user