evil-blocks-rails 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog.md +4 -1
- data/README.md +13 -7
- data/lib/evil-blocks-rails.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 423d641cf4d9b3b1a461863f6fdbc4a5acfddace
|
4
|
+
data.tar.gz: 4af472ee7bde4983be945f298a086e44889d2780
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e74e8907f7d558ebfa12a218f7704853af228cf09da2f57997dfb4ce51481d8f69e3ec12b9e52a33c782bf7a66e862e13012db4696016e18d2026996e16383ad
|
7
|
+
data.tar.gz: d03545bef4f349eddf6ad33296618a29f5e8a2d250d141fe4c5e975828658beaa877d0162cbb157cce7bef43cb670f7da8d48505cc96bcf253882da4287fe5f6
|
data/ChangeLog.md
CHANGED
@@ -1,6 +1,9 @@
|
|
1
|
+
# 0.6.3
|
2
|
+
* Add Slim 3.0 support (by Andrey Krivko).
|
3
|
+
|
1
4
|
# 0.6.2
|
2
5
|
* Fix IE 8 support (by Dmitry Klimensky).
|
3
|
-
* Fix event name in debugger (by Andrey Krivko)
|
6
|
+
* Fix event name in debugger (by Andrey Krivko).
|
4
7
|
|
5
8
|
## 0.6.1
|
6
9
|
* Fix debugger scope (by Andrey Krivko)
|
data/README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
-
# Evil Blocks
|
1
|
+
# Evil Blocks [](https://travis-ci.org/ai/evil-blocks)
|
2
|
+
|
3
|
+
<img align="right" width="140" height="115" src="http://ai.github.io/evil-blocks/logo.svg" title="Evil Blocks logo by Roman Shamin">
|
2
4
|
|
3
5
|
Evil Block is a tiny JS framework for web pages. It is based on 4 ideas:
|
4
6
|
|
5
7
|
* **Split code to independent blocks.** “Divide and rule” is always good idea.
|
6
|
-
* **Blocks communicate by events.** Events is an easy and safe method
|
7
|
-
very
|
8
|
+
* **Blocks communicate by events.** Events is an easy and safe method
|
9
|
+
to clean very complicated dependencies between controls.
|
8
10
|
* **Separate JS and CSS.** You should use classes only for styles and bind JS
|
9
11
|
by selectors with special attributes. So you can update your styles without
|
10
12
|
fear to break your scripts.
|
@@ -15,12 +17,16 @@ Evil Block is a tiny JS framework for web pages. It is based on 4 ideas:
|
|
15
17
|
|
16
18
|
See also [Evil Front], a pack of helpers for Ruby on Rails and Evil Blocks.
|
17
19
|
|
18
|
-
|
20
|
+
Role aliases were taken from [Role.js]. Based on Pieces.js by [@chrome].
|
21
|
+
|
22
|
+
<a href="https://evilmartians.com/?utm_source=evil-blocks">
|
23
|
+
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54">
|
24
|
+
</a>
|
19
25
|
|
20
26
|
[Role.js]: https://github.com/kossnocorp/role
|
21
27
|
[big price]: http://staal.io/blog/2014/02/05/2-way-data-binding-under-the-microscope/
|
22
28
|
[Evil Front]: https://github.com/ai/evil-front
|
23
|
-
[
|
29
|
+
[@chrome]: https://github.com/chrome
|
24
30
|
|
25
31
|
## Quick Example
|
26
32
|
|
@@ -55,7 +61,7 @@ evil.block '@@todo',
|
|
55
61
|
$.ajax
|
56
62
|
url: form.attr('action')
|
57
63
|
data: form.serialize()
|
58
|
-
complete: -> form.
|
64
|
+
complete: -> form.removeClass('is-loading')
|
59
65
|
|
60
66
|
'submit on @finishForm': (e) ->
|
61
67
|
@ajaxSubmit(e).done ->
|
@@ -414,7 +420,7 @@ evil.block '@@closable',
|
|
414
420
|
evil.block '@@popup',
|
415
421
|
|
416
422
|
'on close': ->
|
417
|
-
@
|
423
|
+
@block.removeClass('is-open')
|
418
424
|
```
|
419
425
|
|
420
426
|
If you want to use same methods inside of multiple block, you can create
|
data/lib/evil-blocks-rails.rb
CHANGED
@@ -5,11 +5,11 @@ module EvilBlocks
|
|
5
5
|
#
|
6
6
|
# Copy from role-rails by Sasha Koss.
|
7
7
|
# https://github.com/kossnocorp/role-rails
|
8
|
-
shortcut = Slim::Parser.
|
8
|
+
shortcut = Slim::Parser.options[:shortcut]
|
9
9
|
shortcut['@'] = { attr: 'data-role' }
|
10
10
|
shortcut['@@'] = { attr: 'data-block' }
|
11
|
-
Slim::Engine.
|
12
|
-
Slim::Engine.
|
11
|
+
Slim::Engine.options[:merge_attrs]['data-role'] = ' '
|
12
|
+
Slim::Engine.options[:merge_attrs]['data-block'] = ' '
|
13
13
|
end
|
14
14
|
|
15
15
|
# Add assets paths to standalone Sprockets environment.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evil-blocks-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey Sitnik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sprockets
|