Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

configuration options

  • Loading branch information...
commit 145816ff1f9fc6ddb0c7338baec8dad1923791b1 1 parent 6de63f3
@fivethreeo authored
View
5 cmsplugin_filer_gallery/cms_plugins.py
@@ -14,7 +14,7 @@ class FilerGalleryPlugin(CMSPluginBase):
def render(self, context, instance, placeholder):
config = simplejson.dumps({
- 'animation': instance.animation.get_display(), # fade, horizontal-slide, vertical-slide, horizontal-push
+ 'animation': instance.get_animation_display(), # fade, horizontal-slide, vertical-slide, horizontal-push
'animationSpeed': instance.speed, # how fast animations are
'timer': instance.timer, # True or False to have the timer
'advanceSpeed': instance.advanced_speed, # if timer is enabled, time between transitions
@@ -23,12 +23,13 @@ def render(self, context, instance, placeholder):
'startClockOnMouseOutAfter': instance.start_after, # how long after MouseOut should the timer start again
'directionalNav': instance.directional_nav, # manual advancing directional navs
'captions': instance.captions, # do you want captions?
- 'captionAnimation': instance.caption_animation.get_display(), # fade, slideOpen, none
+ 'captionAnimation': instance.get_caption_animation_display(), # fade, slideOpen, none
'captionAnimationSpeed': instance.caption_speed, # if so how quickly should they animate in
'bullets': instance.bullets # True or False to activate the bullet navigation
})
context.update({
'instance': instance,
+ 'size': (instance.height, instance.width),
'orbit_config': config
})
return context
View
4 cmsplugin_filer_gallery/models.py
@@ -5,6 +5,8 @@
ANIMATION_CHOICES=('fade', 'horizontal-slide', 'vertical-slide', 'horizontal-push')
ANIMATION_CHOICES=tuple(enumerate(ANIMATION_CHOICES))
+CAPTION_ANIMATION_CHOICES=('fade', 'slideOpen')
+CAPTION_ANIMATION_CHOICES=tuple(enumerate(CAPTION_ANIMATION_CHOICES))
class FilerGallery(CMSPlugin):
@@ -20,7 +22,7 @@ class FilerGallery(CMSPlugin):
start_after = models.IntegerField(default=1000)
directional_nav = models.BooleanField(default=False)
captions = models.BooleanField(default=False)
- caption_animation = models.SmallIntegerField(choices=ANIMATION_CHOICES)
+ caption_animation = models.SmallIntegerField(choices=CAPTION_ANIMATION_CHOICES, null=True, blank=True)
caption_speed = models.SmallIntegerField(default=800)
bullets = models.BooleanField(default=False)
Please sign in to comment.
Something went wrong with that request. Please try again.