Commit 958ee0fa authored by Adam G-H's avatar Adam G-H Committed by Joël Pittet
Browse files

Issue #3288693 by taniachque, phenaproxima, Project Update Bot,...

Issue #3288693 by taniachque, phenaproxima, Project Update Bot, samuel.mortenson, Berdir, Kristen Pol: Automated Drupal 10 compatibility fixes
parent 20afd752
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3,14 +3,14 @@
 * Contains all javascript logic for moderation_sidebar.
 */

(function ($, Drupal) {
(function ($, Drupal, once) {

  Drupal.behaviors.moderation_sidebar = {
    attach: function (context, settings) {
      // Re-open the Moderation Sidebar when Quick Edit saves, as the Entity
      // object is stored in form state and we don't want to save something
      // that's outdated.
      $('body').once('moderation-sidebar-init').each(function () {
      $(once('moderation-sidebar-init', 'body')).each(function () {
        if (typeof Drupal.quickedit !== 'undefined' && Drupal.quickedit.collections.entities) {
          Drupal.quickedit.collections.entities.on('change:isCommitting', function (model) {
            if (model.get('isCommitting') === true && $('.moderation-sidebar-container').length) {
@@ -48,4 +48,4 @@
    });
  });

})(jQuery, Drupal);
})(jQuery, Drupal, once);
+2 −3
Original line number Diff line number Diff line
name: 'Moderation Sidebar'
type: module
description: 'Provides a frontend sidebar for Content Moderation'
core: 8.x
core_version_requirement: ^8 || ^9 || ^10
core_version_requirement: ^9.3 || ^10
package: Other
configure: moderation_sidebar.settings
dependencies:
  - drupal:content_moderation (>= 8.5)
  - drupal:content_moderation
+2 −0
Original line number Diff line number Diff line
@@ -7,3 +7,5 @@ main:
      css/moderation_sidebar.css: {}
  dependencies:
    - core/drupal.dialog.off_canvas
    - core/jquery
    - core/once
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ moderation_sidebar.node.version_history:
    _controller: '\Drupal\moderation_sidebar\Controller\ModerationSidebarController::revisionOverview'
  requirements:
    _permission: 'use moderation sidebar'
    _access_node_revision: 'view'
    _entity_access: 'node.view all revisions'
    node: \d+

moderation_sidebar.translate:
+1 −1
Original line number Diff line number Diff line
@@ -262,7 +262,7 @@ class ModerationSidebarController extends ControllerBase {
      }

      // We maintain our own inline revisions tab.
      if ($entity_type_id === 'node' && \Drupal::service('access_check.node.revision')->checkAccess($entity, \Drupal::currentUser()->getAccount())) {
      if ($entity_type_id === 'node' && $entity->access('view all revisions')){
        $build['actions']['secondary']['version_history'] = [
          '#title' => $this->t('Show revisions'),
          '#type' => 'link',
Loading