diff --git a/templates/element/genericElements/ListTopBar/group_context_filters.php b/templates/element/genericElements/ListTopBar/group_context_filters.php index 3966c57..6a5841e 100644 --- a/templates/element/genericElements/ListTopBar/group_context_filters.php +++ b/templates/element/genericElements/ListTopBar/group_context_filters.php @@ -20,13 +20,15 @@ $contextArray[] = [ 'active' => $currentQuery == $currentFilteringContext, 'isFilter' => true, - 'onClick' => 'UI.reload', + 'onClick' => 'changeIndexContext', 'onClickParams' => [ + 'this', $this->Url->build($urlParams), "#table-container-${tableRandomValue}", "#table-container-${tableRandomValue} table.table", ], 'text' => $filteringContext['label'], + 'class' => 'btn-sm' ]; } @@ -42,4 +44,19 @@ 'data' => $dataGroup, 'tableRandomValue' => $tableRandomValue ]); - echo ''; \ No newline at end of file + echo ''; +?> + + \ No newline at end of file diff --git a/webroot/js/bootstrap-helper.js b/webroot/js/bootstrap-helper.js index c740e7d..fc9c303 100644 --- a/webroot/js/bootstrap-helper.js +++ b/webroot/js/bootstrap-helper.js @@ -573,10 +573,11 @@ class OverlayFactory { * @param {(jQuery|string)} node - The node on which the overlay should be placed * @param {Object} options - The options supported by OverlayFactory#defaultOptions */ - constructor(node, options) { + constructor(node, options={}) { this.node = node this.$node = $(this.node) this.options = Object.assign({}, OverlayFactory.defaultOptions, options) + this.options.auto = options.auto ? this.options.auto : !(options.variant || options.spinnerVariant) if (this.options.auto) { this.adjustOptionsBasedOnNode() } @@ -590,6 +591,7 @@ class OverlayFactory { * @property {number} auto - Whether overlay and spinner options should be adapted automatically based on the node * @property {string=('primary'|'secondary'|'success'|'danger'|'warning'|'info'|'light'|'dark'|'white'|'transparent')} spinnerVariant - The variant of the spinner * @property {boolean} spinnerSmall - If the spinner inside the overlay should be small + * @property {string=('border'|'grow')} spinnerSmall - If the spinner inside the overlay should be small */ static defaultOptions = { variant: 'light', @@ -599,12 +601,13 @@ class OverlayFactory { auto: true, spinnerVariant: '', spinnerSmall: false, + spinnerType: 'border' } static overlayWrapper = '
' static overlayContainer = '' static overlayBg = '' - static overlaySpinner = '