Commit 9d636d17 authored by dje's avatar dje
Browse files

correctif lien vers lib js dotdotdot dans la recherche

parent 6fc26524
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ function runSearch(search, docs, transform, divToFeed, dotdot){
        function(data){
          divToFeed.html(data); 
          //dynamic dotdotdot library import
          $("head").append('<script type="text/javascript" src="' + MAX.getBaseURL() + '/ui/js/lib/jQuery.dotdotdot/src/js/jquery.dotdotdot.min.js"></script>');
          $("head").append('<script type="text/javascript" src="' + MAX.getBaseURL()+'/'+MAX.getProjectID() + '/core/ui/js/lib/jQuery.dotdotdot/src/js/jquery.dotdotdot.min.js"></script>');
         
          updateHitsInfo(docs, dotdot);
        }  
+1 −1
Original line number Diff line number Diff line
function runSearch(e,t,s,r,i){$.post(MAX.getBaseURL()+"/"+MAX.getProjectID()+"/search",{search:e,docs:t,transform:s},function(e){r.html(e),$("head").append('<script type="text/javascript" src="'+MAX.getBaseURL()+'/ui/js/lib/jQuery.dotdotdot/src/js/jquery.dotdotdot.min.js"></script>'),updateHitsInfo(t,i)})}function runSearchFromForm(){var e=$("#searchInput").val();if(""===e.trim())return void alert("Recherche vide ou incorrecte.");$("#searchLoading").show();var t=$("#searchSelect").val(),s=$("#searchTransform").prop("checked")?"yes":"no";runSearch(e,t,s,$("#searchResults"),!0)}function updateHitsInfo(e,t){$(".hit").each(function(){$(this).prepend("<span class='hit_range'>["+($(this).prevAll(".hit").size()+1)+"]</span>")}),$("#searchResults").prepend("<div class='n-search-result'>"+$(".hit").length+" résultat(s)</div>"),t&&$(".hit").dotdotdot({ellipsis:" ... ",wrap:"word"}),$("#hits").css("visibility","visible"),$("#searchLoading").hide()}
 No newline at end of file
function runSearch(e,t,s,r,i){$.post(MAX.getBaseURL()+"/"+MAX.getProjectID()+"/search",{search:e,docs:t,transform:s},function(e){r.html(e),$("head").append('<script type="text/javascript" src="'+MAX.getBaseURL()+"/"+MAX.getProjectID()+'/core/ui/js/lib/jQuery.dotdotdot/src/js/jquery.dotdotdot.min.js"></script>'),updateHitsInfo(t,i)})}function runSearchFromForm(){var e=$("#searchInput").val();if(""===e.trim())return void alert("Recherche vide ou incorrecte.");$("#searchLoading").show();var t=$("#searchSelect").val(),s=$("#searchTransform").prop("checked")?"yes":"no";runSearch(e,t,s,$("#searchResults"),!0)}function updateHitsInfo(e,t){$(".hit").each(function(){$(this).prepend("<span class='hit_range'>["+($(this).prevAll(".hit").size()+1)+"]</span>")}),$("#searchResults").prepend("<div class='n-search-result'>"+$(".hit").length+" résultat(s)</div>"),t&&$(".hit").dotdotdot({ellipsis:" ... ",wrap:"word"}),$("#hits").css("visibility","visible"),$("#searchLoading").hide()}
 No newline at end of file