Further to my earlier post "Extending syntax of external searches." I have also 
modified the file templates/html/extsearch.js to 
modify the format of the output of the search . Again I am posting it here in 
the hope someone finds it useful.


In "function(data)" :


r+='<tr class="searchresult">'+
            '<td align="right">'+(data.first+i+1)+'.</td>'+
            '<td>  (<span style="font-style:italic;"> <a 
href="'+escapeHtml(prefix)+'">'+escapeHtml(item.tag)+'</a></span>) 
'+escapeHtml(item.type)+'&#160;'+
                 '<a href="'+escapeHtml(prefix+item.url)+
                 '">'+escapeHtml(item.name)+'</a>';

For each item I include a hyperlink to the top of the package from which the 
item was found.


and I added a "fail()" method to give a response when doxysearch.cgi returns an 
error, for example if the wildcard search exceeds 
its limit:

  } else {
       results.html('<p>'+searchResultsText[0]+'</p>');
     }
   })
   .fail(
           function(jqXHR, textStatus, errorThrown){
                   var results = $('#searchresults');
                   var response=jqXHR.responseText;
                   response = response.replace('(','');
                   response = response.replace(')','');
                   results.html('<h1> Your Search Failed</h1> ');
                   var error = JSON.parse(response);
                   results.append(escapeHtml(error.error));
       }
   );
}



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Doxygen-users mailing list
Doxygen-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/doxygen-users

Reply via email to