Releases: ai/evil-blocks
0.7, Ranger Baker, 28th January 1951
0.6.4
0.6.3
0.6.2
0.6.1
0.6, Ranger Able, 27th January 1951
Filters
In 0.6 release Evil Blocks become to be much more flexible. It core is very tiny and only finds blocks by selectors, sets @block property and calls init method. All other features (like event bindings or @$() method) was moved to filters and can be disabled or replaced.
With your own filters you can change Evil Blocks logic, add some new shortcuts or features like mixins. For example you can create filter, which will initialize blocks only when they become to be visible:
filter = (obj) ->
if not obj.block.is(':visible')
checking = ->
evil.block.vitalize(obj.block) if obj.block.is(':visible')
setTimeout(checking, 100);
return false
evil.block.filters.splice(0, 0, filter)You can read more about filters in documentation.
Other Changes
Listener load on window will call immediately, if page was already loaded.
0.5.1
0.5, RDS-1, 29th August 1949
API Changes
Version 0.5 contains three API changes, so you need to update your code. This changes is not so big and you can fix your application by grep. I promise, that next version will not have same dramatic changes.
- Current event target was moved from listener first argument to
event.el. - Function to find inside block was renamed from
@(selector)to@$(selector). - Old deprecated function style API was removed.
New Features
- New
@@blockalias to[data-block=block]. You should use it for block selector inevil.block. - Evil Blocks now contains debugger. Just add
evil-blocks.debug.jsto your page and you will see all events inside blocks.
Vitalizing Changes
- Function
evil.blocks.vitalize()don’t vitalize block twice. So you can safer call it on new content without any arguments. In 0.5 version it will find blocks inside document by default. - Blocks initializers will call only after all event bindings. So now you can safely trigger another block in
init. - Evil Blocks now Initialize blocks on next tick after page ready to safely use libraries, which can be defined after blocks.
Integration Changes
- Now you can use latest version from GitHub master in Ruby Bundler.
- Add Bower support.




