/**
  * Create a command array to add a new pane.
  */
 function command_add_pane($pid)
 {
     if (is_object($pid)) {
         $pane = $pid;
     } else {
         $pane = $this->display->content[$pid];
     }
     $this->commands[] = ajax_command_prepend("#panels-ipe-regionid-{$pane->panel} div.panels-ipe-sort-container", $this->render_pane($pane));
     $this->commands[] = ajax_command_changed("#panels-ipe-display-{$this->clean_key}");
 }
/**
 * Alter the ajax commands returned on entity selection.
 *
 * @param array &$commands
 *   Array of ajax replace commands to return.
 * @param array $context
 *   Form context variables.
 *   - form: The entity form array.
 *   - form_state: Current state of the entity form.
 */
function hook_entityreference_autofill_ajax_commands_alter(&$commands, $context)
{
    // Add "ajax-changed" class to body tag.
    $commands[] = ajax_command_changed('body');
}
Exemplo n.º 3
0
 /**
  * Create a command array to add a new pane.
  */
 function command_add_pane($pid)
 {
     if (is_object($pid)) {
         $pane = $pid;
     } else {
         $pane = $this->display->content[$pid];
     }
     $this->commands[] = array('command' => 'insertNewPane', 'regionId' => $pane->panel, 'renderedPane' => $this->render_pane($pane));
     $this->commands[] = ajax_command_changed("#panels-ipe-display-{$this->clean_key}");
     $this->commands[] = array('command' => 'addNewPane', 'key' => $this->clean_key);
 }
  /**
   * Create a command array to add a new pane.
   */
  function command_add_pane($pid) {
    if (is_object($pid)) {
      $pane = $pid;
    }
    else {
      $pane = $this->display->content[$pid];
    }

    $this->commands[] = ajax_command_append("#panel-pane-$pane->panel", $this->render_pane($pane));
    $this->commands[] = ajax_command_changed("#panel-pane-$pane->pid", "div.grabber span.text");
  }
 /**
  * Create a command array to add a new pane.
  */
 function command_add_pane($pid)
 {
     if (is_object($pid)) {
         $pane = $pid;
     } else {
         $pane = $this->display->content[$pid];
     }
     ctools_include('cleanstring');
     $region_id = ctools_cleanstring($pane->panel);
     $this->commands[] = ajax_command_append("#panels-ipe-regionid-{$region_id} div.panels-ipe-sort-container", $this->render_pane($pane));
     $this->commands[] = ajax_command_changed("#panels-ipe-display-{$this->clean_key}");
 }