diff options
author | luxagraf <sng@luxagraf.net> | 2020-11-11 23:08:46 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2020-11-11 23:08:46 -0500 |
commit | 58d5653f381e293addc330bb64337371b4e61e8a (patch) | |
tree | 44cf4c43f5fe4acd43131fe26b0fb85bd1ac2bb2 /app | |
parent | d16c597d1e4e52ab1df1c77bda54445437bac5c0 (diff) |
improved post admin some more
Diffstat (limited to 'app')
-rw-r--r-- | app/posts/admin.py | 4 | ||||
-rw-r--r-- | app/products/static/product-loader.js | 2 | ||||
-rw-r--r-- | app/utils/static/image-loader.js | 1 |
3 files changed, 3 insertions, 4 deletions
diff --git a/app/posts/admin.py b/app/posts/admin.py index 1e2e845..d5d1e37 100644 --- a/app/posts/admin.py +++ b/app/posts/admin.py @@ -74,8 +74,6 @@ class PostAdmin(OSMGeoAdmin): ), 'classes': ( 'collapse', - 'extrapretty', - 'wide' ) }), ) @@ -92,7 +90,7 @@ class PostAdmin(OSMGeoAdmin): openlayers_url = '/static/admin/js/OpenLayers.js' class Media: - js = ('image-loader.js', 'product-loader.js', 'next-prev-links.js') + js = ('product-loader.js', 'image-loader.js','next-prev-links.js') css = { "all": ("my_styles.css",) } diff --git a/app/products/static/product-loader.js b/app/products/static/product-loader.js index 20ec0d6..5e9d89c 100644 --- a/app/products/static/product-loader.js +++ b/app/products/static/product-loader.js @@ -1,5 +1,5 @@ function add_products(){ - var el = document.getElementById("id_body_markdown"); + var el = document.getElementById("id_frame"); if (el){ var iframe = '<iframe frameborder="0" style="border: #dddddd 1px solid;margin-left: 20px;width:330px; height:720px;" src="/luxproduct/insert/?textarea='+el.id+'"></iframe>'; el.insertAdjacentHTML('afterend', iframe); diff --git a/app/utils/static/image-loader.js b/app/utils/static/image-loader.js index 121c3be..a4e75c2 100644 --- a/app/utils/static/image-loader.js +++ b/app/utils/static/image-loader.js @@ -2,6 +2,7 @@ function add_images(){ var el = document.getElementById("id_body_markdown"); if (el){ var iframe = '<iframe frameborder="0" style="border: #dddddd 1px solid;margin-left: 20px;width:330px; height:720px;" src="/luximages/insert/?textarea='+el.id+'"></iframe>'; + iframe.id = "images_id"; el.insertAdjacentHTML('afterend', iframe); } |