Cdentinger has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/254437

Change subject: make iframe behave more like worldpay
......................................................................

make iframe behave more like worldpay

append and blind down instead of replace contents.
also make it bigger for upcoming css changes with larger inputs

Change-Id: I0c8d60b2957bede5ab53f5f110001468b8eb1284
---
M adyen_gateway/forms/js/adyen.js
1 file changed, 6 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/37/254437/1

diff --git a/adyen_gateway/forms/js/adyen.js b/adyen_gateway/forms/js/adyen.js
index 81613fd..ca1d7a1 100644
--- a/adyen_gateway/forms/js/adyen.js
+++ b/adyen_gateway/forms/js/adyen.js
@@ -59,12 +59,12 @@
                                                $payment = $( '#payment-form' );
 
                                                // Empty the div; add the 
target iframe; then submit the request for the iframe contents
-                                               $payment.empty();
                                                $payment.append( $( 
'<iframe></iframe>', {
-                                                       width: 400,
-                                                       height: 225,
+                                                       style: 'display: none; 
width: 100%;',
+                                                       height: 400,
                                                        frameborder: 0,
-                                                       name: 'adyen-iframe'
+                                                       name: 'adyen-iframe',
+                                                       id: 'adyen-iframe'
                                                } ) );
 
                                                $pForm = $( '<form></form>', {
@@ -79,6 +79,8 @@
                                                $payment.append( $pForm );
 
                                                $payment.find( 
'#fetch-iframe-form' ).submit();
+
+                                               $( '#adyen-iframe' ).show( 
'blind' );
                                        }
                                }
                        }
@@ -107,7 +109,6 @@
 
        $( '#paymentContinueBtn' ).on( 'click', function () {
                if ( window.validate_form( document.payment ) ) {
-                       $( '#payment-form' ).animate( { height: '250px' }, 1000 
);
                        window.displayCreditCardForm();
                        // hide the continue button so that people don't get 
confused with two of them
                        $( '#paymentContinue' ).hide();

-- 
To view, visit https://gerrit.wikimedia.org/r/254437
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c8d60b2957bede5ab53f5f110001468b8eb1284
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Cdentinger <cdentin...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to