summaryrefslogtreecommitdiff
path: root/app/utils
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2018-09-02 09:38:33 -0600
committerluxagraf <sng@luxagraf.net>2018-09-02 09:38:33 -0600
commit140ee80f0fe1d1d48f67612c1389ca7c2fc94f71 (patch)
tree3d9a783baec079cdf6f82593dcbb5110ca63b88a /app/utils
parent6925c8dcaf006b6d80c005672d7e2738f7af8b12 (diff)
changed admin featured image widget
Diffstat (limited to 'app/utils')
-rw-r--r--app/utils/static/image-loader.js6
-rw-r--r--app/utils/widgets.py1
2 files changed, 5 insertions, 2 deletions
diff --git a/app/utils/static/image-loader.js b/app/utils/static/image-loader.js
index 2b0a281..0139f10 100644
--- a/app/utils/static/image-loader.js
+++ b/app/utils/static/image-loader.js
@@ -7,7 +7,10 @@ function add_images(){
if (featured_image) {
featured_image.querySelectorAll('li').forEach(function(element) {
- var cur = element.dataset.imageid
+ var cur = element.dataset.imageid;
+ var loop = element.dataset.loopcounter;
+ console.log(loop);
+ if (loop <= 100) {
if (cur != "") {
var request = new XMLHttpRequest();
request.open('GET', '/photos/luximage/data/admin/tn/'+cur+'/', true);
@@ -29,6 +32,7 @@ function add_images(){
};
request.send();
}
+ }
});
}
diff --git a/app/utils/widgets.py b/app/utils/widgets.py
index c038252..f4a7a4a 100644
--- a/app/utils/widgets.py
+++ b/app/utils/widgets.py
@@ -94,7 +94,6 @@ class ImageRadioSelect(forms.RadioSelect):
template_name = 'horizontal_select.html'
-
class AdminImageWidget(AdminFileWidget):
"""
A FileField Widget that displays an image instead of a file path