Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update of nivoslider #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
27 changes: 25 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
*.mo
*.egg-info
*.egg
*.EGG
*.EGG-INFO
bin
build
develop-eggs
downloads
eggs
fake-eggs
parts
dist
var
.installed.cfg
.mr.developer.cfg
.hg
.bzr
.svn
*.pyc
*egg.info
*egg-info*
*.pyo
*.tmp*
src
.project
.pydevproject
.settings
31 changes: 31 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Introduction
============

Integration of nivoslider_ in Plone

This version include nivoslider v3.0.1 (first responsive version)

It is used by collective.plonetruegallery


Credits
=======

Companies
---------

* `Grieg Medialog <http://www.medialog.no>`_
* `Contact us <mailto:[email protected]>`_
* `Planet Makina Corpus <http://www.makina-corpus.org>`_
* `Contact us <mailto:[email protected]>`_

Authors

- Espen Moe-Nilssen <[email protected]>


Contributors

- JeanMichel FRANCOIS aka toutpt <[email protected]>

.. _nivoslider: http://nivoslider.dev7studios.com
28 changes: 0 additions & 28 deletions README.txt

This file was deleted.

121 changes: 121 additions & 0 deletions bootstrap.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
##############################################################################
#
# Copyright (c) 2006 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Bootstrap a buildout-based project

Simply run this script in a directory containing a buildout.cfg.
The script accepts buildout command-line options, so you can
use the -c option to specify an alternate configuration file.

$Id$
"""

import os, shutil, sys, tempfile, urllib2
from optparse import OptionParser

tmpeggs = tempfile.mkdtemp()

is_jython = sys.platform.startswith('java')

# parsing arguments
parser = OptionParser()
parser.add_option("-v", "--version", dest="version",
help="use a specific zc.buildout version")
parser.add_option("-d", "--distribute",
action="store_true", dest="distribute", default=False,
help="Use Disribute rather than Setuptools.")

parser.add_option("-c", None, action="store", dest="config_file",
help=("Specify the path to the buildout configuration "
"file to be used."))

options, args = parser.parse_args()

# if -c was provided, we push it back into args for buildout' main function
if options.config_file is not None:
args += ['-c', options.config_file]

if options.version is not None:
VERSION = '==%s' % options.version
else:
VERSION = ''

USE_DISTRIBUTE = options.distribute
args = args + ['bootstrap']

to_reload = False
try:
import pkg_resources
if not hasattr(pkg_resources, '_distribute'):
to_reload = True
raise ImportError
except ImportError:
ez = {}
if USE_DISTRIBUTE:
exec urllib2.urlopen('http://python-distribute.org/distribute_setup.py'
).read() in ez
ez['use_setuptools'](to_dir=tmpeggs, download_delay=0, no_fake=True)
else:
exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
).read() in ez
ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)

if to_reload:
reload(pkg_resources)
else:
import pkg_resources

if sys.platform == 'win32':
def quote(c):
if ' ' in c:
return '"%s"' % c # work around spawn lamosity on windows
else:
return c
else:
def quote (c):
return c

cmd = 'from setuptools.command.easy_install import main; main()'
ws = pkg_resources.working_set

if USE_DISTRIBUTE:
requirement = 'distribute'
else:
requirement = 'setuptools'

if is_jython:
import subprocess

assert subprocess.Popen([sys.executable] + ['-c', quote(cmd), '-mqNxd',
quote(tmpeggs), 'zc.buildout' + VERSION],
env=dict(os.environ,
PYTHONPATH=
ws.find(pkg_resources.Requirement.parse(requirement)).location
),
).wait() == 0

else:
assert os.spawnle(
os.P_WAIT, sys.executable, quote (sys.executable),
'-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout' + VERSION,
dict(os.environ,
PYTHONPATH=
ws.find(pkg_resources.Requirement.parse(requirement)).location
),
) == 0

ws.add_entry(tmpeggs)
ws.require('zc.buildout' + VERSION)
import zc.buildout.buildout
zc.buildout.buildout.main(args)
shutil.rmtree(tmpeggs)
3 changes: 3 additions & 0 deletions buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
extends = http://svn.plone.org/svn/collective/buildout/plonetest/test-4.x.cfg
versions = versions
package-name = collective.js.nivoslider

[instance]
zcml+=collective.js.nivoslider:demo.zcml
Binary file removed collective/js/.DS_Store
Binary file not shown.
Binary file removed collective/js/nivoslider/.DS_Store
Binary file not shown.
14 changes: 11 additions & 3 deletions collective/js/nivoslider/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
i18n_domain="collective.js.nivoslider">

<browser:resource
name="jquery.jquery.nivo.slider.pack.js"
file="resources/js/jquery.nivo.slider.pack.js"
name="jquery.nivo.slider.pack.js"
file="resources/jquery.nivo.slider.pack.js"
/>

<browser:resourceDirectory
name="jquery.nivoslider"
directory="resources"
Expand All @@ -24,5 +24,13 @@
description='Install collective.js.nivoslider in Plone'
provides="Products.GenericSetup.interfaces.EXTENSION"
/>
<genericsetup:upgradeStep
source="*"
destination="2"
title="Common Upgrade"
description="Apply the profile"
profile="collective.js.nivoslider:default"
handler=".upgrades.common"
/>

</configure>
53 changes: 53 additions & 0 deletions collective/js/nivoslider/demo.pt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
lang="en"
metal:use-macro="here/main_template/macros/master"
i18n:domain="collective.googledocsviewer">
<body>
<div metal:fill-slot="content-core">

<div class="slider-wrapper theme-default">
<div id="slider" class="nivoSlider">
<img src="++resource++jquery.nivoslider/demo/toystory.jpg"
data-thumb="++resource++jquery.nivoslider/demo/toystory.jpg"
alt=""/>
<a href="http://dev7studios.com">
<img src="++resource++jquery.nivoslider/demo/up.jpg"
data-thumb="++resource++jquery.nivoslider/demo/up.jpg"
alt="" title="This is an example of a caption"/></a>
<img src="++resource++jquery.nivoslider/demo/walle.jpg"
data-thumb="++resource++jquery.nivoslider/demo/walle.jpg" alt=""/>
<img src="++resource++jquery.nivoslider/demo/nemo.jpg"
data-thumb="++resource++jquery.nivoslider/demo/nemo.jpg" alt=""/>
</div>
<div id="htmlcaption" class="nivo-html-caption">
<strong>This</strong> is an example of a <em>HTML</em> caption with <a href="#">a link</a>.
</div>
</div>

<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
<style>
.slider-wrapper {
width: 80%;
margin: 20px auto;
}

.theme-default #slider {
margin:100px auto 0 auto;
}
.theme-pascal.slider-wrapper,
.theme-orman.slider-wrapper {
margin-top:150px;
}


</style>
</div>
</body>
</html>
13 changes: 13 additions & 0 deletions collective/js/nivoslider/demo.zcml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser"
i18n_domain="collective.js.nivoslider">

<browser:page
name="example.nivoslider"
for="*"
template="demo.pt"
permission="zope2.View"
/>

</configure>
2 changes: 1 addition & 1 deletion collective/js/nivoslider/license.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2011 Gilbert Pellegrom
Copyright (c) 2010-2012 Dev7studios

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
Binary file removed collective/js/nivoslider/profiles/.DS_Store
Binary file not shown.
11 changes: 11 additions & 0 deletions collective/js/nivoslider/profiles/default/cssregistry.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<object name="portal_css">
<stylesheet
id="++resource++jquery.nivoslider/nivo-slider.css"
applyPrefix="True"
/>
<stylesheet
id="++resource++jquery.nivoslider/themes/default/default.css"
applyPrefix="True"
/>
</object>
2 changes: 1 addition & 1 deletion collective/js/nivoslider/profiles/default/metadata.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
<metadata>
<version>1</version>
<version>2</version>
</metadata>
Binary file removed collective/js/nivoslider/resources/.DS_Store
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added collective/js/nivoslider/resources/demo/nemo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added collective/js/nivoslider/resources/demo/up.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added collective/js/nivoslider/resources/demo/walle.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading