javascript/web/DDBrowse.js
function(term_id){

	return function(){
	    // Create manager.
	    var engine = new jquery_engine(golr_response);
	    engine.method('GET');
	    engine.use_jsonp(true);
	    var manager = new golr_manager(gserv, gconf, engine, 'async');
	    
	    // Manager settings.
	    var personality = 'bioentity';
	    var confc = gconf.get_class(personality);
	    manager.set_personality(personality);
	    manager.add_query_filter('document_category',
				     confc.document_category());
	    manager.set_results_count(0); // don't need any actual rows returned
            manager.set_facet_limit(0); // care not about facets
	    
	    manager.add_query_filter('regulates_closure', term_id);
	    //manager.add_query_filter('isa_partof_closure', term_id);
	    
	    return manager.search();
	};
    }
function(term_id){

	return function(){
	    // Create manager.
	    var engine = new jquery_engine(golr_response);
	    engine.method('GET');
	    engine.use_jsonp(true);
	    var manager = new golr_manager(gserv, gconf, engine, 'async');
	    
	    // Manager settings.
	    var personality = 'bioentity';
	    var confc = gconf.get_class(personality);
	    manager.set_personality(personality);
	    manager.add_query_filter('document_category',
				     confc.document_category());
	    manager.set_results_count(0); // don't need any actual rows returned
            manager.set_facet_limit(0); // care not about facets
	    
	    manager.add_query_filter('regulates_closure', term_id);
	    //manager.add_query_filter('isa_partof_closure', term_id);
	    
	    return manager.search();
	};
    }
function ( term_id ) { return function ( ) { // Create manager. var engine = new jquery_engine ( golr_response ) ; engine . method ( 'GET' ) ; engine . use_jsonp ( true ) ; var manager = new golr_manager ( gserv , gconf , engine , 'async' ) ; // Manager settings. var personality = 'bioentity' ; var confc = gconf . get_class ( personality ) ; manager . set_personality ( personality ) ; manager . add_query_filter ( 'document_category' , confc . document_category ( ) ) ; manager . set_results_count ( 0 ) ; // don't need any actual rows returned manager . set_facet_limit ( 0 ) ; // care not about facets manager . add_query_filter ( 'regulates_closure' , term_id ) ; //manager.add_query_filter('isa_partof_closure', term_id); return manager . search ( ) ; } ; }
Create a new function that returns a promise when called.
Create a new function that returns a promise when called .