You are here

function theme_block_manual_refresh_js in Block Refresh 5

Add a manual refresh button to the header...

1 theme call to theme_block_manual_refresh_js()
block_refresh_footer in ./block_refresh.module
implements hook_footer calls the jquery to refresh blocks automatically, but only if the blocks exist on the current page and are enabled

File

./block_refresh.module, line 221

Code

function theme_block_manual_refresh_js($block) {

  // this is the block div css id and content class
  $div = "block-{$block['block']['block']}-{$block['block']['delta']}";
  $base = base_path();
  $url = "{$base}block_refresh/{$block['block']['block']}/{$block['block']['delta']}";
  $content_url = "#{$div} .content";
  $js .= "  block_refresh_add_button('{$div}', '{$url}', '{$content_url}');";
  return $js;
}