lazybox 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -108,7 +108,7 @@ $(document).ready(function() {
108
108
  });
109
109
  ```
110
110
 
111
- If there are more than one link to image you can click on image in the lazybox to show the next one
111
+ If there are more than one link to image you can click on image in the lazybox to show the next one (version < 0.2.6)
112
112
 
113
113
  ```haml
114
114
  = link_to image.url, rel: :lazybox do
@@ -144,6 +144,36 @@ Style your close:
144
144
  }
145
145
  ```
146
146
 
147
+ We can use lazybox with `turbolinks` to show page loading spinner:
148
+
149
+ ```coffeescript
150
+ $(document).on 'page:fetch', -> $.lazybox("<i class='icon-orange'></i>", { klass: 'spinner', close: false, esc: false })
151
+ ```
152
+
153
+ ```css
154
+ #lazybox.spinner {
155
+ background: transparent;
156
+ border: none;
157
+ box-shadow: none;
158
+ }
159
+ ```
160
+
161
+ Turbolinks spinner
162
+ ------------------
163
+
164
+ ```coffee
165
+ $(document).on 'page:fetch', -> $.lazybox("<i class='fa fa-spinner fa-spin'>", { klass: 'spinner', close: false, esc: false })
166
+ $(document).on 'page:change', -> $.lazybox.close()
167
+ ```
168
+
169
+ ```scss
170
+ #lazybox.spinner {
171
+ background: transparent;
172
+ box-shadow: none;
173
+ .fa-spinner { font-size: 128px; }
174
+ }
175
+ ```
176
+
147
177
  Options
148
178
  -------
149
179
 
@@ -23,7 +23,7 @@
23
23
  setTimeout (-> overlay.addClass('visible')), 1
24
24
  close.addClass('visible') if options.close && !box.hasClass('visible')
25
25
 
26
- close: -> overlay.removeClass('visible')
26
+ close: -> overlay.removeClass('visible') if overlay
27
27
 
28
28
  confirm: (element) ->
29
29
  options = $.extend defaults, $.lazybox.settings
@@ -1,3 +1,3 @@
1
1
  module Lazybox
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lazybox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-19 00:00:00.000000000 Z
12
+ date: 2014-07-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jquery-rails
@@ -66,3 +66,4 @@ signing_key:
66
66
  specification_version: 3
67
67
  summary: Use LazyBox for popup windows with Rails
68
68
  test_files: []
69
+ has_rdoc: