kenkeiter/skeuocard — pull request #117 by dylanjha (2014-01-04 04:30:41+00:00)
Title: Feature/dont focus on init opt

Initialization option: {dontFocus: true}

* defaults to false
* when true, prevents skeuocard from focusing itself when initialized

This is my first time with CoffeeScript, and I'm not a JS expert, so feel free to point me in the right direction if you don't like the looks of this change.

* _focusFieldForValue is responsible for returning a field, and focusing it.
* now it takes an option dontFocus, which will still return the field, but not call _focusField(which does the actual focusing)
* setGroupings takes an optional var dontFocus, which it passes through to _focusFieldForValue
* the first time _renderProduct, (which is on the very first rendering of Skeuocard), it calls setGroupings, it passes through the initialization option.dontFocus, then deletes it from the opts, so dontFocus will never be true again.

* not my favorite solution, but its all I can think of at the moment. More than happy to get feedback & refactor. Thanks for this awesome library @kenkeiter