eddyystop/mithril-components — pull request #3 by Satyam (2014-06-23 12:40:15+00:00)
Title: Allow for other actions besides routing

Tabs might be used anywhere within the page and might not always imply routing to a completely different page. Thus, I made it somewhat more flexible in that sense.

First, the `tabs` argument to the controller didn't seem to fit there. All the information in that object was related to viewing. It seemed sensible to move that to the view part of the component. In doing that, the `overrides` object didn't make sense anymore.

The arguments to the controller part of the component now accept two functions, which can be property getters/setters (usually the same in both). If none is given, the current default action of routing remains the default.

The two arguments are:
* A function that returns a `tabName` (such as a property getter) or a string containing the `tabName`. If none given, defaults to `m.routes.param('tab')`
* A function that is called when a tab is clicked. The function receives the `tabName` of the new tab and the event object that caused the change. A property setter would take the first of these and ignore the event. If no argument is given it defaults to `m.route`.

The demo and readme have been changed to reflect these changes.
The demo now shows a second tab that will change tabs every 2 seconds by using a property setter/getter, without affecting the other tab or using routing.