diff options
-rw-r--r-- | app/photos/forms.py | 2 | ||||
-rw-r--r-- | design/templates/admin/photos/luxgallery/change_form.html | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/photos/forms.py b/app/photos/forms.py index e8e705f..f0b87e8 100644 --- a/app/photos/forms.py +++ b/app/photos/forms.py @@ -44,7 +44,7 @@ class GalleryForm(forms.ModelForm): items = [] for image in images: items.append( - (image.pk, mark_safe('%s %s' % (image.title, image.get_image_name()))) + (image.pk, mark_safe('%sqq%s' % (image.title, image.get_image_name()))) ) self.fields['images'].choices = items self.fields['images'].allow_tags = True diff --git a/design/templates/admin/photos/luxgallery/change_form.html b/design/templates/admin/photos/luxgallery/change_form.html index 39281c2..b0341ce 100644 --- a/design/templates/admin/photos/luxgallery/change_form.html +++ b/design/templates/admin/photos/luxgallery/change_form.html @@ -11,8 +11,8 @@ if (!$) { $(function(){ $('#id_images').css('width', '500px').css('height', '400px'); $('#id_images option').each(function(){ - $(this).attr('style', 'background: url({{MEDIA_URL}}images/galleries/thumb/'+$(this).text().split(" ")[1]+') no-repeat; background-size: 120px 80px; height: 80px; padding-left: 120px; line-height: 80px; margin-bottom: 4px;'); - $(this).html($(this).text().split(" ")[0] + ' – '+ $(this).text().split(" ")[1].split("/")[1] ) + $(this).attr('style', 'background: url({{MEDIA_URL}}images/galleries/thumb/'+$(this).text().split("qq")[1]+') no-repeat; background-size: 120px 80px; height: 80px; padding-left: 120px; line-height: 80px; margin-bottom: 4px;'); + $(this).html($(this).text().split("qq")[0] + ' – '+ $(this).text().split("qq")[1].split("/")[1] ) }); }); </script> |