Skip to content

Instantly share code, notes, and snippets.

@dangtrinhtran
Created October 15, 2015 07:18
Show Gist options
  • Save dangtrinhtran/ad60b6a20ad3e036115c to your computer and use it in GitHub Desktop.
Save dangtrinhtran/ad60b6a20ad3e036115c to your computer and use it in GitHub Desktop.
Add ajax loading
Amasty_Shopby Extension: js\amasty\amshopby\amshopby-ajax.js
<script type="text/javascript">
//Line 116
/*$$('div.amshopby-overlay').each(function(e){
e.show();
});*/
//Call function at here
jQuery(document).configurationAjax('createLoading');
//Line 239
/*$$('div.amshopby-overlay').each(function(e){
e.hide();
});*/
//Call function at here
jQuery(document).configurationAjax('removeLoading');
</script>
TM_FireCheckout Extension: skin\frontend\base\default\js\tm\firecheckout.js
<script type="text/javascript">
//Line 145
setLoadWaiting: function(flag) {
//Call function at here
if (flag) {
jQuery(document).configurationAjax('createLoading');
} else {
jQuery(document).configurationAjax('removeLoading');
}
/*
if (flag) {
this.loadCounter++;
} else if (this.loadCounter > 0) {
this.loadCounter--;
if (this.loadCounter > 0) {
flag = true;
}
}
var spinner = $('firecheckout-spinner'),
container = $('review-buttons-container');
if (flag && !spinner) {
spinner = new Element('div');
spinner.writeAttribute('id', 'firecheckout-spinner');
spinner.insert(this.translations.spinnerText);
$(document.body).insert({
bottom: spinner
});
container.addClassName('disabled');
container.setStyle({opacity:0.5});
this._disableEnableAll(container, true);
} else if (!flag && spinner) {
spinner.remove();
container.removeClassName('disabled');
container.setStyle({opacity:1});
this._disableEnableAll(container, false);
}
this.loadWaiting = flag;
*/
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment