{:uriI"file:///Users/benoit/www/agilidee/dorsale/app/assets/javascripts/dorsale/modals.coffee?type=application/javascript&pipeline=self&id=a95dfe2625e379fc4a2021951a2fde36f29fb6cc7dfe7ee78922a4f3bf728a37: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 $(document).trigger("page:load"); }, close: function() { $(".modal").remove(); return $("body").removeClass("modal-open"); }, xhrLoad: function() { modal.open("Chargement..."); $.ajax({ url: this.href || this.action || null, dataType: "html", success: function(data) { return modal.open(data); }, error: function() { return modal.open("Erreur"); } }); return false; }, setup: function(scope) { scope = $(scope || document); scope.find("a[data-modal=1], .modal-body a:not([data-modal=0])").off("click", modal.xhrLoad).on("click", modal.xhrLoad); return scope.find("form[data-modal=1], .modal-body form:not([data-modal=0])").off("submit", modal.xhrLoad).on("submit", modal.xhrLoad); } }; $(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"%(Μȱ x PwJR?[?Sr': lengthi:dependencies_digest"%Jr\yitsI3s(0Xd(?:idI"Ea95dfe2625e379fc4a2021951a2fde36f29fb6cc7dfe7ee78922a4f3bf728a37;F: mtimel+#V