Skip to content

Commit b090fac

Browse files
authored
Merge branch 'master' into master
2 parents c1d1265 + c4e25ec commit b090fac

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+5738
-549
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
Welcome to the Selectize bug tracker. Thank you for taking the time to
2+
make Selectize a better library!
3+
4+
Please keep in mind this repository has an important issue backlog and
5+
that maintainers have limited time to fix issues, triage, and understand
6+
them.
7+
8+
If you've never done so, please read the
9+
[guide to reporting issues](https://github.com/selectize/selectize.js/wiki/Reporting-issues-guide)
10+
in the Wiki to help us better understand your issue.
11+
12+
Place an `x` in the checklist steps (`[ ]` becomes `[x]`) to demonstrate
13+
you have done/verified all the steps you needed to do.
14+
15+
Thank you for reading this! You can now erase everything up to the
16+
following dashes, and then complete what's after.
17+
18+
ISSUES THAT EITHER:
19+
20+
* IGNORE THE ISSUE GUIDELINES
21+
* ERASE THE FOLLOWING TEMPLATE
22+
* DON'T FOLLOW THE PROPER NUMBERED FORMAT FOR STEPS TO REPRODUCE
23+
24+
COULD BE CLOSED.
25+
26+
---
27+
28+
I did:
29+
30+
* [ ] Search for if my issue has already been submitted
31+
* [ ] Make sure I'm reporting something precise that needs to be fixed
32+
* [ ] Give my issue a descriptive and concise title
33+
* [ ] Create a *minimal* working example on JsFiddle or Codepen
34+
(or gave a link to a demo on the Selectize docs)
35+
* [ ] Indicate *precise* steps to reproduce in *numbers* and the result,
36+
like below
37+
38+
[replace me with a short description of issue]
39+
40+
Steps to reproduce:
41+
42+
1.
43+
2.
44+
3.
45+
46+
Expected result:
47+
48+
Actual result:
49+
50+
[you can add explanations here of the context/what you were trying to
51+
do, and if you have findings about what the cause might be]

CHANGELOG.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<!-- Feel free to put either your handle and/or full name, according to
2+
your privacy needs -->
3+
4+
* New feature: allow to disable single options or complete optgroups
5+
6+
*@zeitiger*
7+
8+
## v0.12.3 · 24 August 2016
9+
* Make `label[for]` work after applying Selectize (#755)
10+
11+
*Barrett Sonntag* (@barretts)
12+
13+
* Output friendly error message when Microplguin is missing (#1137).
14+
Special thanks to @styxxx for proposing the improvement.
15+
16+
* Add local server command `grunt server`.
17+
18+
* Stop creating items automatically when text is pasted, only create
19+
them when pasted text contains delimiter.
20+
21+
* Fix regression 'Required fields can not be focusable' in Chrome
22+
(#733)
23+
24+
* Fix detection of Validity API, we had false negatives before.
25+
26+
*Jonathan Allard* (@joallard)
27+
28+
* Fix open keyboard bug under iOS after closing selection (#1127)
29+
30+
*@zeitiger*
31+
32+
* Fix highlighting more than one character (#1099, #1098)
33+
34+
*@skimi*
35+
36+
37+
## v0.12.2 · 23 June 2016
38+
* Fix issue preventing build ("Cannot assign to read only property
39+
'subarray'") because of bug in uglifyjs. (#1072)
40+
41+
*@jaridmargolin*
42+
43+
* Fix tabbing issue (#877) on IE11. (#997)
44+
45+
*@bwilson-ux*
46+
47+
* Fix jQuery initialization for jQuery >= 1.9 (#1045)
48+
49+
*@mpokrywka*
50+
51+
* Make `remove_button` work for single-option usage (#848)
52+
53+
*@ChoppyThing*
54+
55+
* Fixed bug that made `allowEmptyOption: true` useless (#739)
56+
57+
*@mcavalletto*
58+
59+
* Functions in option `render` can now return a DOM node in addition to
60+
text. (#617)
61+
62+
*@topaxi*

Gruntfile.js

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ module.exports = function(grunt) {
55
grunt.loadNpmTasks('grunt-contrib-uglify');
66
grunt.loadNpmTasks('grunt-contrib-concat');
77
grunt.loadNpmTasks('grunt-contrib-clean');
8+
grunt.loadNpmTasks('grunt-contrib-connect');
89
grunt.loadNpmTasks('grunt-contrib-copy');
910
grunt.loadNpmTasks('grunt-contrib-less');
11+
grunt.loadNpmTasks('grunt-contrib-watch');
1012
grunt.loadNpmTasks('grunt-replace');
1113

1214
grunt.registerTask('configure', [
@@ -33,6 +35,11 @@ module.exports = function(grunt) {
3335
'compile'
3436
]);
3537

38+
grunt.registerTask('serve', [
39+
'connect',
40+
'watch'
41+
])
42+
3643
grunt.registerTask('clean_bootstrap2_css', 'Cleans CSS rules ocurring before the header comment.', function() {
3744
var file = 'dist/css/selectize.bootstrap2.css';
3845
var source = fs.readFileSync(file, 'utf8');
@@ -76,8 +83,8 @@ module.exports = function(grunt) {
7683
];
7784

7885
var files_js_dependencies = [
79-
'bower_components/sifter/sifter.js',
80-
'bower_components/microplugin/src/microplugin.js',
86+
'node_modules/sifter/sifter.js',
87+
'node_modules/microplugin/src/microplugin.js',
8188
];
8289

8390
var less_imports = [];
@@ -105,7 +112,7 @@ module.exports = function(grunt) {
105112
})();
106113

107114
grunt.initConfig({
108-
pkg: grunt.file.readJSON('bower.json'),
115+
pkg: grunt.file.readJSON('package.json'),
109116
bower: {
110117
install: {
111118
options: {
@@ -202,10 +209,13 @@ module.exports = function(grunt) {
202209
}
203210
}
204211
},
212+
connect: {
213+
keepalive: true
214+
},
205215
uglify: {
206216
main: {
207217
options: {
208-
'banner': '/*! selectize.js - v<%= pkg.version %> | https://github.com/brianreavis/selectize.js | Apache License (v2) */\n',
218+
'banner': '/*! selectize.js - v<%= pkg.version %> | https://github.com/selectize/selectize.js | Apache License (v2) */\n',
209219
'report': 'gzip',
210220
'ascii-only': true
211221
},
@@ -214,6 +224,15 @@ module.exports = function(grunt) {
214224
'dist/js/standalone/selectize.min.js': ['dist/js/standalone/selectize.js']
215225
}
216226
}
227+
},
228+
watch: {
229+
files: [
230+
'src/**/*.js'
231+
],
232+
tasks: [
233+
'concat:js',
234+
'build_standalone'
235+
]
217236
}
218237
});
219-
};
238+
};

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ ifeq ($(strip $(version)),)
1313
@echo "\033[1;30mmake release version=1.0.0\033[0;39m"
1414
else
1515
sed -i.bak 's/"version": "[^"]*"/"version": "$(version)"/' selectize.jquery.json
16-
sed -i.bak 's/"version": "[^"]*"/"version": "$(version)"/' bower.json
1716
sed -i.bak 's/"version": "[^"]*"/"version": "$(version)"/' package.json
1817
rm *.bak
1918
make compile
@@ -31,4 +30,4 @@ else
3130
git push origin gh-pages
3231
git checkout master
3332
@echo "\033[32mv${version} released\033[0;39m"
34-
endif
33+
endif

README.md

Lines changed: 57 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
[**Selectize needs your help. I'm looking for maintainers!**](https://github.com/brianreavis/selectize.js/issues/752)
1+
Selectize is looking for [new members on the maintenance team](https://github.com/selectize/selectize.js/issues/752)!
22

33
# selectize.js
44

55
[![NPM version](http://img.shields.io/npm/v/selectize.svg?style=flat)](https://www.npmjs.org/package/selectize)
6-
![Bower version](http://img.shields.io/bower/v/selectize.svg?style=flat)
7-
[![Build Status](http://img.shields.io/travis/brianreavis/selectize.js/master.svg?style=flat)](https://travis-ci.org/brianreavis/selectize.js)
8-
[![Coverage Status](http://img.shields.io/coveralls/brianreavis/selectize.js/master.svg?style=flat)](https://coveralls.io/r/brianreavis/selectize.js)
6+
[![CDNJS version](http://img.shields.io/cdnjs/v/selectize.js.svg?style=flat)](https://cdnjs.com/libraries/selectize.js)
7+
[![Build Status](http://img.shields.io/travis/selectize/selectize.js/master.svg?style=flat)](https://travis-ci.org/selectize/selectize.js)
8+
[![Coverage Status](http://img.shields.io/coveralls/selectize/selectize.js/master.svg?style=flat)](https://coveralls.io/r/selectize/selectize.js)
99

1010
Selectize is an extensible [jQuery](http://jquery.com/)-based custom &lt;select&gt; UI control. It's useful for tagging, contact lists, country selectors, and so on. It clocks in at around ~7kb (gzipped). The goal is to provide a solid & usable experience with a clean and powerful API.
1111

12-
- [Demos](http://brianreavis.github.io/selectize.js/)
13-
- [Changelog](https://github.com/brianreavis/selectize.js/releases)
12+
- [Demos](http://selectize.github.io/selectize.js/)
13+
- [Changelog](https://github.com/selectize/selectize.js/releases)
1414
- [Examples](examples/)
1515
- [Usage Documentation](docs/usage.md)
1616
- [API Documentation](docs/api.md)
@@ -35,9 +35,17 @@ Selectize is an extensible [jQuery](http://jquery.com/)-based custom &lt;select&
3535
- [sifter](https://github.com/brianreavis/sifter.js) (bundled in ["standalone" build](dist/js/standalone))
3636
- [microplugin](https://github.com/brianreavis/microplugin.js) (bundled in ["standalone" build](dist/js/standalone))
3737

38-
### Files
38+
### Installation and files
3939

40-
All pre-built files needed to use Selectize can be found in the ["dist"](dist/) folder.
40+
All pre-built files needed to use Selectize can be found in the
41+
["dist"](dist/) folder.
42+
43+
If you're looking to get started with minimal fuss, include
44+
`standalone/selectize.min.js` (bundles Sifter and Microplugin
45+
dependencies – also available un-minifed for debugging, just remove the
46+
`.min` part) and `css/selectize.default.css`.
47+
48+
Selectize is available at [cdnjs](https://cdnjs.com/libraries/selectize.js).
4149

4250
- [**js/**](dist/js)
4351
- [**standalone/**](dist/js/standalone)
@@ -86,8 +94,34 @@ grunt --plugins=remove_button,restore_on_backspace
8694
```
8795

8896
### Contributing
97+
When issuing a pull request:
98+
99+
* please **do not include/commit changes in the `dist/` folder** to avoid
100+
merge conflicts. A good way to include the right files is to use
101+
`git gui` or `git add` when committing to select the files you want to
102+
add to your commit.
103+
104+
* please **include tests** with your feature so that we're not tempted to
105+
break it in the future!
106+
107+
Add an entry to the top of the CHANGELOG, and update the documentation
108+
in `docs/` as needed. (Refactors and documentation changes don't need a
109+
changelog entry.)
110+
111+
Squash your commits together in one or a few complete, logical commits,
112+
with a concise and descriptive message. One commit means one
113+
feature/bugfix/thing that has changed, or a diff bringing the code one
114+
step forward to a better, working state.
115+
116+
Once your commit is nice and clean, and you want to *discard the other
117+
changes*, you can use `git checkout .` (that will erase changes to
118+
tracked files) and `git clean [-i/--interactive]` (to erase untracked
119+
files). **However, be careful with those commands, as their function
120+
is to erase things/changes.**
89121

90-
When issuing a pull request, *please exclude changes in the "dist" folder to avoid merge conflicts*. Also, please ensure all the tests pass:
122+
123+
#### Tests
124+
Please ensure all the tests pass:
91125

92126
```sh
93127
$ npm test # phantomjs
@@ -96,9 +130,22 @@ $ BROWSERS=Firefox,Chrome npm test
96130
$ BROWSERS=Firefox,Chrome,Safari npm test
97131
```
98132

133+
#### Local environment
134+
To run Selectize locally:
135+
136+
```sh
137+
$ npm start
138+
```
139+
140+
You can then run the examples in `http://localhost:8000/examples/`.
141+
142+
However, be careful not to add the `dist/` files in your commit, as
143+
Grunt automatically regenerates the files in `dist/` as the source is
144+
changed.
145+
99146
## License
100147

101-
Copyright &copy; 2013–2015 [Brian Reavis](http://twitter.com/brianreavis) & [Contributors](https://github.com/brianreavis/selectize.js/graphs/contributors)
148+
Copyright &copy; 2013–2016 [Brian Reavis](http://twitter.com/brianreavis) & [Contributors](https://github.com/selectize/selectize.js/graphs/contributors)
102149

103150
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0
104151

bower.json

Lines changed: 46 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,48 @@
11
{
2-
"name": "selectize",
3-
"keywords": ["select", "ui", "form", "input", "control", "autocomplete", "tagging", "tag"],
4-
"description": "Selectize is a jQuery-based custom <select> UI control. Useful for tagging, contact lists, country selectors, etc.",
5-
"version": "0.12.1",
6-
"license": "Apache License, Version 2.0",
7-
"readmeFilename": "README.md",
8-
"repository": {
9-
"type": "git",
10-
"url": "git://github.com/brianreavis/selectize.js.git"
11-
},
12-
"main": [
13-
"dist/css/selectize.css",
14-
"dist/js/selectize.js"
15-
],
16-
"ignore": [
17-
"Makefile",
18-
"Gruntfile.js",
19-
"examples",
20-
"node_modules",
21-
"bower_components",
22-
"docs",
23-
"src",
24-
"test",
25-
".travis.yml",
26-
"testem.json",
27-
"selectize.jquery.json",
28-
"*.sh",
29-
"package.json"
30-
],
31-
"dependencies": {
32-
"jquery": ">=1.7.0",
33-
"sifter": "0.4.x",
34-
"microplugin": "0.0.x"
35-
},
36-
"devDependencies": {
37-
"bootstrap2": "bootstrap#2",
38-
"bootstrap3": "bootstrap#3.2"
39-
}
2+
"name": "selectize",
3+
"keywords": [
4+
"select",
5+
"ui",
6+
"form",
7+
"input",
8+
"control",
9+
"autocomplete",
10+
"tagging",
11+
"tag"
12+
],
13+
"description": "Selectize is a jQuery-based custom <select> UI control. Useful for tagging, contact lists, country selectors, etc.",
14+
"license": "Apache License, Version 2.0",
15+
"readmeFilename": "README.md",
16+
"repository": {
17+
"type": "git",
18+
"url": "git://github.com/selectize/selectize.js.git"
19+
},
20+
"main": [
21+
"dist/css/selectize.css",
22+
"dist/js/selectize.js"
23+
],
24+
"ignore": [
25+
"Makefile",
26+
"Gruntfile.js",
27+
"examples",
28+
"node_modules",
29+
"bower_components",
30+
"docs",
31+
"src",
32+
"test",
33+
".travis.yml",
34+
"testem.json",
35+
"selectize.jquery.json",
36+
"*.sh",
37+
"package.json"
38+
],
39+
"dependencies": {
40+
"jquery": ">=1.7.0",
41+
"microplugin": "0.0.x",
42+
"sifter": "0.5.x"
43+
},
44+
"devDependencies": {
45+
"bootstrap2": "bootstrap#2",
46+
"bootstrap3": "bootstrap#3.2"
47+
}
4048
}

0 commit comments

Comments
 (0)