summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/views/caves.py2
-rw-r--r--core/views/editor_helpers.py2
-rw-r--r--templates/html_editor_scripts_css.html3
3 files changed, 6 insertions, 1 deletions
diff --git a/core/views/caves.py b/core/views/caves.py
index 34e4c08..db47a74 100644
--- a/core/views/caves.py
+++ b/core/views/caves.py
@@ -417,6 +417,7 @@ def edit_cave(request, path="", slug=None):
"cave": cave,
"message": message,
"caveAndEntranceFormSet": ceFormSet,
+ "path": path + "/",
},
)
@@ -502,6 +503,7 @@ def edit_entrance(request, path="", caveslug=None, entslug=None):
"cave": cave,
"entletter": entletter,
"entlettereditable": entlettereditable,
+ "path": path + "/",
},
)
diff --git a/core/views/editor_helpers.py b/core/views/editor_helpers.py
index 8a556c4..47660b6 100644
--- a/core/views/editor_helpers.py
+++ b/core/views/editor_helpers.py
@@ -47,7 +47,7 @@ def image_selector(request, path):
if (page_path_base / (f"{name_base}.htm")).is_file():
page_url = reverse("expopage", args=[f"{base}l/{name_base}.htm"])
else:
- page_url = reverse("expopage", args=[f"{base}/l/{name_base}.html"])
+ page_url = reverse("expopage", args=[f"{base}l/{name_base}.html"])
thumbnails.append({"thumbnail_url": thumbnail_url, "page_url": page_url})
diff --git a/templates/html_editor_scripts_css.html b/templates/html_editor_scripts_css.html
index 8634958..d3ddc68 100644
--- a/templates/html_editor_scripts_css.html
+++ b/templates/html_editor_scripts_css.html
@@ -173,11 +173,14 @@
function add_image_popup(editor) {
$('.add-image-popup').addClass('active');
window.current_editor = editor;
+ var path = ""; //Can we get rid of this variable?
+ /*
{% if not path %}
var path = $("#id_url").val();
{% else %}
var path = "";
{% endif %}
+ */
$('#image_popup_content').load("{% url 'image_selector' path %}" + path, function() {
$('.thumbnail').click(function(){
$(".add-image-popup").removeClass("active");