lighter_box 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1ca805cbc44387bcd1da3ecbd5d595628f44c417
4
- data.tar.gz: 067d9f737fa192fb37a2f6c3a5b39cfff6bee774
3
+ metadata.gz: 0f78cd89ebd3392ebfb5289c1815c4a1e05bc2b1
4
+ data.tar.gz: 2505e4aaf48c161b6a2f11749ce92a3be31921e3
5
5
  SHA512:
6
- metadata.gz: bd58de1a00f2f309930f1735b0e229dd5880577df91e9e4344d7566f331b6104631e551cdd81ece4fbc83cfc6f1542eb04b4b22ff061a452c4fd055f23b571a2
7
- data.tar.gz: 86ed656540f815b8f7295724cb90093632ad0fe7b2b1fc32d2959784b89381a7bc0511a02a4db51fe862fe5daf46cf696287fb50fa085bf8e68ab906ef6d804c
6
+ metadata.gz: 0b399a9810ccaf9d391f8f6fd90eebb09bbc66ab3b74b809fcfcb84f6a03154d058b11205e4c7b4fee3e907992a8341b3396112a771b7214474990dd3addc205
7
+ data.tar.gz: cb7ab0452f48c83174bc92c832aa2e84e34f3f9a8a7397b1ed7b17ac6c22763c3dadcae144fe16eff0c4e9aa971d21831ec5e51a5942900bfc67321211b04e4b
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # v0.1.1
2
+
3
+ * Fix “fragment” feature of ajax lightbox not always working.
4
+ * Fix missing css style definition
5
+ * Improve readme.
6
+
7
+ # v0.1.0
8
+
9
+ * Initial version
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # LighterBox
2
2
 
3
- A very lightweight lightbox with a bare minimum of features:
3
+ A very lightweight lightbox with a bare minimum of features, packaged for the Rails asset pipeline:
4
4
 
5
5
  * Displays a single image (with caption) or arbitrary content loaded via Ajax.
6
6
  * Fully accessible (note that all UI alt texts and titles are in german).
@@ -19,7 +19,7 @@ class Backdrop
19
19
 
20
20
  class Spinner
21
21
  constructor: (@parentEl) ->
22
- @el = $("<div class='lighter-box-spinner' tabindex='0'><div class='sr-only'>wird geladen …</div><div class='rect1' /><div class='rect2' /><div class='rect3' /><div class='rect4' /><div class='rect5' /></div>").hide().appendTo(@parentEl)
22
+ @el = $("<div class='lighter-box-spinner' tabindex='0'><div class='lighter-box-sr-only'>wird geladen …</div><div class='rect1' /><div class='rect2' /><div class='rect3' /><div class='rect4' /><div class='rect5' /></div>").hide().appendTo(@parentEl)
23
23
  @delay = null
24
24
 
25
25
  showDelayed: (delayMS) =>
@@ -242,7 +242,7 @@ class AjaxLighterBox extends LighterBox
242
242
  href = @srcEl.attr("href")
243
243
  fragment = @srcEl.data("lightbox-fragment")
244
244
  $.get href, (data) =>
245
- data = $(data).find(fragment) if fragment
245
+ data = $("<div/>").append($.parseHTML(data)).find(fragment)
246
246
  @ajaxContainer.html(data)
247
247
 
248
248
 
@@ -7,6 +7,18 @@ body.lighter-box-has-backdrop
7
7
  // * Blendet einen eventuell vorhandenen Scrollbar aus, dadurch kanns passieren, dass das Layout „hüpft“. (Bootstrap fixt das, indem sie die Scrollbar-Breite ausmessen und das Bodypadding dann explizit entsprechend anpassen – geht, ist aber recht aufwändig.)
8
8
  //overflow: hidden
9
9
 
10
+ // Only display content to screen readers
11
+ // See: http://a11yproject.com/posts/how-to-hide-content/
12
+ .lighter-box-sr-only
13
+ position: absolute
14
+ width: 1px
15
+ height: 1px
16
+ margin: -1px
17
+ padding: 0
18
+ overflow: hidden
19
+ clip: rect(0,0,0,0)
20
+ border: 0
21
+
10
22
  .lighter-box-backdrop
11
23
  position: fixed
12
24
  left: 0
@@ -1,3 +1,3 @@
1
1
  module LighterBox
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lighter_box
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Daschek
@@ -74,6 +74,7 @@ extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
76
  - ".gitignore"
77
+ - CHANGELOG.md
77
78
  - Gemfile
78
79
  - LICENSE.txt
79
80
  - README.md