swipebox 0.0.4 → 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 +4 -4
- data/lib/swipebox/version.rb +1 -1
- data/test/dummy/log/test.log +6 -0
- data/test/dummy/tmp/cache/assets/test/sass/f9c6a267bff4dbc4c014a32d65f455fee642ff7f/swipebox.css.scssc +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/0f1d51342ac8ff8f51fe8661bffccff4 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/2417663820f12194df84f901aeddf205 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/52844af88f25171d8b2bd9b3841fc531 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/58b5fb0ecf84f52f0afa100b0b4c8cba +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/60bdda9adeb105627bebe3a083e0e6f9 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/7cad4e0f6c155aee86ff849175d87485 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/9540837ee939a819ff3def6208986d2b +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/ad7154cc55f39a227d2bc6415f58932d +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/b76f694c0efb9b770a71012f8113728b +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/bb9dec5421199706d294d48f86f003d8 +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/c8a722e046ca0658031e47b6a3f6b80a +0 -0
- data/test/dummy/tmp/cache/assets/test/sprockets/e49d90ad8c6a6ec12d0f897fe441722f +0 -0
- data/test/test_helper.rb +2 -2
- data/vendor/assets/javascripts/swipebox.js +28 -30
- data/vendor/assets/stylesheets/swipebox.css.scss +3 -3
- metadata +13 -2
- data/lib/tasks/swipebox_tasks.rake +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06939f95b88a0b44627ab340441150bc05402254
|
4
|
+
data.tar.gz: faac96c3dc942a323a8dbdf2a2e08448e2fe0564
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70999ae7074002cf67b71345df7baf0d6c398e73b31e2951f9f9acb65087c83a567a8865dc52eeeada9f6011db54c3857dd9e6b6d05efdfab5fcd0251573ab9d
|
7
|
+
data.tar.gz: 75237abbb02a2bdbd345e0936e46bf74a1bf0ab620ac8bcab811fc909bf1b277397ed836e96804794780d6f0d1905eca8e3bd38d584e1047104704281839c26a
|
data/lib/swipebox/version.rb
CHANGED
data/test/dummy/log/test.log
CHANGED
@@ -30,3 +30,9 @@ Started GET "/assets/swipebox.js" for 127.0.0.1 at 2013-10-20 22:39:52 +0200
|
|
30
30
|
Started GET "/assets/swipebox.css" for 127.0.0.1 at 2013-10-20 22:39:52 +0200
|
31
31
|
Started GET "/assets/swipebox.js" for 127.0.0.1 at 2013-10-20 22:45:24 +0200
|
32
32
|
Started GET "/assets/swipebox.css" for 127.0.0.1 at 2013-10-20 22:45:24 +0200
|
33
|
+
Started GET "/assets/swipebox.js" for 127.0.0.1 at 2013-10-21 15:28:52 +0200
|
34
|
+
Started GET "/assets/swipebox.css" for 127.0.0.1 at 2013-10-21 15:28:52 +0200
|
35
|
+
Started GET "/assets/swipebox.js" for 127.0.0.1 at 2013-10-21 15:29:07 +0200
|
36
|
+
Started GET "/assets/swipebox.css" for 127.0.0.1 at 2013-10-21 15:29:07 +0200
|
37
|
+
Started GET "/assets/swipebox.css" for 127.0.0.1 at 2013-10-21 17:43:23 +0200
|
38
|
+
Started GET "/assets/swipebox.js" for 127.0.0.1 at 2013-10-21 17:43:23 +0200
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/test/test_helper.rb
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
ENV["RAILS_ENV"] = "test"
|
3
3
|
|
4
4
|
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
5
|
-
require
|
5
|
+
require 'rails/test_help'
|
6
6
|
require 'minitest/autorun'
|
7
|
-
require
|
7
|
+
require 'capybara/rails'
|
8
8
|
|
9
9
|
Rails.backtrace_cleaner.remove_silencers!
|
10
10
|
|
@@ -3,11 +3,9 @@
|
|
3
3
|
@author Constantin Saguin - @brutaldesign
|
4
4
|
@link http://csag.co
|
5
5
|
@github http://github.com/brutaldesign/swipebox
|
6
|
-
@version 1.2.1
|
6
|
+
@version 1.2.1
|
7
7
|
@license MIT License
|
8
8
|
|
9
|
-
*svg class mod
|
10
|
-
|
11
9
|
----------------------------------------------------------------------------------------------*/
|
12
10
|
|
13
11
|
;(function (window, document, $, undefined) {
|
@@ -20,9 +18,9 @@
|
|
20
18
|
hideBarsDelay : 3000,
|
21
19
|
videoMaxWidth : 1140,
|
22
20
|
vimeoColor : 'CCCCCC',
|
21
|
+
showCount: false,
|
23
22
|
beforeOpen: null,
|
24
|
-
|
25
|
-
showCount: false
|
23
|
+
afterClose: null
|
26
24
|
},
|
27
25
|
|
28
26
|
plugin = this,
|
@@ -152,7 +150,7 @@
|
|
152
150
|
|
153
151
|
|
154
152
|
if(supportSVG){
|
155
|
-
$('#swipebox-action #swipebox-prev,#swipebox-action #swipebox-next,#swipebox-action #swipebox-close').addClass('svg')
|
153
|
+
$('#swipebox-action #swipebox-prev,#swipebox-action #swipebox-next,#swipebox-action #swipebox-close').addClass('svg');
|
156
154
|
}
|
157
155
|
|
158
156
|
$.each( elements, function(){
|
@@ -241,37 +239,37 @@
|
|
241
239
|
|
242
240
|
$(this).addClass('touching');
|
243
241
|
|
244
|
-
|
245
|
-
|
242
|
+
endCoords = e.originalEvent.targetTouches[0];
|
243
|
+
startCoords.pageX = e.originalEvent.targetTouches[0].pageX;
|
246
244
|
|
247
245
|
$('.touching').bind('touchmove',function(e){
|
248
246
|
e.preventDefault();
|
249
247
|
e.stopPropagation();
|
250
|
-
|
248
|
+
endCoords = e.originalEvent.targetTouches[0];
|
251
249
|
|
252
250
|
});
|
253
251
|
|
254
|
-
|
252
|
+
return false;
|
255
253
|
|
256
|
-
|
257
|
-
|
254
|
+
}).bind('touchend',function(e){
|
255
|
+
e.preventDefault();
|
258
256
|
e.stopPropagation();
|
259
257
|
|
260
|
-
|
258
|
+
distance = endCoords.pageX - startCoords.pageX;
|
261
259
|
|
262
|
-
|
260
|
+
if( distance >= swipMinDistance ){
|
263
261
|
|
264
|
-
|
265
|
-
|
262
|
+
// swipeLeft
|
263
|
+
$this.getPrev();
|
266
264
|
|
267
|
-
|
265
|
+
}else if( distance <= - swipMinDistance ){
|
268
266
|
|
269
|
-
|
270
|
-
|
267
|
+
// swipeRight
|
268
|
+
$this.getNext();
|
271
269
|
|
272
|
-
|
273
|
-
|
274
|
-
|
270
|
+
}else{
|
271
|
+
// tap
|
272
|
+
if(!bars.hasClass('visible-bars')){
|
275
273
|
$this.showBars();
|
276
274
|
$this.setTimeout();
|
277
275
|
}else{
|
@@ -279,13 +277,13 @@
|
|
279
277
|
$this.hideBars();
|
280
278
|
}
|
281
279
|
|
282
|
-
|
280
|
+
}
|
283
281
|
|
284
|
-
|
282
|
+
$('.touching').off('touchmove').removeClass('touching');
|
285
283
|
|
286
284
|
});
|
287
285
|
|
288
|
-
|
286
|
+
}
|
289
287
|
},
|
290
288
|
|
291
289
|
setTimeout: function(){
|
@@ -345,7 +343,7 @@
|
|
345
343
|
});
|
346
344
|
|
347
345
|
$('#swipebox-action').hover(function() {
|
348
|
-
|
346
|
+
$this.showBars();
|
349
347
|
bars.addClass('force-visible-bars');
|
350
348
|
$this.clearTimeout();
|
351
349
|
|
@@ -425,9 +423,9 @@
|
|
425
423
|
$('#swipebox-next').addClass('disabled');
|
426
424
|
}
|
427
425
|
|
428
|
-
if (plugin.settings.showCount)
|
429
|
-
$('#swipebox-count').text((index+1) + '/' + elements.length)
|
430
|
-
}
|
426
|
+
if (plugin.settings.showCount){
|
427
|
+
$('#swipebox-count').text((index+1) + '/' + elements.length);
|
428
|
+
}
|
431
429
|
},
|
432
430
|
|
433
431
|
openSlide : function (index){
|
@@ -579,7 +577,7 @@
|
|
579
577
|
$.swipebox.isOpen = false;
|
580
578
|
if (plugin.settings.afterClose)
|
581
579
|
plugin.settings.afterClose();
|
582
|
-
|
580
|
+
}
|
583
581
|
|
584
582
|
};
|
585
583
|
|
@@ -69,7 +69,6 @@ html.swipebox {
|
|
69
69
|
-moz-box-sizing: border-box;
|
70
70
|
}
|
71
71
|
|
72
|
-
|
73
72
|
#swipebox-slider .slide .swipebox-video-container .swipebox-video{
|
74
73
|
width: 100%;
|
75
74
|
height: 0;
|
@@ -116,7 +115,8 @@ html.swipebox {
|
|
116
115
|
top: 0!important;
|
117
116
|
}
|
118
117
|
|
119
|
-
#swipebox-action #swipebox-prev,
|
118
|
+
#swipebox-action #swipebox-prev,
|
119
|
+
#swipebox-action #swipebox-next,
|
120
120
|
#swipebox-action #swipebox-close {
|
121
121
|
background-image: asset-url('icons.png');
|
122
122
|
background-repeat: no-repeat;
|
@@ -262,4 +262,4 @@ html.swipebox {
|
|
262
262
|
font-size: 15px;
|
263
263
|
line-height: 43px;
|
264
264
|
font-family: Helvetica, Arial, sans-serif;
|
265
|
-
}
|
265
|
+
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: swipebox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miha Rekar
|
@@ -90,7 +90,6 @@ extra_rdoc_files: []
|
|
90
90
|
files:
|
91
91
|
- lib/swipebox/version.rb
|
92
92
|
- lib/swipebox.rb
|
93
|
-
- lib/tasks/swipebox_tasks.rake
|
94
93
|
- vendor/assets/images/icons.png
|
95
94
|
- vendor/assets/images/icons.svg
|
96
95
|
- vendor/assets/images/loader.gif
|
@@ -140,14 +139,20 @@ files:
|
|
140
139
|
- test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6
|
141
140
|
- test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
142
141
|
- test/dummy/tmp/cache/assets/test/sass/f9c6a267bff4dbc4c014a32d65f455fee642ff7f/swipebox.css.scssc
|
142
|
+
- test/dummy/tmp/cache/assets/test/sprockets/0f1d51342ac8ff8f51fe8661bffccff4
|
143
143
|
- test/dummy/tmp/cache/assets/test/sprockets/2417663820f12194df84f901aeddf205
|
144
144
|
- test/dummy/tmp/cache/assets/test/sprockets/299e5c3e6fe902ee2248d4f551e2a736
|
145
145
|
- test/dummy/tmp/cache/assets/test/sprockets/39a4691fbee5b5d7a15a61d39e8298c9
|
146
146
|
- test/dummy/tmp/cache/assets/test/sprockets/52844af88f25171d8b2bd9b3841fc531
|
147
147
|
- test/dummy/tmp/cache/assets/test/sprockets/58b5fb0ecf84f52f0afa100b0b4c8cba
|
148
|
+
- test/dummy/tmp/cache/assets/test/sprockets/60bdda9adeb105627bebe3a083e0e6f9
|
148
149
|
- test/dummy/tmp/cache/assets/test/sprockets/7cad4e0f6c155aee86ff849175d87485
|
149
150
|
- test/dummy/tmp/cache/assets/test/sprockets/9540837ee939a819ff3def6208986d2b
|
150
151
|
- test/dummy/tmp/cache/assets/test/sprockets/ad7154cc55f39a227d2bc6415f58932d
|
152
|
+
- test/dummy/tmp/cache/assets/test/sprockets/b76f694c0efb9b770a71012f8113728b
|
153
|
+
- test/dummy/tmp/cache/assets/test/sprockets/bb9dec5421199706d294d48f86f003d8
|
154
|
+
- test/dummy/tmp/cache/assets/test/sprockets/c8a722e046ca0658031e47b6a3f6b80a
|
155
|
+
- test/dummy/tmp/cache/assets/test/sprockets/e49d90ad8c6a6ec12d0f897fe441722f
|
151
156
|
- test/dummy/tmp/cache/assets/test/sprockets/f8832e909e8abc5a5f26e98546d2f7ca
|
152
157
|
- test/integration/swipebox_integration_test.rb
|
153
158
|
- test/test_helper.rb
|
@@ -217,14 +222,20 @@ test_files:
|
|
217
222
|
- test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6
|
218
223
|
- test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
219
224
|
- test/dummy/tmp/cache/assets/test/sass/f9c6a267bff4dbc4c014a32d65f455fee642ff7f/swipebox.css.scssc
|
225
|
+
- test/dummy/tmp/cache/assets/test/sprockets/0f1d51342ac8ff8f51fe8661bffccff4
|
220
226
|
- test/dummy/tmp/cache/assets/test/sprockets/2417663820f12194df84f901aeddf205
|
221
227
|
- test/dummy/tmp/cache/assets/test/sprockets/299e5c3e6fe902ee2248d4f551e2a736
|
222
228
|
- test/dummy/tmp/cache/assets/test/sprockets/39a4691fbee5b5d7a15a61d39e8298c9
|
223
229
|
- test/dummy/tmp/cache/assets/test/sprockets/52844af88f25171d8b2bd9b3841fc531
|
224
230
|
- test/dummy/tmp/cache/assets/test/sprockets/58b5fb0ecf84f52f0afa100b0b4c8cba
|
231
|
+
- test/dummy/tmp/cache/assets/test/sprockets/60bdda9adeb105627bebe3a083e0e6f9
|
225
232
|
- test/dummy/tmp/cache/assets/test/sprockets/7cad4e0f6c155aee86ff849175d87485
|
226
233
|
- test/dummy/tmp/cache/assets/test/sprockets/9540837ee939a819ff3def6208986d2b
|
227
234
|
- test/dummy/tmp/cache/assets/test/sprockets/ad7154cc55f39a227d2bc6415f58932d
|
235
|
+
- test/dummy/tmp/cache/assets/test/sprockets/b76f694c0efb9b770a71012f8113728b
|
236
|
+
- test/dummy/tmp/cache/assets/test/sprockets/bb9dec5421199706d294d48f86f003d8
|
237
|
+
- test/dummy/tmp/cache/assets/test/sprockets/c8a722e046ca0658031e47b6a3f6b80a
|
238
|
+
- test/dummy/tmp/cache/assets/test/sprockets/e49d90ad8c6a6ec12d0f897fe441722f
|
228
239
|
- test/dummy/tmp/cache/assets/test/sprockets/f8832e909e8abc5a5f26e98546d2f7ca
|
229
240
|
- test/integration/swipebox_integration_test.rb
|
230
241
|
- test/test_helper.rb
|