PluginProbe
BlockSpare – Gutenberg Blocks for News, Magazine, Blog & Business Websites / 1.3.3
BlockSpare – Gutenberg Blocks for News, Magazine, Blog & Business Websites v1.3.3
4.1.0 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.1.0 1.1.1 1.1.2 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 2.1.2 2.5.0 2.5.3 2.6.1 All 38 releases
← All changes | freemius/templates/forms/deactivation/form.php +18 -14 1.2.31.3.3 View file →
@@ -78,10 +78,10 @@
78 78 }
79 79 ?>
80 80 <script type="text/javascript">
81 81 (function ($) {
82 - var reasonsHtml = <?php echo json_encode( $reasons_list_items_html ) ?>,
83 - modalHtml =
82 + var reasonsHtml = <?php echo json_encode( $reasons_list_items_html ) ?>,
83 + modalHtml =
84 84 '<div class="fs-modal fs-modal-deactivation-feedback<?php echo empty( $confirmation_message ) ? ' no-confirmation-message' : ''; ?>">'
85 85 + ' <div class="fs-modal-dialog">'
86 86 + ' <div class="fs-modal-header">'
87 87 + ' <h4><?php fs_esc_attr_echo_inline( 'Quick Feedback', 'quick-feedback' , $slug ) ?></h4>'
@@ -96,21 +96,21 @@
96 96 + ' <a href="#" class="button button-secondary button-close"><?php fs_esc_js_echo_inline( 'Cancel', 'cancel', $slug ) ?></a>'
97 97 + ' </div>'
98 98 + ' </div>'
99 99 + '</div>',
100 - $modal = $(modalHtml),
101 - $deactivateLink = $('#the-list .deactivate > [data-module-id=<?php echo $fs->get_id() ?>].fs-module-id').prev(),
102 - selectedReasonID = false,
103 - redirectLink = '',
104 - $anonymousFeedback = $modal.find( '.anonymous-feedback-label' ),
105 - isAnonymous = <?php echo ( $is_anonymous ? 'true' : 'false' ); ?>,
106 - otherReasonID = <?php echo Freemius::REASON_OTHER; ?>,
107 - dontShareDataReasonID = <?php echo Freemius::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION; ?>,
108 - deleteThemeUpdateData = <?php echo $fs->is_theme() && $fs->is_premium() && ! $fs->has_any_active_valid_license() ? 'true' : 'false' ?>,
100 + $modal = $(modalHtml),
101 + selectedReasonID = false,
102 + redirectLink = '',
103 + $anonymousFeedback = $modal.find( '.anonymous-feedback-label' ),
104 + isAnonymous = <?php echo ( $is_anonymous ? 'true' : 'false' ); ?>,
105 + otherReasonID = <?php echo Freemius::REASON_OTHER; ?>,
106 + dontShareDataReasonID = <?php echo Freemius::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION; ?>,
107 + deleteThemeUpdateData = <?php echo $fs->is_theme() && $fs->is_premium() && ! $fs->has_any_active_valid_license() ? 'true' : 'false' ?>,
109 108 $subscriptionCancellationModal = $( '.fs-modal-subscription-cancellation-<?php echo $fs->get_id() ?>' ),
110 - showDeactivationFeedbackForm = <?php echo ( $show_deactivation_feedback_form ? 'true' : 'false' ) ?>;
109 + showDeactivationFeedbackForm = <?php echo ( $show_deactivation_feedback_form ? 'true' : 'false' ) ?>,
110 + $body = $( 'body' );
111 111
112 - $modal.appendTo($('body'));
112 + $modal.appendTo( $body );
113 113
114 114 if ( 0 !== $subscriptionCancellationModal.length ) {
115 115 $subscriptionCancellationModal.on( '<?php echo $fs->get_action_tag( 'subscription_cancellation_action' ) ?>', function( evt, cancelSubscription ) {
116 116 var shouldDeactivateModule = ( $modal.hasClass( 'no-confirmation-message' ) && ! showDeactivationFeedbackForm );
@@ -180,9 +180,13 @@
180 180
181 181 registerEventHandlers();
182 182
183 183 function registerEventHandlers() {
184 - $deactivateLink.click(function (evt) {
184 + $body.on( 'click', '#the-list .deactivate > a', function ( evt ) {
185 + if ( 0 === $( this ).next( '[data-module-id=<?php echo $fs->get_id() ?>].fs-module-id' ).length ) {
186 + return true;
187 + }
188 +
185 189 evt.preventDefault();
186 190
187 191 redirectLink = $(this).attr('href');
188 192