summaryrefslogtreecommitdiff
path: root/chimere/static/saclay/js/interface.js
diff options
context:
space:
mode:
authorÉtienne Loks <etienne@peacefrogs.net>2020-09-29 12:47:12 +0200
committerÉtienne Loks <etienne@peacefrogs.net>2020-09-29 12:47:12 +0200
commit4ff647569a7119a77b7c4a54c19400c9eb023a35 (patch)
tree5553cc8b99f765e6b7a07ee430372a27501afec2 /chimere/static/saclay/js/interface.js
parenta7a3f11ac4df6d356333b35cc37db566db3cff78 (diff)
downloadChimère-4ff647569a7119a77b7c4a54c19400c9eb023a35.tar.bz2
Chimère-4ff647569a7119a77b7c4a54c19400c9eb023a35.zip
Detail: add a link to generate iframe
Diffstat (limited to 'chimere/static/saclay/js/interface.js')
-rw-r--r--chimere/static/saclay/js/interface.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/chimere/static/saclay/js/interface.js b/chimere/static/saclay/js/interface.js
index 413a50b..d3e756f 100644
--- a/chimere/static/saclay/js/interface.js
+++ b/chimere/static/saclay/js/interface.js
@@ -598,3 +598,18 @@ var init_modal_window = function(){
});
};
+var generate_iframe = function(){
+ var html;
+ if (update_permalink){
+ update_permalink();
+ var permalink = window.location.protocol + "//" + window.location.host + $("#permalink").attr('href');
+ html = '<iframe width="100%" height="100%" src="' + permalink + '"></iframe>';
+ html = html.replace(/</g, "&lt;").replace(/>/g, "&gt;");
+ html = "<pre>" + html + "</pre>";
+ html = "<p>Pour insérer la carte sur un site web, veuillez recopier le code suivant : </p>" + html;
+ } else {
+ html = "<p>Erreur lors de l'initialisation de l'iframe.</p>"
+ }
+ $("#modal-default-message .modal-body").html(html);
+ $('#modal-default-message').modal("show");
+} \ No newline at end of file