wiese/jquery-sfPrototypeMan — pull request #1 by chakhal (2014-11-20 14:25:49+00:00)
Title: Allow collection size constraint

Hello,

There is a contribution that aims to add size limitations on the field collection (I needed that for a project I'm working on).
This is my first contribution \o/
So if you're interested in, please, comment on whatever you want:
- coding style
- options/event naming strategy
- what about a global configuration that could be override at field level (only field level is implemented right now)

Below, my commit description:

Allow to define collection size constraint via data attribute on the field
- data-constrained-collection-min-size
- data-constrained-collection-max-size

if min size is defined, then, at initialization, at least [min size items] are created (if not already existing)
if max size is defined, it is not possible to add more items when max size is reached

New events triggered on this._container:
- prototype.maxsize-reached (when the last permitted item is added)
- prototype.maxsize-already-reached (when addField is called but the maximum size has already been reached)