diff --git a/panels_ipe/js/panels_ipe.js b/panels_ipe/js/panels_ipe.js index b203f5e..fbecdd8 100644 --- a/panels_ipe/js/panels_ipe.js +++ b/panels_ipe/js/panels_ipe.js @@ -213,6 +213,8 @@ function DrupalPanelsIPE(cache_key, cfg) { $('div.panels-ipe-sort-container', ipe.topParent).bind('sortstop', this.enableRegions); + // Refresh the control jQuery object. + ipe.control = $(ipe.control.selector); $('.panels-ipe-form-container', ipe.control).append(formdata); $('input:submit:not(.ajax-processed), button:not(.ajax-processed)', ipe.control).addClass('ajax-processed').each(function() { @@ -264,6 +266,11 @@ function DrupalPanelsIPE(cache_key, cfg) { // Re-show all the IPE non-editing meta-elements $('div.panels-ipe-off').show('fast'); + + // Refresh the container and control jQuery objects. + ipe.container = $(ipe.container.selector); + ipe.control = $(ipe.control.selector); + ipe.showButtons(); // Re-hide all the IPE meta-elements $('div.panels-ipe-on').hide(); 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 c959a6d..a814225 100644 --- a/panels_ipe/plugins/display_renderers/panels_renderer_ipe.class.php +++ b/panels_ipe/plugins/display_renderers/panels_renderer_ipe.class.php @@ -284,6 +284,9 @@ class panels_renderer_ipe extends panels_renderer_editor { // rendered. $this->meta_location = 'inline'; $this->commands[] = ajax_command_replace("#panels-ipe-display-{$this->clean_key}", panels_render_display($this->display, $this)); + $buttons = &drupal_static('panels_ipe_toolbar_buttons', array()); + $output = theme('panels_ipe_toolbar', array('buttons' => $buttons)); + $this->commands[] = ajax_command_replace('#panels-ipe-control-container', $output); } else { // Cancelled. Clear the cache.