Renamed the module's machine name from islandora_advanced_search to `advanced_search

This commit is contained in:
Kyle Huynh 2021-12-09 10:06:25 -05:00
parent c210ee062c
commit a3cca6bc37
36 changed files with 130 additions and 130 deletions

View file

@ -1,8 +1,8 @@
//# sourceURL=modules/contrib/islandora_advanced_search/js/islandora-advanced-search.admin.js
//# sourceURL=modules/contrib/advanced_search/js/islandora-advanced-search.admin.js
/**
* @file
* Largely based on core/modules/blocks/js/blocks.js
*
*
* This file allows for moving rows between two regions in a table and have the
* 'region' field update appropriately.
*/
@ -110,4 +110,4 @@
});
}
};
})(jQuery, window, Drupal);
})(jQuery, window, Drupal);

View file

@ -1,4 +1,4 @@
//# sourceURL=modules/contrib/islandora/modules/islandora_advanced_search/js/islandora-advanced-search.form.js
//# sourceURL=modules/contrib/islandora/modules/advanced_search/js/islandora-advanced-search.form.js
/**
* @file
* Handles Ajax submission / updating form action on url change, etc.
@ -81,10 +81,10 @@
return window.location.href.split("?")[0] + "?" + $.param(params);
}
Drupal.behaviors.islandora_advanced_search_form = {
Drupal.behaviors.advanced_search_form = {
attach: function (context, settings) {
if (settings.islandora_advanced_search_form.id !== 'undefined') {
const $form = $('form#' + settings.islandora_advanced_search_form.id).once();
if (settings.advanced_search_form.id !== 'undefined') {
const $form = $('form#' + settings.advanced_search_form.id).once();
if ($form.length > 0) {
window.addEventListener("pushstate", function (e) {
$form.attr('action', window.location.pathname + window.location.search);
@ -96,25 +96,25 @@
});
// Prevent form submission and push state instead.
//
// Logic server side / client side should match to generate the
// Logic server side / client side should match to generate the
// appropriate URL with javascript enabled or disable.
//
// If a route is set for the view display that this form is derived
// from, and we are not on the same page as that route, rely on the
// normal submit which will redirect to the appropriate page.
if (!settings.islandora_advanced_search_form.redirect) {
// normal submit which will redirect to the appropriate page.
if (!settings.advanced_search_form.redirect) {
$form.submit(function (e) {
e.preventDefault();
e.stopPropagation();
const inputs = $form.serializeArray();
const href = url(inputs, settings.islandora_advanced_search_form);
const href = url(inputs, settings.advanced_search_form);
window.history.pushState(null, document.title, href);
});
}
// Reset should trigger refresh of AJAX Blocks / Views.
$form.find('input[data-drupal-selector = "edit-reset"]').mousedown(function (e) {
const inputs = [];
const href = url(inputs, settings.islandora_advanced_search_form);
const href = url(inputs, settings.advanced_search_form);
window.history.pushState(null, document.title, href);
});
}

View file

@ -1,4 +1,4 @@
//# sourceURL=modules/contrib/islandora/modules/islandora_advanced_search/js/facets/facets-view.ajax.js
//# sourceURL=modules/contrib/islandora/modules/advanced_search/js/facets/facets-view.ajax.js
/**
* @file
* Overrides the facets-view-ajax.js behavior from the 'facets' module.
@ -132,7 +132,7 @@
window.history.pushState(null, document.title, $(this).attr("href"));
});
/* digitalutsc added */
$('.pager__sort select[name="order"]')
.once()

View file

@ -1,4 +1,4 @@
//# sourceURL=modules/contrib/islandora/modules/islandora_advanced_search/js/facets/soft-limit.js
//# sourceURL=modules/contrib/islandora/modules/advanced_search/js/facets/soft-limit.js
/**
* @file
* Overrides the soft-limit.js behavior from the 'facets' module.