Sha256: a511070b3f2a28fba34336c110eeb599099b7b550333a77c61c2a596eb1ef401

Contents?: true

Size: 627 Bytes

Versions: 1

Compression:

Stored size: 627 Bytes

Contents

$(document).ready(function() {

  $(document).on('click', 'span[data-formily-new-response]', function(e){
    var self = $(this);
    var data = self.data('formilyNewResponse');
    var url = self.data('href');

    if(self.parents('table:first').data('formilyFlag')) {
      data.flag = true;
    }

    $.ajax({
      url: url,
      type: 'POST',
      data: data,
      success: function(){
        $(document).trigger('formily_update_table', data);
      },
      error: function(resp){
        console.error(resp.responseJSON.msg);
        alert(resp.responseJSON.msg);
      }
    });

    e.preventDefault();
  });

});

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
formily-0.0.5.5.7 app/assets/javascripts/formily/base/form_response.js