mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Adding c3.js as a dependency.
This commit is contained in:
+12
-10
@@ -5,8 +5,8 @@
|
||||
"dist/css/bootstrap-select.css",
|
||||
"dist/js/bootstrap-select.js"
|
||||
],
|
||||
"version": "1.6.3",
|
||||
"homepage": "https://github.com/silviomoreto/bootstrap-select",
|
||||
"version": "1.6.5",
|
||||
"homepage": "http://silviomoreto.github.io/bootstrap-select",
|
||||
"authors": [
|
||||
"silviomoreto"
|
||||
],
|
||||
@@ -21,17 +21,19 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
".gitignore",
|
||||
"CONTRIBUTING.md",
|
||||
"Gruntfile.js",
|
||||
"README.md",
|
||||
"composer.json",
|
||||
"package.json",
|
||||
"test.html"
|
||||
],
|
||||
"_release": "1.6.3",
|
||||
"_release": "1.6.5",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.6.3",
|
||||
"commit": "83d5a1bc0158270fe17f3d745113e89a3a58f9a7"
|
||||
"tag": "v1.6.5",
|
||||
"commit": "cccb9dcbc458e13e95f839cf432adda78d3e27f1"
|
||||
},
|
||||
"_source": "git://github.com/silviomoreto/bootstrap-select.git",
|
||||
"_target": "1.6",
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
# Contributing to this project
|
||||
|
||||
Please take a moment to review this document in order to make the contribution
|
||||
process easy and effective for everyone involved.
|
||||
|
||||
Following these guidelines helps to communicate that you respect the time of
|
||||
the developers managing and developing this open source project. In return,
|
||||
they should reciprocate that respect in addressing your issue or assessing
|
||||
patches and features.
|
||||
|
||||
|
||||
## Using the issue tracker
|
||||
|
||||
The issue tracker is the preferred channel for [bug reports](#bug-reports),
|
||||
[features requests](#feature-requests) and submitting pull requests, but please
|
||||
respect the following restrictions:
|
||||
|
||||
* Please **do not** use the issue tracker for personal support requests (use
|
||||
[Stack Overflow](http://stackoverflow.com) or IRC).
|
||||
|
||||
* Please **do not** derail or troll issues. Keep the discussion on topic and
|
||||
respect the opinions of others.
|
||||
|
||||
|
||||
## Bug reports
|
||||
|
||||
A bug is a _demonstrable problem_ that is caused by the code in the repository.
|
||||
Good bug reports are extremely helpful - thank you!
|
||||
|
||||
Guidelines for bug reports:
|
||||
|
||||
1. **Use the GitHub issue search.** Check if the issue has already been
|
||||
reported.
|
||||
|
||||
2. **Check if the issue has been fixed.** Try to reproduce it using the
|
||||
latest `master` or development branch in the repository.
|
||||
|
||||
3. **Provide environment details.** Provide your operating system, browser(s),
|
||||
jQuery version, Bootstrap version, and bootstrap-select version.
|
||||
|
||||
4. **Create an isolated and reproducible test case.** Create a [reduced test
|
||||
case](http://css-tricks.com/6263-reduced-test-cases/).
|
||||
|
||||
5. **Include a live example.** Make use of jsFiddle or jsBin to share your
|
||||
isolated test cases.
|
||||
|
||||
A good bug report shouldn't leave others needing to chase you up for more
|
||||
information. Please try to be as detailed as possible in your report. What is
|
||||
your environment? What steps will reproduce the issue? What browser(s) and OS
|
||||
experience the problem? What would you expect to be the outcome? All these
|
||||
details will help people to fix any potential bugs.
|
||||
|
||||
Example:
|
||||
|
||||
> Short and descriptive example bug report title
|
||||
>
|
||||
> A summary of the issue and the browser/OS environment in which it occurs. If
|
||||
> suitable, include the steps required to reproduce the bug.
|
||||
>
|
||||
> 1. This is the first step
|
||||
> 2. This is the second step
|
||||
> 3. Further steps, etc.
|
||||
>
|
||||
> `<url>` - a link to the reduced test case
|
||||
>
|
||||
> Any other information you want to share that is relevant to the issue being
|
||||
> reported. This might include the lines of code that you have identified as
|
||||
> causing the bug, and potential solutions (and your opinions on their
|
||||
> merits).
|
||||
|
||||
|
||||
## Feature requests
|
||||
|
||||
Feature requests are welcome. But take a moment to find out whether your idea
|
||||
fits with the scope and aims of the project. It's up to *you* to make a strong
|
||||
case to convince the project's developers of the merits of this feature. Please
|
||||
provide as much detail and context as possible.
|
||||
|
||||
## Pull Request Guidelines
|
||||
|
||||
You must understand that by contributing code to this project, you are granting
|
||||
the authors (and/or leaders) of the project a non-exclusive license to
|
||||
re-distribute your code under the current license and possibly re-license the
|
||||
code as deemed necessary.
|
||||
|
||||
* To instantiate a context or use it, use the variable **that** instead of
|
||||
**_this**.
|
||||
* Please check to make sure that there aren't existing pull requests attempting
|
||||
to address the issue mentioned. We also recommend checking for issues related
|
||||
to the issue on the tracker, as a team member may be working on the issue in
|
||||
a branch or fork.
|
||||
* Non-trivial changes should be discussed in an issue first
|
||||
* If your change affects the distributed files, re-generate them using the
|
||||
[grunt procedure](#using-grunt)
|
||||
* If possible, add relevant tests to cover the change
|
||||
* Write a convincing description of your PR and why we should land it
|
||||
|
||||
## Using Grunt
|
||||
|
||||
We are using node and grunt to build and (in the future) test this project.
|
||||
This means that you must setup a local development environment:
|
||||
|
||||
1. Install `node` and `npm` using your preferred method
|
||||
2. Install the grunt CLI: `npm install -g grunt-cli`
|
||||
3. Install the project's development dependencies: `npm install`
|
||||
4. Run the various grunt tasks as needed:
|
||||
- `grunt`: clean the distribution files and re-build them
|
||||
- `grunt dist`: build the distribution files
|
||||
- `grunt clean`: clean the distribution files
|
||||
- `grunt dist-css`: build the css distribution files
|
||||
- `grunt dist-js`: build the javascript distribution files
|
||||
- `grunt watch`: watch for changes in the source files and build the
|
||||
distribution files as needed
|
||||
|
||||
@@ -1,249 +0,0 @@
|
||||
/*jshint node:true*/
|
||||
module.exports = function (grunt) {
|
||||
|
||||
// From TWBS
|
||||
RegExp.quote = function (string) {
|
||||
return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&');
|
||||
};
|
||||
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
|
||||
// Metadata.
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
banner: '/*!\n' +
|
||||
' * Bootstrap-select v<%= pkg.version %> (<%= pkg.homepage %>)\n' +
|
||||
' *\n' +
|
||||
' * Copyright 2013-<%= grunt.template.today(\'yyyy\') %> bootstrap-select\n' +
|
||||
' * Licensed under <%= pkg.license.type %> (<%= pkg.license.url %>)\n' +
|
||||
' */\n',
|
||||
|
||||
// Task configuration.
|
||||
|
||||
clean: {
|
||||
css: 'dist/css',
|
||||
js: 'dist/js'
|
||||
},
|
||||
|
||||
jshint: {
|
||||
options: {
|
||||
jshintrc: 'js/.jshintrc'
|
||||
},
|
||||
gruntfile: {
|
||||
options: {
|
||||
'node': true
|
||||
},
|
||||
src: 'Gruntfile.js'
|
||||
},
|
||||
main: {
|
||||
src: 'js/*.js'
|
||||
},
|
||||
i18n: {
|
||||
src: 'js/i18n/*.js'
|
||||
}
|
||||
},
|
||||
|
||||
concat: {
|
||||
options: {
|
||||
banner: '<%= banner %>',
|
||||
stripBanners: true
|
||||
},
|
||||
main: {
|
||||
src: '<%= jshint.main.src %>',
|
||||
dest: 'dist/js/<%= pkg.name %>.js'
|
||||
},
|
||||
i18n: {
|
||||
files: [
|
||||
{
|
||||
expand: true,
|
||||
src: '<%= jshint.i18n.src %>',
|
||||
dest: 'dist/'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
uglify: {
|
||||
options: {
|
||||
preserveComments: 'some'
|
||||
},
|
||||
main: {
|
||||
src: '<%= concat.main.dest %>',
|
||||
dest: 'dist/js/<%= pkg.name %>.min.js',
|
||||
options: {
|
||||
sourceMap: true,
|
||||
sourceMapName: 'dist/js/<%= pkg.name %>.js.map'
|
||||
}
|
||||
},
|
||||
i18n: {
|
||||
files: [
|
||||
{
|
||||
expand: true,
|
||||
cwd: 'dist/',
|
||||
src: '<%= jshint.i18n.src %>',
|
||||
dest: 'dist/',
|
||||
ext: '.min.js'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
//qunit: {
|
||||
// files: ['test/**/*.html']
|
||||
//},
|
||||
|
||||
less: {
|
||||
options: {
|
||||
strictMath: true,
|
||||
sourceMap: true,
|
||||
outputSourceFiles: true,
|
||||
sourceMapURL: '<%= pkg.name %>.css.map',
|
||||
sourceMapFilename: 'dist/css/<%= pkg.name %>.css.map'
|
||||
},
|
||||
css: {
|
||||
src: 'less/bootstrap-select.less',
|
||||
dest: 'dist/css/<%= pkg.name %>.css'
|
||||
}
|
||||
},
|
||||
|
||||
usebanner: {
|
||||
css: {
|
||||
options: {
|
||||
position: 'top',
|
||||
banner: '<%= banner %>'
|
||||
},
|
||||
src: '<%= less.css.dest %>'
|
||||
}
|
||||
},
|
||||
|
||||
cssmin: {
|
||||
options: {
|
||||
compatibility: 'ie8',
|
||||
keepSpecialComments: '*',
|
||||
noAdvanced: true
|
||||
},
|
||||
css: {
|
||||
src: '<%= less.css.dest %>',
|
||||
dest: 'dist/css/<%= pkg.name %>.min.css'
|
||||
}
|
||||
},
|
||||
|
||||
csslint: {
|
||||
options: {
|
||||
'adjoining-classes': false,
|
||||
'box-sizing': false,
|
||||
'box-model': false,
|
||||
'compatible-vendor-prefixes': false,
|
||||
'floats': false,
|
||||
'font-sizes': false,
|
||||
'gradients': false,
|
||||
'important': false,
|
||||
'known-properties': false,
|
||||
'outline-none': false,
|
||||
'qualified-headings': false,
|
||||
'regex-selectors': false,
|
||||
'shorthand': false,
|
||||
'text-indent': false,
|
||||
'unique-headings': false,
|
||||
'universal-selector': false,
|
||||
'unqualified-attributes': false,
|
||||
'overqualified-elements': false
|
||||
},
|
||||
css: {
|
||||
src: '<%= less.css.dest %>'
|
||||
}
|
||||
},
|
||||
|
||||
sed: {
|
||||
versionNumber: {
|
||||
path: [
|
||||
'less',
|
||||
'js',
|
||||
'bootstrap-select.jquery.json',
|
||||
'bower.json',
|
||||
'composer.json',
|
||||
'package.json'
|
||||
],
|
||||
pattern: (function () {
|
||||
var old = grunt.option('old');
|
||||
return old ? RegExp.quote(old) : old;
|
||||
})(),
|
||||
replacement: grunt.option('new'),
|
||||
recursive: true
|
||||
}
|
||||
},
|
||||
|
||||
autoprefixer: {
|
||||
options: {
|
||||
browsers: [
|
||||
'Android 2.3',
|
||||
'Android >= 4',
|
||||
'Chrome >= 20',
|
||||
'Firefox >= 24', // Firefox 24 is the latest ESR
|
||||
'Explorer >= 8',
|
||||
'iOS >= 6',
|
||||
'Opera >= 12',
|
||||
'Safari >= 6'
|
||||
]
|
||||
},
|
||||
css: {
|
||||
options: {
|
||||
map: true
|
||||
},
|
||||
src: '<%= less.css.dest %>'
|
||||
}
|
||||
},
|
||||
|
||||
compress: {
|
||||
main: {
|
||||
options: {
|
||||
archive: 'bootstrap-select-<%= pkg.version %>.zip',
|
||||
mode: 'zip'
|
||||
},
|
||||
files: [
|
||||
{expand: true, cwd: 'dist/', src: ['**'], dest: 'bootstrap-select-<%= pkg.version %>/'},
|
||||
{
|
||||
src: ['bootstrap-select.jquery.json', 'bower.json', 'composer.json', 'package.json'],
|
||||
dest: 'bootstrap-select-<%= pkg.version %>/'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
gruntfile: {
|
||||
files: '<%= jshint.gruntfile.src %>',
|
||||
tasks: 'jshint:gruntfile'
|
||||
},
|
||||
js: {
|
||||
files: ['<%= jshint.main.src %>', '<%= jshint.i18n.src %>'],
|
||||
tasks: 'dist-js'
|
||||
},
|
||||
less: {
|
||||
files: 'less/*.less',
|
||||
tasks: 'dist-css'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// These plugins provide necessary tasks.
|
||||
require('load-grunt-tasks')(grunt);
|
||||
|
||||
// Version numbering task.
|
||||
// grunt change-version-number --old=A.B.C --new=X.Y.Z
|
||||
// This can be overzealous, so its changes should always be manually reviewed!
|
||||
grunt.registerTask('change-version-number', 'sed');
|
||||
|
||||
// CSS distribution
|
||||
grunt.registerTask('dist-css', ['clean:css', 'less', 'autoprefixer', 'usebanner', 'cssmin']);
|
||||
|
||||
// JS distribution
|
||||
grunt.registerTask('dist-js', ['clean:js', 'concat', 'uglify']);
|
||||
|
||||
// Full distribution
|
||||
grunt.registerTask('dist', ['dist-css', 'dist-js', 'compress']);
|
||||
|
||||
// Default task.
|
||||
grunt.registerTask('default', ['clean', 'dist-css', 'dist-js']);
|
||||
|
||||
};
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013-2014 bootstrap-select
|
||||
Copyright (c) 2013-2015 bootstrap-select
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
bootstrap-select
|
||||
================
|
||||
|
||||
[](https://github.com/silviomoreto/bootstrap-select/releases/latest)
|
||||
[](https://david-dm.org/silviomoreto/bootstrap-select)
|
||||
[](LICENSE)
|
||||
|
||||
[](https://david-dm.org/silviomoreto/bootstrap-select#info=devDependencies)
|
||||
|
||||
A custom select / multiselect for Bootstrap using button dropdown, designed to behave like regular Bootstrap selects.
|
||||
|
||||
## Demo and Documentation
|
||||
|
||||
See a Bootstrap 3.2.0 example [here](http://silviomoreto.github.io/bootstrap-select/3).
|
||||
|
||||
See a Bootstrap 2.3.2 example [here](http://silviomoreto.github.io/bootstrap-select) (deprecated).
|
||||
|
||||
## Authors
|
||||
|
||||
[Silvio Moreto](https://github.com/silviomoreto),
|
||||
[Ana Carolina](https://github.com/anacarolinats),
|
||||
[caseyjhol](https://github.com/caseyjhol),
|
||||
[Matt Bryson](https://github.com/mattbryson), and
|
||||
[t0xicCode](https://github.com/t0xicCode).
|
||||
|
||||
## Usage
|
||||
|
||||
Create your `<select>` with the `.selectpicker` class.
|
||||
```html
|
||||
<select class="selectpicker">
|
||||
<option>Mustard</option>
|
||||
<option>Ketchup</option>
|
||||
<option>Barbecue</option>
|
||||
</select>
|
||||
```
|
||||
|
||||
Enable Bootstrap-Select via JavaScript:
|
||||
```js
|
||||
$('.selectpicker').selectpicker();
|
||||
```
|
||||
Or just
|
||||
```js
|
||||
$('select').selectpicker();
|
||||
```
|
||||
|
||||
***Starting with the current dev version, we support bootstrap's data-api, which means that you don't even have to manually instanciate bootstrap-select.***
|
||||
|
||||
Checkout the [documentation](http://silviomoreto.github.io/bootstrap-select) for further information.
|
||||
|
||||
## CDN
|
||||
|
||||
**N.B.**: The CDN is updated after the release is made public, which means that there is a delay between the publishing of a release and its availability on the CDN. Check [the GitHub page](https://github.com/silviomoreto/bootstrap-select/releases) for the latest release.
|
||||
|
||||
* [//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.6.2/css/bootstrap-select.min.css](//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.6.2/css/bootstrap-select.min.css)
|
||||
* [//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.6.2/js/bootstrap-select.min.js](//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.6.2/js/bootstrap-select.min.js)
|
||||
* //cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.6.2/js/i18n/defaults-*.min.js (The translation files)
|
||||
|
||||
## Bugs and feature requests
|
||||
|
||||
Anyone and everyone is welcome to contribute. Please take a moment to
|
||||
review the [guidelines for contributing](CONTRIBUTING.md). Make sure you're using the latest version of bootstrap-select before submitting an issue.
|
||||
|
||||
* [Bug reports](CONTRIBUTING.md#bug-reports)
|
||||
* [Feature requests](CONTRIBUTING.md#feature-requests)
|
||||
|
||||
## Copyright and license
|
||||
|
||||
Copyright (C) 2013-2014 bootstrap-select
|
||||
|
||||
Licensed under [the MIT license](LICENSE).
|
||||
@@ -1,29 +0,0 @@
|
||||
{
|
||||
"name": "bootstrap-select",
|
||||
"title": "Bootstrap Select",
|
||||
"description": "A custom select / multiselect for Bootstrap using button dropdown, designed to behave like regular Bootstrap selects",
|
||||
"keywords": [
|
||||
"form",
|
||||
"bootstrap",
|
||||
"select",
|
||||
"replacement"
|
||||
],
|
||||
"version": "1.6.3",
|
||||
"author": {
|
||||
"name": "Silvio Moreto",
|
||||
"url": "https://github.com/silviomoreto/"
|
||||
},
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE"
|
||||
}
|
||||
],
|
||||
"bugs": "https://github.com/silviomoreto/bootstrap-select/issues",
|
||||
"homepage": "https://github.com/silviomoreto/bootstrap-select",
|
||||
"docs": "https://github.com/silviomoreto/bootstrap-select",
|
||||
"download": "https://github.com/silviomoreto/bootstrap-select/releases",
|
||||
"dependencies": {
|
||||
"jquery": ">=1.8"
|
||||
}
|
||||
}
|
||||
+9
-7
@@ -5,8 +5,8 @@
|
||||
"dist/css/bootstrap-select.css",
|
||||
"dist/js/bootstrap-select.js"
|
||||
],
|
||||
"version": "1.6.3",
|
||||
"homepage": "https://github.com/silviomoreto/bootstrap-select",
|
||||
"version": "1.6.5",
|
||||
"homepage": "http://silviomoreto.github.io/bootstrap-select",
|
||||
"authors": [
|
||||
"silviomoreto"
|
||||
],
|
||||
@@ -21,10 +21,12 @@
|
||||
},
|
||||
"license": "MIT",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
".gitignore",
|
||||
"CONTRIBUTING.md",
|
||||
"Gruntfile.js",
|
||||
"README.md",
|
||||
"composer.json",
|
||||
"package.json",
|
||||
"test.html"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"name": "bootstrap-select/bootstrap-select",
|
||||
"description": "A custom <select> for Bootstrap using button dropdown as replacement",
|
||||
"keywords": ["form", "bootstrap", "select", "replacement"],
|
||||
"homepage": "https://github.com/silviomoreto/bootstrap-select",
|
||||
"version": "1.6.3",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Silvio Moreto",
|
||||
"homepage": "https://github.com/silviomoreto/"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"suggest": {
|
||||
"components/jquery": ">=1.8"
|
||||
}
|
||||
}
|
||||
@@ -1,23 +1,20 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
.bootstrap-select {
|
||||
/*width: 220px\9; IE8 and below*/
|
||||
width: 220px \0;
|
||||
/*IE9 and below*/
|
||||
}
|
||||
.bootstrap-select > .btn {
|
||||
.bootstrap-select > .dropdown-toggle {
|
||||
width: 100%;
|
||||
padding-right: 25px;
|
||||
}
|
||||
.error .bootstrap-select .btn {
|
||||
border: 1px solid #b94a48;
|
||||
}
|
||||
.control-group.error .bootstrap-select .dropdown-toggle {
|
||||
.has-error .bootstrap-select .dropdown-toggle,
|
||||
.error .bootstrap-select .dropdown-toggle {
|
||||
border-color: #b94a48;
|
||||
}
|
||||
.bootstrap-select.fit-width {
|
||||
@@ -26,7 +23,7 @@
|
||||
.bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) {
|
||||
width: 220px;
|
||||
}
|
||||
.bootstrap-select .btn:focus {
|
||||
.bootstrap-select .dropdown-toggle:focus {
|
||||
outline: thin dotted #333333 !important;
|
||||
outline: 5px auto -webkit-focus-ring-color !important;
|
||||
outline-offset: -2px;
|
||||
@@ -39,6 +36,9 @@
|
||||
.bootstrap-select.form-control:not([class*="col-"]) {
|
||||
width: 100%;
|
||||
}
|
||||
.bootstrap-select.form-control.input-group-btn {
|
||||
z-index: auto;
|
||||
}
|
||||
.bootstrap-select.btn-group:not(.input-group-btn),
|
||||
.bootstrap-select.btn-group[class*="col-"] {
|
||||
float: none;
|
||||
@@ -47,10 +47,9 @@
|
||||
}
|
||||
.bootstrap-select.btn-group.dropdown-menu-right,
|
||||
.bootstrap-select.btn-group[class*="col-"].dropdown-menu-right,
|
||||
.row-fluid .bootstrap-select.btn-group[class*="col-"].dropdown-menu-right {
|
||||
.row .bootstrap-select.btn-group[class*="col-"].dropdown-menu-right {
|
||||
float: right;
|
||||
}
|
||||
.form-search .bootstrap-select.btn-group,
|
||||
.form-inline .bootstrap-select.btn-group,
|
||||
.form-horizontal .bootstrap-select.btn-group,
|
||||
.form-group .bootstrap-select.btn-group {
|
||||
@@ -63,32 +62,26 @@
|
||||
.form-inline .bootstrap-select.btn-group .form-control {
|
||||
width: 100%;
|
||||
}
|
||||
.input-append .bootstrap-select.btn-group {
|
||||
margin-left: -1px;
|
||||
}
|
||||
.input-prepend .bootstrap-select.btn-group {
|
||||
margin-right: -1px;
|
||||
}
|
||||
.bootstrap-select.btn-group > .disabled {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.bootstrap-select.btn-group > .disabled:focus {
|
||||
outline: none !important;
|
||||
}
|
||||
.bootstrap-select.btn-group .btn .filter-option {
|
||||
.bootstrap-select.btn-group .dropdown-toggle .filter-option {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
}
|
||||
.bootstrap-select.btn-group .btn .caret {
|
||||
.bootstrap-select.btn-group .dropdown-toggle .caret {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 12px;
|
||||
margin-top: -2px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.bootstrap-select.btn-group[class*="col-"] .btn {
|
||||
.bootstrap-select.btn-group[class*="col-"] .dropdown-toggle {
|
||||
width: 100%;
|
||||
}
|
||||
.bootstrap-select.btn-group .dropdown-menu {
|
||||
@@ -100,6 +93,7 @@
|
||||
}
|
||||
.bootstrap-select.btn-group .dropdown-menu.inner {
|
||||
position: static;
|
||||
float: none;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
@@ -110,11 +104,8 @@
|
||||
.bootstrap-select.btn-group .dropdown-menu li {
|
||||
position: relative;
|
||||
}
|
||||
.bootstrap-select.btn-group .dropdown-menu li:not(.disabled) a:hover small,
|
||||
.bootstrap-select.btn-group .dropdown-menu li:not(.disabled) a:focus small,
|
||||
.bootstrap-select.btn-group .dropdown-menu li.active:not(.disabled) a small {
|
||||
color: #64b1d8;
|
||||
color: rgba(100, 177, 216, 0.4);
|
||||
.bootstrap-select.btn-group .dropdown-menu li.active small {
|
||||
color: #fff;
|
||||
}
|
||||
.bootstrap-select.btn-group .dropdown-menu li.disabled a {
|
||||
cursor: not-allowed;
|
||||
@@ -157,10 +148,10 @@
|
||||
background: #f5f5f5;
|
||||
margin: 0 5px;
|
||||
}
|
||||
.bootstrap-select.btn-group.fit-width .btn .filter-option {
|
||||
.bootstrap-select.btn-group.fit-width .dropdown-toggle .filter-option {
|
||||
position: static;
|
||||
}
|
||||
.bootstrap-select.btn-group.fit-width .btn .caret {
|
||||
.bootstrap-select.btn-group.fit-width .dropdown-toggle .caret {
|
||||
position: static;
|
||||
top: auto;
|
||||
margin-top: -1px;
|
||||
@@ -174,17 +165,14 @@
|
||||
.bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text {
|
||||
margin-right: 34px;
|
||||
}
|
||||
.bootstrap-select.show-menu-arrow.open > .btn {
|
||||
z-index: 1035 + 1;
|
||||
.bootstrap-select.show-menu-arrow.open > .dropdown-toggle {
|
||||
z-index: 1036;
|
||||
}
|
||||
.bootstrap-select.show-menu-arrow .dropdown-toggle:before {
|
||||
content: '';
|
||||
border-left: 7px solid transparent;
|
||||
border-right: 7px solid transparent;
|
||||
border-bottom-width: 7px;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-color: #cccccc;
|
||||
border-bottom-color: rgba(204, 204, 204, 0.2);
|
||||
border-bottom: 7px solid rgba(204, 204, 204, 0.2);
|
||||
position: absolute;
|
||||
bottom: -4px;
|
||||
left: 9px;
|
||||
@@ -203,11 +191,8 @@
|
||||
.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:before {
|
||||
bottom: auto;
|
||||
top: -3px;
|
||||
border-top: 7px solid rgba(204, 204, 204, 0.2);
|
||||
border-bottom: 0;
|
||||
border-top-width: 7px;
|
||||
border-top-style: solid;
|
||||
border-top-color: #cccccc;
|
||||
border-top-color: rgba(204, 204, 204, 0.2);
|
||||
}
|
||||
.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:after {
|
||||
bottom: auto;
|
||||
@@ -228,7 +213,8 @@
|
||||
display: block;
|
||||
}
|
||||
.bs-searchbox,
|
||||
.bs-actionsbox {
|
||||
.bs-actionsbox,
|
||||
.bs-donebutton {
|
||||
padding: 4px 8px;
|
||||
}
|
||||
.bs-actionsbox {
|
||||
@@ -241,6 +227,16 @@
|
||||
.bs-actionsbox .btn-group button {
|
||||
width: 50%;
|
||||
}
|
||||
.bs-donebutton {
|
||||
float: left;
|
||||
width: 100%;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.bs-donebutton .btn-group button {
|
||||
width: 100%;
|
||||
}
|
||||
.bs-searchbox + .bs-actionsbox {
|
||||
padding: 0 8px 4px;
|
||||
}
|
||||
@@ -249,7 +245,7 @@
|
||||
width: 100%;
|
||||
}
|
||||
.mobile-device {
|
||||
position: absolute;
|
||||
position: absolute !important;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: block !important;
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+3
-3
File diff suppressed because one or more lines are too long
+359
-179
@@ -1,33 +1,149 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
(function ($) {
|
||||
'use strict';
|
||||
|
||||
// Case insensitive search
|
||||
$.expr[':'].icontains = function (obj, index, meta) {
|
||||
return icontains($(obj).text(), meta[3]);
|
||||
};
|
||||
|
||||
// Case and accent insensitive search
|
||||
$.expr[':'].aicontains = function (obj, index, meta) {
|
||||
return icontains($(obj).data('normalizedText') || $(obj).text(), meta[3]);
|
||||
};
|
||||
|
||||
/**
|
||||
* Actual implementation of the case insensitive search.
|
||||
* @access private
|
||||
* @param {String} haystack
|
||||
* @param {String} needle
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function icontains(haystack, needle) {
|
||||
return haystack.toUpperCase().indexOf(needle.toUpperCase()) > -1;
|
||||
//<editor-fold desc="Shims">
|
||||
if (!String.prototype.includes) {
|
||||
(function () {
|
||||
'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
|
||||
var toString = {}.toString;
|
||||
var defineProperty = (function () {
|
||||
// IE 8 only supports `Object.defineProperty` on DOM elements
|
||||
try {
|
||||
var object = {};
|
||||
var $defineProperty = Object.defineProperty;
|
||||
var result = $defineProperty(object, object, object) && $defineProperty;
|
||||
} catch (error) {
|
||||
}
|
||||
return result;
|
||||
}());
|
||||
var indexOf = ''.indexOf;
|
||||
var includes = function (search) {
|
||||
if (this == null) {
|
||||
throw TypeError();
|
||||
}
|
||||
var string = String(this);
|
||||
if (search && toString.call(search) == '[object RegExp]') {
|
||||
throw TypeError();
|
||||
}
|
||||
var stringLength = string.length;
|
||||
var searchString = String(search);
|
||||
var searchLength = searchString.length;
|
||||
var position = arguments.length > 1 ? arguments[1] : undefined;
|
||||
// `ToInteger`
|
||||
var pos = position ? Number(position) : 0;
|
||||
if (pos != pos) { // better `isNaN`
|
||||
pos = 0;
|
||||
}
|
||||
var start = Math.min(Math.max(pos, 0), stringLength);
|
||||
// Avoid the `indexOf` call if no match is possible
|
||||
if (searchLength + start > stringLength) {
|
||||
return false;
|
||||
}
|
||||
return indexOf.call(string, searchString, pos) != -1;
|
||||
};
|
||||
if (defineProperty) {
|
||||
defineProperty(String.prototype, 'includes', {
|
||||
'value': includes,
|
||||
'configurable': true,
|
||||
'writable': true
|
||||
});
|
||||
} else {
|
||||
String.prototype.includes = includes;
|
||||
}
|
||||
}());
|
||||
}
|
||||
|
||||
if (!String.prototype.startsWith) {
|
||||
(function () {
|
||||
'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
|
||||
var defineProperty = (function () {
|
||||
// IE 8 only supports `Object.defineProperty` on DOM elements
|
||||
try {
|
||||
var object = {};
|
||||
var $defineProperty = Object.defineProperty;
|
||||
var result = $defineProperty(object, object, object) && $defineProperty;
|
||||
} catch (error) {
|
||||
}
|
||||
return result;
|
||||
}());
|
||||
var toString = {}.toString;
|
||||
var startsWith = function (search) {
|
||||
if (this == null) {
|
||||
throw TypeError();
|
||||
}
|
||||
var string = String(this);
|
||||
if (search && toString.call(search) == '[object RegExp]') {
|
||||
throw TypeError();
|
||||
}
|
||||
var stringLength = string.length;
|
||||
var searchString = String(search);
|
||||
var searchLength = searchString.length;
|
||||
var position = arguments.length > 1 ? arguments[1] : undefined;
|
||||
// `ToInteger`
|
||||
var pos = position ? Number(position) : 0;
|
||||
if (pos != pos) { // better `isNaN`
|
||||
pos = 0;
|
||||
}
|
||||
var start = Math.min(Math.max(pos, 0), stringLength);
|
||||
// Avoid the `indexOf` call if no match is possible
|
||||
if (searchLength + start > stringLength) {
|
||||
return false;
|
||||
}
|
||||
var index = -1;
|
||||
while (++index < searchLength) {
|
||||
if (string.charCodeAt(start + index) != searchString.charCodeAt(index)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
if (defineProperty) {
|
||||
defineProperty(String.prototype, 'startsWith', {
|
||||
'value': startsWith,
|
||||
'configurable': true,
|
||||
'writable': true
|
||||
});
|
||||
} else {
|
||||
String.prototype.startsWith = startsWith;
|
||||
}
|
||||
}());
|
||||
}
|
||||
//</editor-fold>
|
||||
|
||||
// Case insensitive contains search
|
||||
$.expr[':'].icontains = function (obj, index, meta) {
|
||||
var $obj = $(obj);
|
||||
var haystack = ($obj.data('tokens') || $obj.text()).toUpperCase();
|
||||
return haystack.includes(meta[3].toUpperCase());
|
||||
};
|
||||
|
||||
// Case insensitive begins search
|
||||
$.expr[':'].ibegins = function (obj, index, meta) {
|
||||
var $obj = $(obj);
|
||||
var haystack = ($obj.data('tokens') || $obj.text()).toUpperCase();
|
||||
return haystack.startsWith(meta[3].toUpperCase());
|
||||
};
|
||||
|
||||
// Case and accent insensitive contains search
|
||||
$.expr[':'].aicontains = function (obj, index, meta) {
|
||||
var $obj = $(obj);
|
||||
var haystack = ($obj.data('tokens') || $obj.data('normalizedText') || $obj.text()).toUpperCase();
|
||||
return haystack.includes(haystack, meta[3]);
|
||||
};
|
||||
|
||||
// Case and accent insensitive begins search
|
||||
$.expr[':'].aibegins = function (obj, index, meta) {
|
||||
var $obj = $(obj);
|
||||
var haystack = ($obj.data('tokens') || $obj.data('normalizedText') || $obj.text()).toUpperCase();
|
||||
return haystack.startsWith(meta[3].toUpperCase());
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove all diatrics from the given text.
|
||||
* @access private
|
||||
@@ -109,25 +225,25 @@
|
||||
this.init();
|
||||
};
|
||||
|
||||
Selectpicker.VERSION = '1.6.3';
|
||||
Selectpicker.VERSION = '1.6.5';
|
||||
|
||||
// part of this is duplicated in i18n/defaults-en_US.js. Make sure to update both.
|
||||
Selectpicker.DEFAULTS = {
|
||||
noneSelectedText: 'Nothing selected',
|
||||
noneResultsText: 'No results match',
|
||||
noneResultsText: 'No results matched {0}',
|
||||
countSelectedText: function (numSelected, numTotal) {
|
||||
return (numSelected == 1) ? "{0} item selected" : "{0} items selected";
|
||||
},
|
||||
maxOptionsText: function (numAll, numGroup) {
|
||||
var arr = [];
|
||||
|
||||
arr[0] = (numAll == 1) ? 'Limit reached ({n} item max)' : 'Limit reached ({n} items max)';
|
||||
arr[1] = (numGroup == 1) ? 'Group limit reached ({n} item max)' : 'Group limit reached ({n} items max)';
|
||||
|
||||
return arr;
|
||||
return [
|
||||
(numAll == 1) ? 'Limit reached ({n} item max)' : 'Limit reached ({n} items max)',
|
||||
(numGroup == 1) ? 'Group limit reached ({n} item max)' : 'Group limit reached ({n} items max)'
|
||||
];
|
||||
},
|
||||
selectAllText: 'Select All',
|
||||
deselectAllText: 'Deselect All',
|
||||
doneButton: false,
|
||||
doneButtonText: 'Close',
|
||||
multipleSeparator: ', ',
|
||||
style: 'btn-default',
|
||||
size: 'auto',
|
||||
@@ -142,14 +258,16 @@
|
||||
dropupAuto: true,
|
||||
header: false,
|
||||
liveSearch: false,
|
||||
liveSearchPlaceholder: null,
|
||||
liveSearchNormalize: false,
|
||||
liveSearchStyle: 'contains',
|
||||
actionsBox: false,
|
||||
iconBase: 'glyphicon',
|
||||
tickIcon: 'glyphicon-ok',
|
||||
maxOptions: false,
|
||||
mobile: false,
|
||||
selectOnTab: false,
|
||||
dropdownAlignRight: false,
|
||||
searchAccentInsensitive: false
|
||||
dropdownAlignRight: false
|
||||
};
|
||||
|
||||
Selectpicker.prototype = {
|
||||
@@ -165,9 +283,9 @@
|
||||
this.autofocus = this.$element.prop('autofocus');
|
||||
this.$newElement = this.createView();
|
||||
this.$element.after(this.$newElement);
|
||||
this.$menu = this.$newElement.find('> .dropdown-menu');
|
||||
this.$button = this.$newElement.find('> button');
|
||||
this.$searchbox = this.$newElement.find('input');
|
||||
this.$button = this.$newElement.children('button');
|
||||
this.$menu = this.$newElement.children('.dropdown-menu');
|
||||
this.$searchbox = this.$menu.find('input');
|
||||
|
||||
if (this.options.dropdownAlignRight)
|
||||
this.$menu.addClass('dropdown-menu-right');
|
||||
@@ -198,24 +316,39 @@
|
||||
// If we are multiple, then add the show-tick class by default
|
||||
var multiple = this.multiple ? ' show-tick' : '',
|
||||
inputGroup = this.$element.parent().hasClass('input-group') ? ' input-group-btn' : '',
|
||||
autofocus = this.autofocus ? ' autofocus' : '',
|
||||
btnSize = this.$element.parents().hasClass('form-group-lg') ? ' btn-lg' : (this.$element.parents().hasClass('form-group-sm') ? ' btn-sm' : '');
|
||||
autofocus = this.autofocus ? ' autofocus' : '';
|
||||
// Elements
|
||||
var header = this.options.header ? '<div class="popover-title"><button type="button" class="close" aria-hidden="true">×</button>' + this.options.header + '</div>' : '';
|
||||
var searchbox = this.options.liveSearch ? '<div class="bs-searchbox"><input type="text" class="input-block-level form-control" autocomplete="off" /></div>' : '';
|
||||
var actionsbox = this.options.actionsBox ? '<div class="bs-actionsbox">' +
|
||||
'<div class="btn-group btn-block">' +
|
||||
'<button class="actions-btn bs-select-all btn btn-sm btn-default">' +
|
||||
var searchbox = this.options.liveSearch ?
|
||||
'<div class="bs-searchbox">' +
|
||||
'<input type="text" class="form-control" autocomplete="off"' +
|
||||
(null === this.options.liveSearchPlaceholder ? '' : ' placeholder="' + htmlEscape(this.options.liveSearchPlaceholder) + '"') + '>' +
|
||||
'</div>'
|
||||
: '';
|
||||
var actionsbox = this.multiple && this.options.actionsBox ?
|
||||
'<div class="bs-actionsbox">' +
|
||||
'<div class="btn-group btn-group-sm btn-block">' +
|
||||
'<button class="actions-btn bs-select-all btn btn-default">' +
|
||||
this.options.selectAllText +
|
||||
'</button>' +
|
||||
'<button class="actions-btn bs-deselect-all btn btn-sm btn-default">' +
|
||||
'<button class="actions-btn bs-deselect-all btn btn-default">' +
|
||||
this.options.deselectAllText +
|
||||
'</button>' +
|
||||
'</div>' +
|
||||
'</div>' : '';
|
||||
'</div>'
|
||||
: '';
|
||||
var donebutton = this.multiple && this.options.doneButton ?
|
||||
'<div class="bs-donebutton">' +
|
||||
'<div class="btn-group btn-block">' +
|
||||
'<button class="btn btn-sm btn-default">' +
|
||||
this.options.doneButtonText +
|
||||
'</button>' +
|
||||
'</div>' +
|
||||
'</div>'
|
||||
: '';
|
||||
var drop =
|
||||
'<div class="btn-group bootstrap-select' + multiple + inputGroup + '">' +
|
||||
'<button type="button" class="btn dropdown-toggle selectpicker' + btnSize + '" data-toggle="dropdown"' + autofocus + '>' +
|
||||
'<button type="button" class="btn dropdown-toggle" data-toggle="dropdown"' + autofocus + '>' +
|
||||
'<span class="filter-option pull-left"></span> ' +
|
||||
'<span class="caret"></span>' +
|
||||
'</button>' +
|
||||
@@ -223,8 +356,9 @@
|
||||
header +
|
||||
searchbox +
|
||||
actionsbox +
|
||||
'<ul class="dropdown-menu inner selectpicker" role="menu">' +
|
||||
'<ul class="dropdown-menu inner" role="menu">' +
|
||||
'</ul>' +
|
||||
donebutton +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
|
||||
@@ -260,45 +394,46 @@
|
||||
* @param content
|
||||
* @param [index]
|
||||
* @param [classes]
|
||||
* @param [optgroup]
|
||||
* @returns {string}
|
||||
*/
|
||||
var generateLI = function (content, index, classes) {
|
||||
var generateLI = function (content, index, classes, optgroup) {
|
||||
return '<li' +
|
||||
(typeof classes !== 'undefined' ? ' class="' + classes + '"' : '') +
|
||||
(typeof index !== 'undefined' | null === index ? ' data-original-index="' + index + '"' : '') +
|
||||
'>' + content + '</li>';
|
||||
((typeof classes !== 'undefined' & '' !== classes) ? ' class="' + classes + '"' : '') +
|
||||
((typeof index !== 'undefined' & null !== index) ? ' data-original-index="' + index + '"' : '') +
|
||||
((typeof optgroup !== 'undefined' & null !== optgroup) ? 'data-optgroup="' + optgroup + '"' : '') +
|
||||
'>' + content + '</li>';
|
||||
};
|
||||
|
||||
/**
|
||||
* @param text
|
||||
* @param [classes]
|
||||
* @param [inline]
|
||||
* @param [optgroup]
|
||||
* @param [tokens]
|
||||
* @returns {string}
|
||||
*/
|
||||
var generateA = function (text, classes, inline, optgroup) {
|
||||
var normText = normalizeToBase(htmlEscape(text));
|
||||
var generateA = function (text, classes, inline, tokens) {
|
||||
return '<a tabindex="0"' +
|
||||
(typeof classes !== 'undefined' ? ' class="' + classes + '"' : '') +
|
||||
(typeof inline !== 'undefined' ? ' style="' + inline + '"' : '') +
|
||||
(typeof optgroup !== 'undefined' ? 'data-optgroup="' + optgroup + '"' : '') +
|
||||
' data-normalized-text="' + normText + '"' +
|
||||
'>' + text +
|
||||
'<span class="' + that.options.iconBase + ' ' + that.options.tickIcon + ' check-mark"></span>' +
|
||||
'</a>';
|
||||
(typeof classes !== 'undefined' ? ' class="' + classes + '"' : '') +
|
||||
(typeof inline !== 'undefined' ? ' style="' + inline + '"' : '') +
|
||||
' data-normalized-text="' + normalizeToBase(htmlEscape(text)) + '"' +
|
||||
(typeof tokens !== 'undefined' || tokens !== null ? ' data-tokens="' + tokens + '"' : '') +
|
||||
'>' + text +
|
||||
'<span class="' + that.options.iconBase + ' ' + that.options.tickIcon + ' check-mark"></span>' +
|
||||
'</a>';
|
||||
};
|
||||
|
||||
this.$element.find('option').each(function () {
|
||||
this.$element.find('option').each(function (index) {
|
||||
var $this = $(this);
|
||||
|
||||
// Get the class and text for the option
|
||||
var optionClass = $this.attr('class') || '',
|
||||
inline = $this.attr('style'),
|
||||
text = $this.data('content') ? $this.data('content') : $this.html(),
|
||||
subtext = typeof $this.data('subtext') !== 'undefined' ? '<small class="muted text-muted">' + $this.data('subtext') + '</small>' : '',
|
||||
tokens = $this.data('tokens') ? $this.data('tokens') : null,
|
||||
subtext = typeof $this.data('subtext') !== 'undefined' ? '<small class="text-muted">' + $this.data('subtext') + '</small>' : '',
|
||||
icon = typeof $this.data('icon') !== 'undefined' ? '<span class="' + that.options.iconBase + ' ' + $this.data('icon') + '"></span> ' : '',
|
||||
isDisabled = $this.is(':disabled') || $this.parent().is(':disabled'),
|
||||
index = $this[0].index;
|
||||
isDisabled = $this.is(':disabled') || $this.parent().is(':disabled');
|
||||
if (icon !== '' && isDisabled) {
|
||||
icon = '<span>' + icon + '</span>';
|
||||
}
|
||||
@@ -318,24 +453,25 @@
|
||||
|
||||
// Get the opt group label
|
||||
var label = $this.parent().attr('label');
|
||||
var labelSubtext = typeof $this.parent().data('subtext') !== 'undefined' ? '<small class="muted text-muted">' + $this.parent().data('subtext') + '</small>' : '';
|
||||
var labelSubtext = typeof $this.parent().data('subtext') !== 'undefined' ? '<small class="text-muted">' + $this.parent().data('subtext') + '</small>' : '';
|
||||
var labelIcon = $this.parent().data('icon') ? '<span class="' + that.options.iconBase + ' ' + $this.parent().data('icon') + '"></span> ' : '';
|
||||
label = labelIcon + '<span class="text">' + label + labelSubtext + '</span>';
|
||||
|
||||
if (index !== 0 && _li.length > 0) { // Is it NOT the first option of the select && are there elements in the dropdown?
|
||||
_li.push(generateLI('', null, 'divider'));
|
||||
_li.push(generateLI('', null, 'divider', optID + 'div'));
|
||||
}
|
||||
|
||||
_li.push(generateLI(label, null, 'dropdown-header'));
|
||||
_li.push(generateLI(label, null, 'dropdown-header', optID));
|
||||
}
|
||||
|
||||
_li.push(generateLI(generateA(text, 'opt ' + optionClass, inline, optID), index));
|
||||
_li.push(generateLI(generateA(text, 'opt ' + optionClass, inline, tokens), index, '', optID));
|
||||
} else if ($this.data('divider') === true) {
|
||||
_li.push(generateLI('', index, 'divider'));
|
||||
} else if ($this.data('hidden') === true) {
|
||||
_li.push(generateLI(generateA(text, optionClass, inline), index, 'hide is-hidden'));
|
||||
_li.push(generateLI(generateA(text, optionClass, inline, tokens), index, 'hidden is-hidden'));
|
||||
} else {
|
||||
_li.push(generateLI(generateA(text, optionClass, inline), index));
|
||||
if ($this.prev().is('optgroup')) _li.push(generateLI('', null, 'divider', optID + 'div'));
|
||||
_li.push(generateLI(generateA(text, optionClass, inline, tokens), index));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -367,20 +503,20 @@
|
||||
}
|
||||
|
||||
this.tabIndex();
|
||||
var notDisabled = this.options.hideDisabled ? ':not([disabled])' : '';
|
||||
var notDisabled = this.options.hideDisabled ? ':enabled' : '';
|
||||
var selectedItems = this.$element.find('option:selected' + notDisabled).map(function () {
|
||||
var $this = $(this);
|
||||
var icon = $this.data('icon') && that.options.showIcon ? '<i class="' + that.options.iconBase + ' ' + $this.data('icon') + '"></i> ' : '';
|
||||
var subtext;
|
||||
if (that.options.showSubtext && $this.attr('data-subtext') && !that.multiple) {
|
||||
subtext = ' <small class="muted text-muted">' + $this.data('subtext') + '</small>';
|
||||
if (that.options.showSubtext && $this.data('subtext') && !that.multiple) {
|
||||
subtext = ' <small class="text-muted">' + $this.data('subtext') + '</small>';
|
||||
} else {
|
||||
subtext = '';
|
||||
}
|
||||
if ($this.data('content') && that.options.showContent) {
|
||||
return $this.data('content');
|
||||
} else if (typeof $this.attr('title') !== 'undefined') {
|
||||
if (typeof $this.attr('title') !== 'undefined') {
|
||||
return $this.attr('title');
|
||||
} else if ($this.data('content') && that.options.showContent) {
|
||||
return $this.data('content');
|
||||
} else {
|
||||
return icon + $this.html() + subtext;
|
||||
}
|
||||
@@ -401,7 +537,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
this.options.title = this.$element.attr('title');
|
||||
if (this.options.title == undefined) {
|
||||
this.options.title = this.$element.attr('title');
|
||||
}
|
||||
|
||||
if (this.options.selectedTextFormat == 'static') {
|
||||
title = this.options.title;
|
||||
@@ -412,8 +550,9 @@
|
||||
title = typeof this.options.title !== 'undefined' ? this.options.title : this.options.noneSelectedText;
|
||||
}
|
||||
|
||||
this.$button.attr('title', htmlEscape(title));
|
||||
this.$newElement.find('.filter-option').html(title);
|
||||
//strip all html-tags and trim the result
|
||||
this.$button.attr('title', $.trim(title.replace(/<[^>]*>?/g, '')));
|
||||
this.$button.children('.filter-option').html(title);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -440,12 +579,13 @@
|
||||
liHeight: function () {
|
||||
if (this.options.size === false) return;
|
||||
|
||||
var $selectClone = this.$menu.parent().clone().find('> .dropdown-toggle').prop('autofocus', false).end().appendTo('body'),
|
||||
$menuClone = $selectClone.addClass('open').find('> .dropdown-menu'),
|
||||
liHeight = $menuClone.find('li').not('.divider').not('.dropdown-header').filter(':visible').children('a').outerHeight(),
|
||||
var $selectClone = this.$menu.parent().clone().children('.dropdown-toggle').prop('autofocus', false).end().appendTo('body'),
|
||||
$menuClone = $selectClone.addClass('open').children('.dropdown-menu'),
|
||||
liHeight = $menuClone.find('li').not('.divider, .dropdown-header').filter(':visible').children('a').outerHeight(),
|
||||
headerHeight = this.options.header ? $menuClone.find('.popover-title').outerHeight() : 0,
|
||||
searchHeight = this.options.liveSearch ? $menuClone.find('.bs-searchbox').outerHeight() : 0,
|
||||
actionsHeight = this.options.actionsBox ? $menuClone.find('.bs-actionsbox').outerHeight() : 0;
|
||||
actionsHeight = this.options.actionsBox ? $menuClone.find('.bs-actionsbox').outerHeight() : 0,
|
||||
doneButtonHeight = this.multiple ? $menuClone.find('.bs-donebutton').outerHeight() : 0;
|
||||
|
||||
$selectClone.remove();
|
||||
|
||||
@@ -453,27 +593,29 @@
|
||||
.data('liHeight', liHeight)
|
||||
.data('headerHeight', headerHeight)
|
||||
.data('searchHeight', searchHeight)
|
||||
.data('actionsHeight', actionsHeight);
|
||||
.data('actionsHeight', actionsHeight)
|
||||
.data('doneButtonHeight', doneButtonHeight);
|
||||
},
|
||||
|
||||
setSize: function () {
|
||||
this.findLis();
|
||||
var that = this,
|
||||
menu = this.$menu,
|
||||
menuInner = menu.find('.inner'),
|
||||
$menu = this.$menu,
|
||||
$menuInner = $menu.children('.inner'),
|
||||
selectHeight = this.$newElement.outerHeight(),
|
||||
liHeight = this.$newElement.data('liHeight'),
|
||||
headerHeight = this.$newElement.data('headerHeight'),
|
||||
searchHeight = this.$newElement.data('searchHeight'),
|
||||
actionsHeight = this.$newElement.data('actionsHeight'),
|
||||
doneButtonHeight = this.$newElement.data('doneButtonHeight'),
|
||||
divHeight = this.$lis.filter('.divider').outerHeight(true),
|
||||
menuPadding = parseInt(menu.css('padding-top')) +
|
||||
parseInt(menu.css('padding-bottom')) +
|
||||
parseInt(menu.css('border-top-width')) +
|
||||
parseInt(menu.css('border-bottom-width')),
|
||||
notDisabled = this.options.hideDisabled ? ', .disabled' : '',
|
||||
menuPadding = parseInt($menu.css('padding-top')) +
|
||||
parseInt($menu.css('padding-bottom')) +
|
||||
parseInt($menu.css('border-top-width')) +
|
||||
parseInt($menu.css('border-bottom-width')),
|
||||
notDisabled = this.options.hideDisabled ? '.disabled' : '',
|
||||
$window = $(window),
|
||||
menuExtras = menuPadding + parseInt(menu.css('margin-top')) + parseInt(menu.css('margin-bottom')) + 2,
|
||||
menuExtras = menuPadding + parseInt($menu.css('margin-top')) + parseInt($menu.css('margin-bottom')) + 2,
|
||||
menuHeight,
|
||||
selectOffsetTop,
|
||||
selectOffsetBot,
|
||||
@@ -484,18 +626,18 @@
|
||||
selectOffsetBot = $window.height() - selectOffsetTop - selectHeight;
|
||||
};
|
||||
posVert();
|
||||
if (this.options.header) menu.css('padding-top', 0);
|
||||
if (this.options.header) $menu.css('padding-top', 0);
|
||||
|
||||
if (this.options.size == 'auto') {
|
||||
var getSize = function () {
|
||||
var minHeight,
|
||||
lisVis = that.$lis.not('.hide');
|
||||
lisVis = that.$lis.not('.hidden');
|
||||
|
||||
posVert();
|
||||
menuHeight = selectOffsetBot - menuExtras;
|
||||
|
||||
if (that.options.dropupAuto) {
|
||||
that.$newElement.toggleClass('dropup', (selectOffsetTop > selectOffsetBot) && ((menuHeight - menuExtras) < menu.height()));
|
||||
that.$newElement.toggleClass('dropup', selectOffsetTop > selectOffsetBot && (menuHeight - menuExtras) < $menu.height());
|
||||
}
|
||||
if (that.$newElement.hasClass('dropup')) {
|
||||
menuHeight = selectOffsetTop - menuExtras;
|
||||
@@ -507,31 +649,36 @@
|
||||
minHeight = 0;
|
||||
}
|
||||
|
||||
menu.css({
|
||||
$menu.css({
|
||||
'max-height': menuHeight + 'px',
|
||||
'overflow': 'hidden',
|
||||
'min-height': minHeight + headerHeight + searchHeight + actionsHeight + 'px'
|
||||
'min-height': minHeight + headerHeight + searchHeight + actionsHeight + doneButtonHeight + 'px'
|
||||
});
|
||||
menuInner.css({
|
||||
'max-height': menuHeight - headerHeight - searchHeight - actionsHeight - menuPadding + 'px',
|
||||
$menuInner.css({
|
||||
'max-height': menuHeight - headerHeight - searchHeight - actionsHeight - doneButtonHeight - menuPadding + 'px',
|
||||
'overflow-y': 'auto',
|
||||
'min-height': Math.max(minHeight - menuPadding, 0) + 'px'
|
||||
});
|
||||
};
|
||||
getSize();
|
||||
this.$searchbox.off('input.getSize propertychange.getSize').on('input.getSize propertychange.getSize', getSize);
|
||||
$(window).off('resize.getSize').on('resize.getSize', getSize);
|
||||
$(window).off('scroll.getSize').on('scroll.getSize', getSize);
|
||||
} else if (this.options.size && this.options.size != 'auto' && menu.find('li' + notDisabled).length > this.options.size) {
|
||||
var optIndex = this.$lis.not('.divider' + notDisabled).find(' > *').slice(0, this.options.size).last().parent().index();
|
||||
$window.off('resize.getSize scroll.getSize').on('resize.getSize scroll.getSize', getSize);
|
||||
} else if (this.options.size && this.options.size != 'auto' && $menu.find('li').not(notDisabled).length > this.options.size) {
|
||||
var optIndex = this.$lis.not('.divider').not(notDisabled).children().slice(0, this.options.size).last().parent().index();
|
||||
var divLength = this.$lis.slice(0, optIndex + 1).filter('.divider').length;
|
||||
menuHeight = liHeight * this.options.size + divLength * divHeight + menuPadding;
|
||||
if (that.options.dropupAuto) {
|
||||
//noinspection JSUnusedAssignment
|
||||
this.$newElement.toggleClass('dropup', (selectOffsetTop > selectOffsetBot) && (menuHeight < menu.height()));
|
||||
this.$newElement.toggleClass('dropup', selectOffsetTop > selectOffsetBot && menuHeight < $menu.height());
|
||||
}
|
||||
menu.css({'max-height': menuHeight + headerHeight + searchHeight + actionsHeight + 'px', 'overflow': 'hidden'});
|
||||
menuInner.css({'max-height': menuHeight - menuPadding + 'px', 'overflow-y': 'auto'});
|
||||
$menu.css({
|
||||
'max-height': menuHeight + headerHeight + searchHeight + actionsHeight + doneButtonHeight + 'px',
|
||||
'overflow': 'hidden'
|
||||
});
|
||||
$menuInner.css({
|
||||
'max-height': menuHeight - menuPadding + 'px',
|
||||
'overflow-y': 'auto'
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -541,8 +688,8 @@
|
||||
|
||||
// Get correct width if element hidden
|
||||
var selectClone = this.$newElement.clone().appendTo('body');
|
||||
var ulWidth = selectClone.find('> .dropdown-menu').css('width');
|
||||
var btnWidth = selectClone.css('width', 'auto').find('> button').css('width');
|
||||
var ulWidth = selectClone.children('.dropdown-menu').css('width');
|
||||
var btnWidth = selectClone.css('width', 'auto').children('button').css('width');
|
||||
selectClone.remove();
|
||||
|
||||
// Set width to whatever's larger, button title or longest option
|
||||
@@ -592,10 +739,7 @@
|
||||
$drop.toggleClass('open', !$(this).hasClass('open'));
|
||||
$drop.append(that.$menu);
|
||||
});
|
||||
$(window).resize(function () {
|
||||
getPlacement(that.$newElement);
|
||||
});
|
||||
$(window).on('scroll', function () {
|
||||
$(window).on('resize scroll', function () {
|
||||
getPlacement(that.$newElement);
|
||||
});
|
||||
$('html').on('click', function (e) {
|
||||
@@ -613,9 +757,9 @@
|
||||
setDisabled: function (index, disabled) {
|
||||
this.findLis();
|
||||
if (disabled) {
|
||||
this.$lis.filter('[data-original-index="' + index + '"]').addClass('disabled').find('a').attr('href', '#').attr('tabindex', -1);
|
||||
this.$lis.filter('[data-original-index="' + index + '"]').addClass('disabled').children('a').attr('href', '#').attr('tabindex', -1);
|
||||
} else {
|
||||
this.$lis.filter('[data-original-index="' + index + '"]').removeClass('disabled').find('a').removeAttr('href').attr('tabindex', 0);
|
||||
this.$lis.filter('[data-original-index="' + index + '"]').removeClass('disabled').children('a').removeAttr('href').attr('tabindex', 0);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -633,8 +777,8 @@
|
||||
this.$button.removeClass('disabled');
|
||||
}
|
||||
|
||||
if (this.$button.attr('tabindex') == -1) {
|
||||
if (!this.$element.data('tabindex')) this.$button.removeAttr('tabindex');
|
||||
if (this.$button.attr('tabindex') == -1 && !this.$element.data('tabindex')) {
|
||||
this.$button.removeAttr('tabindex');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -698,7 +842,7 @@
|
||||
that.setSelected(clickedIndex, !state);
|
||||
$this.blur();
|
||||
|
||||
if ((maxOptions !== false) || (maxOptionsGrp !== false)) {
|
||||
if (maxOptions !== false || maxOptionsGrp !== false) {
|
||||
var maxReached = maxOptions < $options.filter(':selected').length,
|
||||
maxReachedGrp = maxOptionsGrp < $optgroup.find('option:selected').length;
|
||||
|
||||
@@ -769,13 +913,13 @@
|
||||
});
|
||||
|
||||
this.$menu.on('click', 'li.disabled a, .popover-title, .popover-title :not(.close)', function (e) {
|
||||
if (e.target == this) {
|
||||
if (e.currentTarget == this) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (!that.options.liveSearch) {
|
||||
that.$button.focus();
|
||||
} else {
|
||||
if (that.options.liveSearch) {
|
||||
that.$searchbox.focus();
|
||||
} else {
|
||||
that.$button.focus();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -783,10 +927,10 @@
|
||||
this.$menu.on('click', 'li.divider, li.dropdown-header', function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (!that.options.liveSearch) {
|
||||
that.$button.focus();
|
||||
} else {
|
||||
if (that.options.liveSearch) {
|
||||
that.$searchbox.focus();
|
||||
} else {
|
||||
that.$button.focus();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -798,7 +942,6 @@
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
|
||||
this.$menu.on('click', '.actions-btn', function (e) {
|
||||
if (that.options.liveSearch) {
|
||||
that.$searchbox.focus();
|
||||
@@ -809,7 +952,7 @@
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
if ($(this).is('.bs-select-all')) {
|
||||
if ($(this).hasClass('bs-select-all')) {
|
||||
that.selectAll();
|
||||
} else {
|
||||
that.deselectAll();
|
||||
@@ -824,14 +967,14 @@
|
||||
|
||||
liveSearchListener: function () {
|
||||
var that = this,
|
||||
no_results = $('<li class="no-results"></li>');
|
||||
$no_results = $('<li class="no-results"></li>');
|
||||
|
||||
this.$newElement.on('click.dropdown.data-api touchstart.dropdown.data-api', function () {
|
||||
that.$menu.find('.active').removeClass('active');
|
||||
if (!!that.$searchbox.val()) {
|
||||
that.$searchbox.val('');
|
||||
that.$lis.not('.is-hidden').removeClass('hide');
|
||||
if (!!no_results.parent().length) no_results.remove();
|
||||
that.$lis.not('.is-hidden').removeClass('hidden');
|
||||
if (!!$no_results.parent().length) $no_results.remove();
|
||||
}
|
||||
if (!that.multiple) that.$menu.find('.selected').addClass('active');
|
||||
setTimeout(function () {
|
||||
@@ -845,32 +988,76 @@
|
||||
|
||||
this.$searchbox.on('input propertychange', function () {
|
||||
if (that.$searchbox.val()) {
|
||||
|
||||
if (that.options.searchAccentInsensitive) {
|
||||
that.$lis.not('.is-hidden').removeClass('hide').find('a').not(':aicontains(' + normalizeToBase(that.$searchbox.val()) + ')').parent().addClass('hide');
|
||||
var $searchBase = that.$lis.not('.is-hidden').removeClass('hidden').children('a');
|
||||
if (that.options.liveSearchNormalize) {
|
||||
$searchBase = $searchBase.not(':a' + that._searchStyle() + '(' + normalizeToBase(that.$searchbox.val()) + ')');
|
||||
} else {
|
||||
that.$lis.not('.is-hidden').removeClass('hide').find('a').not(':icontains(' + that.$searchbox.val() + ')').parent().addClass('hide');
|
||||
$searchBase = $searchBase.not(':' + that._searchStyle() + '(' + that.$searchbox.val() + ')');
|
||||
}
|
||||
$searchBase.parent().addClass('hidden');
|
||||
|
||||
if (!that.$menu.find('li').filter(':visible:not(.no-results)').length) {
|
||||
if (!!no_results.parent().length) no_results.remove();
|
||||
no_results.html(that.options.noneResultsText + ' "' + htmlEscape(that.$searchbox.val()) + '"').show();
|
||||
that.$menu.find('li').last().after(no_results);
|
||||
} else if (!!no_results.parent().length) {
|
||||
no_results.remove();
|
||||
that.$lis.filter('.dropdown-header').each(function () {
|
||||
var $this = $(this),
|
||||
optgroup = $this.data('optgroup');
|
||||
|
||||
if (that.$lis.filter('[data-optgroup=' + optgroup + ']').not($this).not('.hidden').length === 0) {
|
||||
$this.addClass('hidden');
|
||||
that.$lis.filter('[data-optgroup=' + optgroup + 'div]').addClass('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
var $lisVisible = that.$lis.not('.hidden');
|
||||
|
||||
// hide divider if first or last visible, or if followed by another divider
|
||||
$lisVisible.each(function(index) {
|
||||
var $this = $(this);
|
||||
|
||||
if ($this.hasClass('divider') && (
|
||||
$this.index() === $lisVisible.eq(0).index() ||
|
||||
$this.index() === $lisVisible.last().index() ||
|
||||
$lisVisible.eq(index + 1).hasClass('divider'))) {
|
||||
$this.addClass('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
if (!that.$lis.not('.hidden, .no-results').length) {
|
||||
if (!!$no_results.parent().length) {
|
||||
$no_results.remove();
|
||||
}
|
||||
$no_results.html(that.options.noneResultsText.replace('{0}', '"' + htmlEscape(that.$searchbox.val()) + '"')).show();
|
||||
that.$menu.append($no_results);
|
||||
} else if (!!$no_results.parent().length) {
|
||||
$no_results.remove();
|
||||
}
|
||||
|
||||
} else {
|
||||
that.$lis.not('.is-hidden').removeClass('hide');
|
||||
if (!!no_results.parent().length) no_results.remove();
|
||||
that.$lis.not('.is-hidden').removeClass('hidden');
|
||||
if (!!$no_results.parent().length) {
|
||||
$no_results.remove();
|
||||
}
|
||||
}
|
||||
|
||||
that.$menu.find('li.active').removeClass('active');
|
||||
that.$menu.find('li').filter(':visible:not(.divider)').eq(0).addClass('active').find('a').focus();
|
||||
that.$lis.filter('.active').removeClass('active');
|
||||
that.$lis.not('.hidden, .divider, .dropdown-header').eq(0).addClass('active').children('a').focus();
|
||||
$(this).focus();
|
||||
});
|
||||
},
|
||||
|
||||
_searchStyle: function () {
|
||||
var style = 'icontains';
|
||||
switch (this.options.liveSearchStyle) {
|
||||
case 'begins':
|
||||
case 'startsWith':
|
||||
style = 'ibegins';
|
||||
break;
|
||||
case 'contains':
|
||||
default:
|
||||
break; //no need to change the default
|
||||
}
|
||||
|
||||
return style;
|
||||
},
|
||||
|
||||
val: function (value) {
|
||||
if (typeof value !== 'undefined') {
|
||||
this.$element.val(value);
|
||||
@@ -884,17 +1071,21 @@
|
||||
|
||||
selectAll: function () {
|
||||
this.findLis();
|
||||
this.$lis.not('.divider').not('.disabled').not('.selected').filter(':visible').find('a').click();
|
||||
this.$element.find('option:enabled').not('[data-divider], [data-hidden]').prop('selected', true);
|
||||
this.$lis.not('.divider, .dropdown-header, .disabled, .hidden').addClass('selected');
|
||||
this.render(false);
|
||||
},
|
||||
|
||||
deselectAll: function () {
|
||||
this.findLis();
|
||||
this.$lis.not('.divider').not('.disabled').filter('.selected').filter(':visible').find('a').click();
|
||||
this.$element.find('option:enabled').not('[data-divider], [data-hidden]').prop('selected', false);
|
||||
this.$lis.not('.divider, .dropdown-header, .disabled, .hidden').removeClass('selected');
|
||||
this.render(false);
|
||||
},
|
||||
|
||||
keydown: function (e) {
|
||||
var $this = $(this),
|
||||
$parent = ($this.is('input')) ? $this.parent().parent() : $this.parent(),
|
||||
$parent = $this.is('input') ? $this.parent().parent() : $this.parent(),
|
||||
$items,
|
||||
that = $parent.data('this'),
|
||||
index,
|
||||
@@ -981,13 +1172,14 @@
|
||||
that.$menu.parent().removeClass('open');
|
||||
that.$button.focus();
|
||||
}
|
||||
$items = $('[role=menu] li:not(.divider):not(.dropdown-header):visible', $parent);
|
||||
$items = $('[role=menu] li:not(.divider):not(.dropdown-header):visible a', $parent);
|
||||
if (!$this.val() && !/(38|40)/.test(e.keyCode.toString(10))) {
|
||||
if ($items.filter('.active').length === 0) {
|
||||
if (that.options.searchAccentInsensitive) {
|
||||
$items = that.$newElement.find('li').filter(':aicontains(' + normalizeToBase(keyCodeMap[e.keyCode]) + ')');
|
||||
$items = that.$newElement.find('li a');
|
||||
if (that.options.liveSearchNormalize) {
|
||||
$items = $items.filter(':a' + that._searchStyle() + '(' + normalizeToBase(keyCodeMap[e.keyCode]) + ')');
|
||||
} else {
|
||||
$items = that.$newElement.find('li').filter(':icontains(' + keyCodeMap[e.keyCode] + ')');
|
||||
$items = $items.filter(':' + that._searchStyle() + '(' + keyCodeMap[e.keyCode] + ')');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1005,7 +1197,7 @@
|
||||
|
||||
if (that.options.liveSearch) {
|
||||
$items.each(function (i) {
|
||||
if ($(this).is(':not(.disabled)')) {
|
||||
if (!$(this).hasClass('disabled')) {
|
||||
$(this).data('index', i);
|
||||
}
|
||||
});
|
||||
@@ -1024,9 +1216,7 @@
|
||||
if (index != nextPrev && index > prev) index = prev;
|
||||
if (index < first) index = first;
|
||||
if (index == prevIndex) index = last;
|
||||
}
|
||||
|
||||
if (e.keyCode == 40) {
|
||||
} else if (e.keyCode == 40) {
|
||||
if (that.options.liveSearch) index += 1;
|
||||
if (index == -1) index = 0;
|
||||
if (index != nextPrev && index < next) index = next;
|
||||
@@ -1040,9 +1230,9 @@
|
||||
$items.eq(index).focus();
|
||||
} else {
|
||||
e.preventDefault();
|
||||
if (!$this.is('.dropdown-toggle')) {
|
||||
if (!$this.hasClass('dropdown-toggle')) {
|
||||
$items.removeClass('active');
|
||||
$items.eq(index).addClass('active').find('a').focus();
|
||||
$items.eq(index).addClass('active').children('a').focus();
|
||||
$this.focus();
|
||||
}
|
||||
}
|
||||
@@ -1053,7 +1243,7 @@
|
||||
prevKey;
|
||||
|
||||
$items.each(function () {
|
||||
if ($(this).parent().is(':not(.disabled)')) {
|
||||
if (!$(this).parent().hasClass('disabled')) {
|
||||
if ($.trim($(this).text().toLowerCase()).substring(0, 1) == keyCodeMap[e.keyCode]) {
|
||||
keyIndex.push($(this).parent().index());
|
||||
}
|
||||
@@ -1081,7 +1271,12 @@
|
||||
if ((/(13|32)/.test(e.keyCode.toString(10)) || (/(^9$)/.test(e.keyCode.toString(10)) && that.options.selectOnTab)) && isActive) {
|
||||
if (!/(32)/.test(e.keyCode.toString(10))) e.preventDefault();
|
||||
if (!that.options.liveSearch) {
|
||||
$(':focus').click();
|
||||
var elem = $(':focus');
|
||||
elem.click();
|
||||
// Bring back focus for multiselects
|
||||
elem.focus();
|
||||
// Prevent screen from scrolling if the user hit the spacebar
|
||||
e.preventDefault();
|
||||
} else if (!/(32)/.test(e.keyCode.toString(10))) {
|
||||
that.$menu.find('.active a').click();
|
||||
$this.focus();
|
||||
@@ -1110,14 +1305,6 @@
|
||||
this.liHeight();
|
||||
},
|
||||
|
||||
update: function () {
|
||||
this.reloadLi();
|
||||
this.setWidth();
|
||||
this.setStyle();
|
||||
this.checkDisabled();
|
||||
this.liHeight();
|
||||
},
|
||||
|
||||
hide: function () {
|
||||
this.$newElement.hide();
|
||||
},
|
||||
@@ -1138,28 +1325,21 @@
|
||||
// get the args of the outer function..
|
||||
var args = arguments;
|
||||
// The arguments of the function are explicitly re-defined from the argument list, because the shift causes them
|
||||
// to get lost
|
||||
//noinspection JSDuplicatedDeclaration
|
||||
// to get lost/corrupted in android 2.3 and IE9 #715 #775
|
||||
var _option = option,
|
||||
option = args[0],
|
||||
event = args[1];
|
||||
_event = event;
|
||||
[].shift.apply(args);
|
||||
|
||||
// This fixes a bug in the js implementation on android 2.3 #715
|
||||
if (typeof option == 'undefined') {
|
||||
option = _option;
|
||||
}
|
||||
|
||||
var value;
|
||||
var chain = this.each(function () {
|
||||
var $this = $(this);
|
||||
if ($this.is('select')) {
|
||||
var data = $this.data('selectpicker'),
|
||||
options = typeof option == 'object' && option;
|
||||
options = typeof _option == 'object' && _option;
|
||||
|
||||
if (!data) {
|
||||
var config = $.extend({}, Selectpicker.DEFAULTS, $.fn.selectpicker.defaults || {}, $this.data(), options);
|
||||
$this.data('selectpicker', (data = new Selectpicker(this, config, event)));
|
||||
$this.data('selectpicker', (data = new Selectpicker(this, config, _event)));
|
||||
} else if (options) {
|
||||
for (var i in options) {
|
||||
if (options.hasOwnProperty(i)) {
|
||||
@@ -1168,11 +1348,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof option == 'string') {
|
||||
if (data[option] instanceof Function) {
|
||||
value = data[option].apply(data, args);
|
||||
if (typeof _option == 'string') {
|
||||
if (data[_option] instanceof Function) {
|
||||
value = data[_option].apply(data, args);
|
||||
} else {
|
||||
value = data.options[option];
|
||||
value = data.options[_option];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,24 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Нищо избрано',
|
||||
noneResultsText: 'Няма резултат за {0}',
|
||||
countSelectedText: function (numSelected, numTotal) {
|
||||
return (numSelected == 1) ? "{0} избран елемент" : "{0} избрани елемента";
|
||||
},
|
||||
maxOptionsText: function (numAll, numGroup) {
|
||||
return [
|
||||
(numAll == 1) ? 'Лимита е достигнат ({n} елемент максимум)' : 'Лимита е достигнат ({n} елемента максимум)',
|
||||
(numGroup == 1) ? 'Груповия лимит е достигнат ({n} елемент максимум)' : 'Груповия лимит е достигнат ({n} елемента максимум)'
|
||||
];
|
||||
},
|
||||
selectAllText: 'Избери всички',
|
||||
deselectAllText: 'Размаркирай всички',
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
})(jQuery);
|
||||
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Нищо избрано",noneResultsText:"Няма резултат за {0}",countSelectedText:function(a){return 1==a?"{0} избран елемент":"{0} избрани елемента"},maxOptionsText:function(a,b){return[1==a?"Лимита е достигнат ({n} елемент максимум)":"Лимита е достигнат ({n} елемента максимум)",1==b?"Груповия лимит е достигнат ({n} елемент максимум)":"Груповия лимит е достигнат ({n} елемента максимум)"]},selectAllText:"Избери всички",deselectAllText:"Размаркирай всички",multipleSeparator:", "}}(jQuery);
|
||||
@@ -1,15 +1,15 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Nic není vybráno',
|
||||
noneResultsText: 'Žádné výsledky',
|
||||
noneResultsText: 'Žádné výsledky {0}',
|
||||
countSelectedText: 'Označeno {0} z {1}',
|
||||
maxOptionsText: ['Limit překročen ({n} {var} max)', 'Limit skupiny překročen ({n} {var} max)', ['položek', 'položka']],
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nic není vybráno",noneResultsText:"Žádné výsledky",countSelectedText:"Označeno {0} z {1}",maxOptionsText:["Limit překročen ({n} {var} max)","Limit skupiny překročen ({n} {var} max)",["položek","položka"]],multipleSeparator:", "}}(jQuery);
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nic není vybráno",noneResultsText:"Žádné výsledky {0}",countSelectedText:"Označeno {0} z {1}",maxOptionsText:["Limit překročen ({n} {var} max)","Limit skupiny překročen ({n} {var} max)",["položek","položka"]],multipleSeparator:", "}}(jQuery);
|
||||
@@ -1,15 +1,15 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Bitte wählen...',
|
||||
noneResultsText: 'Keine Ergebnisse für',
|
||||
noneResultsText: 'Keine Ergebnisse für {0}',
|
||||
countSelectedText: '{0} von {1} ausgewählt',
|
||||
maxOptionsText: ['Limit erreicht ({n} {var} max.)', 'Gruppen-Limit erreicht ({n} {var} max.)', ['Eintrag', 'Einträge']],
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Bitte wählen...",noneResultsText:"Keine Ergebnisse für",countSelectedText:"{0} von {1} ausgewählt",maxOptionsText:["Limit erreicht ({n} {var} max.)","Gruppen-Limit erreicht ({n} {var} max.)",["Eintrag","Einträge"]],multipleSeparator:", "}}(jQuery);
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Bitte wählen...",noneResultsText:"Keine Ergebnisse für {0}",countSelectedText:"{0} von {1} ausgewählt",maxOptionsText:["Limit erreicht ({n} {var} max.)","Gruppen-Limit erreicht ({n} {var} max.)",["Eintrag","Einträge"]],multipleSeparator:", "}}(jQuery);
|
||||
@@ -1,26 +1,24 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Nothing selected',
|
||||
noneResultsText: 'No results match',
|
||||
noneResultsText: 'No results match {0}',
|
||||
countSelectedText: function (numSelected, numTotal) {
|
||||
return (numSelected == 1) ? "{0} item selected" : "{0} items selected";
|
||||
},
|
||||
maxOptionsText: function (numAll, numGroup) {
|
||||
var arr = [];
|
||||
|
||||
arr[0] = (numAll == 1) ? 'Limit reached ({n} item max)' : 'Limit reached ({n} items max)';
|
||||
arr[1] = (numGroup == 1) ? 'Group limit reached ({n} item max)' : 'Group limit reached ({n} items max)';
|
||||
|
||||
return arr;
|
||||
return [
|
||||
(numAll == 1) ? 'Limit reached ({n} item max)' : 'Limit reached ({n} items max)',
|
||||
(numGroup == 1) ? 'Group limit reached ({n} item max)' : 'Group limit reached ({n} items max)'
|
||||
];
|
||||
},
|
||||
selectAllText: 'Select All',
|
||||
deselectAllText: 'Deselect All',
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nothing selected",noneResultsText:"No results match",countSelectedText:function(a){return 1==a?"{0} item selected":"{0} items selected"},maxOptionsText:function(a,b){var c=[];return c[0]=1==a?"Limit reached ({n} item max)":"Limit reached ({n} items max)",c[1]=1==b?"Group limit reached ({n} item max)":"Group limit reached ({n} items max)",c},selectAllText:"Select All",deselectAllText:"Deselect All",multipleSeparator:", "}}(jQuery);
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nothing selected",noneResultsText:"No results match {0}",countSelectedText:function(a){return 1==a?"{0} item selected":"{0} items selected"},maxOptionsText:function(a,b){return[1==a?"Limit reached ({n} item max)":"Limit reached ({n} items max)",1==b?"Group limit reached ({n} item max)":"Group limit reached ({n} items max)"]},selectAllText:"Select All",deselectAllText:"Deselect All",multipleSeparator:", "}}(jQuery);
|
||||
@@ -1,15 +1,15 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'No hay selección',
|
||||
noneResultsText: 'No hay resultados',
|
||||
noneResultsText: 'No hay resultados {0}',
|
||||
countSelectedText: 'Seleccionados {0} de {1}',
|
||||
maxOptionsText: ['Límite alcanzado ({n} {var} max)', 'Límite del grupo alcanzado({n} {var} max)', ['elementos', 'element']],
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"No hay selección",noneResultsText:"No hay resultados",countSelectedText:"Seleccionados {0} de {1}",maxOptionsText:["Límite alcanzado ({n} {var} max)","Límite del grupo alcanzado({n} {var} max)",["elementos","element"]],multipleSeparator:", "}}(jQuery);
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"No hay selección",noneResultsText:"No hay resultados {0}",countSelectedText:"Seleccionados {0} de {1}",maxOptionsText:["Límite alcanzado ({n} {var} max)","Límite del grupo alcanzado({n} {var} max)",["elementos","element"]],multipleSeparator:", "}}(jQuery);
|
||||
@@ -1,15 +1,15 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Hautapenik ez',
|
||||
noneResultsText: 'Emaitzarik ez',
|
||||
noneResultsText: 'Emaitzarik ez {0}',
|
||||
countSelectedText: '{1}(e)tik {0} hautatuta',
|
||||
maxOptionsText: ['Mugara iritsita ({n} {var} gehienez)', 'Taldearen mugara iritsita ({n} {var} gehienez)', ['elementu', 'elementu']],
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Hautapenik ez",noneResultsText:"Emaitzarik ez",countSelectedText:"{1}(e)tik {0} hautatuta",maxOptionsText:["Mugara iritsita ({n} {var} gehienez)","Taldearen mugara iritsita ({n} {var} gehienez)",["elementu","elementu"]],multipleSeparator:", "}}(jQuery);
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Hautapenik ez",noneResultsText:"Emaitzarik ez {0}",countSelectedText:"{1}(e)tik {0} hautatuta",maxOptionsText:["Mugara iritsita ({n} {var} gehienez)","Taldearen mugara iritsita ({n} {var} gehienez)",["elementu","elementu"]],multipleSeparator:", "}}(jQuery);
|
||||
@@ -1,24 +1,22 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Aucune sélection',
|
||||
noneResultsText: 'Aucun résultat',
|
||||
noneResultsText: 'Aucun résultat pour {0}',
|
||||
countSelectedText: function (numSelected, numTotal) {
|
||||
return (numSelected > 1) ? "{0} éléments sélectionés" : "{0} élément sélectioné";
|
||||
return (numSelected > 1) ? "{0} éléments sélectionnés" : "{0} élément sélectionné";
|
||||
},
|
||||
maxOptionsText: function (numAll, numGroup) {
|
||||
var arr = [];
|
||||
|
||||
arr[0] = (numAll > 1) ? 'Limite atteinte ({n} éléments max)' : 'Limite atteinte ({n} élément max)';
|
||||
arr[1] = (numGroup > 1) ? 'Limite du groupe atteinte ({n} éléments max)' : 'Limite du groupe atteinte ({n} élément max)';
|
||||
|
||||
return arr;
|
||||
return [
|
||||
(numAll > 1) ? 'Limite atteinte ({n} éléments max)' : 'Limite atteinte ({n} élément max)',
|
||||
(numGroup > 1) ? 'Limite du groupe atteinte ({n} éléments max)' : 'Limite du groupe atteinte ({n} élément max)'
|
||||
];
|
||||
},
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Aucune sélection",noneResultsText:"Aucun résultat",countSelectedText:function(a){return a>1?"{0} éléments sélectionés":"{0} élément sélectioné"},maxOptionsText:function(a,b){var c=[];return c[0]=a>1?"Limite atteinte ({n} éléments max)":"Limite atteinte ({n} élément max)",c[1]=b>1?"Limite du groupe atteinte ({n} éléments max)":"Limite du groupe atteinte ({n} élément max)",c},multipleSeparator:", "}}(jQuery);
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Aucune sélection",noneResultsText:"Aucun résultat pour {0}",countSelectedText:function(a){return a>1?"{0} éléments sélectionnés":"{0} élément sélectionné"},maxOptionsText:function(a,b){return[a>1?"Limite atteinte ({n} éléments max)":"Limite atteinte ({n} élément max)",b>1?"Limite du groupe atteinte ({n} éléments max)":"Limite du groupe atteinte ({n} élément max)"]},multipleSeparator:", "}}(jQuery);
|
||||
@@ -0,0 +1,24 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Válasszon!',
|
||||
noneResultsText: 'Nincs találat {0}',
|
||||
countSelectedText: function (numSelected, numTotal) {
|
||||
return '{n} elem kiválasztva';
|
||||
},
|
||||
maxOptionsText: function (numAll, numGroup) {
|
||||
return [
|
||||
'Legfeljebb {n} elem választható',
|
||||
'A csoportban legfeljebb {n} elem választható'
|
||||
];
|
||||
},
|
||||
selectAllText: 'Mind',
|
||||
deselectAllText: 'Egyik sem',
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
})(jQuery);
|
||||
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Válasszon!",noneResultsText:"Nincs találat {0}",countSelectedText:function(){return"{n} elem kiválasztva"},maxOptionsText:function(){return["Legfeljebb {n} elem választható","A csoportban legfeljebb {n} elem választható"]},selectAllText:"Mind",deselectAllText:"Egyik sem",multipleSeparator:", "}}(jQuery);
|
||||
@@ -1,15 +1,15 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Nessuna selezione',
|
||||
noneResultsText: 'Nessun risultato',
|
||||
noneResultsText: 'Nessun risultato per {0}',
|
||||
countSelectedText: 'Selezionati {0} di {1}',
|
||||
maxOptionsText: ['Limite raggiunto ({n} {var} max)', 'Limite del gruppo raggiunto ({n} {var} max)', ['elementi', 'elemento']],
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nessuna selezione",noneResultsText:"Nessun risultato",countSelectedText:"Selezionati {0} di {1}",maxOptionsText:["Limite raggiunto ({n} {var} max)","Limite del gruppo raggiunto ({n} {var} max)",["elementi","elemento"]],multipleSeparator:", "}}(jQuery);
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nessuna selezione",noneResultsText:"Nessun risultato per {0}",countSelectedText:"Selezionati {0} di {1}",maxOptionsText:["Limite raggiunto ({n} {var} max)","Limite del gruppo raggiunto ({n} {var} max)",["elementi","elemento"]],multipleSeparator:", "}}(jQuery);
|
||||
@@ -1,15 +1,15 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Niets geselecteerd',
|
||||
noneResultsText: 'Geen resultaten gevonden voor',
|
||||
noneResultsText: 'Geen resultaten gevonden voor {0}',
|
||||
countSelectedText: '{0} van {1} geselecteerd',
|
||||
maxOptionsText: ['Limiet bereikt ({n} {var} max)', 'Groep limiet bereikt ({n} {var} max)', ['items', 'item']],
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Niets geselecteerd",noneResultsText:"Geen resultaten gevonden voor",countSelectedText:"{0} van {1} geselecteerd",maxOptionsText:["Limiet bereikt ({n} {var} max)","Groep limiet bereikt ({n} {var} max)",["items","item"]],multipleSeparator:", "}}(jQuery);
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Niets geselecteerd",noneResultsText:"Geen resultaten gevonden voor {0}",countSelectedText:"{0} van {1} geselecteerd",maxOptionsText:["Limiet bereikt ({n} {var} max)","Groep limiet bereikt ({n} {var} max)",["items","item"]],multipleSeparator:", "}}(jQuery);
|
||||
@@ -1,17 +1,17 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Nic nie zaznaczono',
|
||||
noneResultsText: 'Brak wyników wyszukiwania',
|
||||
noneResultsText: 'Brak wyników wyszukiwania {0}',
|
||||
countSelectedText: 'Zaznaczono {0} z {1}',
|
||||
maxOptionsText: ['Osiągnięto limit ({n} {var} max)', 'Limit grupy osiągnięty ({n} {var} max)', ['elementy', 'element']],
|
||||
selectAll: 'Zaznacz wszystkie',
|
||||
deselectAll: 'Odznacz wszystkie',
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nic nie zaznaczono",noneResultsText:"Brak wyników wyszukiwania",countSelectedText:"Zaznaczono {0} z {1}",maxOptionsText:["Osiągnięto limit ({n} {var} max)","Limit grupy osiągnięty ({n} {var} max)",["elementy","element"]],selectAll:"Zaznacz wszystkie",deselectAll:"Odznacz wszystkie",multipleSeparator:", "}}(jQuery);
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nic nie zaznaczono",noneResultsText:"Brak wyników wyszukiwania {0}",countSelectedText:"Zaznaczono {0} z {1}",maxOptionsText:["Osiągnięto limit ({n} {var} max)","Limit grupy osiągnięty ({n} {var} max)",["elementy","element"]],selectAll:"Zaznacz wszystkie",deselectAll:"Odznacz wszystkie",multipleSeparator:", "}}(jQuery);
|
||||
@@ -1,15 +1,15 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Nada selecionado',
|
||||
noneResultsText: 'Nada encontrado contendo',
|
||||
noneResultsText: 'Nada encontrado contendo {0}',
|
||||
countSelectedText: 'Selecionado {0} de {1}',
|
||||
maxOptionsText: ['Limite excedido (máx. {n} {var})', 'Limite do grupo excedido (máx. {n} {var})', ['itens', 'item']],
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nada selecionado",noneResultsText:"Nada encontrado contendo",countSelectedText:"Selecionado {0} de {1}",maxOptionsText:["Limite excedido (máx. {n} {var})","Limite do grupo excedido (máx. {n} {var})",["itens","item"]],multipleSeparator:", "}}(jQuery);
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nada selecionado",noneResultsText:"Nada encontrado contendo {0}",countSelectedText:"Selecionado {0} de {1}",maxOptionsText:["Limite excedido (máx. {n} {var})","Limite do grupo excedido (máx. {n} {var})",["itens","item"]],multipleSeparator:", "}}(jQuery);
|
||||
@@ -1,15 +1,15 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Nu a fost selectat nimic',
|
||||
noneResultsText: 'Nu exista niciun rezultat',
|
||||
noneResultsText: 'Nu exista niciun rezultat {0}',
|
||||
countSelectedText: '{0} din {1} selectat(e)',
|
||||
maxOptionsText: ['Limita a fost atinsa ({n} {var} max)', 'Limita de grup a fost atinsa ({n} {var} max)', ['iteme', 'item']],
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nu a fost selectat nimic",noneResultsText:"Nu exista niciun rezultat",countSelectedText:"{0} din {1} selectat(e)",maxOptionsText:["Limita a fost atinsa ({n} {var} max)","Limita de grup a fost atinsa ({n} {var} max)",["iteme","item"]],multipleSeparator:", "}}(jQuery);
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nu a fost selectat nimic",noneResultsText:"Nu exista niciun rezultat {0}",countSelectedText:"{0} din {1} selectat(e)",maxOptionsText:["Limita a fost atinsa ({n} {var} max)","Limita de grup a fost atinsa ({n} {var} max)",["iteme","item"]],multipleSeparator:", "}}(jQuery);
|
||||
@@ -1,15 +1,16 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Ничего не выбрано',
|
||||
noneResultsText: 'Совпадений не найдено',
|
||||
noneResultsText: 'Совпадений не найдено {0}',
|
||||
countSelectedText: 'Выбрано {0} из {1}',
|
||||
maxOptionsText: ['Достигнут предел ({n} {var} максимум)', 'Достигнут предел в группе ({n} {var} максимум)', ['items', 'item']],
|
||||
doneButtonText: 'Закрыть',
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Ничего не выбрано",noneResultsText:"Совпадений не найдено",countSelectedText:"Выбрано {0} из {1}",maxOptionsText:["Достигнут предел ({n} {var} максимум)","Достигнут предел в группе ({n} {var} максимум)",["items","item"]],multipleSeparator:", "}}(jQuery);
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Ничего не выбрано",noneResultsText:"Совпадений не найдено {0}",countSelectedText:"Выбрано {0} из {1}",maxOptionsText:["Достигнут предел ({n} {var} максимум)","Достигнут предел в группе ({n} {var} максимум)",["items","item"]],doneButtonText:"Закрыть",multipleSeparator:", "}}(jQuery);
|
||||
@@ -0,0 +1,24 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Nič izbranega',
|
||||
noneResultsText: 'Ni zadetkov za {0}',
|
||||
countSelectedText: function (numSelected, numTotal) {
|
||||
"Število izbranih: {0}";
|
||||
},
|
||||
maxOptionsText: function (numAll, numGroup) {
|
||||
return [
|
||||
'Omejitev dosežena (max. izbranih: {n})',
|
||||
'Omejitev skupine dosežena (max. izbranih: {n})'
|
||||
];
|
||||
},
|
||||
selectAllText: 'Izberi vse',
|
||||
deselectAllText: 'Počisti izbor',
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
})(jQuery);
|
||||
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Nič izbranega",noneResultsText:"Ni zadetkov za {0}",countSelectedText:function(){"Število izbranih: {0}"},maxOptionsText:function(){return["Omejitev dosežena (max. izbranih: {n})","Omejitev skupine dosežena (max. izbranih: {n})"]},selectAllText:"Izberi vse",deselectAllText:"Počisti izbor",multipleSeparator:", "}}(jQuery);
|
||||
@@ -0,0 +1,24 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Inget valt',
|
||||
noneResultsText: 'Inget sökresultat matchar {0}',
|
||||
countSelectedText: function (numSelected, numTotal) {
|
||||
return (numSelected === 1) ? "{0} alternativ valt" : "{0} alternativ valda";
|
||||
},
|
||||
maxOptionsText: function (numAll, numGroup) {
|
||||
return [
|
||||
'Gräns uppnåd (max {n} alternativ)',
|
||||
'Gräns uppnåd (max {n} gruppalternativ)'
|
||||
];
|
||||
},
|
||||
selectAllText: 'Markera alla',
|
||||
deselectAllText: 'Avmarkera alla',
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
})(jQuery);
|
||||
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Inget valt",noneResultsText:"Inget sökresultat matchar {0}",countSelectedText:function(a){return 1===a?"{0} alternativ valt":"{0} alternativ valda"},maxOptionsText:function(){return["Gräns uppnåd (max {n} alternativ)","Gräns uppnåd (max {n} gruppalternativ)"]},selectAllText:"Markera alla",deselectAllText:"Avmarkera alla",multipleSeparator:", "}}(jQuery);
|
||||
@@ -0,0 +1,24 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Hiçbiri seçilmedi',
|
||||
noneResultsText: 'Hiçbir sonuç bulunamadı {0}',
|
||||
countSelectedText: function (numSelected, numTotal) {
|
||||
return (numSelected == 1) ? "{0} öğe seçildi" : "{0} öğe seçildi";
|
||||
},
|
||||
maxOptionsText: function (numAll, numGroup) {
|
||||
return [
|
||||
(numAll == 1) ? 'Limit aşıldı (maksimum {n} sayıda öğe )' : 'Limit aşıldı (maksimum {n} sayıda öğe)',
|
||||
(numGroup == 1) ? 'Grup limiti aşıldı (maksimum {n} sayıda öğe)' : 'Grup limiti aşıldı (maksimum {n} sayıda öğe)'
|
||||
];
|
||||
},
|
||||
selectAllText: 'Tümünü Seç',
|
||||
deselectAllText: 'Seçiniz',
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
})(jQuery);
|
||||
@@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Hiçbiri seçilmedi",noneResultsText:"Hiçbir sonuç bulunamadı {0}",countSelectedText:function(a){return"{0} öğe seçildi"},maxOptionsText:function(a,b){return[1==a?"Limit aşıldı (maksimum {n} sayıda öğe )":"Limit aşıldı (maksimum {n} sayıda öğe)","Grup limiti aşıldı (maksimum {n} sayıda öğe)"]},selectAllText:"Tümünü Seç",deselectAllText:"Seçiniz",multipleSeparator:", "}}(jQuery);
|
||||
@@ -1,15 +1,15 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Нічого не вибрано',
|
||||
noneResultsText: 'Збігів не знайдено',
|
||||
noneResultsText: 'Збігів не знайдено {0}',
|
||||
countSelectedText: 'Вибрано {0} із {1}',
|
||||
maxOptionsText: ['Досягнута межа ({n} {var} максимум)', 'Досягнута межа в групі ({n} {var} максимум)', ['items', 'item']],
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Нічого не вибрано",noneResultsText:"Збігів не знайдено",countSelectedText:"Вибрано {0} із {1}",maxOptionsText:["Досягнута межа ({n} {var} максимум)","Досягнута межа в групі ({n} {var} максимум)",["items","item"]],multipleSeparator:", "}}(jQuery);
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"Нічого не вибрано",noneResultsText:"Збігів не знайдено {0}",countSelectedText:"Вибрано {0} із {1}",maxOptionsText:["Досягнута межа ({n} {var} максимум)","Досягнута межа в групі ({n} {var} максимум)",["items","item"]],multipleSeparator:", "}}(jQuery);
|
||||
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
(function ($) {
|
||||
@@ -12,4 +12,4 @@
|
||||
maxOptionsText: ['超出限制 (最多选择{n}项)', '组选择超出限制(最多选择{n}组)'],
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"没有选中任何项",noneResultsText:"没有找到匹配项",countSelectedText:"选中{1}中的{0}项",maxOptionsText:["超出限制 (最多选择{n}项)","组选择超出限制(最多选择{n}组)"],multipleSeparator:", "}}(jQuery);
|
||||
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
(function ($) {
|
||||
@@ -14,4 +14,4 @@
|
||||
deselectAllText: '全部取消',
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
/*!
|
||||
* Bootstrap-select v1.6.3 (http://silviomoreto.github.io/bootstrap-select/)
|
||||
* Bootstrap-select v1.6.5 (http://silviomoreto.github.io/bootstrap-select)
|
||||
*
|
||||
* Copyright 2013-2014 bootstrap-select
|
||||
* Copyright 2013-2015 bootstrap-select
|
||||
* Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
|
||||
*/
|
||||
!function(a){a.fn.selectpicker.defaults={noneSelectedText:"沒有選取任何項目",noneResultsText:"沒有找到符合的結果",countSelectedText:"已經選取{0}個項目",maxOptionsText:["超過限制 (最多選擇{n}項)","超過限制(最多選擇{n}組)"],selectAllText:"選取全部",deselectAllText:"全部取消",multipleSeparator:", "}}(jQuery);
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"curly": true,
|
||||
"eqeqeq": true,
|
||||
"immed": true,
|
||||
"latedef": true,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"sub": true,
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"boss": true,
|
||||
"eqnull": true,
|
||||
"browser": true,
|
||||
"jquery": true
|
||||
}
|
||||
+357
-177
@@ -1,27 +1,143 @@
|
||||
(function ($) {
|
||||
'use strict';
|
||||
|
||||
// Case insensitive search
|
||||
$.expr[':'].icontains = function (obj, index, meta) {
|
||||
return icontains($(obj).text(), meta[3]);
|
||||
};
|
||||
|
||||
// Case and accent insensitive search
|
||||
$.expr[':'].aicontains = function (obj, index, meta) {
|
||||
return icontains($(obj).data('normalizedText') || $(obj).text(), meta[3]);
|
||||
};
|
||||
|
||||
/**
|
||||
* Actual implementation of the case insensitive search.
|
||||
* @access private
|
||||
* @param {String} haystack
|
||||
* @param {String} needle
|
||||
* @returns {boolean}
|
||||
*/
|
||||
function icontains(haystack, needle) {
|
||||
return haystack.toUpperCase().indexOf(needle.toUpperCase()) > -1;
|
||||
//<editor-fold desc="Shims">
|
||||
if (!String.prototype.includes) {
|
||||
(function () {
|
||||
'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
|
||||
var toString = {}.toString;
|
||||
var defineProperty = (function () {
|
||||
// IE 8 only supports `Object.defineProperty` on DOM elements
|
||||
try {
|
||||
var object = {};
|
||||
var $defineProperty = Object.defineProperty;
|
||||
var result = $defineProperty(object, object, object) && $defineProperty;
|
||||
} catch (error) {
|
||||
}
|
||||
return result;
|
||||
}());
|
||||
var indexOf = ''.indexOf;
|
||||
var includes = function (search) {
|
||||
if (this == null) {
|
||||
throw TypeError();
|
||||
}
|
||||
var string = String(this);
|
||||
if (search && toString.call(search) == '[object RegExp]') {
|
||||
throw TypeError();
|
||||
}
|
||||
var stringLength = string.length;
|
||||
var searchString = String(search);
|
||||
var searchLength = searchString.length;
|
||||
var position = arguments.length > 1 ? arguments[1] : undefined;
|
||||
// `ToInteger`
|
||||
var pos = position ? Number(position) : 0;
|
||||
if (pos != pos) { // better `isNaN`
|
||||
pos = 0;
|
||||
}
|
||||
var start = Math.min(Math.max(pos, 0), stringLength);
|
||||
// Avoid the `indexOf` call if no match is possible
|
||||
if (searchLength + start > stringLength) {
|
||||
return false;
|
||||
}
|
||||
return indexOf.call(string, searchString, pos) != -1;
|
||||
};
|
||||
if (defineProperty) {
|
||||
defineProperty(String.prototype, 'includes', {
|
||||
'value': includes,
|
||||
'configurable': true,
|
||||
'writable': true
|
||||
});
|
||||
} else {
|
||||
String.prototype.includes = includes;
|
||||
}
|
||||
}());
|
||||
}
|
||||
|
||||
if (!String.prototype.startsWith) {
|
||||
(function () {
|
||||
'use strict'; // needed to support `apply`/`call` with `undefined`/`null`
|
||||
var defineProperty = (function () {
|
||||
// IE 8 only supports `Object.defineProperty` on DOM elements
|
||||
try {
|
||||
var object = {};
|
||||
var $defineProperty = Object.defineProperty;
|
||||
var result = $defineProperty(object, object, object) && $defineProperty;
|
||||
} catch (error) {
|
||||
}
|
||||
return result;
|
||||
}());
|
||||
var toString = {}.toString;
|
||||
var startsWith = function (search) {
|
||||
if (this == null) {
|
||||
throw TypeError();
|
||||
}
|
||||
var string = String(this);
|
||||
if (search && toString.call(search) == '[object RegExp]') {
|
||||
throw TypeError();
|
||||
}
|
||||
var stringLength = string.length;
|
||||
var searchString = String(search);
|
||||
var searchLength = searchString.length;
|
||||
var position = arguments.length > 1 ? arguments[1] : undefined;
|
||||
// `ToInteger`
|
||||
var pos = position ? Number(position) : 0;
|
||||
if (pos != pos) { // better `isNaN`
|
||||
pos = 0;
|
||||
}
|
||||
var start = Math.min(Math.max(pos, 0), stringLength);
|
||||
// Avoid the `indexOf` call if no match is possible
|
||||
if (searchLength + start > stringLength) {
|
||||
return false;
|
||||
}
|
||||
var index = -1;
|
||||
while (++index < searchLength) {
|
||||
if (string.charCodeAt(start + index) != searchString.charCodeAt(index)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
if (defineProperty) {
|
||||
defineProperty(String.prototype, 'startsWith', {
|
||||
'value': startsWith,
|
||||
'configurable': true,
|
||||
'writable': true
|
||||
});
|
||||
} else {
|
||||
String.prototype.startsWith = startsWith;
|
||||
}
|
||||
}());
|
||||
}
|
||||
//</editor-fold>
|
||||
|
||||
// Case insensitive contains search
|
||||
$.expr[':'].icontains = function (obj, index, meta) {
|
||||
var $obj = $(obj);
|
||||
var haystack = ($obj.data('tokens') || $obj.text()).toUpperCase();
|
||||
return haystack.includes(meta[3].toUpperCase());
|
||||
};
|
||||
|
||||
// Case insensitive begins search
|
||||
$.expr[':'].ibegins = function (obj, index, meta) {
|
||||
var $obj = $(obj);
|
||||
var haystack = ($obj.data('tokens') || $obj.text()).toUpperCase();
|
||||
return haystack.startsWith(meta[3].toUpperCase());
|
||||
};
|
||||
|
||||
// Case and accent insensitive contains search
|
||||
$.expr[':'].aicontains = function (obj, index, meta) {
|
||||
var $obj = $(obj);
|
||||
var haystack = ($obj.data('tokens') || $obj.data('normalizedText') || $obj.text()).toUpperCase();
|
||||
return haystack.includes(haystack, meta[3]);
|
||||
};
|
||||
|
||||
// Case and accent insensitive begins search
|
||||
$.expr[':'].aibegins = function (obj, index, meta) {
|
||||
var $obj = $(obj);
|
||||
var haystack = ($obj.data('tokens') || $obj.data('normalizedText') || $obj.text()).toUpperCase();
|
||||
return haystack.startsWith(meta[3].toUpperCase());
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove all diatrics from the given text.
|
||||
* @access private
|
||||
@@ -103,25 +219,25 @@
|
||||
this.init();
|
||||
};
|
||||
|
||||
Selectpicker.VERSION = '1.6.3';
|
||||
Selectpicker.VERSION = '1.6.5';
|
||||
|
||||
// part of this is duplicated in i18n/defaults-en_US.js. Make sure to update both.
|
||||
Selectpicker.DEFAULTS = {
|
||||
noneSelectedText: 'Nothing selected',
|
||||
noneResultsText: 'No results match',
|
||||
noneResultsText: 'No results matched {0}',
|
||||
countSelectedText: function (numSelected, numTotal) {
|
||||
return (numSelected == 1) ? "{0} item selected" : "{0} items selected";
|
||||
},
|
||||
maxOptionsText: function (numAll, numGroup) {
|
||||
var arr = [];
|
||||
|
||||
arr[0] = (numAll == 1) ? 'Limit reached ({n} item max)' : 'Limit reached ({n} items max)';
|
||||
arr[1] = (numGroup == 1) ? 'Group limit reached ({n} item max)' : 'Group limit reached ({n} items max)';
|
||||
|
||||
return arr;
|
||||
return [
|
||||
(numAll == 1) ? 'Limit reached ({n} item max)' : 'Limit reached ({n} items max)',
|
||||
(numGroup == 1) ? 'Group limit reached ({n} item max)' : 'Group limit reached ({n} items max)'
|
||||
];
|
||||
},
|
||||
selectAllText: 'Select All',
|
||||
deselectAllText: 'Deselect All',
|
||||
doneButton: false,
|
||||
doneButtonText: 'Close',
|
||||
multipleSeparator: ', ',
|
||||
style: 'btn-default',
|
||||
size: 'auto',
|
||||
@@ -136,14 +252,16 @@
|
||||
dropupAuto: true,
|
||||
header: false,
|
||||
liveSearch: false,
|
||||
liveSearchPlaceholder: null,
|
||||
liveSearchNormalize: false,
|
||||
liveSearchStyle: 'contains',
|
||||
actionsBox: false,
|
||||
iconBase: 'glyphicon',
|
||||
tickIcon: 'glyphicon-ok',
|
||||
maxOptions: false,
|
||||
mobile: false,
|
||||
selectOnTab: false,
|
||||
dropdownAlignRight: false,
|
||||
searchAccentInsensitive: false
|
||||
dropdownAlignRight: false
|
||||
};
|
||||
|
||||
Selectpicker.prototype = {
|
||||
@@ -159,9 +277,9 @@
|
||||
this.autofocus = this.$element.prop('autofocus');
|
||||
this.$newElement = this.createView();
|
||||
this.$element.after(this.$newElement);
|
||||
this.$menu = this.$newElement.find('> .dropdown-menu');
|
||||
this.$button = this.$newElement.find('> button');
|
||||
this.$searchbox = this.$newElement.find('input');
|
||||
this.$button = this.$newElement.children('button');
|
||||
this.$menu = this.$newElement.children('.dropdown-menu');
|
||||
this.$searchbox = this.$menu.find('input');
|
||||
|
||||
if (this.options.dropdownAlignRight)
|
||||
this.$menu.addClass('dropdown-menu-right');
|
||||
@@ -192,24 +310,39 @@
|
||||
// If we are multiple, then add the show-tick class by default
|
||||
var multiple = this.multiple ? ' show-tick' : '',
|
||||
inputGroup = this.$element.parent().hasClass('input-group') ? ' input-group-btn' : '',
|
||||
autofocus = this.autofocus ? ' autofocus' : '',
|
||||
btnSize = this.$element.parents().hasClass('form-group-lg') ? ' btn-lg' : (this.$element.parents().hasClass('form-group-sm') ? ' btn-sm' : '');
|
||||
autofocus = this.autofocus ? ' autofocus' : '';
|
||||
// Elements
|
||||
var header = this.options.header ? '<div class="popover-title"><button type="button" class="close" aria-hidden="true">×</button>' + this.options.header + '</div>' : '';
|
||||
var searchbox = this.options.liveSearch ? '<div class="bs-searchbox"><input type="text" class="input-block-level form-control" autocomplete="off" /></div>' : '';
|
||||
var actionsbox = this.options.actionsBox ? '<div class="bs-actionsbox">' +
|
||||
'<div class="btn-group btn-block">' +
|
||||
'<button class="actions-btn bs-select-all btn btn-sm btn-default">' +
|
||||
var searchbox = this.options.liveSearch ?
|
||||
'<div class="bs-searchbox">' +
|
||||
'<input type="text" class="form-control" autocomplete="off"' +
|
||||
(null === this.options.liveSearchPlaceholder ? '' : ' placeholder="' + htmlEscape(this.options.liveSearchPlaceholder) + '"') + '>' +
|
||||
'</div>'
|
||||
: '';
|
||||
var actionsbox = this.multiple && this.options.actionsBox ?
|
||||
'<div class="bs-actionsbox">' +
|
||||
'<div class="btn-group btn-group-sm btn-block">' +
|
||||
'<button class="actions-btn bs-select-all btn btn-default">' +
|
||||
this.options.selectAllText +
|
||||
'</button>' +
|
||||
'<button class="actions-btn bs-deselect-all btn btn-sm btn-default">' +
|
||||
'<button class="actions-btn bs-deselect-all btn btn-default">' +
|
||||
this.options.deselectAllText +
|
||||
'</button>' +
|
||||
'</div>' +
|
||||
'</div>' : '';
|
||||
'</div>'
|
||||
: '';
|
||||
var donebutton = this.multiple && this.options.doneButton ?
|
||||
'<div class="bs-donebutton">' +
|
||||
'<div class="btn-group btn-block">' +
|
||||
'<button class="btn btn-sm btn-default">' +
|
||||
this.options.doneButtonText +
|
||||
'</button>' +
|
||||
'</div>' +
|
||||
'</div>'
|
||||
: '';
|
||||
var drop =
|
||||
'<div class="btn-group bootstrap-select' + multiple + inputGroup + '">' +
|
||||
'<button type="button" class="btn dropdown-toggle selectpicker' + btnSize + '" data-toggle="dropdown"' + autofocus + '>' +
|
||||
'<button type="button" class="btn dropdown-toggle" data-toggle="dropdown"' + autofocus + '>' +
|
||||
'<span class="filter-option pull-left"></span> ' +
|
||||
'<span class="caret"></span>' +
|
||||
'</button>' +
|
||||
@@ -217,8 +350,9 @@
|
||||
header +
|
||||
searchbox +
|
||||
actionsbox +
|
||||
'<ul class="dropdown-menu inner selectpicker" role="menu">' +
|
||||
'<ul class="dropdown-menu inner" role="menu">' +
|
||||
'</ul>' +
|
||||
donebutton +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
|
||||
@@ -254,45 +388,46 @@
|
||||
* @param content
|
||||
* @param [index]
|
||||
* @param [classes]
|
||||
* @param [optgroup]
|
||||
* @returns {string}
|
||||
*/
|
||||
var generateLI = function (content, index, classes) {
|
||||
var generateLI = function (content, index, classes, optgroup) {
|
||||
return '<li' +
|
||||
(typeof classes !== 'undefined' ? ' class="' + classes + '"' : '') +
|
||||
(typeof index !== 'undefined' | null === index ? ' data-original-index="' + index + '"' : '') +
|
||||
'>' + content + '</li>';
|
||||
((typeof classes !== 'undefined' & '' !== classes) ? ' class="' + classes + '"' : '') +
|
||||
((typeof index !== 'undefined' & null !== index) ? ' data-original-index="' + index + '"' : '') +
|
||||
((typeof optgroup !== 'undefined' & null !== optgroup) ? 'data-optgroup="' + optgroup + '"' : '') +
|
||||
'>' + content + '</li>';
|
||||
};
|
||||
|
||||
/**
|
||||
* @param text
|
||||
* @param [classes]
|
||||
* @param [inline]
|
||||
* @param [optgroup]
|
||||
* @param [tokens]
|
||||
* @returns {string}
|
||||
*/
|
||||
var generateA = function (text, classes, inline, optgroup) {
|
||||
var normText = normalizeToBase(htmlEscape(text));
|
||||
var generateA = function (text, classes, inline, tokens) {
|
||||
return '<a tabindex="0"' +
|
||||
(typeof classes !== 'undefined' ? ' class="' + classes + '"' : '') +
|
||||
(typeof inline !== 'undefined' ? ' style="' + inline + '"' : '') +
|
||||
(typeof optgroup !== 'undefined' ? 'data-optgroup="' + optgroup + '"' : '') +
|
||||
' data-normalized-text="' + normText + '"' +
|
||||
'>' + text +
|
||||
'<span class="' + that.options.iconBase + ' ' + that.options.tickIcon + ' check-mark"></span>' +
|
||||
'</a>';
|
||||
(typeof classes !== 'undefined' ? ' class="' + classes + '"' : '') +
|
||||
(typeof inline !== 'undefined' ? ' style="' + inline + '"' : '') +
|
||||
' data-normalized-text="' + normalizeToBase(htmlEscape(text)) + '"' +
|
||||
(typeof tokens !== 'undefined' || tokens !== null ? ' data-tokens="' + tokens + '"' : '') +
|
||||
'>' + text +
|
||||
'<span class="' + that.options.iconBase + ' ' + that.options.tickIcon + ' check-mark"></span>' +
|
||||
'</a>';
|
||||
};
|
||||
|
||||
this.$element.find('option').each(function () {
|
||||
this.$element.find('option').each(function (index) {
|
||||
var $this = $(this);
|
||||
|
||||
// Get the class and text for the option
|
||||
var optionClass = $this.attr('class') || '',
|
||||
inline = $this.attr('style'),
|
||||
text = $this.data('content') ? $this.data('content') : $this.html(),
|
||||
subtext = typeof $this.data('subtext') !== 'undefined' ? '<small class="muted text-muted">' + $this.data('subtext') + '</small>' : '',
|
||||
tokens = $this.data('tokens') ? $this.data('tokens') : null,
|
||||
subtext = typeof $this.data('subtext') !== 'undefined' ? '<small class="text-muted">' + $this.data('subtext') + '</small>' : '',
|
||||
icon = typeof $this.data('icon') !== 'undefined' ? '<span class="' + that.options.iconBase + ' ' + $this.data('icon') + '"></span> ' : '',
|
||||
isDisabled = $this.is(':disabled') || $this.parent().is(':disabled'),
|
||||
index = $this[0].index;
|
||||
isDisabled = $this.is(':disabled') || $this.parent().is(':disabled');
|
||||
if (icon !== '' && isDisabled) {
|
||||
icon = '<span>' + icon + '</span>';
|
||||
}
|
||||
@@ -312,24 +447,25 @@
|
||||
|
||||
// Get the opt group label
|
||||
var label = $this.parent().attr('label');
|
||||
var labelSubtext = typeof $this.parent().data('subtext') !== 'undefined' ? '<small class="muted text-muted">' + $this.parent().data('subtext') + '</small>' : '';
|
||||
var labelSubtext = typeof $this.parent().data('subtext') !== 'undefined' ? '<small class="text-muted">' + $this.parent().data('subtext') + '</small>' : '';
|
||||
var labelIcon = $this.parent().data('icon') ? '<span class="' + that.options.iconBase + ' ' + $this.parent().data('icon') + '"></span> ' : '';
|
||||
label = labelIcon + '<span class="text">' + label + labelSubtext + '</span>';
|
||||
|
||||
if (index !== 0 && _li.length > 0) { // Is it NOT the first option of the select && are there elements in the dropdown?
|
||||
_li.push(generateLI('', null, 'divider'));
|
||||
_li.push(generateLI('', null, 'divider', optID + 'div'));
|
||||
}
|
||||
|
||||
_li.push(generateLI(label, null, 'dropdown-header'));
|
||||
_li.push(generateLI(label, null, 'dropdown-header', optID));
|
||||
}
|
||||
|
||||
_li.push(generateLI(generateA(text, 'opt ' + optionClass, inline, optID), index));
|
||||
_li.push(generateLI(generateA(text, 'opt ' + optionClass, inline, tokens), index, '', optID));
|
||||
} else if ($this.data('divider') === true) {
|
||||
_li.push(generateLI('', index, 'divider'));
|
||||
} else if ($this.data('hidden') === true) {
|
||||
_li.push(generateLI(generateA(text, optionClass, inline), index, 'hide is-hidden'));
|
||||
_li.push(generateLI(generateA(text, optionClass, inline, tokens), index, 'hidden is-hidden'));
|
||||
} else {
|
||||
_li.push(generateLI(generateA(text, optionClass, inline), index));
|
||||
if ($this.prev().is('optgroup')) _li.push(generateLI('', null, 'divider', optID + 'div'));
|
||||
_li.push(generateLI(generateA(text, optionClass, inline, tokens), index));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -361,20 +497,20 @@
|
||||
}
|
||||
|
||||
this.tabIndex();
|
||||
var notDisabled = this.options.hideDisabled ? ':not([disabled])' : '';
|
||||
var notDisabled = this.options.hideDisabled ? ':enabled' : '';
|
||||
var selectedItems = this.$element.find('option:selected' + notDisabled).map(function () {
|
||||
var $this = $(this);
|
||||
var icon = $this.data('icon') && that.options.showIcon ? '<i class="' + that.options.iconBase + ' ' + $this.data('icon') + '"></i> ' : '';
|
||||
var subtext;
|
||||
if (that.options.showSubtext && $this.attr('data-subtext') && !that.multiple) {
|
||||
subtext = ' <small class="muted text-muted">' + $this.data('subtext') + '</small>';
|
||||
if (that.options.showSubtext && $this.data('subtext') && !that.multiple) {
|
||||
subtext = ' <small class="text-muted">' + $this.data('subtext') + '</small>';
|
||||
} else {
|
||||
subtext = '';
|
||||
}
|
||||
if ($this.data('content') && that.options.showContent) {
|
||||
return $this.data('content');
|
||||
} else if (typeof $this.attr('title') !== 'undefined') {
|
||||
if (typeof $this.attr('title') !== 'undefined') {
|
||||
return $this.attr('title');
|
||||
} else if ($this.data('content') && that.options.showContent) {
|
||||
return $this.data('content');
|
||||
} else {
|
||||
return icon + $this.html() + subtext;
|
||||
}
|
||||
@@ -395,7 +531,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
this.options.title = this.$element.attr('title');
|
||||
if (this.options.title == undefined) {
|
||||
this.options.title = this.$element.attr('title');
|
||||
}
|
||||
|
||||
if (this.options.selectedTextFormat == 'static') {
|
||||
title = this.options.title;
|
||||
@@ -406,8 +544,9 @@
|
||||
title = typeof this.options.title !== 'undefined' ? this.options.title : this.options.noneSelectedText;
|
||||
}
|
||||
|
||||
this.$button.attr('title', htmlEscape(title));
|
||||
this.$newElement.find('.filter-option').html(title);
|
||||
//strip all html-tags and trim the result
|
||||
this.$button.attr('title', $.trim(title.replace(/<[^>]*>?/g, '')));
|
||||
this.$button.children('.filter-option').html(title);
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -434,12 +573,13 @@
|
||||
liHeight: function () {
|
||||
if (this.options.size === false) return;
|
||||
|
||||
var $selectClone = this.$menu.parent().clone().find('> .dropdown-toggle').prop('autofocus', false).end().appendTo('body'),
|
||||
$menuClone = $selectClone.addClass('open').find('> .dropdown-menu'),
|
||||
liHeight = $menuClone.find('li').not('.divider').not('.dropdown-header').filter(':visible').children('a').outerHeight(),
|
||||
var $selectClone = this.$menu.parent().clone().children('.dropdown-toggle').prop('autofocus', false).end().appendTo('body'),
|
||||
$menuClone = $selectClone.addClass('open').children('.dropdown-menu'),
|
||||
liHeight = $menuClone.find('li').not('.divider, .dropdown-header').filter(':visible').children('a').outerHeight(),
|
||||
headerHeight = this.options.header ? $menuClone.find('.popover-title').outerHeight() : 0,
|
||||
searchHeight = this.options.liveSearch ? $menuClone.find('.bs-searchbox').outerHeight() : 0,
|
||||
actionsHeight = this.options.actionsBox ? $menuClone.find('.bs-actionsbox').outerHeight() : 0;
|
||||
actionsHeight = this.options.actionsBox ? $menuClone.find('.bs-actionsbox').outerHeight() : 0,
|
||||
doneButtonHeight = this.multiple ? $menuClone.find('.bs-donebutton').outerHeight() : 0;
|
||||
|
||||
$selectClone.remove();
|
||||
|
||||
@@ -447,27 +587,29 @@
|
||||
.data('liHeight', liHeight)
|
||||
.data('headerHeight', headerHeight)
|
||||
.data('searchHeight', searchHeight)
|
||||
.data('actionsHeight', actionsHeight);
|
||||
.data('actionsHeight', actionsHeight)
|
||||
.data('doneButtonHeight', doneButtonHeight);
|
||||
},
|
||||
|
||||
setSize: function () {
|
||||
this.findLis();
|
||||
var that = this,
|
||||
menu = this.$menu,
|
||||
menuInner = menu.find('.inner'),
|
||||
$menu = this.$menu,
|
||||
$menuInner = $menu.children('.inner'),
|
||||
selectHeight = this.$newElement.outerHeight(),
|
||||
liHeight = this.$newElement.data('liHeight'),
|
||||
headerHeight = this.$newElement.data('headerHeight'),
|
||||
searchHeight = this.$newElement.data('searchHeight'),
|
||||
actionsHeight = this.$newElement.data('actionsHeight'),
|
||||
doneButtonHeight = this.$newElement.data('doneButtonHeight'),
|
||||
divHeight = this.$lis.filter('.divider').outerHeight(true),
|
||||
menuPadding = parseInt(menu.css('padding-top')) +
|
||||
parseInt(menu.css('padding-bottom')) +
|
||||
parseInt(menu.css('border-top-width')) +
|
||||
parseInt(menu.css('border-bottom-width')),
|
||||
notDisabled = this.options.hideDisabled ? ', .disabled' : '',
|
||||
menuPadding = parseInt($menu.css('padding-top')) +
|
||||
parseInt($menu.css('padding-bottom')) +
|
||||
parseInt($menu.css('border-top-width')) +
|
||||
parseInt($menu.css('border-bottom-width')),
|
||||
notDisabled = this.options.hideDisabled ? '.disabled' : '',
|
||||
$window = $(window),
|
||||
menuExtras = menuPadding + parseInt(menu.css('margin-top')) + parseInt(menu.css('margin-bottom')) + 2,
|
||||
menuExtras = menuPadding + parseInt($menu.css('margin-top')) + parseInt($menu.css('margin-bottom')) + 2,
|
||||
menuHeight,
|
||||
selectOffsetTop,
|
||||
selectOffsetBot,
|
||||
@@ -478,18 +620,18 @@
|
||||
selectOffsetBot = $window.height() - selectOffsetTop - selectHeight;
|
||||
};
|
||||
posVert();
|
||||
if (this.options.header) menu.css('padding-top', 0);
|
||||
if (this.options.header) $menu.css('padding-top', 0);
|
||||
|
||||
if (this.options.size == 'auto') {
|
||||
var getSize = function () {
|
||||
var minHeight,
|
||||
lisVis = that.$lis.not('.hide');
|
||||
lisVis = that.$lis.not('.hidden');
|
||||
|
||||
posVert();
|
||||
menuHeight = selectOffsetBot - menuExtras;
|
||||
|
||||
if (that.options.dropupAuto) {
|
||||
that.$newElement.toggleClass('dropup', (selectOffsetTop > selectOffsetBot) && ((menuHeight - menuExtras) < menu.height()));
|
||||
that.$newElement.toggleClass('dropup', selectOffsetTop > selectOffsetBot && (menuHeight - menuExtras) < $menu.height());
|
||||
}
|
||||
if (that.$newElement.hasClass('dropup')) {
|
||||
menuHeight = selectOffsetTop - menuExtras;
|
||||
@@ -501,31 +643,36 @@
|
||||
minHeight = 0;
|
||||
}
|
||||
|
||||
menu.css({
|
||||
$menu.css({
|
||||
'max-height': menuHeight + 'px',
|
||||
'overflow': 'hidden',
|
||||
'min-height': minHeight + headerHeight + searchHeight + actionsHeight + 'px'
|
||||
'min-height': minHeight + headerHeight + searchHeight + actionsHeight + doneButtonHeight + 'px'
|
||||
});
|
||||
menuInner.css({
|
||||
'max-height': menuHeight - headerHeight - searchHeight - actionsHeight - menuPadding + 'px',
|
||||
$menuInner.css({
|
||||
'max-height': menuHeight - headerHeight - searchHeight - actionsHeight - doneButtonHeight - menuPadding + 'px',
|
||||
'overflow-y': 'auto',
|
||||
'min-height': Math.max(minHeight - menuPadding, 0) + 'px'
|
||||
});
|
||||
};
|
||||
getSize();
|
||||
this.$searchbox.off('input.getSize propertychange.getSize').on('input.getSize propertychange.getSize', getSize);
|
||||
$(window).off('resize.getSize').on('resize.getSize', getSize);
|
||||
$(window).off('scroll.getSize').on('scroll.getSize', getSize);
|
||||
} else if (this.options.size && this.options.size != 'auto' && menu.find('li' + notDisabled).length > this.options.size) {
|
||||
var optIndex = this.$lis.not('.divider' + notDisabled).find(' > *').slice(0, this.options.size).last().parent().index();
|
||||
$window.off('resize.getSize scroll.getSize').on('resize.getSize scroll.getSize', getSize);
|
||||
} else if (this.options.size && this.options.size != 'auto' && $menu.find('li').not(notDisabled).length > this.options.size) {
|
||||
var optIndex = this.$lis.not('.divider').not(notDisabled).children().slice(0, this.options.size).last().parent().index();
|
||||
var divLength = this.$lis.slice(0, optIndex + 1).filter('.divider').length;
|
||||
menuHeight = liHeight * this.options.size + divLength * divHeight + menuPadding;
|
||||
if (that.options.dropupAuto) {
|
||||
//noinspection JSUnusedAssignment
|
||||
this.$newElement.toggleClass('dropup', (selectOffsetTop > selectOffsetBot) && (menuHeight < menu.height()));
|
||||
this.$newElement.toggleClass('dropup', selectOffsetTop > selectOffsetBot && menuHeight < $menu.height());
|
||||
}
|
||||
menu.css({'max-height': menuHeight + headerHeight + searchHeight + actionsHeight + 'px', 'overflow': 'hidden'});
|
||||
menuInner.css({'max-height': menuHeight - menuPadding + 'px', 'overflow-y': 'auto'});
|
||||
$menu.css({
|
||||
'max-height': menuHeight + headerHeight + searchHeight + actionsHeight + doneButtonHeight + 'px',
|
||||
'overflow': 'hidden'
|
||||
});
|
||||
$menuInner.css({
|
||||
'max-height': menuHeight - menuPadding + 'px',
|
||||
'overflow-y': 'auto'
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -535,8 +682,8 @@
|
||||
|
||||
// Get correct width if element hidden
|
||||
var selectClone = this.$newElement.clone().appendTo('body');
|
||||
var ulWidth = selectClone.find('> .dropdown-menu').css('width');
|
||||
var btnWidth = selectClone.css('width', 'auto').find('> button').css('width');
|
||||
var ulWidth = selectClone.children('.dropdown-menu').css('width');
|
||||
var btnWidth = selectClone.css('width', 'auto').children('button').css('width');
|
||||
selectClone.remove();
|
||||
|
||||
// Set width to whatever's larger, button title or longest option
|
||||
@@ -586,10 +733,7 @@
|
||||
$drop.toggleClass('open', !$(this).hasClass('open'));
|
||||
$drop.append(that.$menu);
|
||||
});
|
||||
$(window).resize(function () {
|
||||
getPlacement(that.$newElement);
|
||||
});
|
||||
$(window).on('scroll', function () {
|
||||
$(window).on('resize scroll', function () {
|
||||
getPlacement(that.$newElement);
|
||||
});
|
||||
$('html').on('click', function (e) {
|
||||
@@ -607,9 +751,9 @@
|
||||
setDisabled: function (index, disabled) {
|
||||
this.findLis();
|
||||
if (disabled) {
|
||||
this.$lis.filter('[data-original-index="' + index + '"]').addClass('disabled').find('a').attr('href', '#').attr('tabindex', -1);
|
||||
this.$lis.filter('[data-original-index="' + index + '"]').addClass('disabled').children('a').attr('href', '#').attr('tabindex', -1);
|
||||
} else {
|
||||
this.$lis.filter('[data-original-index="' + index + '"]').removeClass('disabled').find('a').removeAttr('href').attr('tabindex', 0);
|
||||
this.$lis.filter('[data-original-index="' + index + '"]').removeClass('disabled').children('a').removeAttr('href').attr('tabindex', 0);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -627,8 +771,8 @@
|
||||
this.$button.removeClass('disabled');
|
||||
}
|
||||
|
||||
if (this.$button.attr('tabindex') == -1) {
|
||||
if (!this.$element.data('tabindex')) this.$button.removeAttr('tabindex');
|
||||
if (this.$button.attr('tabindex') == -1 && !this.$element.data('tabindex')) {
|
||||
this.$button.removeAttr('tabindex');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -692,7 +836,7 @@
|
||||
that.setSelected(clickedIndex, !state);
|
||||
$this.blur();
|
||||
|
||||
if ((maxOptions !== false) || (maxOptionsGrp !== false)) {
|
||||
if (maxOptions !== false || maxOptionsGrp !== false) {
|
||||
var maxReached = maxOptions < $options.filter(':selected').length,
|
||||
maxReachedGrp = maxOptionsGrp < $optgroup.find('option:selected').length;
|
||||
|
||||
@@ -763,13 +907,13 @@
|
||||
});
|
||||
|
||||
this.$menu.on('click', 'li.disabled a, .popover-title, .popover-title :not(.close)', function (e) {
|
||||
if (e.target == this) {
|
||||
if (e.currentTarget == this) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (!that.options.liveSearch) {
|
||||
that.$button.focus();
|
||||
} else {
|
||||
if (that.options.liveSearch) {
|
||||
that.$searchbox.focus();
|
||||
} else {
|
||||
that.$button.focus();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -777,10 +921,10 @@
|
||||
this.$menu.on('click', 'li.divider, li.dropdown-header', function (e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
if (!that.options.liveSearch) {
|
||||
that.$button.focus();
|
||||
} else {
|
||||
if (that.options.liveSearch) {
|
||||
that.$searchbox.focus();
|
||||
} else {
|
||||
that.$button.focus();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -792,7 +936,6 @@
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
|
||||
this.$menu.on('click', '.actions-btn', function (e) {
|
||||
if (that.options.liveSearch) {
|
||||
that.$searchbox.focus();
|
||||
@@ -803,7 +946,7 @@
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
if ($(this).is('.bs-select-all')) {
|
||||
if ($(this).hasClass('bs-select-all')) {
|
||||
that.selectAll();
|
||||
} else {
|
||||
that.deselectAll();
|
||||
@@ -818,14 +961,14 @@
|
||||
|
||||
liveSearchListener: function () {
|
||||
var that = this,
|
||||
no_results = $('<li class="no-results"></li>');
|
||||
$no_results = $('<li class="no-results"></li>');
|
||||
|
||||
this.$newElement.on('click.dropdown.data-api touchstart.dropdown.data-api', function () {
|
||||
that.$menu.find('.active').removeClass('active');
|
||||
if (!!that.$searchbox.val()) {
|
||||
that.$searchbox.val('');
|
||||
that.$lis.not('.is-hidden').removeClass('hide');
|
||||
if (!!no_results.parent().length) no_results.remove();
|
||||
that.$lis.not('.is-hidden').removeClass('hidden');
|
||||
if (!!$no_results.parent().length) $no_results.remove();
|
||||
}
|
||||
if (!that.multiple) that.$menu.find('.selected').addClass('active');
|
||||
setTimeout(function () {
|
||||
@@ -839,32 +982,76 @@
|
||||
|
||||
this.$searchbox.on('input propertychange', function () {
|
||||
if (that.$searchbox.val()) {
|
||||
|
||||
if (that.options.searchAccentInsensitive) {
|
||||
that.$lis.not('.is-hidden').removeClass('hide').find('a').not(':aicontains(' + normalizeToBase(that.$searchbox.val()) + ')').parent().addClass('hide');
|
||||
var $searchBase = that.$lis.not('.is-hidden').removeClass('hidden').children('a');
|
||||
if (that.options.liveSearchNormalize) {
|
||||
$searchBase = $searchBase.not(':a' + that._searchStyle() + '(' + normalizeToBase(that.$searchbox.val()) + ')');
|
||||
} else {
|
||||
that.$lis.not('.is-hidden').removeClass('hide').find('a').not(':icontains(' + that.$searchbox.val() + ')').parent().addClass('hide');
|
||||
$searchBase = $searchBase.not(':' + that._searchStyle() + '(' + that.$searchbox.val() + ')');
|
||||
}
|
||||
$searchBase.parent().addClass('hidden');
|
||||
|
||||
if (!that.$menu.find('li').filter(':visible:not(.no-results)').length) {
|
||||
if (!!no_results.parent().length) no_results.remove();
|
||||
no_results.html(that.options.noneResultsText + ' "' + htmlEscape(that.$searchbox.val()) + '"').show();
|
||||
that.$menu.find('li').last().after(no_results);
|
||||
} else if (!!no_results.parent().length) {
|
||||
no_results.remove();
|
||||
that.$lis.filter('.dropdown-header').each(function () {
|
||||
var $this = $(this),
|
||||
optgroup = $this.data('optgroup');
|
||||
|
||||
if (that.$lis.filter('[data-optgroup=' + optgroup + ']').not($this).not('.hidden').length === 0) {
|
||||
$this.addClass('hidden');
|
||||
that.$lis.filter('[data-optgroup=' + optgroup + 'div]').addClass('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
var $lisVisible = that.$lis.not('.hidden');
|
||||
|
||||
// hide divider if first or last visible, or if followed by another divider
|
||||
$lisVisible.each(function(index) {
|
||||
var $this = $(this);
|
||||
|
||||
if ($this.hasClass('divider') && (
|
||||
$this.index() === $lisVisible.eq(0).index() ||
|
||||
$this.index() === $lisVisible.last().index() ||
|
||||
$lisVisible.eq(index + 1).hasClass('divider'))) {
|
||||
$this.addClass('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
if (!that.$lis.not('.hidden, .no-results').length) {
|
||||
if (!!$no_results.parent().length) {
|
||||
$no_results.remove();
|
||||
}
|
||||
$no_results.html(that.options.noneResultsText.replace('{0}', '"' + htmlEscape(that.$searchbox.val()) + '"')).show();
|
||||
that.$menu.append($no_results);
|
||||
} else if (!!$no_results.parent().length) {
|
||||
$no_results.remove();
|
||||
}
|
||||
|
||||
} else {
|
||||
that.$lis.not('.is-hidden').removeClass('hide');
|
||||
if (!!no_results.parent().length) no_results.remove();
|
||||
that.$lis.not('.is-hidden').removeClass('hidden');
|
||||
if (!!$no_results.parent().length) {
|
||||
$no_results.remove();
|
||||
}
|
||||
}
|
||||
|
||||
that.$menu.find('li.active').removeClass('active');
|
||||
that.$menu.find('li').filter(':visible:not(.divider)').eq(0).addClass('active').find('a').focus();
|
||||
that.$lis.filter('.active').removeClass('active');
|
||||
that.$lis.not('.hidden, .divider, .dropdown-header').eq(0).addClass('active').children('a').focus();
|
||||
$(this).focus();
|
||||
});
|
||||
},
|
||||
|
||||
_searchStyle: function () {
|
||||
var style = 'icontains';
|
||||
switch (this.options.liveSearchStyle) {
|
||||
case 'begins':
|
||||
case 'startsWith':
|
||||
style = 'ibegins';
|
||||
break;
|
||||
case 'contains':
|
||||
default:
|
||||
break; //no need to change the default
|
||||
}
|
||||
|
||||
return style;
|
||||
},
|
||||
|
||||
val: function (value) {
|
||||
if (typeof value !== 'undefined') {
|
||||
this.$element.val(value);
|
||||
@@ -878,17 +1065,21 @@
|
||||
|
||||
selectAll: function () {
|
||||
this.findLis();
|
||||
this.$lis.not('.divider').not('.disabled').not('.selected').filter(':visible').find('a').click();
|
||||
this.$element.find('option:enabled').not('[data-divider], [data-hidden]').prop('selected', true);
|
||||
this.$lis.not('.divider, .dropdown-header, .disabled, .hidden').addClass('selected');
|
||||
this.render(false);
|
||||
},
|
||||
|
||||
deselectAll: function () {
|
||||
this.findLis();
|
||||
this.$lis.not('.divider').not('.disabled').filter('.selected').filter(':visible').find('a').click();
|
||||
this.$element.find('option:enabled').not('[data-divider], [data-hidden]').prop('selected', false);
|
||||
this.$lis.not('.divider, .dropdown-header, .disabled, .hidden').removeClass('selected');
|
||||
this.render(false);
|
||||
},
|
||||
|
||||
keydown: function (e) {
|
||||
var $this = $(this),
|
||||
$parent = ($this.is('input')) ? $this.parent().parent() : $this.parent(),
|
||||
$parent = $this.is('input') ? $this.parent().parent() : $this.parent(),
|
||||
$items,
|
||||
that = $parent.data('this'),
|
||||
index,
|
||||
@@ -975,13 +1166,14 @@
|
||||
that.$menu.parent().removeClass('open');
|
||||
that.$button.focus();
|
||||
}
|
||||
$items = $('[role=menu] li:not(.divider):not(.dropdown-header):visible', $parent);
|
||||
$items = $('[role=menu] li:not(.divider):not(.dropdown-header):visible a', $parent);
|
||||
if (!$this.val() && !/(38|40)/.test(e.keyCode.toString(10))) {
|
||||
if ($items.filter('.active').length === 0) {
|
||||
if (that.options.searchAccentInsensitive) {
|
||||
$items = that.$newElement.find('li').filter(':aicontains(' + normalizeToBase(keyCodeMap[e.keyCode]) + ')');
|
||||
$items = that.$newElement.find('li a');
|
||||
if (that.options.liveSearchNormalize) {
|
||||
$items = $items.filter(':a' + that._searchStyle() + '(' + normalizeToBase(keyCodeMap[e.keyCode]) + ')');
|
||||
} else {
|
||||
$items = that.$newElement.find('li').filter(':icontains(' + keyCodeMap[e.keyCode] + ')');
|
||||
$items = $items.filter(':' + that._searchStyle() + '(' + keyCodeMap[e.keyCode] + ')');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -999,7 +1191,7 @@
|
||||
|
||||
if (that.options.liveSearch) {
|
||||
$items.each(function (i) {
|
||||
if ($(this).is(':not(.disabled)')) {
|
||||
if (!$(this).hasClass('disabled')) {
|
||||
$(this).data('index', i);
|
||||
}
|
||||
});
|
||||
@@ -1018,9 +1210,7 @@
|
||||
if (index != nextPrev && index > prev) index = prev;
|
||||
if (index < first) index = first;
|
||||
if (index == prevIndex) index = last;
|
||||
}
|
||||
|
||||
if (e.keyCode == 40) {
|
||||
} else if (e.keyCode == 40) {
|
||||
if (that.options.liveSearch) index += 1;
|
||||
if (index == -1) index = 0;
|
||||
if (index != nextPrev && index < next) index = next;
|
||||
@@ -1034,9 +1224,9 @@
|
||||
$items.eq(index).focus();
|
||||
} else {
|
||||
e.preventDefault();
|
||||
if (!$this.is('.dropdown-toggle')) {
|
||||
if (!$this.hasClass('dropdown-toggle')) {
|
||||
$items.removeClass('active');
|
||||
$items.eq(index).addClass('active').find('a').focus();
|
||||
$items.eq(index).addClass('active').children('a').focus();
|
||||
$this.focus();
|
||||
}
|
||||
}
|
||||
@@ -1047,7 +1237,7 @@
|
||||
prevKey;
|
||||
|
||||
$items.each(function () {
|
||||
if ($(this).parent().is(':not(.disabled)')) {
|
||||
if (!$(this).parent().hasClass('disabled')) {
|
||||
if ($.trim($(this).text().toLowerCase()).substring(0, 1) == keyCodeMap[e.keyCode]) {
|
||||
keyIndex.push($(this).parent().index());
|
||||
}
|
||||
@@ -1075,7 +1265,12 @@
|
||||
if ((/(13|32)/.test(e.keyCode.toString(10)) || (/(^9$)/.test(e.keyCode.toString(10)) && that.options.selectOnTab)) && isActive) {
|
||||
if (!/(32)/.test(e.keyCode.toString(10))) e.preventDefault();
|
||||
if (!that.options.liveSearch) {
|
||||
$(':focus').click();
|
||||
var elem = $(':focus');
|
||||
elem.click();
|
||||
// Bring back focus for multiselects
|
||||
elem.focus();
|
||||
// Prevent screen from scrolling if the user hit the spacebar
|
||||
e.preventDefault();
|
||||
} else if (!/(32)/.test(e.keyCode.toString(10))) {
|
||||
that.$menu.find('.active a').click();
|
||||
$this.focus();
|
||||
@@ -1104,14 +1299,6 @@
|
||||
this.liHeight();
|
||||
},
|
||||
|
||||
update: function () {
|
||||
this.reloadLi();
|
||||
this.setWidth();
|
||||
this.setStyle();
|
||||
this.checkDisabled();
|
||||
this.liHeight();
|
||||
},
|
||||
|
||||
hide: function () {
|
||||
this.$newElement.hide();
|
||||
},
|
||||
@@ -1132,28 +1319,21 @@
|
||||
// get the args of the outer function..
|
||||
var args = arguments;
|
||||
// The arguments of the function are explicitly re-defined from the argument list, because the shift causes them
|
||||
// to get lost
|
||||
//noinspection JSDuplicatedDeclaration
|
||||
// to get lost/corrupted in android 2.3 and IE9 #715 #775
|
||||
var _option = option,
|
||||
option = args[0],
|
||||
event = args[1];
|
||||
_event = event;
|
||||
[].shift.apply(args);
|
||||
|
||||
// This fixes a bug in the js implementation on android 2.3 #715
|
||||
if (typeof option == 'undefined') {
|
||||
option = _option;
|
||||
}
|
||||
|
||||
var value;
|
||||
var chain = this.each(function () {
|
||||
var $this = $(this);
|
||||
if ($this.is('select')) {
|
||||
var data = $this.data('selectpicker'),
|
||||
options = typeof option == 'object' && option;
|
||||
options = typeof _option == 'object' && _option;
|
||||
|
||||
if (!data) {
|
||||
var config = $.extend({}, Selectpicker.DEFAULTS, $.fn.selectpicker.defaults || {}, $this.data(), options);
|
||||
$this.data('selectpicker', (data = new Selectpicker(this, config, event)));
|
||||
$this.data('selectpicker', (data = new Selectpicker(this, config, _event)));
|
||||
} else if (options) {
|
||||
for (var i in options) {
|
||||
if (options.hasOwnProperty(i)) {
|
||||
@@ -1162,11 +1342,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof option == 'string') {
|
||||
if (data[option] instanceof Function) {
|
||||
value = data[option].apply(data, args);
|
||||
if (typeof _option == 'string') {
|
||||
if (data[_option] instanceof Function) {
|
||||
value = data[_option].apply(data, args);
|
||||
} else {
|
||||
value = data.options[option];
|
||||
value = data.options[_option];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Translated default messages for bootstrap-select.
|
||||
* Locale: BG (Bulgaria)
|
||||
* Region: BG (Bulgaria)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Нищо избрано',
|
||||
noneResultsText: 'Няма резултат за {0}',
|
||||
countSelectedText: function (numSelected, numTotal) {
|
||||
return (numSelected == 1) ? "{0} избран елемент" : "{0} избрани елемента";
|
||||
},
|
||||
maxOptionsText: function (numAll, numGroup) {
|
||||
return [
|
||||
(numAll == 1) ? 'Лимита е достигнат ({n} елемент максимум)' : 'Лимита е достигнат ({n} елемента максимум)',
|
||||
(numGroup == 1) ? 'Груповия лимит е достигнат ({n} елемент максимум)' : 'Груповия лимит е достигнат ({n} елемента максимум)'
|
||||
];
|
||||
},
|
||||
selectAllText: 'Избери всички',
|
||||
deselectAllText: 'Размаркирай всички',
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
})(jQuery);
|
||||
@@ -6,9 +6,9 @@
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Nic není vybráno',
|
||||
noneResultsText: 'Žádné výsledky',
|
||||
noneResultsText: 'Žádné výsledky {0}',
|
||||
countSelectedText: 'Označeno {0} z {1}',
|
||||
maxOptionsText: ['Limit překročen ({n} {var} max)', 'Limit skupiny překročen ({n} {var} max)', ['položek', 'položka']],
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Bitte wählen...',
|
||||
noneResultsText: 'Keine Ergebnisse für',
|
||||
noneResultsText: 'Keine Ergebnisse für {0}',
|
||||
countSelectedText: '{0} von {1} ausgewählt',
|
||||
maxOptionsText: ['Limit erreicht ({n} {var} max.)', 'Gruppen-Limit erreicht ({n} {var} max.)', ['Eintrag', 'Einträge']],
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
@@ -6,20 +6,18 @@
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Nothing selected',
|
||||
noneResultsText: 'No results match',
|
||||
noneResultsText: 'No results match {0}',
|
||||
countSelectedText: function (numSelected, numTotal) {
|
||||
return (numSelected == 1) ? "{0} item selected" : "{0} items selected";
|
||||
},
|
||||
maxOptionsText: function (numAll, numGroup) {
|
||||
var arr = [];
|
||||
|
||||
arr[0] = (numAll == 1) ? 'Limit reached ({n} item max)' : 'Limit reached ({n} items max)';
|
||||
arr[1] = (numGroup == 1) ? 'Group limit reached ({n} item max)' : 'Group limit reached ({n} items max)';
|
||||
|
||||
return arr;
|
||||
return [
|
||||
(numAll == 1) ? 'Limit reached ({n} item max)' : 'Limit reached ({n} items max)',
|
||||
(numGroup == 1) ? 'Group limit reached ({n} item max)' : 'Group limit reached ({n} items max)'
|
||||
];
|
||||
},
|
||||
selectAllText: 'Select All',
|
||||
deselectAllText: 'Deselect All',
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'No hay selección',
|
||||
noneResultsText: 'No hay resultados',
|
||||
noneResultsText: 'No hay resultados {0}',
|
||||
countSelectedText: 'Seleccionados {0} de {1}',
|
||||
maxOptionsText: ['Límite alcanzado ({n} {var} max)', 'Límite del grupo alcanzado({n} {var} max)', ['elementos', 'element']],
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Hautapenik ez',
|
||||
noneResultsText: 'Emaitzarik ez',
|
||||
noneResultsText: 'Emaitzarik ez {0}',
|
||||
countSelectedText: '{1}(e)tik {0} hautatuta',
|
||||
maxOptionsText: ['Mugara iritsita ({n} {var} gehienez)', 'Taldearen mugara iritsita ({n} {var} gehienez)', ['elementu', 'elementu']],
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,23 +1,21 @@
|
||||
/*
|
||||
* Translated default messages for bootstrap-select.
|
||||
* Locale: FR (French; Français)
|
||||
* Region: FR (France)
|
||||
*/
|
||||
* Translated default messages for bootstrap-select.
|
||||
* Locale: FR (French; Français)
|
||||
* Region: FR (France)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Aucune sélection',
|
||||
noneResultsText: 'Aucun résultat',
|
||||
noneResultsText: 'Aucun résultat pour {0}',
|
||||
countSelectedText: function (numSelected, numTotal) {
|
||||
return (numSelected > 1) ? "{0} éléments sélectionés" : "{0} élément sélectioné";
|
||||
return (numSelected > 1) ? "{0} éléments sélectionnés" : "{0} élément sélectionné";
|
||||
},
|
||||
maxOptionsText: function (numAll, numGroup) {
|
||||
var arr = [];
|
||||
|
||||
arr[0] = (numAll > 1) ? 'Limite atteinte ({n} éléments max)' : 'Limite atteinte ({n} élément max)';
|
||||
arr[1] = (numGroup > 1) ? 'Limite du groupe atteinte ({n} éléments max)' : 'Limite du groupe atteinte ({n} élément max)';
|
||||
|
||||
return arr;
|
||||
return [
|
||||
(numAll > 1) ? 'Limite atteinte ({n} éléments max)' : 'Limite atteinte ({n} élément max)',
|
||||
(numGroup > 1) ? 'Limite du groupe atteinte ({n} éléments max)' : 'Limite du groupe atteinte ({n} élément max)'
|
||||
];
|
||||
},
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Translated default messages for bootstrap-select.
|
||||
* Locale: HU (Hungarian)
|
||||
* Region: HU (Hungary)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Válasszon!',
|
||||
noneResultsText: 'Nincs találat {0}',
|
||||
countSelectedText: function (numSelected, numTotal) {
|
||||
return '{n} elem kiválasztva';
|
||||
},
|
||||
maxOptionsText: function (numAll, numGroup) {
|
||||
return [
|
||||
'Legfeljebb {n} elem választható',
|
||||
'A csoportban legfeljebb {n} elem választható'
|
||||
];
|
||||
},
|
||||
selectAllText: 'Mind',
|
||||
deselectAllText: 'Egyik sem',
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
})(jQuery);
|
||||
@@ -7,9 +7,9 @@
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Nessuna selezione',
|
||||
noneResultsText: 'Nessun risultato',
|
||||
noneResultsText: 'Nessun risultato per {0}',
|
||||
countSelectedText: 'Selezionati {0} di {1}',
|
||||
maxOptionsText: ['Limite raggiunto ({n} {var} max)', 'Limite del gruppo raggiunto ({n} {var} max)', ['elementi', 'elemento']],
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Niets geselecteerd',
|
||||
noneResultsText: 'Geen resultaten gevonden voor',
|
||||
noneResultsText: 'Geen resultaten gevonden voor {0}',
|
||||
countSelectedText: '{0} van {1} geselecteerd',
|
||||
maxOptionsText: ['Limiet bereikt ({n} {var} max)', 'Groep limiet bereikt ({n} {var} max)', ['items', 'item']],
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Nic nie zaznaczono',
|
||||
noneResultsText: 'Brak wyników wyszukiwania',
|
||||
noneResultsText: 'Brak wyników wyszukiwania {0}',
|
||||
countSelectedText: 'Zaznaczono {0} z {1}',
|
||||
maxOptionsText: ['Osiągnięto limit ({n} {var} max)', 'Limit grupy osiągnięty ({n} {var} max)', ['elementy', 'element']],
|
||||
selectAll: 'Zaznacz wszystkie',
|
||||
deselectAll: 'Odznacz wszystkie',
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Nada selecionado',
|
||||
noneResultsText: 'Nada encontrado contendo',
|
||||
noneResultsText: 'Nada encontrado contendo {0}',
|
||||
countSelectedText: 'Selecionado {0} de {1}',
|
||||
maxOptionsText: ['Limite excedido (máx. {n} {var})', 'Limite do grupo excedido (máx. {n} {var})', ['itens', 'item']],
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Nu a fost selectat nimic',
|
||||
noneResultsText: 'Nu exista niciun rezultat',
|
||||
noneResultsText: 'Nu exista niciun rezultat {0}',
|
||||
countSelectedText: '{0} din {1} selectat(e)',
|
||||
maxOptionsText: ['Limita a fost atinsa ({n} {var} max)', 'Limita de grup a fost atinsa ({n} {var} max)', ['iteme', 'item']],
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
@@ -6,9 +6,10 @@
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Ничего не выбрано',
|
||||
noneResultsText: 'Совпадений не найдено',
|
||||
noneResultsText: 'Совпадений не найдено {0}',
|
||||
countSelectedText: 'Выбрано {0} из {1}',
|
||||
maxOptionsText: ['Достигнут предел ({n} {var} максимум)', 'Достигнут предел в группе ({n} {var} максимум)', ['items', 'item']],
|
||||
doneButtonText: 'Закрыть',
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Translated default messages for bootstrap-select.
|
||||
* Locale: SL (Slovenian)
|
||||
* Region: SI (Slovenia)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Nič izbranega',
|
||||
noneResultsText: 'Ni zadetkov za {0}',
|
||||
countSelectedText: function (numSelected, numTotal) {
|
||||
"Število izbranih: {0}";
|
||||
},
|
||||
maxOptionsText: function (numAll, numGroup) {
|
||||
return [
|
||||
'Omejitev dosežena (max. izbranih: {n})',
|
||||
'Omejitev skupine dosežena (max. izbranih: {n})'
|
||||
];
|
||||
},
|
||||
selectAllText: 'Izberi vse',
|
||||
deselectAllText: 'Počisti izbor',
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
})(jQuery);
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Translated default messages for bootstrap-select.
|
||||
* Locale: SV (Swedish)
|
||||
* Region: SE (Sweden)
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Inget valt',
|
||||
noneResultsText: 'Inget sökresultat matchar {0}',
|
||||
countSelectedText: function (numSelected, numTotal) {
|
||||
return (numSelected === 1) ? "{0} alternativ valt" : "{0} alternativ valda";
|
||||
},
|
||||
maxOptionsText: function (numAll, numGroup) {
|
||||
return [
|
||||
'Gräns uppnåd (max {n} alternativ)',
|
||||
'Gräns uppnåd (max {n} gruppalternativ)'
|
||||
];
|
||||
},
|
||||
selectAllText: 'Markera alla',
|
||||
deselectAllText: 'Avmarkera alla',
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
})(jQuery);
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Translated default messages for bootstrap-select.
|
||||
* Locale: TR (Turkey)
|
||||
* Region: TR (Europe)
|
||||
* Author: Serhan Güney
|
||||
*/
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Hiçbiri seçilmedi',
|
||||
noneResultsText: 'Hiçbir sonuç bulunamadı {0}',
|
||||
countSelectedText: function (numSelected, numTotal) {
|
||||
return (numSelected == 1) ? "{0} öğe seçildi" : "{0} öğe seçildi";
|
||||
},
|
||||
maxOptionsText: function (numAll, numGroup) {
|
||||
return [
|
||||
(numAll == 1) ? 'Limit aşıldı (maksimum {n} sayıda öğe )' : 'Limit aşıldı (maksimum {n} sayıda öğe)',
|
||||
(numGroup == 1) ? 'Grup limiti aşıldı (maksimum {n} sayıda öğe)' : 'Grup limiti aşıldı (maksimum {n} sayıda öğe)'
|
||||
];
|
||||
},
|
||||
selectAllText: 'Tümünü Seç',
|
||||
deselectAllText: 'Seçiniz',
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
})(jQuery);
|
||||
@@ -6,9 +6,9 @@
|
||||
(function ($) {
|
||||
$.fn.selectpicker.defaults = {
|
||||
noneSelectedText: 'Нічого не вибрано',
|
||||
noneResultsText: 'Збігів не знайдено',
|
||||
noneResultsText: 'Збігів не знайдено {0}',
|
||||
countSelectedText: 'Вибрано {0} із {1}',
|
||||
maxOptionsText: ['Досягнута межа ({n} {var} максимум)', 'Досягнута межа в групі ({n} {var} максимум)', ['items', 'item']],
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
@@ -11,4 +11,4 @@
|
||||
maxOptionsText: ['超出限制 (最多选择{n}项)', '组选择超出限制(最多选择{n}组)'],
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
@@ -13,4 +13,4 @@
|
||||
deselectAllText: '全部取消',
|
||||
multipleSeparator: ', '
|
||||
};
|
||||
}(jQuery));
|
||||
})(jQuery);
|
||||
|
||||
@@ -7,23 +7,17 @@
|
||||
|
||||
// Rules
|
||||
.bootstrap-select {
|
||||
/*width: 220px\9; IE8 and below*/
|
||||
//noinspection CssShorthandPropertyValue
|
||||
width: 220px \0; /*IE9 and below*/
|
||||
|
||||
// The selectpicker button
|
||||
> .btn {
|
||||
> .dropdown-toggle {
|
||||
width: 100%;
|
||||
padding-right: 25px;
|
||||
}
|
||||
|
||||
// Error display
|
||||
.error & .btn {
|
||||
border: 1px solid @color-red-error;
|
||||
}
|
||||
|
||||
// Error display
|
||||
.control-group.error & .dropdown-toggle {
|
||||
.has-error & .dropdown-toggle,
|
||||
.error & .dropdown-toggle {
|
||||
border-color: @color-red-error;
|
||||
}
|
||||
|
||||
@@ -35,7 +29,7 @@
|
||||
width: @width-default;
|
||||
}
|
||||
|
||||
.btn:focus {
|
||||
.dropdown-toggle:focus {
|
||||
outline: thin dotted #333333 !important;
|
||||
outline: 5px auto -webkit-focus-ring-color !important;
|
||||
outline-offset: -2px;
|
||||
@@ -50,6 +44,10 @@
|
||||
&:not([class*="col-"]) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&.input-group-btn {
|
||||
z-index: auto;
|
||||
}
|
||||
}
|
||||
|
||||
// The selectpicker components
|
||||
@@ -64,21 +62,20 @@
|
||||
// Forces the pull to the right, if necessary
|
||||
&,
|
||||
&[class*="col-"],
|
||||
.row-fluid &[class*="col-"] {
|
||||
.row &[class*="col-"] {
|
||||
&.dropdown-menu-right {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
.form-search &,
|
||||
.form-inline &,
|
||||
.form-horizontal &,
|
||||
.form-group & {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.form-group-lg &.form-control,
|
||||
.form-group-sm &.form-control {
|
||||
.form-group-lg &.form-control,
|
||||
.form-group-sm &.form-control {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@@ -88,14 +85,6 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.input-append & {
|
||||
margin-left: -1px;
|
||||
}
|
||||
|
||||
.input-prepend & {
|
||||
margin-right: -1px;
|
||||
}
|
||||
|
||||
> .disabled {
|
||||
.cursor-disabled();
|
||||
|
||||
@@ -105,7 +94,7 @@
|
||||
}
|
||||
|
||||
// The selectpicker button
|
||||
.btn {
|
||||
.dropdown-toggle {
|
||||
.filter-option {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
@@ -122,7 +111,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
&[class*="col-"] .btn {
|
||||
&[class*="col-"] .dropdown-toggle {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -134,6 +123,7 @@
|
||||
|
||||
&.inner {
|
||||
position: static;
|
||||
float: none;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
@@ -144,11 +134,8 @@
|
||||
li {
|
||||
position: relative;
|
||||
|
||||
&:not(.disabled) a:hover small,
|
||||
&:not(.disabled) a:focus small,
|
||||
&.active:not(.disabled) a small {
|
||||
color: @color-blue-hover;
|
||||
color: fade(@color-blue-hover, 40%);
|
||||
&.active small {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
&.disabled a {
|
||||
@@ -166,6 +153,7 @@
|
||||
span.check-mark {
|
||||
display: none;
|
||||
}
|
||||
|
||||
span.text {
|
||||
display: inline-block;
|
||||
}
|
||||
@@ -198,7 +186,7 @@
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
&.fit-width .btn {
|
||||
&.fit-width .dropdown-toggle {
|
||||
.filter-option {
|
||||
position: static;
|
||||
}
|
||||
@@ -225,8 +213,8 @@
|
||||
}
|
||||
|
||||
.bootstrap-select.show-menu-arrow {
|
||||
&.open > .btn {
|
||||
z-index: @zindex-select-dropdown + 1;
|
||||
&.open > .dropdown-toggle {
|
||||
z-index: (@zindex-select-dropdown + 1);
|
||||
}
|
||||
|
||||
.dropdown-toggle {
|
||||
@@ -234,10 +222,7 @@
|
||||
content: '';
|
||||
border-left: 7px solid transparent;
|
||||
border-right: 7px solid transparent;
|
||||
border-bottom-width: 7px;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-color: @color-grey-arrow;
|
||||
border-bottom-color: fade(@color-grey-arrow, 20%);
|
||||
border-bottom: 7px solid @color-grey-arrow;
|
||||
position: absolute;
|
||||
bottom: -4px;
|
||||
left: 9px;
|
||||
@@ -260,11 +245,8 @@
|
||||
&:before {
|
||||
bottom: auto;
|
||||
top: -3px;
|
||||
border-top: 7px solid @color-grey-arrow;
|
||||
border-bottom: 0;
|
||||
border-top-width: 7px;
|
||||
border-top-style: solid;
|
||||
border-top-color: @color-grey-arrow;
|
||||
border-top-color: fade(@color-grey-arrow, 20%);
|
||||
}
|
||||
|
||||
&:after {
|
||||
@@ -296,7 +278,8 @@
|
||||
}
|
||||
|
||||
.bs-searchbox,
|
||||
.bs-actionsbox {
|
||||
.bs-actionsbox,
|
||||
.bs-donebutton {
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
@@ -310,6 +293,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
.bs-donebutton {
|
||||
float: left;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
& .btn-group button {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.bs-searchbox {
|
||||
& + .bs-actionsbox {
|
||||
padding: 0 8px 4px;
|
||||
@@ -322,7 +315,7 @@
|
||||
}
|
||||
|
||||
.mobile-device {
|
||||
position: absolute;
|
||||
position: absolute !important;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: block !important;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
@color-red-error: rgb(185, 74, 72);
|
||||
@color-blue-hover: rgb(100, 177, 216);
|
||||
@color-grey-arrow: rgb(204, 204, 204);
|
||||
@color-grey-arrow: rgba(204, 204, 204, 0.2);
|
||||
|
||||
@width-default: 220px; // 3 960px-grid columns
|
||||
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
{
|
||||
"name": "bootstrap-select",
|
||||
"title": "bootstrap-select",
|
||||
"filename": "bootstrap-select.js",
|
||||
"description": "A custom <select> for Bootstrap using button dropdown as replacement",
|
||||
"version": "1.6.3",
|
||||
"homepage": "http://silviomoreto.github.io/bootstrap-select/",
|
||||
"author": {
|
||||
"name": "Silvio Moreto",
|
||||
"url": "https://github.com/silviomoreto/"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Silvio Moreto",
|
||||
"url": "http://github.com/silviomoreto"
|
||||
},
|
||||
{
|
||||
"name": "Ana Carolina",
|
||||
"url": "http://github.com/anacarolinats"
|
||||
},
|
||||
{
|
||||
"name": "caseyjhol",
|
||||
"url": "https://github.com/caseyjhol"
|
||||
},
|
||||
{
|
||||
"name": "Matt Bryson",
|
||||
"url": "https://github.com/mattbryson"
|
||||
},
|
||||
{
|
||||
"name": "t0xicCode",
|
||||
"url": "https://github.com/t0xicCode"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/silviomoreto/bootstrap-select.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/silviomoreto/bootstrap-select/issues"
|
||||
},
|
||||
"license": {
|
||||
"type": "MIT",
|
||||
"url": "https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE"
|
||||
},
|
||||
"dependencies": {
|
||||
"jquery": ">=1.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt": "~0.4.5",
|
||||
"grunt-autoprefixer": "~1.0.0",
|
||||
"grunt-banner": "~0.2.3",
|
||||
"grunt-contrib-clean": "~0.6.0",
|
||||
"grunt-contrib-compress": "^0.12.0",
|
||||
"grunt-contrib-concat": "~0.5.0",
|
||||
"grunt-contrib-csslint": "~0.2.0",
|
||||
"grunt-contrib-cssmin": "~0.10.0",
|
||||
"grunt-contrib-jshint": "~0.10.0",
|
||||
"grunt-contrib-less": "~0.11.3",
|
||||
"grunt-contrib-qunit": "~0.5.2",
|
||||
"grunt-contrib-uglify": "~0.5.0",
|
||||
"grunt-contrib-watch": "~0.6.1",
|
||||
"grunt-sed": "~0.1.1",
|
||||
"load-grunt-tasks": "~0.6.0"
|
||||
},
|
||||
"keywords": [
|
||||
"form",
|
||||
"bootstrap",
|
||||
"select",
|
||||
"replacement"
|
||||
]
|
||||
}
|
||||
-204
@@ -1,204 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Bootstrap-select test page</title>
|
||||
|
||||
<meta charset="utf-8">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="dist/css/bootstrap-select.css">
|
||||
<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
body {
|
||||
padding-top: 70px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="dist/js/bootstrap-select.js"></script>
|
||||
<script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<a class="navbar-brand" href="#">Bootstrap-select usability tests</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label for="basic" class="col-lg-2 control-label">"Basic"</label>
|
||||
|
||||
<div class="col-lg-10">
|
||||
<select id="basic" class="selectpicker show-tick form-control" data-live-search="true">
|
||||
<option>cow</option>
|
||||
<option>bull</option>
|
||||
<option class="get-class" disabled>ox</option>
|
||||
<optgroup label="test" data-subtext="another test">
|
||||
<option>ASD</option>
|
||||
<option selected>Bla</option>
|
||||
<option>Ble</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<hr>
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label for="basic2" class="col-lg-2 control-label">"Basic" #2 (multiple max-option=1)</label>
|
||||
|
||||
<div class="col-lg-10">
|
||||
<select id="basic2" class="show-tick form-control" multiple>
|
||||
<option>cow</option>
|
||||
<option>bull</option>
|
||||
<option class="get-class" disabled>ox</option>
|
||||
<optgroup label="test" data-subtext="another test">
|
||||
<option>ASD</option>
|
||||
<option selected>Bla</option>
|
||||
<option>Ble</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<hr>
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<label for="maxOption2" class="col-lg-2 control-label">multiple, show-menu-arrow, & max-option = 2</label>
|
||||
|
||||
<div class="col-lg-10">
|
||||
<select id="maxOption2" class="selectpicker show-menu-arrow form-control" multiple data-max-options="2">
|
||||
<option>chicken</option>
|
||||
<option>turkey</option>
|
||||
<option disabled>duck</option>
|
||||
<option>goose</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<hr>
|
||||
<form class="form-inline">
|
||||
<div class="form-group">
|
||||
<label class="col-md-1 control-label" for="lunch">Lunch: </label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<select id="lunch" class="selectpicker" data-live-search="true" title="Please select a lunch ...">
|
||||
<option>Hot Dog, Fries and a Soda</option>
|
||||
<option>Burger, Shake and a Smile</option>
|
||||
<option>Sugar, Spice and all things nice</option>
|
||||
<option>Baby Back Ribs</option>
|
||||
<option>A really really long option made to illustrate an issue with the live search in an inline form</option>
|
||||
</select>
|
||||
</div>
|
||||
</form>
|
||||
<hr>
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-group form-group-lg">
|
||||
<label for="error" class="col-lg-2 control-label">error</label>
|
||||
|
||||
<div class="col-lg-10 error">
|
||||
<select id="error" class="selectpicker show-tick form-control">
|
||||
<option>pen</option>
|
||||
<option>pencil</option>
|
||||
<option selected>brush</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<hr>
|
||||
<nav class="navbar navbar-default" role="navigation">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<a class="navbar-brand" href="#">Navbar</a>
|
||||
</div>
|
||||
|
||||
<form class="navbar-form navbar-left" role="search">
|
||||
<div class="form-group">
|
||||
<select class="selectpicker" multiple data-live-search="true" data-actions-box="true">
|
||||
<optgroup label="filter1">
|
||||
<option>option1</option>
|
||||
<option>option2</option>
|
||||
<option>option3</option>
|
||||
<option>option4</option>
|
||||
</optgroup>
|
||||
<optgroup label="filter2">
|
||||
<option>option1</option>
|
||||
<option>option2</option>
|
||||
<option>option3</option>
|
||||
<option>option4</option>
|
||||
</optgroup>
|
||||
<optgroup label="filter3">
|
||||
<option>option1</option>
|
||||
<option>option2</option>
|
||||
<option>option3</option>
|
||||
<option>option4</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="Search" name="q">
|
||||
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-default">Search</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!-- .container-fluid -->
|
||||
</nav>
|
||||
<hr>
|
||||
<select id="first-disabled" class="selectpicker" data-hide-disabled="true" data-live-search="true">
|
||||
<optgroup disabled="disabled" label="disabled">
|
||||
<option>Hidden</option>
|
||||
</optgroup>
|
||||
<optgroup label="Fruit">
|
||||
<option>Apple</option>
|
||||
<option>Orange</option>
|
||||
</optgroup>
|
||||
<optgroup label="Vegetable">
|
||||
<option>Corn</option>
|
||||
<option>Carrot</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
<hr>
|
||||
<select id="first-disabled2" class="selectpicker" multiple data-hide-disabled="true" data-size="5">
|
||||
<option>Apple</option>
|
||||
<option>Banana</option>
|
||||
<option>Orange</option>
|
||||
<option>Pineapple</option>
|
||||
<option>Apple2</option>
|
||||
<option>Banana2</option>
|
||||
<option>Orange2</option>
|
||||
<option>Pineapple2</option>
|
||||
<option>Apple2</option>
|
||||
<option>Banana2</option>
|
||||
<option>Orange2</option>
|
||||
<option>Pineapple2</option>
|
||||
</select>
|
||||
<button id="special" class="btn btn-default">Hide selected by disabling</button>
|
||||
<p>Just select 1st element, click button and check list again</p>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var mySelect = $('#first-disabled2');
|
||||
|
||||
$('#special').on('click', function () {
|
||||
mySelect.find('option:selected').attr('disabled', 'disabled');
|
||||
mySelect.selectpicker('refresh');
|
||||
});
|
||||
|
||||
var $basic2 = $('#basic2').selectpicker({
|
||||
liveSearch: true,
|
||||
maxOptions: 1
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "c3",
|
||||
"main": [
|
||||
"c3.css",
|
||||
"c3.js"
|
||||
],
|
||||
"version": "0.4.10",
|
||||
"homepage": "https://github.com/masayuki0812/c3",
|
||||
"authors": [
|
||||
"Masayuki Tanaka <masayuki0812@mac.com>"
|
||||
],
|
||||
"description": "D3-based reusable chart library",
|
||||
"keywords": [
|
||||
"chart",
|
||||
"d3"
|
||||
],
|
||||
"license": "MIT",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"htdocs",
|
||||
"spec",
|
||||
"src",
|
||||
"package.json",
|
||||
"component.json",
|
||||
"Gruntfile.*"
|
||||
],
|
||||
"dependencies": {
|
||||
"d3": "<=3.5.0"
|
||||
},
|
||||
"_release": "0.4.10",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "0.4.10",
|
||||
"commit": "e83d0e78fa0881dc57934edc74cac16f4c6e1523"
|
||||
},
|
||||
"_source": "git://github.com/masayuki0812/c3.git",
|
||||
"_target": "0.4.10",
|
||||
"_originalSource": "c3",
|
||||
"_direct": true
|
||||
}
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013 Masayuki Tanaka
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
c3 [](https://travis-ci.org/masayuki0812/c3) [](https://david-dm.org/masayuki0812/c3) [](https://david-dm.org/masayuki0812/c3#info=devDependencies) [](https://github.com/masayuki0812/c3/blob/master/LICENSE)
|
||||
==
|
||||
|
||||
c3 is a D3-based reusable chart library that enables deeper integration of charts into web applications.
|
||||
|
||||
Follow the link for more information: [http://c3js.org](http://c3js.org/)
|
||||
|
||||
## Tutorial and Examples
|
||||
|
||||
+ [Getting Started](http://c3js.org/gettingstarted.html)
|
||||
+ [Examples](http://c3js.org/examples.html)
|
||||
|
||||
Additional samples can be found in this repository:
|
||||
+ [https://github.com/masayuki0812/c3/tree/master/htdocs/samples](https://github.com/masayuki0812/c3/tree/master/htdocs/samples)
|
||||
|
||||
You can run these samples as:
|
||||
```
|
||||
$ cd c3/htdocs
|
||||
$ python -m SimpleHTTPServer 8080
|
||||
```
|
||||
|
||||
## Google Group
|
||||
For general C3.js-related discussion, please visit our [Google Group at https://groups.google.com/forum/#!forum/c3js](https://groups.google.com/forum/#!forum/c3js).
|
||||
|
||||
## Using the issue queue
|
||||
The [issue queue](https://github.com/masayuki0812/c3/issues) is to be used for reporting defects and problems with C3.js, in addition to feature requests and ideas. It is **not** a catch-all support forum. **For general support enquiries, please use the [Google Group](https://groups.google.com/forum/#!forum/c3js) at https://groups.google.com/forum/#!forum/c3js.** All questions involving the interplay between C3.js and any other library (such as AngularJS) should be posted there first!
|
||||
|
||||
Before reporting an issue, please do the following:
|
||||
1. [Search for existing issues](https://github.com/masayuki0812/c3/issues) to ensure you're not posting a duplicate.
|
||||
|
||||
1. [Search the Google Group](https://groups.google.com/forum/#!forum/c3js) to ensure it hasn't been addressed there already.
|
||||
|
||||
1. Create a JSFiddle or Plunkr highlighting the issue. Please don't include any unnecessary dependencies so we can isolate that the issue is in fact with C3. *Please be advised that custom CSS can modify C3.js output!*
|
||||
|
||||
1. When posting the issue, please use a descriptive title and include the version of C3 (or, if cloning from Git, the commit hash — C3 is under active development and the master branch contains the latest dev commits!), along with any platform/browser/OS information that may be relevant.
|
||||
|
||||
## Pull requests
|
||||
Pull requests are welcome, though please post an issue first to see whether such a change is desirable.
|
||||
If you choose to submit a pull request, please do not bump the version number unless asked to, and please include test cases for any new features!
|
||||
|
||||
## Playground
|
||||
Please fork this fiddle:
|
||||
+ [http://jsfiddle.net/masayuki0812/7kYJu/](http://jsfiddle.net/masayuki0812/7kYJu/)
|
||||
|
||||
## Dependency
|
||||
+ [D3.js](https://github.com/mbostock/d3) `<=3.5.0`
|
||||
|
||||
## License
|
||||
MIT
|
||||
|
||||
[](https://flattr.com/submit/auto?user_id=masayuki0812&url=https://github.com/masayuki0812/c3&title=c3&language=javascript&tags=github&category=software)
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "c3",
|
||||
"main": [
|
||||
"c3.css",
|
||||
"c3.js"
|
||||
],
|
||||
"version": "0.4.10",
|
||||
"homepage": "https://github.com/masayuki0812/c3",
|
||||
"authors": [
|
||||
"Masayuki Tanaka <masayuki0812@mac.com>"
|
||||
],
|
||||
"description": "D3-based reusable chart library",
|
||||
"keywords": [
|
||||
"chart",
|
||||
"d3"
|
||||
],
|
||||
"license": "MIT",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"htdocs",
|
||||
"spec",
|
||||
"src",
|
||||
"package.json",
|
||||
"component.json",
|
||||
"Gruntfile.*"
|
||||
],
|
||||
"dependencies": {
|
||||
"d3": "<=3.5.0"
|
||||
}
|
||||
}
|
||||
Vendored
+158
@@ -0,0 +1,158 @@
|
||||
/*-- Chart --*/
|
||||
.c3 svg {
|
||||
font: 10px sans-serif; }
|
||||
|
||||
.c3 path, .c3 line {
|
||||
fill: none;
|
||||
stroke: #000; }
|
||||
|
||||
.c3 text {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none; }
|
||||
|
||||
.c3-legend-item-tile, .c3-xgrid-focus, .c3-ygrid, .c3-event-rect, .c3-bars path {
|
||||
shape-rendering: crispEdges; }
|
||||
|
||||
.c3-chart-arc path {
|
||||
stroke: #fff; }
|
||||
|
||||
.c3-chart-arc text {
|
||||
fill: #fff;
|
||||
font-size: 13px; }
|
||||
|
||||
/*-- Axis --*/
|
||||
/*-- Grid --*/
|
||||
.c3-grid line {
|
||||
stroke: #aaa; }
|
||||
|
||||
.c3-grid text {
|
||||
fill: #aaa; }
|
||||
|
||||
.c3-xgrid, .c3-ygrid {
|
||||
stroke-dasharray: 3 3; }
|
||||
|
||||
/*-- Text on Chart --*/
|
||||
.c3-text.c3-empty {
|
||||
fill: #808080;
|
||||
font-size: 2em; }
|
||||
|
||||
/*-- Line --*/
|
||||
.c3-line {
|
||||
stroke-width: 1px; }
|
||||
|
||||
/*-- Point --*/
|
||||
.c3-circle._expanded_ {
|
||||
stroke-width: 1px;
|
||||
stroke: white; }
|
||||
|
||||
.c3-selected-circle {
|
||||
fill: white;
|
||||
stroke-width: 2px; }
|
||||
|
||||
/*-- Bar --*/
|
||||
.c3-bar {
|
||||
stroke-width: 0; }
|
||||
|
||||
.c3-bar._expanded_ {
|
||||
fill-opacity: 0.75; }
|
||||
|
||||
/*-- Focus --*/
|
||||
.c3-target.c3-focused {
|
||||
opacity: 1; }
|
||||
|
||||
.c3-target.c3-focused path.c3-line, .c3-target.c3-focused path.c3-step {
|
||||
stroke-width: 2px; }
|
||||
|
||||
.c3-target.c3-defocused {
|
||||
opacity: 0.3 !important; }
|
||||
|
||||
/*-- Region --*/
|
||||
.c3-region {
|
||||
fill: steelblue;
|
||||
fill-opacity: 0.1; }
|
||||
|
||||
/*-- Brush --*/
|
||||
.c3-brush .extent {
|
||||
fill-opacity: 0.1; }
|
||||
|
||||
/*-- Select - Drag --*/
|
||||
/*-- Legend --*/
|
||||
.c3-legend-item {
|
||||
font-size: 12px; }
|
||||
|
||||
.c3-legend-item-hidden {
|
||||
opacity: 0.15; }
|
||||
|
||||
.c3-legend-background {
|
||||
opacity: 0.75;
|
||||
fill: white;
|
||||
stroke: lightgray;
|
||||
stroke-width: 1; }
|
||||
|
||||
/*-- Tooltip --*/
|
||||
.c3-tooltip-container {
|
||||
z-index: 10; }
|
||||
|
||||
.c3-tooltip {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
background-color: #fff;
|
||||
empty-cells: show;
|
||||
-webkit-box-shadow: 7px 7px 12px -9px #777777;
|
||||
-moz-box-shadow: 7px 7px 12px -9px #777777;
|
||||
box-shadow: 7px 7px 12px -9px #777777;
|
||||
opacity: 0.9; }
|
||||
|
||||
.c3-tooltip tr {
|
||||
border: 1px solid #CCC; }
|
||||
|
||||
.c3-tooltip th {
|
||||
background-color: #aaa;
|
||||
font-size: 14px;
|
||||
padding: 2px 5px;
|
||||
text-align: left;
|
||||
color: #FFF; }
|
||||
|
||||
.c3-tooltip td {
|
||||
font-size: 13px;
|
||||
padding: 3px 6px;
|
||||
background-color: #fff;
|
||||
border-left: 1px dotted #999; }
|
||||
|
||||
.c3-tooltip td > span {
|
||||
display: inline-block;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
margin-right: 6px; }
|
||||
|
||||
.c3-tooltip td.value {
|
||||
text-align: right; }
|
||||
|
||||
/*-- Area --*/
|
||||
.c3-area {
|
||||
stroke-width: 0;
|
||||
opacity: 0.2; }
|
||||
|
||||
/*-- Arc --*/
|
||||
.c3-chart-arcs-title {
|
||||
dominant-baseline: middle;
|
||||
font-size: 1.3em; }
|
||||
|
||||
.c3-chart-arcs .c3-chart-arcs-background {
|
||||
fill: #e0e0e0;
|
||||
stroke: none; }
|
||||
|
||||
.c3-chart-arcs .c3-chart-arcs-gauge-unit {
|
||||
fill: #000;
|
||||
font-size: 16px; }
|
||||
|
||||
.c3-chart-arcs .c3-chart-arcs-gauge-max {
|
||||
fill: #777; }
|
||||
|
||||
.c3-chart-arcs .c3-chart-arcs-gauge-min {
|
||||
fill: #777; }
|
||||
|
||||
.c3-chart-arc .c3-gauge-value {
|
||||
fill: #000;
|
||||
/* font-size: 28px !important;*/ }
|
||||
Vendored
+7049
File diff suppressed because it is too large
Load Diff
+1
@@ -0,0 +1 @@
|
||||
.c3 svg{font:10px sans-serif}.c3 line,.c3 path{fill:none;stroke:#000}.c3 text{-webkit-user-select:none;-moz-user-select:none;user-select:none}.c3-bars path,.c3-event-rect,.c3-legend-item-tile,.c3-xgrid-focus,.c3-ygrid{shape-rendering:crispEdges}.c3-chart-arc path{stroke:#fff}.c3-chart-arc text{fill:#fff;font-size:13px}.c3-grid line{stroke:#aaa}.c3-grid text{fill:#aaa}.c3-xgrid,.c3-ygrid{stroke-dasharray:3 3}.c3-text.c3-empty{fill:gray;font-size:2em}.c3-line{stroke-width:1px}.c3-circle._expanded_{stroke-width:1px;stroke:#fff}.c3-selected-circle{fill:#fff;stroke-width:2px}.c3-bar{stroke-width:0}.c3-bar._expanded_{fill-opacity:.75}.c3-target.c3-focused{opacity:1}.c3-target.c3-focused path.c3-line,.c3-target.c3-focused path.c3-step{stroke-width:2px}.c3-target.c3-defocused{opacity:.3!important}.c3-region{fill:#4682b4;fill-opacity:.1}.c3-brush .extent{fill-opacity:.1}.c3-legend-item{font-size:12px}.c3-legend-item-hidden{opacity:.15}.c3-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.c3-tooltip-container{z-index:10}.c3-tooltip{border-collapse:collapse;border-spacing:0;background-color:#fff;empty-cells:show;-webkit-box-shadow:7px 7px 12px -9px #777;-moz-box-shadow:7px 7px 12px -9px #777;box-shadow:7px 7px 12px -9px #777;opacity:.9}.c3-tooltip tr{border:1px solid #CCC}.c3-tooltip th{background-color:#aaa;font-size:14px;padding:2px 5px;text-align:left;color:#FFF}.c3-tooltip td{font-size:13px;padding:3px 6px;background-color:#fff;border-left:1px dotted #999}.c3-tooltip td>span{display:inline-block;width:10px;height:10px;margin-right:6px}.c3-tooltip td.value{text-align:right}.c3-area{stroke-width:0;opacity:.2}.c3-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}.c3-chart-arcs .c3-chart-arcs-background{fill:#e0e0e0;stroke:none}.c3-chart-arcs .c3-chart-arcs-gauge-unit{fill:#000;font-size:16px}.c3-chart-arcs .c3-chart-arcs-gauge-max,.c3-chart-arcs .c3-chart-arcs-gauge-min{fill:#777}.c3-chart-arc .c3-gauge-value{fill:#000}
|
||||
+5
File diff suppressed because one or more lines are too long
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"js": [
|
||||
"../../bower_components/d3/d3.min.js",
|
||||
"../../c3.min.js"
|
||||
],
|
||||
"css": [
|
||||
"../../c3.css"
|
||||
],
|
||||
|
||||
"template": "<html><head><meta charset=\"utf-8\"><style>{0}</style></head><body><div id=\"chart\"></div></body></html>"
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
/**
|
||||
* PNG\JPEG exporter for C3.js, version 0.2
|
||||
* (c) 2014 Yuval Bar-On
|
||||
*
|
||||
* usage: path/to/phantomjs output options [WxH]
|
||||
*
|
||||
*/
|
||||
|
||||
// useful python-styled string formatting, "hello {0}! Javascript is {1}".format("world", "awesome");
|
||||
if (!String.prototype.format) {
|
||||
String.prototype.format = function() {
|
||||
var args = arguments;
|
||||
return this.replace(/{(\d+)}/g, function(match, number) {
|
||||
return typeof args[number] != 'undefined'
|
||||
? args[number]
|
||||
: match
|
||||
;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
// defaults
|
||||
var page = require('webpage').create(),
|
||||
fs = require('fs'),
|
||||
system = require('system'),
|
||||
config = JSON.parse( fs.read('config.json') ),
|
||||
output, size;
|
||||
|
||||
if (system.args.length < 3 ) {
|
||||
console.log('Usage: phantasm.js filename html [WxH]');
|
||||
phantom.exit(1);
|
||||
} else {
|
||||
out = system.args[1];
|
||||
opts = JSON.parse( system.args[2] );
|
||||
|
||||
if (system.args[3]) {
|
||||
var dimensions = system.args[3].split('x'),
|
||||
width = dimensions[0],
|
||||
height = dimensions[1];
|
||||
|
||||
function checkNum(check) {
|
||||
check = parseInt(check);
|
||||
if (!isNaN(check))
|
||||
return check;
|
||||
return false;
|
||||
}
|
||||
|
||||
width = checkNum(width);
|
||||
height = checkNum(height);
|
||||
|
||||
if (width && height) {
|
||||
page.viewportSize = {
|
||||
height: height,
|
||||
width: width
|
||||
}
|
||||
}
|
||||
|
||||
// fit chart size to img size, if undefined
|
||||
if (!opts.size) {
|
||||
opts.size = {
|
||||
"height": height,
|
||||
"width": width
|
||||
};
|
||||
}
|
||||
} else {
|
||||
// check if size is defined in chart,
|
||||
// else apply defaults
|
||||
page.viewportSize = {
|
||||
height: (opts.size && opts.size.height) ? opts.size.height : 320,
|
||||
width: (opts.size && opts.size.width ) ? opts.size.width : 710,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
page.onResourceRequested = function(requestData, request) {
|
||||
console.log('::loading resource ', requestData['url']);
|
||||
};
|
||||
|
||||
// helpful debug functions
|
||||
page.onConsoleMessage = function(msg){
|
||||
console.log(msg);
|
||||
};
|
||||
|
||||
page.onError = function(msg, trace) {
|
||||
var msgStack = ['ERROR: ' + msg];
|
||||
|
||||
if (trace && trace.length) {
|
||||
msgStack.push('TRACE:');
|
||||
trace.forEach(function(t) {
|
||||
msgStack.push(' -> ' + t.file + ': ' + t.line + (t.function ? ' (in function "' + t.function +'")' : ''));
|
||||
});
|
||||
}
|
||||
|
||||
console.error(msgStack.join('\n'));
|
||||
};
|
||||
|
||||
// render page
|
||||
function injectVerify(script) {
|
||||
var req = page.injectJs(script);
|
||||
if (!req) {
|
||||
console.log( '\nError!\n' + script + ' not found!\n' );
|
||||
phantom.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
page.onLoadFinished = function() {
|
||||
console.log('::rendering');
|
||||
|
||||
for (var j in config.js) {
|
||||
injectVerify(config.js[j]);
|
||||
}
|
||||
|
||||
page.evaluate(function(chartoptions) {
|
||||
// phantomjs doesn't know how to handle .bind, so we override
|
||||
Function.prototype.bind = Function.prototype.bind || function (thisp) {
|
||||
var fn = this;
|
||||
return function () {
|
||||
return fn.apply(thisp, arguments);
|
||||
};
|
||||
};
|
||||
|
||||
// generate chart
|
||||
c3.generate(chartoptions);
|
||||
|
||||
}, opts);
|
||||
|
||||
// setting transition to 0 has proven not to work thus far, but 300ms isn't much
|
||||
// so this is acceptable for now
|
||||
setTimeout(function() {
|
||||
page.render(out);
|
||||
phantom.exit();
|
||||
}, 300);
|
||||
}
|
||||
|
||||
// apply css inline because that usually renders better
|
||||
var css = '';
|
||||
for (var i in config.css) {
|
||||
css += fs.read(config.css[i]);
|
||||
}
|
||||
page.content = config.template.format(css);
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
+380
@@ -0,0 +1,380 @@
|
||||
var c3ext = {};
|
||||
c3ext.generate = function (options) {
|
||||
|
||||
if (options.zoom2 != null) {
|
||||
zoom2_reducers = options.zoom2.reducers || {};
|
||||
zoom2_enabled = options.zoom2.enabled;
|
||||
_zoom2_factor = options.zoom2.factor || 1;
|
||||
_zoom2_maxItems = options.zoom2.maxItems;
|
||||
}
|
||||
|
||||
if (!zoom2_enabled) {
|
||||
return c3.generate(options);
|
||||
}
|
||||
|
||||
|
||||
var originalData = Q.copy(options.data);
|
||||
var zoom2_reducers;
|
||||
var zoom2_enabled;
|
||||
var _zoom2_maxItems;
|
||||
|
||||
if (_zoom2_maxItems == null) {
|
||||
var el = d3.select(options.bindto)[0][0];
|
||||
if (el != null) {
|
||||
var availWidth = el.clientWidth;
|
||||
|
||||
var pointSize = 20;
|
||||
_zoom2_maxItems = Math.ceil(availWidth / pointSize);
|
||||
}
|
||||
if (_zoom2_maxItems == null || _zoom2_maxItems < 10) {
|
||||
_zoom2_maxItems = 10;
|
||||
}
|
||||
}
|
||||
|
||||
function onZoomChanged(e) {
|
||||
refresh();
|
||||
}
|
||||
|
||||
var zoom2 = c3ext.ZoomBehavior({ changed: onZoomChanged, bindto: options.bindto });
|
||||
|
||||
zoom2.enhance = function () {
|
||||
_zoom2_maxItems *= 2;
|
||||
var totalItems = zoom2.getZoom().totalItems;
|
||||
if (_zoom2_maxItems > totalItems)
|
||||
_zoom2_maxItems = totalItems;
|
||||
refresh();
|
||||
}
|
||||
zoom2.dehance = function () {
|
||||
_zoom2_maxItems = Math.ceil(_zoom2_maxItems / 2) + 1;
|
||||
refresh();
|
||||
}
|
||||
|
||||
zoom2.maxItems = function () { return _zoom2_maxItems; };
|
||||
function zoomAndReduceData(list, zoomRange, func, maxItems) {
|
||||
//var maxItems = 10;//Math.ceil(10 * zoomFactor);
|
||||
var list2 = list.slice(zoomRange[0], zoomRange[1]);
|
||||
var chunkSize = 1;
|
||||
var list3 = list2;
|
||||
if (list3.length > maxItems) {
|
||||
var chunkSize = Math.ceil(list2.length / maxItems);
|
||||
list3 = list3.splitIntoChunksOf(chunkSize).map(func);
|
||||
}
|
||||
//console.log("x" + getCurrentZoomLevel() + ", maxItems=" + maxItems + " chunkSize=" + chunkSize + " totalBefore=" + list2.length + ", totalAfter=" + list3.length);
|
||||
return list3;
|
||||
}
|
||||
|
||||
function first(t) { return t[0]; }
|
||||
|
||||
var getDataForZoom = function (data) {
|
||||
if (data.columns == null || data.columns.length == 0)
|
||||
return;
|
||||
|
||||
var zoomInfo = zoom2.getZoom();
|
||||
if (zoomInfo.totalItems != data.columns[0].length - 1) {
|
||||
zoom2.setOptions({ totalItems: data.columns[0].length - 1 });
|
||||
zoomInfo = zoom2.getZoom();
|
||||
}
|
||||
data.columns = originalData.columns.map(function (column) {
|
||||
var name = column[0];
|
||||
var reducer = zoom2_reducers[name] || first; //by default take the first
|
||||
|
||||
var values = column.slice(1);
|
||||
var newValues = zoomAndReduceData(values, zoomInfo.currentZoom, reducer, _zoom2_maxItems);
|
||||
return [name].concat(newValues);
|
||||
});
|
||||
return data;
|
||||
};
|
||||
|
||||
getDataForZoom(options.data);
|
||||
var chart = c3.generate(options);
|
||||
var _chart_load_org = chart.load.bind(chart);
|
||||
chart.zoom2 = zoom2;
|
||||
chart.load = function (data) {
|
||||
if (data.unload) {
|
||||
unload(data.unload);
|
||||
delete data.unload;
|
||||
}
|
||||
Q.copy(data, originalData);
|
||||
refresh();
|
||||
}
|
||||
chart.unload = function (names) {
|
||||
unload(names);
|
||||
refresh();
|
||||
}
|
||||
|
||||
function unload(names) {
|
||||
originalData.columns.removeAll(function (t) { names.contains(t); });
|
||||
}
|
||||
|
||||
|
||||
function refresh() {
|
||||
var data = Q.copy(originalData)
|
||||
getDataForZoom(data);
|
||||
_chart_load_org(data);
|
||||
};
|
||||
|
||||
|
||||
return chart;
|
||||
}
|
||||
|
||||
c3ext.ZoomBehavior = function (options) {
|
||||
var zoom = { __type: "ZoomBehavior" };
|
||||
|
||||
var _zoom2_factor;
|
||||
var _left;
|
||||
var totalItems;
|
||||
var currentZoom;
|
||||
var bindto = options.bindto;
|
||||
var _zoomChanged = options.changed || function () { };
|
||||
var element;
|
||||
var mousewheelTimer;
|
||||
var deltaY = 0;
|
||||
var leftRatio = 0;
|
||||
|
||||
|
||||
zoom.setOptions = function (options) {
|
||||
if (options == null)
|
||||
options = {};
|
||||
_zoom2_factor = options.factor || 1;
|
||||
_left = 0;
|
||||
totalItems = options.totalItems || 0;
|
||||
currentZoom = [0, totalItems];
|
||||
_zoomChanged = options.changed || _zoomChanged;
|
||||
}
|
||||
|
||||
zoom.setOptions(options);
|
||||
|
||||
|
||||
function verifyZoom(newZoom) {
|
||||
//newZoom.sort();
|
||||
if (newZoom[1] > totalItems) {
|
||||
var diff = newZoom[1] - totalItems;
|
||||
newZoom[0] -= diff;
|
||||
newZoom[1] -= diff;
|
||||
}
|
||||
if (newZoom[0] < 0) {
|
||||
var diff = newZoom[0] * -1;
|
||||
newZoom[0] += diff;
|
||||
newZoom[1] += diff;
|
||||
}
|
||||
if (newZoom[1] > totalItems)
|
||||
newZoom[1] = totalItems;
|
||||
if (newZoom[0] < 0)
|
||||
newZoom[0] = 0;
|
||||
}
|
||||
|
||||
function zoomAndPan(zoomFactor, left) {
|
||||
var itemsToShow = Math.ceil(totalItems / zoomFactor);
|
||||
var newZoom = [left, left + itemsToShow];
|
||||
verifyZoom(newZoom);
|
||||
currentZoom = newZoom;
|
||||
onZoomChanged();
|
||||
}
|
||||
|
||||
function onZoomChanged() {
|
||||
if (_zoomChanged != null)
|
||||
_zoomChanged(zoom.getZoom());
|
||||
}
|
||||
function applyZoomAndPan() {
|
||||
zoomAndPan(_zoom2_factor, _left);
|
||||
}
|
||||
function getItemsToShow() {
|
||||
var itemsToShow = Math.ceil(totalItems / _zoom2_factor);
|
||||
return itemsToShow;
|
||||
}
|
||||
|
||||
|
||||
zoom.getZoom = function () {
|
||||
return { totalItems: totalItems, currentZoom: currentZoom.slice() };
|
||||
}
|
||||
|
||||
zoom.factor = function (factor, skipDraw) {
|
||||
if (arguments.length == 0)
|
||||
return _zoom2_factor;
|
||||
_zoom2_factor = factor;
|
||||
if (_zoom2_factor < 1)
|
||||
_zoom2_factor = 1;
|
||||
if (skipDraw)
|
||||
return;
|
||||
applyZoomAndPan();
|
||||
}
|
||||
zoom.left = function (left, skipDraw) {
|
||||
if (arguments.length == 0)
|
||||
return _left;
|
||||
_left = left;
|
||||
if (_left < 0)
|
||||
_left = 0;
|
||||
var pageSize = getItemsToShow();
|
||||
//_left += pageSize;
|
||||
if (_left + pageSize > totalItems)
|
||||
_left = totalItems - pageSize;
|
||||
console.log({ left: _left, pageSize: pageSize });
|
||||
if (skipDraw)
|
||||
return;
|
||||
applyZoomAndPan();
|
||||
}
|
||||
|
||||
zoom.zoomAndPanByRatio = function (zoomRatio, panRatio) {
|
||||
|
||||
var pageSize = getItemsToShow();
|
||||
var leftOffset = Math.round(pageSize * panRatio);
|
||||
var mouseLeft = _left + leftOffset;
|
||||
zoom.factor(zoom.factor() * zoomRatio, true);
|
||||
|
||||
var finalLeft = mouseLeft;
|
||||
if (zoomRatio != 1) {
|
||||
var pageSize2 = getItemsToShow();
|
||||
var leftOffset2 = Math.round(pageSize2 * panRatio);
|
||||
finalLeft = mouseLeft - leftOffset2;
|
||||
}
|
||||
zoom.left(finalLeft, true);
|
||||
applyZoomAndPan();
|
||||
}
|
||||
|
||||
zoom.zoomIn = function () {
|
||||
zoom.zoomAndPanByRatio(2, 0);
|
||||
}
|
||||
|
||||
zoom.zoomOut = function () {
|
||||
zoom.zoomAndPanByRatio(0.5, 0);
|
||||
}
|
||||
|
||||
zoom.panLeft = function () {
|
||||
zoom.zoomAndPanByRatio(1, -1);
|
||||
}
|
||||
zoom.panRight = function () {
|
||||
zoom.zoomAndPanByRatio(1, 1);
|
||||
}
|
||||
|
||||
zoom.reset = function () {
|
||||
_left = 0;
|
||||
_zoom2_factor = 1;
|
||||
applyZoomAndPan();
|
||||
}
|
||||
|
||||
function doZoom() {
|
||||
if (deltaY != 0) {
|
||||
var maxDelta = 10;
|
||||
var multiply = (maxDelta + deltaY) / maxDelta;
|
||||
//var factor = chart.zoom2.factor()*multiply;
|
||||
//factor= Math.ceil(factor*100) / 100;
|
||||
console.log({ deltaY: deltaY, multiply: multiply });
|
||||
zoom.zoomAndPanByRatio(multiply, leftRatio);//0.5);//leftRatio);
|
||||
deltaY = 0;
|
||||
}
|
||||
}
|
||||
|
||||
function element_mousewheel(e) {
|
||||
deltaY += e.deltaY;
|
||||
leftRatio = (e.offsetX - 70) / (e.currentTarget.offsetWidth - 70);
|
||||
//console.log({ "e.offsetX": e.offsetX, "e.currentTarget.offsetWidth": e.currentTarget.offsetWidth, leftRatio: leftRatio });
|
||||
mousewheelTimer.set(150);
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
if (bindto != null) {
|
||||
element = $(options.bindto);
|
||||
if (element.mousewheel) {
|
||||
mousewheelTimer = new Timer(doZoom);
|
||||
element.mousewheel(element_mousewheel);
|
||||
}
|
||||
}
|
||||
|
||||
return zoom;
|
||||
|
||||
}
|
||||
|
||||
if (typeof (Q) == "undefined") {
|
||||
var Q = function () {
|
||||
};
|
||||
|
||||
Q.copy = function (src, target, options, depth) {
|
||||
///<summary>Copies an object into a target object, recursively cloning any object or array in the way, overwrite=true will overwrite a primitive field value even if exists</summary>
|
||||
///<param name="src" />
|
||||
///<param name="target" />
|
||||
///<param name="options" type="Object">{ overwrite:false }</param>
|
||||
///<returns type="Object">The copied object</returns>
|
||||
if (depth == null)
|
||||
depth = 0;
|
||||
if (depth == 100) {
|
||||
console.warn("Q.copy is in depth of 100 - possible circular reference")
|
||||
}
|
||||
options = options || { overwrite: false };
|
||||
if (src == target || src == null)
|
||||
return target;
|
||||
if (typeof (src) != "object") {
|
||||
if (options.overwrite || target == null)
|
||||
return src;
|
||||
return target;
|
||||
}
|
||||
if (typeof (src.clone) == "function") {
|
||||
if (options.overwrite || target == null)
|
||||
return src.clone();
|
||||
return target;
|
||||
}
|
||||
if (target == null) {
|
||||
if (src instanceof Array)
|
||||
target = [];
|
||||
else
|
||||
target = {};
|
||||
}
|
||||
|
||||
if (src instanceof Array) {
|
||||
for (var i = 0; i < src.length; i++) {
|
||||
var item = src[i];
|
||||
var item2 = target[i];
|
||||
item2 = Q.copy(item, item2, options, depth + 1);
|
||||
target[i] = item2;
|
||||
}
|
||||
target.splice(src.length, target.length - src.length);
|
||||
return target;
|
||||
}
|
||||
for (var p in src) {
|
||||
var value = src[p];
|
||||
var value2 = target[p];
|
||||
value2 = Q.copy(value, value2, options, depth + 1);
|
||||
target[p] = value2;
|
||||
}
|
||||
return target;
|
||||
}
|
||||
}
|
||||
if (typeof (Timer) == "undefined") {
|
||||
var Timer = function (action, ms) {
|
||||
this.action = action;
|
||||
if (ms != null)
|
||||
this.set(ms);
|
||||
}
|
||||
|
||||
Timer.prototype.set = function (ms) {
|
||||
if (ms == null)
|
||||
ms = this._ms;
|
||||
else
|
||||
this._ms = ms;
|
||||
this.clear();
|
||||
if (ms == null)
|
||||
return;
|
||||
this.timeout = window.setTimeout(this.onTick.bind(this), ms);
|
||||
}
|
||||
|
||||
Timer.prototype.onTick = function () {
|
||||
this.clear();
|
||||
this.action();
|
||||
}
|
||||
|
||||
Timer.prototype.clear = function (ms) {
|
||||
if (this.timeout == null)
|
||||
return;
|
||||
window.clearTimeout(this.timeout);
|
||||
this.timeout = null;
|
||||
}
|
||||
}
|
||||
if (typeof(Array.prototype.splitIntoChunksOf)=="undefined") {
|
||||
Array.prototype.splitIntoChunksOf = function (countInEachChunk) {
|
||||
var chunks = Math.ceil(this.length / countInEachChunk);
|
||||
var list = [];
|
||||
for (var i = 0; i < this.length; i += countInEachChunk) {
|
||||
list.push(this.slice(i, i + countInEachChunk));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
+7
-6
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "d3",
|
||||
"version": "3.3.13",
|
||||
"version": "3.5.0",
|
||||
"main": "d3.js",
|
||||
"scripts": [
|
||||
"d3.js"
|
||||
@@ -10,11 +10,12 @@
|
||||
".git",
|
||||
".gitignore",
|
||||
".npmignore",
|
||||
".spmignore",
|
||||
".travis.yml",
|
||||
"Makefile",
|
||||
"bin",
|
||||
"component.json",
|
||||
"index-browserify.js",
|
||||
"composer.json",
|
||||
"index.js",
|
||||
"lib",
|
||||
"node_modules",
|
||||
@@ -23,14 +24,14 @@
|
||||
"test"
|
||||
],
|
||||
"homepage": "https://github.com/mbostock/d3",
|
||||
"_release": "3.3.13",
|
||||
"_release": "3.5.0",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v3.3.13",
|
||||
"commit": "fe09f453a8e1c93891cde2d1067b7334ab692f9c"
|
||||
"tag": "v3.5.0",
|
||||
"commit": "bf5ec9a888a5a6bce514d7042d6df29e590e391e"
|
||||
},
|
||||
"_source": "git://github.com/mbostock/d3.git",
|
||||
"_target": "3.3.13",
|
||||
"_target": "3.5.0",
|
||||
"_originalSource": "d3",
|
||||
"_direct": true
|
||||
}
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
Copyright (c) 2013, Michael Bostock
|
||||
Copyright (c) 2010-2014, Michael Bostock
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
||||
+3
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "d3",
|
||||
"version": "3.3.13",
|
||||
"version": "3.5.0",
|
||||
"main": "d3.js",
|
||||
"scripts": [
|
||||
"d3.js"
|
||||
@@ -10,11 +10,12 @@
|
||||
".git",
|
||||
".gitignore",
|
||||
".npmignore",
|
||||
".spmignore",
|
||||
".travis.yml",
|
||||
"Makefile",
|
||||
"bin",
|
||||
"component.json",
|
||||
"index-browserify.js",
|
||||
"composer.json",
|
||||
"index.js",
|
||||
"lib",
|
||||
"node_modules",
|
||||
|
||||
Vendored
+1620
-1487
File diff suppressed because it is too large
Load Diff
+5
-5
File diff suppressed because one or more lines are too long
+4
-4
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jquery-ui",
|
||||
"version": "1.11.2",
|
||||
"version": "1.11.4",
|
||||
"main": [
|
||||
"jquery-ui.js"
|
||||
],
|
||||
@@ -9,11 +9,11 @@
|
||||
"jquery": ">=1.6"
|
||||
},
|
||||
"homepage": "https://github.com/components/jqueryui",
|
||||
"_release": "1.11.2",
|
||||
"_release": "1.11.4",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.11.2",
|
||||
"commit": "396781474d936959061271505f506b78398fe6a2"
|
||||
"tag": "1.11.4",
|
||||
"commit": "c34f8dbf3ba57b3784b93f26119f436c0e8288e1"
|
||||
},
|
||||
"_source": "git://github.com/components/jqueryui.git",
|
||||
"_target": "1.11",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jquery-ui",
|
||||
"version": "1.11.2",
|
||||
"version": "1.11.4",
|
||||
"main": [
|
||||
"jquery-ui.js"
|
||||
],
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "jquery-ui",
|
||||
"repo": "components/jqueryui",
|
||||
"version": "1.11.2",
|
||||
"version": "1.11.4",
|
||||
"license": "MIT",
|
||||
"scripts": [
|
||||
"jquery-ui.js"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user