Commit 58794451 authored by Jeroen Tubex's avatar Jeroen Tubex Committed by Adam G-H
Browse files

Issue #3264928 by JeroenT, Berdir: Add support for Drupal 10

parent 7ffe37d5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -36,6 +36,6 @@
  },
  "require":{
    "mkalkbrenner/php-htmldiff-advanced": "~0.0.8",
    "drupal/core": "^8.7.7 || ^9"
    "drupal/core": "^9.3 || ^10"
  }
}
+1 −1
Original line number Diff line number Diff line
name: Diff
type: module
description: Shows changes between content revisions.
core_version_requirement: ^8.7.7 || ^9
core_version_requirement: ^9.3 || ^10
configure: diff.general_settings
+3 −1
Original line number Diff line number Diff line
@@ -6,8 +6,10 @@ diff.general:
  js:
    js/diff.js: {}
  dependencies:
    - core/jquery
    - core/drupal
    - core/drupalSettings
    - core/jquery.once
    - core/once

diff.double_column:
  version: 1.x
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ diff.revisions_diff:
    _controller: '\Drupal\diff\Controller\NodeRevisionController::compareNodeRevisions'
    _title: Diff General Settings
  requirements:
    _access_node_revision: 'view'
    _entity_access: 'node.view all revisions'
  options:
    _admin_route: TRUE

+4 −3
Original line number Diff line number Diff line
(function ($, Drupal, drupalSettings) {
(function ($, Drupal, drupalSettings, once) {

  'use strict';

@@ -6,7 +6,8 @@
    attach: function (context, settings) {
      // drupalSettings in not anymore bound to attached functions.
      // It is available outside the scope of this anonymous function also.
      var $rows = $('table.diff-revisions tbody tr').once('diff-revisions');
      var rows = once('diff-revisions', 'table.diff-revisions tbody tr');
      var $rows = $(rows);
      if ($rows.length === 0) {
        return;
      }
@@ -66,4 +67,4 @@
    }
  };

})(jQuery, Drupal, drupalSettings);
})(jQuery, Drupal, drupalSettings, once);
Loading