@ -1,6 +1,8 @@
Drupal . behaviors . roblib _search _solr _site _guides = {
Drupal . behaviors . roblib _search _solr _site _guides = {
attach : function ( context , settings ) {
attach : function ( context , settings ) {
$url = settings . roblib _search _solr _site _guides . search _url ;
$url = settings . roblib _search _solr _site _guides . search _url ;
query = settings . roblib _search _solr _site _results . search _query ;
baseUrl = settings . roblib _search _solr _site _results . base _url ;
jQuery . getJSON ( $url , function ( data ) {
jQuery . getJSON ( $url , function ( data ) {
var items = [ ] ;
var items = [ ] ;
var numberOfDocs = 0 ;
var numberOfDocs = 0 ;
@ -29,6 +31,10 @@ Drupal.behaviors.roblib_search_solr_site_guides = {
jQuery ( '#' + 'roblib-search-content-solr-site-guides' ) . empty ( ) . append ( items . join ( '' ) ) ;
jQuery ( '#' + 'roblib-search-content-solr-site-guides' ) . empty ( ) . append ( items . join ( '' ) ) ;
qtipify ( divs , content , 'Description' ) ;
qtipify ( divs , content , 'Description' ) ;
}
}
if ( numberOfDocs > 0 )
{
jQuery ( '#' + 'roblib-search-solr-site-guides-more' ) . empty ( ) . append ( '<a href="' + baseUrl + '/search/site/' + query + '?f[0]sm_vid_SearchKeywords:guides">see all results</a>' ) ;
}
} ) ;
} ) ;
}
}