rangesliderjs-rails 2.0.5 → 2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 391f8cf7a352ad36aa054a39f6828246fc65e2a9
4
- data.tar.gz: b40ff927b68dd03a7abfc7c58f188488c179c253
3
+ metadata.gz: c3bfe7e4b6987855dc4c0661496d0aea6c815605
4
+ data.tar.gz: c52d0a75b1bbaf1f5d63d13be1a19dc8372dc562
5
5
  SHA512:
6
- metadata.gz: b453f40b8a053db28692218b3f59f71e1beb2e0320b27b3c730a253d951f91a037c870edcd0246b88b5cad1528064ee1ae8ec54f5622dce76cd36e7e214a6bfb
7
- data.tar.gz: 6524909408559151d794f727c3425d85849f28fb0abe0bbdee74879110cc5831b98997b5d751d9136246d88eddb8fd363a91b870ac4e19750ba7a82bd1721b2c
6
+ metadata.gz: 7f971808496104592423cf3b780bef36f778989e711dabce28bedac395613d71f876ecd0064e66da0dfb7c18b5846335687e63f04641a9cfa9e2e0088ddbc6d3
7
+ data.tar.gz: 90433c75f2509c4180ce747b95dc37f58390290f0acbf5be2bb994bf20925f6a26d9dd46fdcc5924197126d3285af5d2f3cf82de9f240c1c0a512d4d28e39364
@@ -1,5 +1,5 @@
1
1
  module Rangesliderjs
2
2
  module Rails
3
- VERSION = "2.0.5"
3
+ VERSION = "2.3.0"
4
4
  end
5
5
  end
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.summary = %q{rangeslider.js packaged for the rails assets pipeline.}
13
13
  spec.description = %q{Simple, small and fast JavaScript/jQuery polyfill for the HTML5 <input type="range"> slider element.}
14
- spec.homepage = "https://github.com/ilja/rangesliderjs-rails."
14
+ spec.homepage = "https://github.com/ilja/rangesliderjs-rails"
15
15
  spec.license = "MIT"
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
@@ -1,4 +1,4 @@
1
- /*! rangeslider.js - v2.0.5 | (c) 2015 @andreruffert | MIT license | https://github.com/andreruffert/rangeslider.js */
1
+ /*! rangeslider.js - v2.3.0 | (c) 2016 @andreruffert | MIT license | https://github.com/andreruffert/rangeslider.js */
2
2
  (function(factory) {
3
3
  'use strict';
4
4
 
@@ -39,6 +39,7 @@
39
39
  orientation: 'horizontal',
40
40
  rangeClass: 'rangeslider',
41
41
  disabledClass: 'rangeslider--disabled',
42
+ activeClass: 'rangeslider--active',
42
43
  horizontalClass: 'rangeslider--horizontal',
43
44
  verticalClass: 'rangeslider--vertical',
44
45
  fillClass: 'rangeslider__fill',
@@ -263,7 +264,7 @@
263
264
  var _this = this;
264
265
  this.$window.on('resize.' + this.identifier, debounce(function() {
265
266
  // Simulate resizeEnd event.
266
- delay(function() { _this.update(); }, 300);
267
+ delay(function() { _this.update(false, false); }, 300);
267
268
  }, 20));
268
269
 
269
270
  this.$document.on(this.startEvent, '#' + this.identifier + ':not(.' + this.options.disabledClass + ')', this.handleDown);
@@ -315,9 +316,14 @@
315
316
  };
316
317
 
317
318
  Plugin.prototype.handleDown = function(e) {
319
+ e.preventDefault();
318
320
  this.$document.on(this.moveEvent, this.handleMove);
319
321
  this.$document.on(this.endEvent, this.handleEnd);
320
322
 
323
+ // add active class because Firefox is ignoring
324
+ // the handle:active pseudo selector because of `e.preventDefault();`
325
+ this.$range.addClass(this.options.activeClass);
326
+
321
327
  // If we click on the handle don't set the new position
322
328
  if ((' ' + e.target.className + ' ').replace(/[\n\t]/g, ' ').indexOf(this.options.handleClass) > -1) {
323
329
  return;
@@ -347,6 +353,8 @@
347
353
  this.$document.off(this.moveEvent, this.handleMove);
348
354
  this.$document.off(this.endEvent, this.handleEnd);
349
355
 
356
+ this.$range.removeClass(this.options.activeClass);
357
+
350
358
  // Ok we're done fire the change event
351
359
  this.$element.trigger('change', { origin: this.identifier });
352
360
 
@@ -402,13 +410,14 @@
402
410
  rangePos = this.$range[0].getBoundingClientRect()[this.DIRECTION],
403
411
  pageCoordinate = 0;
404
412
 
405
- if (typeof e['page' + ucCoordinate] !== 'undefined') {
406
- pageCoordinate = e['client' + ucCoordinate];
407
- }
408
- else if (typeof e.originalEvent['client' + ucCoordinate] !== 'undefined') {
413
+ if (typeof e.originalEvent['client' + ucCoordinate] !== 'undefined') {
409
414
  pageCoordinate = e.originalEvent['client' + ucCoordinate];
410
415
  }
411
- else if (e.originalEvent.touches && e.originalEvent.touches[0] && typeof e.originalEvent.touches[0]['client' + ucCoordinate] !== 'undefined') {
416
+ else if (
417
+ e.originalEvent.touches &&
418
+ e.originalEvent.touches[0] &&
419
+ typeof e.originalEvent.touches[0]['client' + ucCoordinate] !== 'undefined'
420
+ ) {
412
421
  pageCoordinate = e.originalEvent.touches[0]['client' + ucCoordinate];
413
422
  }
414
423
  else if(e.currentPoint && typeof e.currentPoint[this.COORDINATE] !== 'undefined') {
@@ -480,4 +489,6 @@
480
489
  });
481
490
  };
482
491
 
492
+ return 'rangeslider.js is available in jQuery context e.g $(selector).rangeslider(options);';
493
+
483
494
  }));
@@ -85,7 +85,7 @@
85
85
  -webkit-border-radius: 50%;
86
86
  border-radius: 50%;
87
87
  }
88
- .rangeslider__handle:active {
88
+ .rangeslider__handle:active, .rangeslider--active .rangeslider__handle {
89
89
  background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjEiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMC4xMiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
90
90
  background-size: 100%;
91
91
  background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(0, 0, 0, 0.1)), color-stop(100%, rgba(0, 0, 0, 0.12)));
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rangesliderjs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilja Krijger
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-12-22 00:00:00.000000000 Z
11
+ date: 2017-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.8'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.8'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  description: Simple, small and fast JavaScript/jQuery polyfill for the HTML5 <input
@@ -46,7 +46,7 @@ executables: []
46
46
  extensions: []
47
47
  extra_rdoc_files: []
48
48
  files:
49
- - ".gitignore"
49
+ - .gitignore
50
50
  - Gemfile
51
51
  - LICENSE.md
52
52
  - README.md
@@ -56,7 +56,7 @@ files:
56
56
  - rangesliderjs-rails.gemspec
57
57
  - vendor/assets/javascripts/rangeslider.js
58
58
  - vendor/assets/stylesheets/rangeslider.css
59
- homepage: https://github.com/ilja/rangesliderjs-rails.
59
+ homepage: https://github.com/ilja/rangesliderjs-rails
60
60
  licenses:
61
61
  - MIT
62
62
  metadata: {}
@@ -66,19 +66,18 @@ require_paths:
66
66
  - lib
67
67
  required_ruby_version: !ruby/object:Gem::Requirement
68
68
  requirements:
69
- - - ">="
69
+ - - '>='
70
70
  - !ruby/object:Gem::Version
71
71
  version: '0'
72
72
  required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ">="
74
+ - - '>='
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
78
  rubyforge_project:
79
- rubygems_version: 2.2.2
79
+ rubygems_version: 2.0.14.1
80
80
  signing_key:
81
81
  specification_version: 4
82
82
  summary: rangeslider.js packaged for the rails assets pipeline.
83
83
  test_files: []
84
- has_rdoc: