function add_meta()
 {
     ctools_include('display-edit', 'panels');
     ctools_include('content');
     if (empty($this->display->cache_key)) {
         $this->cache = panels_edit_cache_get_default($this->display);
     }
     // @todo we may need an else to load the cache, but I am not sure we
     // actually need to load it if we already have our cache key, and doing
     // so is a waste of resources.
     ctools_include('cleanstring');
     $this->clean_key = ctools_cleanstring($this->display->cache_key);
     $button = array('#type' => 'link', '#title' => t('Customize this page'), '#href' => $this->get_url('save_form'), '#id' => 'panels-ipe-customize-page', '#attributes' => array('class' => array('panels-ipe-startedit', 'panels-ipe-pseudobutton')), '#ajax' => array('progress' => 'throbber', 'ipe_cache_key' => $this->clean_key), '#prefix' => '<div class="panels-ipe-pseudobutton-container">', '#suffix' => '</div>');
     panels_ipe_toolbar_add_button($this->clean_key, 'panels-ipe-startedit', $button);
     // @todo this actually should be an IPE setting instead.
     if (user_access('change layouts in place editing')) {
         $button = array('#type' => 'link', '#title' => t('Change layout'), '#href' => $this->get_url('change_layout'), '#attributes' => array('class' => array('panels-ipe-change-layout', 'panels-ipe-pseudobutton', 'ctools-modal-layout')), '#ajax' => array('progress' => 'throbber', 'ipe_cache_key' => $this->clean_key), '#prefix' => '<div class="panels-ipe-pseudobutton-container">', '#suffix' => '</div>');
         panels_ipe_toolbar_add_button($this->clean_key, 'panels-ipe-change-layout', $button);
     }
     ctools_include('ajax');
     ctools_include('modal');
     ctools_modal_add_js();
     ctools_add_css('panels_dnd', 'panels');
     ctools_add_css('panels_admin', 'panels');
     ctools_add_js('panels_ipe', 'panels_ipe');
     ctools_add_css('panels_ipe', 'panels_ipe');
     drupal_add_js(array('PanelsIPECacheKeys' => array($this->clean_key)), 'setting');
     drupal_add_library('system', 'ui.draggable');
     drupal_add_library('system', 'ui.droppable');
     drupal_add_library('system', 'ui.sortable');
     parent::add_meta();
 }
 function add_meta()
 {
     ctools_include('display-edit', 'panels');
     ctools_include('content');
     if (empty($this->display->cache_key)) {
         $this->cache = panels_edit_cache_get_default($this->display);
     }
     // @todo we may need an else to load the cache, but I am not sure we
     // actually need to load it if we already have our cache key, and doing
     // so is a waste of resources.
     ctools_include('cleanstring');
     $this->clean_key = ctools_cleanstring($this->display->cache_key);
     $button = theme('panels_ipe_edit_button', array('class' => 'panels-ipe-startedit', 'text' => t('Customize this page')));
     panels_ipe_toolbar_add_button($this->clean_key, 'panels-ipe-startedit', $button);
     //    panels_ipe_get_cache_key($this->clean_key);
     ctools_include('ajax');
     ctools_include('modal');
     ctools_modal_add_js();
     ctools_add_css('panels_dnd', 'panels');
     ctools_add_css('panels_admin', 'panels');
     ctools_add_js('panels_ipe', 'panels_ipe');
     ctools_add_css('panels_ipe', 'panels_ipe');
     $settings = array('formPath' => url($this->get_url('save-form')));
     drupal_add_js(array('PanelsIPECacheKeys' => array($this->clean_key)), 'setting');
     drupal_add_js(array('PanelsIPESettings' => array($this->clean_key => $settings)), 'setting');
     drupal_add_library('system', 'ui.draggable');
     drupal_add_library('system', 'ui.droppable');
     drupal_add_library('system', 'ui.sortable');
     //    drupal_add_js('misc/ui/jquery.ui.draggable.min.js');
     //    drupal_add_js('misc/ui/jquery.ui.droppable.min.js');
     //    drupal_add_js('misc/ui/jquery.ui.sortable.min.js');
     //    jquery_ui_add(array('ui.draggable', 'ui.droppable', 'ui.sortable'));
     parent::add_meta();
 }
 function add_meta()
 {
     ctools_include('display-edit', 'panels');
     ctools_include('content');
     if (empty($this->display->cache_key)) {
         $this->cache = panels_edit_cache_get_default($this->display);
     }
     // @todo we may need an else to load the cache, but I am not sure we
     // actually need to load it if we already have our cache key, and doing
     // so is a waste of resources.
     ctools_include('cleanstring');
     $this->clean_key = ctools_cleanstring($this->display->cache_key);
     panels_ipe_get_cache_key($this->clean_key);
     ctools_include('ajax');
     ctools_include('modal');
     ctools_modal_add_js();
     ctools_add_css('panels_dnd', 'panels');
     ctools_add_css('panels_admin', 'panels');
     ctools_add_js('panels_ipe', 'panels_ipe');
     ctools_add_css('panels_ipe', 'panels_ipe');
     $settings = array('formPath' => url($this->get_url('save-form')));
     drupal_add_js(array('PanelsIPECacheKeys' => array($this->clean_key)), 'setting');
     drupal_add_js(array('PanelsIPESettings' => array($this->clean_key => $settings)), 'setting');
     jquery_ui_add(array('ui.draggable', 'ui.droppable', 'ui.sortable'));
     parent::add_meta();
 }
 function add_meta()
 {
     ctools_include('display-edit', 'panels');
     ctools_include('content');
     if (empty($this->display->cache_key)) {
         $this->cache = panels_edit_cache_get_default($this->display);
     }
     // @todo we may need an else to load the cache, but I am not sure we
     // actually need to load it if we already have our cache key, and doing
     // so is a waste of resources.
     ctools_include('cleanstring');
     $this->clean_key = ctools_cleanstring($this->display->cache_key);
     $button = array('#type' => 'link', '#title' => t('Customize this page'), '#href' => $this->get_url('save_form'), '#id' => 'panels-ipe-customize-page', '#attributes' => array('class' => array('panels-ipe-startedit', 'panels-ipe-pseudobutton')), '#ajax' => array('progress' => 'throbber', 'ipe_cache_key' => $this->clean_key), '#prefix' => '<div class="panels-ipe-pseudobutton-container">', '#suffix' => '</div>');
     panels_ipe_toolbar_add_button($this->clean_key, 'panels-ipe-startedit', $button);
     // @todo this actually should be an IPE setting instead.
     if (user_access('change layouts in place editing')) {
         $button = array('#type' => 'link', '#title' => t('Change layout'), '#href' => $this->get_url('change_layout'), '#attributes' => array('class' => array('panels-ipe-change-layout', 'panels-ipe-pseudobutton', 'ctools-modal-layout')), '#ajax' => array('progress' => 'throbber', 'ipe_cache_key' => $this->clean_key), '#prefix' => '<div class="panels-ipe-pseudobutton-container">', '#suffix' => '</div>');
         panels_ipe_toolbar_add_button($this->clean_key, 'panels-ipe-change-layout', $button);
     }
     ctools_include('ajax');
     ctools_include('modal');
     ctools_modal_add_js();
     ctools_add_css('panels_dnd', 'panels');
     ctools_add_css('panels_admin', 'panels');
     ctools_add_css('panels_ipe', 'panels_ipe');
     // Add the JavaScript for the IPE. This must go as early as possible so
     // that its behaviors run first, allowing it to clone parts of the DOM
     // before other behaviors have been applied to them.
     drupal_add_js(drupal_get_path('module', 'panels_ipe') . '/js/panels_ipe.js', array('group' => JS_LIBRARY, 'weight' => -1000));
     drupal_add_js(array('PanelsIPECacheKeys' => array($this->clean_key)), 'setting');
     drupal_add_library('system', 'ui.draggable');
     drupal_add_library('system', 'ui.droppable');
     drupal_add_library('system', 'ui.sortable');
     parent::add_meta();
 }