lazybox 1.1.1 → 1.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 +1 -1
- data/app/assets/javascripts/lazybox.js.coffee +3 -1
- data/app/assets/stylesheets/lazybox.css.scss +16 -15
- data/lib/lazybox.rb +4 -3
- data/lib/lazybox/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0662494ff4a4dbebf2df420c06a9dfe11e2a254c
|
4
|
+
data.tar.gz: 55258e0eb76f7ba29f68a5b68de27c0c87930777
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fff9d3710a05e70ba8ebe8b9d6f46a65b75a688185f7fa3677ffe630cefe4ed3efaf78a979ab93c31b14e3639e96694de378b6b40c2b29bbcf6aacebfbbb23b0
|
7
|
+
data.tar.gz: 2fd64ef850b19910da81c2bc93cf7d2323e0dfdde36ecc147d95f0f2fff5a22f73ff15825ae4f4a2bcf0812f3d8f654ee40a47b21324833856a7f4555e305e5c
|
data/README.md
CHANGED
@@ -51,7 +51,9 @@
|
|
51
51
|
options = $.extend {}, defaults, $.lazybox.settings, options
|
52
52
|
$('#lazybox').attr('class', options.klass)
|
53
53
|
$('#lazy_close').toggleClass('visible', options.close)
|
54
|
-
|
54
|
+
unless options.modal
|
55
|
+
$('#lazy_overlay').one 'click', (e) ->
|
56
|
+
$.lazybox.close() if e.target == @
|
55
57
|
$(document).on 'keyup.lazy', (e) ->
|
56
58
|
if e.keyCode == 27 and options.esc
|
57
59
|
$.lazybox.close()
|
@@ -11,6 +11,7 @@ $lazy-close: '×' !default;
|
|
11
11
|
|
12
12
|
#lazy_overlay {
|
13
13
|
visibility: hidden;
|
14
|
+
text-align: center;
|
14
15
|
z-index: $lazy-z-index;
|
15
16
|
background: $lazy-overlay;
|
16
17
|
bottom: 0;
|
@@ -20,30 +21,32 @@ $lazy-close: '×' !default;
|
|
20
21
|
top: 0;
|
21
22
|
opacity: 0;
|
22
23
|
transition: opacity $lazy-transition, visibility $lazy-transition;
|
24
|
+
&:before {
|
25
|
+
content: '';
|
26
|
+
display: inline-block;
|
27
|
+
height: 100%;
|
28
|
+
vertical-align: middle;
|
29
|
+
}
|
23
30
|
&.active {
|
24
31
|
visibility: visible;
|
25
32
|
opacity: 1;
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
}
|
33
|
+
#lazybox { transform: $lazy-end; }
|
34
|
+
}
|
35
|
+
* {
|
36
|
+
visibility: inherit;
|
31
37
|
}
|
32
38
|
}
|
33
39
|
|
34
40
|
#lazybox {
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
transform: translate(-50%, -50%) $lazy-start;
|
41
|
+
text-align: left;
|
42
|
+
display: inline-block;
|
43
|
+
vertical-align: middle;
|
44
|
+
transform: $lazy-start;
|
40
45
|
background-color: $lazy-bg;
|
41
46
|
border: $lazy-border;
|
42
47
|
box-shadow: $lazy-shadow;
|
43
48
|
padding: $lazy-padding;
|
44
|
-
position: fixed;
|
45
49
|
box-sizing: border-box;
|
46
|
-
z-index: $lazy-z-index + 1;
|
47
50
|
overflow: auto;
|
48
51
|
max-height: 100vh;
|
49
52
|
max-width: 100vw;
|
@@ -51,9 +54,7 @@ $lazy-close: '×' !default;
|
|
51
54
|
&.confirm { max-width: 300px; }
|
52
55
|
.lazy_buttons { margin-top: 15px; text-align: right; }
|
53
56
|
.lazy-img { display: block; }
|
54
|
-
#lazy_body {
|
55
|
-
position: relative;
|
56
|
-
}
|
57
|
+
#lazy_body { position: relative; }
|
57
58
|
}
|
58
59
|
|
59
60
|
#lazy_close {
|
data/lib/lazybox.rb
CHANGED
@@ -6,11 +6,12 @@ module Lazybox
|
|
6
6
|
module Helper
|
7
7
|
|
8
8
|
def render_lazybox(options = {})
|
9
|
-
content_tag(:div, '', id: :lazy_overlay, class: ('active' if
|
9
|
+
content_tag(:div, '', id: :lazy_overlay, class: ('active' if content_for?(:lazybox))) do
|
10
10
|
content_tag(:div, id: :lazybox) do
|
11
|
-
|
11
|
+
button_tag('', id: :lazy_close, class: :visible) +
|
12
12
|
content_tag(:div, id: :lazy_body) do
|
13
|
-
|
13
|
+
content_for(:lazybox)
|
14
|
+
end
|
14
15
|
end
|
15
16
|
end
|
16
17
|
end
|
data/lib/lazybox/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lazybox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Galushka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jquery-rails
|
@@ -58,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
58
58
|
version: '0'
|
59
59
|
requirements: []
|
60
60
|
rubyforge_project:
|
61
|
-
rubygems_version: 2.
|
61
|
+
rubygems_version: 2.4.5
|
62
62
|
signing_key:
|
63
63
|
specification_version: 4
|
64
64
|
summary: Use LazyBox for popup windows with Rails
|