coffeebox 0.1.1 → 0.1.2
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/README.md +35 -8
- data/app/assets/javascripts/coffeebox/main.js.coffee +1 -0
- data/lib/coffeebox/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ca3d45f824a566acd2ada6d0ef108b748b422f4b
|
|
4
|
+
data.tar.gz: f56a71fd4530ab090f97f7b3770229f0e6d2726b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6fca4d390b500b182ffa142ce219adcc73e59e4f2a8ac1da6b2f63d3c599837145df7d3a5924aa9bf8667711423aa0293b68611bcd5360530692130fff7e0e2e
|
|
7
|
+
data.tar.gz: fc7d6e865475325442257bf5ce389a4808182d3178aaa8cebd2c567670ef0de6b643432b063e2ae6d50a200173634c7dfdffdda2db750d3f94d757d2ed2e0707
|
data/README.md
CHANGED
|
@@ -6,12 +6,16 @@ This is an opinionated rewrite of [Facebox](http://defunkt.github.com/facebox/).
|
|
|
6
6
|
|
|
7
7
|
1. Everything is converted to coffescript
|
|
8
8
|
2. Shipped as a Rails 3.2/4.0 asset pipeline compatible gem
|
|
9
|
-
3. Zero images: Includes [spin.js](http://fgnass.github.io/spin.js/) instead of a gif preloader, and uses × as a close button
|
|
9
|
+
3. Zero images: Includes [spin.js](http://fgnass.github.io/spin.js/) instead of a gif preloader, and uses × (×) as a close button
|
|
10
10
|
4. Preloads displayed images with [imgpreload](https://github.com/farinspace/jquery.imgpreload)
|
|
11
11
|
5. Built-in support for turbolinks
|
|
12
|
-
6.
|
|
13
|
-
7.
|
|
14
|
-
8.
|
|
12
|
+
6. Does not stay in DOM when closed
|
|
13
|
+
7. Proper show/hide of overlay (no blinking when loading -> loaded)
|
|
14
|
+
8. Configurable SASS styling
|
|
15
|
+
|
|
16
|
+
## List of removed Facebox features:
|
|
17
|
+
|
|
18
|
+
1. Overlay opacity setting - please use CSS instead
|
|
15
19
|
|
|
16
20
|
## Installation
|
|
17
21
|
|
|
@@ -29,11 +33,11 @@ Or install it yourself as:
|
|
|
29
33
|
|
|
30
34
|
## Loading
|
|
31
35
|
|
|
32
|
-
|
|
36
|
+
Require it in application.js
|
|
33
37
|
|
|
34
38
|
//= require coffeebox
|
|
35
39
|
|
|
36
|
-
Or
|
|
40
|
+
Or in in application.js.coffe
|
|
37
41
|
|
|
38
42
|
#= require coffeebox
|
|
39
43
|
|
|
@@ -41,7 +45,7 @@ and in application.css.sass:
|
|
|
41
45
|
|
|
42
46
|
//= require coffeebox
|
|
43
47
|
|
|
44
|
-
or (sass\scss only)
|
|
48
|
+
or import SASS file directly (from sass\scss only)
|
|
45
49
|
|
|
46
50
|
// Set some options
|
|
47
51
|
$facebox-background: #fff
|
|
@@ -56,11 +60,34 @@ or (sass\scss only)
|
|
|
56
60
|
|
|
57
61
|
## Usage
|
|
58
62
|
|
|
63
|
+
Simple:
|
|
64
|
+
|
|
65
|
+
$ ->
|
|
66
|
+
$('a[rel*=cbox]').cbox()
|
|
67
|
+
|
|
68
|
+
<a href="..." rel="cbox">test cbox</a>
|
|
69
|
+
|
|
70
|
+
Advanced:
|
|
71
|
+
|
|
59
72
|
$.coffeebox('test <b>html</b>')
|
|
60
|
-
$.coffeebox(image: 'http
|
|
73
|
+
$.coffeebox(image: 'http://...')
|
|
61
74
|
$.cbox.loading()
|
|
62
75
|
$.cbox.close()
|
|
63
76
|
|
|
77
|
+
Other usage options:
|
|
78
|
+
|
|
79
|
+
$.cbox(ajax: 'remote.html')
|
|
80
|
+
$.cbox({ajax: 'remote.html'}, 'my-groovy-style')
|
|
81
|
+
$.cbox(image: 'stairs.jpg')
|
|
82
|
+
$.cbox({image: 'stairs.jpg'}, 'my-groovy-style')
|
|
83
|
+
$.cbox(div: '#box')
|
|
84
|
+
$.cbox({div: '#box'}, 'my-groovy-style')
|
|
85
|
+
|
|
86
|
+
Show preloader, then replace it with content:
|
|
87
|
+
|
|
88
|
+
$.cbox ->
|
|
89
|
+
$.get 'test.htm', (data) -> $.cbox(data)
|
|
90
|
+
|
|
64
91
|
## Contributing
|
|
65
92
|
|
|
66
93
|
1. Fork it
|
data/lib/coffeebox/version.rb
CHANGED