Commit 5ef3b13c authored by Adam G-H's avatar Adam G-H
Browse files

Issue #3288960 by phenaproxima, Lal_, ameymudras, andypost: Automated Drupal 10 compatibility fixes

parent c170bfcb
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -26,9 +26,8 @@
  "license": "GPL-2.0+",
  "minimum-stability": "dev",
  "require": {
    "drupal/core": "^8.8 || ^9",
    "drupal/ctools": ">=3.0.0",
    "drupal/jquery_ui_droppable": "^1.2"
    "drupal/ctools": "^3.12",
    "drupal/jquery_ui_droppable": "^1.5"
  },
  "require-dev": {
    "drupal/page_manager": "^4"
+4 −5
Original line number Diff line number Diff line
# Initial Conversion to info.yml file for d8.
name: Panels
description: 'Core Panels display functions; provides no external UI, at least one other Panels module should be enabled.'
type: module
package: Panels
core_version_requirement: '^8.8 || ^9'
core_version_requirement: '^9.2 || ^10'
configure: panels.admin
dependencies:
  - ctools
  - layout_discovery
  - ctools:ctools
  - drupal:layout_discovery
test_dependencies:
  - page_manager
  - page_manager:page_manager
+3 −2
Original line number Diff line number Diff line
@@ -45,16 +45,17 @@ function panels_page_variant_create(PageVariantInterface $page_variant) {
 */
function panels_layout_alter(&$definitions) {
  $core_layouts = ['layout_onecol', 'layout_twocol', 'layout_twocol_bricks', 'layout_threecol_25_50_25', 'layout_threecol_33_34_33'];
  $panels_path = \Drupal::service('extension.list.module')->getPath('panels');
  foreach($definitions as $layout_name => $layout) {
    // Verify that the layout definition is a LayoutDefinition
    if (!($definitions[$layout_name] instanceof LayoutDefinition)) {
      continue;
    }
    if (in_array($layout_name, $core_layouts) && empty($definitions[$layout_name]->getIcon())) {
      $definitions[$layout_name]->setIconPath(drupal_get_path('module', 'panels') . '/layouts/'.$layout_name.'/'.$layout_name.'.png');
      $definitions[$layout_name]->setIconPath($panels_path . '/layouts/' . $layout_name. '/' . $layout_name .'.png');
    }
    if (empty($definitions[$layout_name]->getIcon())) {
      $definitions[$layout_name]->setIconPath(drupal_get_path('module', 'panels') . '/layouts/no-layout-preview.png');
      $definitions[$layout_name]->setIconPath($panels_path . '/layouts/no-layout-preview.png');
    }
  }
}
+3 −3
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
 *
 */

(function ($, _, Backbone, Drupal, drupalSettings) {
(function ($, _, Backbone, once, Drupal, drupalSettings) {

  'use strict';

@@ -16,7 +16,7 @@
  Drupal.behaviors.panels_ipe = {
    attach: function (context, settings) {
      // Perform initial setup of our app.
      $('body').once('panels-ipe-init').each(Drupal.panels_ipe.init, [settings]);
      $(once('panels-ipe-init', 'body')).each(Drupal.panels_ipe.init, [settings]);

      // @todo Make every settings-related thing a generic event, or add a
      // panels_ipe event command to Drupal.ajax.
@@ -236,4 +236,4 @@
    settings.panels_ipe.url_root = settings.path.baseUrl + settings.path.pathPrefix + 'admin/panels_ipe/variant/' + panels_display.storage_type + '/' + panels_display.storage_id;
  };

}(jQuery, _, Backbone, Drupal, drupalSettings));
}(jQuery, _, Backbone, once, Drupal, drupalSettings));
+3 −3
Original line number Diff line number Diff line
name: Panels IPE
type: module
description: Panels In-place editor.
core_version_requirement: '^8.8 || ^9'
core_version_requirement: '^9.2 || ^10'
package: Panels
dependencies:
  - block_content
  - drupal:block_content
  - jquery_ui_droppable:jquery_ui_droppable
  - panels
  - panels:panels
Loading