You are here

function panels_common_add_context_js in Panels 5.2

Same name and namespace in other branches
  1. 6.2 includes/common-context.inc \panels_common_add_context_js()
3 calls to panels_common_add_context_js()
panels_mini_context_form in panels_mini/panels_mini.module
Form to edit the context settings of a mini panel.
panels_node_context_form in panels_node/panels_node.module
The form to edit the context settings of a panel node.
panels_page_context_form in panels_page/panels_page.admin.inc
The form to edit the context settings of a panel page.

File

includes/common.inc, line 693
Functions used by more than one panels client module.

Code

function panels_common_add_context_js($base) {
  $settings = array(
    'list' => $base,
    'panels' => array(
      'closeText' => t('Close Window'),
      'closeImage' => theme('image', panels_get_path('images/close.gif'), t('Close window'), t('Close window')),
      'throbber' => theme('image', panels_get_path('images/throbber.gif'), t('Loading...'), t('Loading')),
    ),
  );
  drupal_add_js($settings, 'setting');
  drupal_add_js(panels_get_path('js/list.js'));
  drupal_add_js(panels_get_path('js/lib/dimensions.js'));
  drupal_add_js(panels_get_path('js/lib/mc.js'));
  drupal_add_js(panels_get_path('js/lib/form.js'));
  drupal_add_js(panels_get_path('js/modal_forms.js'));
  drupal_add_css(panels_get_path('css/panels_dnd.css'));

  // while we don't use this directly some of our forms do.
  drupal_add_js('misc/collapse.js');
  drupal_add_js('misc/autocomplete.js');
}