Sha256: 4c95b255443fc2cc99800e5f534fc37c51120babb2f2e65f95edba168eda2af1
Contents?: true
Size: 588 Bytes
Versions: 1
Compression:
Stored size: 588 Bytes
Contents
$(() => { $(document).on("click", "a[data-open-url],button[data-open-url]", (event) => { event.preventDefault(); const $link = $(event.currentTarget); const $modal = $(`#${$link.data("open")}`); $modal.html("<div class='loading-spinner'></div>"); $.ajax({ type: "get", url: $link.data("open-url"), success: (html) => { const $html = $(html); $modal.html($html); $html.foundation(); }, error: function (request, status, error) { $modal.html(`<h3>${status}</h3><p>${error}</p>`); } }); }); });
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
decidim-core-0.22.0 | app/assets/javascripts/decidim/ajax_modals.js.es6 |