{:uriI"file:///Users/benoit/www/agilidee/dorsale/app/assets/javascripts/dorsale/modals.coffee?type=application/javascript&pipeline=self&id=ea024a08f46846ef1388748a5a72ca960c720cc50d7f9b871b6c4cc62fb0924a:ET:load_pathI">/Users/benoit/www/agilidee/dorsale/app/assets/javascripts;T: filenameI"T/Users/benoit/www/agilidee/dorsale/app/assets/javascripts/dorsale/modals.coffee;T: nameI"dorsale/modals;T:logical_pathI"dorsale/modals.self.js;T:content_typeI"application/javascript;T: sourceI"(function() { window.modal = { open: function(content) { var modal_html; this.close(); $("body").addClass("modal-open"); modal_html = $(""); modal_html.find(".modal-overlay, .modal-close").click(function() { return modal.close(); }); $("body").append(modal_html); return this.setup(modal_html); }, close: function() { $(".modal").remove(); return $("body").removeClass("modal-open"); }, setup: function(scope) { scope = $(scope || document); scope.find("a[data-modal=1], .modal-body a:not([data-modal=0])").click(function() { modal.open("Chargement..."); $.get(this.href, function(data) { return modal.open(data); }); return false; }); return scope.find("form[data-modal=1], .modal-body form:not([data-modal=0])").submit(function() { $.ajax({ url: this.action, type: this.method.toUpperCase(), data: $(this).serialize(), success: function(data) { return flash(data); }, error: function() { return flash("Erreur"); } }); return false; }); } }; $(document).on("ready page:load", function() { return modal.setup(); }); }).call(this); ;T: metadata{ :dependencieso:Set: @hash{ I"environment-version;TTI"environment-paths;TTI"jprocessors:type=application/javascript&file_type=application/javascript&engines=.coffee&pipeline=self;TTI"bfile-digest:///Users/benoit/www/agilidee/dorsale/app/assets/javascripts/dorsale/modals.coffee;TT: requiredo;;{: stubbedo;;{: linkso;;{: charsetI" utf-8;F: digest"%V ,*L +h8,: lengthi:dependencies_digest"%LFfh?.}A}[7| :idI"Eea024a08f46846ef1388748a5a72ca960c720cc50d7f9b871b6c4cc62fb0924a;F: mtimel+FV