diff --git a/src/Modules/Uninstall_feedback.php b/src/Modules/Uninstall_feedback.php index 274aa20a..bd1ebea0 100644 --- a/src/Modules/Uninstall_feedback.php +++ b/src/Modules/Uninstall_feedback.php @@ -375,7 +375,7 @@ private function add_feedback_popup_style() { ?> white-space: normal; width: 400px; left: 100%; - top: 0; + top: -15px; } .ti-plugin-uninstall-feedback-popup.sending-feedback .popup--body i { @@ -402,11 +402,11 @@ private function add_feedback_popup_style() { ?> display: block; } - tr[data-slug="product->get_slug(); ?>"] .plugin-title { + tr[data-slug="product->get_slug(); ?>"] .deactivate { position: relative; } - body.ti-feedback-open #wpwrap:before { + body.ti-feedback-open .ti-feedback-overlay { content: ""; display: block; background-color: rgba(0, 0, 0, 0.5); @@ -414,9 +414,23 @@ private function add_feedback_popup_style() { ?> bottom: 0; right: 0; left: 0; - z-index: 100; + z-index: 10000; position: fixed; } + + @media (max-width: 768px) { + .ti-plugin-uninstall-feedback-popup { + position: fixed; + max-width: 100%; + margin: 0 auto; + left: 50%; + top: 50px; + transform: translateX(-50%); + } + .ti-plugin-uninstall-feedback-popup .popup--header:before { + display: none; + } + } ( function($) { $( document ).ready( function() { - var targetElement = 'tr[data-plugin^="product->get_slug(); ?>/"] span.deactivate'; - var redirectUrl = $( targetElement + ' a' ).attr( 'href' ); - - $( ' ' ).appendTo( $( targetElement ).parent().parent() ); + var targetElement = 'tr[data-plugin^="product->get_slug(); ?>/"] span.deactivate a'; + var redirectUrl = $( targetElement ).attr( 'href' ); + if ( $( '.ti-feedback-overlay' ).length === 0 ) { + $( 'body' ).prepend( '
' ); + } + $( ' ' ).appendTo( $( targetElement ).parent() ); $( targetElement ).on( 'click', function(e) { e.preventDefault(); $( ' ' ).addClass( 'active' ); $( 'body' ).addClass( 'ti-feedback-open' ); + $( '.ti-feedback-overlay' ).on( 'click', function() { + $( ' ' ).removeClass( 'active' ); + $( 'body' ).removeClass( 'ti-feedback-open' ); + } ); } ); $( ' .info-disclosure-link' ).on( 'click', function(e) { @@ -623,6 +643,7 @@ private function add_plugin_feedback_popup_js() { on( 'click', function(e) { e.preventDefault(); e.stopPropagation(); + $( targetElement ).unbind( 'click' ); $( 'body' ).removeClass( 'ti-feedback-open' ); $( '' ).remove(); if ( redirectUrl !== '' ) {