tableau-mkt/jquery.addressfield — pull request #28 by iamEAP (2014-10-13 16:55:05+00:00)
Title: Simplify for the 80% use-case

Still needs test coverage and QA, but... Accomplishes the following:
* Simplifies plugin initialization (single object passed to the init handler). Makes it easy-to-use, also simplifies API additions / modifications going forward.
* Converts the "enabled fields" array into an object mapping xNAL field to selector (no longer assumes the xNAL field will be a class on the specified field).
* Works in three modes now:
* __Legacy__: The plugin can be invoked exactly as it has been previously (control rests completely outside the plugin; the plugin only takes care of form mutation).
* __Inline config__: The plugin can be passed a JSON object structured like addressfield.json; if passed a country field in the xNAL field map, it will bind a change event to the select element and take care of things for us.
* __Async JSON__: The plugin can be passed a JSON endpoint; it will load the JSON asynchronously and do the same change bind above.