sapo/Ink — pull request #238 by mariomc (2013-12-06 19:17:39+00:00)
Title: Events v2, SortableList v2

Adding [Bean] (https://github.com/fat/bean) lib to handle Events.

Bean is a small, fast, cross-platform, framework-agnostic event manager designed for desktop, mobile, and touch-based browsers.

It exposes a simple, powerful and expressive API that consists of 5 simple methods ( [on](https://github.com/fat/bean#on), [one](https://github.com/fat/bean#one), [off](https://github.com/fat/bean#off), [fire](https://github.com/fat/bean#fire), [clone](https://github.com/fat/bean#clone)).
As for major changes and features, we have:
* Event namespacing
* Event Delegation to a selector or set group of elements
* Creating and firing custom events in a cross browser fashion
* The API isn't limited to DOM elements so it can act as a Pub/Sub for JS objects
* Adds support for mouseenter and mouseleave events
* Normalizes the Event object properties and methods, along with target, stop, preventDefault and stopImmediate

Overall good stuff, specially useful in UI modules.

This lib is also a pre-req for the Gestures (Hammer.js) module.

---

Sortable List 2 Features API changes, method renaming and some internal modificiations, hence the major version bump.

There's now 8 configurable data attributes and options:
* **data-placeholder-class** - Class to be added to the "ghost" element that represents the original one being dragged around. Defaults to ´placeholder´.
* **data-dragged-class** - Class to be added to the original element. Defaults to `hide-all`
* **data-dragging-class** - Class to be added to the html element while an element is being dragged. `dragging`
* **data-drag-selector** - CSS Selector for the node that will be moved. Defaults to `li`
* **data-handle-selector** - CSS Selector for the handle where you'll drag the element from. Defaults to `false` so you'll be able to move the node by holding any part of the element.
* **data-move-selector** - CSS selector to validate a node move. If present, you can only move nodes into this selector. Defaults to `null`.
* **data-swap** - Flag to swap moving element with target element instead of changing its order. Defaults to `false`.
* **data-cancel-mouse-out** - Flag to cancel moving if mouse leaves the container element. Defaults to `false`.

Take a look at it in action here: http://jsbin.com/exABOluc/5

Some supporting CSS/LESS is missing to make this pretty but that is coming in the next commits.