2

I'm trying to add arrow icons that change direction as the blacklight search facet collapses and reopens like here: http://www.bootply.com/88286 The icon appears but does not change when collapsed. Below is the partial for each facet group or "panel panel-default" div

<div class="panel panel-default facet_limit blacklight-<%= facet_field.field.parameterize %> <%= 'facet_limit-active' if facet_field_in_params?(facet_field.field) %>">
  <div class="<%= "collapsed" if should_collapse_facet?(facet_field) %> collapse-toggle panel-heading" data-toggle="collapse" data-target="#<%= facet_field_id(facet_field) %>">
    <h5 class="panel-title">
        <a class="accordion-toggle" data-toggle="collapse"
        >
      <%= link_to facet_field_label(facet_field.field), "#", :"data-no-turbolink" => true %>
        </a>
    </h5>
  </div>
  <div id="<%= facet_field_id(facet_field) %>" class="panel-collapse facet-content <%= should_collapse_facet?(facet_field) ? 'collapse' : 'in' %>">
    <div class="panel-body">
       <%= yield %>
    </div>
   </div>
</div>

The css I added to the bootstrap css:

.panel-heading .accordion-toggle:after {
    /* symbol for "opening" panels */
    font-family: 'Glyphicons Halflings';  /* essential for enabling glyphicon */
    content: "\e114";    /* adjust as needed, taken from bootstrap.css */
    float: right;        /* adjust as needed */
    color: grey;         /* adjust as needed */
}
.panel-heading .accordion-toggle.collapsed:after {
    /* symbol for "collapsed" panels */
    content: "\e080";    /* adjust as needed, taken from bootstrap.css */
}
user3612719
  • 89
  • 1
  • 11
  • It works for me with the latest version of Firefox, the icon changes when clicked. – A.L Jun 07 '14 at 00:19

0 Answers0