diff --git a/templates/Sparkle/assets/js/main.js b/templates/Sparkle/assets/js/main.js index b38e14ed..286cc5ef 100644 --- a/templates/Sparkle/assets/js/main.js +++ b/templates/Sparkle/assets/js/main.js @@ -28,7 +28,7 @@ $(document).ready(function() { // Load Newsfeed var ajax_load = "
Loading newsfeed...
"; $("#newsfeeditems").html(ajax_load).load("lib/ajax.php?action=newsfeed", function() { - if ($("#newsfeeditems").html() != "") { + if ($("#newsfeeditems").html().length > 0) { $(window).trigger('resize'); $("#newsfeed").slideDown(); } @@ -39,6 +39,12 @@ $(document).ready(function() { direction: "right" }); + // Enable reset search click + $(".resetsearch").click(function() { + $(".searchtext").val(""); + $(".submitsearch").click(); + }); + // Height of divs fix var snheight = $('#sidenavigation').height(); var mainheight = $('#maincontent').height(); @@ -49,7 +55,7 @@ $(document).ready(function() { // this is necessary for the special setting feature (ref #1010) $.getQueryVariable = function(key) { var urlParams = decodeURI( window.location.search.substring(1) ); - if(urlParams == false | urlParams == '') return null; + if(urlParams === false | urlParams === '') return null; var vars = urlParams.split("&"); for (var i=0;i {$fieldoptions}   -  - +  + +