""" % {
        'portal_url': self.portal_url,
        'js_file': self.js_theme_files[self.settings.galleria_theme],
        'duration': self.settings.duration,
        'transition': self.settings.galleria_transition,
        'autoplay': self.settings.timed and \
            str(self.settings.delay) or 'false',
        'showInfo': jsbool(self.settings.galleria_auto_show_info),
        'lightbox': jsbool(self.settings.galleria_lightbox),
        'carousel': jsbool(self.settings.galleria_carousel),
        'responsive': jsbool(self.settings.galleria_responsive),
        'carousel_steps': self.settings.galleria_carousel_steps,
        'imagenav': jsbool(self.settings.galleria_imagenav),
        'thumbnails': jsbool(self.settings.galleria_thumbnails),
        'height': self.settings.galleria_height,
        }

    @property
    @memoize
    def include_download_url(self):
        return self.settings.galleria_include_download_link

    def format_description(self, img):
        if not self.include_download_url:
            return img['description']
        return """%s (<a class="download" href="%s">Download</a>)""" % (
            img['description'], img.get('download_url', img.get('image_url')))


GalleriaSettings = createSettingsFactory(GalleriaDisplayType.schema)
                $(images[start_image_index]).trigger('click');
            }
        });
    })(jQuery);
    </script>
        """ % {
            'start_automatically':
            jsbool(self.settings.start_automatically or self.settings.timed),
            'start_index_index':
            self.start_image_index,
            'base_url':
            self.typeStaticFiles
        }

    def css(self):
        return u"""
<link rel="stylesheet" type="text/css"
    href="%(staticFiles)s/jquery.fancybox.css" media="screen" />
    <style>
    #content  a.fancyzoom-gallery {
        border-bottom: 0 none;
    }
    </style>

""" % {
            'staticFiles': self.typeStaticFiles
        }


FancyBoxSettings = createSettingsFactory(FancyBoxDisplayType.schema)
    'path' : self.portal_url + '/++resource++ptg.garagedoor',
    'boxheight': self.settings.garagedoor_imageheight,
    'boxwidth': self.settings.garagedoor_imagewidth,
}

    def css(self):
        relpath = '++resource++ptg.garagedoor'
        style = '%s/%s/%s' % (self.portal_url, relpath,
            self.settings.garagedoor_style)

        if self.settings.garagedoor_style == 'custom_style':
            style = '%s/%s' % (self.portal_url,
                self.settings.garagedoor_custom_style)

        return u"""
        <style>
.garagedoor div {
    height: %(boxheight)ipx;
    width: %(boxwidth)ipx;
}

</style>
<link rel="stylesheet" type="text/css" href="%(style)s"/>
""" % {
        'columns': self.settings.garagedoor_columns,
        'boxheight': self.settings.garagedoor_imageheight,
        'boxwidth': self.settings.garagedoor_imagewidth,
        'style': style
       }
GaragedoorSettings = createSettingsFactory(GaragedoorDisplayType.schema)
    slides: %(imagelist)s,
    // Theme Options
    image_path: '++resource++ptg.supersized/plone/',
    progress_bar: %(progress_bar)i, // Timer for each slide
    mouse_scrub: 0});
});
</script>
""" % {
        'portal_url': self.portal_url,
        'slideshow': self.settings.supersized_slideshow,
        'stop_loop': self.settings.supersized_stop_loop,
        'min_width': self.settings.supersized_min_width,
        'performance': self.settings.supersized_performance,
        'transition': self.settings.supersized_transition,
        'min_height': self.settings.supersized_min_height,
        'vertical_center': self.settings.supersized_vertical_center,
        'horizontal_center': self.settings.supersized_horizontal_center,
        'fit_always': self.settings.supersized_fit_always,
        'fit_portrait': self.settings.supersized_fit_portrait,
        'fit_landscape': self.settings.supersized_fit_landscape,
        'thumb_links': self.settings.supersized_thumb_links,
        'slide_links': self.settings.supersized_slide_links,
        'thumbnail_navigation': self.settings.supersized_thumbnail_navigation,
        'progress_bar': self.settings.supersized_progress_bar,
        'imagelist': json.dumps(imagelist),
        'speed': self.settings.duration,
        'duration': self.settings.delay,
        'random': self.settings.supersized_random,
        }
SupersizedSettings = createSettingsFactory(SupersizedDisplayType.schema)
Beispiel #5
0
                               self.settings.carousel_custom_style)

        return u"""
        <style>

.jcarousel-item {
    height: %(boxheight)ipx;
    width: %(boxwidth)ipx;
}

#wrap {
    width: %(carousel_width)ipx
}

.imagebox:hover {
    opcaity: %(overlay_opacity)s);
}

</style>
<link rel="stylesheet" type="text/css" href="%(style)s"/>
""" % {
            'boxheight': self.settings.carousel_imageheight,
            'boxwidth': self.settings.carousel_imagewidth,
            'overlay_opacity': self.settings.carousel_overlay_opacity,
            'carousel_width': self.settings.carousel_width,
            'style': style
        }


CarouselSettings = createSettingsFactory(CarouselDisplayType.schema)
});
</script>

""" % {
         'portal_url': self.portal_url,
         'duration': self.settings.duration,
         'timed': jsbool(self.settings.timed),
         'delay': self.settings.delay,
         'start_automatically': jsbool(self.settings.timed),
         'directionnav': jsbool(self.settings.nivogallery_directionnav),
         'progressbar': jsbool(self.settings.nivogallery_progressbar),
    }

    def css(self):
        base_url = '%s/++resource++ptg.nivogallery' % (
            self.portal_url)
        return u"""
        <style>
       .nivoGallery {
        height: %(height)s;
        width: %(width)s;
        }
        </style>
<link rel="stylesheet" type="text/css" href="%(base_url)s/css/style.css"/>
""" % {
        'height': self.settings.nivogallery_height,
        'width': self.settings.nivogallery_width,
        'base_url': base_url
       }
NivogallerySettings = createSettingsFactory(NivogalleryDisplayType.schema)
        u"unitegallery_theme_carousel_offset_title",
        default=u"The offset of the carousel from the align sides"),
                                                default=0)

    #Gallery options
    carousel_gallery_width = schema.TextLine(title=_(
        u"unitegallery_gallery_width_title", default=u"Gallery width"),
                                             default=u"100%")
    carousel_gallery_min_width = schema.Int(title=_(
        u"unitegallery_gallery_min_width_title",
        default=u"Gallery minimal width when resizing"),
                                            default=150)
    carousel_gallery_background_color = schema.TextLine(title=_(
        u"unitegallery_gallery_background_color_title",
        default=
        u"Set custom background color. If not set it will be taken from css"),
                                                        default=u'',
                                                        required=False)


class UniteGalleryCarouselType(UniteGalleryCommon):
    """Unite Gallery Default"""
    name = u"unitegallery-carousel"
    description = _('Unite Gallery Carousel')
    theme = 'carousel'
    schema = IUniteGalleryCarouselSettings


UniteGalleryCarouselSettings = createSettingsFactory(
    UniteGalleryCarouselType.schema)
        return u"""
<link rel="stylesheet" type="text/css"
    href="%(base_url)s/style.css"/>
    <style>
.presentationWrapper {
    width: %(width)ipx;
    height: %(height)ipx;
}

.presentationWrapper li  {
    width: %(imagewidth)ipx;
    height: %(height)ipx;
    background-position: %(xposition)s %(yposition)s;
}

li.row_%(lastimagenr)s div.presentationshadow {
    background-image: none;
}
</style>
""" % {
        'base_url': self.staticFiles,
        'height': self.settings.presentation_height,
        'width': self.settings.presentation_width,
        'xposition': self.settings.presentation_xposition,
        'yposition': self.settings.presentation_yposition,
        'lastimagenr': imagecount - 1,
        'imagewidth': (self.settings.presentation_width - imagecount + 1) /
                        imagecount
    }
PresentationSettings = createSettingsFactory(PresentationDisplayType.schema)
                'transitionOut': 'elastic'});
            var images = $('a.fancyzoom-gallery');
            if(images.length <= start_image_index){
                start_image_index = 0;
            }
            if(auto_start){
                $(images[start_image_index]).trigger('click');
            }
        });
    })(jQuery);
    </script>
        """ % {
            'start_automatically': jsbool(
                self.settings.start_automatically or self.settings.timed),
            'start_index_index': self.start_image_index,
            'base_url': self.typeStaticFiles
        }

    def css(self):
        return u"""
<link rel="stylesheet" type="text/css"
    href="%(staticFiles)s/jquery.fancybox.css" media="screen" />
    <style>
    #content  a.fancyzoom-gallery {
        border-bottom: 0 none;
    }
    </style>

""" % {'staticFiles': self.typeStaticFiles}
FancyBoxSettings = createSettingsFactory(FancyBoxDisplayType.schema)
        u"unitegallery_gallery_carousel_title",
        default=u"Next button on last image goes to first image"),
                                           default=True)
    compact_gallery_preserve_ratio = schema.Bool(title=_(
        u"unitegallery_gallery_preserve_ratio_title",
        default=u"Preserver ratio when on window resize"),
                                                 default=True)
    compact_gallery_debug_errors = schema.Bool(title=_(
        u"unitegallery_gallery_debug_errors_title",
        default=
        u"Show error message when there is some error on the gallery area"),
                                               default=True)
    compact_gallery_background_color = schema.TextLine(title=_(
        u"unitegallery_gallery_background_color_title",
        default=
        u"Set custom background color. If not set it will be taken from css"),
                                                       default=u'',
                                                       required=False)


class UniteGalleryCompactType(UniteGalleryCommon):
    """Unite Gallery Compact"""
    name = u"unitegallery-compact"
    description = _('Unite Gallery Compact')
    theme = 'compact'
    schema = IUniteGalleryCompactSettings


UniteGalleryCompactSettings = createSettingsFactory(
    UniteGalleryCompactType.schema)
        if self.settings.carousel_style == 'custom_style':
            style = '%s/%s' % (self.portal_url,
                self.settings.carousel_custom_style)

        return u"""
        <style>

.jcarousel-item {
    height: %(boxheight)ipx;
    width: %(boxwidth)ipx;
}

#wrap {
    width: %(carousel_width)ipx
}

.imagebox:hover {
    opcaity: %(overlay_opacity)s);
}

</style>
<link rel="stylesheet" type="text/css" href="%(style)s"/>
""" % {
        'boxheight': self.settings.carousel_imageheight,
        'boxwidth': self.settings.carousel_imagewidth,
        'overlay_opacity': self.settings.carousel_overlay_opacity,
        'carousel_width' : self.settings.carousel_width,
        'style': style
       }
CarouselSettings = createSettingsFactory(CarouselDisplayType.schema)
        u"unitegallery_gallery_carousel_title",
        default=u"Next button on last image goes to first image"),
                                          default=True)
    slider_gallery_preserve_ratio = schema.Bool(title=_(
        u"unitegallery_gallery_preserve_ratio_title",
        default=u"Preserver ratio when on window resize"),
                                                default=True)
    slider_gallery_debug_errors = schema.Bool(title=_(
        u"unitegallery_gallery_debug_errors_title",
        default=
        u"Show error message when there is some error on the gallery area"),
                                              default=True)
    slider_gallery_background_color = schema.TextLine(title=_(
        u"unitegallery_gallery_background_color_title",
        default=
        u"Set custom background color. If not set it will be taken from css"),
                                                      default=u'',
                                                      required=False)


class UniteGallerySliderType(UniteGalleryCommon):
    """Unite Gallery Default"""
    name = u"unitegallery-slider"
    description = _('Unite Gallery Slider')
    theme = 'slider'
    schema = IUniteGallerySliderSettings


UniteGallerySliderSettings = createSettingsFactory(
    UniteGallerySliderType.schema)
.contactsheet a img {
    height: %(imageheight)ipx;
    width: %(imagewidth)ipx;
    left: %(zoom)ipx;
    top: %(zoom)ipx;
}
.contactsheet a div,
.contactsheet a {
    height: %(boxheight)ipx;
    width: %(boxwidth)ipx;
}
.contactsheet a div {
    background-color: rgba(15, 15, 15, %(overlay_opacity)f);
}

</style>
<link rel="stylesheet" type="text/css" href="%(style)s"/>
""" % {
        'columns': self.settings.contactsheet_columns,
        'boxheight': self.settings.contactsheet_imageheight,
        'boxwidth': self.settings.contactsheet_imagewidth,
        'imageheight': self.settings.contactsheet_imageheight - (
            self.settings.contactsheet_zoom) * 2,
        'imagewidth': self.settings.contactsheet_imagewidth - (
            self.settings.contactsheet_zoom) * 2,
        'overlay_opacity': self.settings.contactsheet_overlay_opacity,
        'zoom': self.settings.contactsheet_zoom,
        'style': style
       }
ContactsheetSettings = createSettingsFactory(ContactsheetDisplayType.schema)
   height: %(height)s;
   width: %(width)s;
   position: relative;
   overflow: hidden;
}

ul#s3sliderContent {
   width: %(width)s;
}

.s3sliderImage span {
   height: %(height)s;
   width: %(textwidth)s;
    filter: alpha(opacity=%(opacity)i);
   -moz-opacity: 0.%(opacity)i;
   -khtml-opacity: 0.%(opacity)i;
   opacity: 0.%(opacity)i;
}

</style>
<link rel="stylesheet" type="text/css" href="%(style)s"/>
""" % {
        'staticFiles': self.staticFiles,
        'height': self.settings.s3_height,
        'width': self.settings.s3_width,
        'textwidth': self.settings.s3_textwidth,
        'opacity': self.settings.s3slider_overlay_opacity,
        'style': style
       }
S3sliderSettings = createSettingsFactory(S3sliderDisplayType.schema)
Beispiel #15
0
    grid_gallery_carousel = schema.Bool(title=_(
        u"unitegallery_gallery_carousel_title",
        default=u"Next button on last image goes to first image"),
                                        default=True)
    grid_gallery_preserve_ratio = schema.Bool(title=_(
        u"unitegallery_gallery_preserve_ratio_title",
        default=u"Preserver ratio when on window resize"),
                                              default=True)
    grid_gallery_debug_errors = schema.Bool(title=_(
        u"unitegallery_gallery_debug_errors_title",
        default=
        u"Show error message when there is some error on the gallery area"),
                                            default=True)
    grid_gallery_background_color = schema.TextLine(title=_(
        u"unitegallery_gallery_background_color_title",
        default=
        u"Set custom background color. If not set it will be taken from css"),
                                                    default=u'',
                                                    required=False)


class UniteGalleryGridType(UniteGalleryCommon):
    """Unite Gallery Default"""
    name = u"unitegallery-grid"
    description = _('Unite Gallery Grid')
    theme = 'grid'
    schema = IUniteGalleryGridSettings


UniteGalleryGridSettings = createSettingsFactory(UniteGalleryGridType.schema)
Beispiel #16
0
        <style>
.sheetgallery div {
    height: %(boxheight)ipx;
    width: %(boxwidth)ipx;
}

.sheetgallery h3.image-title {
    padding-top: %(toppadding)s;
}

.sheetgallery p.image-desc {
    padding-bottom: %(bottompadding)s;
}

.imagebox:hover {
    opcaity: %(overlay_opacity)s);
}

</style>
<link rel="stylesheet" type="text/css" href="%(style)s"/>
""" % {
        'columns': self.settings.sheetgallery_columns,
        'boxheight': self.settings.sheetgallery_imageheight,
        'boxwidth': self.settings.sheetgallery_imagewidth,
        'overlay_opacity': self.settings.sheetgallery_overlay_opacity,
        'bottompadding' : self.settings.sheetgallery_bottompadding,
        'toppadding' : self.settings.sheetgallery_toppadding,
        'style': style
       }
SheetgallerySettings = createSettingsFactory(SheetgalleryDisplayType.schema)
        'tile_textpanel_desc_color',
        'tile_textpanel_desc_font_family',
        'tile_textpanel_desc_text_align',
        'tile_textpanel_desc_font_size',
        'tile_textpanel_desc_bold',
        'lightbox_overlay_color',
        'lightbox_top_panel_opacity',
        'lightbox_numbers_size',
        'lightbox_numbers_color',
        'lightbox_numbers_padding_top',
        'lightbox_numbers_padding_right',
    ]

    def theme_options(self):
        data = super(UniteGalleryTilesType, self).theme_options()
        if data.get('tiles_type') == 'columns':
            del data['tiles_type']
        if self.settings.tiles_theme_auto_open:
            data['theme_auto_open'] = data['theme_auto_open_delay']
            del data['theme_auto_open_delay']
        else:
            del data['theme_auto_open']
            del data['theme_auto_open_delay']
        for k in self.nullfields:
            if not data.get(k):
                data[k] = 'null'
        return data


UniteGalleryTilesSettings = createSettingsFactory(UniteGalleryTilesType.schema)
Beispiel #18
0
            SimpleTerm('sepia', 'sepia', _(u"label_sepia", default=u"Sepia")),
        ]))


class UniteGalleryDefaultType(UniteGalleryCommon):
    """Unite Gallery Default"""
    name = u"unitegallery-default"
    theme = 'default'
    description = 'Unite Gallery Default'
    schema = IUniteGalleryDefaultSettings

    form.fieldset(
        'theme_options',
        label=_(u'Theme options'),
        fields=[
            'default_theme_enable_fullscreen_button',
            'default_theme_enable_play_button',
            'default_theme_enable_hidepanel_button',
            'default_theme_enable_text_panel',
            'default_theme_text_padding_left',
            'default_theme_text_padding_right',
            'default_theme_text_align',
            'default_theme_text_type',
            'default_theme_hide_panel_under_width',
        ],
    )


UniteGalleryDefaultSettings = createSettingsFactory(
    UniteGalleryDefaultType.schema)
<script type="text/javascript" charset="utf-8"
    src="%(static)s/contentflow.js" load="%(addons)s"></script>
<script>
    var flow = new ContentFlow('ContentFlow', {
        maxItemHeight: %(max_height)i,
        scaleFactorLandscape: 'max',
        /* make all events subscribable outside of here */
        onMakeInactive: function(item){
            jQuery(item.element).trigger('onMakeInactive', item);
        },
        onMakeActive: function(item){
            jQuery(item.element).trigger('onMakeActive', item);
        },
        onMoveTo: function(item){
            jQuery(item.element).trigger('onMoveTo', item);
        },
        onReachTarget: function(item){
            jQuery(item.element).trigger('onReachTarget', item);
        },
        onDrawItem: function(item){
            jQuery(item.element).trigger('onDrawItem', item);
        }
    });
</script>
""" % {
        'static': self.typeStaticFiles,
        'addons': addons,
        'max_height': self.settings.flow_max_image_height
    }
ContentFlowSettings = createSettingsFactory(ContentFlowDisplayType.schema)
                self.settings.start_automatically or self.settings.timed),
            'start_index_index': self.start_image_index,
            'portal_url': self.portal_url
        }

    def css(self):
        return u"""
<link rel="stylesheet" type="text/css"
    href="%(staticFiles)s/jquery.fancybox.css" media="screen" />
    <style>
    #content  a.fancyzoom-gallery {
	border-bottom: 0 none ;
	</style>
}
""" % {'staticFiles': self.staticFiles}
FancyBoxSettings = createSettingsFactory(FancyBoxDisplayType.schema)


class HighSlideDisplayType(BatchingDisplayType):

    name = u"highslide"
    schema = IHighSlideDisplaySettings
    description = _(u"label_highslide_display_type",
        default=u"Highslide - verify terms of use")
    userWarning = _(u"label_highslide_user_warning",
        default=u"You can only use the Highslide gallery for non-commercial "
                u"use unless you purchase a commercial license. "
                u"Please visit http://highslide.com/ for details."
    )

    def css(self):
(function($){
$(document).ready(function() {
    var images = $('a.highslide');
    if(images.length <= start_image_index){
        start_image_index = 0;
    }
    if(auto_start){
        $(images[start_image_index]).trigger('click');
    }
});
})(jQuery);
</script>
        """ % {
            'outlineType': outlineType,
            'wrapperClassName': wrapperClassName,
            'delay': self.settings.delay,
            'timed': jsbool(self.settings.timed),
            'duration': self.settings.duration,
            'start_automatically': jsbool(
                self.settings.start_automatically or self.settings.timed),
            'start_index_index': self.start_image_index,
            'overlay_position': \
                self.settings.highslide_slideshowcontrols_position,
            'base_url': self.typeStaticFiles

        }


HighSlideSettings = createSettingsFactory(HighSlideDisplayType.schema)
            this.fadeTo('fast', 0.0, callback);
        },
        onPageTransitionIn:        function() {
            this.fadeTo('fast', 1.0);
        },
        onImageAdded:              function(imageData, $li) {
            $li.opacityrollover({
                mouseOutOpacity:   onMouseOutOpacity,
                mouseOverOpacity:  1.0,
                fadeSpeed:         'fast',
                exemptionSelector: '.selected'
            });
        }
    });
});
})(jQuery);

</script>
""" % {
    'portal_url': self.portal_url,
    'timed': jsbool(self.settings.timed),
    'delay': self.settings.delay,
    'duration': self.settings.duration,
    'batch_size': self.settings.batch_size,
    'toppager' :   jsbool(self.settings.gallerific_toppager),
    'bottompager': jsbool(self.settings.gallerific_bottompager),
    'sscontrols':   jsbool(self.settings.gallerific_sscontrols),
    'navcontrols':  jsbool(self.settings.gallerific_navcontrols), 
}
GallerifficSettings = createSettingsFactory(GallerifficDisplayType.schema)
Beispiel #23
0
        onPageTransitionIn:        function() {
            this.fadeTo('fast', 1.0);
        },
        onImageAdded:              function(imageData, $li) {
            $li.opacityrollover({
                mouseOutOpacity:   onMouseOutOpacity,
                mouseOverOpacity:  1.0,
                fadeSpeed:         'fast',
                exemptionSelector: '.selected'
            });
        }
    });
});
})(jQuery);

</script>
""" % {
            'portal_url': self.portal_url,
            'timed': jsbool(self.settings.timed),
            'delay': self.settings.delay,
            'duration': self.settings.duration,
            'batch_size': self.settings.batch_size,
            'toppager': jsbool(self.settings.gallerific_toppager),
            'bottompager': jsbool(self.settings.gallerific_bottompager),
            'sscontrols': jsbool(self.settings.gallerific_sscontrols),
            'navcontrols': jsbool(self.settings.gallerific_navcontrols),
        }


GallerifficSettings = createSettingsFactory(GallerifficDisplayType.schema)
var auto_start = %(start_automatically)s;
var start_image_index = %(start_index_index)i;

(function($){
$(document).ready(function() {
    var images = $('a.highslide');
    if(images.length <= start_image_index){
        start_image_index = 0;
    }
    if(auto_start){
        $(images[start_image_index]).trigger('click');
    }
});
})(jQuery);
</script>
        """ % {
            'outlineType': outlineType,
            'wrapperClassName': wrapperClassName,
            'delay': self.settings.delay,
            'timed': jsbool(self.settings.timed),
            'duration': self.settings.duration,
            'start_automatically': jsbool(
                self.settings.start_automatically or self.settings.timed),
            'start_index_index': self.start_image_index,
            'overlay_position': \
                self.settings.highslide_slideshowcontrols_position,
            'base_url': self.typeStaticFiles

        }
HighSlideSettings = createSettingsFactory(HighSlideDisplayType.schema)
Beispiel #25
0
}
.contactsheep a div {
    background-color: rgba(15, 15, 15, %(overlay_opacity)f);
}

</style>
<link rel="stylesheet" type="text/css" href="%(style)s"/>
""" % {
            'columns':
            self.settings.contactsheep_columns,
            'boxheight':
            self.settings.contactsheep_imageheight,
            'boxwidth':
            self.settings.contactsheep_imagewidth,
            'imageheight':
            self.settings.contactsheep_imageheight -
            (self.settings.contactsheep_zoom) * 2,
            'imagewidth':
            self.settings.contactsheep_imagewidth -
            (self.settings.contactsheep_zoom) * 2,
            'overlay_opacity':
            self.settings.contactsheep_overlay_opacity,
            'zoom':
            self.settings.contactsheep_zoom,
            'style':
            style
        }


ContactsheepSettings = createSettingsFactory(ContactsheepDisplayType.schema)
.pikachoose,
.pika-stage {
   height: %(height)ipx;
   width: %(width)ipx;
}

.pika-stage {
   height: %(height)ipx;
   width: %(width)ipx;
}

.pika-stage, .pika-thumbs li{
    background-color: #%(backgroundcolor)s;
}

.jcarousel-skin-pika .jcarousel-container-vertical,
.jcarousel-skin-pika .jcarousel-clip-vertical{
   height: %(lowerheight)ipx;
</style>
<link rel="stylesheet" type="text/css" href="%(base_url)s/css/style.css"/>
""" % {
            "height": self.settings.pikachoose_height,
            "width": self.settings.pikachoose_width,
            "lowerheight": self.settings.pikachoose_height - 18,
            "backgroundcolor": self.settings.pikachoose_backgroundcolor,
            "base_url": self.staticFiles,
        }


PikachooseSettings = createSettingsFactory(PikachooseDisplayType.schema)
    def javascript(self):
        return u"""
""" 

    def css(self):
        relpath = '++resource++ptg.simplegallery'
        style = '%s/%s/%s' % (self.portal_url, relpath,
            self.settings.simplegallery_style)

        if self.settings.simplegallery_style == 'custom_style':
            style = '%s/%s' % (self.portal_url,
                self.settings.simplegallery_custom_style)

        return u"""
        <style>
.simplegallery div {
    height: %(boxheight)ipx;
    width: %(boxwidth)ipx;
}

</style>
<link rel="stylesheet" type="text/css" href="%(style)s"/>
""" % {
        'columns': self.settings.simplegallery_columns,
        'boxwidth': self.settings.simplegallery_boxwidth,
        'boxheight': self.settings.simplegallery_boxheight,
        'style': style
       }
SimplegallerySettings = createSettingsFactory(SimplegalleryDisplayType.schema)
        $(this).find('.caption:not(:animated)').slideDown(
            thumbnail.effectDuration);
    //when mouse leave...
    }, function(){
        //find the image and animate it...
        $(this).find('img').animate({
            /* get it back to original size (zoom out) */
            width: thumbnail.imgWidth,
            /* get left and top positions back to normal */
            left: 0,
            top: 0
        }, thumbnail.effectDuration);
        //hide the caption using slideUp event
        $(this).find('.caption').slideUp(thumbnail.effectDuration);
    });
});
</script>
""" % {
    'increase': self.settings.thumbnailzoom_increase,
    'effectduration': self.settings.thumbnailzoom_effectduration,
}

    def css(self):
        style = '%s/++resource++ptg.thumbnailzoom/style.css' % (
            self.portal_url)

        return u"""
<link rel="stylesheet" type="text/css" href="%s"/>
""" % style
ThumbnailzoomSettings = createSettingsFactory(ThumbnailzoomDisplayType.schema)
    def javascript(self):
        return u"""
<script type="text/javascript">
$(document).ready(function() {
			$(".peKenBurns").peKenburnsSlider();
		})
</script>

""" % {
        'speed':        self.settings.duration,
	}

    def css(self):
        return u"""
        <style>
.peKenBurns {
    height: %(boxheight)ipx;
    width: %(boxwidth)ipx;
}

 

</style>
<link rel="stylesheet" type="text/css" href="+resource++ptg.pixelentity/style.css"/>
""" % {
        'boxheight': self.settings.pixelentity_imageheight,
        'boxwidth': self.settings.pixelentity_imagewidth,
       }
PixelentitySettings = createSettingsFactory(PixelentityDisplayType.schema)
Beispiel #30
0
from . import UniteGalleryCommon
from collective.plonetruegallery.utils import createSettingsFactory
from zope.schema.vocabulary import SimpleVocabulary, SimpleTerm
from zope.i18nmessageid import MessageFactory
from zope import schema
from collective.plonetruegallery.interfaces import IBaseSettings
_ = MessageFactory('collective.ptg.unitegallery')


class IUniteGalleryVideoSettings(IBaseSettings):
    """Unite Gallery Video Settings"""


class UniteGalleryVideoType(UniteGalleryCommon):
    """Unite Gallery Default"""
    name = u"unitegallery-video"
    description = _('Unite Gallery Video')
    theme = 'video'
    schema = IUniteGalleryVideoSettings


UniteGalleryVideoSettings = createSettingsFactory(UniteGalleryVideoType.schema)
Beispiel #31
0
            default=u"Padding below imagedescription"),
        default=u"70px")

class CssburnsDisplayType(BaseDisplayType):
    name = u"cssburns"
    schema = ICssburnsDisplaySettings
    description = _(u"label_cssburns_display_type",
        default=u"CSSburns")

    def javascript(self):
        return "" 

    def css(self):
        return u"""
<style>
#CSS3Slideshow .img3{
border: %(number_of_images)ipx solid black;
}
</style>
<link rel="stylesheet" type="text/css" href="++resource++ptg.cssburns/style.css"/>
""" % {
        'boxheight': self.settings.cssburns_imageheight,
        'boxwidth': self.settings.cssburns_imagewidth,
        'opacity': self.settings.cssburns_opacity,
        'bottompadding' : self.settings.cssburns_bottompadding,
        'toppadding' : self.settings.cssburns_toppadding,
        'number_of_images' : self.adapter.cooked_images,
       }

CssburnsSettings = createSettingsFactory(CssburnsDisplayType.schema)
        float: right;
        padding: 25px;
        position: absolute;
        right: 0;
        top: 10px;
        width: %(caption_width)s;
    }
    #bootstrapcarousel h1 {
         color: rgb(255,255,255);
         font-size: 34px;
         font-weight: normal;
    }
    #bootstrapcarousel .item-inner {
        background-color: rgba(0, 0, 0, 0.1);
        display: block;
        position: relative;
        width: %(inner_item_width)s;
    }
    </style>
    """ % {
            'portal_url': self.portal_url,
            'width': self.settings.bc_width,
            'height': self.settings.bc_height,
            'img_width': img_width,
            'img_height': img_height,
            'caption_width': caption_width,
            'inner_item_width': inner_item_width,
            }

BootstrapcarouselSettings = createSettingsFactory(BootstrapcarouselDisplayType.schema)
src="%(portal_url)s/++resource++ptg.quicksand/jquery.quicksand.js">
</script>
<script type="text/javascript">
$(window).load(function(){
 
});
</script>
""" % {
    'speed': self.settings.duration,
    'portal_url': self.portal_url,
}

    def css(self):
        relpath = '++resource++ptg.quicksand'
        style = '%s/%s/%s' % (self.portal_url, relpath,
            self.settings.quicksand_style)

        if self.settings.quicksand_style == 'custom_style':
            style = '%s/%s' % (self.portal_url,
                self.settings.quicksand_custom_style)

        return u"""
</style>
<link rel="stylesheet" type="text/css" href="%(style)s"/>
""" % {
        'boxheight': self.settings.quicksand_imageheight,
        'boxwidth': self.settings.quicksand_imagewidth,
        'style': style
       }
QuicksandSettings = createSettingsFactory(QuicksandDisplayType.schema)
""" % {
        'portal_url': self.portal_url,
        'js_file': self.js_theme_files[self.settings.galleria_theme],
        'duration': self.settings.duration,
        'transition': self.settings.galleria_transition,
        'autoplay': self.settings.timed and \
            str(self.settings.delay) or 'false',
        'showInfo': jsbool(self.settings.galleria_auto_show_info),
        'lightbox': jsbool(self.settings.galleria_lightbox),
        'carousel': jsbool(self.settings.galleria_carousel),
        'responsive': jsbool(self.settings.galleria_responsive),
        'carousel_steps': self.settings.galleria_carousel_steps,
        'imagenav': jsbool(self.settings.galleria_imagenav),
        'thumbnails': jsbool(self.settings.galleria_thumbnails),
        'height': self.settings.galleria_height,
    }

    @property
    @memoize
    def include_download_url(self):
        return self.settings.galleria_include_download_link

    def format_description(self, img):
        if not self.include_download_url:
            return img['description']
        return """%s (<a class="download" href="%s">Download</a>)""" %(
            img['description'],
            img.get('download_url', img.get('image_url')))

GalleriaSettings = createSettingsFactory(GalleriaDisplayType.schema)
            }
        });
    })(jQuery);
    </script>
        """ % {
            'start_automatically': str(self.start_automatically).lower(),
            'start_index_index': self.start_image_index,
            'portal_url': self.portal_url
        }

    def css(self):
        return """
<link rel="stylesheet" type="text/css"
    href="%(staticFiles)s/jquery.fancybox.css" media="screen" />
""" % {'staticFiles': self.staticFiles}
FancyBoxSettings = createSettingsFactory(FancyBoxDisplayType.schema)


class HighSlideDisplayType(BatchingDisplayType):
    implements(IDisplayType, IBatchingDisplayType)

    name = u"highslide"
    schema = IHighSlideDisplaySettings
    description = _(u"label_highslide_display_type",
        default=u"Highslide - verify terms of use")
    userWarning = _(u"label_highslide_user_warning",
        default=u"You can only use the Highslide gallery for non-commercial "
                u"use unless you purchase a commercial license. "
                u"Please visit http://highslide.com/ for details."
    )