Update facets-views-ajax.js
This commit is contained in:
parent
9db244bf4b
commit
03d05ca2c2
1 changed files with 5 additions and 3 deletions
|
|
@ -245,7 +245,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
/* digitalutsc added */
|
/* digitalutsc added */
|
||||||
$('.pager__sort select[name="order"]')
|
$('.pager__sort select[name="order"]')
|
||||||
.once()
|
.once()
|
||||||
.change(function () {
|
.change(function () {
|
||||||
var href = window.location.href;
|
var href = window.location.href;
|
||||||
|
|
@ -253,13 +253,15 @@
|
||||||
|
|
||||||
var selection = $(this).val();
|
var selection = $(this).val();
|
||||||
var option = selection.split('_');
|
var option = selection.split('_');
|
||||||
params.sort_by = option[0];
|
//params.sort_by = option[0];
|
||||||
params.sort_order = option[1].toUpperCase();
|
params.sort_order = option[option.length - 1].toUpperCase();
|
||||||
|
params.sort_by = selection.replace("_" + option[option.length - 1], "");
|
||||||
|
|
||||||
href = href.split("?")[0] + "?" + $.param(params);
|
href = href.split("?")[0] + "?" + $.param(params);
|
||||||
window.history.pushState(null, document.title, href);
|
window.history.pushState(null, document.title, href);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// Trigger on sort change.
|
// Trigger on sort change.
|
||||||
$('[data-drupal-pager-id] select[name="order"]')
|
$('[data-drupal-pager-id] select[name="order"]')
|
||||||
.once()
|
.once()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue