You are here

function asset_page_alter in Asset 7

Implements hook_page_alter().

File

./asset.module, line 743
Asset module.

Code

function asset_page_alter(&$page) {
  global $theme_key;
  $tooltip = asset_is_tooltip();
  $popup = asset_is_popup();
  if ($popup || $tooltip) {
    drupal_set_breadcrumb(array());
    module_invoke_all('suppress');
    foreach (element_children($page) as $key) {
      if ($key != 'content') {
        unset($page[$key]);
      }
    }
    if ($tooltip) {

      // Add specific theme and library for tooltip iframes.
      $page['#theme'] = 'asset_tooltip';
      drupal_add_library('asset', 'asset_tooltip_inner');
    }
    elseif ($popup) {
      $admin_theme = variable_get('admin_theme', 'seven');
      if ($theme_key == $admin_theme && $admin_theme == 'seven') {
        drupal_add_css(ASSET_MODULE_PATH . '/css/asset-popup-inner-form.css');
      }
    }
  }
}