Sha256: ac2d024ff7b745dd1bf6d9210a2d6a00adf7d3e44e33b73b6a1a8392493c79b5

Contents?: true

Size: 1.03 KB

Versions: 40

Compression:

Stored size: 1.03 KB

Contents

App.views.MoipForm.addChild('PaymentAccount', _.extend({
  el: '#payment_type_account_section',

  events: {
    'change select#account' : 'onChangeAccount',
    'click input#build_account_link' : 'onBuildAccountClick',
    'keyup #user_document_account' : 'onUserDocumentKeyup',
    'click .link_content a' : 'onContentClick',
  },

  activate: function(){
    this.moipForm = this.parent;
    this.$('input#user_document_account').mask("999.999.999-99");
  },

  onChangeAccount: function(e){
    var value = $(e.currentTarget).val();
    this.$('input#build_account_link').attr('disabled', !(value != "" && value != undefined));
  },

  onBuildAccountClick: function(e) {
    var that = this;
    e.preventDefault();
    $(e.currentTarget).hide();
    that.moipForm.loader.show();

    // Get token and send payment
    that.moipForm.getMoipToken(function(){
      var settings = {
        "Instituicao": $('select#account').val(),
        "Forma": "DebitoBancario"
      }
      MoipWidget(settings);
    });
  }
}, App.views.MoipForm.UserDocument));

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
catarse_moip-3.2.0 app/assets/javascripts/catarse_moip/payment_account.js
catarse_moip-3.1.1 app/assets/javascripts/catarse_moip/payment_account.js
catarse_moip-3.1.0 app/assets/javascripts/catarse_moip/payment_account.js
catarse_moip-2.4.0 app/assets/javascripts/catarse_moip/payment_account.js
catarse_moip-3.0.5 app/assets/javascripts/catarse_moip/payment_account.js
catarse_moip-3.0.4 app/assets/javascripts/catarse_moip/payment_account.js
catarse_moip-3.0.3 app/assets/javascripts/catarse_moip/payment_account.js
catarse_moip-3.0.2 app/assets/javascripts/catarse_moip/payment_account.js
catarse_moip-3.0.1 app/assets/javascripts/catarse_moip/payment_account.js
catarse_moip-3.0.0 app/assets/javascripts/catarse_moip/payment_account.js
catarse_moip-2.3.6 app/assets/javascripts/catarse_moip/payment_account.js
catarse_moip-2.3.5 app/assets/javascripts/catarse_moip/payment_account.js
catarse_moip-2.3.4 app/assets/javascripts/catarse_moip/payment_account.js
catarse_moip-2.3.3 app/assets/javascripts/catarse_moip/payment_account.js
catarse_moip-2.3.2 app/assets/javascripts/catarse_moip/payment_account.js
catarse_moip-2.3.1 app/assets/javascripts/catarse_moip/payment_account.js
catarse_moip-2.3.0 app/assets/javascripts/catarse_moip/payment_account.js
catarse_moip-2.2.1 app/assets/javascripts/catarse_moip/payment_account.js
catarse_moip-2.2.0 app/assets/javascripts/catarse_moip/payment_account.js
catarse_moip-2.1.9 app/assets/javascripts/catarse_moip/payment_account.js