@ -2,6 +2,7 @@ Drupal.behaviors.roblib_search_passthru = {
attach : function ( context , settings ) {
attach : function ( context , settings ) {
scholar _url = settings . roblib _search _passthru . scholar _search _url ;
scholar _url = settings . roblib _search _passthru . scholar _search _url ;
evergreen _url = settings . roblib _search _passthru . evergreen _search _url ;
evergreen _url = settings . roblib _search _passthru . evergreen _search _url ;
eds _url = settings . roblib _search _passthru . eds _search _url ;
jQuery . getJSON ( scholar _url , function ( data ) {
jQuery . getJSON ( scholar _url , function ( data ) {
var scholar _numfound = data . response . numFound ;
var scholar _numfound = data . response . numFound ;
var query = encodeURIComponent ( data . responseHeader . params . q ) ;
var query = encodeURIComponent ( data . responseHeader . params . q ) ;
@ -14,6 +15,12 @@ Drupal.behaviors.roblib_search_passthru = {
jQuery ( '#roblib-search-passthru-evergreen-more' ) . empty ( ) . append ( '<a href = "' + data . catalogBaseSearchUrl + '">PEI Collection (' +
jQuery ( '#roblib-search-passthru-evergreen-more' ) . empty ( ) . append ( '<a href = "' + data . catalogBaseSearchUrl + '">PEI Collection (' +
evergreen _numfound + ')</a>' ) ;
evergreen _numfound + ')</a>' ) ;
} ) ;
} ) ;
jQuery . getJSON ( eds _url , function ( data ) {
var eds _numfound = data . recordCount ;
var href _str = 'http://search.ebscohost.com/login.aspx?direct=true&site=ehost-live&scope=site&type=1&custid=uprince&groupid=main&profid=eds&mode=bool&lang=en&bquery=' ;
jQuery ( '#roblib-search-passthru-eds-more' ) . empty ( ) . append ( '<a href="http://proxy.library.upei.ca/login?url=' + href _str + query + '">Complete OneSearch results (' +
eds _numfound + ')</a>' ) ;
} ) ;
jQuery ( '#roblib-search-content-passthru' ) . empty ( ) ;
jQuery ( '#roblib-search-content-passthru' ) . empty ( ) ;
}
}
}
}