ajacksified/Mediator.js — pull request #2 by twidi (2012-03-05 17:21:15+00:00)
Title: priority bugs corrected + improvements

Hi

I love Mediator.js

By using it on many projects, i discovered some bugs in the priority management and added some improvements.

Improvements :
- when a `Subscriber` object is attached to a `Channel`, save this channel in a new `channel` field of the `Subscriber`
- save the namespace of a channel in a new `namespace` field of the `Channel` object (as a string)

About the bugs with the priority :
- a call to the `Update` method of the `Subscriber` now really change the priority (before, nothing was done).
- there was a bug in the `SetPriority` method of the `Channel` object, the subscriber could disapear because of a wrong second parameter of the `slice` function. It's resolved by not passing this argument, the default act as "take from here until the end of the array"

I hope you can use these updates useful...

NB - i also renamed "Heirarchy" into "Hierarchy"
- i didn't update docs, tests, readme, etc, etc, as i didn't know how to do it correctly