From 460ba637407c2141419743e34bd20af30b729868 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Thu, 10 Feb 2011 10:53:40 -0400 Subject: [PATCH] Added a non scaling fancybox for display size view --- apps/documents/forms.py | 2 +- apps/main/templates/base.html | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/documents/forms.py b/apps/documents/forms.py index 34aad9bf74..01f2571710 100755 --- a/apps/documents/forms.py +++ b/apps/documents/forms.py @@ -23,7 +23,7 @@ class ImageWidget(forms.widgets.Widget): output = [] #img = lambda x: '' % (reverse('document_preview', args=[x.id]), # reverse('document_thumbnail', args=[x.id])) - output.append('' % (reverse('document_display', args=[value.id]), + output.append('' % (reverse('document_display', args=[value.id]), reverse('document_preview', args=[value.id]))) output.append('
%s' % ugettext(u'Click on the image for full size view')) #file_name = str(value) diff --git a/apps/main/templates/base.html b/apps/main/templates/base.html index cf81ccc015..29f6977d5f 100755 --- a/apps/main/templates/base.html +++ b/apps/main/templates/base.html @@ -35,6 +35,15 @@ 'easingIn' : 'easeOutBack', 'easingOut' : 'easeInBack', 'type' : 'image', + 'autoScale' : true, + }); + $("a.fancybox-noscaling").fancybox({ + 'titleShow' : false, + 'transitionIn' : 'elastic', + 'transitionOut' : 'elastic', + 'easingIn' : 'easeOutBack', + 'easingOut' : 'easeInBack', + 'type' : 'image', 'autoScale' : false, }); });