File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -207,8 +207,13 @@ input[type=file] {
207207 padding : 5px ;
208208}
209209
210- .highlight {
211- background : # FFFF66 ;
210+ .highlight , .search-highlight {
211+ background : # ffc107 ;
212+ color : # 212529 ;
213+ font-weight : bold;
214+ padding : 2px 4px ;
215+ border-radius : 3px ;
216+ box-shadow : 0 1px 3px rgba (255 , 193 , 7 , 0.3 );
212217}
213218
214219/* Disabilita il widget sidebar-search di AdminLTE */
Original file line number Diff line number Diff line change @@ -261,12 +261,20 @@ $(document).ready(function () {
261261 results . forEach ( result => {
262262 const title = result . title ;
263263 const labels = result . labels ? result . labels . join ( '' ) . split ( '<br/>,' ) . join ( ' • ' ) : '' ;
264+
265+ // Preserva l'evidenziazione esistente e applica quella per search-highlight
266+ let processedLabels = labels ;
267+ // Sostituisci la classe highlight con search-highlight per coerenza
268+ processedLabels = processedLabels . replace ( / c l a s s = [ ' " ] h i g h l i g h t [ ' " ] / g, 'class="search-highlight"' ) ;
269+
264270 const cleanLabels = labels . replace ( / < [ ^ > ] * > / g, '' ) ; // Rimuovi HTML per il tooltip
265271
266272 // Evidenzia il termine di ricerca nel titolo
267273 const highlightedTitle = highlightSearchTerm ( title , searchTerm ) ;
268- // Mantieni le labels complete per permettere il wrap
269- const simplifiedLabels = cleanLabels . replace ( / : / g, '' ) ;
274+
275+ // Applica evidenziazione anche alle labels processate
276+ const highlightedLabels = highlightSearchTerm ( processedLabels , searchTerm ) ;
277+ const simplifiedLabels = highlightedLabels . replace ( / : / g, '' ) ;
270278
271279 categoryList . append ( `
272280 <li class="nav-item">
You can’t perform that action at this time.
0 commit comments