From 56ee33e5e05700ec7d05ace707a54fcfc2c9c6c7 Mon Sep 17 00:00:00 2001 From: Matthew Grasmick Date: Wed, 22 Jan 2014 16:26:50 -0500 Subject: [PATCH] Issue #1928402 Allow multiple IPEs on page. --- panels_ipe/js/panels_ipe.js | 2 +- .../plugins/display_renderers/panels_renderer_ipe.class.php | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/panels_ipe/js/panels_ipe.js b/panels_ipe/js/panels_ipe.js index f8eac0a..0c32e0d 100644 --- a/panels_ipe/js/panels_ipe.js +++ b/panels_ipe/js/panels_ipe.js @@ -231,7 +231,7 @@ function DrupalPanelsIPE(cache_key, cfg) { // Perform visual effects in a particular sequence. // .show() + .hide() cannot have speeds associated with them, otherwise // it clears out inline styles. - $('.panels-ipe-on').show(); + $('.panels-ipe-on', this.topParent).show(); ipe.showForm(); ipe.topParent.addClass('panels-ipe-editing'); diff --git a/panels_ipe/plugins/display_renderers/panels_renderer_ipe.class.php b/panels_ipe/plugins/display_renderers/panels_renderer_ipe.class.php index f1b32c5..063e266 100644 --- a/panels_ipe/plugins/display_renderers/panels_renderer_ipe.class.php +++ b/panels_ipe/plugins/display_renderers/panels_renderer_ipe.class.php @@ -25,11 +25,15 @@ class panels_renderer_ipe extends panels_renderer_editor { ctools_include('cleanstring'); $this->clean_key = ctools_cleanstring($this->display->cache_key); + $title = $this->display->get_title(); + if (!$title) { + $title = $this->clean_key; + } $button = array( '#type' => 'link', - '#title' => t('Customize this page'), + '#title' => t('Customize @title', array('@title' => $title)), '#href' => $this->get_url('save_form'), - '#id' => 'panels-ipe-customize-page', + '#id' => drupal_html_id('panels-ipe-customize-page'), '#attributes' => array( 'class' => array('panels-ipe-startedit', 'panels-ipe-pseudobutton'), ), -- 1.8.0