external/bbop.js
function _draw_table_or_something(resp, manager){

	// Wipe interface.
	jQuery('#' + interface_id).empty();

	// Vary by what we got.
	if( ! resp.success() || resp.total_documents() === 0 ){
	    jQuery('#' + interface_id).append('<em>No results given your input and search fields. Please refine and try again.</em>');
	    last_response = null;
	}else{
	    last_response = resp;

	    // Render the buttons.
	    //console.log('user_buttons: ', user_buttons);
	    if( user_buttons && user_buttons.length && user_buttons.length > 0 ){

		// Ensure we have somewhere to put our buttons. If not
		// supplied with an injection id, make our own and use
		// it.
		var insert_div_id = user_buttons_div_id;
		if( ! user_buttons_div_id ){

		    // Generate new dic and add it to the display.
		    var ubt_attrs = {
			'generate_id': true
		    };
		    var ubt = new bbop.html.tag('div', ubt_attrs);
		    jQuery('#' + interface_id).append(ubt.to_string());
		    
		    // Ensure the id.
		    insert_div_id = ubt.get_id();
		}

		// Add all of the defined buttons after the spacing.
		_draw_user_buttons(user_buttons, insert_div_id);
	    }

	    // Display results.
	    var bwd = bbop.widget.display;
	    results_table =
		new bwd.results_table_by_class_conf_b3(conf_class, resp, linker,
						       handler, interface_id,
						       selectable_p,
						       select_column_id,
						       select_item_name);
	}
    }
function _draw_table_or_something(resp, manager){

	// Wipe interface.
	jQuery('#' + interface_id).empty();

	// Vary by what we got.
	if( ! resp.success() || resp.total_documents() === 0 ){
	    jQuery('#' + interface_id).append('<em>No results given your input and search fields. Please refine and try again.</em>');
	    last_response = null;
	}else{
	    last_response = resp;

	    // Render the buttons.
	    //console.log('user_buttons: ', user_buttons);
	    if( user_buttons && user_buttons.length && user_buttons.length > 0 ){

		// Ensure we have somewhere to put our buttons. If not
		// supplied with an injection id, make our own and use
		// it.
		var insert_div_id = user_buttons_div_id;
		if( ! user_buttons_div_id ){

		    // Generate new dic and add it to the display.
		    var ubt_attrs = {
			'generate_id': true
		    };
		    var ubt = new bbop.html.tag('div', ubt_attrs);
		    jQuery('#' + interface_id).append(ubt.to_string());
		    
		    // Ensure the id.
		    insert_div_id = ubt.get_id();
		}

		// Add all of the defined buttons after the spacing.
		_draw_user_buttons(user_buttons, insert_div_id);
	    }

	    // Display results.
	    var bwd = bbop.widget.display;
	    results_table =
		new bwd.results_table_by_class_conf_b3(conf_class, resp, linker,
						       handler, interface_id,
						       selectable_p,
						       select_column_id,
						       select_item_name);
	}
    }
function _draw_table_or_something ( resp , manager ) { // Wipe interface. jQuery ( '#' + interface_id ) . empty ( ) ; // Vary by what we got. if ( ! resp . success ( ) || resp . total_documents ( ) === 0 ) { jQuery ( '#' + interface_id ) . append ( '<em>No results given your input and search fields. Please refine and try again.</em>' ) ; last_response = null ; } else { last_response = resp ; // Render the buttons. //console.log('user_buttons: ', user_buttons); if ( user_buttons && user_buttons . length && user_buttons . length > 0 ) { // Ensure we have somewhere to put our buttons. If not // supplied with an injection id, make our own and use // it. var insert_div_id = user_buttons_div_id ; if ( ! user_buttons_div_id ) { // Generate new dic and add it to the display. var ubt_attrs = { 'generate_id' : true } ; var ubt = new bbop . html . tag ( 'div' , ubt_attrs ) ; jQuery ( '#' + interface_id ) . append ( ubt . to_string ( ) ) ; // Ensure the id. insert_div_id = ubt . get_id ( ) ; } // Add all of the defined buttons after the spacing. _draw_user_buttons ( user_buttons , insert_div_id ) ; } // Display results. var bwd = bbop . widget . display ; results_table = new bwd . results_table_by_class_conf_b3 ( conf_class , resp , linker , handler , interface_id , selectable_p , select_column_id , select_item_name ) ; } }
Draw a table at the right place or an error message.
Draw a table at the right place or an error message .