Created
September 16, 2015 12:31
-
-
Save incrize/26f639603b368e5a2ea7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/design/themes/basic/templates/views/checkout/components/checkout_steps.tpl b/design/themes/basic/templates/views/checkout/components/checkout_steps.tpl | |
index 7358eba..10d4a10 100644 | |
--- a/design/themes/basic/templates/views/checkout/components/checkout_steps.tpl | |
+++ b/design/themes/basic/templates/views/checkout/components/checkout_steps.tpl | |
@@ -37,4 +37,21 @@ | |
{include file="views/checkout/components/steps/step_four.tpl" edit=true complete=$completed_steps.step_four} | |
{/if} | |
{/if} | |
-<!--checkout_steps--></div> | |
\ No newline at end of file | |
+<!--checkout_steps--></div> | |
+<script type="text/javascript"> | |
+ (function(_, $) { | |
+ $.ceEvent('on', 'ce.loadershow', function() { | |
+ var forms = $('#checkout_steps', _.doc).find('form'); | |
+ | |
+ forms.on('submit.checkout_lock', function() { return false; }); | |
+ forms.find('input[type="submit"]').on('click.checkout_lock', function() { return false; }); | |
+ }); | |
+ | |
+ $.ceEvent('on', 'ce.loaderhide', function() { | |
+ var forms = $('#checkout_steps', _.doc).find('form'); | |
+ | |
+ forms.off('submit.checkout_lock'); | |
+ forms.find('input[type="submit"]').off('click.checkout_lock'); | |
+ }); | |
+ }(Tygh, Tygh.$)); | |
+</script> | |
\ No newline at end of file | |
diff --git a/design/themes/responsive/templates/views/checkout/components/checkout_steps.tpl b/design/themes/responsive/templates/views/checkout/components/checkout_steps.tpl | |
index 7358eba..2ca0a97 100644 | |
--- a/design/themes/responsive/templates/views/checkout/components/checkout_steps.tpl | |
+++ b/design/themes/responsive/templates/views/checkout/components/checkout_steps.tpl | |
@@ -37,4 +37,21 @@ | |
{include file="views/checkout/components/steps/step_four.tpl" edit=true complete=$completed_steps.step_four} | |
{/if} | |
{/if} | |
-<!--checkout_steps--></div> | |
\ No newline at end of file | |
+<!--checkout_steps--></div> | |
+<script type="text/javascript"> | |
+ (function(_, $) { | |
+ $.ceEvent('on', 'ce.loadershow', function() { | |
+ var forms = $('#checkout_steps', _.doc).find('form'); | |
+ | |
+ forms.on('submit.checkout_lock', function() { return false; }); | |
+ forms.find('button[type="submit"]').on('click.checkout_lock', function() { return false; }); | |
+ }); | |
+ | |
+ $.ceEvent('on', 'ce.loaderhide', function() { | |
+ var forms = $('#checkout_steps', _.doc).find('form'); | |
+ | |
+ forms.off('submit.checkout_lock'); | |
+ forms.find('button[type="submit"]').off('click.checkout_lock'); | |
+ }); | |
+ }(Tygh, Tygh.$)); | |
+</script> | |
\ No newline at end of file | |
diff --git a/js/tygh/core.js b/js/tygh/core.js | |
index ff4d180..3ca49d1 100644 | |
--- a/js/tygh/core.js | |
+++ b/js/tygh/core.js | |
@@ -1383,8 +1383,9 @@ var Tygh = { | |
} else { | |
loading_box.hide(); | |
loading_box.empty(); | |
- loading_box.removeClass('ajax-loading-box-with-text') | |
+ loading_box.removeClass('ajax-loading-box-with-text'); | |
$('#ajax_overlay').hide(); | |
+ $.ceEvent('trigger', 'ce.loaderhide', [loading_box]); | |
} | |
}, | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment