{I" class:ETI"ProcessedAsset;FI"logical_path;TI"+rails_admin/jquery.remotipart.fixed.js;FI" pathname;TI"|/Users/jirikolarik/.rvm/gems/ruby-2.1.1/gems/rails_admin-0.6.2/app/assets/javascripts/rails_admin/jquery.remotipart.fixed.js;FI"content_type;TI"application/javascript;TI" mtime;Tl+J\ASI" length;Ti¡ I" digest;TI"%594506b025aed9a23323a27154227b7b;FI" source;TI"¡ // This file is frozen in RailsAdmin to cope with https://github.com/JangoSteve/remotipart/pull/50 (function($) { var remotipart; $.remotipart = remotipart = { setup: function(form) { form // Allow setup part of $.rails.handleRemote to setup remote settings before canceling default remote handler // This is required in order to change the remote settings using the form details .one('ajax:beforeSend.remotipart', function(e, xhr, settings){ // Delete the beforeSend bindings, since we're about to re-submit via ajaxSubmit with the beforeSubmit // hook that was just setup and triggered via the default `$.rails.handleRemote` // delete settings.beforeSend; delete settings.beforeSend; settings.iframe = true; settings.files = $($.rails.fileInputSelector, form); settings.data = form.serializeArray(); settings.processData = false; // Modify some settings to integrate JS request with rails helpers and middleware if (settings.dataType === undefined) { settings.dataType = 'script *'; } settings.data.push({name: 'remotipart_submitted', value: true}); // Allow remotipartSubmit to be cancelled if needed if ($.rails.fire(form, 'ajax:remotipartSubmit', [xhr, settings])) { // Second verse, same as the first $.rails.ajax(settings); } //Run cleanup remotipart.teardown(form); // Cancel the jQuery UJS request return false; }) // Keep track that we just set this particular form with Remotipart bindings // Note: The `true` value will get over-written with the `settings.dataType` from the `ajax:beforeSend` handler .data('remotipartSubmitted', true); }, teardown: function(form) { form .unbind('ajax:beforeSend.remotipart') .removeData('remotipartSubmitted') } }; $(document).on('ajax:aborted:file', 'form', function(){ var form = $(this); remotipart.setup(form); // If browser does not support submit bubbling, then this live-binding will be called before direct // bindings. Therefore, we should directly call any direct bindings before remotely submitting form. if (!$.support.submitBubbles && $().jquery < '1.7' && $.rails.callFormSubmitBindings(form) === false) return $.rails.stopEverything(e); // Manually call jquery-ujs remote call so that it can setup form and settings as usual, // and trigger the `ajax:beforeSend` callback to which remotipart binds functionality. $.rails.handleRemote(form); return false; }); })(jQuery); ;TI"dependency_digest;TI"%a827605b048e360f4e1e7b0bc573ee13;FI"required_paths;T[I"w/Users/jirikolarik/.rvm/gems/ruby-2.1.1/gems/remotipart-1.2.1/vendor/assets/javascripts/jquery.iframe-transport.js;FI"|/Users/jirikolarik/.rvm/gems/ruby-2.1.1/gems/rails_admin-0.6.2/app/assets/javascripts/rails_admin/jquery.remotipart.fixed.js;FI"dependency_paths;T[{I" path;TI"|/Users/jirikolarik/.rvm/gems/ruby-2.1.1/gems/rails_admin-0.6.2/app/assets/javascripts/rails_admin/jquery.remotipart.fixed.js;FI" mtime;TI"2014-04-06T15:53:14+02:00;TI" digest;TI"%e5a2176ed65441acf53048a8d72e9026;F{@I"w/Users/jirikolarik/.rvm/gems/ruby-2.1.1/gems/remotipart-1.2.1/vendor/assets/javascripts/jquery.iframe-transport.js;F@ I"2014-03-26T19:00:18+01:00;T@"I"%9e896321e8a83791d955c3b74c8b376e;FI" _version;TI"%2b66aa67c90052d553e0328c249bc9b0;F