jquery-colorbox-rails 0.2.3 → 0.3.0
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/lib/jquery-colorbox-rails/version.rb +1 -1
- data/vendor/assets/javascripts/jquery.colorbox.js +37 -20
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 314b7d0fd37c2b0eacdab4de2873801af6b297ce
|
4
|
+
data.tar.gz: baafe03932253fdc445df136869060fc85e84269
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ca333c0d78e43d1fa0975535d947b5f6dbb9bc556e5c624e3f7fef79765225f574e3a5876428f000fc817b2873fe7e0858be397c767b40be6dbf37233a97fa3
|
7
|
+
data.tar.gz: 95fcfaa3bc6873e095bea845d1c51158047043cae95f60c79a087486a65078be66220fcf66854f83c9019f8a64aa04812f661fc370b360c25e34e5eec24c9269
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
Colorbox 1.
|
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
|
-
|
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
|
-
|
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 =
|
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.
|
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-
|
11
|
+
date: 2015-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|