Skip to content
This repository was archived by the owner on Jan 28, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"modernizr": "~2.8.3",
"retina.js": "~1.3.0",
"react": "0.13.3",
"react-addons": "0.1.2"
"react-addons": "0.1.2",
"select2": "~4.0.0",
"select2-bootstrap-theme": "~0.1.0-beta.4"
}
}
30 changes: 30 additions & 0 deletions ui/static/bower/select2-bootstrap-theme/.bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "select2-bootstrap-theme",
"version": "0.1.0-beta.4",
"main": [
"dist/select2-bootstrap.css",
"dist/select2-bootstrap.min.css"
],
"ignore": [
"**/.*",
"node_modules",
"components"
],
"devDependencies": {
"bootstrap": "~3.3.5",
"bootstrap-sass-official": "~3.3.5",
"respond": "~1.4.2",
"anchor-js": "~1.1.1"
},
"homepage": "https://github.com/fk/select2-bootstrap-theme",
"_release": "0.1.0-beta.4",
"_resolution": {
"type": "version",
"tag": "0.1.0-beta.4",
"commit": "2fe20fd58120bf323fb6846d99ca91e6dbf11109"
},
"_source": "git://github.com/fk/select2-bootstrap-theme.git",
"_target": "~0.1.0-beta.4",
"_originalSource": "select2-bootstrap-theme",
"_direct": true
}
128 changes: 128 additions & 0 deletions ui/static/bower/select2-bootstrap-theme/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
module.exports = function(grunt) {
// Load all grunt tasks.
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

// Project configuration.
grunt.initConfig({
nodeunit: {
all: ['tests/*_test.js']
},

sass: {
options: {
style: 'expanded',
sourcemap: 'none',
// Increase Sass' default (5) precision to 9 to match Less output.
//
// @see https://github.com/twbs/bootstrap-sass#sass-number-precision
// @see https://github.com/sass/node-sass/issues/673#issue-57581701
// @see https://github.com/sass/sass/issues/1122
precision: 9
},
dist: {
files: {
'docs/css/select2-bootstrap.css': 'src/build.scss',
'dist/select2-bootstrap.css': 'src/build.scss'
}
},
test: {
files: {
'tmp/select2-bootstrap.css': 'src/build.scss'
}
}
},

cssmin: {
target: {
files: {
'dist/select2-bootstrap.min.css': 'dist/select2-bootstrap.css'
}
}
},

jshint: {
all: ['Gruntfile.js', '*.json']
},

bump: {
options: {
files: [
'package.json',
'bower.json'
],
push: false,
createTag: false
}
},

copy: {
main: {
files: [
{
src: 'bower_components/bootstrap/dist/css/bootstrap.min.css',
dest: 'docs/css/bootstrap.min.css',
expand: false
},
{
src: 'bower_components/bootstrap/dist/js/bootstrap.min.js',
dest: 'docs/js/bootstrap.min.js',
expand: false
},
{
src: 'bower_components/respond/dest/respond.min.js',
dest: 'docs/js/respond.min.js',
expand: false
},
{
cwd: 'bower_components/bootstrap/dist/fonts',
src: ['**/*'],
dest: 'docs/fonts',
expand: true
},
{
src: 'bower_components/anchor-js/anchor.min.js',
dest: 'docs/js/anchor.min.js',
expand: false
}
]
}
},

'gh-pages': {
options: {
base: 'docs/_site',
message: 'Update gh-pages.'
},
src: ['**/*']
},

jekyll: {
options: {
src: 'docs',
dest: 'docs/_site',
sourcemaps: false
},
build: {
d: null
},
serve: {
options: {
serve: true,
watch: true
}
}
},

watch: {
files: 'src/select2-bootstrap.scss',
tasks: ['sass'],
options: {
livereload: true
}
}
});

// Default tasks.
grunt.registerTask('build', ['sass', 'cssmin', 'copy', 'jekyll:build']);
grunt.registerTask('serve', ['jekyll:serve']);
};
21 changes: 21 additions & 0 deletions ui/static/bower/select2-bootstrap-theme/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2012-2015 Florian Kissling and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
58 changes: 58 additions & 0 deletions ui/static/bower/select2-bootstrap-theme/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
A Select2 v4 [Theme](https://select2.github.io/examples.html#themes) for Bootstrap 3

**Note: Work in progress – depending on your use case, select2-bootstrap-theme might not be production-ready yet!**

Demonstrations available at
http://select2.github.io/select2-bootstrap-theme/

Tested with Bootstrap v3.3.5 and Select2 v4.0.0
in latest Chrome.

##### Installation

The Select2 Bootstrap Theme only works with Select2 v4.x. Applying the theme requires `select2-bootstrap.css` referenced after the default `select2.css` that comes with Select2:

<link rel="stylesheet" href="select2.css">
<link rel="stylesheet" href="select2-bootstrap.css">

To apply the theme, tell Select2 to do so by passing `bootstrap` to the [`theme`](https://select2.github.io/examples.html#themes) option when initializing Select2:

$( "#dropdown" ).select2({
theme: "bootstrap"
});

##### Changelog

###### 0.1.0-beta.4

* Added missing styles for `.select2-container--focus`. [[#18](https://github.com/select2/select2-bootstrap-theme/issues/18)]
* Added support for Bootstrap's [`.form-inline`](http://getbootstrap.com/css/#forms-inline). [[#13](https://github.com/select2/select2-bootstrap-theme/pull/13)]
* Added basic styles for `.select2-selection__clear` in `.select2-selection--multiple`. [[#11](https://github.com/select2/select2-bootstrap-theme/issues/11)]
* Brought Less source in line with the Sass version and fixed Less patch file and test. [[`3e86f34](https://github.com/select2/select2-bootstrap-theme/commit/3e86f34f6c94302cd8b4d6c3d751c5fb70fe61f6)]

###### 0.1.0-beta.3

* Fixed specifity problems with `.form-control.select2-hidden-accessible`.

###### 0.1.0-beta.2

* Added Less version.

###### 0.1.0-beta.1

##### Contributing

The project offers [Less](http://lesscss.org/) and [Sass](http://sass-lang.com/) sources for building `select2-bootstrap.css`; both make use of variables from either [Bootstrap](https://github.com/twbs/bootstrap) (Less) or [Bootstrap for Sass](https://github.com/twbs/bootstrap-sass). The demo pages are built using [Jekyll](http://jekyllrb.com/) and there are a bunch of [Grunt](http://gruntjs.com/) tasks to ease development.

With [Ruby](https://www.ruby-lang.org/en/downloads/) and [RubyGems](http://rubygems.org/pages/download), [Jekyll](http://jekyllrb.com/), [Bower](http://bower.io/), [node.js](http://nodejs.org/), [Less](http://lesscss.org/) and [Sass](http://sass-lang.com/) installed, run

npm install && bower install

to install all necessary development dependencies.

* `grunt copy` copies assets from `components` to `_jekyll` – use this in case a new version of Twitter Bootstrap or Select2 are out and need to be tested
* `grunt build` builds `docs`
* `grunt serve` builds `docs` and serves them via Jekyll's `--watch` flag on http://localhost:4000
* `grunt watch` watches for changes in `src/select2-bootstrap.scss` ([livereload](https://github.com/gruntjs/grunt-contrib-watch#optionslivereload) is enabled)

Develop in `src/select2-bootstrap.scss` and test your changes using `grunt watch` and `grunt serve`. Ideally, port your changes to `lib/select2-bootstrap.less` and make sure tests are passing to verify that Less and Sass compile down to the target CSS via `npm test`.
19 changes: 19 additions & 0 deletions ui/static/bower/select2-bootstrap-theme/bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "select2-bootstrap-theme",
"version": "0.1.0-beta.4",
"main": [
"dist/select2-bootstrap.css",
"dist/select2-bootstrap.min.css"
],
"ignore": [
"**/.*",
"node_modules",
"components"
],
"devDependencies": {
"bootstrap": "~3.3.5",
"bootstrap-sass-official": "~3.3.5",
"respond": "~1.4.2",
"anchor-js": "~1.1.1"
}
}
Loading