diff --git a/js/helpers.js b/js/helpers.js index ab7da50..0107f62 100644 --- a/js/helpers.js +++ b/js/helpers.js @@ -20,6 +20,16 @@ define([ } }, + toc__isSelected: function(id, options) { + var model = Adapt.findById(id); + + const isSelected = (model.get('_isVisible') && Adapt.location._currentId == id); + if (isSelected) { + return options.fn(this); + } + return options.inverse(this); + }, + toc__getTitle: function(id, options) { var model = Adapt.findById(id); var t = model.get('displayTitle'); diff --git a/less/toc.less b/less/toc.less index 674eb3b..5fbf972 100644 --- a/less/toc.less +++ b/less/toc.less @@ -170,16 +170,16 @@ } } -.toc__item-btn.is-disabled { +.toc__item-btn.is-selected { .toc__indicator { - border-color: @disabled-inverted; + border-color: @drawer-progress-border; } .toc__indicator-inner { - background-color: @disabled; + background-color: @drawer-item-selected; } .toc__indicator-bar { - background-color: @disabled-inverted; + background-color: @drawer-progress; } } diff --git a/templates/partials/tocContentObjects.hbs b/templates/partials/tocContentObjects.hbs index a5ca2e0..6e5647e 100644 --- a/templates/partials/tocContentObjects.hbs +++ b/templates/partials/tocContentObjects.hbs @@ -6,7 +6,7 @@ {{#each this}}