Loading js/moderation_note.js +2 −2 Original line number Diff line number Diff line Loading @@ -506,7 +506,7 @@ } if (Drupal.quickedit && Drupal.quickedit.collections.entities) { $('body').once('moderation-note-quickedit').each(function () { once('moderation-note-quickedit', 'body').each(function () { // Toggle moderation note visibility based on Quick Edit's status. Drupal.quickedit.collections.entities.on('change:isActive', function (model, is_active) { if (is_active) { Loading Loading @@ -539,7 +539,7 @@ }); // Auto-open a note, if applicable. $('body').once('moderation-note-open').each(function () { once('moderation-note-open', 'body').each(function () { if (typeof URLSearchParams !== 'undefined') { var query = new URLSearchParams(location.search); if (query.has('open-moderation-note')) { Loading moderation_note.info.yml +1 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ name: Moderation Note type: module description: Provides the ability to notate elements of a moderated Entity. core: 8.x core_version_requirement: ^8 || ^9 core_version_requirement: ^8 || ^9 || ^10 package: Other configure: moderation_note.settings dependencies: Loading moderation_note.libraries.yml +1 −1 Original line number Diff line number Diff line Loading @@ -7,4 +7,4 @@ main: css/moderation_note.css: {} dependencies: - core/drupal.dialog.off_canvas - core/jquery.once - core/once moderation_note.module +3 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ function moderation_note_entity_delete(EntityInterface $entity) { if ($entity instanceof ModerationNoteInterface) { // Load and delete all child notes for this parent. $ids = \Drupal::entityQuery('moderation_note') ->accessCheck(FALSE) ->condition('parent', $entity->id()) ->execute(); $notes = \Drupal::entityTypeManager()->getStorage('moderation_note')->loadMultiple($ids); Loading @@ -52,6 +53,7 @@ function moderation_note_entity_delete(EntityInterface $entity) { else { // Load and delete all associated notes for this entity. $ids = \Drupal::entityQuery('moderation_note') ->accessCheck(FALSE) ->condition('entity_type', $entity->getEntityTypeId()) ->condition('entity_id', $entity->id()) ->execute(); Loading Loading @@ -200,6 +202,7 @@ function _moderation_note_attach_field_notes(array &$variables) { // Load notes for this entity field. $ids = \Drupal::entityQuery('moderation_note') ->accessCheck(FALSE) ->condition('entity_type', $entity->getEntityTypeId()) ->condition('entity_id', $entity->id()) ->condition('entity_field_name', $element['#field_name']) Loading src/Controller/ModerationNoteController.php +2 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ class ModerationNoteController extends ControllerBase { $build = []; $ids = $this->entityTypeManager()->getStorage('moderation_note')->getQuery() ->accessCheck(FALSE) ->condition('entity_type', $entity->getEntityTypeId()) ->condition('entity_id', $entity->id()) ->condition('entity_langcode', $this->languageManager()->getCurrentLanguage()->getId()) Loading Loading @@ -155,6 +156,7 @@ class ModerationNoteController extends ControllerBase { $build = []; $ids = $this->entityTypeManager()->getStorage('moderation_note')->getQuery() ->accessCheck(FALSE) ->condition('assignee', $user->id()) ->condition('published', 1) ->execute(); Loading Loading
js/moderation_note.js +2 −2 Original line number Diff line number Diff line Loading @@ -506,7 +506,7 @@ } if (Drupal.quickedit && Drupal.quickedit.collections.entities) { $('body').once('moderation-note-quickedit').each(function () { once('moderation-note-quickedit', 'body').each(function () { // Toggle moderation note visibility based on Quick Edit's status. Drupal.quickedit.collections.entities.on('change:isActive', function (model, is_active) { if (is_active) { Loading Loading @@ -539,7 +539,7 @@ }); // Auto-open a note, if applicable. $('body').once('moderation-note-open').each(function () { once('moderation-note-open', 'body').each(function () { if (typeof URLSearchParams !== 'undefined') { var query = new URLSearchParams(location.search); if (query.has('open-moderation-note')) { Loading
moderation_note.info.yml +1 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ name: Moderation Note type: module description: Provides the ability to notate elements of a moderated Entity. core: 8.x core_version_requirement: ^8 || ^9 core_version_requirement: ^8 || ^9 || ^10 package: Other configure: moderation_note.settings dependencies: Loading
moderation_note.libraries.yml +1 −1 Original line number Diff line number Diff line Loading @@ -7,4 +7,4 @@ main: css/moderation_note.css: {} dependencies: - core/drupal.dialog.off_canvas - core/jquery.once - core/once
moderation_note.module +3 −0 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ function moderation_note_entity_delete(EntityInterface $entity) { if ($entity instanceof ModerationNoteInterface) { // Load and delete all child notes for this parent. $ids = \Drupal::entityQuery('moderation_note') ->accessCheck(FALSE) ->condition('parent', $entity->id()) ->execute(); $notes = \Drupal::entityTypeManager()->getStorage('moderation_note')->loadMultiple($ids); Loading @@ -52,6 +53,7 @@ function moderation_note_entity_delete(EntityInterface $entity) { else { // Load and delete all associated notes for this entity. $ids = \Drupal::entityQuery('moderation_note') ->accessCheck(FALSE) ->condition('entity_type', $entity->getEntityTypeId()) ->condition('entity_id', $entity->id()) ->execute(); Loading Loading @@ -200,6 +202,7 @@ function _moderation_note_attach_field_notes(array &$variables) { // Load notes for this entity field. $ids = \Drupal::entityQuery('moderation_note') ->accessCheck(FALSE) ->condition('entity_type', $entity->getEntityTypeId()) ->condition('entity_id', $entity->id()) ->condition('entity_field_name', $element['#field_name']) Loading
src/Controller/ModerationNoteController.php +2 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ class ModerationNoteController extends ControllerBase { $build = []; $ids = $this->entityTypeManager()->getStorage('moderation_note')->getQuery() ->accessCheck(FALSE) ->condition('entity_type', $entity->getEntityTypeId()) ->condition('entity_id', $entity->id()) ->condition('entity_langcode', $this->languageManager()->getCurrentLanguage()->getId()) Loading Loading @@ -155,6 +156,7 @@ class ModerationNoteController extends ControllerBase { $build = []; $ids = $this->entityTypeManager()->getStorage('moderation_note')->getQuery() ->accessCheck(FALSE) ->condition('assignee', $user->id()) ->condition('published', 1) ->execute(); Loading