coffeebox 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 04d741b13d3183a99d0d34ea78651f0a53cd7955
4
- data.tar.gz: eca3311f4c83eadf60a5cfa3e9106c39b08cf571
3
+ metadata.gz: ca3d45f824a566acd2ada6d0ef108b748b422f4b
4
+ data.tar.gz: f56a71fd4530ab090f97f7b3770229f0e6d2726b
5
5
  SHA512:
6
- metadata.gz: 38e721e29e2da3b32847d2d86dc459a04da15161fb5c1434321378ba7274871a0f3651ef4414d3553f73ebc25c377950863d544c2aaa75246e32a27ffdcd8757
7
- data.tar.gz: bc3726b1f6677ab732f89be337a0276fe45c5ecc362c024388cae57e29c083bac1a7be8548be56558c0148371911a1952460c5a4e095178b57dab4db4fe97545
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. Support for fully custom popup HTML
13
- 7. Does not stay in DOM when closed
14
- 8. Proper show/hide of overlay (no blinking when loading -> loaded)
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
- require it in application.js
36
+ Require it in application.js
33
37
 
34
38
  //= require coffeebox
35
39
 
36
- Or require it in application.js.coffe
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
@@ -28,6 +28,7 @@ $.coffeebox = (data, klass) ->
28
28
  else if data.div
29
29
  fillcoffeeboxFromHref data.div, klass
30
30
  else if $.isFunction(data)
31
+ $.coffeebox.loading()
31
32
  data.call $
32
33
  else
33
34
  $.coffeebox.reveal data, klass
@@ -1,3 +1,3 @@
1
1
  module Coffeebox
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coffeebox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebtv