https://github.com/Shopify/batman/compare/v0.13.0...master
- Added:
App.shouldAllowEvent.[event]. Callbacks in this hash will be called whenever the correspondingdata-eventis fired from anywhere within the app. Return false to prevent app-level propagation. For example:
class MyApp extends Batman.App
@shouldAllowEvent.click = (event) ->
return false- Fix: Prevent additional history items from being created if the users navigates to the page they are already on.
- Fix: Nested resource routing names.
- Deprecated: App loader utilities:
App.controller,App.model,App.view,App.require. Batman does not care how you load your code, as long as it's loaded before callingApp.run.
- Added: Substantially better for support for polymorphic associations.
- Added: Configure custom URL's for associations. Typically used for resources whose backends aren't quite as RESTful as they should be.
- Added: A server response of 422 will result in the response being parsed as an error and the response's data being used injected into
errors. - Added: A server response of 409 will result in a
RecordExistsError. - Added:
NumericValidatorcan now compare for equality. - Added:
Batman.Model._mapIdentitiesto map many items and then add them to the set all at once. - Performance:
Batman.Model.loadWithOptionsusesmapIdentitiesinstead ofmapIdentity. - Change: Model instance methods are no longer bound to themselves. If you're passing model methods as callbacks make sure you bind them manually!
- Fix: Respect sorted order in
SetSort::find. - Fix: Respect sorted order of
SetSort::merge.
- Change: Moved the
Batman.ViewStore'sfetchFromRemoteandprefixproperties toBatman.configand rename them tofetchRemoteViewsandviewPrefix. - Fix:
Batman.DOM.setStylePropertywill respect!importantin all browsers. - Fix: Don't intercept middle-click events.
- Change: Rename
BindingtoValueBinding. - Fix: Biding to the correct option when loading a
<select>element. If the data is null when the binding is created, we bind to an option with an empty string. - Fix: Parsing keypaths that begin with numbers.
- Added: The ability for bindings within subviews to update their values that have been added to the context via
data-bind. - Deprecated:
data-confirmevent attribute.
- Fix: The prepend and append filters don't prepend/append undefined to the string if the value is undefined.
data-bind="undefinedValue | append 'my string'"now returnsmy stringand notundefinedmy string.
- Change: Promise accessors return the result of their promise function, such that promises which return valueA and asynchronously deliver valueB retune the delivered valueB instead of the returned valueA.
- Change: Class promise accessors are now be recalculated after calling clear, e.g.
Product.clear(). - Added:
Batman.Object::_resetPromise.
- Added: A deprecation mechanism. Putting
Batman.developer.deprecatedinside a function will log a warning in the console in development mode. - Fix: Some cases where
clearImmediatewould break IE. - Fix: IE7 inability to access a character from a string using the index
[]notation. - Fix: Support all symbols with unescapeHTML. e100aca
- Fix: Bug in reduce where the reduction function returning undefined caused undesirable return values.
- Fix: Bug when using arrays of models as the keys of a
Batman.Hash. - Fix: Ensure that
addis only called once when multiple items are added to aSetSortat the same time.
- Performance: Fight off hoardes of DOM memory leaks.
- Performance: Speed up
Batman.SimpleSetiteration. - Performance: Speed up
Batman.Propertyiteration when firing some observers. - Performance: Added Two levels of caching for
_batmanansestors. - Performance: Use arrays instead of sets in hot functions.
- Performance: Remove splats in hot functions.
- Performance: Avoid creating
EventEmitterevents when not necessary. - Fix: Watson and Tiller integration.