Commits

Bernardo Cabezas Serra committed 942535c Draft Merge

Merged in bbordage/cmsplugin-nivoslider/default (pull request #1)

Comments (0)

Files changed (40)

 
 Features:
 
-- Three default nivo slider theme choices
+- Four default nivo slider theme choices
 - User selection of nivo parameters: nivo theme, animation effect, speed, pause...
 - Auto-discovering of custom nivo themes on static dirs
-- Uses image width and height from nivo themes css spec headers
-  (as explained in http://nivo.dev7studios.com/support/advanced-tutorials/creating-custom-themes-for-the-nivo-slider/)
 - Provides a very simple model for storing images and albums.
 
 Requires:
 
 Using a custom or downloaded theme
 ==================================
+
 When reloading your django app, the plugin will search for themes on the following
 static dir: `nivo/themes/`
 
 `STATIC_ROOT/nivo/themes/pluginname`
 And will be found by cmsplugin_nivoslider.
 
-:author bcabezas@apsl.net - http://www.apsl.net/
+:author: bcabezas@apsl.net - http://www.apsl.net/
 :date: 2012/03/14

cmsplugin_nivoslider/admin.py

 """ Registro de las clases en el admin de django """
 
 from django.contrib import admin
-from .models import  SliderImage, SliderAlbum
+from .models import SliderImage, SliderAlbum
+
 
 class SliderImageAdmin(admin.ModelAdmin):
-    list_display = ('thumb', 'name','description',  'order')
+    list_display = ('thumb', 'name', 'description', 'order')
 admin.site.register(SliderImage, SliderImageAdmin)
 
+
 class SliderAlbumAdmin(admin.ModelAdmin):
-    filter_horizontal = 'images',
-    
+    filter_horizontal = ('images',)
+
+
 admin.site.register(SliderAlbum, SliderAlbumAdmin)

cmsplugin_nivoslider/cms_plugins.py

 from cms.plugin_pool import plugin_pool
 from .models import SliderPlugin
 
+
 class CMSSliderPlugin(CMSPluginBase):
     model = SliderPlugin
     name = 'Slider Plugin'
     admin_preview = False
 
     def render(self, context, instance, placeholder):
-        if instance.image_height and instance.image_width:
-            size = (instance.image_width, instance.image_height)
+        if instance.height and instance.width:
+            size = (instance.width, instance.height)
         else:
             size = None
         context.update({
             'object': instance,
             'placeholder': placeholder,
-            'images': instance.album.images.all(),
+            'images': instance.album.images.iterator(),
             'size': size,
         })
         return context

cmsplugin_nivoslider/migrations/0006_rename_fields_image_height_width__del_field_show_ribbon.py

+
+# -*- coding: utf-8 -*-
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+    def forwards(self, orm):
+        # Deleting field 'SliderPlugin.show_ribbon'
+        db.delete_column('cmsplugin_sliderplugin', 'show_ribbon')
+
+        # Renaming field 'SliderPlugin.image_height'
+        db.rename_column('cmsplugin_sliderplugin', 'image_height', 'height')
+
+        # Renaming field 'SliderPlugin.image_width'
+        db.rename_column('cmsplugin_sliderplugin', 'image_width', 'width')
+
+
+    def backwards(self, orm):
+        # Adding field 'SliderPlugin.show_ribbon'
+        db.add_column('cmsplugin_sliderplugin', 'show_ribbon',
+                      self.gf('django.db.models.fields.BooleanField')(default=True),
+                      keep_default=False)
+
+        # Renaming field 'SliderPlugin.image_height'
+        db.rename_column('cmsplugin_sliderplugin', 'height', 'image_height')
+
+        # Renaming field 'SliderPlugin.image_width'
+        db.rename_column('cmsplugin_sliderplugin', 'width', 'image_width')
+
+
+    models = {
+        'cms.cmsplugin': {
+            'Meta': {'object_name': 'CMSPlugin'},
+            'creation_date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'language': ('django.db.models.fields.CharField', [], {'max_length': '15', 'db_index': 'True'}),
+            'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
+            'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
+            'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.CMSPlugin']", 'null': 'True', 'blank': 'True'}),
+            'placeholder': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cms.Placeholder']", 'null': 'True'}),
+            'plugin_type': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'}),
+            'position': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True', 'blank': 'True'}),
+            'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
+            'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
+        },
+        'cms.placeholder': {
+            'Meta': {'object_name': 'Placeholder'},
+            'default_width': ('django.db.models.fields.PositiveSmallIntegerField', [], {'null': 'True'}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'slot': ('django.db.models.fields.CharField', [], {'max_length': '50', 'db_index': 'True'})
+        },
+        'cmsplugin_nivoslider.slideralbum': {
+            'Meta': {'object_name': 'SliderAlbum'},
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'images': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['cmsplugin_nivoslider.SliderImage']", 'symmetrical': 'False', 'blank': 'True'}),
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '150'})
+        },
+        'cmsplugin_nivoslider.sliderimage': {
+            'Meta': {'ordering': "('order', 'name')", 'object_name': 'SliderImage'},
+            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+            'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
+            'name': ('django.db.models.fields.CharField', [], {'max_length': '150', 'blank': 'True'}),
+            'order': ('django.db.models.fields.PositiveIntegerField', [], {'default': '100'})
+        },
+        'cmsplugin_nivoslider.sliderplugin': {
+            'Meta': {'object_name': 'SliderPlugin', 'db_table': "'cmsplugin_sliderplugin'", '_ormbases': ['cms.CMSPlugin']},
+            'album': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cmsplugin_nivoslider.SliderAlbum']"}),
+            'anim_speed': ('django.db.models.fields.PositiveIntegerField', [], {'default': '500'}),
+            'cmsplugin_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cms.CMSPlugin']", 'unique': 'True', 'primary_key': 'True'}),
+            'effect': ('django.db.models.fields.CharField', [], {'default': "'random'", 'max_length': '50'}),
+            'height': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
+            'pause_time': ('django.db.models.fields.PositiveIntegerField', [], {'default': '3000'}),
+            'theme': ('django.db.models.fields.CharField', [], {'default': "'default'", 'max_length': '50'}),
+            'title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
+            'width': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'})
+        }
+    }
+
+    complete_apps = ['cmsplugin_nivoslider']

cmsplugin_nivoslider/models.py

 
 from django.db import models
 
-from cms.models.fields import PlaceholderField
 from cms.models import CMSPlugin
 from easy_thumbnails.files import get_thumbnailer
-from django.conf import settings
 from django.contrib.staticfiles.finders import find as staticfiles_find
 import os
-import re
+
 
 class SliderImage(models.Model):
     """Image class that user django-filer"""
                 name = self.image.file.name.split("/")[-1]
             except:
                 name = unicode(self.image)
-        return "%s"  % name
+        return name
 
     def thumb(self):
         thumbnail_options = dict(size=(92, 37), crop=True)
-        url =  get_thumbnailer(self.image).get_thumbnail(thumbnail_options).url
+        url = get_thumbnailer(self.image).get_thumbnail(thumbnail_options).url
         return '<img src="%s">' % url
     thumb.allow_tags = True
     thumb.short_description = 'Image'
 
     class Meta:
         verbose_name = u'Slider Album'
-        verbose_name_plural = u'Sliders Album'
+        verbose_name_plural = u'Slider Albums'
 
     def __unicode__(self):
         return self.name
 
+
 EFFECTS = """
     sliceDown
     sliceDownLeft
     boxRainGrow
     boxRainGrowReverse
 """
-EFFECT_CHOICES = [(e,e) for e in EFFECTS.split()]
+EFFECT_CHOICES = ((e, e) for e in EFFECTS.split())
+
 
 def find_themes():
     themedirs = staticfiles_find("nivo/themes/", all=True)
         for theme in os.listdir(dir):
             yield theme
 
-THEME_CHOICES = ((t,t) for t in set(find_themes()))
+THEME_CHOICES = ((t, t) for t in set(find_themes()))
+
 
 class SliderPlugin(CMSPlugin):
-    title = models.CharField('Titulo', max_length=255, null=True, blank=True)
+    title = models.CharField('title', max_length=255, null=True, blank=True)
     album = models.ForeignKey(SliderAlbum)
-    theme = models.CharField(choices=THEME_CHOICES, max_length=50, default="default")
-    effect = models.CharField(choices=EFFECT_CHOICES, max_length=50, default="random")
-    anim_speed = models.PositiveIntegerField(default=500, help_text="Animation Speed (ms)")
-    pause_time = models.PositiveIntegerField(default=3000, help_text="Pause time (ms)")
-    image_width = models.PositiveIntegerField(null=True, blank=True,
-            help_text="Width for images. Only requided for flexible theme types. Blank for theme spec auto.detection")
-    image_height = models.PositiveIntegerField(null=True, blank=True,
-            help_text="Height for images. Only requided for flexible theme types. Blank for theme spec auto.detection")
-    show_ribbon = models.BooleanField(default=True, help_text="Show ribbon logo")
+    theme = models.CharField(choices=THEME_CHOICES, max_length=50,
+                             default="default")
+    effect = models.CharField(choices=EFFECT_CHOICES, max_length=50,
+                              default="random")
+    anim_speed = models.PositiveIntegerField(default=500,
+                                             help_text="Animation Speed (ms)")
+    pause_time = models.PositiveIntegerField(default=3000,
+                                             help_text="Pause time (ms)")
+    width = models.PositiveIntegerField(null=True, blank=True,
+                                        help_text="Width of the plugin (px)")
+    height = models.PositiveIntegerField(null=True, blank=True,
+                                         help_text="Height of the plugin (px)")
 
     def __unicode__(self):
         if self.title:
             return self.title
+        return self.album.name
 
-    def read_theme_css(self):
-        cssfile = staticfiles_find("nivo/themes/%(theme)s/%(theme)s.css" % self.__dict__)
-        return open(cssfile).read()
-
-    def get_theme_type(self):
-        """ Get geometry type from the doc header of css theme file"""
-        css = self.read_theme_css()
-        rawstr = r""".*Skin Type: (?P<gtype>\w+?)\s"""
-        match_obj = re.search(rawstr, css,  re.MULTILINE| re.DOTALL)
-        gtype = match_obj.group('gtype')
-        return gtype
-
-    def get_theme_geometry(self):
-        """ Get with and heigth from the doc header of css theme file"""
-        css = self.read_theme_css()
-        rawstr = r"""Image Width: (?P<width>\d+).*Image Height: (?P<height>\d+)"""
-        match_obj = re.search(rawstr, css,  re.MULTILINE| re.DOTALL)
-        width = match_obj.group('width')
-        height = match_obj.group('height')
-        return (width, height)
-
-    def save(self, *args, **kwargs):
-        if self.get_theme_type() != 'flexible':
-            width, height = self.get_theme_geometry()
-            self.image_width = width
-            self.image_height = height
-        super(SliderPlugin, self).save(*args, **kwargs)
-
-    search_fields = ('title',)
+    search_fields = ('title', 'album__name',)

cmsplugin_nivoslider/static/nivo/css/orman.css

-/*
-Skin Name: Orman Theme
-Skin URI: http://nivo.dev7studios.com
-Skin Type: fixed
-Image Width: 568
-Image Height: 268
-Description: A light and green skin for the Nivo Slider.
-Version: 1.0
-Author: Gilbert Pellegrom & Orman Clark
-Author URI: http://dev7studios.com
-*/
-
-.theme-orman .nivoSlider {
-    position:relative;
-    width:928px;
-    height:378px;
-    margin-left:75px;
-    background:url(../img/loading.gif) no-repeat 50% 50%;
-}
-.theme-orman .nivoSlider img {
-    position:absolute;
-    top:0px;
-    left:0px;
-    display:none;
-    width:928px; /* Make sure your images are the same size */
-    height:378px; /* Make sure your images are the same size */
-}
-.theme-orman .nivoSlider a {
-    border:0;
-    display:block;
-}
-
-.theme-orman .nivo-controlNav {
-    position:absolute;
-	left:50%;
-	bottom:-45px;
-    margin-left:-30px; /* Tweak this to center bullets */
-}
-.theme-orman .nivo-controlNav a {
-    display:block;
-    width:10px;
-    height:10px;
-    background:url(../img/icons.png) no-repeat 0 -355px;
-    text-indent:-9999px;
-    border:0;
-    margin-right:7px;
-    float:left;
-    cursor:pointer;
-}
-.theme-orman .nivo-controlNav a.active {
-    background-position:0 -365px;
-}
-
-.theme-orman .nivo-directionNav a {
-	display:block;
-	width:25px;
-	height:200px;
-	background:url(../img/arrows.png) no-repeat 0% 50%;
-	text-indent:-9999px;
-	border:0;
-    top:60px;
-}
-.theme-orman a.nivo-nextNav {
-	background-position:100% 50%;
-	right:-50px;
-    padding:0 20px 0 10px;
-}
-.theme-orman a.nivo-prevNav {
-	left:-50px;
-    padding:0 10px 0 20px;
-}
-
-.theme-orman .nivo-caption {
-    font-family: Helvetica, Arial, sans-serif;
-}
-.theme-orman .nivo-caption a { 
-    color:#fff;
-    border-bottom:1px dotted #fff;
-}
-.theme-orman .nivo-caption a:hover { 
-    color:#fff;
-}
-
-/* The Nivo Slider styles */
-.nivoSlider {
-	position:relative;
-}
-.nivoSlider img {
-	position:absolute;
-	top:0px;
-	left:0px;
-}
-/* If an image is wrapped in a link */
-.nivoSlider a.nivo-imageLink {
-	position:absolute;
-	top:0px;
-	left:0px;
-	width:100%;
-	height:100%;
-	border:0;
-	padding:0;
-	margin:0;
-	z-index:6;
-	display:none;
-}
-/* The slices and boxes in the Slider */
-.nivo-slice {
-	display:block;
-	position:absolute;
-	z-index:5;
-	height:100%;
-}
-.nivo-box {
-	display:block;
-	position:absolute;
-	z-index:5;
-}
-/* Caption styles */
-.nivo-caption {
-	position:absolute;
-	left:0px;
-	bottom:0px;
-	background:#000;
-	color:#fff;
-	opacity:0.8; /* Overridden by captionOpacity setting */
-	width:100%;
-	z-index:8;
-}
-.nivo-caption p {
-	padding:5px;
-	margin:0;
-}
-.nivo-caption a {
-	display:inline !important;
-}
-.nivo-html-caption {
-    display:none;
-}
-/* Direction nav styles (e.g. Next & Prev) */
-.nivo-directionNav a {
-	position:absolute;
-	top:45%;
-	z-index:9;
-	cursor:pointer;
-}
-.nivo-prevNav {
-	left:0px;
-}
-.nivo-nextNav {
-	right:0px;
-}
-/* Control nav styles (e.g. 1,2,3...) */
-.nivo-controlNav a {
-	position:relative;
-	z-index:9;
-	cursor:pointer;
-}
-.nivo-controlNav a.active {
-	font-weight:bold;
-}

cmsplugin_nivoslider/static/nivo/img/arrows.png

Removed
Old image

cmsplugin_nivoslider/static/nivo/img/icons.png

Removed
Old image

cmsplugin_nivoslider/static/nivo/img/loading.gif

Removed
Old image

cmsplugin_nivoslider/static/nivo/js/jquery.nivo.slider.pack.js

-/*
- * jQuery Nivo Slider v2.7.1
- * http://nivo.dev7studios.com
- *
- * Copyright 2011, Gilbert Pellegrom
- * Free to use and abuse under the MIT license.
- * http://www.opensource.org/licenses/mit-license.php
- * 
- * March 2010
- */
-
-(function(a){var b=function(b,c){var d=a.extend({},a.fn.nivoSlider.defaults,c);var e={currentSlide:0,currentImage:"",totalSlides:0,running:false,paused:false,stop:false};var f=a(b);f.data("nivo:vars",e);f.css("position","relative");f.addClass("nivoSlider");var g=f.children();g.each(function(){var b=a(this);var c="";if(!b.is("img")){if(b.is("a")){b.addClass("nivo-imageLink");c=b}b=b.find("img:first")}var d=b.width();if(d==0)d=b.attr("width");var g=b.height();if(g==0)g=b.attr("height");if(d>f.width()){f.width(d)}if(g>f.height()){f.height(g)}if(c!=""){c.css("display","none")}b.css("display","none");e.totalSlides++});if(d.randomStart){d.startSlide=Math.floor(Math.random()*e.totalSlides)}if(d.startSlide>0){if(d.startSlide>=e.totalSlides)d.startSlide=e.totalSlides-1;e.currentSlide=d.startSlide}if(a(g[e.currentSlide]).is("img")){e.currentImage=a(g[e.currentSlide])}else{e.currentImage=a(g[e.currentSlide]).find("img:first")}if(a(g[e.currentSlide]).is("a")){a(g[e.currentSlide]).css("display","block")}f.css("background",'url("'+e.currentImage.attr("src")+'") no-repeat');f.append(a('<div class="nivo-caption"><p></p></div>').css({display:"none",opacity:d.captionOpacity}));a(".nivo-caption",f).css("opacity",0);var h=function(b){var c=a(".nivo-caption",f);if(e.currentImage.attr("title")!=""&&e.currentImage.attr("title")!=undefined){var d=e.currentImage.attr("title");if(d.substr(0,1)=="#")d=a(d).html();if(c.css("opacity")!=0){c.find("p").stop().fadeTo(b.animSpeed,0,function(){a(this).html(d);a(this).stop().fadeTo(b.animSpeed,1)})}else{c.find("p").html(d)}c.stop().fadeTo(b.animSpeed,b.captionOpacity)}else{c.stop().fadeTo(b.animSpeed,0)}};h(d);var i=0;if(!d.manualAdvance&&g.length>1){i=setInterval(function(){o(f,g,d,false)},d.pauseTime)}if(d.directionNav){f.append('<div class="nivo-directionNav"><a class="nivo-prevNav">'+d.prevText+'</a><a class="nivo-nextNav">'+d.nextText+"</a></div>");if(d.directionNavHide){a(".nivo-directionNav",f).hide();f.hover(function(){a(".nivo-directionNav",f).show()},function(){a(".nivo-directionNav",f).hide()})}a("a.nivo-prevNav",f).live("click",function(){if(e.running)return false;clearInterval(i);i="";e.currentSlide-=2;o(f,g,d,"prev")});a("a.nivo-nextNav",f).live("click",function(){if(e.running)return false;clearInterval(i);i="";o(f,g,d,"next")})}if(d.controlNav){var j=a('<div class="nivo-controlNav"></div>');f.append(j);for(var k=0;k<g.length;k++){if(d.controlNavThumbs){var l=g.eq(k);if(!l.is("img")){l=l.find("img:first")}if(d.controlNavThumbsFromRel){j.append('<a class="nivo-control" rel="'+k+'"><img src="'+l.attr("rel")+'" alt="" /></a>')}else{j.append('<a class="nivo-control" rel="'+k+'"><img src="'+l.attr("src").replace(d.controlNavThumbsSearch,d.controlNavThumbsReplace)+'" alt="" /></a>')}}else{j.append('<a class="nivo-control" rel="'+k+'">'+(k+1)+"</a>")}}a(".nivo-controlNav a:eq("+e.currentSlide+")",f).addClass("active");a(".nivo-controlNav a",f).live("click",function(){if(e.running)return false;if(a(this).hasClass("active"))return false;clearInterval(i);i="";f.css("background",'url("'+e.currentImage.attr("src")+'") no-repeat');e.currentSlide=a(this).attr("rel")-1;o(f,g,d,"control")})}if(d.keyboardNav){a(window).keypress(function(a){if(a.keyCode=="37"){if(e.running)return false;clearInterval(i);i="";e.currentSlide-=2;o(f,g,d,"prev")}if(a.keyCode=="39"){if(e.running)return false;clearInterval(i);i="";o(f,g,d,"next")}})}if(d.pauseOnHover){f.hover(function(){e.paused=true;clearInterval(i);i=""},function(){e.paused=false;if(i==""&&!d.manualAdvance){i=setInterval(function(){o(f,g,d,false)},d.pauseTime)}})}f.bind("nivo:animFinished",function(){e.running=false;a(g).each(function(){if(a(this).is("a")){a(this).css("display","none")}});if(a(g[e.currentSlide]).is("a")){a(g[e.currentSlide]).css("display","block")}if(i==""&&!e.paused&&!d.manualAdvance){i=setInterval(function(){o(f,g,d,false)},d.pauseTime)}d.afterChange.call(this)});var m=function(b,c,d){for(var e=0;e<c.slices;e++){var f=Math.round(b.width()/c.slices);if(e==c.slices-1){b.append(a('<div class="nivo-slice"></div>').css({left:f*e+"px",width:b.width()-f*e+"px",height:"0px",opacity:"0",background:'url("'+d.currentImage.attr("src")+'") no-repeat -'+(f+e*f-f)+"px 0%"}))}else{b.append(a('<div class="nivo-slice"></div>').css({left:f*e+"px",width:f+"px",height:"0px",opacity:"0",background:'url("'+d.currentImage.attr("src")+'") no-repeat -'+(f+e*f-f)+"px 0%"}))}}};var n=function(b,c,d){var e=Math.round(b.width()/c.boxCols);var f=Math.round(b.height()/c.boxRows);for(var g=0;g<c.boxRows;g++){for(var h=0;h<c.boxCols;h++){if(h==c.boxCols-1){b.append(a('<div class="nivo-box"></div>').css({opacity:0,left:e*h+"px",top:f*g+"px",width:b.width()-e*h+"px",height:f+"px",background:'url("'+d.currentImage.attr("src")+'") no-repeat -'+(e+h*e-e)+"px -"+(f+g*f-f)+"px"}))}else{b.append(a('<div class="nivo-box"></div>').css({opacity:0,left:e*h+"px",top:f*g+"px",width:e+"px",height:f+"px",background:'url("'+d.currentImage.attr("src")+'") no-repeat -'+(e+h*e-e)+"px -"+(f+g*f-f)+"px"}))}}}};var o=function(b,c,d,e){var f=b.data("nivo:vars");if(f&&f.currentSlide==f.totalSlides-1){d.lastSlide.call(this)}if((!f||f.stop)&&!e)return false;d.beforeChange.call(this);if(!e){b.css("background",'url("'+f.currentImage.attr("src")+'") no-repeat')}else{if(e=="prev"){b.css("background",'url("'+f.currentImage.attr("src")+'") no-repeat')}if(e=="next"){b.css("background",'url("'+f.currentImage.attr("src")+'") no-repeat')}}f.currentSlide++;if(f.currentSlide==f.totalSlides){f.currentSlide=0;d.slideshowEnd.call(this)}if(f.currentSlide<0)f.currentSlide=f.totalSlides-1;if(a(c[f.currentSlide]).is("img")){f.currentImage=a(c[f.currentSlide])}else{f.currentImage=a(c[f.currentSlide]).find("img:first")}if(d.controlNav){a(".nivo-controlNav a",b).removeClass("active");a(".nivo-controlNav a:eq("+f.currentSlide+")",b).addClass("active")}h(d);a(".nivo-slice",b).remove();a(".nivo-box",b).remove();var g=d.effect;if(d.effect=="random"){var i=new Array("sliceDownRight","sliceDownLeft","sliceUpRight","sliceUpLeft","sliceUpDown","sliceUpDownLeft","fold","fade","boxRandom","boxRain","boxRainReverse","boxRainGrow","boxRainGrowReverse");g=i[Math.floor(Math.random()*(i.length+1))];if(g==undefined)g="fade"}if(d.effect.indexOf(",")!=-1){var i=d.effect.split(",");g=i[Math.floor(Math.random()*i.length)];if(g==undefined)g="fade"}if(f.currentImage.attr("data-transition")){g=f.currentImage.attr("data-transition")}f.running=true;if(g=="sliceDown"||g=="sliceDownRight"||g=="sliceDownLeft"){m(b,d,f);var j=0;var k=0;var l=a(".nivo-slice",b);if(g=="sliceDownLeft")l=a(".nivo-slice",b)._reverse();l.each(function(){var c=a(this);c.css({top:"0px"});if(k==d.slices-1){setTimeout(function(){c.animate({height:"100%",opacity:"1.0"},d.animSpeed,"",function(){b.trigger("nivo:animFinished")})},100+j)}else{setTimeout(function(){c.animate({height:"100%",opacity:"1.0"},d.animSpeed)},100+j)}j+=50;k++})}else if(g=="sliceUp"||g=="sliceUpRight"||g=="sliceUpLeft"){m(b,d,f);var j=0;var k=0;var l=a(".nivo-slice",b);if(g=="sliceUpLeft")l=a(".nivo-slice",b)._reverse();l.each(function(){var c=a(this);c.css({bottom:"0px"});if(k==d.slices-1){setTimeout(function(){c.animate({height:"100%",opacity:"1.0"},d.animSpeed,"",function(){b.trigger("nivo:animFinished")})},100+j)}else{setTimeout(function(){c.animate({height:"100%",opacity:"1.0"},d.animSpeed)},100+j)}j+=50;k++})}else if(g=="sliceUpDown"||g=="sliceUpDownRight"||g=="sliceUpDownLeft"){m(b,d,f);var j=0;var k=0;var o=0;var l=a(".nivo-slice",b);if(g=="sliceUpDownLeft")l=a(".nivo-slice",b)._reverse();l.each(function(){var c=a(this);if(k==0){c.css("top","0px");k++}else{c.css("bottom","0px");k=0}if(o==d.slices-1){setTimeout(function(){c.animate({height:"100%",opacity:"1.0"},d.animSpeed,"",function(){b.trigger("nivo:animFinished")})},100+j)}else{setTimeout(function(){c.animate({height:"100%",opacity:"1.0"},d.animSpeed)},100+j)}j+=50;o++})}else if(g=="fold"){m(b,d,f);var j=0;var k=0;a(".nivo-slice",b).each(function(){var c=a(this);var e=c.width();c.css({top:"0px",height:"100%",width:"0px"});if(k==d.slices-1){setTimeout(function(){c.animate({width:e,opacity:"1.0"},d.animSpeed,"",function(){b.trigger("nivo:animFinished")})},100+j)}else{setTimeout(function(){c.animate({width:e,opacity:"1.0"},d.animSpeed)},100+j)}j+=50;k++})}else if(g=="fade"){m(b,d,f);var q=a(".nivo-slice:first",b);q.css({height:"100%",width:b.width()+"px"});q.animate({opacity:"1.0"},d.animSpeed*2,"",function(){b.trigger("nivo:animFinished")})}else if(g=="slideInRight"){m(b,d,f);var q=a(".nivo-slice:first",b);q.css({height:"100%",width:"0px",opacity:"1"});q.animate({width:b.width()+"px"},d.animSpeed*2,"",function(){b.trigger("nivo:animFinished")})}else if(g=="slideInLeft"){m(b,d,f);var q=a(".nivo-slice:first",b);q.css({height:"100%",width:"0px",opacity:"1",left:"",right:"0px"});q.animate({width:b.width()+"px"},d.animSpeed*2,"",function(){q.css({left:"0px",right:""});b.trigger("nivo:animFinished")})}else if(g=="boxRandom"){n(b,d,f);var r=d.boxCols*d.boxRows;var k=0;var j=0;var s=p(a(".nivo-box",b));s.each(function(){var c=a(this);if(k==r-1){setTimeout(function(){c.animate({opacity:"1"},d.animSpeed,"",function(){b.trigger("nivo:animFinished")})},100+j)}else{setTimeout(function(){c.animate({opacity:"1"},d.animSpeed)},100+j)}j+=20;k++})}else if(g=="boxRain"||g=="boxRainReverse"||g=="boxRainGrow"||g=="boxRainGrowReverse"){n(b,d,f);var r=d.boxCols*d.boxRows;var k=0;var j=0;var t=0;var u=0;var v=new Array;v[t]=new Array;var s=a(".nivo-box",b);if(g=="boxRainReverse"||g=="boxRainGrowReverse"){s=a(".nivo-box",b)._reverse()}s.each(function(){v[t][u]=a(this);u++;if(u==d.boxCols){t++;u=0;v[t]=new Array}});for(var w=0;w<d.boxCols*2;w++){var x=w;for(var y=0;y<d.boxRows;y++){if(x>=0&&x<d.boxCols){(function(c,e,f,h,i){var j=a(v[c][e]);var k=j.width();var l=j.height();if(g=="boxRainGrow"||g=="boxRainGrowReverse"){j.width(0).height(0)}if(h==i-1){setTimeout(function(){j.animate({opacity:"1",width:k,height:l},d.animSpeed/1.3,"",function(){b.trigger("nivo:animFinished")})},100+f)}else{setTimeout(function(){j.animate({opacity:"1",width:k,height:l},d.animSpeed/1.3)},100+f)}})(y,x,j,k,r);k++}x--}j+=100}}};var p=function(a){for(var b,c,d=a.length;d;b=parseInt(Math.random()*d),c=a[--d],a[d]=a[b],a[b]=c);return a};var q=function(a){if(this.console&&typeof console.log!="undefined")console.log(a)};this.stop=function(){if(!a(b).data("nivo:vars").stop){a(b).data("nivo:vars").stop=true;q("Stop Slider")}};this.start=function(){if(a(b).data("nivo:vars").stop){a(b).data("nivo:vars").stop=false;q("Start Slider")}};d.afterLoad.call(this);return this};a.fn.nivoSlider=function(c){return this.each(function(d,e){var f=a(this);if(f.data("nivoslider"))return f.data("nivoslider");var g=new b(this,c);f.data("nivoslider",g)})};a.fn.nivoSlider.defaults={effect:"random",slices:15,boxCols:8,boxRows:4,animSpeed:500,pauseTime:3e3,startSlide:0,directionNav:true,directionNavHide:true,controlNav:true,controlNavThumbs:false,controlNavThumbsFromRel:false,controlNavThumbsSearch:".jpg",controlNavThumbsReplace:"_thumb.jpg",keyboardNav:true,pauseOnHover:true,manualAdvance:false,captionOpacity:.8,prevText:"Prev",nextText:"Next",randomStart:false,beforeChange:function(){},afterChange:function(){},slideshowEnd:function(){},lastSlide:function(){},afterLoad:function(){}};a.fn._reverse=[].reverse})(jQuery)
+/*
+ * jQuery Nivo Slider v3.1
+ * http://nivo.dev7studios.com
+ *
+ * Copyright 2012, Dev7studios
+ * Free to use and abuse under the MIT license.
+ * http://www.opensource.org/licenses/mit-license.php
+ */
+
+(function(a){var b=function(b,c){var d=a.extend({},a.fn.nivoSlider.defaults,c);var e={currentSlide:0,currentImage:"",totalSlides:0,running:false,paused:false,stop:false,controlNavEl:false};var f=a(b);f.data("nivo:vars",e).addClass("nivoSlider");var g=f.children();g.each(function(){var b=a(this);var c="";if(!b.is("img")){if(b.is("a")){b.addClass("nivo-imageLink");c=b}b=b.find("img:first")}var d=d===0?b.attr("width"):b.width(),f=f===0?b.attr("height"):b.height();if(c!==""){c.css("display","none")}b.css("display","none");e.totalSlides++});if(d.randomStart){d.startSlide=Math.floor(Math.random()*e.totalSlides)}if(d.startSlide>0){if(d.startSlide>=e.totalSlides){d.startSlide=e.totalSlides-1}e.currentSlide=d.startSlide}if(a(g[e.currentSlide]).is("img")){e.currentImage=a(g[e.currentSlide])}else{e.currentImage=a(g[e.currentSlide]).find("img:first")}if(a(g[e.currentSlide]).is("a")){a(g[e.currentSlide]).css("display","block")}var h=a('<img class="nivo-main-image" src="#" />');h.attr("src",e.currentImage.attr("src")).show();f.append(h);a(window).resize(function(){f.children("img").width(f.width());h.attr("src",e.currentImage.attr("src"));h.stop().height("auto");a(".nivo-slice").remove();a(".nivo-box").remove()});f.append(a('<div class="nivo-caption"></div>'));var i=function(b){var c=a(".nivo-caption",f);if(e.currentImage.attr("title")!=""&&e.currentImage.attr("title")!=undefined){var d=e.currentImage.attr("title");if(d.substr(0,1)=="#")d=a(d).html();if(c.css("display")=="block"){setTimeout(function(){c.html(d)},b.animSpeed)}else{c.html(d);c.stop().fadeIn(b.animSpeed)}}else{c.stop().fadeOut(b.animSpeed)}};i(d);var j=0;if(!d.manualAdvance&&g.length>1){j=setInterval(function(){o(f,g,d,false)},d.pauseTime)}if(d.directionNav){f.append('<div class="nivo-directionNav"><a class="nivo-prevNav">'+d.prevText+'</a><a class="nivo-nextNav">'+d.nextText+"</a></div>");a("a.nivo-prevNav",f).live("click",function(){if(e.running){return false}clearInterval(j);j="";e.currentSlide-=2;o(f,g,d,"prev")});a("a.nivo-nextNav",f).live("click",function(){if(e.running){return false}clearInterval(j);j="";o(f,g,d,"next")})}if(d.controlNav){e.controlNavEl=a('<div class="nivo-controlNav"></div>');f.after(e.controlNavEl);for(var k=0;k<g.length;k++){if(d.controlNavThumbs){e.controlNavEl.addClass("nivo-thumbs-enabled");var l=g.eq(k);if(!l.is("img")){l=l.find("img:first")}if(l.attr("data-thumb"))e.controlNavEl.append('<a class="nivo-control" rel="'+k+'"><img src="'+l.attr("data-thumb")+'" alt="" /></a>')}else{e.controlNavEl.append('<a class="nivo-control" rel="'+k+'">'+(k+1)+"</a>")}}a("a:eq("+e.currentSlide+")",e.controlNavEl).addClass("active");a("a",e.controlNavEl).bind("click",function(){if(e.running)return false;if(a(this).hasClass("active"))return false;clearInterval(j);j="";h.attr("src",e.currentImage.attr("src"));e.currentSlide=a(this).attr("rel")-1;o(f,g,d,"control")})}if(d.pauseOnHover){f.hover(function(){e.paused=true;clearInterval(j);j=""},function(){e.paused=false;if(j===""&&!d.manualAdvance){j=setInterval(function(){o(f,g,d,false)},d.pauseTime)}})}f.bind("nivo:animFinished",function(){h.attr("src",e.currentImage.attr("src"));e.running=false;a(g).each(function(){if(a(this).is("a")){a(this).css("display","none")}});if(a(g[e.currentSlide]).is("a")){a(g[e.currentSlide]).css("display","block")}if(j===""&&!e.paused&&!d.manualAdvance){j=setInterval(function(){o(f,g,d,false)},d.pauseTime)}d.afterChange.call(this)});var m=function(b,c,d){if(a(d.currentImage).parent().is("a"))a(d.currentImage).parent().css("display","block");a('img[src="'+d.currentImage.attr("src")+'"]',b).not(".nivo-main-image,.nivo-control img").width(b.width()).css("visibility","hidden").show();var e=a('img[src="'+d.currentImage.attr("src")+'"]',b).not(".nivo-main-image,.nivo-control img").parent().is("a")?a('img[src="'+d.currentImage.attr("src")+'"]',b).not(".nivo-main-image,.nivo-control img").parent().height():a('img[src="'+d.currentImage.attr("src")+'"]',b).not(".nivo-main-image,.nivo-control img").height();for(var f=0;f<c.slices;f++){var g=Math.round(b.width()/c.slices);if(f===c.slices-1){b.append(a('<div class="nivo-slice" name="'+f+'"><img src="'+d.currentImage.attr("src")+'" style="position:absolute; width:'+b.width()+"px; height:auto; display:block !important; top:0; left:-"+(g+f*g-g)+'px;" /></div>').css({left:g*f+"px",width:b.width()-g*f+"px",height:e+"px",opacity:"0",overflow:"hidden"}))}else{b.append(a('<div class="nivo-slice" name="'+f+'"><img src="'+d.currentImage.attr("src")+'" style="position:absolute; width:'+b.width()+"px; height:auto; display:block !important; top:0; left:-"+(g+f*g-g)+'px;" /></div>').css({left:g*f+"px",width:g+"px",height:e+"px",opacity:"0",overflow:"hidden"}))}}a(".nivo-slice",b).height(e);h.stop().animate({height:a(d.currentImage).height()},c.animSpeed)};var n=function(b,c,d){if(a(d.currentImage).parent().is("a"))a(d.currentImage).parent().css("display","block");a('img[src="'+d.currentImage.attr("src")+'"]',b).not(".nivo-main-image,.nivo-control img").width(b.width()).css("visibility","hidden").show();var e=Math.round(b.width()/c.boxCols),f=Math.round(a('img[src="'+d.currentImage.attr("src")+'"]',b).not(".nivo-main-image,.nivo-control img").height()/c.boxRows);for(var g=0;g<c.boxRows;g++){for(var i=0;i<c.boxCols;i++){if(i===c.boxCols-1){b.append(a('<div class="nivo-box" name="'+i+'" rel="'+g+'"><img src="'+d.currentImage.attr("src")+'" style="position:absolute; width:'+b.width()+"px; height:auto; display:block; top:-"+f*g+"px; left:-"+e*i+'px;" /></div>').css({opacity:0,left:e*i+"px",top:f*g+"px",width:b.width()-e*i+"px"}));a('.nivo-box[name="'+i+'"]',b).height(a('.nivo-box[name="'+i+'"] img',b).height()+"px")}else{b.append(a('<div class="nivo-box" name="'+i+'" rel="'+g+'"><img src="'+d.currentImage.attr("src")+'" style="position:absolute; width:'+b.width()+"px; height:auto; display:block; top:-"+f*g+"px; left:-"+e*i+'px;" /></div>').css({opacity:0,left:e*i+"px",top:f*g+"px",width:e+"px"}));a('.nivo-box[name="'+i+'"]',b).height(a('.nivo-box[name="'+i+'"] img',b).height()+"px")}}}h.stop().animate({height:a(d.currentImage).height()},c.animSpeed)};var o=function(b,c,d,e){var f=b.data("nivo:vars");if(f&&f.currentSlide===f.totalSlides-1){d.lastSlide.call(this)}if((!f||f.stop)&&!e){return false}d.beforeChange.call(this);if(!e){h.attr("src",f.currentImage.attr("src"))}else{if(e==="prev"){h.attr("src",f.currentImage.attr("src"))}if(e==="next"){h.attr("src",f.currentImage.attr("src"))}}f.currentSlide++;if(f.currentSlide===f.totalSlides){f.currentSlide=0;d.slideshowEnd.call(this)}if(f.currentSlide<0){f.currentSlide=f.totalSlides-1}if(a(c[f.currentSlide]).is("img")){f.currentImage=a(c[f.currentSlide])}else{f.currentImage=a(c[f.currentSlide]).find("img:first")}if(d.controlNav){a("a",f.controlNavEl).removeClass("active");a("a:eq("+f.currentSlide+")",f.controlNavEl).addClass("active")}i(d);a(".nivo-slice",b).remove();a(".nivo-box",b).remove();var g=d.effect,j="";if(d.effect==="random"){j=new Array("sliceDownRight","sliceDownLeft","sliceUpRight","sliceUpLeft","sliceUpDown","sliceUpDownLeft","fold","fade","boxRandom","boxRain","boxRainReverse","boxRainGrow","boxRainGrowReverse");g=j[Math.floor(Math.random()*(j.length+1))];if(g===undefined){g="fade"}}if(d.effect.indexOf(",")!==-1){j=d.effect.split(",");g=j[Math.floor(Math.random()*j.length)];if(g===undefined){g="fade"}}if(f.currentImage.attr("data-transition")){g=f.currentImage.attr("data-transition")}f.running=true;var k=0,l=0,o="",q="",r="",s="";if(g==="sliceDown"||g==="sliceDownRight"||g==="sliceDownLeft"){m(b,d,f);k=0;l=0;o=a(".nivo-slice",b);if(g==="sliceDownLeft"){o=a(".nivo-slice",b)._reverse()}o.each(function(){var c=a(this);c.css({top:"0px"});if(l===d.slices-1){setTimeout(function(){c.animate({opacity:"1.0"},d.animSpeed,"",function(){b.trigger("nivo:animFinished")})},100+k)}else{setTimeout(function(){c.animate({opacity:"1.0"},d.animSpeed)},100+k)}k+=50;l++})}else if(g==="sliceUp"||g==="sliceUpRight"||g==="sliceUpLeft"){m(b,d,f);k=0;l=0;o=a(".nivo-slice",b);if(g==="sliceUpLeft"){o=a(".nivo-slice",b)._reverse()}o.each(function(){var c=a(this);c.css({bottom:"0px"});if(l===d.slices-1){setTimeout(function(){c.animate({opacity:"1.0"},d.animSpeed,"",function(){b.trigger("nivo:animFinished")})},100+k)}else{setTimeout(function(){c.animate({opacity:"1.0"},d.animSpeed)},100+k)}k+=50;l++})}else if(g==="sliceUpDown"||g==="sliceUpDownRight"||g==="sliceUpDownLeft"){m(b,d,f);k=0;l=0;var t=0;o=a(".nivo-slice",b);if(g==="sliceUpDownLeft"){o=a(".nivo-slice",b)._reverse()}o.each(function(){var c=a(this);if(l===0){c.css("top","0px");l++}else{c.css("bottom","0px");l=0}if(t===d.slices-1){setTimeout(function(){c.animate({opacity:"1.0"},d.animSpeed,"",function(){b.trigger("nivo:animFinished")})},100+k)}else{setTimeout(function(){c.animate({opacity:"1.0"},d.animSpeed)},100+k)}k+=50;t++})}else if(g==="fold"){m(b,d,f);k=0;l=0;a(".nivo-slice",b).each(function(){var c=a(this);var e=c.width();c.css({top:"0px",width:"0px"});if(l===d.slices-1){setTimeout(function(){c.animate({width:e,opacity:"1.0"},d.animSpeed,"",function(){b.trigger("nivo:animFinished")})},100+k)}else{setTimeout(function(){c.animate({width:e,opacity:"1.0"},d.animSpeed)},100+k)}k+=50;l++})}else if(g==="fade"){m(b,d,f);q=a(".nivo-slice:first",b);q.css({width:b.width()+"px"});q.animate({opacity:"1.0"},d.animSpeed*2,"",function(){b.trigger("nivo:animFinished")})}else if(g==="slideInRight"){m(b,d,f);q=a(".nivo-slice:first",b);q.css({width:"0px",opacity:"1"});q.animate({width:b.width()+"px"},d.animSpeed*2,"",function(){b.trigger("nivo:animFinished")})}else if(g==="slideInLeft"){m(b,d,f);q=a(".nivo-slice:first",b);q.css({width:"0px",opacity:"1",left:"",right:"0px"});q.animate({width:b.width()+"px"},d.animSpeed*2,"",function(){q.css({left:"0px",right:""});b.trigger("nivo:animFinished")})}else if(g==="boxRandom"){n(b,d,f);r=d.boxCols*d.boxRows;l=0;k=0;s=p(a(".nivo-box",b));s.each(function(){var c=a(this);if(l===r-1){setTimeout(function(){c.animate({opacity:"1"},d.animSpeed,"",function(){b.trigger("nivo:animFinished")})},100+k)}else{setTimeout(function(){c.animate({opacity:"1"},d.animSpeed)},100+k)}k+=20;l++})}else if(g==="boxRain"||g==="boxRainReverse"||g==="boxRainGrow"||g==="boxRainGrowReverse"){n(b,d,f);r=d.boxCols*d.boxRows;l=0;k=0;var u=0;var v=0;var w=[];w[u]=[];s=a(".nivo-box",b);if(g==="boxRainReverse"||g==="boxRainGrowReverse"){s=a(".nivo-box",b)._reverse()}s.each(function(){w[u][v]=a(this);v++;if(v===d.boxCols){u++;v=0;w[u]=[]}});for(var x=0;x<d.boxCols*2;x++){var y=x;for(var z=0;z<d.boxRows;z++){if(y>=0&&y<d.boxCols){(function(c,e,f,h,i){var j=a(w[c][e]);var k=j.width();var l=j.height();if(g==="boxRainGrow"||g==="boxRainGrowReverse"){j.width(0).height(0)}if(h===i-1){setTimeout(function(){j.animate({opacity:"1",width:k,height:l},d.animSpeed/1.3,"",function(){b.trigger("nivo:animFinished")})},100+f)}else{setTimeout(function(){j.animate({opacity:"1",width:k,height:l},d.animSpeed/1.3)},100+f)}})(z,y,k,l,r);l++}y--}k+=100}}};var p=function(a){for(var b,c,d=a.length;d;b=parseInt(Math.random()*d,10),c=a[--d],a[d]=a[b],a[b]=c);return a};var q=function(a){if(this.console&&typeof console.log!=="undefined"){console.log(a)}};this.stop=function(){if(!a(b).data("nivo:vars").stop){a(b).data("nivo:vars").stop=true;q("Stop Slider")}};this.start=function(){if(a(b).data("nivo:vars").stop){a(b).data("nivo:vars").stop=false;q("Start Slider")}};d.afterLoad.call(this);return this};a.fn.nivoSlider=function(c){return this.each(function(d,e){var f=a(this);if(f.data("nivoslider")){return f.data("nivoslider")}var g=new b(this,c);f.data("nivoslider",g)})};a.fn.nivoSlider.defaults={effect:"random",slices:15,boxCols:8,boxRows:4,animSpeed:500,pauseTime:3e3,startSlide:0,directionNav:true,controlNav:true,controlNavThumbs:false,pauseOnHover:true,manualAdvance:false,prevText:"Prev",nextText:"Next",randomStart:false,beforeChange:function(){},afterChange:function(){},slideshowEnd:function(){},lastSlide:function(){},afterLoad:function(){}};a.fn._reverse=[].reverse})(jQuery)

cmsplugin_nivoslider/static/nivo/nivo-slider.css

 /*
- * jQuery Nivo Slider v2.7.1
+ * jQuery Nivo Slider v3.1
  * http://nivo.dev7studios.com
  *
- * Copyright 2011, Gilbert Pellegrom
+ * Copyright 2012, Dev7studios
  * Free to use and abuse under the MIT license.
  * http://www.opensource.org/licenses/mit-license.php
- * 
- * March 2010
  */
  
- 
 /* The Nivo Slider styles */
 .nivoSlider {
 	position:relative;
+	width:100%;
+	height:auto;
+	overflow: hidden;
 }
 .nivoSlider img {
 	position:absolute;
 	top:0px;
 	left:0px;
+	max-width: none;
 }
+.nivo-main-image {
+	display: block !important;
+	position: relative !important; 
+	width: 100% !important;
+}
+
 /* If an image is wrapped in a link */
 .nivoSlider a.nivo-imageLink {
 	position:absolute;
 	position:absolute;
 	z-index:5;
 	height:100%;
+	top:0;
 }
 .nivo-box {
 	display:block;
 	position:absolute;
 	z-index:5;
+	overflow:hidden;
 }
+.nivo-box img { display:block; }
+
 /* Caption styles */
 .nivo-caption {
 	position:absolute;
 	bottom:0px;
 	background:#000;
 	color:#fff;
-	opacity:0.8; /* Overridden by captionOpacity setting */
 	width:100%;
 	z-index:8;
+	padding: 5px 10px;
+	opacity: 0.8;
+	overflow: hidden;
+	display: none;
+	-moz-opacity: 0.8;
+	filter:alpha(opacity=8);
+	-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
+	-moz-box-sizing: border-box;    /* Firefox, other Gecko */
+	box-sizing: border-box;         /* Opera/IE 8+ */
 }
 .nivo-caption p {
 	padding:5px;
 	right:0px;
 }
 /* Control nav styles (e.g. 1,2,3...) */
+.nivo-controlNav {
+	text-align:center;
+	padding: 15px 0;
+}
 .nivo-controlNav a {
-	position:relative;
-	z-index:9;
 	cursor:pointer;
 }
 .nivo-controlNav a.active {

cmsplugin_nivoslider/static/nivo/themes/bar/arrows.png

Added
New image

cmsplugin_nivoslider/static/nivo/themes/bar/bar.css

+/*
+Skin Name: Nivo Slider Bar Theme
+Skin URI: http://nivo.dev7studios.com
+Description: The bottom bar skin for the Nivo Slider.
+Version: 1.0
+Author: Gilbert Pellegrom
+Author URI: http://dev7studios.com
+Supports Thumbs: false
+*/
+
+.theme-bar.slider-wrapper {
+    position: relative;
+    border: 1px solid #333;
+    overflow: hidden;
+}
+.theme-bar .nivoSlider {
+	position:relative;
+	background:#fff url(loading.gif) no-repeat 50% 50%;
+}
+.theme-bar .nivoSlider img {
+	position:absolute;
+	top:0px;
+	left:0px;
+	display:none;
+}
+.theme-bar .nivoSlider a {
+	border:0;
+	display:block;
+}
+
+.theme-bar .nivo-controlNav {
+    position: absolute;
+    left: 0;
+    bottom: -41px;
+    z-index: 10;
+    width: 100%;
+    height: 30px;
+	text-align: center;
+	padding: 5px 0;
+	border-top: 1px solid #333;
+	background: #333;
+    background: -moz-linear-gradient(top,  #565656 0%, #333333 100%); /* FF3.6+ */
+    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#565656), color-stop(100%,#333333)); /* Chrome,Safari4+ */
+    background: -webkit-linear-gradient(top,  #565656 0%,#333333 100%); /* Chrome10+,Safari5.1+ */
+    background: -o-linear-gradient(top,  #565656 0%,#333333 100%); /* Opera 11.10+ */
+    background: -ms-linear-gradient(top,  #565656 0%,#333333 100%); /* IE10+ */
+    background: linear-gradient(to bottom,  #565656 0%,#333333 100%); /* W3C */
+    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#565656', endColorstr='#333333',GradientType=0 ); /* IE6-9 */
+    opacity: 0.5;
+    -webkit-transition: all 200ms ease-in-out;
+    -moz-transition: all 200ms ease-in-out;
+    -o-transition: all 200ms ease-in-out;
+    transition: all 200ms ease-in-out;
+}
+.theme-bar:hover .nivo-controlNav {
+    bottom: 0;
+    opacity: 1;
+}
+.theme-bar .nivo-controlNav a {
+	display:inline-block;
+	width:22px;
+	height:22px;
+	background:url(bullets.png) no-repeat;
+	text-indent:-9999px;
+	border:0;
+	margin: 5px 2px 0 2px;
+}
+.theme-bar .nivo-controlNav a.active {
+	background-position:0 -22px;
+}
+
+.theme-bar .nivo-directionNav a {
+	display:block;
+	border:0;
+	color: #fff;
+	text-transform: uppercase;
+	top: auto;
+	bottom: 10px;
+	z-index: 11;
+	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+	font-size: 13px;
+	line-height: 20px;
+	opacity: 0.5;
+    -webkit-transition: all 200ms ease-in-out;
+    -moz-transition: all 200ms ease-in-out;
+    -o-transition: all 200ms ease-in-out;
+    transition: all 200ms ease-in-out;
+}
+.theme-bar a.nivo-nextNav { right: -50px; }
+.theme-bar a.nivo-prevNav { left: -50px; }
+.theme-bar:hover a.nivo-nextNav { 
+    right: 15px; 
+    opacity: 1;
+}
+.theme-bar:hover a.nivo-prevNav { 
+    left: 15px; 
+    opacity: 1;
+}
+.theme-bar .nivo-directionNav a:hover { color: #ddd; }
+
+.theme-bar .nivo-caption {
+    font-family: Helvetica, Arial, sans-serif;
+    -webkit-transition: all 200ms ease-in-out;
+    -moz-transition: all 200ms ease-in-out;
+    -o-transition: all 200ms ease-in-out;
+    transition: all 200ms ease-in-out;
+}
+.theme-bar:hover .nivo-caption {
+    bottom: 41px;
+}
+.theme-bar .nivo-caption a {
+    color:#fff;
+    border-bottom:1px dotted #fff;
+}
+.theme-bar .nivo-caption a:hover {
+    color:#fff;
+}
+
+.theme-bar .nivo-controlNav.nivo-thumbs-enabled {
+	width: 100%;
+}
+.theme-bar .nivo-controlNav.nivo-thumbs-enabled a {
+	width: auto;
+	height: auto;
+	background: none;
+	margin-bottom: 5px;
+}
+.theme-bar .nivo-controlNav.nivo-thumbs-enabled img {
+	display: block;
+	width: 120px;
+	height: auto;
+}

cmsplugin_nivoslider/static/nivo/themes/bar/bullets.png

Added
New image

cmsplugin_nivoslider/static/nivo/themes/bar/loading.gif

Added
New image

cmsplugin_nivoslider/static/nivo/themes/dark/arrows.png

Added
New image

cmsplugin_nivoslider/static/nivo/themes/dark/bullets.png

Added
New image

cmsplugin_nivoslider/static/nivo/themes/dark/dark.css

+/*
+Skin Name: Nivo Slider Dark Theme
+Skin URI: http://nivo.dev7studios.com
+Description: A dark skin for the Nivo Slider.
+Version: 1.0
+Author: Gilbert Pellegrom
+Author URI: http://dev7studios.com
+Supports Thumbs: true
+*/
+
+.theme-dark.slider-wrapper {
+    background: #222;
+    padding: 10px;
+}
+.theme-dark .nivoSlider {
+	position:relative;
+	background:#fff url(loading.gif) no-repeat 50% 50%;
+    margin-bottom:10px;
+    overflow: visible;
+}
+.theme-dark .nivoSlider img {
+	position:absolute;
+	top:0px;
+	left:0px;
+	display:none;
+}
+.theme-dark .nivoSlider a {
+	border:0;
+	display:block;
+}
+
+.theme-dark .nivo-controlNav {
+	text-align: left;
+	padding: 0;
+	position: relative;
+	z-index: 10;
+}
+.theme-dark .nivo-controlNav a {
+	display:inline-block;
+	width:10px;
+	height:10px;
+	background:url(bullets.png) no-repeat 0 2px;
+	text-indent:-9999px;
+	border:0;
+	margin: 0 2px;
+}
+.theme-dark .nivo-controlNav a.active {
+	background-position:0 100%;
+}
+
+.theme-dark .nivo-directionNav a {
+	display:block;
+	width:30px;
+	height:30px;
+	background: url(arrows.png) no-repeat;
+	text-indent:-9999px;
+	border:0;
+	top: auto;
+	bottom: -36px;
+	z-index: 11;
+}
+.theme-dark .nivo-directionNav a:hover {
+    background-color: #333;
+    -webkit-border-radius: 2px;
+    -moz-border-radius: 2px;
+    border-radius: 2px;
+}
+.theme-dark a.nivo-nextNav {
+	background-position:-16px 50%;
+	right:0px;
+}
+.theme-dark a.nivo-prevNav {
+    background-position:11px 50%;
+    left: auto;
+	right: 35px;
+}
+
+.theme-dark .nivo-caption {
+    font-family: Helvetica, Arial, sans-serif;
+}
+.theme-dark .nivo-caption a {
+    color:#fff;
+    border-bottom:1px dotted #fff;
+}
+.theme-dark .nivo-caption a:hover {
+    color:#fff;
+}
+
+.theme-dark .nivo-controlNav.nivo-thumbs-enabled {
+	width: 80%;
+}
+.theme-dark .nivo-controlNav.nivo-thumbs-enabled a {
+	width: auto;
+	height: auto;
+	background: none;
+	margin-bottom: 5px;
+}
+.theme-dark .nivo-controlNav.nivo-thumbs-enabled img {
+	display: block;
+	width: 120px;
+	height: auto;
+}

cmsplugin_nivoslider/static/nivo/themes/dark/loading.gif

Added
New image

cmsplugin_nivoslider/static/nivo/themes/default/default.css

 /*
 Skin Name: Nivo Slider Default Theme
 Skin URI: http://nivo.dev7studios.com
-Skin Type: flexible
 Description: The default skin for the Nivo Slider.
-Version: 1.0
+Version: 1.3
 Author: Gilbert Pellegrom
 Author URI: http://dev7studios.com
+Supports Thumbs: true
 */
 
 .theme-default .nivoSlider {
 	position:relative;
 	background:#fff url(loading.gif) no-repeat 50% 50%;
-    margin-bottom:50px;
+    margin-bottom:10px;
     -webkit-box-shadow: 0px 1px 5px 0px #4a4a4a;
     -moz-box-shadow: 0px 1px 5px 0px #4a4a4a;
     box-shadow: 0px 1px 5px 0px #4a4a4a;
 }
 
 .theme-default .nivo-controlNav {
-	position:absolute;
-	left:50%;
-	bottom:-42px;
-    margin-left:-40px; /* Tweak this to center bullets */
+	text-align: center;
+	padding: 20px 0;
 }
 .theme-default .nivo-controlNav a {
-	display:block;
+	display:inline-block;
 	width:22px;
 	height:22px;
 	background:url(bullets.png) no-repeat;
 	text-indent:-9999px;
 	border:0;
-	margin-right:3px;
-	float:left;
+	margin: 0 2px;
 }
 .theme-default .nivo-controlNav a.active {
 	background-position:0 -22px;
 	background:url(arrows.png) no-repeat;
 	text-indent:-9999px;
 	border:0;
+	opacity: 0;
+	-webkit-transition: all 200ms ease-in-out;
+    -moz-transition: all 200ms ease-in-out;
+    -o-transition: all 200ms ease-in-out;
+    transition: all 200ms ease-in-out;
 }
+.theme-default:hover .nivo-directionNav a { opacity: 1; }
 .theme-default a.nivo-nextNav {
 	background-position:-30px 0;
 	right:15px;
 }
 .theme-default .nivo-caption a:hover {
     color:#fff;
-}
+}
+
+.theme-default .nivo-controlNav.nivo-thumbs-enabled {
+	width: 100%;
+}
+.theme-default .nivo-controlNav.nivo-thumbs-enabled a {
+	width: auto;
+	height: auto;
+	background: none;
+	margin-bottom: 5px;
+}
+.theme-default .nivo-controlNav.nivo-thumbs-enabled img {
+	display: block;
+	width: 120px;
+	height: auto;
+}

cmsplugin_nivoslider/static/nivo/themes/light/arrows.png

Added
New image

cmsplugin_nivoslider/static/nivo/themes/light/bullets.png

Added
New image

cmsplugin_nivoslider/static/nivo/themes/light/light.css

+/*
+Skin Name: Nivo Slider Light Theme
+Skin URI: http://nivo.dev7studios.com
+Description: A light skin for the Nivo Slider.
+Version: 1.0
+Author: Gilbert Pellegrom
+Author URI: http://dev7studios.com
+Supports Thumbs: true
+*/
+
+.theme-light.slider-wrapper {
+    background: #fff;
+    padding: 10px;
+}
+.theme-light .nivoSlider {
+	position:relative;
+	background:#fff url(loading.gif) no-repeat 50% 50%;
+    margin-bottom:10px;
+    overflow: visible;
+}
+.theme-light .nivoSlider img {
+	position:absolute;
+	top:0px;
+	left:0px;
+	display:none;
+}
+.theme-light .nivoSlider a {
+	border:0;
+	display:block;
+}
+
+.theme-light .nivo-controlNav {
+	text-align: left;
+	padding: 0;
+	position: relative;
+	z-index: 10;
+}
+.theme-light .nivo-controlNav a {
+	display:inline-block;
+	width:10px;
+	height:10px;
+	background:url(bullets.png) no-repeat;
+	text-indent:-9999px;
+	border:0;
+	margin: 0 2px;
+}
+.theme-light .nivo-controlNav a.active {
+	background-position:0 100%;
+}
+
+.theme-light .nivo-directionNav a {
+	display:block;
+	width:30px;
+	height:30px;
+	background: url(arrows.png) no-repeat;
+	text-indent:-9999px;
+	border:0;
+	top: auto;
+	bottom: -36px;
+	z-index: 11;
+}
+.theme-light .nivo-directionNav a:hover {
+    background-color: #eee;
+    -webkit-border-radius: 2px;
+    -moz-border-radius: 2px;
+    border-radius: 2px;
+}
+.theme-light a.nivo-nextNav {
+	background-position:160% 50%;
+	right:0px;
+}
+.theme-light a.nivo-prevNav {
+    background-position:-60% 50%;
+    left: auto;
+	right: 35px;
+}
+
+.theme-light .nivo-caption {
+    font-family: Helvetica, Arial, sans-serif;
+}
+.theme-light .nivo-caption a {
+    color:#fff;
+    border-bottom:1px dotted #fff;
+}
+.theme-light .nivo-caption a:hover {
+    color:#fff;
+}
+
+.theme-light .nivo-controlNav.nivo-thumbs-enabled {
+	width: 80%;
+}
+.theme-light .nivo-controlNav.nivo-thumbs-enabled a {
+	width: auto;
+	height: auto;
+	background: none;
+	margin-bottom: 5px;
+}
+.theme-light .nivo-controlNav.nivo-thumbs-enabled img {
+	display: block;
+	width: 120px;
+	height: auto;
+}

cmsplugin_nivoslider/static/nivo/themes/light/loading.gif

Added
New image

cmsplugin_nivoslider/static/nivo/themes/orman/arrows.png

Removed
Old image

cmsplugin_nivoslider/static/nivo/themes/orman/bullets.png

Removed
Old image

cmsplugin_nivoslider/static/nivo/themes/orman/loading.gif

Removed
Old image

cmsplugin_nivoslider/static/nivo/themes/orman/orman.css

-/*
-Skin Name: Orman Theme
-Skin URI: http://nivo.dev7studios.com
-Skin Type: fixed
-Image Width: 568
-Image Height: 268
-Description: A light and green skin for the Nivo Slider.
-Version: 1.0
-Author: Gilbert Pellegrom & Orman Clark
-Author URI: http://dev7studios.com
-*/
-
-.theme-orman.slider-wrapper {
-    background:url(slider.png) no-repeat;
-    width:722px;
-    height:337px;
-    margin:0 auto;
-    padding-top:18px;
-    position:relative;
-}
-
-.theme-orman .nivoSlider {
-    position:relative;
-    width:568px;
-    height:268px;
-    margin-left:77px;
-    background:url(loading.gif) no-repeat 50% 50%;
-}
-.theme-orman .nivoSlider img {
-    position:absolute;
-    top:0px;
-    left:0px;
-    display:none;
-    width:568px; /* Make sure your images are the same size */
-    height:268px; /* Make sure your images are the same size */
-}
-.theme-orman .nivoSlider a {
-    border:0;
-    display:block;
-}
-
-.theme-orman .nivo-controlNav {
-    position:absolute;
-	left:50%;
-	bottom:-60px;
-    margin-left:-30px; /* Tweak this to center bullets */
-}
-.theme-orman .nivo-controlNav a {
-    display:block;
-    width:10px;
-    height:10px;
-    background:url(bullets.png) no-repeat;
-    text-indent:-9999px;
-    border:0;
-    margin-right:7px;
-    float:left;
-}
-.theme-orman .nivo-controlNav a.active {
-    background-position:0 -10px;
-}
-
-.theme-orman .nivo-directionNav a {
-	display:block;
-	width:25px;
-	height:200px;
-	background:url(arrows.png) no-repeat 0% 50%;
-	text-indent:-9999px;
-	border:0;
-    top:40px;
-}
-.theme-orman a.nivo-nextNav {
-	background-position:100% 50%;
-	right:-40px;
-    padding-right:20px;
-}
-.theme-orman a.nivo-prevNav {
-	left:-40px;
-    padding-left:20px;
-}
-
-.theme-orman .nivo-caption {
-    font-family: Helvetica, Arial, sans-serif;
-}
-.theme-orman .nivo-caption a { 
-    color:#fff;
-    border-bottom:1px dotted #fff;
-}
-.theme-orman .nivo-caption a:hover { 
-    color:#fff;
-}
-
-.theme-orman .ribbon {
-    background:url(ribbon.png) no-repeat;
-    width:111px;
-    height:111px;
-    position:absolute;
-    top:-3px;
-    left:56px;
-    z-index:300;
-}

cmsplugin_nivoslider/static/nivo/themes/orman/readme.txt

-Note: Images used in the slider for the Orman Theme should have the dimensions 568px x 268px

cmsplugin_nivoslider/static/nivo/themes/orman/ribbon.png

Removed
Old image

cmsplugin_nivoslider/static/nivo/themes/orman/slider.png

Removed
Old image

cmsplugin_nivoslider/static/nivo/themes/pascal/bullets.png

Removed
Old image

cmsplugin_nivoslider/static/nivo/themes/pascal/controlnav.png

Removed
Old image

cmsplugin_nivoslider/static/nivo/themes/pascal/featured.png

Removed
Old image

cmsplugin_nivoslider/static/nivo/themes/pascal/loading.gif

Removed
Old image

cmsplugin_nivoslider/static/nivo/themes/pascal/pascal.css

-/*
-Skin Name: Pascal Theme
-Skin URI: http://nivo.dev7studios.com
-Skin Type: fixed
-Image Width: 630
-Image Height: 235
-Description: A nice, light skin for the Nivo Slider.
-Version: 1.0
-Author: Gilbert Pellegrom & Pascal Gartner
-Author URI: http://dev7studios.com
-*/
-
-.theme-pascal.slider-wrapper {
-    background:url(slider.png) no-repeat;
-    width:668px;
-    height:299px;
-    margin:0 auto;
-    padding-top:17px;
-    position:relative;
-}
-
-.theme-pascal .nivoSlider {
-    position:relative;
-    width:630px;
-    height:235px;
-    margin-left:19px;
-    background:url(loading.gif) no-repeat 50% 50%;
-}
-.theme-pascal .nivoSlider img {
-    position:absolute;
-    top:0px;
-    left:0px;
-    display:none;
-    width:630px; /* Make sure your images are the same size */
-    height:235px; /* Make sure your images are the same size */
-}
-.theme-pascal .nivoSlider a {
-    border:0;
-    display:block;
-}
-
-.theme-pascal .nivo-controlNav {
-    background:url(controlnav.png) no-repeat;
-    width:251px;
-    height:40px;
-    position:absolute;
-    left:200px; /* Tweak this to center bullets */
-    bottom:-42px;
-    padding:8px 0 0 82px;
-    z-index:20;
-}
-.theme-pascal .nivo-controlNav a {
-    display:block;
-    width:22px;
-    height:22px;
-    background:url(bullets.png) no-repeat;
-    text-indent:-9999px;
-    border:0;
-    margin-right:3px;
-    float:left;
-}
-.theme-pascal .nivo-controlNav a.active {
-    background-position:0 -22px;
-}
-
-.theme-pascal .nivo-directionNav a {
-	display:none;
-}
-
-.theme-pascal .nivo-caption {
-    bottom:40%;
-    left:auto;
-    right:0px;
-    width:auto;
-    max-width:630px;
-    overflow:hidden;
-    background:#fff;
-    text-shadow:none;
-    font-family: arial, serif;
-    color:#4c4b4b;
-}
-.theme-pascal .nivo-caption p {
-    padding:5px 15px;
-    color:#333;
-    font-weight:bold;
-    font-size:27px;
-    text-transform:uppercase;
-}
-.theme-pascal .nivo-caption a { 
-    color:#333;
-    font-weight:bold;
-    font-size:27px;
-    text-transform:uppercase;
-}
-
-.theme-pascal .ribbon {
-    background:url(ribbon.png) no-repeat;
-    width:111px;
-    height:111px;
-    position:absolute;
-    top:-8px;
-    left:-8px;
-    z-index:300;
-}

cmsplugin_nivoslider/static/nivo/themes/pascal/readme.txt

-Note: Images used in the slider for the Pascal Theme should have the dimensions 630px x 235px

cmsplugin_nivoslider/static/nivo/themes/pascal/ribbon.png

Removed
Old image

cmsplugin_nivoslider/static/nivo/themes/pascal/slider.png

Removed
Old image

cmsplugin_nivoslider/templates/nivo/slider.html

 {% load i18n sekizai_tags thumbnail  %}
 
 
-<div class="slider-wrapper theme-{{object.theme}}">
-    {% if object.show_ribbon %}<div class="ribbon"></div>{% endif %}
-    <div id="nivoslider" class="nivoSlider"
-        style="{% if object.image_witdth %}width:{{object.image_width}}px;{% endif %}
-        {% if object.image_height %}height:{{object.image_height}}px;{% endif %}">
-        {% for img in images %}
-            {% if size %}
-                <img src="{% thumbnail img.image size crop %}" alt="{{img.name}}" title="{{img.description}}" />
-            {% else %}
-                <img src="{{img.image.url}}" alt="{{img.name}}" title="{{img.description}}" />
-            {% endif %}
-        {% endfor %}
-    </div>
-</div> <!-- end slider-wrapper -->
-
-
-
 {% addtoblock "css" %}
-<link rel="stylesheet" href="{{STATIC_URL}}nivo/nivo-slider.css" type="text/css" media="screen" />
+    <link rel="stylesheet" href="{{STATIC_URL}}nivo/nivo-slider.css" type="text/css" media="screen" />
 {% endaddtoblock %}
 
 {% addtoblock "css" %}
-<link rel="stylesheet" href="{{STATIC_URL}}nivo/themes/{{object.theme}}/{{object.theme}}.css" type="text/css" media="screen" />
+    <link rel="stylesheet" href="{{STATIC_URL}}nivo/themes/{{object.theme}}/{{object.theme}}.css" type="text/css" media="screen" />
 {% endaddtoblock %}
 
 {% addtoblock "js" %}
 {% endaddtoblock %}
 
 {% addtoblock "js" %}
-<script type="text/javascript">
-    $(function() {
-        $('#nivoslider').nivoSlider({
-            effect: '{{object.effect}}',
-            animSpeed: {{object.anim_speed}},
-            pauseTime: {{object.pause_time}}
+    <script type="text/javascript">
+        $(function() {
+            $('#nivoslider{{object.pk}}').nivoSlider({
+                effect: '{{object.effect}}',
+                animSpeed: {{object.anim_speed}},
+                pauseTime: {{object.pause_time}},
+                prevText: '{% trans 'prev'|capfirst %}',
+                nextText: '{% trans 'next'|capfirst %}'
+            });
         });
-    });
-</script>
+    </script>
 {% endaddtoblock %}
+
+<div class="slider-wrapper theme-{{object.theme}}">
+    <div id="nivoslider{{object.pk}}" class="nivoSlider"
+        style="
+            {% if object.width %}
+                width:{{object.width}}px;
+            {% endif %}
+            {% if object.height %}
+                height:{{object.height}}px;
+            {% endif %}">
+        {% for img in images %}
+            <img
+                {% if size %}
+                    src="{% thumbnail img.image size crop %}"
+                {% else %}
+                    src="{{img.image.url}}"
+                {% endif %}
+                alt="{{img.name}}" title="{{img.description}}" />
+        {% endfor %}
+    </div>
+</div>