Picture of Robert Willis
changing + - in the accordion component
by Robert Willis - Wednesday, 2 November 2016, 4:25 PM
 

Is it possible to change the + and - text or icon the the accordion component?

Picture of Matt Leathes
Re: changing + - in the accordion component
by Matt Leathes - Wednesday, 2 November 2016, 5:56 PM
 

It's certainly possible but how easy/difficult it is depends on your level of development skill... you would need to have a least a basic working knowledge of JavaScript, handlebars and LESS

Picture of Chuck Lorenz
Re: changing + - in the accordion component
by Chuck Lorenz - Wednesday, 2 November 2016, 6:56 PM
 

adding just a little more detail to Matt's comments...

Icons are typically found in the 'fonts' directory of your theme. They are named by classes found in your theme's less/src/icons.less file. (This is how Vanilla is set up anyway.)

The icons are part of a font-family controlled by the 'icon' class (located in Vanilla files: less/src/icons.less). The particular icon is named by the 'icon-plus' class. Original values for both are set on this line in the accordion.hbs:
<divclass="accordion-item-title-icon icon icon-plus h5"></div>

The plus is 'manually' toggled to a minus by the adapt-contrib.accordion.js. Look for two blocks similar to this:
$icon.removeClass('icon-plus');
$icon.addClass('icon-minus'

You can substitute "icon-plus" and "icon-minus" with any other class name in icons.less--if you find a suitable alternative. If not, you'll need to rebuild the icon font with acceptable icons. Reference this thread:
https://community.adaptlearning.org/mod/forum/discuss.php?d=1681

Picture of Robert Willis
Re: changing + - in the accordion component
by Robert Willis - Wednesday, 2 November 2016, 9:06 PM
 

You guys are a life saver! I was able to turn the plus/minus into up or down triangles. Our client will be very happy.