Loading js/display_editor.js +5 Changes for js/display_editor.js: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -513,6 +513,11 @@ Drupal.behaviors.PanelsDisplayEditor = { $('#panels-preview').html(html); }); // Bind modal detach behaviors to cancel current form. $(document).bind('CToolsDetachBehaviors', function(event, context) { $('#edit-cancel-style', context).trigger('click'); }); var setTitleClass = function () { if ($('#edit-display-title-hide-title').val() == 2) { $('#panels-dnd-main').removeClass('panels-set-title-hide'); Loading plugins/display_renderers/panels_renderer_editor.class.php +26 Changes for plugins/display_renderers/panels_renderer_editor.class.php: 26 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -1160,6 +1160,13 @@ class panels_renderer_editor extends panels_renderer_standard { unset($this->cache->style); } if (!empty($form_state['cancel'])) { // The cache must be saved prior to dismissing the modal. panels_edit_cache_set($this->cache); $this->commands[] = ctools_modal_command_dismiss(); return; } // Copy settings from form state back into the cache. if(!empty($form_state['values']['settings'])) { if ($type == 'pane') { Loading Loading @@ -1702,9 +1709,28 @@ function panels_edit_style_settings_form($form, &$form_state) { '#value' => t('Save'), ); // Need a cancel button since the style cache can persist and impact the wrong // pane (or region, or display). $form['cancel_style'] = array( '#type' => 'submit', '#value' => t('Cancel'), '#submit' => array('panels_edit_style_settings_form_cancel'), ); return $form; } /** * Cancel style settings form. * * Clears the editing cache to prevent styles being applied to incorrect regions * or panes. */ function panels_edit_style_settings_form_cancel($form, &$form_state) { $form_state['cancel'] = TRUE; } /** * Validate style settings. */ Loading Loading
js/display_editor.js +5 Changes for js/display_editor.js: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -513,6 +513,11 @@ Drupal.behaviors.PanelsDisplayEditor = { $('#panels-preview').html(html); }); // Bind modal detach behaviors to cancel current form. $(document).bind('CToolsDetachBehaviors', function(event, context) { $('#edit-cancel-style', context).trigger('click'); }); var setTitleClass = function () { if ($('#edit-display-title-hide-title').val() == 2) { $('#panels-dnd-main').removeClass('panels-set-title-hide'); Loading
plugins/display_renderers/panels_renderer_editor.class.php +26 Changes for plugins/display_renderers/panels_renderer_editor.class.php: 26 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -1160,6 +1160,13 @@ class panels_renderer_editor extends panels_renderer_standard { unset($this->cache->style); } if (!empty($form_state['cancel'])) { // The cache must be saved prior to dismissing the modal. panels_edit_cache_set($this->cache); $this->commands[] = ctools_modal_command_dismiss(); return; } // Copy settings from form state back into the cache. if(!empty($form_state['values']['settings'])) { if ($type == 'pane') { Loading Loading @@ -1702,9 +1709,28 @@ function panels_edit_style_settings_form($form, &$form_state) { '#value' => t('Save'), ); // Need a cancel button since the style cache can persist and impact the wrong // pane (or region, or display). $form['cancel_style'] = array( '#type' => 'submit', '#value' => t('Cancel'), '#submit' => array('panels_edit_style_settings_form_cancel'), ); return $form; } /** * Cancel style settings form. * * Clears the editing cache to prevent styles being applied to incorrect regions * or panes. */ function panels_edit_style_settings_form_cancel($form, &$form_state) { $form_state['cancel'] = TRUE; } /** * Validate style settings. */ Loading