getdave / protoshow Goto Github PK
View Code? Open in Web Editor NEWA simple slideshow for Prototype.js and script.aculo.us
Home Page: http://www.protoshow.net
A simple slideshow for Prototype.js and script.aculo.us
Home Page: http://www.protoshow.net
Protoshow is a free and easy to use slideshow for use with the Prototype.js and script.aculo.us javascript libraries. The script is in final Beta release and is generally suitable for production use (indeed I'm using in several client projects). The script is under active development. Follow @get_dave on Twitter for updates. Protoshow is free to use under the Creative Commons Attribution-No Derivative Works 3.0 Unported License. http://creativecommons.org/licenses/by-nd/3.0/ Please feel free to use it on your website. A link back to Protoshow.net and a shout out on Twitter is always welcome. You are not permitted to use Protoshow in any resaleable code (eg: themes, codecanyon products...etc). Exceptions are possible - contact David Smith for details. Protoshow is compatible with all modern browsers. IE support from version 7 and above. For more information please visit the project homepage at: http://protoshow.net/
Thanks for the good work!
I stumbled into a bug today: The option autoPlay:false is ignored, because your initialize Method fires this.play() without considering this option, please wrap an if-statement around it:
// let's get things going!
if (this.autoPlay) {
this.play();
}
Thanks again,
Oliver
Within the setupSlides
method please add in a test to ensure that var slideInt
is defined before trying to perform any operations on it.
slideInt = (slideInt && slideInt.blank()) ? undefined : slideInt;
I've added the line slideInt &&
How to use Protoshow in Magento ?
Protoshow should be easily use in e-commerce framework "Magento" because Protoshow is using Prototype and Scriptaculous javascript library.
But be careful, Protoshow is only working with Magento 1.6. Older Magento version are not compatible due to the Prototype version.
Issue : For exemple in Magento 1.5, I replace prototype library (magento 1.5) by the prototype library (magento 1.6). And it worked.
For some weird reason Chrome measures the width of "slide" incorrectly with percentages. This causes the whole show to break because it's hinged on knowing the value of the width of a slide.
Watch the DOM in Chrome to see this bug.
Needs testing and fixing.
When I put 5 pictures in a webpage and use this Javscript:
<script type="text/javascript">
Event.observe(window, "load", function() {
$('myshow1') && $('myshow1').protoShow({
interval : 6000,
captions : true
});
});
</script>
the slideshow doest go back to the beginning after the last picture. Without the captions: true, everything works fine.
The updateControls throws an error stating that "down" cannot be called on nothing (in Chrome 16 on Linux).
I have changed the method to the following code which now works (at least for me).
updateControls: function(status) {
if (this.options.controls) {
var _this = this;
// Role: Updates the status of the Play/Pause button
if (status) { // The show has been started so update the button to "Pause"
this.controlStartStop.down('a').update(_this.stopText);
} else {
// The show has been stopped so update the button to "Play"
this.controlStartStop.down('a').update(_this.playText);
}
}
},
By default you can set the transition of the slider.
It should be possible to set a swipe transition for mobile user that is different from the default transition.
Currently the navigation requires a href to be present with a hash in the url.
this means that if you're working with custom navigation (ie: not auto generated) your default markup can't have valid hrefs.
Suggest using "data" attr to manage slide allocation as opposed to href.
Stupidly Protoshow has a variable called boolean
. This is reserved. Please replace asap.
Please pass the show "element" as a unique ID in all custom event firing:
this.showUniqueID = function uniqid() {
return element;
}();
canvas loading isn't fitting with all the browsers, better stick with images, else make an option to choose either via the plugin.
The transition functions are a little bit of a mess and are mixed into the main code.
Suggest creation a separate transitions object from which you can pick a preferred transition. Also provide set of callbacks.
There have been a few requests to allow the developer to set specific intervals for individual slides.
This would allow you to say:
"For slide #1 wait 18secs before advancing. However, for slide #2 wait 5 seconds"...etc
Does this sound like something that would be worth including in a future release?
Using Prototype.js's ability to fire custom Events we need to ensure that we fire the following evenets:
Also check if we can pass information along with the Event such as "direction" and speed...etc
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.