Skip to content

Commit

Permalink
merge into master
Browse files Browse the repository at this point in the history
  • Loading branch information
leongersen committed Sep 29, 2016
2 parents 7a1704c + 9000c48 commit 66c8523
Show file tree
Hide file tree
Showing 54 changed files with 1,221 additions and 901 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: node_js
node_js:
- "0.10"
before_script:
- npm install grunt-cli -g
script:
- grunt test
16 changes: 14 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ module.exports = function(grunt) {
},
files: releaseFiles
}
},
qunit: {
files: ['tests/range.html', 'tests/slider.html'],
options: {
page : {
viewportSize : { width: 1280, height: 800 }
}
}
}
});

Expand All @@ -107,7 +115,11 @@ module.exports = function(grunt) {
// https://github.com/gruntjs/grunt-contrib-compress
grunt.loadNpmTasks('grunt-contrib-compress');

// https://github.com/gruntjs/grunt-contrib-qunit
grunt.loadNpmTasks('grunt-contrib-qunit');

grunt.registerTask('default', ['concat', 'jshint']);
grunt.registerTask('create', ['concat', 'uglify', 'cssmin']);
grunt.registerTask('release', ['jshint', 'compress']);
grunt.registerTask('test', ['concat', 'jshint', 'qunit']);
grunt.registerTask('create', ['concat', 'uglify', 'cssmin', 'qunit']);
grunt.registerTask('release', ['jshint', 'compress', 'qunit']);
};
77 changes: 28 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,70 +4,49 @@ noUiSlider is lightweight JavaScript range slider, originally developed to be a

It features cross-browser support, a wide range of options and support for a bunch of touch devices. It has been tested on Android phones, iPhone & iPad, Windows phone and touch-screen laptops and tablets and desktops.

All modern browsers and [IE8+](#browser-support) are supported. The end result? A lean, extendible and bloat-less plugin that'll just do its job.
All modern browsers and [IE9+](#browser-support) are supported. noUiSlider has no dependencies!

The best part? noUiSlider has no dependencies! As of version 8, **jQuery is no longer required!**

Oh, and the licensing terms are simple: [just Do What the Fuck You Want](http://www.wtfpl.net/about/) with it.
License
-------
noUiSlider is licensed [WTFPL](http://www.wtfpl.net/about/). You can use it **for free** and **without any attribution**, in any personal or commercial project. You may also fork the project and re-release it under another license you prefer.

Documentation
-------
An extensive documentation, including **examples**, **options** and **configuration details**, is available here: [noUiSlider documentation](http://refreshless.com/nouislider/).
An extensive documentation, including **examples**, **options** and **configuration details**, is available here: [noUiSlider documentation](https://refreshless.com/nouislider/).

Changelog
---------
### 8.5.1 (latest)
- Fix: class mixup in 8.5.0 merge
- Change: position pips markers relatively

### 8.5.0
- Added: ability to completely override the classes used by the slider
- Fix: removed invalid stopPropagation loop
- Fix: source properly lints

### 8.4.0
- Fix: don't assume `window` exists. #503, #533, #617 and #628
- Fix: `:focus` style applied to wrong element. #631
- Fix: `step` option is lost on updating. #619
- Fix: exposed `options` should be the original options, not the parsed set. #607
- Added: handle animation time configurable. #629
- Added: slider values can be updated without firing `set`. #602
- Change: internal value calculations no longer limited to 7 decimals. #614

### 8.3.0
- Expose several internal features, including `options` and `pips`.
- Add a fifth argument to all events, containing the handle offsets.
- Fixed `margin: 0` throwing an error.
- Fixed `set` firing when calling `slider.noUiSlider.set` with a `null` value.
- Fix and clarify some examples

### 8.2.1
- Fixed #568 and #569

### 8.2.0
- Added 'start', 'end' and 'hover' events
- Added better tooltip formatting options
- Bugfixes, including an issue where a mouseup would be missed

### 8.1.0
- Fixed Microsoft Edge support
- Merged several pull requests containing bug fixes
- Fixed an issue where a slider handle could get 'stuck' to a mouse cursor after moving out of a window.
- Combed through code using a profiler, fixed some performance issues.
- Added support for basic tooltips.

### 8.0.0
Removed jQuery dependency! For more info and other changes, see [the release information](http://refreshless.com/nouislider/new-version).
### 9.0.0
- Added: Support for **more than 2 handles**;
- Added: `format` option can be updated (#641);
- Added: `reset` method the return slider to start values (#673);
- Change: `connect` option is now implemented as a separate node;
- Change: all event arguments, including the handle number, are now in slider order;
- Change: `updateOptions` now **modifies the original options** object. The reference in `slider.noUiSlider.options` remains up to date (#678);
- Change: more events fire when using various `behaviour` options (#664);
- Change: on `rtl` sliders, handles are now visually positioned from the sliders `right`/`bottom` edge;
- Change: events for `rtl` sliders now fire in the same order has for `ltr` sliders (with incremental handleNumbers);
- Change: internal `Spectrum` component is no longer `direction` aware;
- Change: `limit` and `margin` must be divisible by `step` (if set);
- Removed: `.noUi-stacking` class. Handles now stack themselves;
- Removed: `.noUi-handle-lower` and `.noUi-handle-upper` classes;
- Removed: `.noUi-background`. This is now default;
- Removed: `connect: 'lower'` and `connect: 'upper'`. These settings are replaced by `connect: [true, false]`;
- Fixed: default tooltip color (#687);
- Fixed: `margin` and `limit` calculated improperly after calling `updateOptions` with a new `range` option;
- Fixed: `range` option was required in update, even when not updating it (#682);
- Fixed: Cursor styling is now consistent for disable handles and sliders (#644);
- Fixed: Sliders now ignore touches when the screen is touched multiple times (#649, #663, #668);

Devices
-------

Devices/browsers tested:
- Surface Pro 3 (Windows 10)
- iPad Air 2 (iOS 9.0)
- iPad Air 2 (iOS 9.3)
- iPad 3 (iOS 8.4)
- Moto E (Android 5.1, Chrome)
- Lumia 930 (WP8.1, IE10 mobile)
- Lumia 930 (WM10, Edge)
- Asus S400C (Windows 10, Touch + mouse)
+ Chrome
+ Firefox
Expand Down
19 changes: 19 additions & 0 deletions concat.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

header('Content-Type: application/javascript');

require 'src/js/intro.js';
require 'src/js/helpers.js';
require 'src/js/constants.js';
require 'src/js/range.js';
require 'src/js/options.js';
require 'src/js/scope_start.js';
require 'src/js/structure.js';
require 'src/js/tooltips.js';
require 'src/js/pips.js';
require 'src/js/scope_helpers.js';
require 'src/js/scope_events.js';
require 'src/js/scope.js';
require 'src/js/scope_end.js';
require 'src/js/interface.js';
require 'src/js/outro.js';
3 changes: 2 additions & 1 deletion documentation/_run/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
<link href="/nouislider/documentation/assets/prism.css" rel="stylesheet">
<script src="/nouislider/documentation/assets/wNumb.js"></script>

<link href="<?php echo $distribute; ?>/nouislider.min.css" rel="stylesheet">
<link href="<?php echo $distribute; ?>/nouislider.css" rel="stylesheet">
<script src="<?php echo $distribute; ?>/nouislider.js"></script>
<?php /* <script src="/nouislider/concat.php"></script> */ ?>

</head>

Expand Down
1 change: 1 addition & 0 deletions documentation/behaviour-option/hover.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var hoverSlider = document.getElementById('hover'),
noUiSlider.create(hoverSlider, {
start: 20,
behaviour: 'hover-snap',
direction: 'rtl',
range: {
'min': 0,
'max': 10
Expand Down
2 changes: 1 addition & 1 deletion documentation/behaviour-option/snap.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ snapSlider = document.getElementById('snap');
noUiSlider.create(snapSlider, {
start: 40,
behaviour: 'snap',
connect: 'lower',
connect: [true, false],
range: {
'min': 20,
'max': 80
Expand Down
2 changes: 1 addition & 1 deletion documentation/behaviour-option/tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ tapSlider = document.getElementById('tap');
noUiSlider.create(tapSlider, {
start: 40,
behaviour: 'tap',
connect: 'upper',
connect: [false, true],
range: {
'min': 20,
'max': 80
Expand Down
47 changes: 2 additions & 45 deletions documentation/examples.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<section>
<ul>
<li><a href="#section-colorpicker">Colorpicker</a></li>
<li><a href="#section-custom-connect">Using a custom connecting bar</a></li>
<li><a href="#section-html5">Working with HTML5 input types</a></li>
<li><a href="#section-non-linear">Using non linear ranges</a></li>
<li><a href="#section-lock">Locking two sliders together</a></li>
Expand Down Expand Up @@ -79,49 +78,6 @@
</section>


<?php sect('custom-connect'); ?>
<h1>Custom connect</h1>

<section>

<div class="view">

<p>When using the <code>connect</code> option, noUiSlider paints the connecting bar in the negative space between handles. This uses one less element and has some nice performance benefits. When you need more control over the connecting option, you can create a custom connecting bar using the <code>update</code> event.</p>

<p>This custom element can be styled, or special features (like requested in <a href="https://github.com/leongersen/noUiSlider/issues/371">this issue</a>) can be implemented.</p>

<div class="example">
<div id="connect"></div>
<?php run('custom-connect-slider'); ?>
<?php run('custom-connect'); ?>
</div>
</div>

<div class="side">

<div class="viewer-header">Create the slider</div>

<div class="viewer-content">
<?php code('custom-connect-slider'); ?>
</div>


<div class="viewer-header">Create a connecting bar and bind it</div>

<div class="viewer-content">
<?php code('custom-connect'); ?>
</div>


<div class="viewer-header">CSS for the connecting bar</div>

<div class="viewer-content">
<?php loadShowCSS('custom-connect'); ?>
</div>
</div>
</section>


<?php sect('html5'); ?>
<h1>Using HTML5 input elements</h1>

Expand Down Expand Up @@ -280,7 +236,8 @@

<div class="example">
<div id="keypress"></div>
<input type="text" id="input-with-keypress">
<input type="text" id="input-with-keypress-1">
<input type="text" id="input-with-keypress-0">
<?php run('keypress-slider'); ?>
<?php run('keypress-event'); ?>
</div>
Expand Down
2 changes: 1 addition & 1 deletion documentation/examples/colorpicker-slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ for ( var i = 0; i < sliders.length; i++ ) {

noUiSlider.create(sliders[i], {
start: 127,
connect: "lower",
connect: [true, false],
orientation: "vertical",
range: {
'min': 0,
Expand Down
6 changes: 3 additions & 3 deletions documentation/examples/colorpicker.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
box-shadow: 0 0 10px;
}

#red {
#red .noUi-connect {
background: #c0392b;
}

#green {
#green .noUi-connect {
background: #27ae60;
}

#blue {
#blue .noUi-connect {
background: #2980b9;
}
10 changes: 0 additions & 10 deletions documentation/examples/custom-connect-slider.js

This file was deleted.

21 changes: 0 additions & 21 deletions documentation/examples/custom-connect.css

This file was deleted.

19 changes: 0 additions & 19 deletions documentation/examples/custom-connect.js

This file was deleted.

Loading

0 comments on commit 66c8523

Please sign in to comment.