diff --git a/public/js/functions.js b/public/js/functions.js
index 665d520c..6216864b 100644
--- a/public/js/functions.js
+++ b/public/js/functions.js
@@ -47,7 +47,8 @@ $(document).ready(function(){
isLoading = 1;
$isLoading.show();
var $button = $(this).attr("disabled", "disabled");
- var $container = $(options.container)
+ var $container = $(options.container);
+ $container.each(function(){$(this).find('.no-results').remove();});
// Fire request for the next page
$.ajax({url: options.url + (options.url.indexOf('?') >= 0 ? '&' : '?') + 'pagina=' + options.nextPage + (options.dateStart ? '&dateStart=' + options.dateStart : '') + (options.dateEnd ? '&dateEnd=' + options.dateEnd : '')})
@@ -56,6 +57,7 @@ $(document).ready(function(){
isLoading = 0;
$isLoading.hide();
$button.removeAttr("disabled");
+ $(options.container + ' .loader').remove();
})
.done(function (data) {
if (!data) {
@@ -69,6 +71,12 @@ $(document).ready(function(){
var id = this.toString();
$(id).append($('
'+data+'
').find(id).length ? $(''+data+'
').find(id).children() : $(data));
});
+ $container.each(function () {
+ var id = this.toString();
+ if (!$(id).find('li').length) {
+ $(id).append('Geen items gevonden.');
+ }
+ });
++options.nextPage;
});
}
diff --git a/public/js/functions.min.js b/public/js/functions.min.js
index dec5baca..5b4d17a4 100644
--- a/public/js/functions.min.js
+++ b/public/js/functions.min.js
@@ -1,2 +1,2 @@
/*! 2025-06-30 */
-function calculateSize(e,t){null==t&&(t=0),setTimeout(function(){(0==$("#"+e).children(":first").height()||0==$("#"+e).children(":first").width())&&t<4?calculateSize(e,t+1):($("#"+e).height($("#"+e).children(":first").height()),$("#"+e).width($("#"+e).children(":first").width()))},500),$("#"+e).css({backgroundColor:"transparent"})}$(document).ready(function(){$("#changePreferences, .cc_b_cp").click(function(){$("#title_targeting").parent("li").hide(),$("#content_targeting").hide()})}),function(s){s.fn.loadMoreNews=function(e){var t=!1,a={loadingElementId:"#loading",container:"",url:document.location.pathname,nextPage:2,dateStart:null,dateEnd:null},o=(s.extend(a,e),s(a.loadingElementId,this));o.hide(),this.unbind("click").click(function(e){var n,i;e.preventDefault(),t||(t=1,o.show(),n=s(this).attr("disabled","disabled"),i=s(a.container),s.ajax({url:a.url+(0<=a.url.indexOf("?")?"&":"?")+"pagina="+a.nextPage+(a.dateStart?"&dateStart="+a.dateStart:"")+(a.dateEnd?"&dateEnd="+a.dateEnd:"")}).always(function(){t=0,o.hide(),n.removeAttr("disabled")}).done(function(t){t?(i.each(function(){var e=this.toString();s(e).append(s(""+t+"
").find(e).length?s(""+t+"
").find(e).children():s(t))}),++a.nextPage):n.attr("disabled","disabled").text("Geen nieuws meer.")}))})}}(jQuery),$(function(){$("[data-loadmorenews]").each(function(){$(this).loadMoreNews($(this).data("loadmorenews"))})}),function(a){a.fn.menu=function(e){var t={menuSubmenuClass:"has_submenu"},e=(a.extend(t,e),a(this).children("."+t.menuSubmenuClass)),i=a(this);e.on("mouseenter",function(){var e=a(this),t=(a(".menu-submenu > ul.submenu").slideUp(400,function(){a(this).closest(".menu-submenu").remove()}),a(".hover",i).removeClass("hover"),e.addClass("hover"),a('').append(e.children("ul.submenu").clone())),n=e.offset();t.addClass("menu-submenu").css({top:n.top,left:n.left}),t.on("mouseleave",function(){a(".menu-submenu > ul.submenu").slideUp(400,function(){a(this).closest(".menu-submenu").remove()}),e.removeClass("hover")}),a("body").append(t),t.children("ul.submenu").slideDown(),t.find("ul.submenu").subMenu({}),openPlayerInNewScreen()})},a.fn.subMenu=function(e){var t={menuSubmenuClass:"has_submenu"};a.extend(t,e),a(this).find("li."+t.menuSubmenuClass+" > a").click(function(e){e.preventDefault();e=a(this).closest("li");e.children("ul.submenu").slideToggle(),e.toggleClass("opened")})}}(jQuery),$(function(){$(".menu").menu({}),$(".mobile-menu").subMenu({}),$(".mobile_menu_button a").click(function(){$(".mobile_menu_container").show()}),$(".mobile_close_menu_button a").click(function(){$(".mobile_menu_container").hide()}),$(".mobile_menu_container").click(function(e){!$(e.target).closest("#mobile_menu_nav").length&&$(".mobile_menu_container").is(":visible")&&$(".mobile_menu_container").hide()})}),$(function(){$(".prettyPhoto[rel^='prettyPhoto']").prettyPhoto({show_title:!1,slideshow:3e3,overlay_gallery:!0,social_tools:""})}),$(function(){$(".scroll_top").click(function(e){e.preventDefault(),$("html, body").stop().animate({scrollTop:0},500,"swing")})}),function(a){a.fn.share=function(e){var i={type:"",types:{facebook:{url:"https://www.facebook.com/sharer/sharer.php?u=",textOption:!1},twitter_x:{url:"https://twitter.com/share?url=",textOption:"text="}},excerptClass:"excerpt"};a.extend(i,e),this.click(function(e){e.preventDefault();var t,n,e=i.types[i.type];"native"==i.type&&null!=navigator.share?(278<(n=a("."+i.excerptClass).text().trim()).length+location.href.length&&(n=n.substring(0,278-(location.href.length+3))+"..."),t={url:encodeURI(location.href),text:n,title:a(".page_title").text().trim()},navigator.share(t)):void 0!==e?(t="",e.textOption&&(278<(n=a("."+i.excerptClass).text().trim()).length+location.href.length&&(n=n.substring(0,278-(location.href.length+3))+"..."),t="&"+e.textOption+encodeURI(n)),window.open(e.url+encodeURI(location.href)+t,"pop","width=600, height=400, scrollbars=no")):console.error(i.type+" is unknown")})}}(jQuery),$(function(){$("[data-share]").each(function(){$(this).share({type:$(this).data("share")})})}),function(u){u.fn.snapTo=function(e){var t={elementClass:"post"},n=(u.extend(t,e),u(this)),i=n.find("."+t.elementClass+":visible"),a=!1,o=null,s=function(){var t;a||(a=!0,t=n.scrollLeft(),i.each(function(){var e=u(this).offset();if(e.left>-window.screen.width/2&&e.left"+t+"").find(e).length?s(""+t+"
").find(e).children():s(t))}),i.each(function(){var e=this.toString();s(e).find("li").length||s(e).append('Geen items gevonden.')}),++o.nextPage):n.attr("disabled","disabled").text("Geen nieuws meer.")}))})}}(jQuery),$(function(){$("[data-loadmorenews]").each(function(){$(this).loadMoreNews($(this).data("loadmorenews"))})}),function(o){o.fn.menu=function(e){var t={menuSubmenuClass:"has_submenu"},e=(o.extend(t,e),o(this).children("."+t.menuSubmenuClass)),i=o(this);e.on("mouseenter",function(){var e=o(this),t=(o(".menu-submenu > ul.submenu").slideUp(400,function(){o(this).closest(".menu-submenu").remove()}),o(".hover",i).removeClass("hover"),e.addClass("hover"),o('').append(e.children("ul.submenu").clone())),n=e.offset();t.addClass("menu-submenu").css({top:n.top,left:n.left}),t.on("mouseleave",function(){o(".menu-submenu > ul.submenu").slideUp(400,function(){o(this).closest(".menu-submenu").remove()}),e.removeClass("hover")}),o("body").append(t),t.children("ul.submenu").slideDown(),t.find("ul.submenu").subMenu({}),openPlayerInNewScreen()})},o.fn.subMenu=function(e){var t={menuSubmenuClass:"has_submenu"};o.extend(t,e),o(this).find("li."+t.menuSubmenuClass+" > a").click(function(e){e.preventDefault();e=o(this).closest("li");e.children("ul.submenu").slideToggle(),e.toggleClass("opened")})}}(jQuery),$(function(){$(".menu").menu({}),$(".mobile-menu").subMenu({}),$(".mobile_menu_button a").click(function(){$(".mobile_menu_container").show()}),$(".mobile_close_menu_button a").click(function(){$(".mobile_menu_container").hide()}),$(".mobile_menu_container").click(function(e){!$(e.target).closest("#mobile_menu_nav").length&&$(".mobile_menu_container").is(":visible")&&$(".mobile_menu_container").hide()})}),$(function(){$(".prettyPhoto[rel^='prettyPhoto']").prettyPhoto({show_title:!1,slideshow:3e3,overlay_gallery:!0,social_tools:""})}),$(function(){$(".scroll_top").click(function(e){e.preventDefault(),$("html, body").stop().animate({scrollTop:0},500,"swing")})}),function(o){o.fn.share=function(e){var i={type:"",types:{facebook:{url:"https://www.facebook.com/sharer/sharer.php?u=",textOption:!1},twitter_x:{url:"https://twitter.com/share?url=",textOption:"text="}},excerptClass:"excerpt"};o.extend(i,e),this.click(function(e){e.preventDefault();var t,n,e=i.types[i.type];"native"==i.type&&null!=navigator.share?(278<(n=o("."+i.excerptClass).text().trim()).length+location.href.length&&(n=n.substring(0,278-(location.href.length+3))+"..."),t={url:encodeURI(location.href),text:n,title:o(".page_title").text().trim()},navigator.share(t)):void 0!==e?(t="",e.textOption&&(278<(n=o("."+i.excerptClass).text().trim()).length+location.href.length&&(n=n.substring(0,278-(location.href.length+3))+"..."),t="&"+e.textOption+encodeURI(n)),window.open(e.url+encodeURI(location.href)+t,"pop","width=600, height=400, scrollbars=no")):console.error(i.type+" is unknown")})}}(jQuery),$(function(){$("[data-share]").each(function(){$(this).share({type:$(this).data("share")})})}),function(u){u.fn.snapTo=function(e){var t={elementClass:"post"},n=(u.extend(t,e),u(this)),i=n.find("."+t.elementClass+":visible"),o=!1,a=null,s=function(){var t;o||(o=!0,t=n.scrollLeft(),i.each(function(){var e=u(this).offset();if(e.left>-window.screen.width/2&&e.left= 0 ? '&' : '?') + 'pagina=' + options.nextPage + (options.dateStart ? '&dateStart=' + options.dateStart : '') + (options.dateEnd ? '&dateEnd=' + options.dateEnd : '')})
@@ -34,6 +35,7 @@
isLoading = 0;
$isLoading.hide();
$button.removeAttr("disabled");
+ $(options.container + ' .loader').remove();
})
.done(function (data) {
if (!data) {
@@ -47,6 +49,12 @@
var id = this.toString();
$(id).append($(''+data+'
').find(id).length ? $(''+data+'
').find(id).children() : $(data));
});
+ $container.each(function () {
+ var id = this.toString();
+ if (!$(id).find('li').length) {
+ $(id).append('Geen items gevonden.');
+ }
+ });
++options.nextPage;
});
}
diff --git a/resources/views/news.blade.php b/resources/views/news.blade.php
index 342f66be..e2a1cf53 100644
--- a/resources/views/news.blade.php
+++ b/resources/views/news.blade.php
@@ -53,8 +53,8 @@
options.dateStart = start.format('YYYY-MM-DD');
options.dateEnd = end.format('YYYY-MM-DD');
options.nextPage = 1;
- console.log(options);
$('.content_container #items-more-news li').remove();
+ $('.content_container #items-more-news').append(' Laden...');
$moreNews.loadMoreNews(options);
$moreNews.click();
});