Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(shortcode): load modal forms in form grid via AJAX #2951 #2955

Merged
merged 55 commits into from
Apr 17, 2018
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
4defead
fix(shortcode): Use AJAX to render donation form
Sidsector9 Mar 27, 2018
37403b9
fix(shortcode): Add event delegation to load proper gateway
Sidsector9 Mar 28, 2018
214a31d
fix(shortcode): Move css to modal.scss file
Sidsector9 Mar 29, 2018
02e09ca
Merge branch 'release/2.1' into issue-2951
ravinderk Mar 29, 2018
170cb21
fix(shortcode): Remove form load by AJAX
Sidsector9 Apr 5, 2018
11e311f
fix(shortcode): rename display style
Sidsector9 Apr 5, 2018
3407cc8
fix(shortcode): undo js chnage for modal
ravinderk Apr 5, 2018
5191b5b
Merge branch 'release/2.1' into issue-2951
Sidsector9 Apr 10, 2018
11324d4
perf(shortcode): Restructure SCSS and remove redundant code
Sidsector9 Apr 11, 2018
acee2a3
Merge branch 'release/2.1' into issue-2951
Sidsector9 Apr 12, 2018
bf0f01e
Merge branch 'release/2.1' into issue-2951
ravinderk Apr 12, 2018
e8bfca3
Merge branch 'release/2.1' into issue-2951
Sidsector9 Apr 13, 2018
5226763
fix(modal): Add popup for display type button
Sidsector9 Apr 13, 2018
ee6bbc1
perf(code): stop using Give_Payment in helper fns
ravinderk Mar 29, 2018
3cc5581
feat(donations): add helper function to get donation total
ravinderk Mar 29, 2018
8648a7e
fix(donations): use helper fn to get donation total
ravinderk Mar 29, 2018
5ac9736
fix(donations): use direct sql query to get earnings
ravinderk Apr 3, 2018
e1b6f9f
fix(donation): filter donation amount before calculate amount
ravinderk Apr 5, 2018
8cd94f7
refactor(donation): get_earnings helper function
ravinderk Apr 5, 2018
77af4c7
style(code):add filter doc
ravinderk Apr 5, 2018
18a3f0e
fix(donation): deprecated give_get_donation_form_title params
ravinderk Apr 5, 2018
07081e4
fix(donation): get donor id from donation instead helper fn
ravinderk Apr 5, 2018
de1ad00
fix(donation): do not need to setup Give_Payment when update meta
ravinderk Apr 5, 2018
324822f
fix(donation): remove Give_Payment usage from give_get_donor_name_by fn
ravinderk Apr 5, 2018
c1c7e91
fix(donation): add helper function to get donation address
ravinderk Apr 5, 2018
2e135f9
fix(donation): remove Give_Payment usage from _give_save_donor_billin…
ravinderk Apr 5, 2018
1af099d
fix(donation): remove Give_Payment usage from give_email_donation_rec…
ravinderk Apr 5, 2018
7b96575
feat(donation): add helper fn to check if donation completed or not
ravinderk Apr 6, 2018
631e89a
feat(donation): add helper fn to check if donation process by given g…
ravinderk Apr 6, 2018
f4dc85b
fix(donation): add helper function to get donor email
ravinderk Apr 6, 2018
1a89076
fix(donation): refactor email tag code
ravinderk Apr 6, 2018
916a9cd
fix(donation): refactor email tag code
ravinderk Apr 6, 2018
ee061a6
refactor(donation): remove payment meta query from receipt
ravinderk Apr 6, 2018
c221b50
refactor(donation): remove fourth param from filter
ravinderk Apr 6, 2018
74059e1
fix(admin-settings): check if `fields` exist in array or not
ravinderk Apr 6, 2018
7832369
refactor(donation): remove Give_Payment usage from give_check_for_exi…
ravinderk Apr 6, 2018
7aa364f
fix(donation): remove $this from fn to prevent fatal error
ravinderk Apr 6, 2018
2090686
fix(admin-settings): check if `fields` exist in array or not pass2
ravinderk Apr 6, 2018
91ba617
fix(donation): get donor email if donation email empty
ravinderk Apr 6, 2018
d794398
fix(donation): pass default deprecated param to prevent fatal error
ravinderk Apr 11, 2018
9da8f34
fix(translation): used html entities for currency symbol for admin la…
emgk Apr 13, 2018
221bbf0
fix(donation-form): do not output formatted min max value .
emgk Apr 13, 2018
d6d661d
fix(phpunit): remove extra space from input tag
ravinderk Apr 13, 2018
61518fd
fix(translation): improved error message for better translation.
emgk Apr 13, 2018
28b36dd
fix(admin-update): make string more translatable
ravinderk Apr 13, 2018
a7a6734
styles(code): update fn description
ravinderk Apr 13, 2018
0ef56ec
fix(admin-tool): make import page as default #3015
raftaar1191 Apr 16, 2018
24bfff3
fix(admin-tool): change tab order #3015
raftaar1191 Apr 16, 2018
86b60e5
fix(admin-tool): remove php notice from system info page
ravinderk Apr 16, 2018
3a7bf9c
fix(admin-form): update field title for custom amount range
mehul0810 Apr 16, 2018
3920d24
fix(modal): Fix modal content when display option=button
Sidsector9 Apr 16, 2018
225116e
fix(modal): modal popup through URL parameters
Sidsector9 Apr 16, 2018
5311f01
fix(shortcode): Add proper redirection on failure
Sidsector9 Apr 16, 2018
447838c
Merge branch 'release/2.1' into issue-2951
Sidsector9 Apr 16, 2018
cebe4f7
Merge branch 'issue-2951' of https://github.com/Sidsector9/Give into …
ravinderk Apr 17, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
63 changes: 0 additions & 63 deletions assets/src/css/frontend/donation-grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,6 @@
.give-btn-modal {
display: none !important;
}

.mfp-close:hover {
background-color: rgba(0, 0, 0, 0);
}
}

// .progress {
Expand Down Expand Up @@ -204,62 +200,3 @@
// background-position: 40px 0;
// }
// }

.mfp-hide {
display: none;
}

.my-mfp-zoom-in .zoom-anim-dialog {
opacity: 0;
transition: all 0.2s ease-in-out;
}

.my-mfp-zoom-in.mfp-ready .zoom-anim-dialog {
opacity: 1;
}

.my-mfp-zoom-in.mfp-removing .zoom-anim-dialog {
opacity: 0;
}

.my-mfp-zoom-in.mfp-bg {
opacity: 0;
transition: opacity 0.25s ease-out;
}

.my-mfp-zoom-in.mfp-ready.mfp-bg {
opacity: 0.8;
}

.my-mfp-zoom-in.mfp-removing.mfp-bg {
opacity: 0;
}

.my-mfp-slide-bottom .zoom-anim-dialog {
opacity: 0;
transform: translateY(-200px);
transition: all 0.25s ease-out;
}

.my-mfp-slide-bottom.mfp-ready .zoom-anim-dialog {
opacity: 1;
transform: translateY(0);
}

.my-mfp-slide-bottom.mfp-removing .zoom-anim-dialog {
opacity: 0;
transform: translateY(-200px);
}

.my-mfp-slide-bottom.mfp-bg {
opacity: 0;
transition: opacity 0.25s ease-out;
}

.my-mfp-slide-bottom.mfp-ready.mfp-bg {
opacity: 0.8;
}

.my-mfp-slide-bottom.mfp-removing.mfp-bg {
opacity: 0;
}
183 changes: 183 additions & 0 deletions assets/src/css/frontend/modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,186 @@
}

}

/**
* Give Modal & Magnific Popup CSS
*/
.mfp-hide {
display: none;
}

.my-mfp-zoom-in .zoom-anim-dialog {
opacity: 0;
transition: all 0.2s ease-in-out;
}

.my-mfp-zoom-in.mfp-ready .zoom-anim-dialog {
opacity: 1;
}

.my-mfp-zoom-in.mfp-removing .zoom-anim-dialog {
opacity: 0;
}

.my-mfp-zoom-in.mfp-bg {
opacity: 0;
transition: opacity 0.25s ease-out;
}

.my-mfp-zoom-in.mfp-ready.mfp-bg {
opacity: 0.8;
}

.my-mfp-zoom-in.mfp-removing.mfp-bg {
opacity: 0;
}

.my-mfp-slide-bottom .zoom-anim-dialog {
opacity: 0;
transform: translateY(-200px);
transition: all 0.25s ease-out;
}

.my-mfp-slide-bottom.mfp-ready .zoom-anim-dialog {
opacity: 1;
transform: translateY(0);
}

.my-mfp-slide-bottom.mfp-removing .zoom-anim-dialog {
opacity: 0;
transform: translateY(-200px);
}

.my-mfp-slide-bottom.mfp-bg {
opacity: 0;
transition: opacity 0.25s ease-out;
}

.my-mfp-slide-bottom.mfp-ready.mfp-bg {
opacity: 0.8;
}

.my-mfp-slide-bottom.mfp-removing.mfp-bg {
opacity: 0;
}

.white-popup {
position: relative;
background: #fff;
font-size: 16px;
width: auto;
max-width: 600px;
margin: 20px auto;
padding: 1rem 2rem;
margin-top: 60px;
border-top: 5px solid rgba(0, 0, 0, 0);
line-height: 1.5;
box-shadow: 0px 15px 10px -5px rgba(0, 0, 0, .15);
max-height: 80vh;
overflow: auto;
}

.my-mfp-zoom-in .zoom-animation {
opacity: 0;

-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
-webkit-transform: scale(0.8);
-moz-transform: scale(0.8);
-ms-transform: scale(0.8);
-o-transform: scale(0.8);
transform: scale(0.8);
}

.my-mfp-zoom-in.mfp-ready .zoom-animation {
opacity: 1;

-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1);
}

.my-mfp-zoom-in.mfp-removing .zoom-animation {
-webkit-transform: scale(0.8);
-moz-transform: scale(0.8);
-ms-transform: scale(0.8);
-o-transform: scale(0.8);
transform: scale(0.8);
opacity: 0;
}

.my-mfp-zoom-in.mfp-bg {
opacity: 0;
-webkit-transition: opacity 0.3s ease-out;
-moz-transition: opacity 0.3s ease-out;
-o-transition: opacity 0.3s ease-out;
transition: opacity 0.3s ease-out;
}

.my-mfp-zoom-in.mfp-ready.mfp-bg {
opacity: 0.8;
}

.my-mfp-zoom-in.mfp-removing.mfp-bg {
opacity: 0;
}

/**
* Fade-move animation for second dialog
*/
.popup-fade-slide .zoom-animation {
opacity: 0;
-webkit-transition: all 0.2s ease-out;
-moz-transition: all 0.2s ease-out;
-o-transition: all 0.2s ease-out;
transition: all 0.2s ease-out;

-webkit-transform: translateY(-20px) perspective( 600px ) rotateX( 10deg );
-moz-transform: translateY(-20px) perspective( 600px ) rotateX( 10deg );
-ms-transform: translateY(-20px) perspective( 600px ) rotateX( 10deg );
-o-transform: translateY(-20px) perspective( 600px ) rotateX( 10deg );
transform: translateY(-20px) perspective( 600px ) rotateX( 10deg );

}

.popup-fade-slide.mfp-ready .zoom-animation {
opacity: 1;
-webkit-transform: translateY(0) perspective( 600px ) rotateX( 0 );
-moz-transform: translateY(0) perspective( 600px ) rotateX( 0 );
-ms-transform: translateY(0) perspective( 600px ) rotateX( 0 );
-o-transform: translateY(0) perspective( 600px ) rotateX( 0 );
transform: translateY(0) perspective( 600px ) rotateX( 0 );
}

.popup-fade-slide.mfp-removing .zoom-animation {
opacity: 0;
-webkit-transform: translateY(-10px) perspective( 600px ) rotateX( 10deg );
-moz-transform: translateY(-10px) perspective( 600px ) rotateX( 10deg );
-ms-transform: translateY(-10px) perspective( 600px ) rotateX( 10deg );
-o-transform: translateY(-10px) perspective( 600px ) rotateX( 10deg );
transform: translateY(-10px) perspective( 600px ) rotateX( 10deg );
}

.popup-fade-slide.mfp-bg {
opacity: 0;
-webkit-transition: opacity 0.3s ease-out;
-moz-transition: opacity 0.3s ease-out;
-o-transition: opacity 0.3s ease-out;
transition: opacity 0.3s ease-out;
}

.popup-fade-slide.mfp-ready.mfp-bg {
opacity: 0.8;
}

.popup-fade-slide.mfp-removing.mfp-bg {
opacity: 0;
}

.mfp-close:hover {
background-color: rgba(0, 0, 0, 0);
}
2 changes: 1 addition & 1 deletion assets/src/js/frontend/give-ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jQuery( document ).ready( function( $ ) {
} );

//Switch the gateway on gateway selection field change
$( 'select#give-gateway, input.give-gateway' ).on( 'change', function( e ) {
$( document ).on( 'change', 'select#give-gateway, input.give-gateway', function( e ) {

e.preventDefault();

Expand Down
2 changes: 1 addition & 1 deletion includes/shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ function give_form_grid_shortcode( $atts ) {
'image_size' => 'medium',
'image_height' => 'auto',
'excerpt_length' => 16,
'display_style' => 'redirect',
'display_style' => 'modal_reveal',
), $atts );

// Validate integer attributes.
Expand Down
4 changes: 2 additions & 2 deletions templates/shortcode-form-grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
esc_attr( $form_id ),
esc_attr( get_the_permalink() )
);
} elseif ( 'modal' === $atts['display_style'] ) {
} elseif ( 'modal_reveal' === $atts['display_style'] ) {
printf(
'<a id="give-card-%1$s" class="give-card js-give-grid-modal-launcher" data-effect="mfp-zoom-out" href="#give-modal-form-%1$s">',
esc_attr( $form_id )
Expand Down Expand Up @@ -110,7 +110,7 @@
</a>
<?php
// If modal, print form in hidden container until it is time to be revealed.
if ( 'modal' === $atts['display_style'] ) {
if ( 'modal_reveal' === $atts['display_style'] ) {
printf(
'<div id="give-modal-form-%1$s" class="give-donation-grid-item-form zoom-anim-dialog mfp-hide">',
$form_id
Expand Down