Permalink
Browse files

Prepare collective.prettyphoto 0.4.2.

  • Loading branch information...
petschki committed Jul 13, 2011
1 parent 7567d40 commit 5ff31fa76f95eb4e3cd85d8c4a9c1b698874d75e
View
@@ -94,6 +94,11 @@ collective.prettyphoto can be customized via property sheet (go to ZMI, portal_p
* slideshow: false OR interval time in ms (default: False)
+* deeplinking: rewrite the browser location to enable directlinks to overlay images (default: False)
+
+* social_tools: html markup for social links within image overlays (twitter, FB, ...) (default: empty) see http://bit.ly/pDQ19A for detailed information
+
+
Copyright and Credits
=====================

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1,14 +1,14 @@
-jq(document).ready(function(){
- jq(document).ready(function(){
+(function($) {
+ $(function() {
// add rel tag for all links with class 'prettyPhoto'
- jq("a.prettyPhoto").attr({"rel": "prettyPhoto"});
+ $("a.prettyPhoto").attr({"rel": "prettyPhoto"});
// add iframe attributes for all links with class 'prettyPhotoIframe'
- jq("a.prettyPhotoIframe").attr("href", function() {
+ $("a.prettyPhotoIframe").attr("href", function() {
return this.href + "?iframe=true&width=75%&height=75%";
}).attr({"rel": "prettyPhoto"});
// enable prettyPhoto
- jq("a[rel^='prettyPhoto']").prettyPhoto({theme:'light_rounded'});
+ $("a[rel^='prettyPhoto']").prettyPhoto({theme:'light_rounded'});
});
-});
+})(jQuery);
@@ -14,29 +14,33 @@ def __call__(self, request=None, response=None):
portal_properties."""
self.request.response.setHeader("Content-type", "text/javascript")
- return """jq(document).ready(function(){
- jq(document).ready(function(){
+ social_tools = getattr(self.prettyphoto_properties, 'social_tools', '')
+
+ return """(function($) {
+ $(function() {
// add rel tag for all links with class 'prettyPhoto'
- jq("a.prettyPhoto").attr({"rel": "prettyPhoto"});
+ $("a.prettyPhoto").attr({"rel": "prettyPhoto"});
// add iframe attributes for all links with class 'prettyPhotoIframe'
- jq("a.prettyPhotoIframe").attr("href", function() {
+ $("a.prettyPhotoIframe").attr("href", function() {
return this.href + "?iframe=true&width=%(iframe_width)s&height=%(iframe_height)s";
}).attr({"rel": "prettyPhoto"});
// enable prettyPhoto
- jq("a[rel^='prettyPhoto']").prettyPhoto({
+ $("a[rel^='prettyPhoto']").prettyPhoto({
animationSpeed: '%(speed)s', /* fast/slow/normal */
opacity: %(opacity)s, /* Value between 0 and 1 */
showTitle: %(show_title)s, /* true/false */
counter_separator_label: '%(counter_sep)s', /* The separator for the gallery counter 1 "of" 2 */
theme: '%(theme)s',
autoplay: %(autoplay)s, /* Automatically start videos: True/False */
slideshow: %(slideshow)s, /* false OR interval time in ms */
- overlay_gallery: %(overlay_gallery)s /* If set to true, a gallery will overlay the fullscreen image on mouse over */
+ overlay_gallery: %(overlay_gallery)s, /* If set to true, a gallery will overlay the fullscreen image on mouse over */
+ social_tools: %(social_tools)s, /* html markup for social tool icons */
+ deeplinking: %(deeplinking)s /* allow prettyphoto to rewrite url for direktlinking to an image */
});
});
- });
+ })(jQuery);
""" % dict(speed=getattr(self.prettyphoto_properties, 'speed', 'normal'),
opacity=getattr(self.prettyphoto_properties, 'opacity', '0.80'),
show_title=getattr(self.prettyphoto_properties, 'show_title', True) and 'true' or 'false',
@@ -47,4 +51,6 @@ def __call__(self, request=None, response=None):
iframe_height=getattr(self.prettyphoto_properties, 'iframe_height', '75%'),
overlay_gallery=getattr(self.prettyphoto_properties, 'overlay_gallery', False) and 'true' or 'false',
slideshow=getattr(self.prettyphoto_properties, 'slideshow', 0) or 'false',
+ social_tools=social_tools and "'%s'" % social_tools or 'false',
+ deeplinking=getattr(self.prettyphoto_properties, 'deeplinking', False) and 'true' or 'false',
)
@@ -16,6 +16,8 @@
dict(name='iframe_height', type_='string', value='75%'),
dict(name='overlay_gallery', type_='boolean', value=False),
dict(name='slideshow', type_='int', value=0),
+ dict(name='deeplinking', type_='boolean', value=False),
+ dict(name='social_tools', type_='string', value=''),
]
@@ -15,4 +15,4 @@
expression=""
id="prettyPhoto.js"
inline="False" />
-</object>
+</object>
View
@@ -1,9 +1,13 @@
Changelog
=========
-0.4.2 (unreleased)
+0.4.2 (2011-07-13)
------------------
+- Upgraded to prettyPhoto 3.1.2 and implemented two new properties:
+ deeplinking , social_tools
+ [petschki]
+
0.4.1 (2011-03-22)
------------------
View
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
import os
-version = '0.4.2dev'
+version = '0.4.2'
setup(name='collective.prettyphoto',
version=version,

0 comments on commit 5ff31fa

Please sign in to comment.