##// END OF EJS Templates
fix thumb selector
rt@lightning -
r248:b23a942b default
parent child Browse files
Show More
@@ -6,10 +6,10 b' function addImgPreview() {'
6 }
6 }
7 });
7 });
8
8
9 $('.image').children('a').each(function() {
9 $('.thumb').each(function() {
10 $(this).on('click', function() {
10 $(this).on('click', function() {
11 var el = $(this);
11 var el = $(this);
12 var thumb_id = 'full'+el.find('img').attr('alt');//костыли
12 var thumb_id = 'full'+el.find('img').attr('alt');
13
13
14 if(!$('#'+thumb_id).length) {
14 if(!$('#'+thumb_id).length) {
15 var img_w = el.find('img').attr('data-width');
15 var img_w = el.find('img').attr('data-width');
@@ -4,7 +4,7 b''
4 {% if post.image %}
4 {% if post.image %}
5 <div class="image">
5 <div class="image">
6 <a
6 <a
7 class="fancy"
7 class="thumb"
8 href="{{ post.image.url }}"><img
8 href="{{ post.image.url }}"><img
9 src="{{ post.image.url_200x150 }}"
9 src="{{ post.image.url_200x150 }}"
10 alt="{% trans 'Post image' %}"v
10 alt="{% trans 'Post image' %}"v
@@ -38,7 +38,7 b''
38 {% endif %}
38 {% endif %}
39 {% if thread.thread.image %}
39 {% if thread.thread.image %}
40 <div class="image">
40 <div class="image">
41 <a class="fancy"
41 <a class="thumb"
42 href="{{ thread.thread.image.url }}"><img
42 href="{{ thread.thread.image.url }}"><img
43 src="{{ thread.thread.image.url_200x150 }}"
43 src="{{ thread.thread.image.url_200x150 }}"
44 alt="{{ thread.thread.id }}"
44 alt="{{ thread.thread.id }}"
@@ -94,7 +94,7 b''
94 {% endif %}
94 {% endif %}
95 {% if post.image %}
95 {% if post.image %}
96 <div class="image">
96 <div class="image">
97 <a class="fancy"
97 <a class="thumb"
98 href="{{ post.image.url }}"><img
98 href="{{ post.image.url }}"><img
99 src=" {{ post.image.url_200x150 }}"
99 src=" {{ post.image.url_200x150 }}"
100 alt="{{ post.id }}"
100 alt="{{ post.id }}"
General Comments 0
You need to be logged in to leave comments. Login now