Renamed the module's machine name from islandora_advanced_search to `advanced_search
This commit is contained in:
parent
c210ee062c
commit
a3cca6bc37
36 changed files with 130 additions and 130 deletions
|
|
@ -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);
|
||||
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue