coffeebox 0.1.0 → 0.1.1
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 +11 -3
- data/app/assets/javascripts/coffeebox/main.js.coffee +3 -2
- 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: 04d741b13d3183a99d0d34ea78651f0a53cd7955
|
|
4
|
+
data.tar.gz: eca3311f4c83eadf60a5cfa3e9106c39b08cf571
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 38e721e29e2da3b32847d2d86dc459a04da15161fb5c1434321378ba7274871a0f3651ef4414d3553f73ebc25c377950863d544c2aaa75246e32a27ffdcd8757
|
|
7
|
+
data.tar.gz: bc3726b1f6677ab732f89be337a0276fe45c5ecc362c024388cae57e29c083bac1a7be8548be56558c0148371911a1952460c5a4e095178b57dab4db4fe97545
|
data/README.md
CHANGED
|
@@ -6,11 +6,12 @@ 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. Includes [spin.js](http://fgnass.github.io/spin.js/) instead of a gif preloader
|
|
10
|
-
4. Preloads images with [imgpreload](https://github.com/farinspace/jquery.imgpreload)
|
|
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
|
+
4. Preloads displayed images with [imgpreload](https://github.com/farinspace/jquery.imgpreload)
|
|
11
11
|
5. Built-in support for turbolinks
|
|
12
12
|
6. Support for fully custom popup HTML
|
|
13
13
|
7. Does not stay in DOM when closed
|
|
14
|
+
8. Proper show/hide of overlay (no blinking when loading -> loaded)
|
|
14
15
|
|
|
15
16
|
## Installation
|
|
16
17
|
|
|
@@ -26,7 +27,7 @@ Or install it yourself as:
|
|
|
26
27
|
|
|
27
28
|
$ gem install coffeebox
|
|
28
29
|
|
|
29
|
-
##
|
|
30
|
+
## Loading
|
|
30
31
|
|
|
31
32
|
require it in application.js
|
|
32
33
|
|
|
@@ -53,6 +54,13 @@ or (sass\scss only)
|
|
|
53
54
|
// Then import
|
|
54
55
|
@import coffeebox
|
|
55
56
|
|
|
57
|
+
## Usage
|
|
58
|
+
|
|
59
|
+
$.coffeebox('test <b>html</b>')
|
|
60
|
+
$.coffeebox(image: 'http:://...')
|
|
61
|
+
$.cbox.loading()
|
|
62
|
+
$.cbox.close()
|
|
63
|
+
|
|
56
64
|
## Contributing
|
|
57
65
|
|
|
58
66
|
1. Fork it
|
|
@@ -82,6 +82,7 @@ $.extend $.coffeebox,
|
|
|
82
82
|
if $("#coffebox .loading").length
|
|
83
83
|
$("#coffebox .loading").stopSpinner()
|
|
84
84
|
init()
|
|
85
|
+
showOverlay()
|
|
85
86
|
$(document).trigger "beforeReveal.coffeebox"
|
|
86
87
|
$("#coffeebox .content").addClass klass if klass
|
|
87
88
|
$("#coffeebox .content").empty().append data
|
|
@@ -217,6 +218,6 @@ $(document).bind "close.coffeebox", ->
|
|
|
217
218
|
hideOverlay()
|
|
218
219
|
|
|
219
220
|
# shorter alias
|
|
220
|
-
$.cbox = $.
|
|
221
|
-
$.fn.cbox = $.fn.
|
|
221
|
+
$.cbox = $.coffeebox
|
|
222
|
+
$.fn.cbox = $.fn.coffeebox
|
|
222
223
|
|
data/lib/coffeebox/version.rb
CHANGED