You are here

function panels_renderer_editor::ajax_lock in Panels 7.3

AJAX entry point to configure CSS for a pane.

Parameters

$pid: The pane id to edit.

File

plugins/display_renderers/panels_renderer_editor.class.php, line 1280
Class file to control the main Panels editor.

Class

panels_renderer_editor
@file Class file to control the main Panels editor.

Code

function ajax_lock($pid = NULL) {
  if (empty($this->display->content[$pid])) {
    ctools_modal_render(t('Error'), t('Invalid pane id.'));
  }
  $pane =& $this->display->content[$pid];
  $subtype = ctools_content_get_subtype($pane->type, $pane->subtype);
  $form_state = array(
    'display' => &$this->display,
    'pane' => &$pane,
    'ajax' => TRUE,
    'title' => t('Configure lock on !subtype_title', array(
      '!subtype_title' => $subtype['title'],
    )),
  );
  $output = ctools_modal_form_wrapper('panels_edit_configure_pane_lock_form', $form_state);
  if (empty($form_state['executed'])) {
    $this->commands = $output;
    return;
  }
  panels_edit_cache_set($this->cache);
  $this
    ->command_update_pane($pid);
  $this->commands[] = ctools_modal_command_dismiss();
}