Skip to content

Commit

Permalink
Match admin advanced search toggle to public default.
Browse files Browse the repository at this point in the history
  • Loading branch information
kimisgold committed Jul 22, 2024
1 parent 14022a5 commit 5826720
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions admin/themes/default/javascripts/globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,21 +89,20 @@ if (!Omeka) {
};

Omeka.showAdvancedForm = function () {
var advancedForm = $('#advanced-form');
advancedForm.click(function (event) {
event.stopPropagation();
});
$("#advanced-search").click(function (event) {
event.preventDefault();
event.stopPropagation();
advancedForm.fadeToggle();
$(document).click(function (event) {
if (event.target.id == 'query') {
return;
}
advancedForm.fadeOut();
$(this).unbind(event);
});
var advanced_form = $('#advanced-form');
advanced_form.addClass('closed');
$('#search-container').addClass('with-advanced');

$('.show-advanced').click(function(e) {
e.preventDefault();
var advanced_toggle = $(this);
advanced_toggle.toggleClass('open').toggleClass('closed');
advanced_form.toggleClass('open').toggleClass('closed');
if (advanced_toggle.hasClass('open')) {
advanced_toggle.attr('aria-expanded', true);
} else {
advanced_toggle.attr('aria-expanded', false);
}
});
};

Expand Down

0 comments on commit 5826720

Please sign in to comment.