{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.1/app/assets/javascripts/rails_admin/jquery.remotipart.fixed.js;FI"content_type;TI"application/javascript;TI" mtime;Tl+¬ñSI" length;Ti¡ I" digest;TI"%c8df134b08aef48f74227131c5dba353;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"%050580625bcc9b22b62c4199375d5c26;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.1/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.1/app/assets/javascripts/rails_admin/jquery.remotipart.fixed.js;FI" mtime;TI"2014-03-03T22:18:36+01:00;TI" digest;TI"%a9fe582d39c20167439887c6bec051b6;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-03T22:18:17+01:00;T@"I"%4d017fd20e9d03e56b4640e37edc2459;FI" _version;TI"%1005ed9f20e25fb0a0599a7017dd0e6b;F