lazybox 1.0.1 → 1.0.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.
- data/README.md +31 -1
- data/app/assets/javascripts/lazybox.js.coffee +1 -1
- data/lib/lazybox/version.rb +1 -1
- metadata +3 -2
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
|
data/lib/lazybox/version.rb
CHANGED
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.
|
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-
|
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:
|