Loading js/simple_image_rotate.js +3 −2 Original line number Diff line number Diff line Loading @@ -24,8 +24,9 @@ // Prevent default click on rotate icon e.preventDefault(); // Current rotate value and thumbnail image var rotate = parseInt($(this).attr("data-rotate")), $image = $(this).closest(".image-widget").find("img"); var rotate = parseInt($(this).attr("data-rotate")); $image = $(this).closest(".image-widget").find("img") .add($(this).closest(".media-library-add-form li").find('[data-drupal-selector="edit-preview"] img')); // Rotate Input $rotate_input = $(this).closest(".image-widget").find('.rotate'); // Remove current rotate CSS class Loading media_library_dialog-3186522-4.patch 0 → 100644 +16 −0 Original line number Diff line number Diff line diff --git a/js/simple_image_rotate.js b/js/simple_image_rotate.js index ffa00bc..e0906f7 100644 --- a/js/simple_image_rotate.js +++ b/js/simple_image_rotate.js @@ -24,8 +24,9 @@ // Prevent default click on rotate icon e.preventDefault(); // Current rotate value and thumbnail image - var rotate = parseInt($(this).attr("data-rotate")), - $image = $(this).closest(".image-widget").find("img"); + var rotate = parseInt($(this).attr("data-rotate")); + $image = $(this).closest(".image-widget").find("img") + .add($(this).closest(".media-library-add-form li").find('[data-drupal-selector="edit-preview"] img')); // Rotate Input $rotate_input = $(this).closest(".image-widget").find('.rotate'); // Remove current rotate CSS class simple_image_rotate.module +1 −1 Original line number Diff line number Diff line Loading @@ -99,7 +99,7 @@ function simple_image_rotate_field_widget_multivalue_form_alter(array &$elements // Add rotate icon and hidden rotate field. $elements[$key]['rotate'] = [ '#type' => 'hidden', '#attributes' => ['class' => 'rotate'], '#attributes' => ['class' => ['rotate']], '#value' => 0, ]; Loading Loading
js/simple_image_rotate.js +3 −2 Original line number Diff line number Diff line Loading @@ -24,8 +24,9 @@ // Prevent default click on rotate icon e.preventDefault(); // Current rotate value and thumbnail image var rotate = parseInt($(this).attr("data-rotate")), $image = $(this).closest(".image-widget").find("img"); var rotate = parseInt($(this).attr("data-rotate")); $image = $(this).closest(".image-widget").find("img") .add($(this).closest(".media-library-add-form li").find('[data-drupal-selector="edit-preview"] img')); // Rotate Input $rotate_input = $(this).closest(".image-widget").find('.rotate'); // Remove current rotate CSS class Loading
media_library_dialog-3186522-4.patch 0 → 100644 +16 −0 Original line number Diff line number Diff line diff --git a/js/simple_image_rotate.js b/js/simple_image_rotate.js index ffa00bc..e0906f7 100644 --- a/js/simple_image_rotate.js +++ b/js/simple_image_rotate.js @@ -24,8 +24,9 @@ // Prevent default click on rotate icon e.preventDefault(); // Current rotate value and thumbnail image - var rotate = parseInt($(this).attr("data-rotate")), - $image = $(this).closest(".image-widget").find("img"); + var rotate = parseInt($(this).attr("data-rotate")); + $image = $(this).closest(".image-widget").find("img") + .add($(this).closest(".media-library-add-form li").find('[data-drupal-selector="edit-preview"] img')); // Rotate Input $rotate_input = $(this).closest(".image-widget").find('.rotate'); // Remove current rotate CSS class
simple_image_rotate.module +1 −1 Original line number Diff line number Diff line Loading @@ -99,7 +99,7 @@ function simple_image_rotate_field_widget_multivalue_form_alter(array &$elements // Add rotate icon and hidden rotate field. $elements[$key]['rotate'] = [ '#type' => 'hidden', '#attributes' => ['class' => 'rotate'], '#attributes' => ['class' => ['rotate']], '#value' => 0, ]; Loading