Skip to content

Commit

Permalink
feat(search): remember assistance's open/closed state
Browse files Browse the repository at this point in the history
  • Loading branch information
micgro42 committed Mar 22, 2018
1 parent 4d0cb6e commit e5bf110
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/scripts/search.js
Expand Up @@ -11,6 +11,13 @@ jQuery(function () {
const $toggleAssistanceButton = $searchForm.find('#search-results-form__show-assistance-button');

$toggleAssistanceButton.on('click', function () {
jQuery('.js-advancedSearchOptions').dw_toggle();
jQuery('.js-advancedSearchOptions').toggle();
DokuCookie.setValue('showSearchAssistant', !DokuCookie.getValue('showSearchAssistant'));
});

if (DokuCookie.getValue('showSearchAssistant')) {
$toggleAssistanceButton.click();
}


});

0 comments on commit e5bf110

Please sign in to comment.