colorbox-rails 0.0.7 → 0.0.8

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.rdoc CHANGED
@@ -15,7 +15,12 @@ in your application.js
15
15
 
16
16
  Then enable link to be displayed in colorbox by simply adding :colorbox => true attribute. E.g.
17
17
 
18
- <tt><%= link_to "My superb link", "#", :colorbox => true %></tt>
18
+ <tt><%= link_to "My superb link", "#", :data => { :colorbox => true } %></tt>
19
19
 
20
+ <a href="#" data-colorbox="true">My superb link</a>
21
+
22
+ Add attributes inside the :data block
23
+
24
+ <tt><%= link_to "My superb link", "#", :data => { :colorbox => true, :colorbox_height => '300px', :colorbox_width => '300px', :colorbox_iframe => true } %></tt>
20
25
 
21
26
  This project rocks and uses MIT-LICENSE.
@@ -9,14 +9,14 @@
9
9
  //= require_tree .
10
10
 
11
11
  $(document).ready(function() {
12
- $('a[colorbox="true"]').live('click', function(e) {
12
+ $('a[data-colorbox="true"]').live('click', function(e) {
13
13
  e.preventDefault();
14
14
 
15
15
  $.colorbox(
16
- {
17
- height: $(this).attr("colorbox_height") || false,
18
- width: $(this).attr("colorbox_width") || false,
19
- iframe: $(this).attr("colorbox_iframe") || false,
16
+ {
17
+ height: $(this).data("colorbox-height") || false,
18
+ width: $(this).data("colorbox-width") || false,
19
+ iframe: $(this).data("colorbox-iframe") || false,
20
20
  href: $(this).attr('href'),
21
21
  opacity: 0.5
22
22
  });
@@ -18,16 +18,16 @@
18
18
  Change the following styles to modify the appearance of ColorBox. They are
19
19
  ordered & tabbed in a way that represents the nesting of the generated HTML.
20
20
  */
21
- #cboxOverlay{background:url(overlay.png) repeat 0 0;}
21
+ #cboxOverlay{background:url(colorbox-rails/overlay.png) repeat 0 0;}
22
22
  #colorbox{}
23
- #cboxTopLeft{width:21px; height:21px; background:url(controls.png) no-repeat -101px 0;}
24
- #cboxTopRight{width:21px; height:21px; background:url(controls.png) no-repeat -130px 0;}
25
- #cboxBottomLeft{width:21px; height:21px; background:url(controls.png) no-repeat -101px -29px;}
26
- #cboxBottomRight{width:21px; height:21px; background:url(controls.png) no-repeat -130px -29px;}
27
- #cboxMiddleLeft{width:21px; background:url(controls.png) left top repeat-y;}
28
- #cboxMiddleRight{width:21px; background:url(controls.png) right top repeat-y;}
29
- #cboxTopCenter{height:21px; background:url(border.png) 0 0 repeat-x;}
30
- #cboxBottomCenter{height:21px; background:url(border.png) 0 -29px repeat-x;}
23
+ #cboxTopLeft{width:21px; height:21px; background:url(colorbox-rails/controls.png) no-repeat -101px 0;}
24
+ #cboxTopRight{width:21px; height:21px; background:url(colorbox-rails/controls.png) no-repeat -130px 0;}
25
+ #cboxBottomLeft{width:21px; height:21px; background:url(colorbox-rails/controls.png) no-repeat -101px -29px;}
26
+ #cboxBottomRight{width:21px; height:21px; background:url(colorbox-rails/controls.png) no-repeat -130px -29px;}
27
+ #cboxMiddleLeft{width:21px; background:url(colorbox-rails/controls.png) left top repeat-y;}
28
+ #cboxMiddleRight{width:21px; background:url(colorbox-rails/controls.png) right top repeat-y;}
29
+ #cboxTopCenter{height:21px; background:url(colorbox-rails/border.png) 0 0 repeat-x;}
30
+ #cboxBottomCenter{height:21px; background:url(colorbox-rails/border.png) 0 -29px repeat-x;}
31
31
  #cboxContent{background:#fff; overflow:hidden;}
32
32
  .cboxIframe{background:#fff;}
33
33
  #cboxError{padding:50px; border:1px solid #ccc;}
@@ -35,13 +35,13 @@
35
35
  #cboxTitle{position:absolute; bottom:4px; left:0; text-align:center; width:100%; color:#949494;}
36
36
  #cboxCurrent{position:absolute; bottom:4px; left:58px; color:#949494;}
37
37
  #cboxSlideshow{position:absolute; bottom:4px; right:30px; color:#0092ef;}
38
- #cboxPrevious{position:absolute; bottom:0; left:0; background:url(controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;}
38
+ #cboxPrevious{position:absolute; bottom:0; left:0; background:url(colorbox-rails/controls.png) no-repeat -75px 0; width:25px; height:25px; text-indent:-9999px;}
39
39
  #cboxPrevious:hover{background-position:-75px -25px;}
40
- #cboxNext{position:absolute; bottom:0; left:27px; background:url(controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;}
40
+ #cboxNext{position:absolute; bottom:0; left:27px; background:url(colorbox-rails/controls.png) no-repeat -50px 0; width:25px; height:25px; text-indent:-9999px;}
41
41
  #cboxNext:hover{background-position:-50px -25px;}
42
- #cboxLoadingOverlay{background:url(loading_background.png) no-repeat center center;}
43
- #cboxLoadingGraphic{background:url(loading.gif) no-repeat center center;}
44
- #cboxClose{position:absolute; bottom:0; right:0; background:url(controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px;}
42
+ #cboxLoadingOverlay{background:url(colorbox-rails/loading_background.png) no-repeat center center;}
43
+ #cboxLoadingGraphic{background:url(colorbox-rails/loading.gif) no-repeat center center;}
44
+ #cboxClose{position:absolute; bottom:0; right:0; background:url(colorbox-rails/controls.png) no-repeat -25px 0; width:25px; height:25px; text-indent:-9999px;}
45
45
  #cboxClose:hover{background-position:-25px -25px;}
46
46
 
47
47
  /*
@@ -64,14 +64,14 @@
64
64
  The following provides PNG transparency support for IE6
65
65
  Feel free to remove this and the /ie6/ directory if you have dropped IE6 support.
66
66
  */
67
- .cboxIE6 #cboxTopLeft{background:url(ie6/borderTopLeft.png);}
68
- .cboxIE6 #cboxTopCenter{background:url(ie6/borderTopCenter.png);}
69
- .cboxIE6 #cboxTopRight{background:url(ie6/borderTopRight.png);}
70
- .cboxIE6 #cboxBottomLeft{background:url(ie6/borderBottomLeft.png);}
71
- .cboxIE6 #cboxBottomCenter{background:url(ie6/borderBottomCenter.png);}
72
- .cboxIE6 #cboxBottomRight{background:url(ie6/borderBottomRight.png);}
73
- .cboxIE6 #cboxMiddleLeft{background:url(ie6/borderMiddleLeft.png);}
74
- .cboxIE6 #cboxMiddleRight{background:url(ie6/borderMiddleRight.png);}
67
+ .cboxIE6 #cboxTopLeft{background:url(colorbox-rails/ie6/borderTopLeft.png);}
68
+ .cboxIE6 #cboxTopCenter{background:url(colorbox-rails/ie6/borderTopCenter.png);}
69
+ .cboxIE6 #cboxTopRight{background:url(colorbox-rails/ie6/borderTopRight.png);}
70
+ .cboxIE6 #cboxBottomLeft{background:url(colorbox-rails/ie6/borderBottomLeft.png);}
71
+ .cboxIE6 #cboxBottomCenter{background:url(colorbox-rails/ie6/borderBottomCenter.png);}
72
+ .cboxIE6 #cboxBottomRight{background:url(colorbox-rails/ie6/borderBottomRight.png);}
73
+ .cboxIE6 #cboxMiddleLeft{background:url(colorbox-rails/ie6/borderMiddleLeft.png);}
74
+ .cboxIE6 #cboxMiddleRight{background:url(colorbox-rails/ie6/borderMiddleRight.png);}
75
75
 
76
76
  .cboxIE6 #cboxTopLeft,
77
77
  .cboxIE6 #cboxTopCenter,
@@ -1,3 +1,3 @@
1
1
  module ColorboxRails
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: colorbox-rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 7
10
- version: 0.0.7
9
+ - 8
10
+ version: 0.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - "B\xC5\x82a\xC5\xBCej Kosmowski"
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-11-14 00:00:00 Z
19
+ date: 2011-12-13 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: rails