Dojo / Digital Accordion - Add U-Turn and Collapse Arrows

Trying to figure out how to add expand / collapse arrow images to the Dojo Accordion dijit.layout.AccordionContainer, like dijitTitlePane / dojox. widget.TitleGroup .

+4
source share
1 answer

Was there a little research to find out where the TitlePane gets its arrow images from, and whether it found a sprite image. I created additional code that uses the same sprite image to add expand and collapse arrows to AccordionPane. You need to add some extra CSS to the theme to make this work:

Add the following line 2625 to the line /themes/THEME_NAME/THEME_NAME.css :

.THEME_NAME .dijitAccordionArrow { background:url("images/spriteArrows.png") no-repeat -14px top; width:7px; height:8px; margin-top:-1px; } .THEME_NAME .dijitAccordionTitleSelected .dijitAccordionArrow { background:url("images/spriteArrows.png") no-repeat; margin-top:-1px; } 

Replace THEME_NAME with whatever the name of your stock theme (i.e., Claro) or the name of your custom theme.

Sample 1

Sample 2

+3
source

Source: https://habr.com/ru/post/1386568/


All Articles