Loading js/paragraphs_ee.admin.js +3 −2 Original line number Diff line number Diff line Loading @@ -248,7 +248,8 @@ var $element = $(element); // Get the delta element before moving $element to dialog element. var $modalDelta = $element.parent().find('.paragraph-type-add-modal-delta'); var $modalDelta = $element.parent().find('.paragraph-type-add-modal-delta, .paragraph-type-add-delta.modal'); // Deep clone with all attached events. We need to work on cloned element // and not directly on origin because Drupal dialog.ajax.js Loading Loading @@ -282,7 +283,7 @@ * width. */ Drupal.behaviors.paragraphsModalAdd.attach = function (context) { $('.paragraph-type-add-modal-button', context).once('add-click-handler').on('click', function (event) { $('.paragraph-type-add-modal-button, .paragraph-type-add-delta.modal', context).once('add-click-handler').on('click', function (event) { var $button = $(this); Drupal.paragraphsAddModal.openDialog($button.parent().siblings('.paragraphs-ee-dialog-wrapper'), $button.val()); Loading paragraphs_ee.module +2 −0 Original line number Diff line number Diff line Loading @@ -279,6 +279,8 @@ function template_preprocess_paragraphs_add_dialog__categorized(&$variables) { $variables['add_mode'] = isset($variables['element']['#add_mode']) ? $variables['element']['#add_mode'] : 'modal'; if (isset($variables['element']['add_modal_form_area'])) { $variables['add'] = $variables['element']['add_modal_form_area']; $variables['add']['#attributes']['class'][] = 'paragraph-type-add-delta'; $variables['add']['#attributes']['class'][] = $variables['add_mode']; } /** @var \Drupal\paragraphs_ee\ParagraphsCategoryInterface[] $categories */ $paragraphs_categories = \Drupal::entityTypeManager()->getStorage('paragraphs_category') Loading Loading
js/paragraphs_ee.admin.js +3 −2 Original line number Diff line number Diff line Loading @@ -248,7 +248,8 @@ var $element = $(element); // Get the delta element before moving $element to dialog element. var $modalDelta = $element.parent().find('.paragraph-type-add-modal-delta'); var $modalDelta = $element.parent().find('.paragraph-type-add-modal-delta, .paragraph-type-add-delta.modal'); // Deep clone with all attached events. We need to work on cloned element // and not directly on origin because Drupal dialog.ajax.js Loading Loading @@ -282,7 +283,7 @@ * width. */ Drupal.behaviors.paragraphsModalAdd.attach = function (context) { $('.paragraph-type-add-modal-button', context).once('add-click-handler').on('click', function (event) { $('.paragraph-type-add-modal-button, .paragraph-type-add-delta.modal', context).once('add-click-handler').on('click', function (event) { var $button = $(this); Drupal.paragraphsAddModal.openDialog($button.parent().siblings('.paragraphs-ee-dialog-wrapper'), $button.val()); Loading
paragraphs_ee.module +2 −0 Original line number Diff line number Diff line Loading @@ -279,6 +279,8 @@ function template_preprocess_paragraphs_add_dialog__categorized(&$variables) { $variables['add_mode'] = isset($variables['element']['#add_mode']) ? $variables['element']['#add_mode'] : 'modal'; if (isset($variables['element']['add_modal_form_area'])) { $variables['add'] = $variables['element']['add_modal_form_area']; $variables['add']['#attributes']['class'][] = 'paragraph-type-add-delta'; $variables['add']['#attributes']['class'][] = $variables['add_mode']; } /** @var \Drupal\paragraphs_ee\ParagraphsCategoryInterface[] $categories */ $paragraphs_categories = \Drupal::entityTypeManager()->getStorage('paragraphs_category') Loading