jquery-colorbox-rails 0.2.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a965a035f9b6b7ed87ef9848b58099142fc5aff4
4
- data.tar.gz: c3dbb171d05aabbb9f6dbeefe873f7c2d70010cc
3
+ metadata.gz: 314b7d0fd37c2b0eacdab4de2873801af6b297ce
4
+ data.tar.gz: baafe03932253fdc445df136869060fc85e84269
5
5
  SHA512:
6
- metadata.gz: 89d4e00330e68c57e191330230497ac8d283ed57dc996315f7c3fca2b5f0acf93b56163df58cfc0d822f536ef44e01054e6da934bcc76ce0b442a4ecb63919ae
7
- data.tar.gz: 3e6e52fd3ada9ffc5f6728a2c843d559c307a182f5adce49b731eb0e9cc886ca93bc016e3bfc4b7507000d51272e9c6dabe5c841c4e269a51c91171112ea7beb
6
+ metadata.gz: 7ca333c0d78e43d1fa0975535d947b5f6dbb9bc556e5c624e3f7fef79765225f574e3a5876428f000fc817b2873fe7e0858be397c767b40be6dbf37233a97fa3
7
+ data.tar.gz: 95fcfaa3bc6873e095bea845d1c51158047043cae95f60c79a087486a65078be66220fcf66854f83c9019f8a64aa04812f661fc370b360c25e34e5eec24c9269
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  jquery-colorbox-rails integrates [jquery.colorbox](https://github.com/jackmoore/colorbox) with rails 3.1+ asset pipeline.
4
4
 
5
- Colorbox version: <b id="colorbox-version">1.5.15</b>
5
+ Colorbox version: <b id="colorbox-version">1.6.0</b>
6
6
 
7
7
  ### Installation
8
8
 
@@ -1,3 +1,3 @@
1
1
  module JqueryColorboxRails
2
- VERSION = "0.2.3"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Colorbox 1.5.15
2
+ Colorbox 1.6.0
3
3
  license: MIT
4
4
  http://www.jacklmoore.com/colorbox
5
5
  */
@@ -85,6 +85,39 @@
85
85
  },
86
86
  title: function() {
87
87
  return this.title;
88
+ },
89
+ createImg: function() {
90
+ var img = new Image();
91
+ var attrs = $(this).data('cbox-img-attrs');
92
+
93
+ if (typeof attrs === 'object') {
94
+ $.each(attrs, function(key, val){
95
+ img[key] = val;
96
+ });
97
+ }
98
+
99
+ return img;
100
+ },
101
+ createIframe: function() {
102
+ var iframe = document.createElement('iframe');
103
+ var attrs = $(this).data('cbox-iframe-attrs');
104
+
105
+ if (typeof attrs === 'object') {
106
+ $.each(attrs, function(key, val){
107
+ iframe[key] = val;
108
+ });
109
+ }
110
+
111
+ if ('frameBorder' in iframe) {
112
+ iframe.frameBorder = 0;
113
+ }
114
+ if ('allowTransparency' in iframe) {
115
+ iframe.allowTransparency = "true";
116
+ }
117
+ iframe.name = (new Date()).getTime(); // give the iframe a unique name to prevent caching
118
+ iframe.allowFullScreen = true;
119
+
120
+ return iframe;
88
121
  }
89
122
  },
90
123
 
@@ -834,15 +867,8 @@
834
867
  }
835
868
 
836
869
  if (settings.get('iframe')) {
837
- iframe = document.createElement('iframe');
838
870
 
839
- if ('frameBorder' in iframe) {
840
- iframe.frameBorder = 0;
841
- }
842
-
843
- if ('allowTransparency' in iframe) {
844
- iframe.allowTransparency = "true";
845
- }
871
+ iframe = settings.get('createIframe');
846
872
 
847
873
  if (!settings.get('scrolling')) {
848
874
  iframe.scrolling = "no";
@@ -851,9 +877,7 @@
851
877
  $(iframe)
852
878
  .attr({
853
879
  src: settings.get('href'),
854
- name: (new Date()).getTime(), // give the iframe a unique name to prevent caching
855
- 'class': prefix + 'Iframe',
856
- allowFullScreen : true // allow HTML5 video to go fullscreen
880
+ 'class': prefix + 'Iframe'
857
881
  })
858
882
  .one('load', complete)
859
883
  .appendTo($loaded);
@@ -946,7 +970,7 @@
946
970
 
947
971
  href = retinaUrl(settings, href);
948
972
 
949
- photo = new Image();
973
+ photo = settings.get('createImg');
950
974
 
951
975
  $(photo)
952
976
  .addClass(prefix + 'Photo')
@@ -963,13 +987,6 @@
963
987
  setTimeout(function(){
964
988
  var percent;
965
989
 
966
- $.each(['alt', 'longdesc', 'aria-describedby'], function(i,val){
967
- var attr = $(settings.el).attr(val) || $(settings.el).attr('data-'+val);
968
- if (attr) {
969
- photo.setAttribute(val, attr);
970
- }
971
- });
972
-
973
990
  if (settings.get('retinaImage') && window.devicePixelRatio > 1) {
974
991
  photo.height = photo.height / window.devicePixelRatio;
975
992
  photo.width = photo.width / window.devicePixelRatio;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jquery-colorbox-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Krzysztof Knapik
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-01 00:00:00.000000000 Z
11
+ date: 2015-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties