Feature: Added new News date filter to the news page

This commit is contained in:
Jorit Tijsen
2025-06-30 16:40:44 +02:00
parent 34f5cfca73
commit 7f1688ee89
6 changed files with 91 additions and 24 deletions

View File

@@ -0,0 +1 @@
<svg id="Layer_1" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg" data-name="Layer 1"><path d="m40.873 54.653h72.749v-36.653a12 12 0 0 1 24 0v36.653h106.378v-36.653a12 12 0 0 1 24 0v36.653h106.378v-36.653a12 12 0 0 1 24 0v36.653h72.749a28.958 28.958 0 0 1 28.873 28.873v81.25h-488v-81.25a28.958 28.958 0 0 1 28.873-28.873zm72.749 0v36.653a12 12 0 0 0 24 0v-36.653zm130.378 0v36.653a12 12 0 0 0 24 0v-36.653zm130.378 0v36.653a12 12 0 0 0 24 0v-36.653zm-85.24 186.469a12 12 0 0 1 16.969 16.968l-55.5 55.5a12 12 0 0 1 -16.969 0l-27.748-27.748a12 12 0 0 1 16.969-16.969l19.264 19.264 47.012-47.012zm-148.879 0a12 12 0 0 1 16.968 16.968l-55.5 55.5a12 12 0 0 1 -16.969 0l-27.744-27.751a12 12 0 0 1 16.969-16.969l19.264 19.264zm223 124.551h83.241a12 12 0 0 1 12 12v55.5a12 12 0 0 1 -12 12h-83.243a12 12 0 0 1 -12-12v-55.5a12 12 0 0 1 12-12zm71.245 24h-59.247v31.5h59.243v-31.5zm-220.124-24h83.245a12 12 0 0 1 12 12v55.5a12 12 0 0 1 -12 12h-83.247a12 12 0 0 1 -12-12v-55.5a12 12 0 0 1 12-12zm71.245 24h-59.247v31.5h59.245v-31.5zm-220.125-24h83.245a12 12 0 0 1 12 12v55.5a12 12 0 0 1 -12 12h-83.245a12 12 0 0 1 -12-12v-55.5a12 12 0 0 1 12-12zm71.245 24h-59.245v31.5h59.245zm226.512-152.067h83.243a12 12 0 0 1 12 12v55.5a12 12 0 0 1 -12 12h-83.243a12 12 0 0 1 -12-12v-55.5a12 12 0 0 1 12-12zm71.245 24h-59.245v31.5h59.243v-31.5zm65.5-72.83h-488.002v288.351a28.958 28.958 0 0 0 28.873 28.873h430.254a28.958 28.958 0 0 0 28.873-28.873z" fill-rule="evenodd"/></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -31,14 +31,16 @@ $(document).ready(function(){
loadingElementId: '#loading',
container: '',
url: document.location.pathname,
nextPage: 2
nextPage: 2,
dateStart: null,
dateEnd:null
};
$.extend(options, _options);
var $isLoading = $(options.loadingElementId, this);
$isLoading.hide();
this.click(function (e) {
this.unbind('click').click(function (e) {
e.preventDefault();
if (!isLoading) {
// Set flag and update UI
@@ -48,7 +50,7 @@ $(document).ready(function(){
var $container = $(options.container)
// Fire request for the next page
$.ajax({url: options.url + (options.url.indexOf('?') >= 0 ? '&' : '?') + 'pagina=' + options.nextPage})
$.ajax({url: options.url + (options.url.indexOf('?') >= 0 ? '&' : '?') + 'pagina=' + options.nextPage + (options.dateStart ? '&dateStart=' + options.dateStart : '') + (options.dateEnd ? '&dateEnd=' + options.dateEnd : '')})
.always(function () {
// Whether success or failure, update the UI again
isLoading = 0;

File diff suppressed because one or more lines are too long