{:uriI"file:///Users/benoit/www/agilidee/dorsale/app/assets/javascripts/dorsale/common/forms.coffee?type=application/javascript&pipeline=self&id=2b1a2d2d451a8714b5f449abec7b613df9e0ba147bca46dc691419d6c7566aea:ET:load_pathI">/Users/benoit/www/agilidee/dorsale/app/assets/javascripts;T: filenameI"Z/Users/benoit/www/agilidee/dorsale/app/assets/javascripts/dorsale/common/forms.coffee;T: nameI"dorsale/common/forms;T:logical_pathI"!dorsale/common/forms.self.js;T:content_typeI"application/javascript;T: sourceI"(function() { window.setupUploadInputs = function(scope) { if (scope == null) { scope = document; } return $(scope).find(".form-group.upload").map(function() { var form, group, input, label, progress, submit; group = $(this); form = group.parents("form"); input = group.find("[type=file]"); submit = group.find("[type=submit]"); label = group.find("label"); progress = group.find(".progress"); if (!xhr2_available()) { progress.hide(); } label.map(function() { return this.dataset.defaultValue = $(this).html(); }); input.change(function() { var label_value; if (this.value === "") { submit.prop({ disabled: true }); label_value = label.data("defaultValue"); } else { submit.prop({ disabled: false }); label_value = this.value.split("/").pop().split("\\").pop(); } return label.html(label_value); }); return input.change(); }); }; $(document).on("ready turbolinks:load page:load", function() { $("button.reset").click(function() { var form; form = $(this).parents("form"); form.find("select option:first-child").map(function() { return this.selected = true; }); form.find("input").map(function() { if (this.type.match(/submit|hidden|button/)) { return; } return this.value = $(this).data("default-value") || ""; }); form.find("textarea").map(function() { return this.value = $(this).data("default-value") || ""; }); return form.find("select").map(function() { if (this.selectize) { this.selectize.clear(); } return $(this).val("").trigger("change"); }); }); return $("form").submit(function() { var input; if (this.method.toUpperCase() === "GET") { return; } if ($(this).find("[name=form_url]").length > 0) { return; } input = document.createElement("input"); input.type = "hidden"; input.name = "form_url"; input.value = location.href; return $(this).append(input); }); }); }).call(this); ;T: metadata{ :dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"jprocessors:type=application/javascript&file_type=application/javascript&engines=.coffee&pipeline=self;TTI"hfile-digest:///Users/benoit/www/agilidee/dorsale/app/assets/javascripts/dorsale/common/forms.coffee;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: charsetI" utf-8;F: digest"%!Slfs.*4-r^8: lengthi:dependencies_digest"%؁st Ζ{[uMI/Fa^`:idI"E2b1a2d2d451a8714b5f449abec7b613df9e0ba147bca46dc691419d6c7566aea;F: mtimel+^W