You are here

function modalframe_parent_js in Modal Frame API 7

Same name and namespace in other branches
  1. 6 modalframe.module \modalframe_parent_js()

API: Add javascript and stylesheets to the parent page.

1 call to modalframe_parent_js()
modalframe_example_page in modules/modalframe_example/modalframe_example.module
Menu callback; Generate the parent window, from where all examples are available.

File

./modalframe.module, line 254
Provides an API to render an iframe within a modal dialog based on the jQuery UI Dialog plugin.

Code

function modalframe_parent_js() {
  static $processed;

  // Make sure external resources are not included more than once.
  if (isset($processed)) {
    return;
  }
  $processed = TRUE;
  drupal_add_library('system', 'ui.dialog');
  drupal_add_library('system', 'ui.draggable');
  $module_path = drupal_get_path('module', 'modalframe');
  drupal_add_css($module_path . '/css/modalframe.parent.css');
  drupal_add_js($module_path . '/js/parent.js');
}