MDL-69166 core_payment: Use a custom modal type for gateway selector
[moodle.git] / payment / amd / build / modal_gateways.min.js
1 define ("core_payment/modal_gateways",["jquery","core/notification","core/custom_interaction_events","core/modal","core/modal_events","core_payment/events","core/modal_registry"],function(a,b,c,d,f,g,h){var i=!1,j={PROCEED_BUTTON:"[data-action=\"proceed\"]",CANCEL_BUTTON:"[data-action=\"cancel\"]"},k=function(a){d.call(this,a)};k.TYPE="core_payment-modal_gateways";k.prototype=Object.create(d.prototype);k.prototype.constructor=k;k.prototype.registerEventListeners=function(){d.prototype.registerEventListeners.call(this);this.getModal().on(c.events.activate,j.PROCEED_BUTTON,function(b,c){var d=a.Event(g.proceed);this.getRoot().trigger(d,this);if(!d.isDefaultPrevented()){this.hide();c.originalEvent.preventDefault()}}.bind(this));this.getModal().on(c.events.activate,j.CANCEL_BUTTON,function(b,c){var d=a.Event(f.cancel);this.getRoot().trigger(d,this);if(!d.isDefaultPrevented()){this.hide();c.originalEvent.preventDefault()}}.bind(this))};if(!i){h.register(k.TYPE,k,"core_payment/modal_gateways");i=!0}return k});
2 //# sourceMappingURL=modal_gateways.min.js.map