{I" class:EFI"ProcessedAsset;FI"logical_path;FI"+rails_admin/jquery.remotipart.fixed.js;TI" pathname;FI"k/Users/sferik/Code/Ruby/gems/rails_admin/app/assets/javascripts/rails_admin/jquery.remotipart.fixed.js;TI"content_type;FI"application/javascript;FI" mtime;Fl+S©´RI" length;Fi¡ I" digest;F"%c8df134b08aef48f74227131c5dba353I" source;FI"¡ // 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;F"%050580625bcc9b22b62c4199375d5c26I"required_paths;F[I"‡/Users/sferik/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/remotipart-1.2.1/vendor/assets/javascripts/jquery.iframe-transport.js;TI"k/Users/sferik/Code/Ruby/gems/rails_admin/app/assets/javascripts/rails_admin/jquery.remotipart.fixed.js;TI"dependency_paths;F[{I" path;FI"k/Users/sferik/Code/Ruby/gems/rails_admin/app/assets/javascripts/rails_admin/jquery.remotipart.fixed.js;TI" mtime;FI"2013-12-20T21:32:19+01:00;FI" digest;F"%a9fe582d39c20167439887c6bec051b6{I" path;FI"‡/Users/sferik/.rbenv/versions/1.9.3-p545/lib/ruby/gems/1.9.1/gems/remotipart-1.2.1/vendor/assets/javascripts/jquery.iframe-transport.js;TI" mtime;FI"2014-03-24T05:34:11+01:00;FI" digest;F"%4d017fd20e9d03e56b4640e37edc2459I" _version;F"%1005ed9f20e25fb0a0599a7017dd0e6b