You are here

function _panels_common_context_js in Panels 5.2

4 calls to _panels_common_context_js()
panels_common_add_argument_form in includes/
Add the argument table plus gadget plus javascript to the form.
panels_common_add_context_form in includes/
panels_common_add_relationship_form in includes/
panels_common_add_required_context_form in includes/


includes/, line 668
Functions used by more than one panels client module.


function _panels_common_context_js($name, $module, $type) {
  return array(
    $type . '-table' => array(
      // The buttons that do stuff.
      'remove' => "input.{$type}-remove",
      // The gadget that stores our the order of items.
      'order' => "input#{$type}-order",
      'up' => "input.{$type}-up",
      'down' => "input.{$type}-down",
      'configure' => "input.{$type}-settings",
      'configure_path' => url("panels/common/ajax/edit/{$module}/{$type}/{$name}", NULL, NULL, TRUE),
      // The button that adds an item
      'add' => "input#edit-buttons-{$type}-add",
      // Path for ajax on adding an item
      'path' => url("panels/common/ajax/add/{$module}/{$type}/{$name}", NULL, NULL, TRUE),
      // Which items to post when adding
      'post' => array(
      // Where to get the id of an item
      'tr' => $type . '-row-',
      'row_class' => "tr.{$type}-row",
      // Additional HTML to replace on add.
      'replace' => array(
        'div#panels-relationships-table div.buttons' => 'relationships_table',