deployment ready

This commit is contained in:
Rohit
2019-06-07 01:50:06 -04:00
parent 28f9d5041d
commit 622b0d9490
51 changed files with 25784 additions and 181 deletions

View File

@@ -0,0 +1,38 @@
{
"name": "microplugin",
"keywords": [
"extensibility",
"plugins",
"architecture",
"require",
"dependencies"
],
"description": "A lightweight plugin / dependency system for javascript libraries.",
"version": "0.0.3",
"license": "Apache License, Version 2.0",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/brianreavis/microplugin.js.git"
},
"main": [
"src/microplugin.js"
],
"ignore": [
"Makefile",
"test",
".travis.yml",
".npmignore.yml"
],
"dependencies": {},
"homepage": "https://github.com/brianreavis/microplugin.js",
"_release": "0.0.3",
"_resolution": {
"type": "version",
"tag": "v0.0.3",
"commit": "d8671e6cc769938648f8735610534427cdeeaf67"
},
"_source": "https://github.com/brianreavis/microplugin.js.git",
"_target": "0.0.x",
"_originalSource": "microplugin"
}

View File

@@ -0,0 +1,2 @@
.DS_store
node_modules

View File

@@ -0,0 +1,3 @@
*.md
.git*
test/

115
bower_components/microplugin/README.md vendored Normal file
View File

@@ -0,0 +1,115 @@
# microplugin.js
[![NPM version](https://badge.fury.io/js/microplugin.png)](http://badge.fury.io/js/microplugin)
[![Build Status](https://travis-ci.org/brianreavis/microplugin.js.png?branch=master)](https://travis-ci.org/brianreavis/microplugin.js)
*Keep code modularized & extensible.* MicroPlugin is a lightweight drop-in plugin architecture for your JavaScript library. Plugins can [declare dependencies](#dependencies) to other plugins and can be [initialized with options](#loading-plugins) (in a variety of formats). It [AMD](http://en.wikipedia.org/wiki/Asynchronous_module_definition)-compatible and it works identically in Node.js and in a browser.
```sh
$ npm install microplugin
$ bower install microplugin
```
## Integration
Using the provided mixin, extend your function with the [API](#mixin-methods) for declaring and loading plugins:
```js
var TextEditor = function(options) {
this.initializePlugins(options.plugins);
};
MicroPlugin.mixin(TextEditor);
```
That's it for integration! Now you can selectively load the plugins on an instance-by-instance basis.
```js
var editor = new TextEditor({
plugins: ['links','images']
});
```
### Loading Plugins
The [`initializePlugins()`](#prototypeinitializepluginsplugins) method sets up the plugin system and loads a list of plugins (with options). It accepts the list in three styles, depending on your preference.
#### List (no options)
```js
["plugin_a","plugin_b","plugin_c"]
```
#### List (with options)
```js
[
{name: "plugin_a", options: { /* ... */ }},
{name: "plugin_b", options: { /* ... */ }},
{name: "plugin_c", options: { /* ... */ }}
]
```
#### Hash (with options)
```js
{
"plugin_a": { /* ... */ },
"plugin_b": { /* ... */ },
"plugin_c": { /* ... */ }
}
```
## Plugin Design
Plugins aren't extravagant—they are barebones by design. A plugin is simply a function that gets called when an instance of your object is being constructed. Within that function, you can manually override methods, set up event listeners, etc. The `this` context will be the instance of your object.
### Defining Plugins
```js
MyLibrary.define("math", function(options) {
// You can return values which will be available to other plugins
// when they load the plugin via "require()". Explained more in
// the next section.
return {
random : Math.random,
sqrt : Math.sqrt,
sin2 : function(t) { return Math.pow(Math.sin(t), 2); },
cos2 : function(t) { return Math.pow(Math.sin(t), 2); }
};
});
```
#### Dependencies
Plugins can declare dependencies to other plugins (and use any exports they provide) through the [`require`](#prototyperequirename) function.
```js
MyLibrary.define("calculations", function(options) {
var math = this.require("math");
var theta = math.random();
var success = math.sqrt(math.sin2(theta) + math.cos2(theta)) === 1;
alert("Does the law of sines work? " + success);
});
```
## API Reference
#### MicroPlugin.mixin(fn)
Sets up all methods on the function and its prototype for defining and loading plugins.
### Mixin Methods
#### define(name, fn)
Declares a new plugin with the specified name.
#### [prototype].require(name)
Loads a plugin as a dependency and returns whatever it exports (if anything).
#### [prototype].initializePlugins(plugins)
Initializes the plugin system and loads a list of plugins with the provided options. The "plugins" argument can be in a [variety of formats](#loading-plugins).
## License
Copyright © 2013 [Brian Reavis](http://twitter.com/brianreavis) & [Contributors](https://github.com/brianreavis/microplugin.js/graphs/contributors)
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
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

22
bower_components/microplugin/bower.json vendored Normal file
View File

@@ -0,0 +1,22 @@
{
"name": "microplugin",
"keywords": ["extensibility","plugins","architecture","require","dependencies"],
"description": "A lightweight plugin / dependency system for javascript libraries.",
"version": "0.0.3",
"license": "Apache License, Version 2.0",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/brianreavis/microplugin.js.git"
},
"main": [
"src/microplugin.js"
],
"ignore": [
"Makefile",
"test",
".travis.yml",
".npmignore.yml"
],
"dependencies": {}
}

View File

@@ -0,0 +1,15 @@
{
"name": "microplugin",
"keywords": ["extensibility","plugins","architecture","require","dependencies"],
"description": "A lightweight plugin / dependency system for javascript libraries.",
"version": "0.0.3",
"author": "Brian Reavis <brian@thirdroute.com>",
"main": "src/microplugin.js",
"repository": {
"type": "git",
"url": "git://github.com/brianreavis/microplugin.js.git"
},
"dependencies": {},
"devDependencies": {},
"engines": {"node": "*"}
}

View File

@@ -0,0 +1,135 @@
/**
* microplugin.js
* Copyright (c) 2013 Brian Reavis & contributors
*
* 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
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
* @author Brian Reavis <brian@thirdroute.com>
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define(factory);
} else if (typeof exports === 'object') {
module.exports = factory();
} else {
root.MicroPlugin = factory();
}
}(this, function() {
var MicroPlugin = {};
MicroPlugin.mixin = function(Interface) {
Interface.plugins = {};
/**
* Initializes the listed plugins (with options).
* Acceptable formats:
*
* List (without options):
* ['a', 'b', 'c']
*
* List (with options):
* [{'name': 'a', options: {}}, {'name': 'b', options: {}}]
*
* Hash (with options):
* {'a': { ... }, 'b': { ... }, 'c': { ... }}
*
* @param {mixed} plugins
*/
Interface.prototype.initializePlugins = function(plugins) {
var i, n, key;
var self = this;
var queue = [];
self.plugins = {
names : [],
settings : {},
requested : {},
loaded : {}
};
if (utils.isArray(plugins)) {
for (i = 0, n = plugins.length; i < n; i++) {
if (typeof plugins[i] === 'string') {
queue.push(plugins[i]);
} else {
self.plugins.settings[plugins[i].name] = plugins[i].options;
queue.push(plugins[i].name);
}
}
} else if (plugins) {
for (key in plugins) {
if (plugins.hasOwnProperty(key)) {
self.plugins.settings[key] = plugins[key];
queue.push(key);
}
}
}
while (queue.length) {
self.require(queue.shift());
}
};
Interface.prototype.loadPlugin = function(name) {
var self = this;
var plugins = self.plugins;
var plugin = Interface.plugins[name];
if (!Interface.plugins.hasOwnProperty(name)) {
throw new Error('Unable to find "' + name + '" plugin');
}
plugins.requested[name] = true;
plugins.loaded[name] = plugin.fn.apply(self, [self.plugins.settings[name] || {}]);
plugins.names.push(name);
};
/**
* Initializes a plugin.
*
* @param {string} name
*/
Interface.prototype.require = function(name) {
var self = this;
var plugins = self.plugins;
if (!self.plugins.loaded.hasOwnProperty(name)) {
if (plugins.requested[name]) {
throw new Error('Plugin has circular dependency ("' + name + '")');
}
self.loadPlugin(name);
}
return plugins.loaded[name];
};
/**
* Registers a plugin.
*
* @param {string} name
* @param {function} fn
*/
Interface.define = function(name, fn) {
Interface.plugins[name] = {
'name' : name,
'fn' : fn
};
};
};
var utils = {
isArray: Array.isArray || function(vArg) {
return Object.prototype.toString.call(vArg) === '[object Array]';
}
};
return MicroPlugin;
}));

60
bower_components/selectize/.bower.json vendored Normal file
View File

@@ -0,0 +1,60 @@
{
"name": "selectize",
"keywords": [
"select",
"ui",
"form",
"input",
"control",
"autocomplete",
"tagging",
"tag"
],
"description": "Selectize is a jQuery-based custom <select> UI control. Useful for tagging, contact lists, country selectors, etc.",
"license": "Apache License, Version 2.0",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/selectize/selectize.js.git"
},
"main": [
"dist/css/selectize.css",
"dist/js/selectize.js"
],
"ignore": [
"Makefile",
"Gruntfile.js",
"examples",
"node_modules",
"bower_components",
"docs",
"src",
"test",
".travis.yml",
"testem.json",
"selectize.jquery.json",
"*.sh",
"package.json"
],
"dependencies": {
"jquery": ">=1.7.0",
"microplugin": "0.0.x",
"sifter": "0.5.x"
},
"devDependencies": {
"bootstrap2": "bootstrap#2",
"bootstrap3": "bootstrap#3.2"
},
"homepage": "https://github.com/selectize/selectize.js",
"version": "0.12.6",
"_release": "0.12.6",
"_resolution": {
"type": "version",
"tag": "v0.12.6",
"commit": "eb0fca364f9bd6864ae197ea58c853f2717052a9"
},
"_source": "https://github.com/selectize/selectize.js.git",
"_target": "^0.12.6",
"_originalSource": "selectize",
"_direct": true
}

3
bower_components/selectize/.bowerrc vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"registry": "https://registry.bower.io"
}

View File

@@ -0,0 +1,51 @@
Welcome to the Selectize bug tracker. Thank you for taking the time to
make Selectize a better library!
Please keep in mind this repository has an important issue backlog and
that maintainers have limited time to fix issues, triage, and understand
them.
If you've never done so, please read the
[guide to reporting issues](https://github.com/selectize/selectize.js/wiki/Reporting-issues-guide)
in the Wiki to help us better understand your issue.
Place an `x` in the checklist steps (`[ ]` becomes `[x]`) to demonstrate
you have done/verified all the steps you needed to do.
Thank you for reading this! You can now erase everything up to the
following dashes, and then complete what's after.
ISSUES THAT EITHER:
* IGNORE THE ISSUE GUIDELINES
* ERASE THE FOLLOWING TEMPLATE
* DON'T FOLLOW THE PROPER NUMBERED FORMAT FOR STEPS TO REPRODUCE
COULD BE CLOSED.
---
I did:
* [ ] Search for if my issue has already been submitted
* [ ] Make sure I'm reporting something precise that needs to be fixed
* [ ] Give my issue a descriptive and concise title
* [ ] Create a *minimal* working example on JsFiddle or Codepen
(or gave a link to a demo on the Selectize docs)
* [ ] Indicate *precise* steps to reproduce in *numbers* and the result,
like below
[replace me with a short description of issue]
Steps to reproduce:
1.
2.
3.
Expected result:
Actual result:
[you can add explanations here of the context/what you were trying to
do, and if you have findings about what the cause might be]

5
bower_components/selectize/.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
.DS_Store
.DAV
node_modules
bower_components
*.log

74
bower_components/selectize/CHANGELOG.md vendored Normal file
View File

@@ -0,0 +1,74 @@
<!-- Feel free to put either your handle and/or full name, according to
your privacy needs -->
## v0.12.4, v0.12.5 · 27 June 2018
* Allow the dropdown to reopen on click if it is closed without losing focus
by closeAfterSelect: true
*@fishpercolator*
* Fixed bug making `clearOptions` function. Now it doesn't remove already selected options.
*(thanks @caseymct - #1079)*
* New feature: allow to disable single options or complete optgroups
*@zeitiger*
## v0.12.3 · 24 August 2016
* Make `label[for]` work after applying Selectize (#755)
*Barrett Sonntag* (@barretts)
* Output friendly error message when Microplguin is missing (#1137).
Special thanks to @styxxx for proposing the improvement.
* Add local server command `grunt server`.
* Stop creating items automatically when text is pasted, only create
them when pasted text contains delimiter.
* Fix regression 'Required fields can not be focusable' in Chrome
(#733)
* Fix detection of Validity API, we had false negatives before.
*Jonathan Allard* (@joallard)
* Fix open keyboard bug under iOS after closing selection (#1127)
*@zeitiger*
* Fix highlighting more than one character (#1099, #1098)
*@skimi*
## v0.12.2 · 23 June 2016
* Fix issue preventing build ("Cannot assign to read only property
'subarray'") because of bug in uglifyjs. (#1072)
*@jaridmargolin*
* Fix tabbing issue (#877) on IE11. (#997)
*@bwilson-ux*
* Fix jQuery initialization for jQuery >= 1.9 (#1045)
*@mpokrywka*
* Make `remove_button` work for single-option usage (#848)
*@ChoppyThing*
* Fixed bug that made `allowEmptyOption: true` useless (#739)
*@mcavalletto*
* Functions in option `render` can now return a DOM node in addition to
text. (#617)
*@topaxi*

202
bower_components/selectize/LICENSE vendored Normal file
View File

@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 20132015 Brian Reavis
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
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

152
bower_components/selectize/README.md vendored Normal file
View File

@@ -0,0 +1,152 @@
→ Selectize is looking for [new members on the maintenance team](https://github.com/selectize/selectize.js/issues/752)!
# selectize.js
[![NPM version](http://img.shields.io/npm/v/selectize.svg?style=flat)](https://www.npmjs.org/package/selectize)
[![CDNJS version](http://img.shields.io/cdnjs/v/selectize.js.svg?style=flat)](https://cdnjs.com/libraries/selectize.js)
[![Build Status](http://img.shields.io/travis/selectize/selectize.js/master.svg?style=flat)](https://travis-ci.org/selectize/selectize.js)
[![Coverage Status](http://img.shields.io/coveralls/selectize/selectize.js/master.svg?style=flat)](https://coveralls.io/r/selectize/selectize.js)
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.
- [Demos](http://selectize.github.io/selectize.js/)
- [Changelog](https://github.com/selectize/selectize.js/releases)
- [Examples](examples/)
- [Usage Documentation](docs/usage.md)
- [API Documentation](docs/api.md)
- [Plugin Documentation](docs/plugins.md)
- [Browser Test Matrix](https://saucelabs.com/u/selectize)
### Features
- **Smart Option Searching / Ranking**<br>Options are efficiently scored and sorted on-the-fly (using [sifter](https://github.com/brianreavis/sifter.js)). Want to search an item's title *and* description? No problem.
- **Caret between items**<br>Order matters sometimes. Use the <kbd>&larr;</kbd> and <kbd>&rarr;</kbd> arrow keys to move between selected items.</li>
- **Select &amp; delete multiple items at once**<br>Hold down <kbd>option</kbd> on Mac or <kbd>ctrl</kbd> on Windows to select more than one item to delete.
- **Díåcritîçs supported**<br>Great for international environments.
- **Item creation**<br>Allow users to create items on the fly (async saving is supported; the control locks until the callback is fired).
- **Remote data loading**<br>For when you have thousands of options and want them provided by the server as the user types.
- **Clean API &amp; code**<br>Interface with it and make modifications easily. Pull requests welcome!
- **Extensible**<br> [Plugin API](docs/plugins.md) for developing custom features (uses [microplugin](https://github.com/brianreavis/microplugin.js)).
- **Touch Support**<br> Plays nice with iOS 5+ devices.
### Dependencies
- [jquery](https://github.com/jquery/jquery) (1.7 and greater)
- [sifter](https://github.com/brianreavis/sifter.js) (bundled in ["standalone" build](dist/js/standalone))
- [microplugin](https://github.com/brianreavis/microplugin.js) (bundled in ["standalone" build](dist/js/standalone))
### Installation and files
All pre-built files needed to use Selectize can be found in the
["dist"](dist/) folder.
If you're looking to get started with minimal fuss, include
`standalone/selectize.min.js` (bundles Sifter and Microplugin
dependencies also available un-minified for debugging, just remove the
`.min` part) and `css/selectize.default.css`.
Selectize is available at [cdnjs](https://cdnjs.com/libraries/selectize.js).
- [**js/**](dist/js)
- [**standalone/**](dist/js/standalone)
- [selectize.js](dist/js/standalone/selectize.js) — With dependencies, minus jquery
- [selectize.js](dist/js/selectize.js) — Without dependencies
- [**less/**](dist/less)
- [selectize.less](dist/less/selectize.less) — Core styles
- [selectize.default.less](dist/less/selectize.default.less) — Default theme
- [selectize.bootstrap2.less](dist/less/selectize.bootstrap2.less) — Bootstrap 2 theme
- [selectize.bootstrap3.less](dist/less/selectize.bootstrap3.less) — Bootstrap 3 theme
- [**plugins/**](dist/less/plugins) — Individual plugin styles
- [**css/**](dist/css)
- [selectize.css](dist/css/selectize.css) — Core styles
- [selectize.default.css](dist/css/selectize.default.css) — Default theme (with core styles)
- [selectize.bootstrap2.css](dist/css/selectize.bootstrap2.css) - Bootstrap 2 theme
- [selectize.bootstrap3.css](dist/css/selectize.bootstrap3.css) - Bootstrap 3 theme
### Usage
```js
$('select').selectize(options);
```
The available options are [documented here](docs/usage.md).
#### IE8 Support
To support Internet Explorer 8, [es5-shim](https://github.com/kriskowal/es5-shim/) must be added your page.
```html
<!--[if lt IE 9]><script src="http://cdnjs.cloudflare.com/ajax/libs/es5-shim/2.0.8/es5-shim.min.js"></script><![endif]-->
```
### Custom Builds
By default, all [plugins](src/plugins) are included. To hand-pick what plugins (if any) to include, run [`grunt`](http://gruntjs.com/) with the "--plugins" flag. After this completes, grab the files you need from the ["dist"](dist) folder.
```sh
# dependencies
npm install
# build selectize
grunt --plugins=
grunt --plugins=*
grunt --plugins=remove_button,restore_on_backspace
```
### Contributing
When issuing a pull request:
* please **do not include/commit changes in the `dist/` folder** to avoid
merge conflicts. A good way to include the right files is to use
`git gui` or `git add` when committing to select the files you want to
add to your commit.
* please **include tests** with your feature so that we're not tempted to
break it in the future!
Add an entry to the top of the CHANGELOG, and update the documentation
in `docs/` as needed. (Refactors and documentation changes don't need a
changelog entry.)
Squash your commits together in one or a few complete, logical commits,
with a concise and descriptive message. One commit means one
feature/bugfix/thing that has changed, or a diff bringing the code one
step forward to a better, working state.
Once your commit is nice and clean, and you want to *discard the other
changes*, you can use `git checkout .` (that will erase changes to
tracked files) and `git clean [-i/--interactive]` (to erase untracked
files). **However, be careful with those commands, as their function
is to erase things/changes.**
#### Tests
Please ensure all the tests pass:
```sh
$ npm test # phantomjs
$ BROWSERS=Firefox npm test
$ BROWSERS=Firefox,Chrome npm test
$ BROWSERS=Firefox,Chrome,Safari npm test
```
#### Local environment
To run Selectize locally:
```sh
$ npm start
```
You can then run the examples in `http://localhost:8000/examples/`.
However, be careful not to add the `dist/` files in your commit, as
Grunt automatically regenerates the files in `dist/` as the source is
changed.
## License
Copyright &copy; 20132016 [Brian Reavis](http://twitter.com/brianreavis) & [Contributors](https://github.com/selectize/selectize.js/graphs/contributors)
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
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

48
bower_components/selectize/bower.json vendored Normal file
View File

@@ -0,0 +1,48 @@
{
"name": "selectize",
"keywords": [
"select",
"ui",
"form",
"input",
"control",
"autocomplete",
"tagging",
"tag"
],
"description": "Selectize is a jQuery-based custom <select> UI control. Useful for tagging, contact lists, country selectors, etc.",
"license": "Apache License, Version 2.0",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/selectize/selectize.js.git"
},
"main": [
"dist/css/selectize.css",
"dist/js/selectize.js"
],
"ignore": [
"Makefile",
"Gruntfile.js",
"examples",
"node_modules",
"bower_components",
"docs",
"src",
"test",
".travis.yml",
"testem.json",
"selectize.jquery.json",
"*.sh",
"package.json"
],
"dependencies": {
"jquery": ">=1.7.0",
"microplugin": "0.0.x",
"sifter": "0.5.x"
},
"devDependencies": {
"bootstrap2": "bootstrap#2",
"bootstrap3": "bootstrap#3.2"
}
}

View File

@@ -0,0 +1,503 @@
/**
* selectize.bootstrap2.css (v0.12.6) - Bootstrap 2 Theme
* Copyright (c) 20132015 Brian Reavis & contributors
*
* 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
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
* @author Brian Reavis <brian@thirdroute.com>
*/
.selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder {
visibility: visible !important;
background: #f2f2f2 !important;
background: rgba(0, 0, 0, 0.06) !important;
border: 0 none !important;
-webkit-box-shadow: inset 0 0 12px 4px #fff;
box-shadow: inset 0 0 12px 4px #fff;
}
.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after {
content: '!';
visibility: hidden;
}
.selectize-control.plugin-drag_drop .ui-sortable-helper {
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.selectize-dropdown-header {
position: relative;
padding: 3px 10px;
border-bottom: 1px solid #d0d0d0;
background: #f8f8f8;
-webkit-border-radius: 4px 4px 0 0;
-moz-border-radius: 4px 4px 0 0;
border-radius: 4px 4px 0 0;
}
.selectize-dropdown-header-close {
position: absolute;
right: 10px;
top: 50%;
color: #333;
opacity: 0.4;
margin-top: -12px;
line-height: 20px;
font-size: 20px !important;
}
.selectize-dropdown-header-close:hover {
color: #000000;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup {
border-right: 1px solid #f2f2f2;
border-top: 0 none;
float: left;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child {
border-right: 0 none;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup:before {
display: none;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup-header {
border-top: 0 none;
}
.selectize-control.plugin-remove_button [data-value] {
position: relative;
padding-right: 24px !important;
}
.selectize-control.plugin-remove_button [data-value] .remove {
z-index: 1;
/* fixes ie bug (see #392) */
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: 17px;
text-align: center;
font-weight: bold;
font-size: 12px;
color: inherit;
text-decoration: none;
vertical-align: middle;
display: inline-block;
padding: 1px 0 0 0;
border-left: 1px solid #ccc;
-webkit-border-radius: 0 2px 2px 0;
-moz-border-radius: 0 2px 2px 0;
border-radius: 0 2px 2px 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.selectize-control.plugin-remove_button [data-value] .remove:hover {
background: rgba(0, 0, 0, 0.05);
}
.selectize-control.plugin-remove_button [data-value].active .remove {
border-left-color: #0077b3;
}
.selectize-control.plugin-remove_button .disabled [data-value] .remove:hover {
background: none;
}
.selectize-control.plugin-remove_button .disabled [data-value] .remove {
border-left-color: #e0e0e0;
}
.selectize-control.plugin-remove_button .remove-single {
position: absolute;
right: 0;
top: 0;
font-size: 23px;
}
.selectize-control {
position: relative;
}
.selectize-dropdown,
.selectize-input,
.selectize-input input {
color: #333;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 20px;
-webkit-font-smoothing: inherit;
}
.selectize-input,
.selectize-control.single .selectize-input.input-active {
background: #fff;
cursor: text;
display: inline-block;
}
.selectize-input {
border: 1px solid #d0d0d0;
padding: 7px 10px;
display: inline-block;
width: 100%;
overflow: hidden;
position: relative;
z-index: 1;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-shadow: none;
box-shadow: none;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.selectize-control.multi .selectize-input.has-items {
padding: 5px 10px 2px;
}
.selectize-input.full {
background-color: #fff;
}
.selectize-input.disabled,
.selectize-input.disabled * {
cursor: default !important;
}
.selectize-input.focus {
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}
.selectize-input.dropdown-active {
-webkit-border-radius: 4px 4px 0 0;
-moz-border-radius: 4px 4px 0 0;
border-radius: 4px 4px 0 0;
}
.selectize-input > * {
vertical-align: baseline;
display: -moz-inline-stack;
display: inline-block;
zoom: 1;
*display: inline;
}
.selectize-control.multi .selectize-input > div {
cursor: pointer;
margin: 0 3px 3px 0;
padding: 1px 3px;
background: #e6e6e6;
color: #333;
border: 1px solid #ccc;
}
.selectize-control.multi .selectize-input > div.active {
background: #08c;
color: #fff;
border: 1px solid #0077b3;
}
.selectize-control.multi .selectize-input.disabled > div,
.selectize-control.multi .selectize-input.disabled > div.active {
color: #474747;
background: #fafafa;
border: 1px solid #e0e0e0;
}
.selectize-input > input {
display: inline-block !important;
padding: 0 !important;
min-height: 0 !important;
max-height: none !important;
max-width: 100% !important;
margin: 0 !important;
text-indent: 0 !important;
border: 0 none !important;
background: none !important;
line-height: inherit !important;
-webkit-user-select: auto !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
}
.selectize-input > input::-ms-clear {
display: none;
}
.selectize-input > input:focus {
outline: none !important;
}
.selectize-input::after {
content: ' ';
display: block;
clear: left;
}
.selectize-input.dropdown-active::before {
content: ' ';
display: block;
position: absolute;
background: #e5e5e5;
height: 1px;
bottom: 0;
left: 0;
right: 0;
}
.selectize-dropdown {
position: absolute;
z-index: 10;
border: 1px solid #ccc;
background: #fff;
margin: -1px 0 0 0;
border-top: 0 none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
-webkit-border-radius: 0 0 4px 4px;
-moz-border-radius: 0 0 4px 4px;
border-radius: 0 0 4px 4px;
}
.selectize-dropdown [data-selectable] {
cursor: pointer;
overflow: hidden;
}
.selectize-dropdown [data-selectable] .highlight {
background: rgba(255, 237, 40, 0.4);
-webkit-border-radius: 1px;
-moz-border-radius: 1px;
border-radius: 1px;
}
.selectize-dropdown .option,
.selectize-dropdown .optgroup-header {
padding: 3px 10px;
}
.selectize-dropdown .option,
.selectize-dropdown [data-disabled],
.selectize-dropdown [data-disabled] [data-selectable].option {
cursor: inherit;
opacity: 0.5;
}
.selectize-dropdown [data-selectable].option {
opacity: 1;
}
.selectize-dropdown .optgroup:first-child .optgroup-header {
border-top: 0 none;
}
.selectize-dropdown .optgroup-header {
color: #999;
background: #fff;
cursor: default;
}
.selectize-dropdown .active {
background-color: #08c;
color: #fff;
}
.selectize-dropdown .active.create {
color: #fff;
}
.selectize-dropdown .create {
color: rgba(51, 51, 51, 0.5);
}
.selectize-dropdown-content {
overflow-y: auto;
overflow-x: hidden;
max-height: 200px;
-webkit-overflow-scrolling: touch;
}
.selectize-control.single .selectize-input,
.selectize-control.single .selectize-input input {
cursor: pointer;
}
.selectize-control.single .selectize-input.input-active,
.selectize-control.single .selectize-input.input-active input {
cursor: text;
}
.selectize-control.single .selectize-input:after {
content: ' ';
display: block;
position: absolute;
top: 50%;
right: 15px;
margin-top: -3px;
width: 0;
height: 0;
border-style: solid;
border-width: 5px 5px 0 5px;
border-color: #000 transparent transparent transparent;
}
.selectize-control.single .selectize-input.dropdown-active:after {
margin-top: -4px;
border-width: 0 5px 5px 5px;
border-color: transparent transparent #000 transparent;
}
.selectize-control.rtl.single .selectize-input:after {
left: 15px;
right: auto;
}
.selectize-control.rtl .selectize-input > input {
margin: 0 4px 0 -2px !important;
}
.selectize-control .selectize-input.disabled {
opacity: 0.5;
background-color: #fff;
}
.selectize-dropdown {
margin: 2px 0 0 0;
z-index: 1000;
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 4px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}
.selectize-dropdown .optgroup-header {
font-size: 11px;
font-weight: bold;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
text-transform: uppercase;
}
.selectize-dropdown .optgroup:first-child:before {
display: none;
}
.selectize-dropdown .optgroup:before {
content: ' ';
display: block;
*width: 100%;
height: 1px;
margin: 9px 1px;
*margin: -5px 0 5px;
overflow: hidden;
background-color: #e5e5e5;
border-bottom: 1px solid #fff;
margin-left: -10px;
margin-right: -10px;
}
.selectize-dropdown [data-selectable].active {
background-color: #0081c2;
background-image: -moz-linear-gradient(top, #08c, #0077b3);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#0077b3));
background-image: -webkit-linear-gradient(top, #08c, #0077b3);
background-image: -o-linear-gradient(top, #08c, #0077b3);
background-image: linear-gradient(to bottom, #08c, #0077b3);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
}
.selectize-dropdown-content {
padding: 5px 0;
}
.selectize-dropdown-header {
padding: 6px 10px;
}
.selectize-input {
-webkit-transition: border linear .2s, box-shadow linear .2s;
-moz-transition: border linear .2s, box-shadow linear .2s;
-o-transition: border linear .2s, box-shadow linear .2s;
transition: border linear .2s, box-shadow linear .2s;
}
.selectize-input.dropdown-active {
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.selectize-input.dropdown-active::before {
display: none;
}
.selectize-input.input-active,
.selectize-input.input-active:hover,
.selectize-control.multi .selectize-input.focus {
background: #fff !important;
border-color: rgba(82, 168, 236, 0.8) !important;
outline: 0 !important;
outline: thin dotted \9 !important;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6) !important;
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6) !important;
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6) !important;
}
.selectize-control.single .selectize-input {
color: #333;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
background-color: #f5f5f5;
background-image: -moz-linear-gradient(top, #fff, #e6e6e6);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#e6e6e6));
background-image: -webkit-linear-gradient(top, #fff, #e6e6e6);
background-image: -o-linear-gradient(top, #fff, #e6e6e6);
background-image: linear-gradient(to bottom, #fff, #e6e6e6);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #e6e6e6;
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
}
.selectize-control.single .selectize-input:hover,
.selectize-control.single .selectize-input:focus,
.selectize-control.single .selectize-input:active,
.selectize-control.single .selectize-input.active,
.selectize-control.single .selectize-input.disabled,
.selectize-control.single .selectize-input[disabled] {
color: #333;
background-color: #e6e6e6;
*background-color: #d9d9d9;
}
.selectize-control.single .selectize-input:active,
.selectize-control.single .selectize-input.active {
background-color: #cccccc \9;
}
.selectize-control.single .selectize-input:hover {
color: #333;
text-decoration: none;
background-position: 0 -15px;
-webkit-transition: background-position 0.1s linear;
-moz-transition: background-position 0.1s linear;
-o-transition: background-position 0.1s linear;
transition: background-position 0.1s linear;
}
.selectize-control.single .selectize-input.disabled {
background: #e6e6e6 !important;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
.selectize-control.multi .selectize-input {
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.selectize-control.multi .selectize-input.has-items {
padding-left: 7px;
padding-right: 7px;
}
.selectize-control.multi .selectize-input > div {
color: #333;
text-shadow: none;
background-color: #f5f5f5;
background-image: -moz-linear-gradient(top, #fff, #e6e6e6);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#e6e6e6));
background-image: -webkit-linear-gradient(top, #fff, #e6e6e6);
background-image: -o-linear-gradient(top, #fff, #e6e6e6);
background-image: linear-gradient(to bottom, #fff, #e6e6e6);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #e6e6e6;
border: 1px solid #ccc;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
}
.selectize-control.multi .selectize-input > div.active {
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
box-shadow: 0 1px 2px rgba(0,0,0,.05);
color: #fff;
text-shadow: none;
background-color: #0081c2;
background-image: -moz-linear-gradient(top, #08c, #0077b3);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#0077b3));
background-image: -webkit-linear-gradient(top, #08c, #0077b3);
background-image: -o-linear-gradient(top, #08c, #0077b3);
background-image: linear-gradient(to bottom, #08c, #0077b3);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
border-color: #0077b3 #0077b3 #004466;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #08c;
border: 1px solid #08c;
}

View File

@@ -0,0 +1,417 @@
/**
* selectize.bootstrap3.css (v0.12.6) - Bootstrap 3 Theme
* Copyright (c) 20132015 Brian Reavis & contributors
*
* 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
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
* @author Brian Reavis <brian@thirdroute.com>
*/
.selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder {
visibility: visible !important;
background: #f2f2f2 !important;
background: rgba(0, 0, 0, 0.06) !important;
border: 0 none !important;
-webkit-box-shadow: inset 0 0 12px 4px #fff;
box-shadow: inset 0 0 12px 4px #fff;
}
.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after {
content: '!';
visibility: hidden;
}
.selectize-control.plugin-drag_drop .ui-sortable-helper {
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.selectize-dropdown-header {
position: relative;
padding: 3px 12px;
border-bottom: 1px solid #d0d0d0;
background: #f8f8f8;
-webkit-border-radius: 4px 4px 0 0;
-moz-border-radius: 4px 4px 0 0;
border-radius: 4px 4px 0 0;
}
.selectize-dropdown-header-close {
position: absolute;
right: 12px;
top: 50%;
color: #333333;
opacity: 0.4;
margin-top: -12px;
line-height: 20px;
font-size: 20px !important;
}
.selectize-dropdown-header-close:hover {
color: #000000;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup {
border-right: 1px solid #f2f2f2;
border-top: 0 none;
float: left;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child {
border-right: 0 none;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup:before {
display: none;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup-header {
border-top: 0 none;
}
.selectize-control.plugin-remove_button [data-value] {
position: relative;
padding-right: 24px !important;
}
.selectize-control.plugin-remove_button [data-value] .remove {
z-index: 1;
/* fixes ie bug (see #392) */
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: 17px;
text-align: center;
font-weight: bold;
font-size: 12px;
color: inherit;
text-decoration: none;
vertical-align: middle;
display: inline-block;
padding: 1px 0 0 0;
border-left: 1px solid rgba(0, 0, 0, 0);
-webkit-border-radius: 0 2px 2px 0;
-moz-border-radius: 0 2px 2px 0;
border-radius: 0 2px 2px 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.selectize-control.plugin-remove_button [data-value] .remove:hover {
background: rgba(0, 0, 0, 0.05);
}
.selectize-control.plugin-remove_button [data-value].active .remove {
border-left-color: rgba(0, 0, 0, 0);
}
.selectize-control.plugin-remove_button .disabled [data-value] .remove:hover {
background: none;
}
.selectize-control.plugin-remove_button .disabled [data-value] .remove {
border-left-color: rgba(77, 77, 77, 0);
}
.selectize-control.plugin-remove_button .remove-single {
position: absolute;
right: 0;
top: 0;
font-size: 23px;
}
.selectize-control {
position: relative;
}
.selectize-dropdown,
.selectize-input,
.selectize-input input {
color: #333333;
font-family: inherit;
font-size: inherit;
line-height: 20px;
-webkit-font-smoothing: inherit;
}
.selectize-input,
.selectize-control.single .selectize-input.input-active {
background: #fff;
cursor: text;
display: inline-block;
}
.selectize-input {
border: 1px solid #ccc;
padding: 6px 12px;
display: inline-block;
width: 100%;
overflow: hidden;
position: relative;
z-index: 1;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-shadow: none;
box-shadow: none;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.selectize-control.multi .selectize-input.has-items {
padding: 5px 12px 2px;
}
.selectize-input.full {
background-color: #fff;
}
.selectize-input.disabled,
.selectize-input.disabled * {
cursor: default !important;
}
.selectize-input.focus {
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}
.selectize-input.dropdown-active {
-webkit-border-radius: 4px 4px 0 0;
-moz-border-radius: 4px 4px 0 0;
border-radius: 4px 4px 0 0;
}
.selectize-input > * {
vertical-align: baseline;
display: -moz-inline-stack;
display: inline-block;
zoom: 1;
*display: inline;
}
.selectize-control.multi .selectize-input > div {
cursor: pointer;
margin: 0 3px 3px 0;
padding: 1px 3px;
background: #efefef;
color: #333333;
border: 0 solid rgba(0, 0, 0, 0);
}
.selectize-control.multi .selectize-input > div.active {
background: #428bca;
color: #fff;
border: 0 solid rgba(0, 0, 0, 0);
}
.selectize-control.multi .selectize-input.disabled > div,
.selectize-control.multi .selectize-input.disabled > div.active {
color: #808080;
background: #ffffff;
border: 0 solid rgba(77, 77, 77, 0);
}
.selectize-input > input {
display: inline-block !important;
padding: 0 !important;
min-height: 0 !important;
max-height: none !important;
max-width: 100% !important;
margin: 0 !important;
text-indent: 0 !important;
border: 0 none !important;
background: none !important;
line-height: inherit !important;
-webkit-user-select: auto !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
}
.selectize-input > input::-ms-clear {
display: none;
}
.selectize-input > input:focus {
outline: none !important;
}
.selectize-input::after {
content: ' ';
display: block;
clear: left;
}
.selectize-input.dropdown-active::before {
content: ' ';
display: block;
position: absolute;
background: #ffffff;
height: 1px;
bottom: 0;
left: 0;
right: 0;
}
.selectize-dropdown {
position: absolute;
z-index: 10;
border: 1px solid #d0d0d0;
background: #fff;
margin: -1px 0 0 0;
border-top: 0 none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
-webkit-border-radius: 0 0 4px 4px;
-moz-border-radius: 0 0 4px 4px;
border-radius: 0 0 4px 4px;
}
.selectize-dropdown [data-selectable] {
cursor: pointer;
overflow: hidden;
}
.selectize-dropdown [data-selectable] .highlight {
background: rgba(255, 237, 40, 0.4);
-webkit-border-radius: 1px;
-moz-border-radius: 1px;
border-radius: 1px;
}
.selectize-dropdown .option,
.selectize-dropdown .optgroup-header {
padding: 3px 12px;
}
.selectize-dropdown .option,
.selectize-dropdown [data-disabled],
.selectize-dropdown [data-disabled] [data-selectable].option {
cursor: inherit;
opacity: 0.5;
}
.selectize-dropdown [data-selectable].option {
opacity: 1;
}
.selectize-dropdown .optgroup:first-child .optgroup-header {
border-top: 0 none;
}
.selectize-dropdown .optgroup-header {
color: #777777;
background: #fff;
cursor: default;
}
.selectize-dropdown .active {
background-color: #f5f5f5;
color: #262626;
}
.selectize-dropdown .active.create {
color: #262626;
}
.selectize-dropdown .create {
color: rgba(51, 51, 51, 0.5);
}
.selectize-dropdown-content {
overflow-y: auto;
overflow-x: hidden;
max-height: 200px;
-webkit-overflow-scrolling: touch;
}
.selectize-control.single .selectize-input,
.selectize-control.single .selectize-input input {
cursor: pointer;
}
.selectize-control.single .selectize-input.input-active,
.selectize-control.single .selectize-input.input-active input {
cursor: text;
}
.selectize-control.single .selectize-input:after {
content: ' ';
display: block;
position: absolute;
top: 50%;
right: 17px;
margin-top: -3px;
width: 0;
height: 0;
border-style: solid;
border-width: 5px 5px 0 5px;
border-color: #333333 transparent transparent transparent;
}
.selectize-control.single .selectize-input.dropdown-active:after {
margin-top: -4px;
border-width: 0 5px 5px 5px;
border-color: transparent transparent #333333 transparent;
}
.selectize-control.rtl.single .selectize-input:after {
left: 17px;
right: auto;
}
.selectize-control.rtl .selectize-input > input {
margin: 0 4px 0 -2px !important;
}
.selectize-control .selectize-input.disabled {
opacity: 0.5;
background-color: #fff;
}
.selectize-dropdown,
.selectize-dropdown.form-control {
height: auto;
padding: 0;
margin: 2px 0 0 0;
z-index: 1000;
background: #fff;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, 0.15);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
}
.selectize-dropdown .optgroup-header {
font-size: 12px;
line-height: 1.42857143;
}
.selectize-dropdown .optgroup:first-child:before {
display: none;
}
.selectize-dropdown .optgroup:before {
content: ' ';
display: block;
height: 1px;
margin: 9px 0;
overflow: hidden;
background-color: #e5e5e5;
margin-left: -12px;
margin-right: -12px;
}
.selectize-dropdown-content {
padding: 5px 0;
}
.selectize-dropdown-header {
padding: 6px 12px;
}
.selectize-input {
min-height: 34px;
}
.selectize-input.dropdown-active {
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.selectize-input.dropdown-active::before {
display: none;
}
.selectize-input.focus {
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
.has-error .selectize-input {
border-color: #a94442;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.has-error .selectize-input:focus {
border-color: #843534;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
}
.selectize-control.multi .selectize-input.has-items {
padding-left: 9px;
padding-right: 9px;
}
.selectize-control.multi .selectize-input > div {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.form-control.selectize-control {
padding: 0;
height: auto;
border: none;
background: none;
-webkit-box-shadow: none;
box-shadow: none;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}

View File

@@ -0,0 +1,333 @@
/**
* selectize.css (v0.12.6)
* Copyright (c) 20132015 Brian Reavis & contributors
*
* 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
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
* @author Brian Reavis <brian@thirdroute.com>
*/
.selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder {
visibility: visible !important;
background: #f2f2f2 !important;
background: rgba(0, 0, 0, 0.06) !important;
border: 0 none !important;
-webkit-box-shadow: inset 0 0 12px 4px #fff;
box-shadow: inset 0 0 12px 4px #fff;
}
.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after {
content: '!';
visibility: hidden;
}
.selectize-control.plugin-drag_drop .ui-sortable-helper {
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.selectize-dropdown-header {
position: relative;
padding: 5px 8px;
border-bottom: 1px solid #d0d0d0;
background: #f8f8f8;
-webkit-border-radius: 3px 3px 0 0;
-moz-border-radius: 3px 3px 0 0;
border-radius: 3px 3px 0 0;
}
.selectize-dropdown-header-close {
position: absolute;
right: 8px;
top: 50%;
color: #303030;
opacity: 0.4;
margin-top: -12px;
line-height: 20px;
font-size: 20px !important;
}
.selectize-dropdown-header-close:hover {
color: #000000;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup {
border-right: 1px solid #f2f2f2;
border-top: 0 none;
float: left;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child {
border-right: 0 none;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup:before {
display: none;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup-header {
border-top: 0 none;
}
.selectize-control.plugin-remove_button [data-value] {
position: relative;
padding-right: 24px !important;
}
.selectize-control.plugin-remove_button [data-value] .remove {
z-index: 1;
/* fixes ie bug (see #392) */
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: 17px;
text-align: center;
font-weight: bold;
font-size: 12px;
color: inherit;
text-decoration: none;
vertical-align: middle;
display: inline-block;
padding: 2px 0 0 0;
border-left: 1px solid #d0d0d0;
-webkit-border-radius: 0 2px 2px 0;
-moz-border-radius: 0 2px 2px 0;
border-radius: 0 2px 2px 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.selectize-control.plugin-remove_button [data-value] .remove:hover {
background: rgba(0, 0, 0, 0.05);
}
.selectize-control.plugin-remove_button [data-value].active .remove {
border-left-color: #cacaca;
}
.selectize-control.plugin-remove_button .disabled [data-value] .remove:hover {
background: none;
}
.selectize-control.plugin-remove_button .disabled [data-value] .remove {
border-left-color: #ffffff;
}
.selectize-control.plugin-remove_button .remove-single {
position: absolute;
right: 0;
top: 0;
font-size: 23px;
}
.selectize-control {
position: relative;
}
.selectize-dropdown,
.selectize-input,
.selectize-input input {
color: #303030;
font-family: inherit;
font-size: 13px;
line-height: 18px;
-webkit-font-smoothing: inherit;
}
.selectize-input,
.selectize-control.single .selectize-input.input-active {
background: #fff;
cursor: text;
display: inline-block;
}
.selectize-input {
border: 1px solid #d0d0d0;
padding: 8px 8px;
display: inline-block;
width: 100%;
overflow: hidden;
position: relative;
z-index: 1;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.selectize-control.multi .selectize-input.has-items {
padding: 6px 8px 3px;
}
.selectize-input.full {
background-color: #fff;
}
.selectize-input.disabled,
.selectize-input.disabled * {
cursor: default !important;
}
.selectize-input.focus {
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}
.selectize-input.dropdown-active {
-webkit-border-radius: 3px 3px 0 0;
-moz-border-radius: 3px 3px 0 0;
border-radius: 3px 3px 0 0;
}
.selectize-input > * {
vertical-align: baseline;
display: -moz-inline-stack;
display: inline-block;
zoom: 1;
*display: inline;
}
.selectize-control.multi .selectize-input > div {
cursor: pointer;
margin: 0 3px 3px 0;
padding: 2px 6px;
background: #f2f2f2;
color: #303030;
border: 0 solid #d0d0d0;
}
.selectize-control.multi .selectize-input > div.active {
background: #e8e8e8;
color: #303030;
border: 0 solid #cacaca;
}
.selectize-control.multi .selectize-input.disabled > div,
.selectize-control.multi .selectize-input.disabled > div.active {
color: #7d7d7d;
background: #ffffff;
border: 0 solid #ffffff;
}
.selectize-input > input {
display: inline-block !important;
padding: 0 !important;
min-height: 0 !important;
max-height: none !important;
max-width: 100% !important;
margin: 0 2px 0 0 !important;
text-indent: 0 !important;
border: 0 none !important;
background: none !important;
line-height: inherit !important;
-webkit-user-select: auto !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
}
.selectize-input > input::-ms-clear {
display: none;
}
.selectize-input > input:focus {
outline: none !important;
}
.selectize-input::after {
content: ' ';
display: block;
clear: left;
}
.selectize-input.dropdown-active::before {
content: ' ';
display: block;
position: absolute;
background: #f0f0f0;
height: 1px;
bottom: 0;
left: 0;
right: 0;
}
.selectize-dropdown {
position: absolute;
z-index: 10;
border: 1px solid #d0d0d0;
background: #fff;
margin: -1px 0 0 0;
border-top: 0 none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
-webkit-border-radius: 0 0 3px 3px;
-moz-border-radius: 0 0 3px 3px;
border-radius: 0 0 3px 3px;
}
.selectize-dropdown [data-selectable] {
cursor: pointer;
overflow: hidden;
}
.selectize-dropdown [data-selectable] .highlight {
background: rgba(125, 168, 208, 0.2);
-webkit-border-radius: 1px;
-moz-border-radius: 1px;
border-radius: 1px;
}
.selectize-dropdown .option,
.selectize-dropdown .optgroup-header {
padding: 5px 8px;
}
.selectize-dropdown .option,
.selectize-dropdown [data-disabled],
.selectize-dropdown [data-disabled] [data-selectable].option {
cursor: inherit;
opacity: 0.5;
}
.selectize-dropdown [data-selectable].option {
opacity: 1;
}
.selectize-dropdown .optgroup:first-child .optgroup-header {
border-top: 0 none;
}
.selectize-dropdown .optgroup-header {
color: #303030;
background: #fff;
cursor: default;
}
.selectize-dropdown .active {
background-color: #f5fafd;
color: #495c68;
}
.selectize-dropdown .active.create {
color: #495c68;
}
.selectize-dropdown .create {
color: rgba(48, 48, 48, 0.5);
}
.selectize-dropdown-content {
overflow-y: auto;
overflow-x: hidden;
max-height: 200px;
-webkit-overflow-scrolling: touch;
}
.selectize-control.single .selectize-input,
.selectize-control.single .selectize-input input {
cursor: pointer;
}
.selectize-control.single .selectize-input.input-active,
.selectize-control.single .selectize-input.input-active input {
cursor: text;
}
.selectize-control.single .selectize-input:after {
content: ' ';
display: block;
position: absolute;
top: 50%;
right: 15px;
margin-top: -3px;
width: 0;
height: 0;
border-style: solid;
border-width: 5px 5px 0 5px;
border-color: #808080 transparent transparent transparent;
}
.selectize-control.single .selectize-input.dropdown-active:after {
margin-top: -4px;
border-width: 0 5px 5px 5px;
border-color: transparent transparent #808080 transparent;
}
.selectize-control.rtl.single .selectize-input:after {
left: 15px;
right: auto;
}
.selectize-control.rtl .selectize-input > input {
margin: 0 4px 0 -2px !important;
}
.selectize-control .selectize-input.disabled {
opacity: 0.5;
background-color: #fafafa;
}

View File

@@ -0,0 +1,403 @@
/**
* selectize.default.css (v0.12.6) - Default Theme
* Copyright (c) 20132015 Brian Reavis & contributors
*
* 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
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
* @author Brian Reavis <brian@thirdroute.com>
*/
.selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder {
visibility: visible !important;
background: #f2f2f2 !important;
background: rgba(0, 0, 0, 0.06) !important;
border: 0 none !important;
-webkit-box-shadow: inset 0 0 12px 4px #fff;
box-shadow: inset 0 0 12px 4px #fff;
}
.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after {
content: '!';
visibility: hidden;
}
.selectize-control.plugin-drag_drop .ui-sortable-helper {
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.selectize-dropdown-header {
position: relative;
padding: 5px 8px;
border-bottom: 1px solid #d0d0d0;
background: #f8f8f8;
-webkit-border-radius: 3px 3px 0 0;
-moz-border-radius: 3px 3px 0 0;
border-radius: 3px 3px 0 0;
}
.selectize-dropdown-header-close {
position: absolute;
right: 8px;
top: 50%;
color: #303030;
opacity: 0.4;
margin-top: -12px;
line-height: 20px;
font-size: 20px !important;
}
.selectize-dropdown-header-close:hover {
color: #000000;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup {
border-right: 1px solid #f2f2f2;
border-top: 0 none;
float: left;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child {
border-right: 0 none;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup:before {
display: none;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup-header {
border-top: 0 none;
}
.selectize-control.plugin-remove_button [data-value] {
position: relative;
padding-right: 24px !important;
}
.selectize-control.plugin-remove_button [data-value] .remove {
z-index: 1;
/* fixes ie bug (see #392) */
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: 17px;
text-align: center;
font-weight: bold;
font-size: 12px;
color: inherit;
text-decoration: none;
vertical-align: middle;
display: inline-block;
padding: 2px 0 0 0;
border-left: 1px solid #0073bb;
-webkit-border-radius: 0 2px 2px 0;
-moz-border-radius: 0 2px 2px 0;
border-radius: 0 2px 2px 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.selectize-control.plugin-remove_button [data-value] .remove:hover {
background: rgba(0, 0, 0, 0.05);
}
.selectize-control.plugin-remove_button [data-value].active .remove {
border-left-color: #00578d;
}
.selectize-control.plugin-remove_button .disabled [data-value] .remove:hover {
background: none;
}
.selectize-control.plugin-remove_button .disabled [data-value] .remove {
border-left-color: #aaaaaa;
}
.selectize-control.plugin-remove_button .remove-single {
position: absolute;
right: 0;
top: 0;
font-size: 23px;
}
.selectize-control {
position: relative;
}
.selectize-dropdown,
.selectize-input,
.selectize-input input {
color: #303030;
font-family: inherit;
font-size: 13px;
line-height: 18px;
-webkit-font-smoothing: inherit;
}
.selectize-input,
.selectize-control.single .selectize-input.input-active {
background: #fff;
cursor: text;
display: inline-block;
}
.selectize-input {
border: 1px solid #d0d0d0;
padding: 8px 8px;
display: inline-block;
width: 100%;
overflow: hidden;
position: relative;
z-index: 1;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.selectize-control.multi .selectize-input.has-items {
padding: 5px 8px 2px;
}
.selectize-input.full {
background-color: #fff;
}
.selectize-input.disabled,
.selectize-input.disabled * {
cursor: default !important;
}
.selectize-input.focus {
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}
.selectize-input.dropdown-active {
-webkit-border-radius: 3px 3px 0 0;
-moz-border-radius: 3px 3px 0 0;
border-radius: 3px 3px 0 0;
}
.selectize-input > * {
vertical-align: baseline;
display: -moz-inline-stack;
display: inline-block;
zoom: 1;
*display: inline;
}
.selectize-control.multi .selectize-input > div {
cursor: pointer;
margin: 0 3px 3px 0;
padding: 2px 6px;
background: #1da7ee;
color: #fff;
border: 1px solid #0073bb;
}
.selectize-control.multi .selectize-input > div.active {
background: #92c836;
color: #fff;
border: 1px solid #00578d;
}
.selectize-control.multi .selectize-input.disabled > div,
.selectize-control.multi .selectize-input.disabled > div.active {
color: #ffffff;
background: #d2d2d2;
border: 1px solid #aaaaaa;
}
.selectize-input > input {
display: inline-block !important;
padding: 0 !important;
min-height: 0 !important;
max-height: none !important;
max-width: 100% !important;
margin: 0 1px !important;
text-indent: 0 !important;
border: 0 none !important;
background: none !important;
line-height: inherit !important;
-webkit-user-select: auto !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
}
.selectize-input > input::-ms-clear {
display: none;
}
.selectize-input > input:focus {
outline: none !important;
}
.selectize-input::after {
content: ' ';
display: block;
clear: left;
}
.selectize-input.dropdown-active::before {
content: ' ';
display: block;
position: absolute;
background: #f0f0f0;
height: 1px;
bottom: 0;
left: 0;
right: 0;
}
.selectize-dropdown {
position: absolute;
z-index: 10;
border: 1px solid #d0d0d0;
background: #fff;
margin: -1px 0 0 0;
border-top: 0 none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
-webkit-border-radius: 0 0 3px 3px;
-moz-border-radius: 0 0 3px 3px;
border-radius: 0 0 3px 3px;
}
.selectize-dropdown [data-selectable] {
cursor: pointer;
overflow: hidden;
}
.selectize-dropdown [data-selectable] .highlight {
background: rgba(125, 168, 208, 0.2);
-webkit-border-radius: 1px;
-moz-border-radius: 1px;
border-radius: 1px;
}
.selectize-dropdown .option,
.selectize-dropdown .optgroup-header {
padding: 5px 8px;
}
.selectize-dropdown .option,
.selectize-dropdown [data-disabled],
.selectize-dropdown [data-disabled] [data-selectable].option {
cursor: inherit;
opacity: 0.5;
}
.selectize-dropdown [data-selectable].option {
opacity: 1;
}
.selectize-dropdown .optgroup:first-child .optgroup-header {
border-top: 0 none;
}
.selectize-dropdown .optgroup-header {
color: #303030;
background: #fff;
cursor: default;
}
.selectize-dropdown .active {
background-color: #f5fafd;
color: #495c68;
}
.selectize-dropdown .active.create {
color: #495c68;
}
.selectize-dropdown .create {
color: rgba(48, 48, 48, 0.5);
}
.selectize-dropdown-content {
overflow-y: auto;
overflow-x: hidden;
max-height: 200px;
-webkit-overflow-scrolling: touch;
}
.selectize-control.single .selectize-input,
.selectize-control.single .selectize-input input {
cursor: pointer;
}
.selectize-control.single .selectize-input.input-active,
.selectize-control.single .selectize-input.input-active input {
cursor: text;
}
.selectize-control.single .selectize-input:after {
content: ' ';
display: block;
position: absolute;
top: 50%;
right: 15px;
margin-top: -3px;
width: 0;
height: 0;
border-style: solid;
border-width: 5px 5px 0 5px;
border-color: #808080 transparent transparent transparent;
}
.selectize-control.single .selectize-input.dropdown-active:after {
margin-top: -4px;
border-width: 0 5px 5px 5px;
border-color: transparent transparent #808080 transparent;
}
.selectize-control.rtl.single .selectize-input:after {
left: 15px;
right: auto;
}
.selectize-control.rtl .selectize-input > input {
margin: 0 4px 0 -2px !important;
}
.selectize-control .selectize-input.disabled {
opacity: 0.5;
background-color: #fafafa;
}
.selectize-control.multi .selectize-input.has-items {
padding-left: 5px;
padding-right: 5px;
}
.selectize-control.multi .selectize-input.disabled [data-value] {
color: #999;
text-shadow: none;
background: none;
-webkit-box-shadow: none;
box-shadow: none;
}
.selectize-control.multi .selectize-input.disabled [data-value],
.selectize-control.multi .selectize-input.disabled [data-value] .remove {
border-color: #e6e6e6;
}
.selectize-control.multi .selectize-input.disabled [data-value] .remove {
background: none;
}
.selectize-control.multi .selectize-input [data-value] {
text-shadow: 0 1px 0 rgba(0, 51, 83, 0.3);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
background-color: #1b9dec;
background-image: -moz-linear-gradient(top, #1da7ee, #178ee9);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#1da7ee), to(#178ee9));
background-image: -webkit-linear-gradient(top, #1da7ee, #178ee9);
background-image: -o-linear-gradient(top, #1da7ee, #178ee9);
background-image: linear-gradient(to bottom, #1da7ee, #178ee9);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff1da7ee', endColorstr='#ff178ee9', GradientType=0);
-webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.2),inset 0 1px rgba(255,255,255,0.03);
box-shadow: 0 1px 0 rgba(0,0,0,0.2),inset 0 1px rgba(255,255,255,0.03);
}
.selectize-control.multi .selectize-input [data-value].active {
background-color: #0085d4;
background-image: -moz-linear-gradient(top, #008fd8, #0075cf);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#008fd8), to(#0075cf));
background-image: -webkit-linear-gradient(top, #008fd8, #0075cf);
background-image: -o-linear-gradient(top, #008fd8, #0075cf);
background-image: linear-gradient(to bottom, #008fd8, #0075cf);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff008fd8', endColorstr='#ff0075cf', GradientType=0);
}
.selectize-control.single .selectize-input {
-webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.8);
box-shadow: 0 1px 0 rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.8);
background-color: #f9f9f9;
background-image: -moz-linear-gradient(top, #fefefe, #f2f2f2);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fefefe), to(#f2f2f2));
background-image: -webkit-linear-gradient(top, #fefefe, #f2f2f2);
background-image: -o-linear-gradient(top, #fefefe, #f2f2f2);
background-image: linear-gradient(to bottom, #fefefe, #f2f2f2);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffefefe', endColorstr='#fff2f2f2', GradientType=0);
}
.selectize-control.single .selectize-input,
.selectize-dropdown.single {
border-color: #b8b8b8;
}
.selectize-dropdown .optgroup-header {
padding-top: 7px;
font-weight: bold;
font-size: 0.85em;
}
.selectize-dropdown .optgroup {
border-top: 1px solid #f0f0f0;
}
.selectize-dropdown .optgroup:first-child {
border-top: 0 none;
}

View File

@@ -0,0 +1,380 @@
/**
* selectize.legacy.css (v0.12.6) - Default Theme
* Copyright (c) 20132015 Brian Reavis & contributors
*
* 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
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
* @author Brian Reavis <brian@thirdroute.com>
*/
.selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder {
visibility: visible !important;
background: #f2f2f2 !important;
background: rgba(0, 0, 0, 0.06) !important;
border: 0 none !important;
-webkit-box-shadow: inset 0 0 12px 4px #fff;
box-shadow: inset 0 0 12px 4px #fff;
}
.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after {
content: '!';
visibility: hidden;
}
.selectize-control.plugin-drag_drop .ui-sortable-helper {
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.selectize-dropdown-header {
position: relative;
padding: 7px 10px;
border-bottom: 1px solid #d0d0d0;
background: #f8f8f8;
-webkit-border-radius: 3px 3px 0 0;
-moz-border-radius: 3px 3px 0 0;
border-radius: 3px 3px 0 0;
}
.selectize-dropdown-header-close {
position: absolute;
right: 10px;
top: 50%;
color: #303030;
opacity: 0.4;
margin-top: -12px;
line-height: 20px;
font-size: 20px !important;
}
.selectize-dropdown-header-close:hover {
color: #000000;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup {
border-right: 1px solid #f2f2f2;
border-top: 0 none;
float: left;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child {
border-right: 0 none;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup:before {
display: none;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup-header {
border-top: 0 none;
}
.selectize-control.plugin-remove_button [data-value] {
position: relative;
padding-right: 24px !important;
}
.selectize-control.plugin-remove_button [data-value] .remove {
z-index: 1;
/* fixes ie bug (see #392) */
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: 17px;
text-align: center;
font-weight: bold;
font-size: 12px;
color: inherit;
text-decoration: none;
vertical-align: middle;
display: inline-block;
padding: 1px 0 0 0;
border-left: 1px solid #74b21e;
-webkit-border-radius: 0 2px 2px 0;
-moz-border-radius: 0 2px 2px 0;
border-radius: 0 2px 2px 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.selectize-control.plugin-remove_button [data-value] .remove:hover {
background: rgba(0, 0, 0, 0.05);
}
.selectize-control.plugin-remove_button [data-value].active .remove {
border-left-color: #6f9839;
}
.selectize-control.plugin-remove_button .disabled [data-value] .remove:hover {
background: none;
}
.selectize-control.plugin-remove_button .disabled [data-value] .remove {
border-left-color: #b4b4b4;
}
.selectize-control.plugin-remove_button .remove-single {
position: absolute;
right: 0;
top: 0;
font-size: 23px;
}
.selectize-control {
position: relative;
}
.selectize-dropdown,
.selectize-input,
.selectize-input input {
color: #303030;
font-family: inherit;
font-size: 13px;
line-height: 20px;
-webkit-font-smoothing: inherit;
}
.selectize-input,
.selectize-control.single .selectize-input.input-active {
background: #fff;
cursor: text;
display: inline-block;
}
.selectize-input {
border: 1px solid #d0d0d0;
padding: 10px 10px;
display: inline-block;
width: 100%;
overflow: hidden;
position: relative;
z-index: 1;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.selectize-control.multi .selectize-input.has-items {
padding: 8px 10px 4px;
}
.selectize-input.full {
background-color: #f2f2f2;
}
.selectize-input.disabled,
.selectize-input.disabled * {
cursor: default !important;
}
.selectize-input.focus {
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}
.selectize-input.dropdown-active {
-webkit-border-radius: 3px 3px 0 0;
-moz-border-radius: 3px 3px 0 0;
border-radius: 3px 3px 0 0;
}
.selectize-input > * {
vertical-align: baseline;
display: -moz-inline-stack;
display: inline-block;
zoom: 1;
*display: inline;
}
.selectize-control.multi .selectize-input > div {
cursor: pointer;
margin: 0 4px 4px 0;
padding: 1px 5px;
background: #b8e76f;
color: #3d5d18;
border: 1px solid #74b21e;
}
.selectize-control.multi .selectize-input > div.active {
background: #92c836;
color: #303030;
border: 1px solid #6f9839;
}
.selectize-control.multi .selectize-input.disabled > div,
.selectize-control.multi .selectize-input.disabled > div.active {
color: #878787;
background: #f8f8f8;
border: 1px solid #b4b4b4;
}
.selectize-input > input {
display: inline-block !important;
padding: 0 !important;
min-height: 0 !important;
max-height: none !important;
max-width: 100% !important;
margin: 0 2px 0 0 !important;
text-indent: 0 !important;
border: 0 none !important;
background: none !important;
line-height: inherit !important;
-webkit-user-select: auto !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
}
.selectize-input > input::-ms-clear {
display: none;
}
.selectize-input > input:focus {
outline: none !important;
}
.selectize-input::after {
content: ' ';
display: block;
clear: left;
}
.selectize-input.dropdown-active::before {
content: ' ';
display: block;
position: absolute;
background: #f0f0f0;
height: 1px;
bottom: 0;
left: 0;
right: 0;
}
.selectize-dropdown {
position: absolute;
z-index: 10;
border: 1px solid #d0d0d0;
background: #fff;
margin: -1px 0 0 0;
border-top: 0 none;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
-webkit-border-radius: 0 0 3px 3px;
-moz-border-radius: 0 0 3px 3px;
border-radius: 0 0 3px 3px;
}
.selectize-dropdown [data-selectable] {
cursor: pointer;
overflow: hidden;
}
.selectize-dropdown [data-selectable] .highlight {
background: rgba(255, 237, 40, 0.4);
-webkit-border-radius: 1px;
-moz-border-radius: 1px;
border-radius: 1px;
}
.selectize-dropdown .option,
.selectize-dropdown .optgroup-header {
padding: 7px 10px;
}
.selectize-dropdown .option,
.selectize-dropdown [data-disabled],
.selectize-dropdown [data-disabled] [data-selectable].option {
cursor: inherit;
opacity: 0.5;
}
.selectize-dropdown [data-selectable].option {
opacity: 1;
}
.selectize-dropdown .optgroup:first-child .optgroup-header {
border-top: 0 none;
}
.selectize-dropdown .optgroup-header {
color: #303030;
background: #f8f8f8;
cursor: default;
}
.selectize-dropdown .active {
background-color: #fffceb;
color: #303030;
}
.selectize-dropdown .active.create {
color: #303030;
}
.selectize-dropdown .create {
color: rgba(48, 48, 48, 0.5);
}
.selectize-dropdown-content {
overflow-y: auto;
overflow-x: hidden;
max-height: 200px;
-webkit-overflow-scrolling: touch;
}
.selectize-control.single .selectize-input,
.selectize-control.single .selectize-input input {
cursor: pointer;
}
.selectize-control.single .selectize-input.input-active,
.selectize-control.single .selectize-input.input-active input {
cursor: text;
}
.selectize-control.single .selectize-input:after {
content: ' ';
display: block;
position: absolute;
top: 50%;
right: 15px;
margin-top: -3px;
width: 0;
height: 0;
border-style: solid;
border-width: 5px 5px 0 5px;
border-color: #808080 transparent transparent transparent;
}
.selectize-control.single .selectize-input.dropdown-active:after {
margin-top: -4px;
border-width: 0 5px 5px 5px;
border-color: transparent transparent #808080 transparent;
}
.selectize-control.rtl.single .selectize-input:after {
left: 15px;
right: auto;
}
.selectize-control.rtl .selectize-input > input {
margin: 0 4px 0 -2px !important;
}
.selectize-control .selectize-input.disabled {
opacity: 0.5;
background-color: #fafafa;
}
.selectize-control.multi .selectize-input [data-value] {
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
background-color: #b2e567;
background-image: -moz-linear-gradient(top, #b8e76f, #a9e25c);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b8e76f), to(#a9e25c));
background-image: -webkit-linear-gradient(top, #b8e76f, #a9e25c);
background-image: -o-linear-gradient(top, #b8e76f, #a9e25c);
background-image: linear-gradient(to bottom, #b8e76f, #a9e25c);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffb8e76f', endColorstr='#ffa9e25c', GradientType=0);
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}
.selectize-control.multi .selectize-input [data-value].active {
background-color: #88c332;
background-image: -moz-linear-gradient(top, #92c836, #7abc2c);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#92c836), to(#7abc2c));
background-image: -webkit-linear-gradient(top, #92c836, #7abc2c);
background-image: -o-linear-gradient(top, #92c836, #7abc2c);
background-image: linear-gradient(to bottom, #92c836, #7abc2c);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff92c836', endColorstr='#ff7abc2c', GradientType=0);
}
.selectize-control.single .selectize-input {
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 2px 0 #e0e0e0, 0 3px 0 #c8c8c8, 0 4px 1px rgba(0,0,0,0.1);
box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 2px 0 #e0e0e0, 0 3px 0 #c8c8c8, 0 4px 1px rgba(0,0,0,0.1);
background-color: #f3f3f3;
background-image: -moz-linear-gradient(top, #f5f5f5, #efefef);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#efefef));
background-image: -webkit-linear-gradient(top, #f5f5f5, #efefef);
background-image: -o-linear-gradient(top, #f5f5f5, #efefef);
background-image: linear-gradient(to bottom, #f5f5f5, #efefef);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffefefef', GradientType=0);
}
.selectize-control.single .selectize-input,
.selectize-dropdown.single {
border-color: #b8b8b8;
}
.selectize-dropdown .optgroup-header {
font-weight: bold;
font-size: 0.8em;
border-bottom: 1px solid #f0f0f0;
border-top: 1px solid #f0f0f0;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,16 @@
.selectize-control.plugin-drag_drop {
&.multi > .selectize-input > div.ui-sortable-placeholder {
visibility: visible !important;
background: #f2f2f2 !important;
background: rgba(0,0,0,0.06) !important;
border: 0 none !important;
.selectize-box-shadow(inset 0 0 12px 4px #fff);
}
.ui-sortable-placeholder::after {
content: '!';
visibility: hidden;
}
.ui-sortable-helper {
.selectize-box-shadow(0 2px 5px rgba(0,0,0,0.2));
}
}

View File

@@ -0,0 +1,20 @@
.selectize-dropdown-header {
position: relative;
padding: @selectize-padding-dropdown-item-y @selectize-padding-dropdown-item-x;
border-bottom: 1px solid @selectize-color-border;
background: mix(@selectize-color-dropdown, @selectize-color-border, 85%);
.selectize-border-radius(@selectize-border-radius @selectize-border-radius 0 0);
}
.selectize-dropdown-header-close {
position: absolute;
right: @selectize-padding-dropdown-item-x;
top: 50%;
color: @selectize-color-text;
opacity: 0.4;
margin-top: -12px;
line-height: 20px;
font-size: 20px !important;
}
.selectize-dropdown-header-close:hover {
color: darken(@selectize-color-text, 25%);
}

View File

@@ -0,0 +1,17 @@
.selectize-dropdown.plugin-optgroup_columns {
.optgroup {
border-right: 1px solid #f2f2f2;
border-top: 0 none;
float: left;
.selectize-box-sizing(border-box);
}
.optgroup:last-child {
border-right: 0 none;
}
.optgroup:before {
display: none;
}
.optgroup-header {
border-top: 0 none;
}
}

View File

@@ -0,0 +1,43 @@
.selectize-control.plugin-remove_button {
[data-value] {
position: relative;
padding-right: 24px !important;
}
[data-value] .remove {
z-index: 1; /* fixes ie bug (see #392) */
position: absolute;
top: 0;
right: 0;
bottom: 0;
width: 17px;
text-align: center;
font-weight: bold;
font-size: 12px;
color: inherit;
text-decoration: none;
vertical-align: middle;
display: inline-block;
padding: @selectize-padding-item-y 0 0 0;
border-left: 1px solid @selectize-color-item-border;
.selectize-border-radius(0 2px 2px 0);
.selectize-box-sizing(border-box);
}
[data-value] .remove:hover {
background: rgba(0,0,0,0.05);
}
[data-value].active .remove {
border-left-color: @selectize-color-item-active-border;
}
.disabled [data-value] .remove:hover {
background: none;
}
.disabled [data-value] .remove {
border-left-color: lighten(desaturate(@selectize-color-item-border, 100%), @selectize-lighten-disabled-item-border);
}
.remove-single {
position: absolute;
right: 0;
top: 0;
font-size: 23px;
}
}

View File

@@ -0,0 +1,161 @@
/**
* selectize.bootstrap2.css (v0.12.6) - Bootstrap 2 Theme
* Copyright (c) 20132015 Brian Reavis & contributors
*
* 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
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
* @author Brian Reavis <brian@thirdroute.com>
*/
@import "selectize";
@selectize-font-family: @baseFontFamily;
@selectize-font-size: @baseFontSize;
@selectize-line-height: @baseLineHeight;
@selectize-color-text: @textColor;
@selectize-color-highlight: rgba(255,237,40,0.4);
@selectize-color-input: @inputBackground;
@selectize-color-input-full: @inputBackground;
@selectize-color-disabled: @inputBackground;
@selectize-color-item: @btnBackgroundHighlight;
@selectize-color-item-border: @btnBorder;
@selectize-color-item-active: @dropdownLinkBackgroundHover;
@selectize-color-item-active-text: @dropdownLinkColorHover;
@selectize-color-item-active-border: darken(@selectize-color-item-active, 5%);
@selectize-color-optgroup: @dropdownBackground;
@selectize-color-optgroup-text: @grayLight;
@selectize-color-optgroup-border: @dropdownDividerTop;
@selectize-color-dropdown: @dropdownBackground;
@selectize-color-dropdown-border: @inputBorder;
@selectize-color-dropdown-border-top: @dropdownDividerTop;
@selectize-color-dropdown-item-active: @dropdownLinkBackgroundHover;
@selectize-color-dropdown-item-active-text: @dropdownLinkColorHover;
@selectize-color-dropdown-item-create-active-text: @dropdownLinkColorHover;
@selectize-lighten-disabled-item: 8%;
@selectize-lighten-disabled-item-text: 8%;
@selectize-lighten-disabled-item-border: 8%;
@selectize-opacity-disabled: 0.5;
@selectize-shadow-input: none;
@selectize-shadow-input-focus: inset 0 1px 2px rgba(0,0,0,0.15);
@selectize-border-radius: @inputBorderRadius;
@selectize-padding-x: 10px;
@selectize-padding-y: 7px;
@selectize-padding-dropdown-item-x: @selectize-padding-x;
@selectize-padding-dropdown-item-y: 3px;
@selectize-padding-item-x: 3px;
@selectize-padding-item-y: 1px;
@selectize-margin-item-x: 3px;
@selectize-margin-item-y: 3px;
@selectize-caret-margin: 0;
@selectize-arrow-size: 5px;
@selectize-arrow-color: @black;
@selectize-arrow-offset: @selectize-padding-x + 5px;
@selectize-width-item-border: 1px;
.selectize-dropdown {
margin: 2px 0 0 0;
z-index: @zindexDropdown;
border: 1px solid @dropdownBorder;
border-radius: @baseBorderRadius;
.box-shadow(0 5px 10px rgba(0,0,0,.2));
.optgroup-header {
font-size: 11px;
font-weight: bold;
text-shadow: 0 1px 0 rgba(255,255,255,.5);
text-transform: uppercase;
}
.optgroup:first-child:before {
display: none;
}
.optgroup:before {
content: ' ';
display: block;
.nav-divider();
margin-left: @selectize-padding-dropdown-item-x * -1;
margin-right: @selectize-padding-dropdown-item-x * -1;
}
[data-selectable].active {
#gradient > .vertical(@dropdownLinkBackgroundHover, darken(@dropdownLinkBackgroundHover, 5%));
}
}
.selectize-dropdown-content {
padding: 5px 0;
}
.selectize-dropdown-header {
padding: @selectize-padding-dropdown-item-y * 2 @selectize-padding-dropdown-item-x;
}
.selectize-input {
.transition(~"border linear .2s, box-shadow linear .2s");
&.dropdown-active {
.selectize-border-radius(@selectize-border-radius);
}
&.dropdown-active::before {
display: none;
}
&.input-active, &.input-active:hover, .selectize-control.multi &.focus {
background: @selectize-color-input !important;
border-color: rgba(82,168,236,.8) !important;
outline: 0 !important;
outline: thin dotted \9 !important;
.box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)") !important;
}
}
.selectize-control {
&.single {
.selectize-input {
.buttonBackground(@btnBackground, @btnBackgroundHighlight, @grayDark, 0 1px 1px rgba(255,255,255,.75));
.box-shadow(~"inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
&:hover {
color: @grayDark;
text-decoration: none;
background-position: 0 -15px;
.transition(background-position .1s linear);
}
&.disabled {
background: @btnBackgroundHighlight !important;
.box-shadow(none);
}
}
}
&.multi {
.selectize-input {
.box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
&.has-items {
@padding-x: @selectize-padding-x - @selectize-padding-item-x;
padding-left: @padding-x;
padding-right: @padding-x;
}
}
.selectize-input > div {
.gradientBar(@btnBackground, @btnBackgroundHighlight, @selectize-color-item-text, none);
*background-color: @selectize-color-item;
border: @selectize-width-item-border solid @selectize-color-item-border;
.border-radius(@baseBorderRadius);
.box-shadow(~"inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
&.active {
.box-shadow(~"0 1px 2px rgba(0,0,0,.05)");
.gradientBar(@selectize-color-item-active, @selectize-color-item-active-border, @selectize-color-item-active-text, none);
*background-color: @selectize-color-item-active;
border: @selectize-width-item-border solid @dropdownLinkBackgroundHover;
}
}
}
}

View File

@@ -0,0 +1,150 @@
/**
* selectize.bootstrap3.css (v0.12.6) - Bootstrap 3 Theme
* Copyright (c) 20132015 Brian Reavis & contributors
*
* 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
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
* @author Brian Reavis <brian@thirdroute.com>
*/
@import "selectize";
@selectize-font-family: inherit;
@selectize-font-size: inherit;
@selectize-line-height: @line-height-computed;
@selectize-color-text: @text-color;
@selectize-color-highlight: rgba(255,237,40,0.4);
@selectize-color-input: @input-bg;
@selectize-color-input-full: @input-bg;
@selectize-color-input-error: @state-danger-text;
@selectize-color-input-error-focus: darken(@selectize-color-input-error, 10%);
@selectize-color-disabled: @input-bg;
@selectize-color-item: #efefef;
@selectize-color-item-border: rgba(0,0,0,0);
@selectize-color-item-active: @component-active-bg;
@selectize-color-item-active-text: #fff;
@selectize-color-item-active-border: rgba(0,0,0,0);
@selectize-color-optgroup: @dropdown-bg;
@selectize-color-optgroup-text: @dropdown-header-color;
@selectize-color-optgroup-border: @dropdown-divider-bg;
@selectize-color-dropdown: @dropdown-bg;
@selectize-color-dropdown-border-top: mix(@input-border, @input-bg, 0.8);
@selectize-color-dropdown-item-active: @dropdown-link-hover-bg;
@selectize-color-dropdown-item-active-text: @dropdown-link-hover-color;
@selectize-color-dropdown-item-create-active-text: @dropdown-link-hover-color;
@selectize-opacity-disabled: 0.5;
@selectize-shadow-input: none;
@selectize-shadow-input-focus: inset 0 1px 2px rgba(0,0,0,0.15);
@selectize-shadow-input-error: inset 0 1px 1px rgba(0, 0, 0, .075);
@selectize-shadow-input-error-focus: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px lighten(@selectize-color-input-error, 20%);
@selectize-border: 1px solid @input-border;
@selectize-border-radius: @input-border-radius;
@selectize-width-item-border: 0;
@selectize-padding-x: @padding-base-horizontal;
@selectize-padding-y: @padding-base-vertical;
@selectize-padding-dropdown-item-x: @padding-base-horizontal;
@selectize-padding-dropdown-item-y: 3px;
@selectize-padding-item-x: 3px;
@selectize-padding-item-y: 1px;
@selectize-margin-item-x: 3px;
@selectize-margin-item-y: 3px;
@selectize-caret-margin: 0;
@selectize-arrow-size: 5px;
@selectize-arrow-color: @selectize-color-text;
@selectize-arrow-offset: @selectize-padding-x + 5px;
.selectize-dropdown, .selectize-dropdown.form-control {
height: auto;
padding: 0;
margin: 2px 0 0 0;
z-index: @zindex-dropdown;
background: @selectize-color-dropdown;
border: 1px solid @dropdown-fallback-border;
border: 1px solid @dropdown-border;
.selectize-border-radius(@border-radius-base);
.selectize-box-shadow(0 6px 12px rgba(0,0,0,.175));
}
.selectize-dropdown {
.optgroup-header {
font-size: @font-size-small;
line-height: @line-height-base;
}
.optgroup:first-child:before {
display: none;
}
.optgroup:before {
content: ' ';
display: block;
.nav-divider();
margin-left: @selectize-padding-dropdown-item-x * -1;
margin-right: @selectize-padding-dropdown-item-x * -1;
}
}
.selectize-dropdown-content {
padding: 5px 0;
}
.selectize-dropdown-header {
padding: @selectize-padding-dropdown-item-y * 2 @selectize-padding-dropdown-item-x;
}
.selectize-input {
min-height: @input-height-base;
&.dropdown-active {
.selectize-border-radius(@selectize-border-radius);
}
&.dropdown-active::before {
display: none;
}
&.focus {
@color: @input-border-focus;
@color-rgba: rgba(red(@color), green(@color), blue(@color), .6);
border-color: @color;
outline: 0;
.selectize-box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}");
}
}
.has-error .selectize-input {
border-color: @selectize-color-input-error;
.selectize-box-shadow(@selectize-shadow-input-error);
&:focus {
border-color: @selectize-color-input-error-focus;
.selectize-box-shadow(@selectize-shadow-input-error-focus);
}
}
.selectize-control {
&.multi {
.selectize-input.has-items {
padding-left: @selectize-padding-x - @selectize-padding-item-x;
padding-right: @selectize-padding-x - @selectize-padding-item-x;
}
.selectize-input > div {
.selectize-border-radius(@selectize-border-radius - 1px);
}
}
}
.form-control.selectize-control {
padding: 0;
height: auto;
border: none;
background: none;
.selectize-box-shadow(none);
.selectize-border-radius(0);
}

View File

@@ -0,0 +1,84 @@
/**
* selectize.default.css (v0.12.6) - Default Theme
* Copyright (c) 20132015 Brian Reavis & contributors
*
* 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
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
* @author Brian Reavis <brian@thirdroute.com>
*/
@import "selectize";
@selectize-color-item: #1da7ee;
@selectize-color-item-text: #fff;
@selectize-color-item-active-text: #fff;
@selectize-color-item-border: #0073bb;
@selectize-color-item-active: #92c836;
@selectize-color-item-active-border: #00578d;
@selectize-width-item-border: 1px;
@selectize-caret-margin: 0 1px;
.selectize-control {
&.multi {
.selectize-input {
&.has-items {
@padding-x: @selectize-padding-x - 3px;
padding-left: @padding-x;
padding-right: @padding-x;
}
&.disabled [data-value] {
color: #999;
text-shadow: none;
background: none;
.selectize-box-shadow(none);
&, .remove {
border-color: #e6e6e6;
}
.remove {
background: none;
}
}
[data-value] {
text-shadow: 0 1px 0 rgba(0,51,83,0.3);
.selectize-border-radius(3px);
.selectize-vertical-gradient(#1da7ee, #178ee9);
.selectize-box-shadow(~"0 1px 0 rgba(0,0,0,0.2),inset 0 1px rgba(255,255,255,0.03)");
&.active {
.selectize-vertical-gradient(#008fd8, #0075cf);
}
}
}
}
&.single {
.selectize-input {
.selectize-box-shadow(~"0 1px 0 rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.8)");
.selectize-vertical-gradient(#fefefe, #f2f2f2);
}
}
}
.selectize-control.single .selectize-input, .selectize-dropdown.single {
border-color: #b8b8b8;
}
.selectize-dropdown {
.optgroup-header {
padding-top: @selectize-padding-dropdown-item-y + 2px;
font-weight: bold;
font-size: 0.85em;
}
.optgroup {
border-top: 1px solid @selectize-color-dropdown-border-top;
&:first-child {
border-top: 0 none;
}
}
}

View File

@@ -0,0 +1,75 @@
/**
* selectize.legacy.css (v0.12.6) - Default Theme
* Copyright (c) 20132015 Brian Reavis & contributors
*
* 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
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
* @author Brian Reavis <brian@thirdroute.com>
*/
@import "selectize";
@selectize-font-size: 13px;
@selectize-line-height: 20px;
@selectize-color-input-full: #f2f2f2;
@selectize-color-item: #b8e76f;
@selectize-color-item-text: #3d5d18;
@selectize-color-item-border: #74b21e;
@selectize-color-item-active: #92c836;
@selectize-color-item-active-border: #6f9839;
@selectize-color-highlight: rgba(255,237,40,0.4);
@selectize-color-dropdown-item-active: #fffceb;
@selectize-color-dropdown-item-active-text: @selectize-color-text;
@selectize-color-optgroup: #f8f8f8;
@selectize-color-optgroup-text: @selectize-color-text;
@selectize-width-item-border: 1px;
@selectize-padding-x: 10px;
@selectize-padding-y: 10px;
@selectize-padding-item-x: 5px;
@selectize-padding-item-y: 1px;
@selectize-padding-dropdown-item-x: 10px;
@selectize-padding-dropdown-item-y: 7px;
@selectize-margin-item-x: 4px;
@selectize-margin-item-y: 4px;
.selectize-control {
&.multi {
.selectize-input [data-value] {
text-shadow: 0 1px 0 rgba(255,255,255,0.1);
.selectize-border-radius(3px);
.selectize-vertical-gradient(#b8e76f, #a9e25c);
.selectize-box-shadow(0 1px 1px rgba(0,0,0,0.1));
&.active {
.selectize-vertical-gradient(#92c836, #7abc2c);
}
}
}
&.single {
.selectize-input {
.selectize-box-shadow(~"inset 0 1px 0 rgba(255,255,255,0.8), 0 2px 0 #e0e0e0, 0 3px 0 #c8c8c8, 0 4px 1px rgba(0,0,0,0.1)");
.selectize-vertical-gradient(#f5f5f5, #efefef);
}
}
}
.selectize-control.single .selectize-input, .selectize-dropdown.single {
border-color: #b8b8b8;
}
.selectize-dropdown {
.optgroup-header {
font-weight: bold;
font-size: 0.8em;
border-bottom: 1px solid @selectize-color-dropdown-border-top;
border-top: 1px solid @selectize-color-dropdown-border-top;
}
}

View File

@@ -0,0 +1,303 @@
@import "plugins/drag_drop";
@import "plugins/dropdown_header";
@import "plugins/optgroup_columns";
@import "plugins/remove_button";
// base styles
@selectize-font-family: inherit;
@selectize-font-smoothing: inherit;
@selectize-font-size: 13px;
@selectize-line-height: 18px;
@selectize-color-text: #303030;
@selectize-color-border: #d0d0d0;
@selectize-color-highlight: rgba(125,168,208,0.2);
@selectize-color-input: #fff;
@selectize-color-input-full: @selectize-color-input;
@selectize-color-disabled: #fafafa;
@selectize-color-item: #f2f2f2;
@selectize-color-item-text: @selectize-color-text;
@selectize-color-item-border: #d0d0d0;
@selectize-color-item-active: #e8e8e8;
@selectize-color-item-active-text: @selectize-color-text;
@selectize-color-item-active-border: #cacaca;
@selectize-color-dropdown: #fff;
@selectize-color-dropdown-border: @selectize-color-border;
@selectize-color-dropdown-border-top: #f0f0f0;
@selectize-color-dropdown-item-active: #f5fafd;
@selectize-color-dropdown-item-active-text: #495c68;
@selectize-color-dropdown-item-create-text: rgba(red(@selectize-color-text), green(@selectize-color-text), blue(@selectize-color-text), 0.5);
@selectize-color-dropdown-item-create-active-text: @selectize-color-dropdown-item-active-text;
@selectize-color-optgroup: @selectize-color-dropdown;
@selectize-color-optgroup-text: @selectize-color-text;
@selectize-lighten-disabled-item: 30%;
@selectize-lighten-disabled-item-text: 30%;
@selectize-lighten-disabled-item-border: 30%;
@selectize-opacity-disabled: 0.5;
@selectize-shadow-input: inset 0 1px 1px rgba(0,0,0,0.1);
@selectize-shadow-input-focus: inset 0 1px 2px rgba(0,0,0,0.15);
@selectize-border: 1px solid @selectize-color-border;
@selectize-dropdown-border: 1px solid @selectize-color-dropdown-border;
@selectize-border-radius: 3px;
@selectize-width-item-border: 0;
@selectize-max-height-dropdown: 200px;
@selectize-padding-x: 8px;
@selectize-padding-y: 8px;
@selectize-padding-item-x: 6px;
@selectize-padding-item-y: 2px;
@selectize-padding-dropdown-item-x: @selectize-padding-x;
@selectize-padding-dropdown-item-y: 5px;
@selectize-margin-item-x: 3px;
@selectize-margin-item-y: 3px;
@selectize-arrow-size: 5px;
@selectize-arrow-color: #808080;
@selectize-arrow-offset: 15px;
@selectize-caret-margin: 0 2px 0 0;
@selectize-caret-margin-rtl: 0 4px 0 -2px;
.selectize-border-radius (@radii) {
-webkit-border-radius: @radii;
-moz-border-radius: @radii;
border-radius: @radii;
}
.selectize-unselectable () {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.selectize-box-shadow (@shadow) {
-webkit-box-shadow: @shadow;
box-shadow: @shadow;
}
.selectize-box-sizing (@type: border-box) {
-webkit-box-sizing: @type;
-moz-box-sizing: @type;
box-sizing: @type;
}
.selectize-vertical-gradient (@color-top, @color-bottom) {
background-color: mix(@color-top, @color-bottom, 60%);
background-image: -moz-linear-gradient(top, @color-top, @color-bottom); // FF 3.6+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@color-top), to(@color-bottom)); // Safari 4+, Chrome 2+
background-image: -webkit-linear-gradient(top, @color-top, @color-bottom); // Safari 5.1+, Chrome 10+
background-image: -o-linear-gradient(top, @color-top, @color-bottom); // Opera 11.10
background-image: linear-gradient(to bottom, @color-top, @color-bottom); // Standard, IE10
background-repeat: repeat-x;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb(@color-top),argb(@color-bottom))); // IE9 and down
}
.selectize-control {
position: relative;
}
.selectize-dropdown, .selectize-input, .selectize-input input {
color: @selectize-color-text;
font-family: @selectize-font-family;
font-size: @selectize-font-size;
line-height: @selectize-line-height;
-webkit-font-smoothing: @selectize-font-smoothing;
}
.selectize-input, .selectize-control.single .selectize-input.input-active {
background: @selectize-color-input;
cursor: text;
display: inline-block;
}
.selectize-input {
border: @selectize-border;
padding: @selectize-padding-y @selectize-padding-x;
display: inline-block;
width: 100%;
overflow: hidden;
position: relative;
z-index: 1;
.selectize-box-sizing(border-box);
.selectize-box-shadow(@selectize-shadow-input);
.selectize-border-radius(@selectize-border-radius);
.selectize-control.multi &.has-items {
@padding-x: @selectize-padding-x;
@padding-top: @selectize-padding-y - @selectize-padding-item-y - @selectize-width-item-border;
@padding-bottom: @selectize-padding-y - @selectize-padding-item-y - @selectize-margin-item-y - @selectize-width-item-border;
padding: @padding-top @padding-x @padding-bottom;
}
&.full {
background-color: @selectize-color-input-full;
}
&.disabled, &.disabled * {
cursor: default !important;
}
&.focus {
.selectize-box-shadow(@selectize-shadow-input-focus);
}
&.dropdown-active {
.selectize-border-radius(@selectize-border-radius @selectize-border-radius 0 0);
}
> * {
vertical-align: baseline;
display: -moz-inline-stack;
display: inline-block;
zoom: 1;
*display: inline;
}
.selectize-control.multi & > div {
cursor: pointer;
margin: 0 @selectize-margin-item-x @selectize-margin-item-y 0;
padding: @selectize-padding-item-y @selectize-padding-item-x;
background: @selectize-color-item;
color: @selectize-color-item-text;
border: @selectize-width-item-border solid @selectize-color-item-border;
&.active {
background: @selectize-color-item-active;
color: @selectize-color-item-active-text;
border: @selectize-width-item-border solid @selectize-color-item-active-border;
}
}
.selectize-control.multi &.disabled > div {
&, &.active {
color: lighten(desaturate(@selectize-color-item-text, 100%), @selectize-lighten-disabled-item-text);
background: lighten(desaturate(@selectize-color-item, 100%), @selectize-lighten-disabled-item);
border: @selectize-width-item-border solid lighten(desaturate(@selectize-color-item-border, 100%), @selectize-lighten-disabled-item-border);
}
}
> input {
&::-ms-clear {
display: none;
}
display: inline-block !important;
padding: 0 !important;
min-height: 0 !important;
max-height: none !important;
max-width: 100% !important;
margin: @selectize-caret-margin !important;
text-indent: 0 !important;
border: 0 none !important;
background: none !important;
line-height: inherit !important;
-webkit-user-select: auto !important;
.selectize-box-shadow(none) !important;
&:focus { outline: none !important; }
}
}
.selectize-input::after {
content: ' ';
display: block;
clear: left;
}
.selectize-input.dropdown-active::before {
content: ' ';
display: block;
position: absolute;
background: @selectize-color-dropdown-border-top;
height: 1px;
bottom: 0;
left: 0;
right: 0;
}
.selectize-dropdown {
position: absolute;
z-index: 10;
border: @selectize-dropdown-border;
background: @selectize-color-dropdown;
margin: -1px 0 0 0;
border-top: 0 none;
.selectize-box-sizing(border-box);
.selectize-box-shadow(0 1px 3px rgba(0,0,0,0.1));
.selectize-border-radius(0 0 @selectize-border-radius @selectize-border-radius);
[data-selectable] {
cursor: pointer;
overflow: hidden;
.highlight {
background: @selectize-color-highlight;
.selectize-border-radius(1px);
}
}
.option, .optgroup-header {
padding: @selectize-padding-dropdown-item-y @selectize-padding-dropdown-item-x;
}
.option, [data-disabled], [data-disabled] [data-selectable].option {
cursor: inherit;
opacity: 0.5;
}
[data-selectable].option {
opacity: 1;
}
.optgroup:first-child .optgroup-header {
border-top: 0 none;
}
.optgroup-header {
color: @selectize-color-optgroup-text;
background: @selectize-color-optgroup;
cursor: default;
}
.active {
background-color: @selectize-color-dropdown-item-active;
color: @selectize-color-dropdown-item-active-text;
&.create {
color: @selectize-color-dropdown-item-create-active-text;
}
}
.create {
color: @selectize-color-dropdown-item-create-text;
}
}
.selectize-dropdown-content {
overflow-y: auto;
overflow-x: hidden;
max-height: @selectize-max-height-dropdown;
-webkit-overflow-scrolling: touch;
}
.selectize-control.single .selectize-input {
&, input { cursor: pointer; }
&.input-active, &.input-active input { cursor: text; }
&:after {
content: ' ';
display: block;
position: absolute;
top: 50%;
right: @selectize-arrow-offset;
margin-top: round((-1 * @selectize-arrow-size / 2));
width: 0;
height: 0;
border-style: solid;
border-width: @selectize-arrow-size @selectize-arrow-size 0 @selectize-arrow-size;
border-color: @selectize-arrow-color transparent transparent transparent;
}
&.dropdown-active:after {
margin-top: @selectize-arrow-size * -0.8;
border-width: 0 @selectize-arrow-size @selectize-arrow-size @selectize-arrow-size;
border-color: transparent transparent @selectize-arrow-color transparent;
}
}
.selectize-control.rtl {
&.single .selectize-input:after {
left: @selectize-arrow-offset;
right: auto;
}
.selectize-input > input {
margin: @selectize-caret-margin-rtl !important;
}
}
.selectize-control .selectize-input.disabled {
opacity: @selectize-opacity-disabled;
background-color: @selectize-color-disabled;
}

107
bower_components/selectize/karma.conf.js vendored Normal file
View File

@@ -0,0 +1,107 @@
module.exports = function(config) {
// workaround for https://github.com/karma-runner/karma-sauce-launcher/issues/40
var saucelabsBatchID = Number(process.env.SAUCELABS_BATCH) - 1;
var saucelabsConcurrency = 4;
var saucelabsBrowsers = [
// mobile
{platform: 'OS X 10.10', browserName: 'iPhone', version: '8.1'},
//{platform: 'OS X 10.10 ', browserName: 'iPhone', version: '6.0'},
{platform: 'OS X 10.10', browserName: 'iPad', version: '8.1'},
//{platform: 'OS X 10.10', browserName: 'iPad', version: '6.0'},
{platform: 'Linux', browserName: 'android', version: '4.4'},
{platform: 'Linux', browserName: 'android', version: '4.3'},
// desktop (safari)
{platform: 'OS X 10.8', browserName: 'safari', version: 6},
{platform: 'OS X 10.9', browserName: 'safari', version: 7},
{platform: 'OS X 10.10', browserName: 'safari', version: 8},
// desktop (chrome)
{platform: 'OS X 10.10', browserName: 'chrome', version: 39},
{platform: 'OS X 10.10', browserName: 'chrome', version: 38},
{platform: 'OS X 10.10', browserName: 'chrome', version: 37},
{platform: 'Windows 7', browserName: 'chrome', version: 39},
{platform: 'Windows 7', browserName: 'chrome', version: 38},
{platform: 'Windows 7', browserName: 'chrome', version: 37},
// desktop (firefox)
{platform: 'Windows 7', browserName: 'firefox', version: 35},
{platform: 'Windows 8', browserName: 'firefox', version: 35},
{platform: 'OS X 10.10', browserName: 'firefox', version: 34},
{platform: 'OS X 10.10', browserName: 'firefox', version: 33},
{platform: 'OS X 10.10', browserName: 'firefox', version: 32},
// desktop (internet explorer)
{platform: 'Windows 8', browserName: 'iexplore', version: 10},
{platform: 'Windows 8.1', browserName: 'iexplore', version: 11},
{platform: 'Windows 7', browserName: 'iexplore', version: 9}
];
if (process.env.TARGET === 'saucelabs') {
saucelabsBrowsers = saucelabsBrowsers.slice(saucelabsBatchID * saucelabsConcurrency, saucelabsBatchID * saucelabsConcurrency + saucelabsConcurrency);
if (!saucelabsBrowsers.length) process.exit(0);
}
var customLaunchers = {};
saucelabsBrowsers.forEach(function(browser, i) {
browser.base = 'SauceLabs';
customLaunchers['SL_' + i] = browser;
});
var targets = {
'saucelabs': Object.keys(customLaunchers),
'phantomjs': ['PhantomJS']
};
var reporters = ['mocha'];
if (process.env.TRAVIS_CI) {
reporters = process.env.TARGET === 'saucelabs'
? ['saucelabs', 'mocha']
: ['mocha', 'coverage', 'coveralls']
}
var browsers = targets[process.env.TARGET || 'phantomjs'];
if (process.env.BROWSERS) {
browsers = process.env.BROWSERS.split(',');
}
config.set({
frameworks: ['mocha', 'chai'],
files: [
'dist/css/selectize.default.css',
'node_modules/jquery/dist/jquery.js',
'node_modules/microplugin/src/microplugin.js',
'node_modules/sifter/sifter.js',
'test/support/*.js',
'src/contrib/*.js',
'src/constants.js',
'src/utils.js',
'src/selectize.js',
'src/defaults.js',
'src/selectize.jquery.js',
'test/*.js'
],
preprocessors: {
'src/*.js': ['coverage']
},
coverageReporter: {
type: process.env.TRAVIS_CI && process.env.TARGET === 'phantomjs' ? 'lcov' : 'text-summary',
dir: 'coverage/'
},
sauceLabs: {
recordVideo: false,
startConnect: true,
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER,
build: process.env.TRAVIS_BUILD_NUMBER,
testName: process.env.COMMIT_MESSAGE,
tags: ['selectize', 'test']
},
customLaunchers: customLaunchers,
reporters: reporters,
port: 8888,
colors: true,
captureTimeout: 0,
logLevel: config.LOG_INFO,
browsers: browsers,
browserDisconnectTolerance: 2,
browserDisconnectTimeout: 10000,
browserNoActivityTimeout: 120000,
singleRun: true
});
};

9415
bower_components/selectize/package-lock.json generated vendored Normal file

File diff suppressed because it is too large Load Diff

4122
bower_components/selectize/yarn.lock vendored Normal file

File diff suppressed because it is too large Load Diff

44
bower_components/sifter/.bower.json vendored Normal file
View File

@@ -0,0 +1,44 @@
{
"name": "sifter",
"keywords": [
"search",
"filter",
"sift",
"data",
"results",
"match",
"sort",
"autocomplete"
],
"description": "A library for textually searching arrays and hashes of objects by property (or multiple properties). Designed specifically for autocomplete.",
"version": "0.5.3",
"license": "Apache License, Version 2.0",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/brianreavis/sifter.js.git"
},
"main": [
"sifter.js"
],
"ignore": [
"Makefile",
"test",
"lib",
"bin",
"benchmark",
"node_modules",
".travis.yml"
],
"dependencies": {},
"homepage": "https://github.com/brianreavis/sifter.js",
"_release": "0.5.3",
"_resolution": {
"type": "version",
"tag": "v0.5.3",
"commit": "2a9c84ec5ac63ceaa4516205e013113626d36a2d"
},
"_source": "https://github.com/brianreavis/sifter.js.git",
"_target": "0.5.x",
"_originalSource": "sifter"
}

4
bower_components/sifter/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
.DS_store
node_modules
benchmark/report.json
coverage

4
bower_components/sifter/.npmignore vendored Normal file
View File

@@ -0,0 +1,4 @@
*.md
.git*
benchmark/
test/

155
bower_components/sifter/README.md vendored Normal file
View File

@@ -0,0 +1,155 @@
# sifter.js
[![NPM version](http://img.shields.io/npm/v/sifter.svg?style=flat)](https://www.npmjs.org/package/sifter)
[![Installs](http://img.shields.io/npm/dm/sifter.svg?style=flat)](https://www.npmjs.org/package/sifter)
[![Build Status](https://travis-ci.org/brianreavis/sifter.js.svg)](https://travis-ci.org/brianreavis/sifter.js)
[![Coverage Status](http://img.shields.io/coveralls/brianreavis/sifter.js/master.svg?style=flat)](https://coveralls.io/r/brianreavis/sifter.js)
Sifter is a client and server-side library (via [UMD](https://github.com/umdjs/umd)) for textually searching arrays and hashes of objects by property or multiple properties. It's designed specifically for autocomplete. The process is three-step: *score*, *filter*, *sort*.
* **Supports díåcritîçs.**<br>For example, if searching for "montana" and an item in the set has a value of "montaña", it will still be matched. Sorting will also play nicely with diacritics.
* **Smart scoring.**<br>Items are scored / sorted intelligently depending on where a match is found in the string (how close to the beginning) and what percentage of the string matches.
* **Multi-field sorting.**<br>When scores aren't enough to go by like when getting results for an empty query it can sort by one or more fields. For example, sort by a person's first name and last name without actually merging the properties to a single string.
* **Nested properties.**<br>Allows to search and sort on nested properties so you can perform search on complex objects without flattening them simply by using dot-notation to reference fields (ie. `nested.property`).
```sh
$ npm install sifter # node.js
$ bower install sifter # browser
```
## Usage
```js
var sifter = new Sifter([
{title: 'Annapurna I', location: 'Nepal', continent: 'Asia'},
{title: 'Annapurna II', location: 'Nepal', continent: 'Asia'},
{title: 'Annapurna III', location: 'Nepal', continent: 'Asia'},
{title: 'Eiger', location: 'Switzerland', continent: 'Europe'},
{title: 'Everest', location: 'Nepal', continent: 'Asia'},
{title: 'Gannett', location: 'Wyoming', continent: 'North America'},
{title: 'Denali', location: 'Alaska', continent: 'North America'}
]);
var result = sifter.search('anna', {
fields: ['title', 'location', 'continent'],
sort: [{field: 'title', direction: 'asc'}],
limit: 3
});
```
Seaching will provide back meta information and an "items" array that contains objects with the index (or key, if searching a hash) and a score that represents how good of a match the item was. Items that did not match will not be returned.
```
{"score": 0.2878787878787879, "id": 0},
{"score": 0.27777777777777773, "id": 1},
{"score": 0.2692307692307692, "id": 2}
```
Items are sorted by best-match, primarily. If two or more items have the same score (which will be the case when searching with an empty string), it will resort to the fields listed in the "sort" option.
The full result comes back in the format of:
```js
{
"options": {
"fields": ["title", "location", "continent"],
"sort": [
{"field": "title", "direction": "asc"}
],
"limit": 3
},
"query": "anna",
"tokens": [{
"string": "anna",
"regex": /[aÀÁÂÃÄÅàáâãäå][nÑñ][nÑñ][aÀÁÂÃÄÅàáâãäå]/
}],
"total": 3,
"items": [
{"score": 0.2878787878787879, "id": 0},
{"score": 0.27777777777777773, "id": 1},
{"score": 0.2692307692307692,"id": 2}
]
}
```
### API
#### #.search(query, options)
Performs a search for `query` with the provided `options`.
<table width="100%">
<tr>
<th align="left">Option</th>
<th align="left">Type</th>
<th align="left" width="100%">Description</th>
</tr>
<tr>
<td valign="top"><code>fields</code></td>
<td valign="top">array</td>
<td valign="top">An array of property names to be searched.</td>
</tr>
<tr>
<td valign="top"><code>limit</code></td>
<td valign="top">integer</td>
<td valign="top">The maximum number of results to return.</td>
</tr>
<tr>
<td valign="top"><code>sort</code></td>
<td valign="top">array</td>
<td valign="top">An array of fields to sort by. Each item should be an object containing at least a <code>"field"</code> property. Optionally, <code>direction</code> can be set to <code>"asc"</code> or <code>"desc"</code>. The order of the array defines the sort precedence.<br><br>Unless present, a special <code>"$score"</code> property will be automatically added to the beginning of the sort list. This will make results sorted primarily by match quality (descending).</td>
</tr>
<tr>
<td valign="top"><code>sort_empty</code></td>
<td valign="top">array</td>
<td valign="top">Optional. Defaults to "sort" setting. If provided, these sort settings are used when no query is present.</td>
</tr>
<tr>
<td valign="top"><code>filter</code></td>
<td valign="top">boolean</td>
<td valign="top">If <code>false</code>, items with a score of zero will <em>not</em> be filtered out of the result-set.</td>
</tr>
<tr>
<td valign="top"><code>conjunction</code></td>
<td valign="top">string</td>
<td valign="top">Determines how multiple search terms are joined (<code>"and"</code> or <code>"or"</code>, defaults to <code>"or"</code>).</td>
</tr>
<tr>
<td valign="top"><code>nesting</code></td>
<td valign="top">boolean</td>
<td valign="top">If <code>true</code>, nested fields will be available for search and sort using dot-notation to reference them (e.g. <code>nested.property</code>)<br><em>Warning: can reduce performance</em></td>
</tr>
</table>
## CLI
![CLI](http://i.imgur.com/fSQBnWZ.png)
Sifter comes with a command line interface that's useful for testing on datasets. It accepts JSON and CSV data, either from a file or from stdin (unix pipes). If using CSV data, the first line of the file must be a header row.
```sh
$ npm install -g sifter
```
```sh
$ cat file.csv | sifter --query="ant" --fields=title
$ sifter --query="ant" --fields=title --file=file.csv
```
## Contributing
Install the dependencies that are required to build and test:
```sh
$ npm install
```
First build a copy with `make` then run the test suite with `make test`.
When issuing a pull request, please exclude "sifter.js" and "sifter.min.js" in the project root.
## License
Copyright &copy; 20132015 [Brian Reavis](http://twitter.com/brianreavis) & [Contributors](https://github.com/brianreavis/sifter.js/graphs/contributors)
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
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

23
bower_components/sifter/bower.json vendored Normal file
View File

@@ -0,0 +1,23 @@
{
"name": "sifter",
"keywords": ["search","filter","sift","data","results","match","sort","autocomplete"],
"description": "A library for textually searching arrays and hashes of objects by property (or multiple properties). Designed specifically for autocomplete.",
"version": "0.5.3",
"license": "Apache License, Version 2.0",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/brianreavis/sifter.js.git"
},
"main": ["sifter.js"],
"ignore": [
"Makefile",
"test",
"lib",
"bin",
"benchmark",
"node_modules",
".travis.yml"
],
"dependencies": {}
}

43
bower_components/sifter/package.json vendored Normal file
View File

@@ -0,0 +1,43 @@
{
"name": "sifter",
"keywords": [
"search",
"filter",
"sift",
"data",
"results",
"match",
"sort",
"autocomplete"
],
"description": "A library for textually searching arrays and hashes of objects by property (or multiple properties). Designed specifically for autocomplete.",
"version": "0.5.3",
"license": "Apache-2.0",
"author": "Brian Reavis <brian@thirdroute.com>",
"main": "./sifter.js",
"repository": {
"type": "git",
"url": "git://github.com/brianreavis/sifter.js.git"
},
"scripts": {
"test": "mocha -R list"
},
"bin": {
"sifter": "./bin/sifter.js"
},
"dependencies": {
"optimist": "^0.6.1",
"cardinal": "^1.0.0",
"async": "^2.6.0",
"humanize": "^0.0.9",
"csv-parse": "^2.0.0"
},
"devDependencies": {
"coveralls": "^3.0.0",
"istanbul": "^0.4.5",
"mocha": "^4.0.1",
"mocha-istanbul": "^0.3.0",
"mocha-lcov-reporter": "^1.3.0",
"uglify-js": "^3.2.0"
}
}

498
bower_components/sifter/sifter.js vendored Normal file
View File

@@ -0,0 +1,498 @@
/**
* sifter.js
* Copyright (c) 2013 Brian Reavis & contributors
*
* 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
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
* ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*
* @author Brian Reavis <brian@thirdroute.com>
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define(factory);
} else if (typeof exports === 'object') {
module.exports = factory();
} else {
root.Sifter = factory();
}
}(this, function() {
/**
* Textually searches arrays and hashes of objects
* by property (or multiple properties). Designed
* specifically for autocomplete.
*
* @constructor
* @param {array|object} items
* @param {object} items
*/
var Sifter = function(items, settings) {
this.items = items;
this.settings = settings || {diacritics: true};
};
/**
* Splits a search string into an array of individual
* regexps to be used to match results.
*
* @param {string} query
* @returns {array}
*/
Sifter.prototype.tokenize = function(query) {
query = trim(String(query || '').toLowerCase());
if (!query || !query.length) return [];
var i, n, regex, letter;
var tokens = [];
var words = query.split(/ +/);
for (i = 0, n = words.length; i < n; i++) {
regex = escape_regex(words[i]);
if (this.settings.diacritics) {
for (letter in DIACRITICS) {
if (DIACRITICS.hasOwnProperty(letter)) {
regex = regex.replace(new RegExp(letter, 'g'), DIACRITICS[letter]);
}
}
}
tokens.push({
string : words[i],
regex : new RegExp(regex, 'i')
});
}
return tokens;
};
/**
* Iterates over arrays and hashes.
*
* ```
* this.iterator(this.items, function(item, id) {
* // invoked for each item
* });
* ```
*
* @param {array|object} object
*/
Sifter.prototype.iterator = function(object, callback) {
var iterator;
if (is_array(object)) {
iterator = Array.prototype.forEach || function(callback) {
for (var i = 0, n = this.length; i < n; i++) {
callback(this[i], i, this);
}
};
} else {
iterator = function(callback) {
for (var key in this) {
if (this.hasOwnProperty(key)) {
callback(this[key], key, this);
}
}
};
}
iterator.apply(object, [callback]);
};
/**
* Returns a function to be used to score individual results.
*
* Good matches will have a higher score than poor matches.
* If an item is not a match, 0 will be returned by the function.
*
* @param {object|string} search
* @param {object} options (optional)
* @returns {function}
*/
Sifter.prototype.getScoreFunction = function(search, options) {
var self, fields, tokens, token_count, nesting;
self = this;
search = self.prepareSearch(search, options);
tokens = search.tokens;
fields = search.options.fields;
token_count = tokens.length;
nesting = search.options.nesting;
/**
* Calculates how close of a match the
* given value is against a search token.
*
* @param {mixed} value
* @param {object} token
* @return {number}
*/
var scoreValue = function(value, token) {
var score, pos;
if (!value) return 0;
value = String(value || '');
pos = value.search(token.regex);
if (pos === -1) return 0;
score = token.string.length / value.length;
if (pos === 0) score += 0.5;
return score;
};
/**
* Calculates the score of an object
* against the search query.
*
* @param {object} token
* @param {object} data
* @return {number}
*/
var scoreObject = (function() {
var field_count = fields.length;
if (!field_count) {
return function() { return 0; };
}
if (field_count === 1) {
return function(token, data) {
return scoreValue(getattr(data, fields[0], nesting), token);
};
}
return function(token, data) {
for (var i = 0, sum = 0; i < field_count; i++) {
sum += scoreValue(getattr(data, fields[i], nesting), token);
}
return sum / field_count;
};
})();
if (!token_count) {
return function() { return 0; };
}
if (token_count === 1) {
return function(data) {
return scoreObject(tokens[0], data);
};
}
if (search.options.conjunction === 'and') {
return function(data) {
var score;
for (var i = 0, sum = 0; i < token_count; i++) {
score = scoreObject(tokens[i], data);
if (score <= 0) return 0;
sum += score;
}
return sum / token_count;
};
} else {
return function(data) {
for (var i = 0, sum = 0; i < token_count; i++) {
sum += scoreObject(tokens[i], data);
}
return sum / token_count;
};
}
};
/**
* Returns a function that can be used to compare two
* results, for sorting purposes. If no sorting should
* be performed, `null` will be returned.
*
* @param {string|object} search
* @param {object} options
* @return function(a,b)
*/
Sifter.prototype.getSortFunction = function(search, options) {
var i, n, self, field, fields, fields_count, multiplier, multipliers, get_field, implicit_score, sort;
self = this;
search = self.prepareSearch(search, options);
sort = (!search.query && options.sort_empty) || options.sort;
/**
* Fetches the specified sort field value
* from a search result item.
*
* @param {string} name
* @param {object} result
* @return {mixed}
*/
get_field = function(name, result) {
if (name === '$score') return result.score;
return getattr(self.items[result.id], name, options.nesting);
};
// parse options
fields = [];
if (sort) {
for (i = 0, n = sort.length; i < n; i++) {
if (search.query || sort[i].field !== '$score') {
fields.push(sort[i]);
}
}
}
// the "$score" field is implied to be the primary
// sort field, unless it's manually specified
if (search.query) {
implicit_score = true;
for (i = 0, n = fields.length; i < n; i++) {
if (fields[i].field === '$score') {
implicit_score = false;
break;
}
}
if (implicit_score) {
fields.unshift({field: '$score', direction: 'desc'});
}
} else {
for (i = 0, n = fields.length; i < n; i++) {
if (fields[i].field === '$score') {
fields.splice(i, 1);
break;
}
}
}
multipliers = [];
for (i = 0, n = fields.length; i < n; i++) {
multipliers.push(fields[i].direction === 'desc' ? -1 : 1);
}
// build function
fields_count = fields.length;
if (!fields_count) {
return null;
} else if (fields_count === 1) {
field = fields[0].field;
multiplier = multipliers[0];
return function(a, b) {
return multiplier * cmp(
get_field(field, a),
get_field(field, b)
);
};
} else {
return function(a, b) {
var i, result, a_value, b_value, field;
for (i = 0; i < fields_count; i++) {
field = fields[i].field;
result = multipliers[i] * cmp(
get_field(field, a),
get_field(field, b)
);
if (result) return result;
}
return 0;
};
}
};
/**
* Parses a search query and returns an object
* with tokens and fields ready to be populated
* with results.
*
* @param {string} query
* @param {object} options
* @returns {object}
*/
Sifter.prototype.prepareSearch = function(query, options) {
if (typeof query === 'object') return query;
options = extend({}, options);
var option_fields = options.fields;
var option_sort = options.sort;
var option_sort_empty = options.sort_empty;
if (option_fields && !is_array(option_fields)) options.fields = [option_fields];
if (option_sort && !is_array(option_sort)) options.sort = [option_sort];
if (option_sort_empty && !is_array(option_sort_empty)) options.sort_empty = [option_sort_empty];
return {
options : options,
query : String(query || '').toLowerCase(),
tokens : this.tokenize(query),
total : 0,
items : []
};
};
/**
* Searches through all items and returns a sorted array of matches.
*
* The `options` parameter can contain:
*
* - fields {string|array}
* - sort {array}
* - score {function}
* - filter {bool}
* - limit {integer}
*
* Returns an object containing:
*
* - options {object}
* - query {string}
* - tokens {array}
* - total {int}
* - items {array}
*
* @param {string} query
* @param {object} options
* @returns {object}
*/
Sifter.prototype.search = function(query, options) {
var self = this, value, score, search, calculateScore;
var fn_sort;
var fn_score;
search = this.prepareSearch(query, options);
options = search.options;
query = search.query;
// generate result scoring function
fn_score = options.score || self.getScoreFunction(search);
// perform search and sort
if (query.length) {
self.iterator(self.items, function(item, id) {
score = fn_score(item);
if (options.filter === false || score > 0) {
search.items.push({'score': score, 'id': id});
}
});
} else {
self.iterator(self.items, function(item, id) {
search.items.push({'score': 1, 'id': id});
});
}
fn_sort = self.getSortFunction(search, options);
if (fn_sort) search.items.sort(fn_sort);
// apply limits
search.total = search.items.length;
if (typeof options.limit === 'number') {
search.items = search.items.slice(0, options.limit);
}
return search;
};
// utilities
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
var cmp = function(a, b) {
if (typeof a === 'number' && typeof b === 'number') {
return a > b ? 1 : (a < b ? -1 : 0);
}
a = asciifold(String(a || ''));
b = asciifold(String(b || ''));
if (a > b) return 1;
if (b > a) return -1;
return 0;
};
var extend = function(a, b) {
var i, n, k, object;
for (i = 1, n = arguments.length; i < n; i++) {
object = arguments[i];
if (!object) continue;
for (k in object) {
if (object.hasOwnProperty(k)) {
a[k] = object[k];
}
}
}
return a;
};
/**
* A property getter resolving dot-notation
* @param {Object} obj The root object to fetch property on
* @param {String} name The optionally dotted property name to fetch
* @param {Boolean} nesting Handle nesting or not
* @return {Object} The resolved property value
*/
var getattr = function(obj, name, nesting) {
if (!obj || !name) return;
if (!nesting) return obj[name];
var names = name.split(".");
while(names.length && (obj = obj[names.shift()]));
return obj;
};
var trim = function(str) {
return (str + '').replace(/^\s+|\s+$|/g, '');
};
var escape_regex = function(str) {
return (str + '').replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1');
};
var is_array = Array.isArray || (typeof $ !== 'undefined' && $.isArray) || function(object) {
return Object.prototype.toString.call(object) === '[object Array]';
};
var DIACRITICS = {
'a': '[aḀḁĂăÂâǍǎȺⱥȦȧẠạÄäÀàÁáĀāÃãÅåąĄÃąĄ]',
'b': '[b␢βΒB฿𐌁ᛒ]',
'c': '[cĆćĈĉČčĊċC̄c̄ÇçḈḉȻȼƇƈɕ]',
'd': '[dĎďḊḋḐḑḌḍḒḓḎḏĐđD̦d̦ƉɖƊɗƋƌᵭᶁᶑȡᴅð]',
'e': '[eÉéÈèÊêḘḙĚěĔĕẼẽḚḛẺẻĖėËëĒēȨȩĘęᶒɆɇȄȅẾếỀềỄễỂểḜḝḖḗḔḕȆȇẸẹỆệⱸᴇɘǝƏƐε]',
'f': '[fƑƒḞḟ]',
'g': '[gɢ₲ǤǥĜĝĞğĢģƓɠĠġ]',
'h': '[hĤĥĦħḨḩẖẖḤḥḢḣɦʰǶƕ]',
'i': '[iÍíÌìĬĭÎîǏǐÏïḮḯĨĩĮįĪīỈỉȈȉȊȋỊịḬḭƗɨɨ̆ᵻᶖİiIıɪ]',
'j': '[jȷĴĵɈɉʝɟʲ]',
'k': '[kƘƙꝀꝁḰḱǨǩḲḳḴḵκϰ₭]',
'l': '[lŁłĽľĻļĹĺḶḷḸḹḼḽḺḻĿŀȽƚⱠⱡⱢɫɬᶅɭȴʟ]',
'n': '[nŃńǸǹŇňÑñṄṅŅņṆṇṊṋṈṉN̈n̈ƝɲȠƞᵰᶇɳȵɴŊŋ]',
'o': '[oØøÖöÓóÒòÔôǑǒŐőŎŏȮȯỌọƟɵƠơỎỏŌōÕõǪǫȌȍՕօ]',
'p': '[pṔṕṖṗⱣᵽƤƥᵱ]',
'q': '[qꝖꝗʠɊɋꝘꝙq̃]',
'r': '[rŔŕɌɍŘřŖŗṘṙȐȑȒȓṚṛⱤɽ]',
's': '[sŚśṠṡṢṣꞨꞩŜŝŠšŞşȘșS̈s̈]',
't': '[tŤťṪṫŢţṬṭƮʈȚțṰṱṮṯƬƭ]',
'u': '[uŬŭɄʉỤụÜüÚúÙùÛûǓǔŰűŬŭƯưỦủŪūŨũŲųȔȕ]',
'v': '[vṼṽṾṿƲʋꝞꝟⱱʋ]',
'w': '[wẂẃẀẁŴŵẄẅẆẇẈẉ]',
'x': '[xẌẍẊẋχ]',
'y': '[yÝýỲỳŶŷŸÿỸỹẎẏỴỵɎɏƳƴ]',
'z': '[zŹźẐẑŽžŻżẒẓẔẕƵƶ]'
};
var asciifold = (function() {
var i, n, k, chunk;
var foreignletters = '';
var lookup = {};
for (k in DIACRITICS) {
if (DIACRITICS.hasOwnProperty(k)) {
chunk = DIACRITICS[k].substring(2, DIACRITICS[k].length - 1);
foreignletters += chunk;
for (i = 0, n = chunk.length; i < n; i++) {
lookup[chunk.charAt(i)] = k;
}
}
}
var regexp = new RegExp('[' + foreignletters + ']', 'g');
return function(str) {
return str.replace(regexp, function(foreignletter) {
return lookup[foreignletter];
}).toLowerCase();
};
})();
// export
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
return Sifter;
}));

2
bower_components/sifter/sifter.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -5,10 +5,10 @@
<div class="panel-body">
<form class="form-inline" role="form" onsubmit="return validateForm()">
<div id="ConnectionIPForm" class="form-group has-warning" align="center">
<div id="ConnectionIPForm" class="form-group" align="center">
<span>
<label id="ConnectionIPLabel" class="control-label" for="inputWarning">
Connection Warning
Connect To:
</label>
</span>
@@ -16,7 +16,7 @@
<div class="input-group">
<input type="text" id="ConnectionIPInput" class="form-control" placeholder="ROS Bridge Master IP" placeholder="No IP Address yet">
<span class="input-group-btn">
<button id="ConnectionButton" type="button" onclick="ros.attemptConnection()" class="btn btn-warning">
<button id="ConnectionButton" type="button" onclick="ros.attemptConnection()" class="btn btn-primary">
Connect
<script type="text/javascript">
document.getElementById("ConnectionIPInput").value = ros.connectionName;

View File

@@ -1,5 +1,5 @@
<div>
<div id="coordinator">
<div class="col-md-6">
<div class="hand-panel panel panel-default">
<div class="panel-heading">
@@ -18,7 +18,7 @@
<ul class="list-group list-group-horizontal">
<li id="left_safetyRunning" class="list-group-item">
<div class="pretty p-default p-round">
<input type="checkbox" />
<input type="checkbox" class="disabled"/>
<div class="state p-success-o">
<label>Running</label>
</div>
@@ -26,7 +26,7 @@
</li>
<li id="left_safetyStopped" class="list-group-item">
<div class="pretty p-default p-round">
<input type="checkbox" />
<input type="checkbox" class="disabled"/>
<div class="state p-success-o">
<label>Stopped</label>
</div>
@@ -53,7 +53,7 @@
<ul class="list-group list-group-horizontal">
<li id="left_frankaModeOther" class="list-group-item">
<div class="pretty p-default p-round">
<input type="checkbox" />
<input type="checkbox" class="disabled"/>
<div class="state p-success-o">
<label>Other</label>
</div>
@@ -61,7 +61,7 @@
</li>
<li id="left_frankaModeIdle" class="list-group-item">
<div class="pretty p-default p-round">
<input type="checkbox" />
<input type="checkbox" class="disabled"/>
<div class="state p-success-o">
<label>Idle</label>
</div>
@@ -69,7 +69,7 @@
</li>
<li id="left_frankaModeMove" class="list-group-item">
<div class="pretty p-default p-round">
<input type="checkbox" />
<input type="checkbox" class="disabled"/>
<div class="state p-success-o">
<label>Move</label>
</div>
@@ -77,7 +77,7 @@
</li>
<li id="left_frankaModeGuiding" class="list-group-item">
<div class="pretty p-default p-round">
<input type="checkbox" />
<input type="checkbox" class="disabled"/>
<div class="state p-success-o">
<label>Guiding</label>
</div>
@@ -85,7 +85,7 @@
</li>
<li id="left_frankaModeReflex" class="list-group-item">
<div class="pretty p-default p-round">
<input type="checkbox" />
<input type="checkbox" class="disabled"/>
<div class="state p-success-o">
<label>Reflex</label>
</div>
@@ -93,7 +93,7 @@
</li>
<li id="left_frankaModeUserStopped" class="list-group-item">
<div class="pretty p-default p-round">
<input type="checkbox" />
<input type="checkbox" class="disabled"/>
<div class="state p-success-o">
<label>User Stopped</label>
</div>
@@ -101,7 +101,7 @@
</li>
<li id="left_frankaModeErrorRecovery" class="list-group-item">
<div class="pretty p-default p-round">
<input type="checkbox" />
<input type="checkbox" class="disabled"/>
<div class="state p-success-o">
<label>Automatic Error Recovery</label>
</div>
@@ -279,42 +279,27 @@
</div>
</div>
<div class="control-container col-md-6">
<div class="control-card panel panel-default">
<div class="control-card panel panel-default execution-control">
<div class="panel-heading">
Execution Mode Operations
Play Mode Operations
<i class="fas fa-info-circle"></i>
</div>
<div class="panel-body text-center">
<div class="button-area">
<button type="button" onclick="triggerService('/left/aescape/mode/activateReadyController')" class="btn col-md-4">
<button type="button" onclick="triggerService('/left/aescape/mode/activateReadyController')" class="btn col-md-3">
Activate Ready Mode
</button>
<!--<button id="executionLoadButton" type="button" onclick="triggerService('/aescape/bags/startPlayingLastRecording')" class="btn btn-primary">
<button id="executionLoadButton" type="button" onclick="triggerService('/aescape/bags/startPlayingLastRecording')" class="btn btn-primary col-md-3">
Load Last Recording
</button>-->
<button id="executionStartButton" type="button" onclick="triggerService('/left/aescape/mode/activateExecutionController'); triggerTopic('/left/run_trajectory')" class="btn btn-primary col-md-4">
</button>
<button id="executionStartButton" type="button" onclick="triggerService('/left/aescape/mode/activateExecutionController'); triggerTopic('/left/run_trajectory')" class="btn btn-primary col-md-3">
Play Last Recording
</button>
<button id="executionStopButton" type="button" onclick="triggerService('/aescape/bags/stopPlayingBag'); triggerService('/left/aescape/mode/activateReadyController')" class="btn btn-primary col-md-4">
<button id="executionStopButton" type="button" onclick="triggerService('/aescape/bags/stopPlayingBag'); triggerService('/left/aescape/mode/activateReadyController')" class="btn btn-primary col-md-3">
Stop Playing Recording
</button>
</div>
<div>
<div>
<!--Bagfile name must not start with "/" -->
<div class="row">
<div class="row-md-8">
<input type="text" id="bagNameText" class="form-control" placeholder="bag_filename">
</div>
<div class="row-md-4">
<button class="btn btn-primary" type="button" onclick="triggerMessageService('/aescape/bags/startPlayingRecording', 'bagNameText')">
<span>
Play Bag
</span>
</button>
</div>
</div>
</div>
<!-- <div class="row-md-4">
<<div class="col-md-3"> -->
<!-- Bagfile name must not start with "/"
@@ -322,33 +307,40 @@
Refresh List
</button>
</div> -->
<div>
<div>
<div class="list-group" id="bagList">
<button type="button" class="list-group-item list-group-item-action">Dapibus ac facilisis in</button>
<button type="button" class="list-group-item list-group-item-action">Morbi leo risus</button>
<button type="button" class="list-group-item list-group-item-action">Porta ac consectetur ac</button>
<button type="button" class="list-group-item list-group-item-action">Vestibulum at eros</button>
<button type="button" class="list-group-item list-group-item-action">Vestibulum at eros</button>
<button type="button" class="list-group-item list-group-item-action">Vestibulum at eros</button>
<button type="button" class="list-group-item list-group-item-action">Vestibulum at eros</button>
<button type="button" class="list-group-item list-group-item-action">Vestibulum at eros</button>
<button type="button" class="list-group-item list-group-item-action">Vestibulum at eros</button>
<button type="button" class="list-group-item list-group-item-action">Vestibulum at eros</button>
<button type="button" class="list-group-item list-group-item-action">Vestibulum at eros</button>
</div>
</div>
</div>
</div>
</div>
<div class="action-area panel-footer">
<div class="message" id="ExecutionStatusLabel">
<!--Bag manager not connected! -->
</div>
<div>
<!--Bagfile name must not start with "/" -->
<div class="row">
<div class="col-md-8">
<div class="dropdown">
<div>
<select id="bagList" placeholder="Select bag to play">
</select>
</div>
<!-- <i class="fas fa-sync-alt" onclick="updateRecordingsList()"></i> -->
</div>
</div>
<div class="col-md-4">
<button class="btn btn-primary" type="button" onclick="triggerMessageService('/aescape/bags/startPlayingRecording', 'bagNameText')">
<span>
Play Bag
</span>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="panel-footer">
</div>
</div>
</div>
@@ -370,7 +362,7 @@
<ul class="list-group list-group-horizontal">
<li id="right_safetyRunning" class="list-group-item">
<div class="pretty p-default p-round">
<input type="checkbox" />
<input type="checkbox" class="disabled"/>
<div class="state p-success-o">
<label>Running</label>
</div>
@@ -378,7 +370,7 @@
</li>
<li id="right_safetyStopped" class="list-group-item">
<div class="pretty p-default p-round">
<input type="checkbox" />
<input type="checkbox" class="disabled"/>
<div class="state p-success-o">
<label>Stopped</label>
</div>
@@ -405,7 +397,7 @@
<ul class="list-group list-group-horizontal">
<li id="right_frankaModeOther" class="list-group-item">
<div class="pretty p-default p-round">
<input type="checkbox" />
<input type="checkbox" class="disabled"/>
<div class="state p-success-o">
<label>Other</label>
</div>
@@ -413,7 +405,7 @@
</li>
<li id="right_frankaModeIdle" class="list-group-item">
<div class="pretty p-default p-round">
<input type="checkbox" />
<input type="checkbox" class="disabled"/>
<div class="state p-success-o">
<label>Idle</label>
</div>
@@ -421,7 +413,7 @@
</li>
<li id="right_frankaModeMove" class="list-group-item">
<div class="pretty p-default p-round">
<input type="checkbox" />
<input type="checkbox" class="disabled"/>
<div class="state p-success-o">
<label>Move</label>
</div>
@@ -429,7 +421,7 @@
</li>
<li id="right_frankaModeGuiding" class="list-group-item">
<div class="pretty p-default p-round">
<input type="checkbox" />
<input type="checkbox" class="disabled"/>
<div class="state p-success-o">
<label>Guiding</label>
</div>
@@ -437,7 +429,7 @@
</li>
<li id="right_frankaModeReflex" class="list-group-item">
<div class="pretty p-default p-round">
<input type="checkbox" />
<input type="checkbox" class="disabled"/>
<div class="state p-success-o">
<label>Reflex</label>
</div>
@@ -445,7 +437,7 @@
</li>
<li id="right_frankaModeUserStopped" class="list-group-item">
<div class="pretty p-default p-round">
<input type="checkbox" />
<input type="checkbox" class="disabled"/>
<div class="state p-success-o">
<label>User Stopped</label>
</div>
@@ -453,7 +445,7 @@
</li>
<li id="right_frankaModeErrorRecovery" class="list-group-item">
<div class="pretty p-default p-round">
<input type="checkbox" />
<input type="checkbox" class="disabled"/>
<div class="state p-success-o">
<label>Automatic Error Recovery</label>
</div>
@@ -464,7 +456,7 @@
</div>
<div class="action-button panel-footer">
<button id="left_fixFrankaButton" type="button" onclick="triggerService('/left/aescape/hardware/resetFrankaError')" class="btn">
<button id="right_fixFrankaButton" type="button" onclick="triggerService('/left/aescape/hardware/resetFrankaError')" class="btn">
Fix Errors
</button>
</div>
@@ -552,6 +544,9 @@
</div>
</div> -->
</div>
<div class="panel-footer">
</div>
</div>
</div>

View File

@@ -61,36 +61,13 @@ class ArmControls
this.safetyStatusTopic.subscribe(this.safetyStatus.bind(this));
this.lastActiveButton = {
operationMode : null
safetyMode : null,
frankaMode : null,
operationMode : null,
};
}
// FrankaState
frankaStatus(message) {
var frankaModeToButtonMap = {
0 : "frankaModeOther",
1 : "frankaModeIdle",
2 : "frankaModeMove",
3 : "frankaModeGuiding",
4 : "frankaModeReflex",
5 : "frankaModeUserStopped",
6 : "frankaModeErrorRecovery"
}
if(frankaModeLastActive && frankaModeLastActive != message.robot_mode) {
var frankaButton = frankaModeToButtonMap[frankaModeLastActive];
if (frankaButton) {
document.getElementById(this.namespace+"_"+frankaButton).getElementsByTagName("input")[0].checked = false;
document.getElementById(this.namespace+"_"+frankaButton).getElementsByTagName("input")[0].disabled = true;
}
}
var frankaButton = frankaModeToButtonMap[message.robot_mode];
if (frankaButton) {
document.getElementById(this.namespace+"_"+frankaButton).getElementsByTagName("input")[0].disabled = false;
document.getElementById(this.namespace+"_"+frankaButton).getElementsByTagName("input")[0].checked = true;
}
var frankaModeLastActive = message.robot_mode;
}
// Operation Mode
modeStatus(message) {
@@ -118,7 +95,7 @@ class ArmControls
}
var operationModeLastActive = this.operationModeLastActive;
var operationModeLastActive = this.lastActiveButton.operationMode;
if(operationModeLastActive && operationModeLastActive != message.data) {
var operationModeButton = operationModeToButtonMap[operationModeLastActive];
@@ -132,16 +109,61 @@ class ArmControls
document.getElementById(this.namespace+"_"+operationModeButton).classList.add('active');
}
this.operationModeLastActive = message.data;
this.lastActiveButton.operationMode = message.data;
}
// FrankaState
frankaStatus(message) {
var frankaModeToButtonMap = {
0 : "frankaModeOther",
1 : "frankaModeIdle",
2 : "frankaModeMove",
3 : "frankaModeGuiding",
4 : "frankaModeReflex",
5 : "frankaModeUserStopped",
6 : "frankaModeErrorRecovery"
}
var frankaModeLastActive = this.lastActiveButton.frankaMode;
if(frankaModeLastActive && frankaModeLastActive != message.robot_mode) {
var frankaButton = frankaModeToButtonMap[frankaModeLastActive];
if (frankaButton) {
document.getElementById(this.namespace+"_"+frankaButton).getElementsByTagName("input")[0].checked = false;
document.getElementById(this.namespace+"_"+frankaButton).getElementsByTagName("input")[0].disabled = true;
}
}
var frankaButton = frankaModeToButtonMap[message.robot_mode];
if (frankaButton) {
document.getElementById(this.namespace+"_"+frankaButton).getElementsByTagName("input")[0].disabled = false;
document.getElementById(this.namespace+"_"+frankaButton).getElementsByTagName("input")[0].checked = true;
}
if(message.robot_mode == 0 || message.robot_mode == 4) {
document.getElementById(this.namespace+"_"+"fixFrankaButton").classList.add("danger");
} else {
document.getElementById(this.namespace+"_"+"fixFrankaButton").classList.remove("danger");
}
//if(message.robot_mode == 1) {
// document.getElementById(this.namespace+"_"+"fixFrankaButton").classList.add("warning");
//} else {
// document.getElementById(this.namespace+"_"+"fixFrankaButton").classList.remove("warning");
//}
this.lastActiveButton.frankaMode = message.robot_mode;
}
safetyStatus(message) {
var safetyStatusToButtonMap = {
"stopped" : "safetyStopped",
"running" : "safetyRunning"
}
var safetyButtonLastActive = this.lastActiveButton.safetyMode;
if(safetyButtonLastActive && safetyButtonLastActive != message.data) {
var safetyButton = safetyStatusToButtonMap[safetyButtonLastActive];
if(safetyButton) {
@@ -156,13 +178,17 @@ class ArmControls
document.getElementById(this.namespace+"_"+safetyButton).getElementsByTagName("input")[0].checked = true;
}
var safetyButtonLastActive = message.data;
this.lastActiveButton.safetyMode = message.data;
}
}
var leftArmControls = new ArmControls('left');
var rightArmControls = new ArmControls('right');
var lastActiveButton = {
teachingMode : null,
executionMode : null
}
// Robotiq Data
var robotiqDataTopic = new ROSLIB.Topic({
@@ -195,7 +221,6 @@ robotiqDataTopic.subscribe(function(message) {
}
});
// Recording Bag
var recordingBagTopic = new ROSLIB.Topic({
ros : ros,
@@ -218,6 +243,8 @@ recordingBagTopic.subscribe(function(message) {
"running" : "recordingStartButton"
}
var teachingModeLastActive = lastActiveButton.teachingMode;
if(teachingModeLastActive && teachingModeLastActive != message.data) {
var teachingModeButton = teachingModeToButtonMap[teachingModeLastActive];
if (teachingModeButton) {
@@ -230,7 +257,7 @@ recordingBagTopic.subscribe(function(message) {
document.getElementById(teachingModeButton).classList.add("active");
}
var teachingModeLastActive = message.data;
lastActiveButton.teachingMode = message.data;
});
// Executing Bag
@@ -254,8 +281,10 @@ executingBagTopic.subscribe(function(message) {
"running" : "executionStartButton"
}
var executionModeLastActive = lastActiveButton.executionMode;
if(executionModeLastActive && executionModeLastActive != message.data) {
var executionModeButton = teachingModeToButtonMap[executionModeLastActive];
var executionModeButton = executionModeToButtonMap[executionModeLastActive];
if (executionModeButton) {
document.getElementById(executionModeButton).classList.remove("active");
}
@@ -266,7 +295,7 @@ executingBagTopic.subscribe(function(message) {
document.getElementById(executionModeButton).classList.add("active");
}
var executionModeLastActive = message.data;
lastActiveButton.executionMode = message.data;
});
@@ -285,14 +314,6 @@ bagPlayingTopic.subscribe(function(message) {
// Services
////////////////////////////////////////////////////////////////
var notify = $.notify('<strong>Saving</strong> Do not close this page...', {
type: 'success',
allow_dismiss: false,
showProgressbar: true
});
function triggerService(serviceName)
{
var service = new ROSLIB.Service({
@@ -307,24 +328,42 @@ function triggerService(serviceName)
console.log('Result for service call on '
+ serviceName
+ ': '
+ result.sum);
$(document).ready(function(){
$.notify({
message: "Request error: " + serviceName + ". " + result.sum
}, {
"placement" : {
from: "bottom",
align: "right"
},
type: 'success',
delay: 1000
+ result);
//check for result.success == false
if(result.success == true) {
$(document).ready(function(){
$.notify({
message: "Going good! "+ serviceName
}, {
"placement" : {
from: "bottom",
align: "right"
},
type: 'success',
delay: 1000
});
});
});
} else {
$(document).ready(function(){
$.notify({
message: "Something went wrong :( " + serviceName
}, {
"placement" : {
from: "bottom",
align: "right"
},
type: 'danger',
delay: 1000
});
});
}
console.log(result);
}, function(error){
console.log("errored");
$(document).ready(function(){
$.notify({
message: "Request error: " + serviceName + ". " + result.sum
message: "Something went wrong :( " + serviceName
}, {
"placement" : {
from: "bottom",
@@ -356,14 +395,60 @@ function triggerMessageService(serviceName, textInput)
console.log('Result for service call on '
+ serviceName
+ ': '
+ result.sum);
+ result);
//check for result.success == false
if(result.success == true) {
$(document).ready(function(){
$.notify({
message: "Going good! "+ serviceName
}, {
"placement" : {
from: "bottom",
align: "right"
},
type: 'success',
delay: 1000
});
});
} else {
$(document).ready(function(){
$.notify({
message: "Something went wrong :( " + serviceName
}, {
"placement" : {
from: "bottom",
align: "right"
},
type: 'danger',
delay: 1000
});
});
}
console.log(result);
}, function(error){
console.log("errored");
$(document).ready(function(){
$.notify({
message: "Something went wrong :( " + serviceName
}, {
"placement" : {
from: "bottom",
align: "right"
},
type: 'danger',
delay: 1000
});
});
});
}
// function executeBagForm()
function updateSelectedBagFile(newFile)
{
// var newFile = document.getElementById(newFileInput).innerHTML
document.getElementById("bagNameText").value = newFile
function playselectedBag() {
var selectedBagName = $('#bagList').val();
triggerMessageService('/aescape/bags/startPlayingRecording', selectedBagName)
}

View File

@@ -1,7 +1,7 @@
var bagList = Array();
function getBagList()
function getBagList(callback)
{
var service = new ROSLIB.Service({
ros : ros,
@@ -12,39 +12,43 @@ function getBagList()
var request = new ROSLIB.ServiceRequest({});
service.callService(request, function(result) {
// console.log('Result for service call on '
// + serviceName
// + ': '
// + result.message);
bagList = result.message;
callback(result.message);
});
}
function updateRecordingsList()
{
getBagList();
setTimeout(function(){
var $select = $('#bagList').selectize({
valueField: 'name',
labelField: 'name',
searchField: ['name'],
options: [],
create: false,
placeholder : "Select bag to play"
});
if(bagList != null){
var innerHTML = "";
for (var i = 0; i < bagList.length; i++ )
{
// innerHTML = innerHTML.concat(bagList[i]);
// innerHTML = innerHTML.concat("<br>");
function updateRecordingsList()
{
getBagList(function(results){
var selectize = $select[0].selectize;
selectize.clearOptions()
selectize.addOption(results.map(function(bagName){
return {name : bagName}
}));
})
};
innerHTML += "<button type=\"button\" class=\"list-group-item list-group-item-action\" onclick=\"updateSelectedBagFile('" + bagList[i] + "')\">" + bagList[i] + "</button>";
// innerHTML += "<button type=\"button\" class=\"list-group-item list-group-item-action\" onclick=\"triggerMessageService('/aescape/bags/startPlayingRecording', '" + bagList[i] + "')\">" + bagList[i] + "</button>";
}
document.getElementById("bagList").innerHTML = innerHTML;
}
document.getElementById("bagNameText").value = message.data
};
window.setInterval(function(){
updateRecordingsList()
}, 1000);
window.setInterval(function(){
updateRecordingsList();
}, 1000);

View File

@@ -7,6 +7,7 @@
<link rel="stylesheet" href="../include/css/bootstrap.min.css">
<link rel="stylesheet" href="../include/css/fontawesome-free-5.8.2-web/css/all.css">
<link rel="stylesheet" href="../../bower_components/pretty-checkbox/dist/pretty-checkbox.css">
<link rel="stylesheet" href="../../bower_components/selectize/dist/css/selectize.css">
<script type="text/javascript" src="../include/js/eventemitter2.min.js"></script>
@@ -18,17 +19,6 @@
<script src="../include/js/roslib.js"></script>
<script type="text/javascript" src="../include/js/roslib.js"></script>
<script type="text/javascript" src="utilities/ros_scripts.js"></script>
<script type="text/javascript" src="utilities/update_guis.js"></script>
<script type="text/javascript" src="utilities/Topic.js"></script>
<script type="text/javascript" src="../../bower_components/remarkable-bootstrap-notify/dist/bootstrap-notify.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="main.css">
<script>
$(function(){
$("#coordinatorContent").load("components/coordinator/coordinator.html");
@@ -37,6 +27,19 @@
$("#connectorContent").load("components/connect/connect.html");
});
</script>
<script type="text/javascript" src="utilities/ros_scripts.js"></script>
<script type="text/javascript" src="utilities/update_guis.js"></script>
<script type="text/javascript" src="utilities/Topic.js"></script>
<script type="text/javascript" src="../../bower_components/remarkable-bootstrap-notify/dist/bootstrap-notify.js"></script>
<script type="text/javascript" src="../../bower_components/selectize/dist/js/standalone/selectize.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="main.css">
<script type="text/javascript" src="components/coordinator/js/ros_scripts.js"></script>
<script type="text/javascript" src="components/coordinator/js/update_guis.js"></script>
@@ -58,7 +61,7 @@
<img src="../include/images/aescape-logo-v3_square_300_white.webp"/>
</div>
<div class="title">
<h1>Aescape Lab</h1>
<h1>aescape lab</h1>
</div>
<div class="user">
<i class="far fa-user"></i>
@@ -85,8 +88,8 @@
</ul>
</div>
<div class="task-connection-message">
Teaching Phoebe
<div id="task-connection-message">
Disconnected
</div>
<div id="my-tab-content" class="tab-content">

View File

@@ -116,12 +116,13 @@ html, body {
width: 100%;
}
.task-connection-message {
#task-connection-message {
position: relative;
margin: auto;
left: -10%;
font-weight: 600;
font-size: 19pt;
text-transform: capitalize;
}
.panel{
@@ -252,7 +253,6 @@ html, body {
border: none;
background: none;
padding: 0px;
margin: 0 5px 0 5px;
}
@@ -299,15 +299,12 @@ html, body {
background-image: linear-gradient(#085394, #073763) !important;
}
button[class*="disabled"] {
background-color: #262b40 !important;
cursor: not-allowed;
pointer-events: none;
button[class*="danger"] {
background-image: linear-gradient(#990000, #660000) !important;
}
button[class*="danger"] {
button[class*="warning"] {
background-image: linear-gradient(#b45f06, #783f04) !important;
background-image: linear-gradient(#990000, #660000) !important;
}
.status-container .robotiq .progress {
@@ -332,6 +329,28 @@ html, body {
}
}
.execution-control .button-area > button {
font-size: 12pt !important;
}
button[class*="disabled"] {
background-color: #262b40 !important;
cursor: not-allowed !important;
pointer-events: none !important;
}
input[class*="disabled"] {
cursor: not-allowed !important;
pointer-events: none !important;
}
.disabled i{
color: grey;
}
input[class*="disabled"] + div[class*="state"] {
color: grey;
}

View File

@@ -34,6 +34,48 @@ ros.connectionName = 'ws://' + master + ':9090';
// ros.connectionName = 'ws://titan.aescape.co:9090';
console.log('ros.connectionName = ' + ros.connectionName);
function enableUI() {
try {
var buttons = document.getElementById("coordinator").getElementsByTagName("button");
for(var i = 0; i < buttons.length; i++)
{
buttons.item(i).classList.remove("disabled");
}
var checkBoxes = document.getElementById("coordinator").querySelectorAll(".pretty .state");
for(var i = 0; i < checkBoxes.length; i++)
{
checkBoxes.item(i).classList.add("p-success-o");
}
document.querySelector('.dropdown').classList.remove("disabled");
} catch(err) {
console.log(err);
}
}
function disableUI() {
try {
var buttons = document.getElementById("coordinator").getElementsByTagName("button");
for(var i = 0; i < buttons.length; i++)
{
buttons.item(i).classList.add("disabled");
}
var checkBoxes = document.getElementById("coordinator").querySelectorAll(".pretty .state");
for(var i = 0; i < checkBoxes.length; i++)
{
checkBoxes.item(i).classList.remove("p-success-o");
}
document.querySelector('.dropdown').classList.add("disabled");
} catch(err) {
console.log(err);
}
}
setTimeout(function(){
disableUI();
})
// If there is an error on the backend, an 'error' emit will be emitted.
ros.on('error', function(error) {
/*
@@ -44,14 +86,34 @@ ros.on('error', function(error) {
document.getElementById("rosbridgeconnection_badge").innerHTML = 'No connection';
document.getElementById("ROSNodes").innerHTML = "No Nodes Detected";
*/
/*
$(document).ready(function(){
$.notify({
message: "Something went wrong in the connection: "+ ros.connectionName
}, {
"placement" : {
from: "bottom",
align: "right"
},
type: 'danger',
delay: 1000
});
});
*/
rosbridgeconnection_badge
document.getElementById("ConnectionButton").innerHTML = "Connect";
document.getElementById("ConnectionIPInput").value = ros.connectionName;
document.getElementById("task-connection-message").innerHTML = "Disconnected"
disableUI();
//rosbridgeconnection_badge
console.log(error);
});
// Find out exactly when we made a connection.
ros.on('connection', function() {
ros.connected = true;
console.log('Connection made!');
document.getElementById("ConnectionButton").innerHTML = "Disconnect";
document.getElementById("ConnectionIPInput").value = ros.connectionName;
/*
document.getElementById("ConnectionIPForm").className = "form-group has-success has-feedback";
document.getElementById("ConnectionIPInput").value = ros.connectionName;
@@ -60,21 +122,60 @@ ros.on('connection', function() {
document.getElementById("ConnectionButton").className = "btn btn-success";
*/
$(document).ready(function(){
$.notify({
message: "Connected to: "+ ros.connectionName
}, {
"placement" : {
from: "bottom",
align: "right"
},
type: 'success',
delay: 1000
});
});
enableUI();
document.getElementById("task-connection-message").innerHTML = "Connected to: " + ros.connectionName;
getMasterName();
ros.nodes = Array();
ros.topics = Array();
});
ros.on('close', function() {
try { throw Error('') } catch(err) { console.log(err) }
console.log('Connection closed.');
ros.connected = false;
/*
document.getElementById("ConnectionIPForm").className = "form-group has-warning has-feedback";
document.getElementById("ConnectionIPLabel").innerHTML = 'Connection closed';
document.getElementById("ConnectionButton").className = "btn btn-warning"
document.getElementById("rosbridgeconnection_badge").innerHTML = 'Connection closed';
*/
/*
$(document).ready(function(){
$.notify({
message: "Disconnected from "+ ros.connectionName
}, {
"placement" : {
from: "bottom",
align: "right"
},
type: 'danger',
delay: 1000
});
});
*/
document.getElementById("ConnectionButton").innerHTML = "Connect";
document.getElementById("ConnectionIPInput").value = ros.connectionName;
document.getElementById("task-connection-message").innerHTML = "Disconnected"
disableUI();
ros.nodes = Array();
ros.topics = Array();
@@ -151,7 +252,7 @@ bagNotifier.subscribe(function(message) {
// attept to connect to the ros master from the IP given orgrab it from the form
ros.attemptConnection = function(ipAddress)
{
ros.close();
//ros.close();
if( typeof ipAddress !== "undefined")
{
ros.connectionName = ipAddress;
@@ -162,7 +263,6 @@ ros.attemptConnection = function(ipAddress)
}
console.log('Connection = ' + ros.connectionName);
ros.connect(ros.connectionName);
getMasterName();
}
function toggleRecording()
@@ -204,10 +304,6 @@ function getMasterName()
});
service.callService(request, function(result) {
console.log('Master Name = ' + result.host);
document.getElementById("MasterName").innerHTML = result.host;
var title = result.host + " Lab UI"
document.title = title;
document.getElementById("Title").innerHTML = title;
document.getElementById("task-connection-message").innerHTML = "Connected to: " + result.host;
});
}