From 70cc5ac2bc18edba3402034b2d860c3f8e7f523d Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Wed, 29 Oct 2014 11:45:30 +0100 Subject: [PATCH] Few fixes. --- .../bootstrap-select/.bower.json | 17 +- .../bootstrap-select/CONTRIBUTING.md | 49 +- .../bootstrap-select/Gruntfile.js | 212 ++++ .../bower_components/bootstrap-select/LICENSE | 21 + .../bootstrap-select/README.md | 37 +- .../bootstrap-select/bootstrap-select.css | 309 ----- .../bootstrap-select.jquery.json | 54 +- .../bootstrap-select/bootstrap-select.js | 972 ---------------- .../bootstrap-select/bootstrap-select.min.css | 7 - .../bootstrap-select/bootstrap-select.min.js | 8 - .../bootstrap-select/bower.json | 9 +- .../bootstrap-select/composer.json | 28 +- .../dist/css/bootstrap-select.css | 269 +++++ .../dist/css/bootstrap-select.css.map | 1 + .../dist/css/bootstrap-select.min.css | 6 + .../dist/js/bootstrap-select.js | 1030 +++++++++++++++++ .../dist/js/bootstrap-select.js.map | 1 + .../dist/js/bootstrap-select.min.js | 8 + .../dist/js/i18n/defaults-cs_CZ.js | 15 + .../dist/js/i18n/defaults-cs_CZ.min.js | 7 + .../dist/js/i18n/defaults-de_DE.js | 15 + .../dist/js/i18n/defaults-de_DE.min.js | 7 + .../dist/js/i18n/defaults-en_US.js | 15 + .../dist/js/i18n/defaults-en_US.min.js | 7 + .../dist/js/i18n/defaults-es_CL.js | 15 + .../dist/js/i18n/defaults-es_CL.min.js | 7 + .../dist/js/i18n/defaults-eu.js | 15 + .../dist/js/i18n/defaults-eu.min.js | 7 + .../dist/js/i18n/defaults-fr_FR.js | 15 + .../dist/js/i18n/defaults-fr_FR.min.js | 7 + .../dist/js/i18n/defaults-it_IT.js | 15 + .../dist/js/i18n/defaults-it_IT.min.js | 7 + .../dist/js/i18n/defaults-nl_NL.js | 15 + .../dist/js/i18n/defaults-nl_NL.min.js | 7 + .../dist/js/i18n/defaults-pl_PL.js | 15 + .../dist/js/i18n/defaults-pl_PL.min.js | 7 + .../dist/js/i18n/defaults-pt_BR.js | 15 + .../dist/js/i18n/defaults-pt_BR.min.js | 7 + .../dist/js/i18n/defaults-ru_RU.js | 15 + .../dist/js/i18n/defaults-ru_RU.min.js | 7 + .../dist/js/i18n/defaults-zh_CN.js | 15 + .../dist/js/i18n/defaults-zh_CN.min.js | 7 + .../bootstrap-select/i18n/defaults-cs-CZ.js | 29 - .../i18n/defaults-cz-CZ.min.js | 6 - .../bootstrap-select/i18n/defaults-de_DE.js | 29 - .../i18n/defaults-de_DE.min.js | 6 - .../bootstrap-select/i18n/defaults-es-CL.js | 29 - .../i18n/defaults-es-CL.min.js | 6 - .../bootstrap-select/i18n/defaults-eu.js | 30 - .../bootstrap-select/i18n/defaults-eu.min.js | 6 - .../bootstrap-select/i18n/defaults-it_IT.js | 32 - .../i18n/defaults-it_IT.min.js | 1 - .../bootstrap-select/i18n/defaults-nl_NL.js | 32 - .../i18n/defaults-nl_NL.min.js | 7 - .../bootstrap-select/i18n/defaults-pl_PL.js | 29 - .../i18n/defaults-pl_PL.min.js | 6 - .../bootstrap-select/i18n/defaults-pt_BR.js | 33 - .../i18n/defaults-pt_BR.min.js | 7 - .../bootstrap-select/i18n/defaults-ru-RU.js | 31 - .../i18n/defaults-ru_RU.min.js | 6 - .../bootstrap-select/i18n/defaults-zh_CN.js | 30 - .../i18n/defaults-zh_CN.min.js | 6 - .../bootstrap-select/js/bootstrap-select.js | 1024 ++++++++++++++++ .../js/i18n/defaults-cs_CZ.js | 14 + .../js/i18n/defaults-de_DE.js | 14 + .../js/i18n/defaults-en_US.js | 14 + .../js/i18n/defaults-es_CL.js | 14 + .../bootstrap-select/js/i18n/defaults-eu.js | 14 + .../js/i18n/defaults-fr_FR.js | 14 + .../js/i18n/defaults-it_IT.js | 15 + .../js/i18n/defaults-nl_NL.js | 15 + .../js/i18n/defaults-pl_PL.js | 14 + .../js/i18n/defaults-pt_BR.js | 15 + .../js/i18n/defaults-ru_RU.js | 14 + .../js/i18n/defaults-zh_CN.js | 14 + .../less/bootstrap-select.less | 331 ++++++ .../bootstrap-select/package.json | 94 +- .../bootstrap-select/test.html | 102 +- modoboa/core/dev_settings.py | 2 +- .../templates/radicale/calendar_detail.html | 10 + .../templates/radicale/calendars.html | 1 - .../templates/radicale/calendars_page.html | 3 +- .../radicale/templatetags/radicale_tags.py | 39 +- modoboa/extensions/radicale/urls.py | 4 + modoboa/extensions/radicale/views.py | 43 +- modoboa/extensions/webmail/lib/imaputils.py | 4 +- .../webmail/static/webmail/js/webmail.js | 11 +- modoboa/static/js/global.js | 2 +- modoboa/templates/nlayout.html | 4 +- 89 files changed, 3660 insertions(+), 1848 deletions(-) create mode 100644 modoboa/bower_components/bootstrap-select/Gruntfile.js create mode 100644 modoboa/bower_components/bootstrap-select/LICENSE delete mode 100644 modoboa/bower_components/bootstrap-select/bootstrap-select.css delete mode 100644 modoboa/bower_components/bootstrap-select/bootstrap-select.js delete mode 100644 modoboa/bower_components/bootstrap-select/bootstrap-select.min.css delete mode 100644 modoboa/bower_components/bootstrap-select/bootstrap-select.min.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/css/bootstrap-select.css create mode 100644 modoboa/bower_components/bootstrap-select/dist/css/bootstrap-select.css.map create mode 100644 modoboa/bower_components/bootstrap-select/dist/css/bootstrap-select.min.css create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/bootstrap-select.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/bootstrap-select.js.map create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/bootstrap-select.min.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-cs_CZ.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-cs_CZ.min.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-de_DE.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-de_DE.min.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-en_US.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-en_US.min.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-es_CL.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-es_CL.min.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-eu.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-eu.min.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-fr_FR.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-fr_FR.min.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-it_IT.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-it_IT.min.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-nl_NL.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-nl_NL.min.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-pl_PL.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-pl_PL.min.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-pt_BR.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-pt_BR.min.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-ru_RU.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-ru_RU.min.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-zh_CN.js create mode 100644 modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-zh_CN.min.js delete mode 100644 modoboa/bower_components/bootstrap-select/i18n/defaults-cs-CZ.js delete mode 100644 modoboa/bower_components/bootstrap-select/i18n/defaults-cz-CZ.min.js delete mode 100644 modoboa/bower_components/bootstrap-select/i18n/defaults-de_DE.js delete mode 100644 modoboa/bower_components/bootstrap-select/i18n/defaults-de_DE.min.js delete mode 100644 modoboa/bower_components/bootstrap-select/i18n/defaults-es-CL.js delete mode 100644 modoboa/bower_components/bootstrap-select/i18n/defaults-es-CL.min.js delete mode 100644 modoboa/bower_components/bootstrap-select/i18n/defaults-eu.js delete mode 100644 modoboa/bower_components/bootstrap-select/i18n/defaults-eu.min.js delete mode 100644 modoboa/bower_components/bootstrap-select/i18n/defaults-it_IT.js delete mode 100644 modoboa/bower_components/bootstrap-select/i18n/defaults-it_IT.min.js delete mode 100644 modoboa/bower_components/bootstrap-select/i18n/defaults-nl_NL.js delete mode 100644 modoboa/bower_components/bootstrap-select/i18n/defaults-nl_NL.min.js delete mode 100644 modoboa/bower_components/bootstrap-select/i18n/defaults-pl_PL.js delete mode 100644 modoboa/bower_components/bootstrap-select/i18n/defaults-pl_PL.min.js delete mode 100644 modoboa/bower_components/bootstrap-select/i18n/defaults-pt_BR.js delete mode 100644 modoboa/bower_components/bootstrap-select/i18n/defaults-pt_BR.min.js delete mode 100644 modoboa/bower_components/bootstrap-select/i18n/defaults-ru-RU.js delete mode 100644 modoboa/bower_components/bootstrap-select/i18n/defaults-ru_RU.min.js delete mode 100644 modoboa/bower_components/bootstrap-select/i18n/defaults-zh_CN.js delete mode 100644 modoboa/bower_components/bootstrap-select/i18n/defaults-zh_CN.min.js create mode 100644 modoboa/bower_components/bootstrap-select/js/bootstrap-select.js create mode 100644 modoboa/bower_components/bootstrap-select/js/i18n/defaults-cs_CZ.js create mode 100644 modoboa/bower_components/bootstrap-select/js/i18n/defaults-de_DE.js create mode 100644 modoboa/bower_components/bootstrap-select/js/i18n/defaults-en_US.js create mode 100644 modoboa/bower_components/bootstrap-select/js/i18n/defaults-es_CL.js create mode 100644 modoboa/bower_components/bootstrap-select/js/i18n/defaults-eu.js create mode 100644 modoboa/bower_components/bootstrap-select/js/i18n/defaults-fr_FR.js create mode 100644 modoboa/bower_components/bootstrap-select/js/i18n/defaults-it_IT.js create mode 100644 modoboa/bower_components/bootstrap-select/js/i18n/defaults-nl_NL.js create mode 100644 modoboa/bower_components/bootstrap-select/js/i18n/defaults-pl_PL.js create mode 100644 modoboa/bower_components/bootstrap-select/js/i18n/defaults-pt_BR.js create mode 100644 modoboa/bower_components/bootstrap-select/js/i18n/defaults-ru_RU.js create mode 100644 modoboa/bower_components/bootstrap-select/js/i18n/defaults-zh_CN.js create mode 100644 modoboa/bower_components/bootstrap-select/less/bootstrap-select.less create mode 100644 modoboa/extensions/radicale/templates/radicale/calendar_detail.html diff --git a/modoboa/bower_components/bootstrap-select/.bower.json b/modoboa/bower_components/bootstrap-select/.bower.json index 3f255e9fd..57659a23c 100644 --- a/modoboa/bower_components/bootstrap-select/.bower.json +++ b/modoboa/bower_components/bootstrap-select/.bower.json @@ -1,10 +1,11 @@ { "name": "bootstrap-select", "main": [ - "bootstrap-select.css", - "bootstrap-select.js" + "less/bootstrap-select.less", + "dist/css/bootstrap-select.css", + "dist/js/bootstrap-select.js" ], - "version": "1.5.4", + "version": "1.6.0", "homepage": "https://github.com/silviomoreto/bootstrap-select", "authors": [ "silviomoreto" @@ -16,7 +17,7 @@ "replacement" ], "dependencies": { - "jquery": ">=1.7" + "jquery": ">=1.8" }, "license": "MIT", "ignore": [ @@ -26,14 +27,14 @@ "test", "tests" ], - "_release": "1.5.4", + "_release": "1.6.0", "_resolution": { "type": "version", - "tag": "1.5.4", - "commit": "1e01fb7355face50b199780d3d60baa5d799bfce" + "tag": "v1.6.0", + "commit": "32032e001d1ac735ed0a8c00c00c50ddaacefbdd" }, "_source": "git://github.com/silviomoreto/bootstrap-select.git", - "_target": "1.5.4", + "_target": "1.6.0", "_originalSource": "bootstrap-select", "_direct": true } \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/CONTRIBUTING.md b/modoboa/bower_components/bootstrap-select/CONTRIBUTING.md index 578e49e94..4a379ba5a 100644 --- a/modoboa/bower_components/bootstrap-select/CONTRIBUTING.md +++ b/modoboa/bower_components/bootstrap-select/CONTRIBUTING.md @@ -11,9 +11,9 @@ patches and features. ## Using the issue tracker -The issue tracker is the preferred channel for [bug reports](#bugs), -[features requests](#features) and submitting pull -requests, but please respect the following restrictions: +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). @@ -22,7 +22,6 @@ requests, but please respect the following restrictions: respect the opinions of others. - ## Bug reports A bug is a _demonstrable problem_ that is caused by the code in the repository. @@ -36,12 +35,14 @@ Guidelines for bug reports: 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. +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. +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 @@ -68,7 +69,6 @@ Example: > merits). - ## Feature requests Feature requests are welcome. But take a moment to find out whether your idea @@ -78,10 +78,37 @@ provide as much detail and context as possible. ## Pull Request Guidelines -* To instantiate a context or use it, use the variable **that** instead of **_this**. -* Submit your CLA, if you haven't. -* 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. +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 possible, use JSlint or JSHint to validate it +* 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 + diff --git a/modoboa/bower_components/bootstrap-select/Gruntfile.js b/modoboa/bower_components/bootstrap-select/Gruntfile.js new file mode 100644 index 000000000..040c25640 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/Gruntfile.js @@ -0,0 +1,212 @@ +/*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 + } + }, + + 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', ['less', 'usebanner', 'cssmin']); + + // JS distribution + grunt.registerTask('dist-js', ['concat', 'uglify']); + + // Full distribution + grunt.registerTask('dist', ['dist-css', 'dist-js']); + + // Default task. + grunt.registerTask('default', ['clean', 'dist']); + +}; diff --git a/modoboa/bower_components/bootstrap-select/LICENSE b/modoboa/bower_components/bootstrap-select/LICENSE new file mode 100644 index 000000000..4e7f5527b --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013-2014 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 +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. diff --git a/modoboa/bower_components/bootstrap-select/README.md b/modoboa/bower_components/bootstrap-select/README.md index 3d6cdbc54..393d0fca0 100644 --- a/modoboa/bower_components/bootstrap-select/README.md +++ b/modoboa/bower_components/bootstrap-select/README.md @@ -6,39 +6,40 @@ A custom select / multiselect for Bootstrap using button dropdown, designed to b ## Demo and Documentation See a Bootstrap 2.3.2 example [here](http://silviomoreto.github.com/bootstrap-select/).
-See a Bootstrap 3.0.2 example [here](http://silviomoreto.github.com/bootstrap-select/3) (work-in-progress). +See a Bootstrap 3.0.3 example [here](http://silviomoreto.github.com/bootstrap-select/3) (work-in-progress). ## Authors [Silvio Moreto](http://github.com/silviomoreto), [Ana Carolina](http://github.com/anacarolinats), -[caseyjhol](https://github.com/caseyjhol), and -[Matt Bryson](https://github.com/mattbryson). +[caseyjhol](https://github.com/caseyjhol), +[Matt Bryson](https://github.com/mattbryson), and +[t0xicCode](https://github.com/t0xicCode). ## Usage Create your ` - - - - - +```html + +``` Enable Bootstrap-Select via JavaScript: - - $('.selectpicker').selectpicker(); - +```js +$('.selectpicker').selectpicker(); +``` Or just - - $('select').selectpicker(); - +```js +$('select').selectpicker(); +``` Checkout the [documentation](http://silviomoreto.github.com/bootstrap-select/) for further information. ## CDN -* https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.3.5/bootstrap-select.min.js -* https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.3.5/bootstrap-select.min.css +* https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.5.4/bootstrap-select.min.js +* https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.5.4/bootstrap-select.min.css ## Bugs and feature requests diff --git a/modoboa/bower_components/bootstrap-select/bootstrap-select.css b/modoboa/bower_components/bootstrap-select/bootstrap-select.css deleted file mode 100644 index 8444f67cc..000000000 --- a/modoboa/bower_components/bootstrap-select/bootstrap-select.css +++ /dev/null @@ -1,309 +0,0 @@ -/*! - * bootstrap-select v1.5.4 - * http://silviomoreto.github.io/bootstrap-select/ - * - * Copyright 2013 bootstrap-select - * Licensed under the MIT license - */ - -.bootstrap-select.btn-group:not(.input-group-btn), -.bootstrap-select.btn-group[class*="span"] { - float: none; - display: inline-block; - margin-bottom: 10px; - margin-left: 0; -} -.form-search .bootstrap-select.btn-group, -.form-inline .bootstrap-select.btn-group, -.form-horizontal .bootstrap-select.btn-group { - margin-bottom: 0; -} - -.bootstrap-select.form-control { - margin-bottom: 0; - padding: 0; - border: none; -} - -.bootstrap-select.btn-group.pull-right, -.bootstrap-select.btn-group[class*="span"].pull-right, -.row-fluid .bootstrap-select.btn-group[class*="span"].pull-right { - float: right; -} - -.input-append .bootstrap-select.btn-group { - margin-left: -1px; -} - -.input-prepend .bootstrap-select.btn-group { - margin-right: -1px; -} - -.bootstrap-select:not([class*="span"]):not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) { - width: 220px; -} - -.bootstrap-select { - /*width: 220px\9; IE8 and below*/ - width: 220px\0; /*IE9 and below*/ -} - -.bootstrap-select.form-control:not([class*="span"]) { - width: 100%; -} - -.bootstrap-select > .btn { - width: 100%; - padding-right: 25px; -} - -.error .bootstrap-select .btn { - border: 1px solid #b94a48; -} - -.bootstrap-select.show-menu-arrow.open > .btn { - z-index: 2051; -} - -.bootstrap-select .btn:focus { - outline: thin dotted #333333 !important; - outline: 5px auto -webkit-focus-ring-color !important; - outline-offset: -2px; -} - -.bootstrap-select.btn-group .btn .filter-option { - display: inline-block; - overflow: hidden; - width: 100%; - float: left; - text-align: left; -} - -.bootstrap-select.btn-group .btn .caret { - position: absolute; - top: 50%; - right: 12px; - margin-top: -2px; - vertical-align: middle; -} - -.bootstrap-select.btn-group > .disabled, -.bootstrap-select.btn-group .dropdown-menu li.disabled > a { - cursor: not-allowed; -} - -.bootstrap-select.btn-group > .disabled:focus { - outline: none !important; -} - -.bootstrap-select.btn-group[class*="span"] .btn { - width: 100%; -} - -.bootstrap-select.btn-group .dropdown-menu { - min-width: 100%; - z-index: 2000; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -.bootstrap-select.btn-group .dropdown-menu.inner { - position: static; - border: 0; - padding: 0; - margin: 0; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} - -.bootstrap-select.btn-group .dropdown-menu dt { - display: block; - padding: 3px 20px; - cursor: default; -} - -.bootstrap-select.btn-group .div-contain { - overflow: hidden; -} - -.bootstrap-select.btn-group .dropdown-menu li { - position: relative; -} - -.bootstrap-select.btn-group .dropdown-menu li > a.opt { - position: relative; - padding-left: 35px; -} - -.bootstrap-select.btn-group .dropdown-menu li > a { - cursor: pointer; -} - -.bootstrap-select.btn-group .dropdown-menu li > dt small { - font-weight: normal; -} - -.bootstrap-select.btn-group.show-tick .dropdown-menu li.selected a i.check-mark { - position: absolute; - display: inline-block; - right: 15px; - margin-top: 2.5px; -} - -.bootstrap-select.btn-group .dropdown-menu li a i.check-mark { - display: none; -} - -.bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text { - margin-right: 34px; -} - -.bootstrap-select.btn-group .dropdown-menu li small { - padding-left: 0.5em; -} - -.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(255,255,255,0.4); -} - -.bootstrap-select.btn-group .dropdown-menu li > dt small { - font-weight: normal; -} - -.bootstrap-select.show-menu-arrow .dropdown-toggle:before { - content: ''; - display: inline-block; - border-left: 7px solid transparent; - border-right: 7px solid transparent; - border-bottom: 7px solid #CCC; - border-bottom-color: rgba(0, 0, 0, 0.2); - position: absolute; - bottom: -4px; - left: 9px; - display: none; -} - -.bootstrap-select.show-menu-arrow .dropdown-toggle:after { - content: ''; - display: inline-block; - border-left: 6px solid transparent; - border-right: 6px solid transparent; - border-bottom: 6px solid white; - position: absolute; - bottom: -4px; - left: 10px; - display: none; -} - -.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:before { - bottom: auto; - top: -3px; - border-top: 7px solid #ccc; - border-bottom: 0; - border-top-color: rgba(0, 0, 0, 0.2); -} - -.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:after { - bottom: auto; - top: -3px; - border-top: 6px solid #ffffff; - border-bottom: 0; -} - -.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:before { - right: 12px; - left: auto; -} -.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:after { - right: 13px; - left: auto; -} - -.bootstrap-select.show-menu-arrow.open > .dropdown-toggle:before, -.bootstrap-select.show-menu-arrow.open > .dropdown-toggle:after { - display: block; -} - -.bootstrap-select.btn-group .no-results { - padding: 3px; - background: #f5f5f5; - margin: 0 5px; -} - -.bootstrap-select.btn-group .dropdown-menu .notify { - position: absolute; - bottom: 5px; - width: 96%; - margin: 0 2%; - min-height: 26px; - padding: 3px 5px; - background: #f5f5f5; - border: 1px solid #e3e3e3; - box-shadow: inset 0 1px 1px rgba(0,0,0,0.05); - pointer-events: none; - opacity: 0.9; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -.mobile-device { - position: absolute; - top: 0; - left: 0; - display: block !important; - width: 100%; - height: 100% !important; - opacity: 0; -} - -.bootstrap-select.fit-width { - width: auto !important; -} - -.bootstrap-select.btn-group.fit-width .btn .filter-option { - position: static; -} - -.bootstrap-select.btn-group.fit-width .btn .caret { - position: static; - top: auto; - margin-top: -1px; -} - -.control-group.error .bootstrap-select .dropdown-toggle{ - border-color: #b94a48; -} - -.bootstrap-select-searchbox, -.bootstrap-select .bs-actionsbox { - padding: 4px 8px; -} - -.bootstrap-select .bs-actionsbox { - float: left; - width: 100%; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -.bootstrap-select-searchbox + .bs-actionsbox { - padding: 0 8px 4px; -} - -.bootstrap-select-searchbox input { - margin-bottom: 0; -} - -.bootstrap-select .bs-actionsbox .btn-group button { - width: 50%; -} \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/bootstrap-select.jquery.json b/modoboa/bower_components/bootstrap-select/bootstrap-select.jquery.json index e89877b2e..cd14b591b 100644 --- a/modoboa/bower_components/bootstrap-select/bootstrap-select.jquery.json +++ b/modoboa/bower_components/bootstrap-select/bootstrap-select.jquery.json @@ -1,29 +1,29 @@ { - "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.5.4", - "author": { - "name": "Silvio Moreto", - "url": "https://github.com/silviomoreto/" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/silviomoreto/bootstrap-select#copyright-and-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.7" + "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.0", + "author": { + "name": "Silvio Moreto", + "url": "https://github.com/silviomoreto/" + }, + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE" } -} \ No newline at end of file + ], + "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" + } +} diff --git a/modoboa/bower_components/bootstrap-select/bootstrap-select.js b/modoboa/bower_components/bootstrap-select/bootstrap-select.js deleted file mode 100644 index 0459bb58f..000000000 --- a/modoboa/bower_components/bootstrap-select/bootstrap-select.js +++ /dev/null @@ -1,972 +0,0 @@ -/*! - * bootstrap-select v1.5.4 - * http://silviomoreto.github.io/bootstrap-select/ - * - * Copyright 2013 bootstrap-select - * Licensed under the MIT license - */ - -!function($) { - - 'use strict'; - - $.expr[':'].icontains = function(obj, index, meta) { - return $(obj).text().toUpperCase().indexOf(meta[3].toUpperCase()) >= 0; - }; - - var Selectpicker = function(element, options, e) { - if (e) { - e.stopPropagation(); - e.preventDefault(); - } - this.$element = $(element); - this.$newElement = null; - this.$button = null; - this.$menu = null; - this.$lis = null; - - //Merge defaults, options and data-attributes to make our options - this.options = $.extend({}, $.fn.selectpicker.defaults, this.$element.data(), typeof options == 'object' && options); - - //If we have no title yet, check the attribute 'title' (this is missed by jq as its not a data-attribute - if (this.options.title === null) { - this.options.title = this.$element.attr('title'); - } - - //Expose public methods - this.val = Selectpicker.prototype.val; - this.render = Selectpicker.prototype.render; - this.refresh = Selectpicker.prototype.refresh; - this.setStyle = Selectpicker.prototype.setStyle; - this.selectAll = Selectpicker.prototype.selectAll; - this.deselectAll = Selectpicker.prototype.deselectAll; - this.init(); - }; - - Selectpicker.prototype = { - - constructor: Selectpicker, - - init: function() { - var that = this, - id = this.$element.attr('id'); - - this.$element.hide(); - this.multiple = this.$element.prop('multiple'); - 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'); - - if (id !== undefined) { - this.$button.attr('data-id', id); - $('label[for="' + id + '"]').click(function(e) { - e.preventDefault(); - that.$button.focus(); - }); - } - - this.checkDisabled(); - this.clickListener(); - if (this.options.liveSearch) this.liveSearchListener(); - this.render(); - this.liHeight(); - this.setStyle(); - this.setWidth(); - if (this.options.container) this.selectPosition(); - this.$menu.data('this', this); - this.$newElement.data('this', this); - }, - - createDropdown: function() { - //If we are multiple, then add the show-tick class by default - var multiple = this.multiple ? ' show-tick' : ''; - var inputGroup = this.$element.parent().hasClass('input-group') ? ' input-group-btn' : ''; - var autofocus = this.autofocus ? ' autofocus' : ''; - var header = this.options.header ? '
' + this.options.header + '
' : ''; - var searchbox = this.options.liveSearch ? '' : ''; - var actionsbox = this.options.actionsBox ? '
' + - '
' + - '' + - '' + - '
' + - '
' : ''; - var drop = - '
' + - '' + - '' + - '
'; - - return $(drop); - }, - - createView: function() { - var $drop = this.createDropdown(); - var $li = this.createLi(); - $drop.find('ul').append($li); - return $drop; - }, - - reloadLi: function() { - //Remove all children. - this.destroyLi(); - //Re build - var $li = this.createLi(); - this.$menu.find('ul').append( $li ); - }, - - destroyLi: function() { - this.$menu.find('li').remove(); - }, - - createLi: function() { - var that = this, - _liA = [], - _liHtml = ''; - - this.$element.find('option').each(function() { - var $this = $(this); - - //Get the class and text for the option - var optionClass = $this.attr('class') || ''; - var inline = $this.attr('style') || ''; - var text = $this.data('content') ? $this.data('content') : $this.html(); - var subtext = $this.data('subtext') !== undefined ? '' + $this.data('subtext') + '' : ''; - var icon = $this.data('icon') !== undefined ? ' ' : ''; - if (icon !== '' && ($this.is(':disabled') || $this.parent().is(':disabled'))) { - icon = ''+icon+''; - } - - if (!$this.data('content')) { - //Prepend any icon and append any subtext to the main text. - text = icon + '' + text + subtext + ''; - } - - if (that.options.hideDisabled && ($this.is(':disabled') || $this.parent().is(':disabled'))) { - _liA.push(''); - } else if ($this.parent().is('optgroup') && $this.data('divider') !== true) { - if ($this.index() === 0) { - //Get the opt group label - var label = $this.parent().attr('label'); - var labelSubtext = $this.parent().data('subtext') !== undefined ? ''+$this.parent().data('subtext')+'' : ''; - var labelIcon = $this.parent().data('icon') ? ' ' : ''; - label = labelIcon + '' + label + labelSubtext + ''; - - if ($this[0].index !== 0) { - _liA.push( - '
'+ - '
'+label+'
'+ - that.createA(text, 'opt ' + optionClass, inline ) - ); - } else { - _liA.push( - '
'+label+'
'+ - that.createA(text, 'opt ' + optionClass, inline )); - } - } else { - _liA.push(that.createA(text, 'opt ' + optionClass, inline )); - } - } else if ($this.data('divider') === true) { - _liA.push('
'); - } else if ($(this).data('hidden') === true) { - _liA.push(''); - } else { - _liA.push(that.createA(text, optionClass, inline )); - } - }); - - $.each(_liA, function(i, item) { - var hide = item === '' ? 'class="hide is-hidden"' : ''; - _liHtml += '
  • ' + item + '
  • '; - }); - - //If we are not multiple, and we dont have a selected item, and we dont have a title, select the first element so something is set in the button - if (!this.multiple && this.$element.find('option:selected').length===0 && !this.options.title) { - this.$element.find('option').eq(0).prop('selected', true).attr('selected', 'selected'); - } - - return $(_liHtml); - }, - - createA: function(text, classes, inline) { - return '' + - text + - '' + - ''; - }, - - render: function(updateLi) { - var that = this; - - //Update the LI to match the SELECT - if (updateLi !== false) { - this.$element.find('option').each(function(index) { - that.setDisabled(index, $(this).is(':disabled') || $(this).parent().is(':disabled') ); - that.setSelected(index, $(this).is(':selected') ); - }); - } - - this.tabIndex(); - - var selectedItems = this.$element.find('option:selected').map(function() { - var $this = $(this); - var icon = $this.data('icon') && that.options.showIcon ? ' ' : ''; - var subtext; - if (that.options.showSubtext && $this.attr('data-subtext') && !that.multiple) { - subtext = ' '+$this.data('subtext') +''; - } else { - subtext = ''; - } - if ($this.data('content') && that.options.showContent) { - return $this.data('content'); - } else if ($this.attr('title') !== undefined) { - return $this.attr('title'); - } else { - return icon + $this.html() + subtext; - } - }).toArray(); - - //Fixes issue in IE10 occurring when no default option is selected and at least one option is disabled - //Convert all the values into a comma delimited string - var title = !this.multiple ? selectedItems[0] : selectedItems.join(this.options.multipleSeparator); - - //If this is multi select, and the selectText type is count, the show 1 of 2 selected etc.. - if (this.multiple && this.options.selectedTextFormat.indexOf('count') > -1) { - var max = this.options.selectedTextFormat.split('>'); - var notDisabled = this.options.hideDisabled ? ':not([disabled])' : ''; - if ( (max.length>1 && selectedItems.length > max[1]) || (max.length==1 && selectedItems.length>=2)) { - title = this.options.countSelectedText.replace('{0}', selectedItems.length).replace('{1}', this.$element.find('option:not([data-divider="true"]):not([data-hidden="true"])'+notDisabled).length); - } - } - - this.options.title = this.$element.attr('title'); - - //If we dont have a title, then use the default, or if nothing is set at all, use the not selected text - if (!title) { - title = this.options.title !== undefined ? this.options.title : this.options.noneSelectedText; - } - - this.$button.attr('title', $.trim(title)); - this.$newElement.find('.filter-option').html(title); - }, - - setStyle: function(style, status) { - if (this.$element.attr('class')) { - this.$newElement.addClass(this.$element.attr('class').replace(/selectpicker|mobile-device|validate\[.*\]/gi, '')); - } - - var buttonClass = style ? style : this.options.style; - - if (status == 'add') { - this.$button.addClass(buttonClass); - } else if (status == 'remove') { - this.$button.removeClass(buttonClass); - } else { - this.$button.removeClass(this.options.style); - this.$button.addClass(buttonClass); - } - }, - - 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 > a').outerHeight(), - headerHeight = this.options.header ? $menuClone.find('.popover-title').outerHeight() : 0, - searchHeight = this.options.liveSearch ? $menuClone.find('.bootstrap-select-searchbox').outerHeight() : 0, - actionsHeight = this.options.actionsBox ? $menuClone.find('.bs-actionsbox').outerHeight() : 0; - - $selectClone.remove(); - - this.$newElement - .data('liHeight', liHeight) - .data('headerHeight', headerHeight) - .data('searchHeight', searchHeight) - .data('actionsHeight', actionsHeight); - }, - - setSize: function() { - var that = this, - menu = this.$menu, - menuInner = menu.find('.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'), - divHeight = menu.find('li .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 ? ':not(.disabled)' : '', - $window = $(window), - menuExtras = menuPadding + parseInt(menu.css('margin-top')) + parseInt(menu.css('margin-bottom')) + 2, - menuHeight, - selectOffsetTop, - selectOffsetBot, - posVert = function() { - selectOffsetTop = that.$newElement.offset().top - $window.scrollTop(); - selectOffsetBot = $window.height() - selectOffsetTop - selectHeight; - }; - posVert(); - if (this.options.header) menu.css('padding-top', 0); - - if (this.options.size == 'auto') { - var getSize = function() { - var minHeight, - lisVis = that.$lis.not('.hide'); - - posVert(); - menuHeight = selectOffsetBot - menuExtras; - - if (that.options.dropupAuto) { - that.$newElement.toggleClass('dropup', (selectOffsetTop > selectOffsetBot) && ((menuHeight - menuExtras) < menu.height())); - } - if (that.$newElement.hasClass('dropup')) { - menuHeight = selectOffsetTop - menuExtras; - } - - if ((lisVis.length + lisVis.find('dt').length) > 3) { - minHeight = liHeight*3 + menuExtras - 2; - } else { - minHeight = 0; - } - - menu.css({'max-height' : menuHeight + 'px', 'overflow' : 'hidden', 'min-height' : minHeight + headerHeight + searchHeight + actionsHeight + 'px'}); - menuInner.css({'max-height' : menuHeight - headerHeight - searchHeight - actionsHeight - 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 = menu.find('li'+notDisabled+' > *').filter(':not(.div-contain)').slice(0,this.options.size).last().parent().index(); - var divLength = menu.find('li').slice(0,optIndex + 1).find('.div-contain').length; - menuHeight = liHeight*this.options.size + divLength*divHeight + menuPadding; - if (that.options.dropupAuto) { - 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'}); - } - }, - - setWidth: function() { - if (this.options.width == 'auto') { - this.$menu.css('min-width', '0'); - - // 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'); - selectClone.remove(); - - // Set width to whatever's larger, button title or longest option - this.$newElement.css('width', Math.max(parseInt(ulWidth), parseInt(btnWidth)) + 'px'); - } else if (this.options.width == 'fit') { - // Remove inline min-width so width can be changed from 'auto' - this.$menu.css('min-width', ''); - this.$newElement.css('width', '').addClass('fit-width'); - } else if (this.options.width) { - // Remove inline min-width so width can be changed from 'auto' - this.$menu.css('min-width', ''); - this.$newElement.css('width', this.options.width); - } else { - // Remove inline min-width/width so width can be changed - this.$menu.css('min-width', ''); - this.$newElement.css('width', ''); - } - // Remove fit-width class if width is changed programmatically - if (this.$newElement.hasClass('fit-width') && this.options.width !== 'fit') { - this.$newElement.removeClass('fit-width'); - } - }, - - selectPosition: function() { - var that = this, - drop = '
    ', - $drop = $(drop), - pos, - actualHeight, - getPlacement = function($element) { - $drop.addClass($element.attr('class').replace(/form-control/gi, '')).toggleClass('dropup', $element.hasClass('dropup')); - pos = $element.offset(); - actualHeight = $element.hasClass('dropup') ? 0 : $element[0].offsetHeight; - $drop.css({'top' : pos.top + actualHeight, 'left' : pos.left, 'width' : $element[0].offsetWidth, 'position' : 'absolute'}); - }; - this.$newElement.on('click', function() { - if (that.isDisabled()) { - return; - } - getPlacement($(this)); - $drop.appendTo(that.options.container); - $drop.toggleClass('open', !$(this).hasClass('open')); - $drop.append(that.$menu); - }); - $(window).resize(function() { - getPlacement(that.$newElement); - }); - $(window).on('scroll', function() { - getPlacement(that.$newElement); - }); - $('html').on('click', function(e) { - if ($(e.target).closest(that.$newElement).length < 1) { - $drop.removeClass('open'); - } - }); - }, - - mobile: function() { - this.$element.addClass('mobile-device').appendTo(this.$newElement); - if (this.options.container) this.$menu.hide(); - }, - - refresh: function() { - this.$lis = null; - this.reloadLi(); - this.render(); - this.setWidth(); - this.setStyle(); - this.checkDisabled(); - this.liHeight(); - }, - - update: function() { - this.reloadLi(); - this.setWidth(); - this.setStyle(); - this.checkDisabled(); - this.liHeight(); - }, - - setSelected: function(index, selected) { - if (this.$lis == null) this.$lis = this.$menu.find('li'); - $(this.$lis[index]).toggleClass('selected', selected); - }, - - setDisabled: function(index, disabled) { - if (this.$lis == null) this.$lis = this.$menu.find('li'); - if (disabled) { - $(this.$lis[index]).addClass('disabled').find('a').attr('href', '#').attr('tabindex', -1); - } else { - $(this.$lis[index]).removeClass('disabled').find('a').removeAttr('href').attr('tabindex', 0); - } - }, - - isDisabled: function() { - return this.$element.is(':disabled'); - }, - - checkDisabled: function() { - var that = this; - - if (this.isDisabled()) { - this.$button.addClass('disabled').attr('tabindex', -1); - } else { - if (this.$button.hasClass('disabled')) { - this.$button.removeClass('disabled'); - } - - if (this.$button.attr('tabindex') == -1) { - if (!this.$element.data('tabindex')) this.$button.removeAttr('tabindex'); - } - } - - this.$button.click(function() { - return !that.isDisabled(); - }); - }, - - tabIndex: function() { - if (this.$element.is('[tabindex]')) { - this.$element.data('tabindex', this.$element.attr('tabindex')); - this.$button.attr('tabindex', this.$element.data('tabindex')); - } - }, - - clickListener: function() { - var that = this; - - $('body').on('touchstart.dropdown', '.dropdown-menu', function(e) { - e.stopPropagation(); - }); - - this.$newElement.on('click', function() { - that.setSize(); - if (!that.options.liveSearch && !that.multiple) { - setTimeout(function() { - that.$menu.find('.selected a').focus(); - }, 10); - } - }); - - this.$menu.on('click', 'li a', function(e) { - var clickedIndex = $(this).parent().index(), - prevValue = that.$element.val(), - prevIndex = that.$element.prop('selectedIndex'); - - //Dont close on multi choice menu - if (that.multiple) { - e.stopPropagation(); - } - - e.preventDefault(); - - //Dont run if we have been disabled - if (!that.isDisabled() && !$(this).parent().hasClass('disabled')) { - var $options = that.$element.find('option'), - $option = $options.eq(clickedIndex), - state = $option.prop('selected'), - $optgroup = $option.parent('optgroup'), - maxOptions = that.options.maxOptions, - maxOptionsGrp = $optgroup.data('maxOptions') || false; - - //Deselect all others if not multi select box - if (!that.multiple) { - $options.prop('selected', false); - $option.prop('selected', true); - that.$menu.find('.selected').removeClass('selected'); - that.setSelected(clickedIndex, true); - } - //Else toggle the one we have chosen if we are multi select. - else { - $option.prop('selected', !state); - that.setSelected(clickedIndex, !state); - - if ((maxOptions !== false) || (maxOptionsGrp !== false)) { - var maxReached = maxOptions < $options.filter(':selected').length, - maxReachedGrp = maxOptionsGrp < $optgroup.find('option:selected').length, - maxOptionsArr = that.options.maxOptionsText, - maxTxt = maxOptionsArr[0].replace('{n}', maxOptions), - maxTxtGrp = maxOptionsArr[1].replace('{n}', maxOptionsGrp), - $notify = $('
    '); - - if ((maxOptions && maxReached) || (maxOptionsGrp && maxReachedGrp)) { - // If {var} is set in array, replace it - if (maxOptionsArr[2]) { - maxTxt = maxTxt.replace('{var}', maxOptionsArr[2][maxOptions > 1 ? 0 : 1]); - maxTxtGrp = maxTxtGrp.replace('{var}', maxOptionsArr[2][maxOptionsGrp > 1 ? 0 : 1]); - } - - $option.prop('selected', false); - - that.$menu.append($notify); - - if (maxOptions && maxReached) { - $notify.append($('
    ' + maxTxt + '
    ')); - that.$element.trigger('maxReached.bs.select'); - } - - if (maxOptionsGrp && maxReachedGrp) { - $notify.append($('
    ' + maxTxtGrp + '
    ')); - that.$element.trigger('maxReachedGrp.bs.select'); - } - - setTimeout(function() { - that.setSelected(clickedIndex, false); - }, 10); - - $notify.delay(750).fadeOut(300, function() { $(this).remove(); }); - } - } - } - - if (!that.multiple) { - that.$button.focus(); - } else if (that.options.liveSearch) { - that.$searchbox.focus(); - } - - // Trigger select 'change' - if ((prevValue != that.$element.val() && that.multiple) || (prevIndex != that.$element.prop('selectedIndex') && !that.multiple)) { - that.$element.change(); - } - } - }); - - this.$menu.on('click', 'li.disabled a, li dt, li .div-contain, .popover-title, .popover-title :not(.close)', function(e) { - if (e.target == this) { - e.preventDefault(); - e.stopPropagation(); - if (!that.options.liveSearch) { - that.$button.focus(); - } else { - that.$searchbox.focus(); - } - } - }); - - this.$menu.on('click', '.popover-title .close', function() { - that.$button.focus(); - }); - - this.$searchbox.on('click', function(e) { - e.stopPropagation(); - }); - - - this.$menu.on('click', '.actions-btn', function(e) { - if (that.options.liveSearch) { - that.$searchbox.focus(); - } else { - that.$button.focus(); - } - - e.preventDefault(); - e.stopPropagation(); - - if ($(this).is('.bs-select-all')) { - that.selectAll(); - } else { - that.deselectAll(); - } - that.$element.change(); - }); - - this.$element.change(function() { - that.render(false); - }); - }, - - liveSearchListener: function() { - var that = this, - no_results = $('
  • '); - - this.$newElement.on('click.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(); - } - if (!that.multiple) that.$menu.find('.selected').addClass('active'); - setTimeout(function() { - that.$searchbox.focus(); - }, 10); - }); - - this.$searchbox.on('input propertychange', function() { - if (that.$searchbox.val()) { - that.$lis.not('.is-hidden').removeClass('hide').find('a').not(':icontains(' + that.$searchbox.val() + ')').parent().addClass('hide'); - - 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 + ' "'+ that.$searchbox.val() + '"').show(); - that.$menu.find('li').last().after(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.$menu.find('li.active').removeClass('active'); - that.$menu.find('li').filter(':visible:not(.divider)').eq(0).addClass('active').find('a').focus(); - $(this).focus(); - }); - - this.$menu.on('mouseenter', 'a', function(e) { - that.$menu.find('.active').removeClass('active'); - $(e.currentTarget).parent().not('.disabled').addClass('active'); - }); - - this.$menu.on('mouseleave', 'a', function() { - that.$menu.find('.active').removeClass('active'); - }); - }, - - val: function(value) { - - if (value !== undefined) { - this.$element.val( value ); - - this.$element.change(); - return this.$element; - } else { - return this.$element.val(); - } - }, - - selectAll: function() { - if (this.$lis == null) this.$lis = this.$menu.find('li'); - this.$element.find('option:enabled').prop('selected', true); - $(this.$lis).filter(':not(.disabled)').addClass('selected'); - this.render(false); - }, - - deselectAll: function() { - if (this.$lis == null) this.$lis = this.$menu.find('li'); - this.$element.find('option:enabled').prop('selected', false); - $(this.$lis).filter(':not(.disabled)').removeClass('selected'); - this.render(false); - }, - - keydown: function(e) { - var $this, - $items, - $parent, - index, - next, - first, - last, - prev, - nextPrev, - that, - prevIndex, - isActive, - keyCodeMap = { - 32:' ', 48:'0', 49:'1', 50:'2', 51:'3', 52:'4', 53:'5', 54:'6', 55:'7', 56:'8', 57:'9', 59:';', - 65:'a', 66:'b', 67:'c', 68:'d', 69:'e', 70:'f', 71:'g', 72:'h', 73:'i', 74:'j', 75:'k', 76:'l', - 77:'m', 78:'n', 79:'o', 80:'p', 81:'q', 82:'r', 83:'s', 84:'t', 85:'u', 86:'v', 87:'w', 88:'x', - 89:'y', 90:'z', 96:'0', 97:'1', 98:'2', 99:'3', 100:'4', 101:'5', 102:'6', 103:'7', 104:'8', 105:'9' - }; - - $this = $(this); - - $parent = $this.parent(); - - if ($this.is('input')) $parent = $this.parent().parent(); - - that = $parent.data('this'); - - if (that.options.liveSearch) $parent = $this.parent().parent(); - - if (that.options.container) $parent = that.$menu; - - $items = $('[role=menu] li:not(.divider) a', $parent); - - isActive = that.$menu.parent().hasClass('open'); - - if (!isActive && /([0-9]|[A-z])/.test(String.fromCharCode(e.keyCode))) { - if (!that.options.container) { - that.setSize(); - that.$menu.parent().addClass('open'); - isActive = that.$menu.parent().hasClass('open'); - } else { - that.$newElement.trigger('click'); - } - that.$searchbox.focus(); - } - - if (that.options.liveSearch) { - if (/(^9$|27)/.test(e.keyCode) && isActive && that.$menu.find('.active').length === 0) { - e.preventDefault(); - that.$menu.parent().removeClass('open'); - that.$button.focus(); - } - $items = $('[role=menu] li:not(.divider):visible', $parent); - if (!$this.val() && !/(38|40)/.test(e.keyCode)) { - if ($items.filter('.active').length === 0) { - $items = that.$newElement.find('li').filter(':icontains(' + keyCodeMap[e.keyCode] + ')'); - } - } - } - - if (!$items.length) return; - - if (/(38|40)/.test(e.keyCode)) { - - index = $items.index($items.filter(':focus')); - first = $items.parent(':not(.disabled):visible').first().index(); - last = $items.parent(':not(.disabled):visible').last().index(); - next = $items.eq(index).parent().nextAll(':not(.disabled):visible').eq(0).index(); - prev = $items.eq(index).parent().prevAll(':not(.disabled):visible').eq(0).index(); - nextPrev = $items.eq(next).parent().prevAll(':not(.disabled):visible').eq(0).index(); - - if (that.options.liveSearch) { - $items.each(function(i) { - if ($(this).is(':not(.disabled)')) { - $(this).data('index', i); - } - }); - index = $items.index($items.filter('.active')); - first = $items.filter(':not(.disabled):visible').first().data('index'); - last = $items.filter(':not(.disabled):visible').last().data('index'); - next = $items.eq(index).nextAll(':not(.disabled):visible').eq(0).data('index'); - prev = $items.eq(index).prevAll(':not(.disabled):visible').eq(0).data('index'); - nextPrev = $items.eq(next).prevAll(':not(.disabled):visible').eq(0).data('index'); - } - - prevIndex = $this.data('prevIndex'); - - if (e.keyCode == 38) { - if (that.options.liveSearch) index -= 1; - if (index != nextPrev && index > prev) index = prev; - if (index < first) index = first; - if (index == prevIndex) index = last; - } - - if (e.keyCode == 40) { - if (that.options.liveSearch) index += 1; - if (index == -1) index = 0; - if (index != nextPrev && index < next) index = next; - if (index > last) index = last; - if (index == prevIndex) index = first; - } - - $this.data('prevIndex', index); - - if (!that.options.liveSearch) { - $items.eq(index).focus(); - } else { - e.preventDefault(); - if (!$this.is('.dropdown-toggle')) { - $items.removeClass('active'); - $items.eq(index).addClass('active').find('a').focus(); - $this.focus(); - } - } - - } else if (!$this.is('input')) { - - var keyIndex = [], - count, - prevKey; - - $items.each(function() { - if ($(this).parent().is(':not(.disabled)')) { - if ($.trim($(this).text().toLowerCase()).substring(0,1) == keyCodeMap[e.keyCode]) { - keyIndex.push($(this).parent().index()); - } - } - }); - - count = $(document).data('keycount'); - count++; - $(document).data('keycount',count); - - prevKey = $.trim($(':focus').text().toLowerCase()).substring(0,1); - - if (prevKey != keyCodeMap[e.keyCode]) { - count = 1; - $(document).data('keycount', count); - } else if (count >= keyIndex.length) { - $(document).data('keycount', 0); - if (count > keyIndex.length) count = 1; - } - - $items.eq(keyIndex[count - 1]).focus(); - } - - // Select focused option if "Enter", "Spacebar", "Tab" are pressed inside the menu. - if (/(13|32|^9$)/.test(e.keyCode) && isActive) { - if (!/(32)/.test(e.keyCode)) e.preventDefault(); - if (!that.options.liveSearch) { - $(':focus').click(); - } else if (!/(32)/.test(e.keyCode)) { - that.$menu.find('.active a').click(); - $this.focus(); - } - $(document).data('keycount',0); - } - - if ((/(^9$|27)/.test(e.keyCode) && isActive && (that.multiple || that.options.liveSearch)) || (/(27)/.test(e.keyCode) && !isActive)) { - that.$menu.parent().removeClass('open'); - that.$button.focus(); - } - - }, - - hide: function() { - this.$newElement.hide(); - }, - - show: function() { - this.$newElement.show(); - }, - - destroy: function() { - this.$newElement.remove(); - this.$element.remove(); - } - }; - - $.fn.selectpicker = function(option, event) { - //get the args of the outer function.. - var args = arguments; - var value; - var chain = this.each(function() { - if ($(this).is('select')) { - var $this = $(this), - data = $this.data('selectpicker'), - options = typeof option == 'object' && option; - - if (!data) { - $this.data('selectpicker', (data = new Selectpicker(this, options, event))); - } else if (options) { - for(var i in options) { - data.options[i] = options[i]; - } - } - - if (typeof option == 'string') { - //Copy the value of option, as once we shift the arguments - //it also shifts the value of option. - var property = option; - if (data[property] instanceof Function) { - [].shift.apply(args); - value = data[property].apply(data, args); - } else { - value = data.options[property]; - } - } - } - }); - - if (value !== undefined) { - return value; - } else { - return chain; - } - }; - - $.fn.selectpicker.defaults = { - style: 'btn-default', - size: 'auto', - title: null, - selectedTextFormat : 'values', - noneSelectedText : 'Nothing selected', - noneResultsText : 'No results match', - countSelectedText: '{0} of {1} selected', - maxOptionsText: ['Limit reached ({n} {var} max)', 'Group limit reached ({n} {var} max)', ['items','item']], - width: false, - container: false, - hideDisabled: false, - showSubtext: false, - showIcon: true, - showContent: true, - dropupAuto: true, - header: false, - liveSearch: false, - actionsBox: false, - multipleSeparator: ', ', - iconBase: 'glyphicon', - tickIcon: 'glyphicon-ok', - maxOptions: false - }; - - $(document) - .data('keycount', 0) - .on('keydown', '.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=menu], .bootstrap-select-searchbox input', Selectpicker.prototype.keydown) - .on('focusin.modal', '.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=menu], .bootstrap-select-searchbox input', function (e) { e.stopPropagation(); }); - -}(window.jQuery); diff --git a/modoboa/bower_components/bootstrap-select/bootstrap-select.min.css b/modoboa/bower_components/bootstrap-select/bootstrap-select.min.css deleted file mode 100644 index edb090cad..000000000 --- a/modoboa/bower_components/bootstrap-select/bootstrap-select.min.css +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * bootstrap-select v1.5.4 - * http://silviomoreto.github.io/bootstrap-select/ - * - * Copyright 2013 bootstrap-select - * Licensed under the MIT license - */.bootstrap-select.btn-group:not(.input-group-btn),.bootstrap-select.btn-group[class*="span"]{float:none;display:inline-block;margin-bottom:10px;margin-left:0}.form-search .bootstrap-select.btn-group,.form-inline .bootstrap-select.btn-group,.form-horizontal .bootstrap-select.btn-group{margin-bottom:0}.bootstrap-select.form-control{margin-bottom:0;padding:0;border:0}.bootstrap-select.btn-group.pull-right,.bootstrap-select.btn-group[class*="span"].pull-right,.row-fluid .bootstrap-select.btn-group[class*="span"].pull-right{float:right}.input-append .bootstrap-select.btn-group{margin-left:-1px}.input-prepend .bootstrap-select.btn-group{margin-right:-1px}.bootstrap-select:not([class*="span"]):not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn){width:220px}.bootstrap-select{width:220px\0}.bootstrap-select.form-control:not([class*="span"]){width:100%}.bootstrap-select>.btn{width:100%;padding-right:25px}.error .bootstrap-select .btn{border:1px solid #b94a48}.bootstrap-select.show-menu-arrow.open>.btn{z-index:2051}.bootstrap-select .btn:focus{outline:thin dotted #333 !important;outline:5px auto -webkit-focus-ring-color !important;outline-offset:-2px}.bootstrap-select.btn-group .btn .filter-option{display:inline-block;overflow:hidden;width:100%;float:left;text-align:left}.bootstrap-select.btn-group .btn .caret{position:absolute;top:50%;right:12px;margin-top:-2px;vertical-align:middle}.bootstrap-select.btn-group>.disabled,.bootstrap-select.btn-group .dropdown-menu li.disabled>a{cursor:not-allowed}.bootstrap-select.btn-group>.disabled:focus{outline:none !important}.bootstrap-select.btn-group[class*="span"] .btn{width:100%}.bootstrap-select.btn-group .dropdown-menu{min-width:100%;z-index:2000;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-select.btn-group .dropdown-menu.inner{position:static;border:0;padding:0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.bootstrap-select.btn-group .dropdown-menu dt{display:block;padding:3px 20px;cursor:default}.bootstrap-select.btn-group .div-contain{overflow:hidden}.bootstrap-select.btn-group .dropdown-menu li{position:relative}.bootstrap-select.btn-group .dropdown-menu li>a.opt{position:relative;padding-left:35px}.bootstrap-select.btn-group .dropdown-menu li>a{cursor:pointer}.bootstrap-select.btn-group .dropdown-menu li>dt small{font-weight:normal}.bootstrap-select.btn-group.show-tick .dropdown-menu li.selected a i.check-mark{position:absolute;display:inline-block;right:15px;margin-top:2.5px}.bootstrap-select.btn-group .dropdown-menu li a i.check-mark{display:none}.bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text{margin-right:34px}.bootstrap-select.btn-group .dropdown-menu li small{padding-left:.5em}.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(255,255,255,0.4)}.bootstrap-select.btn-group .dropdown-menu li>dt small{font-weight:normal}.bootstrap-select.show-menu-arrow .dropdown-toggle:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #CCC;border-bottom-color:rgba(0,0,0,0.2);position:absolute;bottom:-4px;left:9px;display:none}.bootstrap-select.show-menu-arrow .dropdown-toggle:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid white;position:absolute;bottom:-4px;left:10px;display:none}.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:before{bottom:auto;top:-3px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:after{bottom:auto;top:-3px;border-top:6px solid #fff;border-bottom:0}.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:before{right:12px;left:auto}.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:after{right:13px;left:auto}.bootstrap-select.show-menu-arrow.open>.dropdown-toggle:before,.bootstrap-select.show-menu-arrow.open>.dropdown-toggle:after{display:block}.bootstrap-select.btn-group .no-results{padding:3px;background:#f5f5f5;margin:0 5px}.bootstrap-select.btn-group .dropdown-menu .notify{position:absolute;bottom:5px;width:96%;margin:0 2%;min-height:26px;padding:3px 5px;background:#f5f5f5;border:1px solid #e3e3e3;box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);pointer-events:none;opacity:.9;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.mobile-device{position:absolute;top:0;left:0;display:block !important;width:100%;height:100% !important;opacity:0}.bootstrap-select.fit-width{width:auto !important}.bootstrap-select.btn-group.fit-width .btn .filter-option{position:static}.bootstrap-select.btn-group.fit-width .btn .caret{position:static;top:auto;margin-top:-1px}.control-group.error .bootstrap-select .dropdown-toggle{border-color:#b94a48}.bootstrap-select-searchbox,.bootstrap-select .bs-actionsbox{padding:4px 8px}.bootstrap-select .bs-actionsbox{float:left;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-select-searchbox+.bs-actionsbox{padding:0 8px 4px}.bootstrap-select-searchbox input{margin-bottom:0}.bootstrap-select .bs-actionsbox .btn-group button{width:50%} \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/bootstrap-select.min.js b/modoboa/bower_components/bootstrap-select/bootstrap-select.min.js deleted file mode 100644 index 3cfa7862f..000000000 --- a/modoboa/bower_components/bootstrap-select/bootstrap-select.min.js +++ /dev/null @@ -1,8 +0,0 @@ -/*! - * bootstrap-select v1.5.4 - * http://silviomoreto.github.io/bootstrap-select/ - * - * Copyright 2013 bootstrap-select - * Licensed under the MIT license - */ -;!function(b){b.expr[":"].icontains=function(e,c,d){return b(e).text().toUpperCase().indexOf(d[3].toUpperCase())>=0};var a=function(d,c,f){if(f){f.stopPropagation();f.preventDefault()}this.$element=b(d);this.$newElement=null;this.$button=null;this.$menu=null;this.$lis=null;this.options=b.extend({},b.fn.selectpicker.defaults,this.$element.data(),typeof c=="object"&&c);if(this.options.title===null){this.options.title=this.$element.attr("title")}this.val=a.prototype.val;this.render=a.prototype.render;this.refresh=a.prototype.refresh;this.setStyle=a.prototype.setStyle;this.selectAll=a.prototype.selectAll;this.deselectAll=a.prototype.deselectAll;this.init()};a.prototype={constructor:a,init:function(){var c=this,d=this.$element.attr("id");this.$element.hide();this.multiple=this.$element.prop("multiple");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");if(d!==undefined){this.$button.attr("data-id",d);b('label[for="'+d+'"]').click(function(f){f.preventDefault();c.$button.focus()})}this.checkDisabled();this.clickListener();if(this.options.liveSearch){this.liveSearchListener()}this.render();this.liHeight();this.setStyle();this.setWidth();if(this.options.container){this.selectPosition()}this.$menu.data("this",this);this.$newElement.data("this",this)},createDropdown:function(){var c=this.multiple?" show-tick":"";var d=this.$element.parent().hasClass("input-group")?" input-group-btn":"";var i=this.autofocus?" autofocus":"";var h=this.options.header?'
    '+this.options.header+"
    ":"";var g=this.options.liveSearch?'':"";var f=this.options.actionsBox?'
    ':"";var e='
    ';return b(e)},createView:function(){var c=this.createDropdown();var d=this.createLi();c.find("ul").append(d);return c},reloadLi:function(){this.destroyLi();var c=this.createLi();this.$menu.find("ul").append(c)},destroyLi:function(){this.$menu.find("li").remove()},createLi:function(){var d=this,e=[],c="";this.$element.find("option").each(function(){var i=b(this);var g=i.attr("class")||"";var h=i.attr("style")||"";var m=i.data("content")?i.data("content"):i.html();var k=i.data("subtext")!==undefined?''+i.data("subtext")+"":"";var j=i.data("icon")!==undefined?' ':"";if(j!==""&&(i.is(":disabled")||i.parent().is(":disabled"))){j=""+j+""}if(!i.data("content")){m=j+''+m+k+""}if(d.options.hideDisabled&&(i.is(":disabled")||i.parent().is(":disabled"))){e.push('')}else{if(i.parent().is("optgroup")&&i.data("divider")!==true){if(i.index()===0){var l=i.parent().attr("label");var n=i.parent().data("subtext")!==undefined?''+i.parent().data("subtext")+"":"";var f=i.parent().data("icon")?' ':"";l=f+''+l+n+"";if(i[0].index!==0){e.push('
    '+l+"
    "+d.createA(m,"opt "+g,h))}else{e.push("
    "+l+"
    "+d.createA(m,"opt "+g,h))}}else{e.push(d.createA(m,"opt "+g,h))}}else{if(i.data("divider")===true){e.push('
    ')}else{if(b(this).data("hidden")===true){e.push("")}else{e.push(d.createA(m,g,h))}}}}});b.each(e,function(g,h){var f=h===""?'class="hide is-hidden"':"";c+='
  • "+h+"
  • "});if(!this.multiple&&this.$element.find("option:selected").length===0&&!this.options.title){this.$element.find("option").eq(0).prop("selected",true).attr("selected","selected")}return b(c)},createA:function(e,c,d){return''+e+''},render:function(e){var d=this;if(e!==false){this.$element.find("option").each(function(i){d.setDisabled(i,b(this).is(":disabled")||b(this).parent().is(":disabled"));d.setSelected(i,b(this).is(":selected"))})}this.tabIndex();var h=this.$element.find("option:selected").map(function(){var k=b(this);var j=k.data("icon")&&d.options.showIcon?' ':"";var i;if(d.options.showSubtext&&k.attr("data-subtext")&&!d.multiple){i=' '+k.data("subtext")+""}else{i=""}if(k.data("content")&&d.options.showContent){return k.data("content")}else{if(k.attr("title")!==undefined){return k.attr("title")}else{return j+k.html()+i}}}).toArray();var g=!this.multiple?h[0]:h.join(this.options.multipleSeparator);if(this.multiple&&this.options.selectedTextFormat.indexOf("count")>-1){var c=this.options.selectedTextFormat.split(">");var f=this.options.hideDisabled?":not([disabled])":"";if((c.length>1&&h.length>c[1])||(c.length==1&&h.length>=2)){g=this.options.countSelectedText.replace("{0}",h.length).replace("{1}",this.$element.find('option:not([data-divider="true"]):not([data-hidden="true"])'+f).length)}}this.options.title=this.$element.attr("title");if(!g){g=this.options.title!==undefined?this.options.title:this.options.noneSelectedText}this.$button.attr("title",b.trim(g));this.$newElement.find(".filter-option").html(g)},setStyle:function(e,d){if(this.$element.attr("class")){this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device/gi,""))}var c=e?e:this.options.style;if(d=="add"){this.$button.addClass(c)}else{if(d=="remove"){this.$button.removeClass(c)}else{this.$button.removeClass(this.options.style);this.$button.addClass(c)}}},liHeight:function(){if(this.options.size===false){return}var f=this.$menu.parent().clone().find("> .dropdown-toggle").prop("autofocus",false).end().appendTo("body"),g=f.addClass("open").find("> .dropdown-menu"),e=g.find("li > a").outerHeight(),d=this.options.header?g.find(".popover-title").outerHeight():0,h=this.options.liveSearch?g.find(".bootstrap-select-searchbox").outerHeight():0,c=this.options.actionsBox?g.find(".bs-actionsbox").outerHeight():0;f.remove();this.$newElement.data("liHeight",e).data("headerHeight",d).data("searchHeight",h).data("actionsHeight",c)},setSize:function(){var i=this,d=this.$menu,j=d.find(".inner"),u=this.$newElement.outerHeight(),f=this.$newElement.data("liHeight"),s=this.$newElement.data("headerHeight"),m=this.$newElement.data("searchHeight"),h=this.$newElement.data("actionsHeight"),l=d.find("li .divider").outerHeight(true),r=parseInt(d.css("padding-top"))+parseInt(d.css("padding-bottom"))+parseInt(d.css("border-top-width"))+parseInt(d.css("border-bottom-width")),p=this.options.hideDisabled?":not(.disabled)":"",o=b(window),g=r+parseInt(d.css("margin-top"))+parseInt(d.css("margin-bottom"))+2,q,v,t,k=function(){v=i.$newElement.offset().top-o.scrollTop();t=o.height()-v-u};k();if(this.options.header){d.css("padding-top",0)}if(this.options.size=="auto"){var e=function(){var x,w=i.$lis.not(".hide");k();q=t-g;if(i.options.dropupAuto){i.$newElement.toggleClass("dropup",(v>t)&&((q-g)3){x=f*3+g-2}else{x=0}d.css({"max-height":q+"px",overflow:"hidden","min-height":x+s+m+h+"px"});j.css({"max-height":q-s-m-h-r+"px","overflow-y":"auto","min-height":Math.max(x-r,0)+"px"})};e();this.$searchbox.off("input.getSize propertychange.getSize").on("input.getSize propertychange.getSize",e);b(window).off("resize.getSize").on("resize.getSize",e);b(window).off("scroll.getSize").on("scroll.getSize",e)}else{if(this.options.size&&this.options.size!="auto"&&d.find("li"+p).length>this.options.size){var n=d.find("li"+p+" > *").filter(":not(.div-contain)").slice(0,this.options.size).last().parent().index();var c=d.find("li").slice(0,n+1).find(".div-contain").length;q=f*this.options.size+c*l+r;if(i.options.dropupAuto){this.$newElement.toggleClass("dropup",(v>t)&&(q .dropdown-menu").css("width");var d=e.css("width","auto").find("> button").css("width");e.remove();this.$newElement.css("width",Math.max(parseInt(c),parseInt(d))+"px")}else{if(this.options.width=="fit"){this.$menu.css("min-width","");this.$newElement.css("width","").addClass("fit-width")}else{if(this.options.width){this.$menu.css("min-width","");this.$newElement.css("width",this.options.width)}else{this.$menu.css("min-width","");this.$newElement.css("width","")}}}if(this.$newElement.hasClass("fit-width")&&this.options.width!=="fit"){this.$newElement.removeClass("fit-width")}},selectPosition:function(){var e=this,d="
    ",f=b(d),h,g,c=function(i){f.addClass(i.attr("class").replace(/form-control/gi,"")).toggleClass("dropup",i.hasClass("dropup"));h=i.offset();g=i.hasClass("dropup")?0:i[0].offsetHeight;f.css({top:h.top+g,left:h.left,width:i[0].offsetWidth,position:"absolute"})};this.$newElement.on("click",function(){if(e.isDisabled()){return}c(b(this));f.appendTo(e.options.container);f.toggleClass("open",!b(this).hasClass("open"));f.append(e.$menu)});b(window).resize(function(){c(e.$newElement)});b(window).on("scroll",function(){c(e.$newElement)});b("html").on("click",function(i){if(b(i.target).closest(e.$newElement).length<1){f.removeClass("open")}})},mobile:function(){this.$element.addClass("mobile-device").appendTo(this.$newElement);if(this.options.container){this.$menu.hide()}},refresh:function(){this.$lis=null;this.reloadLi();this.render();this.setWidth();this.setStyle();this.checkDisabled();this.liHeight()},update:function(){this.reloadLi();this.setWidth();this.setStyle();this.checkDisabled();this.liHeight()},setSelected:function(c,d){if(this.$lis==null){this.$lis=this.$menu.find("li")}b(this.$lis[c]).toggleClass("selected",d)},setDisabled:function(c,d){if(this.$lis==null){this.$lis=this.$menu.find("li")}if(d){b(this.$lis[c]).addClass("disabled").find("a").attr("href","#").attr("tabindex",-1)}else{b(this.$lis[c]).removeClass("disabled").find("a").removeAttr("href").attr("tabindex",0)}},isDisabled:function(){return this.$element.is(":disabled")},checkDisabled:function(){var c=this;if(this.isDisabled()){this.$button.addClass("disabled").attr("tabindex",-1)}else{if(this.$button.hasClass("disabled")){this.$button.removeClass("disabled")}if(this.$button.attr("tabindex")==-1){if(!this.$element.data("tabindex")){this.$button.removeAttr("tabindex")}}}this.$button.click(function(){return !c.isDisabled()})},tabIndex:function(){if(this.$element.is("[tabindex]")){this.$element.data("tabindex",this.$element.attr("tabindex"));this.$button.attr("tabindex",this.$element.data("tabindex"))}},clickListener:function(){var c=this;b("body").on("touchstart.dropdown",".dropdown-menu",function(d){d.stopPropagation()});this.$newElement.on("click",function(){c.setSize();if(!c.options.liveSearch&&!c.multiple){setTimeout(function(){c.$menu.find(".selected a").focus()},10)}});this.$menu.on("click","li a",function(n){var t=b(this).parent().index(),m=c.$element.val(),i=c.$element.prop("selectedIndex");if(c.multiple){n.stopPropagation()}n.preventDefault();if(!c.isDisabled()&&!b(this).parent().hasClass("disabled")){var l=c.$element.find("option"),d=l.eq(t),f=d.prop("selected"),r=d.parent("optgroup"),p=c.options.maxOptions,h=r.data("maxOptions")||false;if(!c.multiple){l.prop("selected",false);d.prop("selected",true);c.$menu.find(".selected").removeClass("selected");c.setSelected(t,true)}else{d.prop("selected",!f);c.setSelected(t,!f);if((p!==false)||(h!==false)){var o=p
    ');if((p&&o)||(h&&j)){if(s[2]){g=g.replace("{var}",s[2][p>1?0:1]);q=q.replace("{var}",s[2][h>1?0:1])}d.prop("selected",false);c.$menu.append(k);if(p&&o){k.append(b("
    "+g+"
    "));c.$element.trigger("maxReached.bs.select")}if(h&&j){k.append(b("
    "+q+"
    "));c.$element.trigger("maxReachedGrp.bs.select")}setTimeout(function(){c.setSelected(t,false)},10);k.delay(750).fadeOut(300,function(){b(this).remove()})}}}if(!c.multiple){c.$button.focus()}else{if(c.options.liveSearch){c.$searchbox.focus()}}if((m!=c.$element.val()&&c.multiple)||(i!=c.$element.prop("selectedIndex")&&!c.multiple)){c.$element.change()}}});this.$menu.on("click","li.disabled a, li dt, li .div-contain, .popover-title, .popover-title :not(.close)",function(d){if(d.target==this){d.preventDefault();d.stopPropagation();if(!c.options.liveSearch){c.$button.focus()}else{c.$searchbox.focus()}}});this.$menu.on("click",".popover-title .close",function(){c.$button.focus()});this.$searchbox.on("click",function(d){d.stopPropagation()});this.$menu.on("click",".actions-btn",function(d){if(c.options.liveSearch){c.$searchbox.focus()}else{c.$button.focus()}d.preventDefault();d.stopPropagation();if(b(this).is(".bs-select-all")){c.selectAll()}else{c.deselectAll()}c.$element.change()});this.$element.change(function(){c.render(false)})},liveSearchListener:function(){var d=this,c=b('
  • ');this.$newElement.on("click.dropdown.data-api",function(){d.$menu.find(".active").removeClass("active");if(!!d.$searchbox.val()){d.$searchbox.val("");d.$lis.not(".is-hidden").removeClass("hide");if(!!c.parent().length){c.remove()}}if(!d.multiple){d.$menu.find(".selected").addClass("active")}setTimeout(function(){d.$searchbox.focus()},10)});this.$searchbox.on("input propertychange",function(){if(d.$searchbox.val()){d.$lis.not(".is-hidden").removeClass("hide").find("a").not(":icontains("+d.$searchbox.val()+")").parent().addClass("hide");if(!d.$menu.find("li").filter(":visible:not(.no-results)").length){if(!!c.parent().length){c.remove()}c.html(d.options.noneResultsText+' "'+d.$searchbox.val()+'"').show();d.$menu.find("li").last().after(c)}else{if(!!c.parent().length){c.remove()}}}else{d.$lis.not(".is-hidden").removeClass("hide");if(!!c.parent().length){c.remove()}}d.$menu.find("li.active").removeClass("active");d.$menu.find("li").filter(":visible:not(.divider)").eq(0).addClass("active").find("a").focus();b(this).focus()});this.$menu.on("mouseenter","a",function(f){d.$menu.find(".active").removeClass("active");b(f.currentTarget).parent().not(".disabled").addClass("active")});this.$menu.on("mouseleave","a",function(){d.$menu.find(".active").removeClass("active")})},val:function(c){if(c!==undefined){this.$element.val(c);this.$element.change();return this.$element}else{return this.$element.val()}},selectAll:function(){if(this.$lis==null){this.$lis=this.$menu.find("li")}this.$element.find("option:enabled").prop("selected",true);b(this.$lis).filter(":not(.disabled)").addClass("selected");this.render(false)},deselectAll:function(){if(this.$lis==null){this.$lis=this.$menu.find("li")}this.$element.find("option:enabled").prop("selected",false);b(this.$lis).filter(":not(.disabled)").removeClass("selected");this.render(false)},keydown:function(p){var q,o,i,n,k,j,r,f,h,m,d,s,g={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"};q=b(this);i=q.parent();if(q.is("input")){i=q.parent().parent()}m=i.data("this");if(m.options.liveSearch){i=q.parent().parent()}if(m.options.container){i=m.$menu}o=b("[role=menu] li:not(.divider) a",i);s=m.$menu.parent().hasClass("open");if(!s&&/([0-9]|[A-z])/.test(String.fromCharCode(p.keyCode))){if(!m.options.container){m.setSize();m.$menu.parent().addClass("open");s=m.$menu.parent().hasClass("open")}else{m.$newElement.trigger("click")}m.$searchbox.focus()}if(m.options.liveSearch){if(/(^9$|27)/.test(p.keyCode)&&s&&m.$menu.find(".active").length===0){p.preventDefault();m.$menu.parent().removeClass("open");m.$button.focus()}o=b("[role=menu] li:not(.divider):visible",i);if(!q.val()&&!/(38|40)/.test(p.keyCode)){if(o.filter(".active").length===0){o=m.$newElement.find("li").filter(":icontains("+g[p.keyCode]+")")}}}if(!o.length){return}if(/(38|40)/.test(p.keyCode)){n=o.index(o.filter(":focus"));j=o.parent(":not(.disabled):visible").first().index();r=o.parent(":not(.disabled):visible").last().index();k=o.eq(n).parent().nextAll(":not(.disabled):visible").eq(0).index();f=o.eq(n).parent().prevAll(":not(.disabled):visible").eq(0).index();h=o.eq(k).parent().prevAll(":not(.disabled):visible").eq(0).index();if(m.options.liveSearch){o.each(function(e){if(b(this).is(":not(.disabled)")){b(this).data("index",e)}});n=o.index(o.filter(".active"));j=o.filter(":not(.disabled):visible").first().data("index");r=o.filter(":not(.disabled):visible").last().data("index");k=o.eq(n).nextAll(":not(.disabled):visible").eq(0).data("index");f=o.eq(n).prevAll(":not(.disabled):visible").eq(0).data("index");h=o.eq(k).prevAll(":not(.disabled):visible").eq(0).data("index")}d=q.data("prevIndex");if(p.keyCode==38){if(m.options.liveSearch){n-=1}if(n!=h&&n>f){n=f}if(nr){n=r}if(n==d){n=j}}q.data("prevIndex",n);if(!m.options.liveSearch){o.eq(n).focus()}else{p.preventDefault();if(!q.is(".dropdown-toggle")){o.removeClass("active");o.eq(n).addClass("active").find("a").focus();q.focus()}}}else{if(!q.is("input")){var c=[],l,t;o.each(function(){if(b(this).parent().is(":not(.disabled)")){if(b.trim(b(this).text().toLowerCase()).substring(0,1)==g[p.keyCode]){c.push(b(this).parent().index())}}});l=b(document).data("keycount");l++;b(document).data("keycount",l);t=b.trim(b(":focus").text().toLowerCase()).substring(0,1);if(t!=g[p.keyCode]){l=1;b(document).data("keycount",l)}else{if(l>=c.length){b(document).data("keycount",0);if(l>c.length){l=1}}}o.eq(c[l-1]).focus()}}if(/(13|32|^9$)/.test(p.keyCode)&&s){if(!/(32)/.test(p.keyCode)){p.preventDefault()}if(!m.options.liveSearch){b(":focus").click()}else{if(!/(32)/.test(p.keyCode)){m.$menu.find(".active a").click();q.focus()}}b(document).data("keycount",0)}if((/(^9$|27)/.test(p.keyCode)&&s&&(m.multiple||m.options.liveSearch))||(/(27)/.test(p.keyCode)&&!s)){m.$menu.parent().removeClass("open");m.$button.focus()}},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},destroy:function(){this.$newElement.remove();this.$element.remove()}};b.fn.selectpicker=function(e,f){var c=arguments;var g;var d=this.each(function(){if(b(this).is("select")){var m=b(this),l=m.data("selectpicker"),h=typeof e=="object"&&e;if(!l){m.data("selectpicker",(l=new a(this,h,f)))}else{if(h){for(var j in h){l.options[j]=h[j]}}}if(typeof e=="string"){var k=e;if(l[k] instanceof Function){[].shift.apply(c);g=l[k].apply(l,c)}else{g=l.options[k]}}}});if(g!==undefined){return g}else{return d}};b.fn.selectpicker.defaults={style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",noneSelectedText:"Nothing selected",noneResultsText:"No results match",countSelectedText:"{0} of {1} selected",maxOptionsText:["Limit reached ({n} {var} max)","Group limit reached ({n} {var} max)",["items","item"]],width:false,container:false,hideDisabled:false,showSubtext:false,showIcon:true,showContent:true,dropupAuto:true,header:false,liveSearch:false,actionsBox:false,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok",maxOptions:false};b(document).data("keycount",0).on("keydown",".bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=menu], .bootstrap-select-searchbox input",a.prototype.keydown).on("focusin.modal",".bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=menu], .bootstrap-select-searchbox input",function(c){c.stopPropagation()})}(window.jQuery); \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/bower.json b/modoboa/bower_components/bootstrap-select/bower.json index 91d2d6383..bb34e848c 100644 --- a/modoboa/bower_components/bootstrap-select/bower.json +++ b/modoboa/bower_components/bootstrap-select/bower.json @@ -1,10 +1,11 @@ { "name": "bootstrap-select", "main": [ - "bootstrap-select.css", - "bootstrap-select.js" + "less/bootstrap-select.less", + "dist/css/bootstrap-select.css", + "dist/js/bootstrap-select.js" ], - "version": "1.5.4", + "version": "1.6.0", "homepage": "https://github.com/silviomoreto/bootstrap-select", "authors": [ "silviomoreto" @@ -16,7 +17,7 @@ "replacement" ], "dependencies": { - "jquery": ">=1.7" + "jquery": ">=1.8" }, "license": "MIT", "ignore": [ diff --git a/modoboa/bower_components/bootstrap-select/composer.json b/modoboa/bower_components/bootstrap-select/composer.json index 1404b73b6..8123893a5 100644 --- a/modoboa/bower_components/bootstrap-select/composer.json +++ b/modoboa/bower_components/bootstrap-select/composer.json @@ -1,17 +1,17 @@ { - "name": "bootstrap-select/bootstrap-select", - "description": "A custom for Bootstrap using button dropdown as replacement", + "keywords": ["form", "bootstrap", "select", "replacement"], + "homepage": "https://github.com/silviomoreto/bootstrap-select", + "version": "1.6.0", + "authors": [ + { + "name": "Silvio Moreto", + "homepage": "https://github.com/silviomoreto/" } + ], + "license": "MIT", + "suggest": { + "components/jquery": "1.8.*" + } } diff --git a/modoboa/bower_components/bootstrap-select/dist/css/bootstrap-select.css b/modoboa/bower_components/bootstrap-select/dist/css/bootstrap-select.css new file mode 100644 index 000000000..4b025fb2a --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/css/bootstrap-select.css @@ -0,0 +1,269 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 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 { + width: 100%; + padding-right: 25px; +} +.error .bootstrap-select .btn { + border: 1px solid #b94a48; +} +.bootstrap-select.fit-width { + width: auto !important; +} +.bootstrap-select.btn-group:not(.input-group-btn), +.bootstrap-select.btn-group[class*="span"] { + float: none; + display: inline-block; + margin-bottom: 10px; + margin-left: 0; +} +.bootstrap-select.form-control { + margin-bottom: 0; + padding: 0; + border: none; +} +.bootstrap-select.btn-group.pull-right, +.bootstrap-select.btn-group[class*="span"].pull-right, +.row-fluid .bootstrap-select.btn-group[class*="span"].pull-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 { + margin-bottom: 0; +} +.input-append .bootstrap-select.btn-group { + margin-left: -1px; +} +.input-prepend .bootstrap-select.btn-group { + margin-right: -1px; +} +.bootstrap-select:not([class*="span"]):not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) { + width: 220px; +} +.bootstrap-select.form-control:not([class*="span"]) { + width: 100%; +} +.bootstrap-select.show-menu-arrow.open > .btn { + z-index: 2051; +} +.bootstrap-select .btn:focus { + outline: thin dotted #333333 !important; + outline: 5px auto -webkit-focus-ring-color !important; + outline-offset: -2px; +} +.bootstrap-select.btn-group .btn .filter-option { + display: inline-block; + overflow: hidden; + width: 100%; + text-align: left; +} +.bootstrap-select.btn-group .btn .caret { + position: absolute; + top: 50%; + right: 12px; + margin-top: -2px; + vertical-align: middle; +} +.bootstrap-select.btn-group > .disabled, +.bootstrap-select.btn-group .dropdown-menu li.disabled > a { + cursor: not-allowed; +} +.bootstrap-select.btn-group > .disabled:focus { + outline: none !important; +} +.bootstrap-select.btn-group[class*="span"] .btn { + width: 100%; +} +.bootstrap-select.btn-group .dropdown-menu { + min-width: 100%; + z-index: 2000; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.bootstrap-select.btn-group .dropdown-menu.inner { + position: static; + border: 0; + padding: 0; + margin: 0; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.bootstrap-select.btn-group .dropdown-menu dt { + display: block; + padding: 3px 20px; + cursor: default; +} +.bootstrap-select.btn-group .div-contain { + overflow: hidden; +} +.bootstrap-select.btn-group .dropdown-menu li { + position: relative; +} +.bootstrap-select.btn-group .dropdown-menu li > a.opt { + position: relative; + padding-left: 35px; +} +.bootstrap-select.btn-group .dropdown-menu li > a { + cursor: pointer; +} +.bootstrap-select.btn-group .dropdown-menu li > dt small { + font-weight: normal; +} +.bootstrap-select.btn-group.show-tick .dropdown-menu li.selected a i.check-mark { + position: absolute; + display: inline-block; + right: 15px; + margin-top: 2.5px; +} +.bootstrap-select.btn-group .dropdown-menu li a i.check-mark { + display: none; +} +.bootstrap-select.btn-group .dropdown-menu li a span.text { + display: inline-block; +} +.bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text { + margin-right: 34px; +} +.bootstrap-select.btn-group .dropdown-menu li small { + padding-left: 0.5em; +} +.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 > dt small { + font-weight: normal; +} +.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); + position: absolute; + bottom: -4px; + left: 9px; + display: none; +} +.bootstrap-select.show-menu-arrow .dropdown-toggle:after { + content: ''; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid white; + position: absolute; + bottom: -4px; + left: 10px; + display: none; +} +.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:before { + bottom: auto; + top: -3px; + 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; + top: -3px; + border-top: 6px solid #FFFFFF; + border-bottom: 0; +} +.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:before { + right: 12px; + left: auto; +} +.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:after { + right: 13px; + left: auto; +} +.bootstrap-select.show-menu-arrow.open > .dropdown-toggle:before, +.bootstrap-select.show-menu-arrow.open > .dropdown-toggle:after { + display: block; +} +.bootstrap-select.btn-group .no-results { + padding: 3px; + background: #f5f5f5; + margin: 0 5px; +} +.bootstrap-select.btn-group .dropdown-menu .notify { + position: absolute; + bottom: 5px; + width: 96%; + margin: 0 2%; + min-height: 26px; + padding: 3px 5px; + background: #f5f5f5; + border: 1px solid #e3e3e3; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + pointer-events: none; + opacity: 0.9; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.bootstrap-select.btn-group.fit-width .btn .filter-option { + position: static; +} +.bootstrap-select.btn-group.fit-width .btn .caret { + position: static; + top: auto; + margin-top: -1px; +} +.control-group.error .bootstrap-select .dropdown-toggle { + border-color: #b94a48; +} +.bootstrap-select-searchbox, +.bootstrap-select .bs-actionsbox { + padding: 4px 8px; +} +.bootstrap-select .bs-actionsbox { + float: left; + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.bootstrap-select .bs-actionsbox .btn-group button { + width: 50%; +} +.bootstrap-select-searchbox + .bs-actionsbox { + padding: 0 8px 4px; +} +.bootstrap-select-searchbox input, +.bootstrap-select-searchbox .form-control { + margin-bottom: 0; + width: 100%; +} +.mobile-device { + position: absolute; + top: 0; + left: 0; + display: block !important; + width: 100%; + height: 100% !important; + opacity: 0; +} +/*# sourceMappingURL=bootstrap-select.css.map */ \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/dist/css/bootstrap-select.css.map b/modoboa/bower_components/bootstrap-select/dist/css/bootstrap-select.css.map new file mode 100644 index 000000000..fa101d213 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/css/bootstrap-select.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["less/bootstrap-select.less"],"names":[],"mappings":"AAAA;;EAGE,eAAA;;;AAEA,iBAAE;EACA,WAAA;EACA,mBAAA;;AAGF,MAAO,kBAAE;EACP,yBAAA;;AAGF,iBAAC;EACC,sBAAA;;AAIJ,iBAAiB,UAAU,IAAI;AAC/B,iBAAiB,UAAU;EACzB,WAAA;EACA,qBAAA;EACA,mBAAA;EACA,cAAA;;AAGF,iBAAiB;EACf,gBAAA;EACA,UAAA;EACA,YAAA;;AAGF,iBAAiB,UAAU;AAC3B,iBAAiB,UAAU,eAAe;AAC1C,UAAW,kBAAiB,UAAU,eAAe;EACnD,YAAA;;AAIA,YAAa,kBADE;AAEf,YAAa,kBAFE;AAGf,gBAAiB,kBAHF;AAIf,WAAY,kBAJG;EAKb,gBAAA;;AAGF,aAAc,kBARC;EASb,iBAAA;;AAGF,cAAe,kBAZA;EAab,kBAAA;;AAIJ,iBAAiB,IAAI,iBAAiB,IAAI,iBAAiB,IAAI,yBAAyB,IAAI;EAC1F,YAAA;;AAGF,iBAAiB,aAAa,IAAI;EAChC,WAAA;;AAGF,iBAAiB,gBAAgB,KAAM;EACrC,aAAA;;AAGF,iBAAkB,KAAI;EACpB,uCAAA;EACA,0CAAA;EACA,oBAAA;;AAGF,iBAAiB,UAAW,KAAK;EAC/B,qBAAA;EACA,gBAAA;EACA,WAAA;EACA,gBAAA;;AAGF,iBAAiB,UAAW,KAAK;EAC/B,kBAAA;EACA,QAAA;EACA,WAAA;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A;EACA,8BAAA;EACA,2BAAA;EACA,sBAAA;;AAEA,iBAPgB,eAOd,WAAW;EACX,UAAA;;AAKF,2BAAE;EACA,kBAAA;;AAGF,2BAAE;AAAO,2BAAE;EACT,gBAAA;EACA,WAAA;;AAIJ;EACE,kBAAA;EACA,MAAA;EACA,OAAA;EACA,yBAAA;EACA,WAAA;EACA,uBAAA;EACA,UAAA","sourcesContent":[".bootstrap-select {\n /*width: 220px\\9; IE8 and below*/\n //noinspection CssShorthandPropertyValue\n width: 220px \\0; /*IE9 and below*/\n\n & > .btn {\n width: 100%;\n padding-right: 25px;\n }\n\n .error & .btn {\n border: 1px solid #b94a48;\n }\n\n &.fit-width {\n width: auto !important;\n }\n}\n\n.bootstrap-select.btn-group:not(.input-group-btn),\n.bootstrap-select.btn-group[class*=\"span\"] {\n float: none;\n display: inline-block;\n margin-bottom: 10px;\n margin-left: 0;\n}\n\n.bootstrap-select.form-control {\n margin-bottom: 0;\n padding: 0;\n border: none;\n}\n\n.bootstrap-select.btn-group.pull-right,\n.bootstrap-select.btn-group[class*=\"span\"].pull-right,\n.row-fluid .bootstrap-select.btn-group[class*=\"span\"].pull-right {\n float: right;\n}\n\n.bootstrap-select.btn-group {\n .form-search &,\n .form-inline &,\n .form-horizontal &,\n .form-group & {\n margin-bottom: 0;\n }\n\n .input-append & {\n margin-left: -1px;\n }\n\n .input-prepend & {\n margin-right: -1px;\n }\n}\n\n.bootstrap-select:not([class*=\"span\"]):not([class*=\"col-\"]):not([class*=\"form-control\"]):not(.input-group-btn) {\n width: 220px;\n}\n\n.bootstrap-select.form-control:not([class*=\"span\"]) {\n width: 100%;\n}\n\n.bootstrap-select.show-menu-arrow.open > .btn {\n z-index: 2051;\n}\n\n.bootstrap-select .btn:focus {\n outline: thin dotted #333333 !important;\n outline: 5px auto -webkit-focus-ring-color !important;\n outline-offset: -2px;\n}\n\n.bootstrap-select.btn-group .btn .filter-option {\n display: inline-block;\n overflow: hidden;\n width: 100%;\n text-align: left;\n}\n\n.bootstrap-select.btn-group .btn .caret {\n position: absolute;\n top: 50%;\n right: 12px;\n margin-top: -2px;\n vertical-align: middle;\n}\n\n.bootstrap-select.btn-group > .disabled,\n.bootstrap-select.btn-group .dropdown-menu li.disabled > a {\n cursor: not-allowed;\n}\n\n.bootstrap-select.btn-group > .disabled:focus {\n outline: none !important;\n}\n\n.bootstrap-select.btn-group[class*=\"span\"] .btn {\n width: 100%;\n}\n\n.bootstrap-select.btn-group .dropdown-menu {\n min-width: 100%;\n z-index: 2000;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.bootstrap-select.btn-group .dropdown-menu.inner {\n position: static;\n border: 0;\n padding: 0;\n margin: 0;\n -webkit-border-radius: 0;\n -moz-border-radius: 0;\n border-radius: 0;\n -webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n}\n\n.bootstrap-select.btn-group .dropdown-menu dt {\n display: block;\n padding: 3px 20px;\n cursor: default;\n}\n\n.bootstrap-select.btn-group .div-contain {\n overflow: hidden;\n}\n\n.bootstrap-select.btn-group .dropdown-menu li {\n position: relative;\n}\n\n.bootstrap-select.btn-group .dropdown-menu li > a.opt {\n position: relative;\n padding-left: 35px;\n}\n\n.bootstrap-select.btn-group .dropdown-menu li > a {\n cursor: pointer;\n}\n\n.bootstrap-select.btn-group .dropdown-menu li > dt small {\n font-weight: normal;\n}\n\n.bootstrap-select.btn-group.show-tick .dropdown-menu li.selected a i.check-mark {\n position: absolute;\n display: inline-block;\n right: 15px;\n margin-top: 2.5px;\n}\n\n.bootstrap-select.btn-group .dropdown-menu li a i.check-mark {\n display: none;\n}\n\n.bootstrap-select.btn-group .dropdown-menu li a span.text {\n display: inline-block;\n}\n\n.bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text {\n margin-right: 34px;\n}\n\n.bootstrap-select.btn-group .dropdown-menu li small {\n padding-left: 0.5em;\n}\n\n.bootstrap-select.btn-group .dropdown-menu {\n & li:not(.disabled) > a:hover small,\n & li:not(.disabled) > a:focus small,\n & li.active:not(.disabled) > a small {\n color: rgb(100, 177, 216);\n color: rgba(100, 177, 216, 0.4);\n }\n\n & li > dt small {\n font-weight: normal;\n }\n}\n\n.bootstrap-select.show-menu-arrow {\n .dropdown-toggle {\n &:before {\n content: '';\n border-left: 7px solid transparent;\n border-right: 7px solid transparent;\n border-bottom-width: 7px;\n border-bottom-style: solid;\n border-bottom-color: rgb(204, 204, 204);\n border-bottom-color: rgba(204, 204, 204, 0.2);\n position: absolute;\n bottom: -4px;\n left: 9px;\n display: none;\n }\n\n &:after {\n content: '';\n border-left: 6px solid transparent;\n border-right: 6px solid transparent;\n border-bottom: 6px solid white;\n position: absolute;\n bottom: -4px;\n left: 10px;\n display: none;\n }\n }\n\n &.dropup {\n .dropdown-toggle {\n &:before {\n bottom: auto;\n top: -3px;\n border-bottom: 0;\n border-top-width: 7px;\n border-top-style: solid;\n border-top-color: rgb(204, 204, 204);\n border-top-color: rgba(204, 204, 204, 0.2);\n }\n\n &:after {\n bottom: auto;\n top: -3px;\n border-top: 6px solid #FFFFFF;\n border-bottom: 0;\n }\n }\n }\n\n &.pull-right {\n .dropdown-toggle {\n &:before {\n right: 12px;\n left: auto;\n }\n\n &:after {\n right: 13px;\n left: auto;\n }\n }\n }\n\n &.open > .dropdown-toggle {\n &:before,\n &:after {\n display: block;\n }\n }\n}\n\n.bootstrap-select.btn-group .no-results {\n padding: 3px;\n background: #f5f5f5;\n margin: 0 5px;\n}\n\n.bootstrap-select.btn-group .dropdown-menu .notify {\n position: absolute;\n bottom: 5px;\n width: 96%;\n margin: 0 2%;\n min-height: 26px;\n padding: 3px 5px;\n background: #f5f5f5;\n border: 1px solid #e3e3e3;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n pointer-events: none;\n opacity: 0.9;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.bootstrap-select.btn-group.fit-width .btn .filter-option {\n position: static;\n}\n\n.bootstrap-select.btn-group.fit-width .btn .caret {\n position: static;\n top: auto;\n margin-top: -1px;\n}\n\n.control-group.error .bootstrap-select .dropdown-toggle {\n border-color: #b94a48;\n}\n\n.bootstrap-select-searchbox,\n.bootstrap-select .bs-actionsbox {\n padding: 4px 8px;\n}\n\n.bootstrap-select .bs-actionsbox {\n float: left;\n width: 100%;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n\n & .btn-group button {\n width: 50%;\n }\n}\n\n.bootstrap-select-searchbox {\n & + .bs-actionsbox {\n padding: 0 8px 4px;\n }\n\n & input, & .form-control {\n margin-bottom: 0;\n width: 100%;\n }\n}\n\n.mobile-device {\n position: absolute;\n top: 0;\n left: 0;\n display: block !important;\n width: 100%;\n height: 100% !important;\n opacity: 0;\n}\n"]} \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/dist/css/bootstrap-select.min.css b/modoboa/bower_components/bootstrap-select/dist/css/bootstrap-select.min.css new file mode 100644 index 000000000..2e2a0d592 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/css/bootstrap-select.min.css @@ -0,0 +1,6 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 bootstrap-select + * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE) + */.bootstrap-select{width:220px \0}.bootstrap-select>.btn{width:100%;padding-right:25px}.error .bootstrap-select .btn{border:1px solid #b94a48}.bootstrap-select.fit-width{width:auto!important}.bootstrap-select.btn-group:not(.input-group-btn),.bootstrap-select.btn-group[class*=span]{float:none;display:inline-block;margin-bottom:10px;margin-left:0}.bootstrap-select.form-control{margin-bottom:0;padding:0;border:none}.bootstrap-select.btn-group.pull-right,.bootstrap-select.btn-group[class*=span].pull-right,.row-fluid .bootstrap-select.btn-group[class*=span].pull-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{margin-bottom:0}.input-append .bootstrap-select.btn-group{margin-left:-1px}.input-prepend .bootstrap-select.btn-group{margin-right:-1px}.bootstrap-select:not([class*=span]):not([class*=col-]):not([class*=form-control]):not(.input-group-btn){width:220px}.bootstrap-select.form-control:not([class*=span]){width:100%}.bootstrap-select.show-menu-arrow.open>.btn{z-index:2051}.bootstrap-select .btn:focus{outline:thin dotted #333!important;outline:5px auto -webkit-focus-ring-color!important;outline-offset:-2px}.bootstrap-select.btn-group .btn .filter-option{display:inline-block;overflow:hidden;width:100%;text-align:left}.bootstrap-select.btn-group .btn .caret{position:absolute;top:50%;right:12px;margin-top:-2px;vertical-align:middle}.bootstrap-select.btn-group>.disabled,.bootstrap-select.btn-group .dropdown-menu li.disabled>a{cursor:not-allowed}.bootstrap-select.btn-group>.disabled:focus{outline:0!important}.bootstrap-select.btn-group[class*=span] .btn{width:100%}.bootstrap-select.btn-group .dropdown-menu{min-width:100%;z-index:2000;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-select.btn-group .dropdown-menu.inner{position:static;border:0;padding:0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.bootstrap-select.btn-group .dropdown-menu dt{display:block;padding:3px 20px;cursor:default}.bootstrap-select.btn-group .div-contain{overflow:hidden}.bootstrap-select.btn-group .dropdown-menu li{position:relative}.bootstrap-select.btn-group .dropdown-menu li>a.opt{position:relative;padding-left:35px}.bootstrap-select.btn-group .dropdown-menu li>a{cursor:pointer}.bootstrap-select.btn-group .dropdown-menu li>dt small{font-weight:400}.bootstrap-select.btn-group.show-tick .dropdown-menu li.selected a i.check-mark{position:absolute;display:inline-block;right:15px;margin-top:2.5px}.bootstrap-select.btn-group .dropdown-menu li a i.check-mark{display:none}.bootstrap-select.btn-group .dropdown-menu li a span.text{display:inline-block}.bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text{margin-right:34px}.bootstrap-select.btn-group .dropdown-menu li small{padding-left:.5em}.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,.4)}.bootstrap-select.btn-group .dropdown-menu li>dt small{font-weight:400}.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:#ccc;border-bottom-color:rgba(204,204,204,.2);position:absolute;bottom:-4px;left:9px;display:none}.bootstrap-select.show-menu-arrow .dropdown-toggle:after{content:'';border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;bottom:-4px;left:10px;display:none}.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:before{bottom:auto;top:-3px;border-bottom:0;border-top-width:7px;border-top-style:solid;border-top-color:#ccc;border-top-color:rgba(204,204,204,.2)}.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle:after{bottom:auto;top:-3px;border-top:6px solid #FFF;border-bottom:0}.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:before{right:12px;left:auto}.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle:after{right:13px;left:auto}.bootstrap-select.show-menu-arrow.open>.dropdown-toggle:before,.bootstrap-select.show-menu-arrow.open>.dropdown-toggle:after{display:block}.bootstrap-select.btn-group .no-results{padding:3px;background:#f5f5f5;margin:0 5px}.bootstrap-select.btn-group .dropdown-menu .notify{position:absolute;bottom:5px;width:96%;margin:0 2%;min-height:26px;padding:3px 5px;background:#f5f5f5;border:1px solid #e3e3e3;box-shadow:inset 0 1px 1px rgba(0,0,0,.05);pointer-events:none;opacity:.9;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-select.btn-group.fit-width .btn .filter-option{position:static}.bootstrap-select.btn-group.fit-width .btn .caret{position:static;top:auto;margin-top:-1px}.control-group.error .bootstrap-select .dropdown-toggle{border-color:#b94a48}.bootstrap-select-searchbox,.bootstrap-select .bs-actionsbox{padding:4px 8px}.bootstrap-select .bs-actionsbox{float:left;width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.bootstrap-select .bs-actionsbox .btn-group button{width:50%}.bootstrap-select-searchbox+.bs-actionsbox{padding:0 8px 4px}.bootstrap-select-searchbox input,.bootstrap-select-searchbox .form-control{margin-bottom:0;width:100%}.mobile-device{position:absolute;top:0;left:0;display:block!important;width:100%;height:100%!important;opacity:0} \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/dist/js/bootstrap-select.js b/modoboa/bower_components/bootstrap-select/dist/js/bootstrap-select.js new file mode 100644 index 000000000..debb318f2 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/bootstrap-select.js @@ -0,0 +1,1030 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 bootstrap-select + * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE) + */ +(function ($) { + + 'use strict'; + + $.expr[':'].icontains = function (obj, index, meta) { + return $(obj).text().toUpperCase().indexOf(meta[3].toUpperCase()) >= 0; + }; + + var Selectpicker = function (element, options, e) { + if (e) { + e.stopPropagation(); + e.preventDefault(); + } + + this.$element = $(element); + this.$newElement = null; + this.$button = null; + this.$menu = null; + this.$lis = null; + this.options = options; + + //If we have no title yet, check the attribute 'title' (this is missed by jq as its not a data-attribute + if (this.options.title === null) { + this.options.title = this.$element.attr('title'); + } + + //Expose public methods + this.val = Selectpicker.prototype.val; + this.render = Selectpicker.prototype.render; + this.refresh = Selectpicker.prototype.refresh; + this.setStyle = Selectpicker.prototype.setStyle; + this.selectAll = Selectpicker.prototype.selectAll; + this.deselectAll = Selectpicker.prototype.deselectAll; + this.destroy = Selectpicker.prototype.destroy; + this.remove = Selectpicker.prototype.destroy; + this.show = Selectpicker.prototype.show; + this.hide = Selectpicker.prototype.hide; + + this.init(); + }; + + Selectpicker.VERSION = '1.6.0'; + + // part of this is duplicated in i18n/defaults-en_US.js. Make sure to update both. + Selectpicker.DEFAULTS = { + style: 'btn-default', + size: 'auto', + title: null, + selectedTextFormat: 'values', + noneSelectedText: 'Nothing selected', + noneResultsText: 'No results match', + countSelectedText: '{0} of {1} selected', + maxOptionsText: ['Limit reached ({n} {var} max)', 'Group limit reached ({n} {var} max)', ['items', 'item']], + width: false, + container: false, + hideDisabled: false, + showSubtext: false, + showIcon: true, + showContent: true, + dropupAuto: true, + header: false, + liveSearch: false, + actionsBox: false, + multipleSeparator: ', ', + iconBase: 'glyphicon', + tickIcon: 'glyphicon-ok', + maxOptions: false, + mobile: false + }; + + Selectpicker.prototype = { + + constructor: Selectpicker, + + init: function () { + var that = this, + id = this.$element.attr('id'); + + this.$element.hide(); + this.multiple = this.$element.prop('multiple'); + 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'); + + if (id !== undefined) { + this.$button.attr('data-id', id); + $('label[for="' + id + '"]').click(function (e) { + e.preventDefault(); + that.$button.focus(); + }); + } + + this.checkDisabled(); + this.clickListener(); + if (this.options.liveSearch) this.liveSearchListener(); + this.render(); + this.liHeight(); + this.setStyle(); + this.setWidth(); + if (this.options.container) this.selectPosition(); + this.$menu.data('this', this); + this.$newElement.data('this', this); + if (this.options.mobile) this.mobile(); + }, + + createDropdown: function () { + //If we are multiple, then add the show-tick class by default + var multiple = this.multiple ? ' show-tick' : ''; + var inputGroup = this.$element.parent().hasClass('input-group') ? ' input-group-btn' : ''; + var autofocus = this.autofocus ? ' autofocus' : ''; + var header = this.options.header ? '
    ' + this.options.header + '
    ' : ''; + var searchbox = this.options.liveSearch ? '' : ''; + var actionsbox = this.options.actionsBox ? '
    ' + + '
    ' + + '' + + '' + + '
    ' + + '
    ' : ''; + var drop = + '
    ' + + '' + + '' + + '
    '; + + return $(drop); + }, + + createView: function () { + var $drop = this.createDropdown(); + var $li = this.createLi(); + $drop.find('ul').append($li); + return $drop; + }, + + reloadLi: function () { + //Remove all children. + this.destroyLi(); + //Re build + var $li = this.createLi(); + this.$menu.find('ul').append($li); + }, + + destroyLi: function () { + this.$menu.find('li').remove(); + }, + + createLi: function () { + var that = this, + _liA = [], + _liHtml = '', + optID = 0; + + this.$element.find('option').each(function () { + var $this = $(this); + + //Get the class and text for the option + var optionClass = $this.attr('class') || ''; + var inline = $this.attr('style') || ''; + var text = $this.data('content') ? $this.data('content') : $this.html(); + var subtext = $this.data('subtext') !== undefined ? '' + $this.data('subtext') + '' : ''; + var icon = $this.data('icon') !== undefined ? ' ' : ''; + if (icon !== '' && ($this.is(':disabled') || $this.parent().is(':disabled'))) { + icon = '' + icon + ''; + } + + if (!$this.data('content')) { + //Prepend any icon and append any subtext to the main text. + text = icon + '' + text + subtext + ''; + } + + if (that.options.hideDisabled && ($this.is(':disabled') || $this.parent().is(':disabled'))) { + _liA.push(''); + } else if ($this.parent().is('optgroup') && $this.data('divider') !== true) { + if ($this.index() === 0) { + //Get the opt group label + var label = $this.parent().attr('label'); + var labelSubtext = $this.parent().data('subtext') !== undefined ? '' + $this.parent().data('subtext') + '' : ''; + var labelIcon = $this.parent().data('icon') ? ' ' : ''; + label = labelIcon + '' + label + labelSubtext + ''; + + optID += 1; + + if ($this[0].index !== 0) { + _liA.push( + '
    ' + + '
    ' + label + '
    ' + + that.createA(text, 'opt ' + optionClass, inline, optID) + ); + } else { + _liA.push( + '
    ' + label + '
    ' + + that.createA(text, 'opt ' + optionClass, inline, optID)); + } + } else { + _liA.push(that.createA(text, 'opt ' + optionClass, inline, optID)); + } + } else if ($this.data('divider') === true) { + _liA.push('
    '); + } else if ($(this).data('hidden') === true) { + _liA.push(''); + } else { + _liA.push(that.createA(text, optionClass, inline)); + } + }); + + $.each(_liA, function (i, item) { + var hide = item === '' ? 'class="hide is-hidden"' : ''; + _liHtml += '
  • ' + item + '
  • '; + }); + + //If we are not multiple, and we dont have a selected item, and we dont have a title, select the first element so something is set in the button + if (!this.multiple && this.$element.find('option:selected').length === 0 && !this.options.title) { + this.$element.find('option').eq(0).prop('selected', true).attr('selected', 'selected'); + } + + return $(_liHtml); + }, + + /** + * + * @param text + * @param classes + * @param inline + * @param [optgroup] + * @returns {string} + */ + createA: function (text, classes, inline, optgroup) { + return '' + + text + + '' + + ''; + }, + + /** + * @param [updateLi] + */ + render: function (updateLi) { + var that = this; + + //Update the LI to match the SELECT + if (updateLi !== false) { + this.$element.find('option').each(function (index) { + that.setDisabled(index, $(this).is(':disabled') || $(this).parent().is(':disabled')); + that.setSelected(index, $(this).is(':selected')); + }); + } + + this.tabIndex(); + + var selectedItems = this.$element.find('option:selected').map(function () { + var $this = $(this); + var icon = $this.data('icon') && that.options.showIcon ? ' ' : ''; + var subtext; + if (that.options.showSubtext && $this.attr('data-subtext') && !that.multiple) { + subtext = ' ' + $this.data('subtext') + ''; + } else { + subtext = ''; + } + if ($this.data('content') && that.options.showContent) { + return $this.data('content'); + } else if ($this.attr('title') !== undefined) { + return $this.attr('title'); + } else { + return icon + $this.html() + subtext; + } + }).toArray(); + + //Fixes issue in IE10 occurring when no default option is selected and at least one option is disabled + //Convert all the values into a comma delimited string + var title = !this.multiple ? selectedItems[0] : selectedItems.join(this.options.multipleSeparator); + + //If this is multi select, and the selectText type is count, the show 1 of 2 selected etc.. + if (this.multiple && this.options.selectedTextFormat.indexOf('count') > -1) { + var max = this.options.selectedTextFormat.split('>'); + var notDisabled = this.options.hideDisabled ? ':not([disabled])' : ''; + if ((max.length > 1 && selectedItems.length > max[1]) || (max.length == 1 && selectedItems.length >= 2)) { + title = this.options.countSelectedText.replace('{0}', selectedItems.length).replace('{1}', this.$element.find('option:not([data-divider="true"], [data-hidden="true"])' + notDisabled).length); + } + } + + this.options.title = this.$element.attr('title'); + + if (this.options.selectedTextFormat == 'static') { + title = this.options.title; + } + + //If we dont have a title, then use the default, or if nothing is set at all, use the not selected text + if (!title) { + title = this.options.title !== undefined ? this.options.title : this.options.noneSelectedText; + } + + this.$button.attr('title', $.trim($("
    ").html(title).text()).replace(/\s\s+/g, ' ')); + this.$newElement.find('.filter-option').html(title); + }, + + /** + * @param [style] + * @param [status] + */ + setStyle: function (style, status) { + if (this.$element.attr('class')) { + this.$newElement.addClass(this.$element.attr('class').replace(/selectpicker|mobile-device|validate\[.*\]/gi, '')); + } + + var buttonClass = style ? style : this.options.style; + + if (status == 'add') { + this.$button.addClass(buttonClass); + } else if (status == 'remove') { + this.$button.removeClass(buttonClass); + } else { + this.$button.removeClass(this.options.style); + this.$button.addClass(buttonClass); + } + }, + + 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 > a').outerHeight(), + headerHeight = this.options.header ? $menuClone.find('.popover-title').outerHeight() : 0, + searchHeight = this.options.liveSearch ? $menuClone.find('.bootstrap-select-searchbox').outerHeight() : 0, + actionsHeight = this.options.actionsBox ? $menuClone.find('.bs-actionsbox').outerHeight() : 0; + + $selectClone.remove(); + + this.$newElement + .data('liHeight', liHeight) + .data('headerHeight', headerHeight) + .data('searchHeight', searchHeight) + .data('actionsHeight', actionsHeight); + }, + + setSize: function () { + var that = this, + menu = this.$menu, + menuInner = menu.find('.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'), + divHeight = menu.find('li .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 ? ':not(.disabled)' : '', + $window = $(window), + menuExtras = menuPadding + parseInt(menu.css('margin-top')) + parseInt(menu.css('margin-bottom')) + 2, + menuHeight, + selectOffsetTop, + selectOffsetBot, + posVert = function () { + //JQuery defines a scrollTop function, but in pure JS it's a property + //noinspection JSValidateTypes + selectOffsetTop = that.$newElement.offset().top - $window.scrollTop(); + selectOffsetBot = $window.height() - selectOffsetTop - selectHeight; + }; + posVert(); + if (this.options.header) menu.css('padding-top', 0); + + if (this.options.size == 'auto') { + var getSize = function () { + var minHeight, + lisVis = that.$lis.not('.hide'); + + posVert(); + menuHeight = selectOffsetBot - menuExtras; + + if (that.options.dropupAuto) { + that.$newElement.toggleClass('dropup', (selectOffsetTop > selectOffsetBot) && ((menuHeight - menuExtras) < menu.height())); + } + if (that.$newElement.hasClass('dropup')) { + menuHeight = selectOffsetTop - menuExtras; + } + + if ((lisVis.length + lisVis.find('dt').length) > 3) { + minHeight = liHeight * 3 + menuExtras - 2; + } else { + minHeight = 0; + } + + menu.css({'max-height': menuHeight + 'px', 'overflow': 'hidden', 'min-height': minHeight + headerHeight + searchHeight + actionsHeight + 'px'}); + menuInner.css({'max-height': menuHeight - headerHeight - searchHeight - actionsHeight - 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 = menu.find('li' + notDisabled + ' > *').not('.div-contain').slice(0, this.options.size).last().parent().index(); + var divLength = menu.find('li').slice(0, optIndex + 1).find('.div-contain').length; + menuHeight = liHeight * this.options.size + divLength * divHeight + menuPadding; + if (that.options.dropupAuto) { + 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'}); + } + }, + + setWidth: function () { + if (this.options.width == 'auto') { + this.$menu.css('min-width', '0'); + + // 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'); + selectClone.remove(); + + // Set width to whatever's larger, button title or longest option + this.$newElement.css('width', Math.max(parseInt(ulWidth), parseInt(btnWidth)) + 'px'); + } else if (this.options.width == 'fit') { + // Remove inline min-width so width can be changed from 'auto' + this.$menu.css('min-width', ''); + this.$newElement.css('width', '').addClass('fit-width'); + } else if (this.options.width) { + // Remove inline min-width so width can be changed from 'auto' + this.$menu.css('min-width', ''); + this.$newElement.css('width', this.options.width); + } else { + // Remove inline min-width/width so width can be changed + this.$menu.css('min-width', ''); + this.$newElement.css('width', ''); + } + // Remove fit-width class if width is changed programmatically + if (this.$newElement.hasClass('fit-width') && this.options.width !== 'fit') { + this.$newElement.removeClass('fit-width'); + } + }, + + selectPosition: function () { + var that = this, + drop = '
    ', + $drop = $(drop), + pos, + actualHeight, + getPlacement = function ($element) { + $drop.addClass($element.attr('class').replace(/form-control/gi, '')).toggleClass('dropup', $element.hasClass('dropup')); + pos = $element.offset(); + actualHeight = $element.hasClass('dropup') ? 0 : $element[0].offsetHeight; + $drop.css({'top': pos.top + actualHeight, 'left': pos.left, 'width': $element[0].offsetWidth, 'position': 'absolute'}); + }; + this.$newElement.on('click', function () { + if (that.isDisabled()) { + return; + } + getPlacement($(this)); + $drop.appendTo(that.options.container); + $drop.toggleClass('open', !$(this).hasClass('open')); + $drop.append(that.$menu); + }); + $(window).resize(function () { + getPlacement(that.$newElement); + }); + $(window).on('scroll', function () { + getPlacement(that.$newElement); + }); + $('html').on('click', function (e) { + if ($(e.target).closest(that.$newElement).length < 1) { + $drop.removeClass('open'); + } + }); + }, + + mobile: function () { + this.$element.addClass('mobile-device').appendTo(this.$newElement); + if (this.options.container) this.$menu.hide(); + }, + + refresh: function () { + this.$lis = null; + this.reloadLi(); + this.render(); + this.setWidth(); + this.setStyle(); + this.checkDisabled(); + this.liHeight(); + }, + + update: function () { + this.reloadLi(); + this.setWidth(); + this.setStyle(); + this.checkDisabled(); + this.liHeight(); + }, + + setSelected: function (index, selected) { + if (this.$lis == null) this.$lis = this.$menu.find('li'); + $(this.$lis[index]).toggleClass('selected', selected); + }, + + setDisabled: function (index, disabled) { + if (this.$lis == null) this.$lis = this.$menu.find('li'); + if (disabled) { + $(this.$lis[index]).addClass('disabled').find('a').attr('href', '#').attr('tabindex', -1); + } else { + $(this.$lis[index]).removeClass('disabled').find('a').removeAttr('href').attr('tabindex', 0); + } + }, + + isDisabled: function () { + return this.$element.is(':disabled'); + }, + + checkDisabled: function () { + var that = this; + + if (this.isDisabled()) { + this.$button.addClass('disabled').attr('tabindex', -1); + } else { + if (this.$button.hasClass('disabled')) { + this.$button.removeClass('disabled'); + } + + if (this.$button.attr('tabindex') == -1) { + if (!this.$element.data('tabindex')) this.$button.removeAttr('tabindex'); + } + } + + this.$button.click(function () { + return !that.isDisabled(); + }); + }, + + tabIndex: function () { + if (this.$element.is('[tabindex]')) { + this.$element.data('tabindex', this.$element.attr('tabindex')); + this.$button.attr('tabindex', this.$element.data('tabindex')); + } + }, + + clickListener: function () { + var that = this; + + this.$newElement.on('touchstart.dropdown', '.dropdown-menu', function (e) { + e.stopPropagation(); + }); + + this.$newElement.on('click', function () { + that.setSize(); + if (!that.options.liveSearch && !that.multiple) { + setTimeout(function () { + that.$menu.find('.selected a').focus(); + }, 10); + } + }); + + this.$menu.on('click', 'li a', function (e) { + var clickedIndex = $(this).parent().index(), + prevValue = that.$element.val(), + prevIndex = that.$element.prop('selectedIndex'); + + //Dont close on multi choice menu + if (that.multiple) { + e.stopPropagation(); + } + + e.preventDefault(); + + //Dont run if we have been disabled + if (!that.isDisabled() && !$(this).parent().hasClass('disabled')) { + var $options = that.$element.find('option'), + $option = $options.eq(clickedIndex), + state = $option.prop('selected'), + $optgroup = $option.parent('optgroup'), + maxOptions = that.options.maxOptions, + maxOptionsGrp = $optgroup.data('maxOptions') || false; + + //Deselect all others if not multi select box + if (!that.multiple) { + $options.prop('selected', false); + $option.prop('selected', true); + that.$menu.find('.selected').removeClass('selected'); + that.setSelected(clickedIndex, true); + } + //Else toggle the one we have chosen if we are multi select. + else { + $option.prop('selected', !state); + that.setSelected(clickedIndex, !state); + $(this).blur(); + + if ((maxOptions !== false) || (maxOptionsGrp !== false)) { + var maxReached = maxOptions < $options.filter(':selected').length, + maxReachedGrp = maxOptionsGrp < $optgroup.find('option:selected').length, + maxOptionsArr = that.options.maxOptionsText, + maxTxt = maxOptionsArr[0].replace('{n}', maxOptions), + maxTxtGrp = maxOptionsArr[1].replace('{n}', maxOptionsGrp), + $notify = $('
    '); + + if ((maxOptions && maxReached) || (maxOptionsGrp && maxReachedGrp)) { + if (maxOptions && maxOptions == 1) { + $options.prop('selected', false); + $option.prop('selected', true); + that.$menu.find('.selected').removeClass('selected'); + that.setSelected(clickedIndex, true); + } else if (maxOptionsGrp && maxOptionsGrp == 1) { + $optgroup.find('option:selected').prop('selected', false); + $option.prop('selected', true); + var optgroupID = $(this).data('optgroup'); + + that.$menu.find('.selected').has('a[data-optgroup="'+optgroupID+'"]').removeClass('selected'); + + that.setSelected(clickedIndex, true); + } else { + // If {var} is set in array, replace it + if (maxOptionsArr[2]) { + maxTxt = maxTxt.replace('{var}', maxOptionsArr[2][maxOptions > 1 ? 0 : 1]); + maxTxtGrp = maxTxtGrp.replace('{var}', maxOptionsArr[2][maxOptionsGrp > 1 ? 0 : 1]); + } + + $option.prop('selected', false); + + that.$menu.append($notify); + + if (maxOptions && maxReached) { + $notify.append($('
    ' + maxTxt + '
    ')); + that.$element.trigger('maxReached.bs.select'); + } + + if (maxOptionsGrp && maxReachedGrp) { + $notify.append($('
    ' + maxTxtGrp + '
    ')); + that.$element.trigger('maxReachedGrp.bs.select'); + } + + setTimeout(function () { + that.setSelected(clickedIndex, false); + }, 10); + + $notify.delay(750).fadeOut(300, function () { + $(this).remove(); + }); + } + } + } + } + + if (!that.multiple) { + that.$button.focus(); + } else if (that.options.liveSearch) { + that.$searchbox.focus(); + } + + // Trigger select 'change' + if ((prevValue != that.$element.val() && that.multiple) || (prevIndex != that.$element.prop('selectedIndex') && !that.multiple)) { + that.$element.change(); + } + } + }); + + this.$menu.on('click', 'li.disabled a, li dt, li .div-contain, .popover-title, .popover-title :not(.close)', function (e) { + if (e.target == this) { + e.preventDefault(); + e.stopPropagation(); + if (!that.options.liveSearch) { + that.$button.focus(); + } else { + that.$searchbox.focus(); + } + } + }); + + this.$menu.on('click', '.popover-title .close', function () { + that.$button.focus(); + }); + + this.$searchbox.on('click', function (e) { + e.stopPropagation(); + }); + + + this.$menu.on('click', '.actions-btn', function (e) { + if (that.options.liveSearch) { + that.$searchbox.focus(); + } else { + that.$button.focus(); + } + + e.preventDefault(); + e.stopPropagation(); + + if ($(this).is('.bs-select-all')) { + that.selectAll(); + } else { + that.deselectAll(); + } + that.$element.change(); + }); + + this.$element.change(function () { + that.render(false); + }); + }, + + liveSearchListener: function () { + var that = this, + no_results = $('
  • '); + + this.$newElement.on('click.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(); + } + if (!that.multiple) that.$menu.find('.selected').addClass('active'); + setTimeout(function () { + that.$searchbox.focus(); + }, 10); + }); + + this.$searchbox.on('input propertychange', function () { + if (that.$searchbox.val()) { + that.$lis.not('.is-hidden').removeClass('hide').find('a').not(':icontains(' + that.$searchbox.val() + ')').parent().addClass('hide'); + + 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 + ' "' + that.$searchbox.val() + '"').show(); + that.$menu.find('li').last().after(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.$menu.find('li.active').removeClass('active'); + that.$menu.find('li').filter(':visible:not(.divider)').eq(0).addClass('active').find('a').focus(); + $(this).focus(); + }); + + this.$menu.on('mouseenter', 'a', function (e) { + that.$menu.find('.active').removeClass('active'); + $(e.currentTarget).parent().not('.disabled').addClass('active'); + }); + + this.$menu.on('mouseleave', 'a', function () { + that.$menu.find('.active').removeClass('active'); + }); + }, + + val: function (value) { + + if (value !== undefined) { + this.$element.val(value); + this.$element.change(); + this.render(); + + return this.$element; + } else { + return this.$element.val(); + } + }, + + selectAll: function () { + if (this.$lis == null) this.$lis = this.$menu.find('li'); + this.$element.find('option:enabled').prop('selected', true); + $(this.$lis).not('.disabled').addClass('selected'); + this.render(false); + }, + + deselectAll: function () { + if (this.$lis == null) this.$lis = this.$menu.find('li'); + this.$element.find('option:enabled').prop('selected', false); + $(this.$lis).not('.disabled').removeClass('selected'); + this.render(false); + }, + + keydown: function (e) { + var $this, + $items, + $parent, + index, + next, + first, + last, + prev, + nextPrev, + that, + prevIndex, + isActive, + keyCodeMap = { + 32: ' ', 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5', 54: '6', 55: '7', 56: '8', 57: '9', 59: ';', + 65: 'a', 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h', 73: 'i', 74: 'j', 75: 'k', 76: 'l', + 77: 'm', 78: 'n', 79: 'o', 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v', 87: 'w', 88: 'x', + 89: 'y', 90: 'z', 96: '0', 97: '1', 98: '2', 99: '3', 100: '4', 101: '5', 102: '6', 103: '7', 104: '8', 105: '9' + }; + + $this = $(this); + + $parent = $this.parent(); + + if ($this.is('input')) $parent = $this.parent().parent(); + + that = $parent.data('this'); + + if (that.options.liveSearch) $parent = $this.parent().parent(); + + if (that.options.container) $parent = that.$menu; + + $items = $('[role=menu] li:not(.divider) a', $parent); + + isActive = that.$menu.parent().hasClass('open'); + + if (!isActive && /([0-9]|[A-z])/.test(String.fromCharCode(e.keyCode))) { + if (!that.options.container) { + that.setSize(); + that.$menu.parent().addClass('open'); + isActive = true; + } else { + that.$newElement.trigger('click'); + } + that.$searchbox.focus(); + } + + if (that.options.liveSearch) { + if (/(^9$|27)/.test(e.keyCode.toString(10)) && isActive && that.$menu.find('.active').length === 0) { + e.preventDefault(); + that.$menu.parent().removeClass('open'); + that.$button.focus(); + } + $items = $('[role=menu] li:not(.divider):visible', $parent); + if (!$this.val() && !/(38|40)/.test(e.keyCode.toString(10))) { + if ($items.filter('.active').length === 0) { + $items = that.$newElement.find('li').filter(':icontains(' + keyCodeMap[e.keyCode] + ')'); + } + } + } + + if (!$items.length) return; + + if (/(38|40)/.test(e.keyCode.toString(10))) { + + index = $items.index($items.filter(':focus')); + first = $items.parent(':not(.disabled):visible').first().index(); + last = $items.parent(':not(.disabled):visible').last().index(); + next = $items.eq(index).parent().nextAll(':not(.disabled):visible').eq(0).index(); + prev = $items.eq(index).parent().prevAll(':not(.disabled):visible').eq(0).index(); + nextPrev = $items.eq(next).parent().prevAll(':not(.disabled):visible').eq(0).index(); + + if (that.options.liveSearch) { + $items.each(function (i) { + if ($(this).is(':not(.disabled)')) { + $(this).data('index', i); + } + }); + index = $items.index($items.filter('.active')); + first = $items.filter(':not(.disabled):visible').first().data('index'); + last = $items.filter(':not(.disabled):visible').last().data('index'); + next = $items.eq(index).nextAll(':not(.disabled):visible').eq(0).data('index'); + prev = $items.eq(index).prevAll(':not(.disabled):visible').eq(0).data('index'); + nextPrev = $items.eq(next).prevAll(':not(.disabled):visible').eq(0).data('index'); + } + + prevIndex = $this.data('prevIndex'); + + if (e.keyCode == 38) { + if (that.options.liveSearch) index -= 1; + if (index != nextPrev && index > prev) index = prev; + if (index < first) index = first; + if (index == prevIndex) index = last; + } + + if (e.keyCode == 40) { + if (that.options.liveSearch) index += 1; + if (index == -1) index = 0; + if (index != nextPrev && index < next) index = next; + if (index > last) index = last; + if (index == prevIndex) index = first; + } + + $this.data('prevIndex', index); + + if (!that.options.liveSearch) { + $items.eq(index).focus(); + } else { + e.preventDefault(); + if (!$this.is('.dropdown-toggle')) { + $items.removeClass('active'); + $items.eq(index).addClass('active').find('a').focus(); + $this.focus(); + } + } + + } else if (!$this.is('input')) { + + var keyIndex = [], + count, + prevKey; + + $items.each(function () { + if ($(this).parent().is(':not(.disabled)')) { + if ($.trim($(this).text().toLowerCase()).substring(0, 1) == keyCodeMap[e.keyCode]) { + keyIndex.push($(this).parent().index()); + } + } + }); + + count = $(document).data('keycount'); + count++; + $(document).data('keycount', count); + + prevKey = $.trim($(':focus').text().toLowerCase()).substring(0, 1); + + if (prevKey != keyCodeMap[e.keyCode]) { + count = 1; + $(document).data('keycount', count); + } else if (count >= keyIndex.length) { + $(document).data('keycount', 0); + if (count > keyIndex.length) count = 1; + } + + $items.eq(keyIndex[count - 1]).focus(); + } + + // Select focused option if "Enter", "Spacebar" are pressed inside the menu. + if (/(13|32)/.test(e.keyCode.toString(10)) && isActive) { + if (!/(32)/.test(e.keyCode.toString(10))) e.preventDefault(); + if (!that.options.liveSearch) { + $(':focus').click(); + } else if (!/(32)/.test(e.keyCode.toString(10))) { + that.$menu.find('.active a').click(); + $this.focus(); + } + $(document).data('keycount', 0); + } + + if ((/(^9$|27)/.test(e.keyCode.toString(10)) && isActive && (that.multiple || that.options.liveSearch)) || (/(27)/.test(e.keyCode.toString(10)) && !isActive)) { + that.$menu.parent().removeClass('open'); + that.$button.focus(); + } + + }, + + hide: function () { + this.$newElement.hide(); + }, + + show: function () { + this.$newElement.show(); + }, + + destroy: function () { + this.$newElement.remove(); + this.$element.remove(); + } + }; + + $.fn.selectpicker = function (option, event) { + //get the args of the outer function.. + var args = arguments; + var value; + var chain = this.each(function () { + if ($(this).is('select')) { + var $this = $(this), + data = $this.data('selectpicker'), + options = typeof option == 'object' && option; + + if (!data) { + $this.data('selectpicker', (data = new Selectpicker(this, $.extend({}, Selectpicker.DEFAULTS, $.fn.selectpicker.defaults || {}, $this.data(), options), event))); + } else if (options) { + for (var i in options) { + if (options.hasOwnProperty(i)) { + data.options[i] = options[i]; + } + } + } + + if (typeof option == 'string') { + //Copy the value of option, as once we shift the arguments + //it also shifts the value of option. + var property = option; + if (data[property] instanceof Function) { + [].shift.apply(args); + value = data[property].apply(data, args); + } else { + value = data.options[property]; + } + } + } + }); + + if (typeof value !== 'undefined') { + //noinspection JSUnusedAssignment + return value; + } else { + return chain; + } + }; + + $.fn.selectpicker.Constructor = Selectpicker; + + $(document) + .data('keycount', 0) + .on('keydown', '.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=menu], .bootstrap-select-searchbox input', Selectpicker.prototype.keydown) + .on('focusin.modal', '.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=menu], .bootstrap-select-searchbox input', function (e) { + e.stopPropagation(); + }); + +})(jQuery); diff --git a/modoboa/bower_components/bootstrap-select/dist/js/bootstrap-select.js.map b/modoboa/bower_components/bootstrap-select/dist/js/bootstrap-select.js.map new file mode 100644 index 000000000..a77865ea8 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/bootstrap-select.js.map @@ -0,0 +1 @@ +{"version":3,"file":"bootstrap-select.min.js","sources":["bootstrap-select.js"],"names":["$","expr","icontains","obj","index","meta","text","toUpperCase","indexOf","Selectpicker","element","options","e","stopPropagation","preventDefault","this","$element","$newElement","$button","$menu","$lis","title","attr","val","prototype","render","refresh","setStyle","selectAll","deselectAll","destroy","remove","show","hide","init","VERSION","DEFAULTS","style","size","selectedTextFormat","noneSelectedText","noneResultsText","countSelectedText","maxOptionsText","width","container","hideDisabled","showSubtext","showIcon","showContent","dropupAuto","header","liveSearch","actionsBox","multipleSeparator","iconBase","tickIcon","maxOptions","mobile","constructor","that","id","multiple","prop","autofocus","createView","after","find","$searchbox","undefined","click","focus","checkDisabled","clickListener","liveSearchListener","liHeight","setWidth","selectPosition","data","createDropdown","inputGroup","parent","hasClass","searchbox","actionsbox","drop","$drop","$li","createLi","append","reloadLi","destroyLi","_liA","_liHtml","optID","each","$this","optionClass","inline","html","subtext","icon","is","push","label","labelSubtext","labelIcon","createA","i","item","length","eq","classes","optgroup","updateLi","setDisabled","setSelected","tabIndex","selectedItems","map","toArray","join","max","split","notDisabled","replace","trim","status","addClass","buttonClass","removeClass","$selectClone","clone","end","appendTo","$menuClone","outerHeight","headerHeight","searchHeight","actionsHeight","setSize","menuHeight","selectOffsetTop","selectOffsetBot","menu","menuInner","selectHeight","divHeight","menuPadding","parseInt","css","$window","window","menuExtras","posVert","offset","top","scrollTop","height","getSize","minHeight","lisVis","not","toggleClass","max-height","overflow","min-height","overflow-y","Math","off","on","optIndex","slice","last","divLength","selectClone","ulWidth","btnWidth","pos","actualHeight","getPlacement","offsetHeight","left","offsetWidth","position","isDisabled","resize","target","closest","update","selected","disabled","removeAttr","setTimeout","clickedIndex","prevValue","prevIndex","$options","$option","state","$optgroup","maxOptionsGrp","blur","maxReached","filter","maxReachedGrp","maxOptionsArr","maxTxt","maxTxtGrp","$notify","optgroupID","has","trigger","delay","fadeOut","change","no_results","currentTarget","value","keydown","$items","$parent","next","first","prev","nextPrev","isActive","keyCodeMap",32,48,49,50,51,52,53,54,55,56,57,59,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,96,97,98,99,100,101,102,103,104,105,"test","String","fromCharCode","keyCode","toString","nextAll","prevAll","count","prevKey","keyIndex","toLowerCase","substring","document","fn","selectpicker","option","event","args","arguments","chain","hasOwnProperty","extend","defaults","property","Function","shift","apply","Constructor","jQuery"],"mappings":";;;;;;CAMA,SAAWA,GAET,YAEAA,GAAEC,KAAK,KAAKC,UAAY,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.min.js b/modoboa/bower_components/bootstrap-select/dist/js/bootstrap-select.min.js new file mode 100644 index 000000000..b04fd51d8 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/bootstrap-select.min.js @@ -0,0 +1,8 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 bootstrap-select + * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE) + */ +!function(a){"use strict";a.expr[":"].icontains=function(b,c,d){return a(b).text().toUpperCase().indexOf(d[3].toUpperCase())>=0};var b=function(c,d,e){e&&(e.stopPropagation(),e.preventDefault()),this.$element=a(c),this.$newElement=null,this.$button=null,this.$menu=null,this.$lis=null,this.options=d,null===this.options.title&&(this.options.title=this.$element.attr("title")),this.val=b.prototype.val,this.render=b.prototype.render,this.refresh=b.prototype.refresh,this.setStyle=b.prototype.setStyle,this.selectAll=b.prototype.selectAll,this.deselectAll=b.prototype.deselectAll,this.destroy=b.prototype.destroy,this.remove=b.prototype.destroy,this.show=b.prototype.show,this.hide=b.prototype.hide,this.init()};b.VERSION="1.6.0",b.DEFAULTS={style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",noneSelectedText:"Nothing selected",noneResultsText:"No results match",countSelectedText:"{0} of {1} selected",maxOptionsText:["Limit reached ({n} {var} max)","Group limit reached ({n} {var} max)",["items","item"]],width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,actionsBox:!1,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok",maxOptions:!1,mobile:!1},b.prototype={constructor:b,init:function(){var b=this,c=this.$element.attr("id");this.$element.hide(),this.multiple=this.$element.prop("multiple"),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"),void 0!==c&&(this.$button.attr("data-id",c),a('label[for="'+c+'"]').click(function(a){a.preventDefault(),b.$button.focus()})),this.checkDisabled(),this.clickListener(),this.options.liveSearch&&this.liveSearchListener(),this.render(),this.liHeight(),this.setStyle(),this.setWidth(),this.options.container&&this.selectPosition(),this.$menu.data("this",this),this.$newElement.data("this",this),this.options.mobile&&this.mobile()},createDropdown:function(){var b=this.multiple?" show-tick":"",c=this.$element.parent().hasClass("input-group")?" input-group-btn":"",d=this.autofocus?" autofocus":"",e=this.options.header?'
    '+this.options.header+"
    ":"",f=this.options.liveSearch?'':"",g=this.options.actionsBox?'
    ':"",h='
    ';return a(h)},createView:function(){var a=this.createDropdown(),b=this.createLi();return a.find("ul").append(b),a},reloadLi:function(){this.destroyLi();var a=this.createLi();this.$menu.find("ul").append(a)},destroyLi:function(){this.$menu.find("li").remove()},createLi:function(){var b=this,c=[],d="",e=0;return this.$element.find("option").each(function(){var d=a(this),f=d.attr("class")||"",g=d.attr("style")||"",h=d.data("content")?d.data("content"):d.html(),i=void 0!==d.data("subtext")?''+d.data("subtext")+"":"",j=void 0!==d.data("icon")?' ':"";if(""!==j&&(d.is(":disabled")||d.parent().is(":disabled"))&&(j=""+j+""),d.data("content")||(h=j+''+h+i+""),b.options.hideDisabled&&(d.is(":disabled")||d.parent().is(":disabled")))c.push('');else if(d.parent().is("optgroup")&&d.data("divider")!==!0)if(0===d.index()){var k=d.parent().attr("label"),l=void 0!==d.parent().data("subtext")?''+d.parent().data("subtext")+"":"",m=d.parent().data("icon")?' ':"";k=m+''+k+l+"",e+=1,c.push(0!==d[0].index?'
    '+k+"
    "+b.createA(h,"opt "+f,g,e):"
    "+k+"
    "+b.createA(h,"opt "+f,g,e))}else c.push(b.createA(h,"opt "+f,g,e));else c.push(d.data("divider")===!0?'
    ':a(this).data("hidden")===!0?"":b.createA(h,f,g))}),a.each(c,function(a,b){var c=""===b?'class="hide is-hidden"':"";d+='
  • "+b+"
  • "}),this.multiple||0!==this.$element.find("option:selected").length||this.options.title||this.$element.find("option").eq(0).prop("selected",!0).attr("selected","selected"),a(d)},createA:function(a,b,c,d){return'"+a+''},render:function(b){var c=this;b!==!1&&this.$element.find("option").each(function(b){c.setDisabled(b,a(this).is(":disabled")||a(this).parent().is(":disabled")),c.setSelected(b,a(this).is(":selected"))}),this.tabIndex();var d=this.$element.find("option:selected").map(function(){var b,d=a(this),e=d.data("icon")&&c.options.showIcon?' ':"";return b=c.options.showSubtext&&d.attr("data-subtext")&&!c.multiple?' '+d.data("subtext")+"":"",d.data("content")&&c.options.showContent?d.data("content"):void 0!==d.attr("title")?d.attr("title"):e+d.html()+b}).toArray(),e=this.multiple?d.join(this.options.multipleSeparator):d[0];if(this.multiple&&this.options.selectedTextFormat.indexOf("count")>-1){var f=this.options.selectedTextFormat.split(">"),g=this.options.hideDisabled?":not([disabled])":"";(f.length>1&&d.length>f[1]||1==f.length&&d.length>=2)&&(e=this.options.countSelectedText.replace("{0}",d.length).replace("{1}",this.$element.find('option:not([data-divider="true"], [data-hidden="true"])'+g).length))}this.options.title=this.$element.attr("title"),"static"==this.options.selectedTextFormat&&(e=this.options.title),e||(e=void 0!==this.options.title?this.options.title:this.options.noneSelectedText),this.$button.attr("title",a.trim(a("
    ").html(e).text()).replace(/\s\s+/g," ")),this.$newElement.find(".filter-option").html(e)},setStyle:function(a,b){this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|validate\[.*\]/gi,""));var c=a?a:this.options.style;"add"==b?this.$button.addClass(c):"remove"==b?this.$button.removeClass(c):(this.$button.removeClass(this.options.style),this.$button.addClass(c))},liHeight:function(){if(this.options.size!==!1){var a=this.$menu.parent().clone().find("> .dropdown-toggle").prop("autofocus",!1).end().appendTo("body"),b=a.addClass("open").find("> .dropdown-menu"),c=b.find("li > a").outerHeight(),d=this.options.header?b.find(".popover-title").outerHeight():0,e=this.options.liveSearch?b.find(".bootstrap-select-searchbox").outerHeight():0,f=this.options.actionsBox?b.find(".bs-actionsbox").outerHeight():0;a.remove(),this.$newElement.data("liHeight",c).data("headerHeight",d).data("searchHeight",e).data("actionsHeight",f)}},setSize:function(){var b,c,d,e=this,f=this.$menu,g=f.find(".inner"),h=this.$newElement.outerHeight(),i=this.$newElement.data("liHeight"),j=this.$newElement.data("headerHeight"),k=this.$newElement.data("searchHeight"),l=this.$newElement.data("actionsHeight"),m=f.find("li .divider").outerHeight(!0),n=parseInt(f.css("padding-top"))+parseInt(f.css("padding-bottom"))+parseInt(f.css("border-top-width"))+parseInt(f.css("border-bottom-width")),o=this.options.hideDisabled?":not(.disabled)":"",p=a(window),q=n+parseInt(f.css("margin-top"))+parseInt(f.css("margin-bottom"))+2,r=function(){c=e.$newElement.offset().top-p.scrollTop(),d=p.height()-c-h};if(r(),this.options.header&&f.css("padding-top",0),"auto"==this.options.size){var s=function(){var a,h=e.$lis.not(".hide");r(),b=d-q,e.options.dropupAuto&&e.$newElement.toggleClass("dropup",c>d&&b-q3?3*i+q-2:0,f.css({"max-height":b+"px",overflow:"hidden","min-height":a+j+k+l+"px"}),g.css({"max-height":b-j-k-l-n+"px","overflow-y":"auto","min-height":Math.max(a-n,0)+"px"})};s(),this.$searchbox.off("input.getSize propertychange.getSize").on("input.getSize propertychange.getSize",s),a(window).off("resize.getSize").on("resize.getSize",s),a(window).off("scroll.getSize").on("scroll.getSize",s)}else if(this.options.size&&"auto"!=this.options.size&&f.find("li"+o).length>this.options.size){var t=f.find("li"+o+" > *").not(".div-contain").slice(0,this.options.size).last().parent().index(),u=f.find("li").slice(0,t+1).find(".div-contain").length;b=i*this.options.size+u*m+n,e.options.dropupAuto&&this.$newElement.toggleClass("dropup",c>d&&b .dropdown-menu").css("width"),c=a.css("width","auto").find("> button").css("width");a.remove(),this.$newElement.css("width",Math.max(parseInt(b),parseInt(c))+"px")}else"fit"==this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width",""));this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement.removeClass("fit-width")},selectPosition:function(){var b,c,d=this,e="
    ",f=a(e),g=function(a){f.addClass(a.attr("class").replace(/form-control/gi,"")).toggleClass("dropup",a.hasClass("dropup")),b=a.offset(),c=a.hasClass("dropup")?0:a[0].offsetHeight,f.css({top:b.top+c,left:b.left,width:a[0].offsetWidth,position:"absolute"})};this.$newElement.on("click",function(){d.isDisabled()||(g(a(this)),f.appendTo(d.options.container),f.toggleClass("open",!a(this).hasClass("open")),f.append(d.$menu))}),a(window).resize(function(){g(d.$newElement)}),a(window).on("scroll",function(){g(d.$newElement)}),a("html").on("click",function(b){a(b.target).closest(d.$newElement).length<1&&f.removeClass("open")})},mobile:function(){this.$element.addClass("mobile-device").appendTo(this.$newElement),this.options.container&&this.$menu.hide()},refresh:function(){this.$lis=null,this.reloadLi(),this.render(),this.setWidth(),this.setStyle(),this.checkDisabled(),this.liHeight()},update:function(){this.reloadLi(),this.setWidth(),this.setStyle(),this.checkDisabled(),this.liHeight()},setSelected:function(b,c){null==this.$lis&&(this.$lis=this.$menu.find("li")),a(this.$lis[b]).toggleClass("selected",c)},setDisabled:function(b,c){null==this.$lis&&(this.$lis=this.$menu.find("li")),c?a(this.$lis[b]).addClass("disabled").find("a").attr("href","#").attr("tabindex",-1):a(this.$lis[b]).removeClass("disabled").find("a").removeAttr("href").attr("tabindex",0)},isDisabled:function(){return this.$element.is(":disabled")},checkDisabled:function(){var a=this;this.isDisabled()?this.$button.addClass("disabled").attr("tabindex",-1):(this.$button.hasClass("disabled")&&this.$button.removeClass("disabled"),-1==this.$button.attr("tabindex")&&(this.$element.data("tabindex")||this.$button.removeAttr("tabindex"))),this.$button.click(function(){return!a.isDisabled()})},tabIndex:function(){this.$element.is("[tabindex]")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex")))},clickListener:function(){var b=this;this.$newElement.on("touchstart.dropdown",".dropdown-menu",function(a){a.stopPropagation()}),this.$newElement.on("click",function(){b.setSize(),b.options.liveSearch||b.multiple||setTimeout(function(){b.$menu.find(".selected a").focus()},10)}),this.$menu.on("click","li a",function(c){var d=a(this).parent().index(),e=b.$element.val(),f=b.$element.prop("selectedIndex");if(b.multiple&&c.stopPropagation(),c.preventDefault(),!b.isDisabled()&&!a(this).parent().hasClass("disabled")){var g=b.$element.find("option"),h=g.eq(d),i=h.prop("selected"),j=h.parent("optgroup"),k=b.options.maxOptions,l=j.data("maxOptions")||!1;if(b.multiple){if(h.prop("selected",!i),b.setSelected(d,!i),a(this).blur(),k!==!1||l!==!1){var m=k
    ');if(k&&m||l&&n)if(k&&1==k)g.prop("selected",!1),h.prop("selected",!0),b.$menu.find(".selected").removeClass("selected"),b.setSelected(d,!0);else if(l&&1==l){j.find("option:selected").prop("selected",!1),h.prop("selected",!0);var s=a(this).data("optgroup");b.$menu.find(".selected").has('a[data-optgroup="'+s+'"]').removeClass("selected"),b.setSelected(d,!0)}else o[2]&&(p=p.replace("{var}",o[2][k>1?0:1]),q=q.replace("{var}",o[2][l>1?0:1])),h.prop("selected",!1),b.$menu.append(r),k&&m&&(r.append(a("
    "+p+"
    ")),b.$element.trigger("maxReached.bs.select")),l&&n&&(r.append(a("
    "+q+"
    ")),b.$element.trigger("maxReachedGrp.bs.select")),setTimeout(function(){b.setSelected(d,!1)},10),r.delay(750).fadeOut(300,function(){a(this).remove()})}}else g.prop("selected",!1),h.prop("selected",!0),b.$menu.find(".selected").removeClass("selected"),b.setSelected(d,!0);b.multiple?b.options.liveSearch&&b.$searchbox.focus():b.$button.focus(),(e!=b.$element.val()&&b.multiple||f!=b.$element.prop("selectedIndex")&&!b.multiple)&&b.$element.change()}}),this.$menu.on("click","li.disabled a, li dt, li .div-contain, .popover-title, .popover-title :not(.close)",function(a){a.target==this&&(a.preventDefault(),a.stopPropagation(),b.options.liveSearch?b.$searchbox.focus():b.$button.focus())}),this.$menu.on("click",".popover-title .close",function(){b.$button.focus()}),this.$searchbox.on("click",function(a){a.stopPropagation()}),this.$menu.on("click",".actions-btn",function(c){b.options.liveSearch?b.$searchbox.focus():b.$button.focus(),c.preventDefault(),c.stopPropagation(),a(this).is(".bs-select-all")?b.selectAll():b.deselectAll(),b.$element.change()}),this.$element.change(function(){b.render(!1)})},liveSearchListener:function(){var b=this,c=a('
  • ');this.$newElement.on("click.dropdown.data-api",function(){b.$menu.find(".active").removeClass("active"),b.$searchbox.val()&&(b.$searchbox.val(""),b.$lis.not(".is-hidden").removeClass("hide"),c.parent().length&&c.remove()),b.multiple||b.$menu.find(".selected").addClass("active"),setTimeout(function(){b.$searchbox.focus()},10)}),this.$searchbox.on("input propertychange",function(){b.$searchbox.val()?(b.$lis.not(".is-hidden").removeClass("hide").find("a").not(":icontains("+b.$searchbox.val()+")").parent().addClass("hide"),b.$menu.find("li").filter(":visible:not(.no-results)").length?c.parent().length&&c.remove():(c.parent().length&&c.remove(),c.html(b.options.noneResultsText+' "'+b.$searchbox.val()+'"').show(),b.$menu.find("li").last().after(c))):(b.$lis.not(".is-hidden").removeClass("hide"),c.parent().length&&c.remove()),b.$menu.find("li.active").removeClass("active"),b.$menu.find("li").filter(":visible:not(.divider)").eq(0).addClass("active").find("a").focus(),a(this).focus()}),this.$menu.on("mouseenter","a",function(c){b.$menu.find(".active").removeClass("active"),a(c.currentTarget).parent().not(".disabled").addClass("active")}),this.$menu.on("mouseleave","a",function(){b.$menu.find(".active").removeClass("active")})},val:function(a){return void 0!==a?(this.$element.val(a),this.$element.change(),this.render(),this.$element):this.$element.val()},selectAll:function(){null==this.$lis&&(this.$lis=this.$menu.find("li")),this.$element.find("option:enabled").prop("selected",!0),a(this.$lis).not(".disabled").addClass("selected"),this.render(!1)},deselectAll:function(){null==this.$lis&&(this.$lis=this.$menu.find("li")),this.$element.find("option:enabled").prop("selected",!1),a(this.$lis).not(".disabled").removeClass("selected"),this.render(!1)},keydown:function(b){var c,d,e,f,g,h,i,j,k,l,m,n,o={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"};if(c=a(this),e=c.parent(),c.is("input")&&(e=c.parent().parent()),l=e.data("this"),l.options.liveSearch&&(e=c.parent().parent()),l.options.container&&(e=l.$menu),d=a("[role=menu] li:not(.divider) a",e),n=l.$menu.parent().hasClass("open"),!n&&/([0-9]|[A-z])/.test(String.fromCharCode(b.keyCode))&&(l.options.container?l.$newElement.trigger("click"):(l.setSize(),l.$menu.parent().addClass("open"),n=!0),l.$searchbox.focus()),l.options.liveSearch&&(/(^9$|27)/.test(b.keyCode.toString(10))&&n&&0===l.$menu.find(".active").length&&(b.preventDefault(),l.$menu.parent().removeClass("open"),l.$button.focus()),d=a("[role=menu] li:not(.divider):visible",e),c.val()||/(38|40)/.test(b.keyCode.toString(10))||0===d.filter(".active").length&&(d=l.$newElement.find("li").filter(":icontains("+o[b.keyCode]+")"))),d.length){if(/(38|40)/.test(b.keyCode.toString(10)))f=d.index(d.filter(":focus")),h=d.parent(":not(.disabled):visible").first().index(),i=d.parent(":not(.disabled):visible").last().index(),g=d.eq(f).parent().nextAll(":not(.disabled):visible").eq(0).index(),j=d.eq(f).parent().prevAll(":not(.disabled):visible").eq(0).index(),k=d.eq(g).parent().prevAll(":not(.disabled):visible").eq(0).index(),l.options.liveSearch&&(d.each(function(b){a(this).is(":not(.disabled)")&&a(this).data("index",b)}),f=d.index(d.filter(".active")),h=d.filter(":not(.disabled):visible").first().data("index"),i=d.filter(":not(.disabled):visible").last().data("index"),g=d.eq(f).nextAll(":not(.disabled):visible").eq(0).data("index"),j=d.eq(f).prevAll(":not(.disabled):visible").eq(0).data("index"),k=d.eq(g).prevAll(":not(.disabled):visible").eq(0).data("index")),m=c.data("prevIndex"),38==b.keyCode&&(l.options.liveSearch&&(f-=1),f!=k&&f>j&&(f=j),h>f&&(f=h),f==m&&(f=i)),40==b.keyCode&&(l.options.liveSearch&&(f+=1),-1==f&&(f=0),f!=k&&g>f&&(f=g),f>i&&(f=i),f==m&&(f=h)),c.data("prevIndex",f),l.options.liveSearch?(b.preventDefault(),c.is(".dropdown-toggle")||(d.removeClass("active"),d.eq(f).addClass("active").find("a").focus(),c.focus())):d.eq(f).focus();else if(!c.is("input")){var p,q,r=[];d.each(function(){a(this).parent().is(":not(.disabled)")&&a.trim(a(this).text().toLowerCase()).substring(0,1)==o[b.keyCode]&&r.push(a(this).parent().index())}),p=a(document).data("keycount"),p++,a(document).data("keycount",p),q=a.trim(a(":focus").text().toLowerCase()).substring(0,1),q!=o[b.keyCode]?(p=1,a(document).data("keycount",p)):p>=r.length&&(a(document).data("keycount",0),p>r.length&&(p=1)),d.eq(r[p-1]).focus()}/(13|32)/.test(b.keyCode.toString(10))&&n&&(/(32)/.test(b.keyCode.toString(10))||b.preventDefault(),l.options.liveSearch?/(32)/.test(b.keyCode.toString(10))||(l.$menu.find(".active a").click(),c.focus()):a(":focus").click(),a(document).data("keycount",0)),(/(^9$|27)/.test(b.keyCode.toString(10))&&n&&(l.multiple||l.options.liveSearch)||/(27)/.test(b.keyCode.toString(10))&&!n)&&(l.$menu.parent().removeClass("open"),l.$button.focus())}},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},destroy:function(){this.$newElement.remove(),this.$element.remove()}},a.fn.selectpicker=function(c,d){var e,f=arguments,g=this.each(function(){if(a(this).is("select")){var g=a(this),h=g.data("selectpicker"),i="object"==typeof c&&c;if(h){if(i)for(var j in i)i.hasOwnProperty(j)&&(h.options[j]=i[j])}else g.data("selectpicker",h=new b(this,a.extend({},b.DEFAULTS,a.fn.selectpicker.defaults||{},g.data(),i),d));if("string"==typeof c){var k=c;h[k]instanceof Function?([].shift.apply(f),e=h[k].apply(h,f)):e=h.options[k]}}});return"undefined"!=typeof e?e:g},a.fn.selectpicker.Constructor=b,a(document).data("keycount",0).on("keydown",".bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=menu], .bootstrap-select-searchbox input",b.prototype.keydown).on("focusin.modal",".bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=menu], .bootstrap-select-searchbox input",function(a){a.stopPropagation()})}(jQuery); +//# sourceMappingURL=bootstrap-select.js.map \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-cs_CZ.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-cs_CZ.js new file mode 100644 index 000000000..8a280628d --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-cs_CZ.js @@ -0,0 +1,15 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 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', + 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)); diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-cs_CZ.min.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-cs_CZ.min.js new file mode 100644 index 000000000..0a9b599c6 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-cs_CZ.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 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); \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-de_DE.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-de_DE.js new file mode 100644 index 000000000..117683e34 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-de_DE.js @@ -0,0 +1,15 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 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', + countSelectedText: '{0} von {1} ausgewählt', + maxOptionsText: ['Limit erreicht ({n} {var} max.)', 'Gruppen-Limit erreicht ({n} {var} max.)', ['Eintrag', 'Einträge']], + multipleSeparator: ', ' + }; +}(jQuery)); diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-de_DE.min.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-de_DE.min.js new file mode 100644 index 000000000..5a4c5571b --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-de_DE.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 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); \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-en_US.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-en_US.js new file mode 100644 index 000000000..1c225035d --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-en_US.js @@ -0,0 +1,15 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 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', + countSelectedText: '{0} of {1} selected', + maxOptionsText: ['Limit reached ({n} {var} max)', 'Group limit reached ({n} {var} max)', ['items', 'item']], + multipleSeparator: ', ' + }; +}(jQuery)); diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-en_US.min.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-en_US.min.js new file mode 100644 index 000000000..695967054 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-en_US.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 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:"{0} of {1} selected",maxOptionsText:["Limit reached ({n} {var} max)","Group limit reached ({n} {var} max)",["items","item"]],multipleSeparator:", "}}(jQuery); \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-es_CL.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-es_CL.js new file mode 100644 index 000000000..f4f0ca968 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-es_CL.js @@ -0,0 +1,15 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 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', + countSelectedText: 'Seleccionados {0} de {1}', + maxOptionsText: ['Límite alcanzado ({n} {var} max)', 'Límite del grupo alcanzado({n} {var} max)', ['elementos', 'element']], + multipleSeparator: ', ' + }; +}(jQuery)); diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-es_CL.min.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-es_CL.min.js new file mode 100644 index 000000000..bc5bb00dc --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-es_CL.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 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); \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-eu.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-eu.js new file mode 100644 index 000000000..3247cb707 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-eu.js @@ -0,0 +1,15 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 bootstrap-select + * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE) + */ +(function ($) { + $.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)); diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-eu.min.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-eu.min.js new file mode 100644 index 000000000..04fb91a77 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-eu.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 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); \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-fr_FR.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-fr_FR.js new file mode 100644 index 000000000..de25d10b8 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-fr_FR.js @@ -0,0 +1,15 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 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', + countSelectedText: '{0} sur {1} sélection(s)', + maxOptionsText: ['Limite atteinte ({n} {var} max)', 'Limite du groupe atteinte ({n} {var} max)', ['éléments', 'élément']], + multipleSeparator: ', ' + }; +}(jQuery)); diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-fr_FR.min.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-fr_FR.min.js new file mode 100644 index 000000000..057ec2a81 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-fr_FR.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 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:"{0} sur {1} sélection(s)",maxOptionsText:["Limite atteinte ({n} {var} max)","Limite du groupe atteinte ({n} {var} max)",["éléments","élément"]],multipleSeparator:", "}}(jQuery); \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-it_IT.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-it_IT.js new file mode 100644 index 000000000..ee35d8f24 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-it_IT.js @@ -0,0 +1,15 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 bootstrap-select + * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE) + */ +(function ($) { + $.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)); diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-it_IT.min.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-it_IT.min.js new file mode 100644 index 000000000..2c2e451cf --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-it_IT.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 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); \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-nl_NL.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-nl_NL.js new file mode 100644 index 000000000..f7d01dc38 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-nl_NL.js @@ -0,0 +1,15 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 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', + countSelectedText: '{0} van {1} geselecteerd', + maxOptionsText: ['Limiet bereikt ({n} {var} max)', 'Groep limiet bereikt ({n} {var} max)', ['items', 'item']], + multipleSeparator: ', ' + }; +}(jQuery)); diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-nl_NL.min.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-nl_NL.min.js new file mode 100644 index 000000000..66ab640ec --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-nl_NL.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 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); \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-pl_PL.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-pl_PL.js new file mode 100644 index 000000000..93a151779 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-pl_PL.js @@ -0,0 +1,15 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 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', + countSelectedText: 'Zaznaczono {0} z {1}', + maxOptionsText: ['Osiągnięto limit ({n} {var} max)', 'Limit grupy osiągnięty ({n} {var} max)', ['elementy', 'element']], + multipleSeparator: ', ' + }; +}(jQuery)); diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-pl_PL.min.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-pl_PL.min.js new file mode 100644 index 000000000..0aaceeb77 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-pl_PL.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 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"]],multipleSeparator:", "}}(jQuery); \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-pt_BR.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-pt_BR.js new file mode 100644 index 000000000..01da58ea4 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-pt_BR.js @@ -0,0 +1,15 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 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', + countSelectedText: 'Selecionado {0} de {1}', + maxOptionsText: ['Limite excedido (máx. {n} {var})', 'Limite do grupo excedido (máx. {n} {var})', ['itens', 'item']], + multipleSeparator: ', ' + }; +}(jQuery)); diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-pt_BR.min.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-pt_BR.min.js new file mode 100644 index 000000000..8594d7837 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-pt_BR.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 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); \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-ru_RU.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-ru_RU.js new file mode 100644 index 000000000..d7b1f2ff8 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-ru_RU.js @@ -0,0 +1,15 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 bootstrap-select + * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE) + */ +(function ($) { + $.fn.selectpicker.defaults = { + noneSelectedText: 'Ничего не выбрано', + noneResultsText: 'Не найдено совпадений', + countSelectedText: 'Выбрано {0} из {1}', + maxOptionsText: ['Достигнут предел ({n} {var} максимум)', 'Достигнут предел в группе ({n} {var} максимум)', ['items', 'item']], + multipleSeparator: ', ' + }; +}(jQuery)); diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-ru_RU.min.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-ru_RU.min.js new file mode 100644 index 000000000..ff042b708 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-ru_RU.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 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); \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-zh_CN.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-zh_CN.js new file mode 100644 index 000000000..199f8ca36 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-zh_CN.js @@ -0,0 +1,15 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 bootstrap-select + * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE) + */ +(function ($) { + $.fn.selectpicker.defaults = { + noneSelectedText: '没有选中任何项', + noneResultsText: '没有找到匹配项', + countSelectedText: '选中{1}中的{0}项', + maxOptionsText: ['超出限制 (最多选择{n}项)', '组选择超出限制(最多选择{n}组)'], + multipleSeparator: ', ' + }; +}(jQuery)); diff --git a/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-zh_CN.min.js b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-zh_CN.min.js new file mode 100644 index 000000000..112720ba1 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/dist/js/i18n/defaults-zh_CN.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap-select v1.6.0 (http://silviomoreto.github.io/bootstrap-select/) + * + * Copyright 2013-2014 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); \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/i18n/defaults-cs-CZ.js b/modoboa/bower_components/bootstrap-select/i18n/defaults-cs-CZ.js deleted file mode 100644 index 455976178..000000000 --- a/modoboa/bower_components/bootstrap-select/i18n/defaults-cs-CZ.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Translated default messages for bootstrap-select. - * Locale: CZ (Czech Republic) - * Region: EU - */ -(function($) { - $.fn.selectpicker.defaults = { - style: 'btn-default', - size: 'auto', - title: null, - selectedTextFormat : 'values', - noneSelectedText : 'Nic není výbrá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']], - width: false, - container: false, - hideDisabled: false, - showSubtext: false, - showIcon: true, - showContent: true, - dropupAuto: true, - header: false, - liveSearch: false, - multipleSeparator: ', ', - iconBase: 'glyphicon', - tickIcon: 'glyphicon-ok' - }; -}(jQuery)); diff --git a/modoboa/bower_components/bootstrap-select/i18n/defaults-cz-CZ.min.js b/modoboa/bower_components/bootstrap-select/i18n/defaults-cz-CZ.min.js deleted file mode 100644 index e6e0887c4..000000000 --- a/modoboa/bower_components/bootstrap-select/i18n/defaults-cz-CZ.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Translated default messages for bootstrap-select. - * Locale: CZ (Czech Republic) - * Region: EU - */ -(function(e){e.fn.selectpicker.defaults={style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",noneSelectedText:"Nic není výbrá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"]],width:false,container:false,hideDisabled:false,showSubtext:false,showIcon:true,showContent:true,dropupAuto:true,header:false,liveSearch:false,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok"}})(jQuery) \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/i18n/defaults-de_DE.js b/modoboa/bower_components/bootstrap-select/i18n/defaults-de_DE.js deleted file mode 100644 index 3a36cada0..000000000 --- a/modoboa/bower_components/bootstrap-select/i18n/defaults-de_DE.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Translated default messages for bootstrap-select. - * Locale: DE (German, deutsch) - * Region: DE (Germany, Deutschland) - */ -(function($) { - $.fn.selectpicker.defaults = { - style: 'btn-default', - size: 'auto', - title: null, - selectedTextFormat : 'ausgewählt', - 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']], - width: false, - container: false, - hideDisabled: false, - showSubtext: false, - showIcon: true, - showContent: true, - dropupAuto: true, - header: false, - liveSearch: false, - multipleSeparator: ', ', - iconBase: 'glyphicon', - tickIcon: 'glyphicon-ok' - }; -}(jQuery)); diff --git a/modoboa/bower_components/bootstrap-select/i18n/defaults-de_DE.min.js b/modoboa/bower_components/bootstrap-select/i18n/defaults-de_DE.min.js deleted file mode 100644 index 13751dd86..000000000 --- a/modoboa/bower_components/bootstrap-select/i18n/defaults-de_DE.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Translated default messages for bootstrap-select. - * Locale: DE (German, deutsch) - * Region: DE (Germany, Deutschland) - */ -(function(e){e.fn.selectpicker.defaults={style:"btn-default",size:"auto",title:null,selectedTextFormat:"ausgewählt",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"]],width:false,container:false,hideDisabled:false,showSubtext:false,showIcon:true,showContent:true,dropupAuto:true,header:false,liveSearch:false,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok"}})(jQuery) diff --git a/modoboa/bower_components/bootstrap-select/i18n/defaults-es-CL.js b/modoboa/bower_components/bootstrap-select/i18n/defaults-es-CL.js deleted file mode 100644 index 1f7683355..000000000 --- a/modoboa/bower_components/bootstrap-select/i18n/defaults-es-CL.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Translated default messages for bootstrap-select. - * Locale: ES (Spanish) - * Region: CL (Chile) - */ -(function($) { - $.fn.selectpicker.defaults = { - style: 'btn-default', - size: 'auto', - title: null, - selectedTextFormat : 'values', - 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']], - width: false, - container: false, - hideDisabled: false, - showSubtext: false, - showIcon: true, - showContent: true, - dropupAuto: true, - header: false, - liveSearch: false, - multipleSeparator: ', ', - iconBase: 'glyphicon', - tickIcon: 'glyphicon-ok' - }; -}(jQuery)); diff --git a/modoboa/bower_components/bootstrap-select/i18n/defaults-es-CL.min.js b/modoboa/bower_components/bootstrap-select/i18n/defaults-es-CL.min.js deleted file mode 100644 index 51a34dc5f..000000000 --- a/modoboa/bower_components/bootstrap-select/i18n/defaults-es-CL.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Translated default messages for bootstrap-select. - * Locale: ES (Spanish) - * Region: CL (Chile) - */ -(function(e){e.fn.selectpicker.defaults={style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",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"]],width:false,container:false,hideDisabled:false,showSubtext:false,showIcon:true,showContent:true,dropupAuto:true,header:false,liveSearch:false,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok"}})(jQuery) diff --git a/modoboa/bower_components/bootstrap-select/i18n/defaults-eu.js b/modoboa/bower_components/bootstrap-select/i18n/defaults-eu.js deleted file mode 100644 index d56f43391..000000000 --- a/modoboa/bower_components/bootstrap-select/i18n/defaults-eu.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Translated default messages for bootstrap-select. - * Locale: EU (Basque) - * Region: - */ -(function($) { - $.fn.selectpicker.defaults = { - style: 'btn-default', - size: 'auto', - title: null, - selectedTextFormat : 'values', - 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']], - width: false, - container: false, - hideDisabled: false, - showSubtext: false, - showIcon: true, - showContent: true, - dropupAuto: true, - header: false, - liveSearch: false, - multipleSeparator: ', ', - iconBase: 'glyphicon', - tickIcon: 'glyphicon-ok' - }; -}(jQuery)); - diff --git a/modoboa/bower_components/bootstrap-select/i18n/defaults-eu.min.js b/modoboa/bower_components/bootstrap-select/i18n/defaults-eu.min.js deleted file mode 100644 index 96b0bce93..000000000 --- a/modoboa/bower_components/bootstrap-select/i18n/defaults-eu.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Translated default messages for bootstrap-select. - * Locale: EU (Basque) - * Region: - */ -(function(e){e.fn.selectpicker.defaults={style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",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"]],width:false,container:false,hideDisabled:false,showSubtext:false,showIcon:true,showContent:true,dropupAuto:true,header:false,liveSearch:false,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok"}})(jQuery) diff --git a/modoboa/bower_components/bootstrap-select/i18n/defaults-it_IT.js b/modoboa/bower_components/bootstrap-select/i18n/defaults-it_IT.js deleted file mode 100644 index d920bc1fe..000000000 --- a/modoboa/bower_components/bootstrap-select/i18n/defaults-it_IT.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Translated default messages for bootstrap-select. - * Locale: IT (Italian; italiano) - * Region: IT (Italy; Italia) - * Author: Michele Beltrame - */ -(function($) { - $.fn.selectpicker.defaults = { - style: 'btn-default', - size: 'auto', - title: null, - selectedTextFormat : 'values', - 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']], - width: false, - container: false, - hideDisabled: false, - showSubtext: false, - showIcon: true, - showContent: true, - dropupAuto: true, - header: false, - liveSearch: false, - actionsBox: false, - multipleSeparator: ', ', - iconBase: 'glyphicon', - tickIcon: 'glyphicon-ok', - maxOptions: false - }; -}(jQuery)); diff --git a/modoboa/bower_components/bootstrap-select/i18n/defaults-it_IT.min.js b/modoboa/bower_components/bootstrap-select/i18n/defaults-it_IT.min.js deleted file mode 100644 index fdd731dfd..000000000 --- a/modoboa/bower_components/bootstrap-select/i18n/defaults-it_IT.min.js +++ /dev/null @@ -1 +0,0 @@ -(function($){$.fn.selectpicker.defaults={style:'btn-default',size:'auto',title:null,selectedTextFormat:'values',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']],width:false,container:false,hideDisabled:false,showSubtext:false,showIcon:true,showContent:true,dropupAuto:true,header:false,liveSearch:false,actionsBox:false,multipleSeparator:', ',iconBase:'glyphicon',tickIcon:'glyphicon-ok',maxOptions:false}}(jQuery)); \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/i18n/defaults-nl_NL.js b/modoboa/bower_components/bootstrap-select/i18n/defaults-nl_NL.js deleted file mode 100644 index 6d7d0ac2b..000000000 --- a/modoboa/bower_components/bootstrap-select/i18n/defaults-nl_NL.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Translated default messages for bootstrap-select. - * Locale: NL (Dutch; Nederlands) - * Region: EU (Europe) - * Author: Daan Rosbergen (Badmuts) - */ -(function($) { - $.fn.selectpicker.defaults = { - style: 'btn-default', - size: 'auto', - title: null, - selectedTextFormat : 'values', - 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']], - width: false, - container: false, - hideDisabled: false, - showSubtext: false, - showIcon: true, - showContent: true, - dropupAuto: true, - header: false, - liveSearch: false, - actionsBox: false, - multipleSeparator: ', ', - iconBase: 'glyphicon', - tickIcon: 'glyphicon-ok', - maxOptions: false - }; -}(jQuery)); \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/i18n/defaults-nl_NL.min.js b/modoboa/bower_components/bootstrap-select/i18n/defaults-nl_NL.min.js deleted file mode 100644 index f5bfd75ad..000000000 --- a/modoboa/bower_components/bootstrap-select/i18n/defaults-nl_NL.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Translated default messages for bootstrap-select. - * Locale: NL (Dutch; Nederlands) - * Region: EU (Europe) - * Author: Daan Rosbergen (Badmuts) - */ - (function(a){a.fn.selectpicker.defaults={style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",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"]],width:false,container:false,hideDisabled:false,showSubtext:false,showIcon:true,showContent:true,dropupAuto:true,header:false,liveSearch:false,actionsBox:false,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok",maxOptions:false}}(jQuery)); \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/i18n/defaults-pl_PL.js b/modoboa/bower_components/bootstrap-select/i18n/defaults-pl_PL.js deleted file mode 100644 index 2fa1a4a27..000000000 --- a/modoboa/bower_components/bootstrap-select/i18n/defaults-pl_PL.js +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Translated default messages for bootstrap-select. - * Locale: PL (Polish) - * Region: EU (Europe) - */ -(function($) { - $.fn.selectpicker.defaults = { - style: 'btn-default', - size: 'auto', - title: null, - selectedTextFormat : 'values', - 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']], - width: false, - container: false, - hideDisabled: false, - showSubtext: false, - showIcon: true, - showContent: true, - dropupAuto: true, - header: false, - liveSearch: false, - multipleSeparator: ', ', - iconBase: 'glyphicon', - tickIcon: 'glyphicon-ok' - }; -}(jQuery)); diff --git a/modoboa/bower_components/bootstrap-select/i18n/defaults-pl_PL.min.js b/modoboa/bower_components/bootstrap-select/i18n/defaults-pl_PL.min.js deleted file mode 100644 index f70bf168e..000000000 --- a/modoboa/bower_components/bootstrap-select/i18n/defaults-pl_PL.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Translated default messages for bootstrap-select. - * Locale: PL (Polish) - * Region: EU (Europe) - */ -(function(e){e.fn.selectpicker.defaults={style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",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"]],width:false,container:false,hideDisabled:false,showSubtext:false,showIcon:true,showContent:true,dropupAuto:true,header:false,liveSearch:false,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok"}})(jQuery) diff --git a/modoboa/bower_components/bootstrap-select/i18n/defaults-pt_BR.js b/modoboa/bower_components/bootstrap-select/i18n/defaults-pt_BR.js deleted file mode 100644 index 79c5ef441..000000000 --- a/modoboa/bower_components/bootstrap-select/i18n/defaults-pt_BR.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Translated default messages for bootstrap-select. - * Locale: PT (Portuguese; português) - * Region: BR (Brazil; Brasil) - * Author: Rodrigo de Avila - */ -(function($) { - $.fn.selectpicker.defaults = { - style: 'btn-default', - size: 'auto', - title: null, - selectedTextFormat : 'values', - 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']], - width: false, - container: false, - hideDisabled: false, - showSubtext: false, - showIcon: true, - showContent: true, - dropupAuto: true, - header: false, - liveSearch: false, - actionsBox: false, - multipleSeparator: ', ', - iconBase: 'glyphicon', - tickIcon: 'glyphicon-ok', - maxOptions: false - }; -}(jQuery)); - \ No newline at end of file diff --git a/modoboa/bower_components/bootstrap-select/i18n/defaults-pt_BR.min.js b/modoboa/bower_components/bootstrap-select/i18n/defaults-pt_BR.min.js deleted file mode 100644 index 5cb0b1e37..000000000 --- a/modoboa/bower_components/bootstrap-select/i18n/defaults-pt_BR.min.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Translated default messages for bootstrap-select. - * Locale: PT (Portuguese; português) - * Region: BR (Brazil; Brasil) - * Author: Rodrigo de Avila - */ -!function(a){a.fn.selectpicker.defaults={style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",noneSelectedText:"Nada selecionado",noneResultsText:"Nada encontrado contendo",countSelectedText:"Selecionado {0} de {1}",maxOptionsText:["Limite excedido (m\xe1x. {n} {var})","Limite do grupo excedido (m\xe1x. {n} {var})",["itens","item"]],width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,actionsBox:!1,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok",maxOptions:!1}}(jQuery); diff --git a/modoboa/bower_components/bootstrap-select/i18n/defaults-ru-RU.js b/modoboa/bower_components/bootstrap-select/i18n/defaults-ru-RU.js deleted file mode 100644 index f7b6ab9bf..000000000 --- a/modoboa/bower_components/bootstrap-select/i18n/defaults-ru-RU.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Translated default messages for bootstrap-select. - * Locale: RU (Russian; Русский) - * Region: RU (Russian Federation) - */ -(function($) { - $.fn.selectpicker.defaults = { - style: 'btn-default', - size: 'auto', - title: null, - selectedTextFormat : 'values', - noneSelectedText : 'Ничего не выбрано', - noneResultsText : 'Не найдено совпадений', - countSelectedText : 'Выбрано {0} из {1}', - maxOptionsText: ['Достигнут предел ({n} {var} максимум)', 'Достигнут предел в группе ({n} {var} максимум)', ['items','item']], - width: false, - container: false, - hideDisabled: false, - showSubtext: false, - showIcon: true, - showContent: true, - dropupAuto: true, - header: false, - liveSearch: false, - actionsBox: false, - multipleSeparator: ', ', - iconBase: 'glyphicon', - tickIcon: 'glyphicon-ok', - maxOptions: false - }; -}(jQuery)); diff --git a/modoboa/bower_components/bootstrap-select/i18n/defaults-ru_RU.min.js b/modoboa/bower_components/bootstrap-select/i18n/defaults-ru_RU.min.js deleted file mode 100644 index 7399ba3e6..000000000 --- a/modoboa/bower_components/bootstrap-select/i18n/defaults-ru_RU.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Translated default messages for bootstrap-select. - * Locale: RU (Russian; Русский) - * Region: RU (Russian Federation) - */ -(function(e){e.fn.selectpicker.defaults={style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",noneSelectedText:"Ничего не выбрано",noneResultsText:"Не нейдено Совпадений",countSelectedText:"Выбрано {0} из {1}",maxOptionsText:["Достигнут предел ({n} {var} максимум)","Достигнут предел в группе ({n} {var} максимум)",["items","item"]],width:false,container:false,hideDisabled:false,showSubtext:false,showIcon:true,showContent:true,dropupAuto:true,header:false,liveSearch:false,actionsBox:false,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok",maxOptions:false}})(jQuery) diff --git a/modoboa/bower_components/bootstrap-select/i18n/defaults-zh_CN.js b/modoboa/bower_components/bootstrap-select/i18n/defaults-zh_CN.js deleted file mode 100644 index b110423f0..000000000 --- a/modoboa/bower_components/bootstrap-select/i18n/defaults-zh_CN.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Translated default messages for bootstrap-select. - * Locale: zh_CN (Chinese) - * Region: - */ -(function($) { - $.fn.selectpicker.defaults = { - style: 'btn-default', - size: 'auto', - title: null, - selectedTextFormat : 'values', - noneSelectedText : '没有选中任何项', - noneResultsText : '没有找到匹配项', - countSelectedText : '选中{1}中的{0}项', - maxOptionsText: ['超出限制 (最多选择{n}项)', '组选择超出限制(最多选择{n}组)'], - width: false, - container: false, - hideDisabled: false, - showSubtext: false, - showIcon: true, - showContent: true, - dropupAuto: true, - header: false, - liveSearch: false, - multipleSeparator: ', ', - iconBase: 'glyphicon', - tickIcon: 'glyphicon-ok' - }; -}(jQuery)); - diff --git a/modoboa/bower_components/bootstrap-select/i18n/defaults-zh_CN.min.js b/modoboa/bower_components/bootstrap-select/i18n/defaults-zh_CN.min.js deleted file mode 100644 index 1d74269b7..000000000 --- a/modoboa/bower_components/bootstrap-select/i18n/defaults-zh_CN.min.js +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Translated default messages for bootstrap-select. - * Locale: zh_CN (Chinese) - * Region: - */ -(function(a){a.fn.selectpicker.defaults={style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",noneSelectedText:"没有选中任何项",noneResultsText:"没有找到匹配项",countSelectedText:"选中{1}中的{0}项",maxOptionsText:["超出限制 (最多选择{n}项)","组选择超出限制(最多选择{n}组)"],width:false,container:false,hideDisabled:false,showSubtext:false,showIcon:true,showContent:true,dropupAuto:true,header:false,liveSearch:false,multipleSeparator:", ",iconBase:"glyphicon",tickIcon:"glyphicon-ok"}}(jQuery)); diff --git a/modoboa/bower_components/bootstrap-select/js/bootstrap-select.js b/modoboa/bower_components/bootstrap-select/js/bootstrap-select.js new file mode 100644 index 000000000..22cb743a5 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/js/bootstrap-select.js @@ -0,0 +1,1024 @@ +(function ($) { + + 'use strict'; + + $.expr[':'].icontains = function (obj, index, meta) { + return $(obj).text().toUpperCase().indexOf(meta[3].toUpperCase()) >= 0; + }; + + var Selectpicker = function (element, options, e) { + if (e) { + e.stopPropagation(); + e.preventDefault(); + } + + this.$element = $(element); + this.$newElement = null; + this.$button = null; + this.$menu = null; + this.$lis = null; + this.options = options; + + //If we have no title yet, check the attribute 'title' (this is missed by jq as its not a data-attribute + if (this.options.title === null) { + this.options.title = this.$element.attr('title'); + } + + //Expose public methods + this.val = Selectpicker.prototype.val; + this.render = Selectpicker.prototype.render; + this.refresh = Selectpicker.prototype.refresh; + this.setStyle = Selectpicker.prototype.setStyle; + this.selectAll = Selectpicker.prototype.selectAll; + this.deselectAll = Selectpicker.prototype.deselectAll; + this.destroy = Selectpicker.prototype.destroy; + this.remove = Selectpicker.prototype.destroy; + this.show = Selectpicker.prototype.show; + this.hide = Selectpicker.prototype.hide; + + this.init(); + }; + + Selectpicker.VERSION = '1.6.0'; + + // part of this is duplicated in i18n/defaults-en_US.js. Make sure to update both. + Selectpicker.DEFAULTS = { + style: 'btn-default', + size: 'auto', + title: null, + selectedTextFormat: 'values', + noneSelectedText: 'Nothing selected', + noneResultsText: 'No results match', + countSelectedText: '{0} of {1} selected', + maxOptionsText: ['Limit reached ({n} {var} max)', 'Group limit reached ({n} {var} max)', ['items', 'item']], + width: false, + container: false, + hideDisabled: false, + showSubtext: false, + showIcon: true, + showContent: true, + dropupAuto: true, + header: false, + liveSearch: false, + actionsBox: false, + multipleSeparator: ', ', + iconBase: 'glyphicon', + tickIcon: 'glyphicon-ok', + maxOptions: false, + mobile: false + }; + + Selectpicker.prototype = { + + constructor: Selectpicker, + + init: function () { + var that = this, + id = this.$element.attr('id'); + + this.$element.hide(); + this.multiple = this.$element.prop('multiple'); + 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'); + + if (id !== undefined) { + this.$button.attr('data-id', id); + $('label[for="' + id + '"]').click(function (e) { + e.preventDefault(); + that.$button.focus(); + }); + } + + this.checkDisabled(); + this.clickListener(); + if (this.options.liveSearch) this.liveSearchListener(); + this.render(); + this.liHeight(); + this.setStyle(); + this.setWidth(); + if (this.options.container) this.selectPosition(); + this.$menu.data('this', this); + this.$newElement.data('this', this); + if (this.options.mobile) this.mobile(); + }, + + createDropdown: function () { + //If we are multiple, then add the show-tick class by default + var multiple = this.multiple ? ' show-tick' : ''; + var inputGroup = this.$element.parent().hasClass('input-group') ? ' input-group-btn' : ''; + var autofocus = this.autofocus ? ' autofocus' : ''; + var header = this.options.header ? '
    ' + this.options.header + '
    ' : ''; + var searchbox = this.options.liveSearch ? '' : ''; + var actionsbox = this.options.actionsBox ? '
    ' + + '
    ' + + '' + + '' + + '
    ' + + '
    ' : ''; + var drop = + '
    ' + + '' + + '' + + '
    '; + + return $(drop); + }, + + createView: function () { + var $drop = this.createDropdown(); + var $li = this.createLi(); + $drop.find('ul').append($li); + return $drop; + }, + + reloadLi: function () { + //Remove all children. + this.destroyLi(); + //Re build + var $li = this.createLi(); + this.$menu.find('ul').append($li); + }, + + destroyLi: function () { + this.$menu.find('li').remove(); + }, + + createLi: function () { + var that = this, + _liA = [], + _liHtml = '', + optID = 0; + + this.$element.find('option').each(function () { + var $this = $(this); + + //Get the class and text for the option + var optionClass = $this.attr('class') || ''; + var inline = $this.attr('style') || ''; + var text = $this.data('content') ? $this.data('content') : $this.html(); + var subtext = $this.data('subtext') !== undefined ? '' + $this.data('subtext') + '' : ''; + var icon = $this.data('icon') !== undefined ? ' ' : ''; + if (icon !== '' && ($this.is(':disabled') || $this.parent().is(':disabled'))) { + icon = '' + icon + ''; + } + + if (!$this.data('content')) { + //Prepend any icon and append any subtext to the main text. + text = icon + '' + text + subtext + ''; + } + + if (that.options.hideDisabled && ($this.is(':disabled') || $this.parent().is(':disabled'))) { + _liA.push(''); + } else if ($this.parent().is('optgroup') && $this.data('divider') !== true) { + if ($this.index() === 0) { + //Get the opt group label + var label = $this.parent().attr('label'); + var labelSubtext = $this.parent().data('subtext') !== undefined ? '' + $this.parent().data('subtext') + '' : ''; + var labelIcon = $this.parent().data('icon') ? ' ' : ''; + label = labelIcon + '' + label + labelSubtext + ''; + + optID += 1; + + if ($this[0].index !== 0) { + _liA.push( + '
    ' + + '
    ' + label + '
    ' + + that.createA(text, 'opt ' + optionClass, inline, optID) + ); + } else { + _liA.push( + '
    ' + label + '
    ' + + that.createA(text, 'opt ' + optionClass, inline, optID)); + } + } else { + _liA.push(that.createA(text, 'opt ' + optionClass, inline, optID)); + } + } else if ($this.data('divider') === true) { + _liA.push('
    '); + } else if ($(this).data('hidden') === true) { + _liA.push(''); + } else { + _liA.push(that.createA(text, optionClass, inline)); + } + }); + + $.each(_liA, function (i, item) { + var hide = item === '' ? 'class="hide is-hidden"' : ''; + _liHtml += '
  • ' + item + '
  • '; + }); + + //If we are not multiple, and we dont have a selected item, and we dont have a title, select the first element so something is set in the button + if (!this.multiple && this.$element.find('option:selected').length === 0 && !this.options.title) { + this.$element.find('option').eq(0).prop('selected', true).attr('selected', 'selected'); + } + + return $(_liHtml); + }, + + /** + * + * @param text + * @param classes + * @param inline + * @param [optgroup] + * @returns {string} + */ + createA: function (text, classes, inline, optgroup) { + return '' + + text + + '' + + ''; + }, + + /** + * @param [updateLi] + */ + render: function (updateLi) { + var that = this; + + //Update the LI to match the SELECT + if (updateLi !== false) { + this.$element.find('option').each(function (index) { + that.setDisabled(index, $(this).is(':disabled') || $(this).parent().is(':disabled')); + that.setSelected(index, $(this).is(':selected')); + }); + } + + this.tabIndex(); + + var selectedItems = this.$element.find('option:selected').map(function () { + var $this = $(this); + var icon = $this.data('icon') && that.options.showIcon ? ' ' : ''; + var subtext; + if (that.options.showSubtext && $this.attr('data-subtext') && !that.multiple) { + subtext = ' ' + $this.data('subtext') + ''; + } else { + subtext = ''; + } + if ($this.data('content') && that.options.showContent) { + return $this.data('content'); + } else if ($this.attr('title') !== undefined) { + return $this.attr('title'); + } else { + return icon + $this.html() + subtext; + } + }).toArray(); + + //Fixes issue in IE10 occurring when no default option is selected and at least one option is disabled + //Convert all the values into a comma delimited string + var title = !this.multiple ? selectedItems[0] : selectedItems.join(this.options.multipleSeparator); + + //If this is multi select, and the selectText type is count, the show 1 of 2 selected etc.. + if (this.multiple && this.options.selectedTextFormat.indexOf('count') > -1) { + var max = this.options.selectedTextFormat.split('>'); + var notDisabled = this.options.hideDisabled ? ':not([disabled])' : ''; + if ((max.length > 1 && selectedItems.length > max[1]) || (max.length == 1 && selectedItems.length >= 2)) { + title = this.options.countSelectedText.replace('{0}', selectedItems.length).replace('{1}', this.$element.find('option:not([data-divider="true"], [data-hidden="true"])' + notDisabled).length); + } + } + + this.options.title = this.$element.attr('title'); + + if (this.options.selectedTextFormat == 'static') { + title = this.options.title; + } + + //If we dont have a title, then use the default, or if nothing is set at all, use the not selected text + if (!title) { + title = this.options.title !== undefined ? this.options.title : this.options.noneSelectedText; + } + + this.$button.attr('title', $.trim($("
    ").html(title).text()).replace(/\s\s+/g, ' ')); + this.$newElement.find('.filter-option').html(title); + }, + + /** + * @param [style] + * @param [status] + */ + setStyle: function (style, status) { + if (this.$element.attr('class')) { + this.$newElement.addClass(this.$element.attr('class').replace(/selectpicker|mobile-device|validate\[.*\]/gi, '')); + } + + var buttonClass = style ? style : this.options.style; + + if (status == 'add') { + this.$button.addClass(buttonClass); + } else if (status == 'remove') { + this.$button.removeClass(buttonClass); + } else { + this.$button.removeClass(this.options.style); + this.$button.addClass(buttonClass); + } + }, + + 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 > a').outerHeight(), + headerHeight = this.options.header ? $menuClone.find('.popover-title').outerHeight() : 0, + searchHeight = this.options.liveSearch ? $menuClone.find('.bootstrap-select-searchbox').outerHeight() : 0, + actionsHeight = this.options.actionsBox ? $menuClone.find('.bs-actionsbox').outerHeight() : 0; + + $selectClone.remove(); + + this.$newElement + .data('liHeight', liHeight) + .data('headerHeight', headerHeight) + .data('searchHeight', searchHeight) + .data('actionsHeight', actionsHeight); + }, + + setSize: function () { + var that = this, + menu = this.$menu, + menuInner = menu.find('.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'), + divHeight = menu.find('li .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 ? ':not(.disabled)' : '', + $window = $(window), + menuExtras = menuPadding + parseInt(menu.css('margin-top')) + parseInt(menu.css('margin-bottom')) + 2, + menuHeight, + selectOffsetTop, + selectOffsetBot, + posVert = function () { + //JQuery defines a scrollTop function, but in pure JS it's a property + //noinspection JSValidateTypes + selectOffsetTop = that.$newElement.offset().top - $window.scrollTop(); + selectOffsetBot = $window.height() - selectOffsetTop - selectHeight; + }; + posVert(); + if (this.options.header) menu.css('padding-top', 0); + + if (this.options.size == 'auto') { + var getSize = function () { + var minHeight, + lisVis = that.$lis.not('.hide'); + + posVert(); + menuHeight = selectOffsetBot - menuExtras; + + if (that.options.dropupAuto) { + that.$newElement.toggleClass('dropup', (selectOffsetTop > selectOffsetBot) && ((menuHeight - menuExtras) < menu.height())); + } + if (that.$newElement.hasClass('dropup')) { + menuHeight = selectOffsetTop - menuExtras; + } + + if ((lisVis.length + lisVis.find('dt').length) > 3) { + minHeight = liHeight * 3 + menuExtras - 2; + } else { + minHeight = 0; + } + + menu.css({'max-height': menuHeight + 'px', 'overflow': 'hidden', 'min-height': minHeight + headerHeight + searchHeight + actionsHeight + 'px'}); + menuInner.css({'max-height': menuHeight - headerHeight - searchHeight - actionsHeight - 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 = menu.find('li' + notDisabled + ' > *').not('.div-contain').slice(0, this.options.size).last().parent().index(); + var divLength = menu.find('li').slice(0, optIndex + 1).find('.div-contain').length; + menuHeight = liHeight * this.options.size + divLength * divHeight + menuPadding; + if (that.options.dropupAuto) { + 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'}); + } + }, + + setWidth: function () { + if (this.options.width == 'auto') { + this.$menu.css('min-width', '0'); + + // 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'); + selectClone.remove(); + + // Set width to whatever's larger, button title or longest option + this.$newElement.css('width', Math.max(parseInt(ulWidth), parseInt(btnWidth)) + 'px'); + } else if (this.options.width == 'fit') { + // Remove inline min-width so width can be changed from 'auto' + this.$menu.css('min-width', ''); + this.$newElement.css('width', '').addClass('fit-width'); + } else if (this.options.width) { + // Remove inline min-width so width can be changed from 'auto' + this.$menu.css('min-width', ''); + this.$newElement.css('width', this.options.width); + } else { + // Remove inline min-width/width so width can be changed + this.$menu.css('min-width', ''); + this.$newElement.css('width', ''); + } + // Remove fit-width class if width is changed programmatically + if (this.$newElement.hasClass('fit-width') && this.options.width !== 'fit') { + this.$newElement.removeClass('fit-width'); + } + }, + + selectPosition: function () { + var that = this, + drop = '
    ', + $drop = $(drop), + pos, + actualHeight, + getPlacement = function ($element) { + $drop.addClass($element.attr('class').replace(/form-control/gi, '')).toggleClass('dropup', $element.hasClass('dropup')); + pos = $element.offset(); + actualHeight = $element.hasClass('dropup') ? 0 : $element[0].offsetHeight; + $drop.css({'top': pos.top + actualHeight, 'left': pos.left, 'width': $element[0].offsetWidth, 'position': 'absolute'}); + }; + this.$newElement.on('click', function () { + if (that.isDisabled()) { + return; + } + getPlacement($(this)); + $drop.appendTo(that.options.container); + $drop.toggleClass('open', !$(this).hasClass('open')); + $drop.append(that.$menu); + }); + $(window).resize(function () { + getPlacement(that.$newElement); + }); + $(window).on('scroll', function () { + getPlacement(that.$newElement); + }); + $('html').on('click', function (e) { + if ($(e.target).closest(that.$newElement).length < 1) { + $drop.removeClass('open'); + } + }); + }, + + mobile: function () { + this.$element.addClass('mobile-device').appendTo(this.$newElement); + if (this.options.container) this.$menu.hide(); + }, + + refresh: function () { + this.$lis = null; + this.reloadLi(); + this.render(); + this.setWidth(); + this.setStyle(); + this.checkDisabled(); + this.liHeight(); + }, + + update: function () { + this.reloadLi(); + this.setWidth(); + this.setStyle(); + this.checkDisabled(); + this.liHeight(); + }, + + setSelected: function (index, selected) { + if (this.$lis == null) this.$lis = this.$menu.find('li'); + $(this.$lis[index]).toggleClass('selected', selected); + }, + + setDisabled: function (index, disabled) { + if (this.$lis == null) this.$lis = this.$menu.find('li'); + if (disabled) { + $(this.$lis[index]).addClass('disabled').find('a').attr('href', '#').attr('tabindex', -1); + } else { + $(this.$lis[index]).removeClass('disabled').find('a').removeAttr('href').attr('tabindex', 0); + } + }, + + isDisabled: function () { + return this.$element.is(':disabled'); + }, + + checkDisabled: function () { + var that = this; + + if (this.isDisabled()) { + this.$button.addClass('disabled').attr('tabindex', -1); + } else { + if (this.$button.hasClass('disabled')) { + this.$button.removeClass('disabled'); + } + + if (this.$button.attr('tabindex') == -1) { + if (!this.$element.data('tabindex')) this.$button.removeAttr('tabindex'); + } + } + + this.$button.click(function () { + return !that.isDisabled(); + }); + }, + + tabIndex: function () { + if (this.$element.is('[tabindex]')) { + this.$element.data('tabindex', this.$element.attr('tabindex')); + this.$button.attr('tabindex', this.$element.data('tabindex')); + } + }, + + clickListener: function () { + var that = this; + + this.$newElement.on('touchstart.dropdown', '.dropdown-menu', function (e) { + e.stopPropagation(); + }); + + this.$newElement.on('click', function () { + that.setSize(); + if (!that.options.liveSearch && !that.multiple) { + setTimeout(function () { + that.$menu.find('.selected a').focus(); + }, 10); + } + }); + + this.$menu.on('click', 'li a', function (e) { + var clickedIndex = $(this).parent().index(), + prevValue = that.$element.val(), + prevIndex = that.$element.prop('selectedIndex'); + + //Dont close on multi choice menu + if (that.multiple) { + e.stopPropagation(); + } + + e.preventDefault(); + + //Dont run if we have been disabled + if (!that.isDisabled() && !$(this).parent().hasClass('disabled')) { + var $options = that.$element.find('option'), + $option = $options.eq(clickedIndex), + state = $option.prop('selected'), + $optgroup = $option.parent('optgroup'), + maxOptions = that.options.maxOptions, + maxOptionsGrp = $optgroup.data('maxOptions') || false; + + //Deselect all others if not multi select box + if (!that.multiple) { + $options.prop('selected', false); + $option.prop('selected', true); + that.$menu.find('.selected').removeClass('selected'); + that.setSelected(clickedIndex, true); + } + //Else toggle the one we have chosen if we are multi select. + else { + $option.prop('selected', !state); + that.setSelected(clickedIndex, !state); + $(this).blur(); + + if ((maxOptions !== false) || (maxOptionsGrp !== false)) { + var maxReached = maxOptions < $options.filter(':selected').length, + maxReachedGrp = maxOptionsGrp < $optgroup.find('option:selected').length, + maxOptionsArr = that.options.maxOptionsText, + maxTxt = maxOptionsArr[0].replace('{n}', maxOptions), + maxTxtGrp = maxOptionsArr[1].replace('{n}', maxOptionsGrp), + $notify = $('
    '); + + if ((maxOptions && maxReached) || (maxOptionsGrp && maxReachedGrp)) { + if (maxOptions && maxOptions == 1) { + $options.prop('selected', false); + $option.prop('selected', true); + that.$menu.find('.selected').removeClass('selected'); + that.setSelected(clickedIndex, true); + } else if (maxOptionsGrp && maxOptionsGrp == 1) { + $optgroup.find('option:selected').prop('selected', false); + $option.prop('selected', true); + var optgroupID = $(this).data('optgroup'); + + that.$menu.find('.selected').has('a[data-optgroup="'+optgroupID+'"]').removeClass('selected'); + + that.setSelected(clickedIndex, true); + } else { + // If {var} is set in array, replace it + if (maxOptionsArr[2]) { + maxTxt = maxTxt.replace('{var}', maxOptionsArr[2][maxOptions > 1 ? 0 : 1]); + maxTxtGrp = maxTxtGrp.replace('{var}', maxOptionsArr[2][maxOptionsGrp > 1 ? 0 : 1]); + } + + $option.prop('selected', false); + + that.$menu.append($notify); + + if (maxOptions && maxReached) { + $notify.append($('
    ' + maxTxt + '
    ')); + that.$element.trigger('maxReached.bs.select'); + } + + if (maxOptionsGrp && maxReachedGrp) { + $notify.append($('
    ' + maxTxtGrp + '
    ')); + that.$element.trigger('maxReachedGrp.bs.select'); + } + + setTimeout(function () { + that.setSelected(clickedIndex, false); + }, 10); + + $notify.delay(750).fadeOut(300, function () { + $(this).remove(); + }); + } + } + } + } + + if (!that.multiple) { + that.$button.focus(); + } else if (that.options.liveSearch) { + that.$searchbox.focus(); + } + + // Trigger select 'change' + if ((prevValue != that.$element.val() && that.multiple) || (prevIndex != that.$element.prop('selectedIndex') && !that.multiple)) { + that.$element.change(); + } + } + }); + + this.$menu.on('click', 'li.disabled a, li dt, li .div-contain, .popover-title, .popover-title :not(.close)', function (e) { + if (e.target == this) { + e.preventDefault(); + e.stopPropagation(); + if (!that.options.liveSearch) { + that.$button.focus(); + } else { + that.$searchbox.focus(); + } + } + }); + + this.$menu.on('click', '.popover-title .close', function () { + that.$button.focus(); + }); + + this.$searchbox.on('click', function (e) { + e.stopPropagation(); + }); + + + this.$menu.on('click', '.actions-btn', function (e) { + if (that.options.liveSearch) { + that.$searchbox.focus(); + } else { + that.$button.focus(); + } + + e.preventDefault(); + e.stopPropagation(); + + if ($(this).is('.bs-select-all')) { + that.selectAll(); + } else { + that.deselectAll(); + } + that.$element.change(); + }); + + this.$element.change(function () { + that.render(false); + }); + }, + + liveSearchListener: function () { + var that = this, + no_results = $('
  • '); + + this.$newElement.on('click.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(); + } + if (!that.multiple) that.$menu.find('.selected').addClass('active'); + setTimeout(function () { + that.$searchbox.focus(); + }, 10); + }); + + this.$searchbox.on('input propertychange', function () { + if (that.$searchbox.val()) { + that.$lis.not('.is-hidden').removeClass('hide').find('a').not(':icontains(' + that.$searchbox.val() + ')').parent().addClass('hide'); + + 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 + ' "' + that.$searchbox.val() + '"').show(); + that.$menu.find('li').last().after(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.$menu.find('li.active').removeClass('active'); + that.$menu.find('li').filter(':visible:not(.divider)').eq(0).addClass('active').find('a').focus(); + $(this).focus(); + }); + + this.$menu.on('mouseenter', 'a', function (e) { + that.$menu.find('.active').removeClass('active'); + $(e.currentTarget).parent().not('.disabled').addClass('active'); + }); + + this.$menu.on('mouseleave', 'a', function () { + that.$menu.find('.active').removeClass('active'); + }); + }, + + val: function (value) { + + if (value !== undefined) { + this.$element.val(value); + this.$element.change(); + this.render(); + + return this.$element; + } else { + return this.$element.val(); + } + }, + + selectAll: function () { + if (this.$lis == null) this.$lis = this.$menu.find('li'); + this.$element.find('option:enabled').prop('selected', true); + $(this.$lis).not('.disabled').addClass('selected'); + this.render(false); + }, + + deselectAll: function () { + if (this.$lis == null) this.$lis = this.$menu.find('li'); + this.$element.find('option:enabled').prop('selected', false); + $(this.$lis).not('.disabled').removeClass('selected'); + this.render(false); + }, + + keydown: function (e) { + var $this, + $items, + $parent, + index, + next, + first, + last, + prev, + nextPrev, + that, + prevIndex, + isActive, + keyCodeMap = { + 32: ' ', 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5', 54: '6', 55: '7', 56: '8', 57: '9', 59: ';', + 65: 'a', 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h', 73: 'i', 74: 'j', 75: 'k', 76: 'l', + 77: 'm', 78: 'n', 79: 'o', 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v', 87: 'w', 88: 'x', + 89: 'y', 90: 'z', 96: '0', 97: '1', 98: '2', 99: '3', 100: '4', 101: '5', 102: '6', 103: '7', 104: '8', 105: '9' + }; + + $this = $(this); + + $parent = $this.parent(); + + if ($this.is('input')) $parent = $this.parent().parent(); + + that = $parent.data('this'); + + if (that.options.liveSearch) $parent = $this.parent().parent(); + + if (that.options.container) $parent = that.$menu; + + $items = $('[role=menu] li:not(.divider) a', $parent); + + isActive = that.$menu.parent().hasClass('open'); + + if (!isActive && /([0-9]|[A-z])/.test(String.fromCharCode(e.keyCode))) { + if (!that.options.container) { + that.setSize(); + that.$menu.parent().addClass('open'); + isActive = true; + } else { + that.$newElement.trigger('click'); + } + that.$searchbox.focus(); + } + + if (that.options.liveSearch) { + if (/(^9$|27)/.test(e.keyCode.toString(10)) && isActive && that.$menu.find('.active').length === 0) { + e.preventDefault(); + that.$menu.parent().removeClass('open'); + that.$button.focus(); + } + $items = $('[role=menu] li:not(.divider):visible', $parent); + if (!$this.val() && !/(38|40)/.test(e.keyCode.toString(10))) { + if ($items.filter('.active').length === 0) { + $items = that.$newElement.find('li').filter(':icontains(' + keyCodeMap[e.keyCode] + ')'); + } + } + } + + if (!$items.length) return; + + if (/(38|40)/.test(e.keyCode.toString(10))) { + + index = $items.index($items.filter(':focus')); + first = $items.parent(':not(.disabled):visible').first().index(); + last = $items.parent(':not(.disabled):visible').last().index(); + next = $items.eq(index).parent().nextAll(':not(.disabled):visible').eq(0).index(); + prev = $items.eq(index).parent().prevAll(':not(.disabled):visible').eq(0).index(); + nextPrev = $items.eq(next).parent().prevAll(':not(.disabled):visible').eq(0).index(); + + if (that.options.liveSearch) { + $items.each(function (i) { + if ($(this).is(':not(.disabled)')) { + $(this).data('index', i); + } + }); + index = $items.index($items.filter('.active')); + first = $items.filter(':not(.disabled):visible').first().data('index'); + last = $items.filter(':not(.disabled):visible').last().data('index'); + next = $items.eq(index).nextAll(':not(.disabled):visible').eq(0).data('index'); + prev = $items.eq(index).prevAll(':not(.disabled):visible').eq(0).data('index'); + nextPrev = $items.eq(next).prevAll(':not(.disabled):visible').eq(0).data('index'); + } + + prevIndex = $this.data('prevIndex'); + + if (e.keyCode == 38) { + if (that.options.liveSearch) index -= 1; + if (index != nextPrev && index > prev) index = prev; + if (index < first) index = first; + if (index == prevIndex) index = last; + } + + if (e.keyCode == 40) { + if (that.options.liveSearch) index += 1; + if (index == -1) index = 0; + if (index != nextPrev && index < next) index = next; + if (index > last) index = last; + if (index == prevIndex) index = first; + } + + $this.data('prevIndex', index); + + if (!that.options.liveSearch) { + $items.eq(index).focus(); + } else { + e.preventDefault(); + if (!$this.is('.dropdown-toggle')) { + $items.removeClass('active'); + $items.eq(index).addClass('active').find('a').focus(); + $this.focus(); + } + } + + } else if (!$this.is('input')) { + + var keyIndex = [], + count, + prevKey; + + $items.each(function () { + if ($(this).parent().is(':not(.disabled)')) { + if ($.trim($(this).text().toLowerCase()).substring(0, 1) == keyCodeMap[e.keyCode]) { + keyIndex.push($(this).parent().index()); + } + } + }); + + count = $(document).data('keycount'); + count++; + $(document).data('keycount', count); + + prevKey = $.trim($(':focus').text().toLowerCase()).substring(0, 1); + + if (prevKey != keyCodeMap[e.keyCode]) { + count = 1; + $(document).data('keycount', count); + } else if (count >= keyIndex.length) { + $(document).data('keycount', 0); + if (count > keyIndex.length) count = 1; + } + + $items.eq(keyIndex[count - 1]).focus(); + } + + // Select focused option if "Enter", "Spacebar" are pressed inside the menu. + if (/(13|32)/.test(e.keyCode.toString(10)) && isActive) { + if (!/(32)/.test(e.keyCode.toString(10))) e.preventDefault(); + if (!that.options.liveSearch) { + $(':focus').click(); + } else if (!/(32)/.test(e.keyCode.toString(10))) { + that.$menu.find('.active a').click(); + $this.focus(); + } + $(document).data('keycount', 0); + } + + if ((/(^9$|27)/.test(e.keyCode.toString(10)) && isActive && (that.multiple || that.options.liveSearch)) || (/(27)/.test(e.keyCode.toString(10)) && !isActive)) { + that.$menu.parent().removeClass('open'); + that.$button.focus(); + } + + }, + + hide: function () { + this.$newElement.hide(); + }, + + show: function () { + this.$newElement.show(); + }, + + destroy: function () { + this.$newElement.remove(); + this.$element.remove(); + } + }; + + $.fn.selectpicker = function (option, event) { + //get the args of the outer function.. + var args = arguments; + var value; + var chain = this.each(function () { + if ($(this).is('select')) { + var $this = $(this), + data = $this.data('selectpicker'), + options = typeof option == 'object' && option; + + if (!data) { + $this.data('selectpicker', (data = new Selectpicker(this, $.extend({}, Selectpicker.DEFAULTS, $.fn.selectpicker.defaults || {}, $this.data(), options), event))); + } else if (options) { + for (var i in options) { + if (options.hasOwnProperty(i)) { + data.options[i] = options[i]; + } + } + } + + if (typeof option == 'string') { + //Copy the value of option, as once we shift the arguments + //it also shifts the value of option. + var property = option; + if (data[property] instanceof Function) { + [].shift.apply(args); + value = data[property].apply(data, args); + } else { + value = data.options[property]; + } + } + } + }); + + if (typeof value !== 'undefined') { + //noinspection JSUnusedAssignment + return value; + } else { + return chain; + } + }; + + $.fn.selectpicker.Constructor = Selectpicker; + + $(document) + .data('keycount', 0) + .on('keydown', '.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=menu], .bootstrap-select-searchbox input', Selectpicker.prototype.keydown) + .on('focusin.modal', '.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role=menu], .bootstrap-select-searchbox input', function (e) { + e.stopPropagation(); + }); + +})(jQuery); diff --git a/modoboa/bower_components/bootstrap-select/js/i18n/defaults-cs_CZ.js b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-cs_CZ.js new file mode 100644 index 000000000..9241e5512 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-cs_CZ.js @@ -0,0 +1,14 @@ +/* + * Translated default messages for bootstrap-select. + * Locale: CS + * Region: CZ (Czech Republic) + */ +(function ($) { + $.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)); diff --git a/modoboa/bower_components/bootstrap-select/js/i18n/defaults-de_DE.js b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-de_DE.js new file mode 100644 index 000000000..51e0efbf7 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-de_DE.js @@ -0,0 +1,14 @@ +/* + * Translated default messages for bootstrap-select. + * Locale: DE (German, deutsch) + * Region: DE (Germany, Deutschland) + */ +(function ($) { + $.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)); diff --git a/modoboa/bower_components/bootstrap-select/js/i18n/defaults-en_US.js b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-en_US.js new file mode 100644 index 000000000..8da80640e --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-en_US.js @@ -0,0 +1,14 @@ +/* + * Translated default messages for bootstrap-select. + * Locale: EN (English) + * Region: US (United States) + */ +(function ($) { + $.fn.selectpicker.defaults = { + noneSelectedText: 'Nothing selected', + noneResultsText: 'No results match', + countSelectedText: '{0} of {1} selected', + maxOptionsText: ['Limit reached ({n} {var} max)', 'Group limit reached ({n} {var} max)', ['items', 'item']], + multipleSeparator: ', ' + }; +}(jQuery)); diff --git a/modoboa/bower_components/bootstrap-select/js/i18n/defaults-es_CL.js b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-es_CL.js new file mode 100644 index 000000000..78c132c24 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-es_CL.js @@ -0,0 +1,14 @@ +/* + * Translated default messages for bootstrap-select. + * Locale: ES (Spanish) + * Region: CL (Chile) + */ +(function ($) { + $.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)); diff --git a/modoboa/bower_components/bootstrap-select/js/i18n/defaults-eu.js b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-eu.js new file mode 100644 index 000000000..56d906ac8 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-eu.js @@ -0,0 +1,14 @@ +/* + * Translated default messages for bootstrap-select. + * Locale: EU (Basque) + * Region: + */ +(function ($) { + $.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)); diff --git a/modoboa/bower_components/bootstrap-select/js/i18n/defaults-fr_FR.js b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-fr_FR.js new file mode 100644 index 000000000..8942bf6ce --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-fr_FR.js @@ -0,0 +1,14 @@ +/* +* 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', + countSelectedText: '{0} sur {1} sélection(s)', + maxOptionsText: ['Limite atteinte ({n} {var} max)', 'Limite du groupe atteinte ({n} {var} max)', ['éléments', 'élément']], + multipleSeparator: ', ' + }; +}(jQuery)); diff --git a/modoboa/bower_components/bootstrap-select/js/i18n/defaults-it_IT.js b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-it_IT.js new file mode 100644 index 000000000..0b5aaf817 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-it_IT.js @@ -0,0 +1,15 @@ +/* + * Translated default messages for bootstrap-select. + * Locale: IT (Italian; italiano) + * Region: IT (Italy; Italia) + * Author: Michele Beltrame + */ +(function ($) { + $.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)); diff --git a/modoboa/bower_components/bootstrap-select/js/i18n/defaults-nl_NL.js b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-nl_NL.js new file mode 100644 index 000000000..5eaf13f1f --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-nl_NL.js @@ -0,0 +1,15 @@ +/* + * Translated default messages for bootstrap-select. + * Locale: NL (Dutch; Nederlands) + * Region: NL (Europe) + * Author: Daan Rosbergen (Badmuts) + */ +(function ($) { + $.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)); diff --git a/modoboa/bower_components/bootstrap-select/js/i18n/defaults-pl_PL.js b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-pl_PL.js new file mode 100644 index 000000000..165fdb390 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-pl_PL.js @@ -0,0 +1,14 @@ +/* + * Translated default messages for bootstrap-select. + * Locale: PL (Polish) + * Region: EU (Europe) + */ +(function ($) { + $.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']], + multipleSeparator: ', ' + }; +}(jQuery)); diff --git a/modoboa/bower_components/bootstrap-select/js/i18n/defaults-pt_BR.js b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-pt_BR.js new file mode 100644 index 000000000..ab96fe876 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-pt_BR.js @@ -0,0 +1,15 @@ +/* + * Translated default messages for bootstrap-select. + * Locale: PT (Portuguese; português) + * Region: BR (Brazil; Brasil) + * Author: Rodrigo de Avila + */ +(function ($) { + $.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)); diff --git a/modoboa/bower_components/bootstrap-select/js/i18n/defaults-ru_RU.js b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-ru_RU.js new file mode 100644 index 000000000..75e5b2750 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-ru_RU.js @@ -0,0 +1,14 @@ +/* + * Translated default messages for bootstrap-select. + * Locale: RU (Russian; Русский) + * Region: RU (Russian Federation) + */ +(function ($) { + $.fn.selectpicker.defaults = { + noneSelectedText: 'Ничего не выбрано', + noneResultsText: 'Не найдено совпадений', + countSelectedText: 'Выбрано {0} из {1}', + maxOptionsText: ['Достигнут предел ({n} {var} максимум)', 'Достигнут предел в группе ({n} {var} максимум)', ['items', 'item']], + multipleSeparator: ', ' + }; +}(jQuery)); diff --git a/modoboa/bower_components/bootstrap-select/js/i18n/defaults-zh_CN.js b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-zh_CN.js new file mode 100644 index 000000000..5aad7da61 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/js/i18n/defaults-zh_CN.js @@ -0,0 +1,14 @@ +/* + * Translated default messages for bootstrap-select. + * Locale: ZH (Chinese) + * Region: CN (China) + */ +(function ($) { + $.fn.selectpicker.defaults = { + noneSelectedText: '没有选中任何项', + noneResultsText: '没有找到匹配项', + countSelectedText: '选中{1}中的{0}项', + maxOptionsText: ['超出限制 (最多选择{n}项)', '组选择超出限制(最多选择{n}组)'], + multipleSeparator: ', ' + }; +}(jQuery)); diff --git a/modoboa/bower_components/bootstrap-select/less/bootstrap-select.less b/modoboa/bower_components/bootstrap-select/less/bootstrap-select.less new file mode 100644 index 000000000..1f826dfc8 --- /dev/null +++ b/modoboa/bower_components/bootstrap-select/less/bootstrap-select.less @@ -0,0 +1,331 @@ +.bootstrap-select { + /*width: 220px\9; IE8 and below*/ + //noinspection CssShorthandPropertyValue + width: 220px \0; /*IE9 and below*/ + + & > .btn { + width: 100%; + padding-right: 25px; + } + + .error & .btn { + border: 1px solid #b94a48; + } + + &.fit-width { + width: auto !important; + } +} + +.bootstrap-select.btn-group:not(.input-group-btn), +.bootstrap-select.btn-group[class*="span"] { + float: none; + display: inline-block; + margin-bottom: 10px; + margin-left: 0; +} + +.bootstrap-select.form-control { + margin-bottom: 0; + padding: 0; + border: none; +} + +.bootstrap-select.btn-group.pull-right, +.bootstrap-select.btn-group[class*="span"].pull-right, +.row-fluid .bootstrap-select.btn-group[class*="span"].pull-right { + float: right; +} + +.bootstrap-select.btn-group { + .form-search &, + .form-inline &, + .form-horizontal &, + .form-group & { + margin-bottom: 0; + } + + .input-append & { + margin-left: -1px; + } + + .input-prepend & { + margin-right: -1px; + } +} + +.bootstrap-select:not([class*="span"]):not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) { + width: 220px; +} + +.bootstrap-select.form-control:not([class*="span"]) { + width: 100%; +} + +.bootstrap-select.show-menu-arrow.open > .btn { + z-index: 2051; +} + +.bootstrap-select .btn:focus { + outline: thin dotted #333333 !important; + outline: 5px auto -webkit-focus-ring-color !important; + outline-offset: -2px; +} + +.bootstrap-select.btn-group .btn .filter-option { + display: inline-block; + overflow: hidden; + width: 100%; + text-align: left; +} + +.bootstrap-select.btn-group .btn .caret { + position: absolute; + top: 50%; + right: 12px; + margin-top: -2px; + vertical-align: middle; +} + +.bootstrap-select.btn-group > .disabled, +.bootstrap-select.btn-group .dropdown-menu li.disabled > a { + cursor: not-allowed; +} + +.bootstrap-select.btn-group > .disabled:focus { + outline: none !important; +} + +.bootstrap-select.btn-group[class*="span"] .btn { + width: 100%; +} + +.bootstrap-select.btn-group .dropdown-menu { + min-width: 100%; + z-index: 2000; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.bootstrap-select.btn-group .dropdown-menu.inner { + position: static; + border: 0; + padding: 0; + margin: 0; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} + +.bootstrap-select.btn-group .dropdown-menu dt { + display: block; + padding: 3px 20px; + cursor: default; +} + +.bootstrap-select.btn-group .div-contain { + overflow: hidden; +} + +.bootstrap-select.btn-group .dropdown-menu li { + position: relative; +} + +.bootstrap-select.btn-group .dropdown-menu li > a.opt { + position: relative; + padding-left: 35px; +} + +.bootstrap-select.btn-group .dropdown-menu li > a { + cursor: pointer; +} + +.bootstrap-select.btn-group .dropdown-menu li > dt small { + font-weight: normal; +} + +.bootstrap-select.btn-group.show-tick .dropdown-menu li.selected a i.check-mark { + position: absolute; + display: inline-block; + right: 15px; + margin-top: 2.5px; +} + +.bootstrap-select.btn-group .dropdown-menu li a i.check-mark { + display: none; +} + +.bootstrap-select.btn-group .dropdown-menu li a span.text { + display: inline-block; +} + +.bootstrap-select.btn-group.show-tick .dropdown-menu li a span.text { + margin-right: 34px; +} + +.bootstrap-select.btn-group .dropdown-menu li small { + padding-left: 0.5em; +} + +.bootstrap-select.btn-group .dropdown-menu { + & li:not(.disabled) > a:hover small, + & li:not(.disabled) > a:focus small, + & li.active:not(.disabled) > a small { + color: rgb(100, 177, 216); + color: rgba(100, 177, 216, 0.4); + } + + & li > dt small { + font-weight: normal; + } +} + +.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: rgb(204, 204, 204); + border-bottom-color: rgba(204, 204, 204, 0.2); + position: absolute; + bottom: -4px; + left: 9px; + display: none; + } + + &:after { + content: ''; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid white; + position: absolute; + bottom: -4px; + left: 10px; + display: none; + } + } + + &.dropup { + .dropdown-toggle { + &:before { + bottom: auto; + top: -3px; + border-bottom: 0; + border-top-width: 7px; + border-top-style: solid; + border-top-color: rgb(204, 204, 204); + border-top-color: rgba(204, 204, 204, 0.2); + } + + &:after { + bottom: auto; + top: -3px; + border-top: 6px solid #FFFFFF; + border-bottom: 0; + } + } + } + + &.pull-right { + .dropdown-toggle { + &:before { + right: 12px; + left: auto; + } + + &:after { + right: 13px; + left: auto; + } + } + } + + &.open > .dropdown-toggle { + &:before, + &:after { + display: block; + } + } +} + +.bootstrap-select.btn-group .no-results { + padding: 3px; + background: #f5f5f5; + margin: 0 5px; +} + +.bootstrap-select.btn-group .dropdown-menu .notify { + position: absolute; + bottom: 5px; + width: 96%; + margin: 0 2%; + min-height: 26px; + padding: 3px 5px; + background: #f5f5f5; + border: 1px solid #e3e3e3; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + pointer-events: none; + opacity: 0.9; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.bootstrap-select.btn-group.fit-width .btn .filter-option { + position: static; +} + +.bootstrap-select.btn-group.fit-width .btn .caret { + position: static; + top: auto; + margin-top: -1px; +} + +.control-group.error .bootstrap-select .dropdown-toggle { + border-color: #b94a48; +} + +.bootstrap-select-searchbox, +.bootstrap-select .bs-actionsbox { + padding: 4px 8px; +} + +.bootstrap-select .bs-actionsbox { + float: left; + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + + & .btn-group button { + width: 50%; + } +} + +.bootstrap-select-searchbox { + & + .bs-actionsbox { + padding: 0 8px 4px; + } + + & input, & .form-control { + margin-bottom: 0; + width: 100%; + } +} + +.mobile-device { + position: absolute; + top: 0; + left: 0; + display: block !important; + width: 100%; + height: 100% !important; + opacity: 0; +} diff --git a/modoboa/bower_components/bootstrap-select/package.json b/modoboa/bower_components/bootstrap-select/package.json index 3c98167e3..7afbe4a8b 100644 --- a/modoboa/bower_components/bootstrap-select/package.json +++ b/modoboa/bower_components/bootstrap-select/package.json @@ -1,31 +1,69 @@ { "name": "bootstrap-select", - "title": "bootstrap-select", - "filename": "bootstrap-select.js", - "description": "A custom for Bootstrap using button dropdown as replacement", + "version": "1.6.0", + "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-contrib-jshint": "~0.10.0", + "grunt-contrib-watch": "~0.6.1", + "grunt-contrib-qunit": "~0.5.2", + "grunt-contrib-concat": "~0.4.0", + "grunt-contrib-uglify": "~0.5.0", + "grunt-contrib-less": "~0.11.3", + "grunt-contrib-csslint": "~0.2.0", + "grunt-contrib-clean": "~0.5.0", + "load-grunt-tasks": "~0.6.0", + "grunt-banner": "~0.2.3", + "grunt-contrib-cssmin": "~0.10.0", + "grunt-sed": "~0.1.1" + }, + "keywords": [ + "form", + "bootstrap", + "select", + "replacement" + ] } diff --git a/modoboa/bower_components/bootstrap-select/test.html b/modoboa/bower_components/bootstrap-select/test.html index ae1baa36f..4771ecb40 100644 --- a/modoboa/bower_components/bootstrap-select/test.html +++ b/modoboa/bower_components/bootstrap-select/test.html @@ -1,62 +1,72 @@ - - - - + Bootstrap-select test page - - - + - - + + - $('.selectpicker').selectpicker({ - 'selectedText': 'cat' - }); + + + - // $('.selectpicker').selectpicker('hide'); - }); - + + - - + + + + - - - -
    -
    -
    - -
    - -
    -
    - + + +
    + +
    +
    + +
    + +
    +
    +
    +
    diff --git a/modoboa/core/dev_settings.py b/modoboa/core/dev_settings.py index 0f379e943..253540eb0 100644 --- a/modoboa/core/dev_settings.py +++ b/modoboa/core/dev_settings.py @@ -9,7 +9,7 @@ BOWER_INSTALLED_APPS = ( "jquery#1.9", "jquery-ui#1.11", "bootstrap#3.2.0", - "bootstrap-select#1.5.4", + "bootstrap-select#1.6", "d3#3.3.13", "eonasdan-bootstrap-datetimepicker#3.1.3", "font-awesome#4.2.0", diff --git a/modoboa/extensions/radicale/templates/radicale/calendar_detail.html b/modoboa/extensions/radicale/templates/radicale/calendar_detail.html new file mode 100644 index 000000000..b5d5f2cb2 --- /dev/null +++ b/modoboa/extensions/radicale/templates/radicale/calendar_detail.html @@ -0,0 +1,10 @@ +{% extends "common/generic_modal.html" %} + +{% load i18n %} + +{% block modalbody %} +

    {% trans "To access this calendar, use the following address:" %} +

    +{% endblock %} diff --git a/modoboa/extensions/radicale/templates/radicale/calendars.html b/modoboa/extensions/radicale/templates/radicale/calendars.html index c5afe5e42..c127ce396 100644 --- a/modoboa/extensions/radicale/templates/radicale/calendars.html +++ b/modoboa/extensions/radicale/templates/radicale/calendars.html @@ -48,7 +48,6 @@ $(document).ready(function() { {% trans "Name" %} {% if with_owner %}{% trans "Owner" %}{% endif %} {% trans "Tags" %} - {% trans "Address" %} {% trans "Actions" %} diff --git a/modoboa/extensions/radicale/templates/radicale/calendars_page.html b/modoboa/extensions/radicale/templates/radicale/calendars_page.html index 13a642ec8..cbe0dbe4e 100644 --- a/modoboa/extensions/radicale/templates/radicale/calendars_page.html +++ b/modoboa/extensions/radicale/templates/radicale/calendars_page.html @@ -1,10 +1,9 @@ {% load i18n lib_tags radicale_tags %} {% for cal in calendars %} - {% calendar_modify_link cal %} + {% calendar_view_link cal %} {% if with_owner %}{{ cal.owner }}{% endif %} {% render_tags cal.tags %} - {{ cal.url }} {% calendar_actions cal %} {% endfor %} diff --git a/modoboa/extensions/radicale/templatetags/radicale_tags.py b/modoboa/extensions/radicale/templatetags/radicale_tags.py index 0b18285b8..e655be253 100644 --- a/modoboa/extensions/radicale/templatetags/radicale_tags.py +++ b/modoboa/extensions/radicale/templatetags/radicale_tags.py @@ -43,37 +43,46 @@ def radicale_left_menu(user): @register.simple_tag -def calendar_modify_link(calendar): - """ - """ - linkdef = {"label": calendar.name, "modal": True} +def calendar_view_link(calendar): + """Render a link to view calendar detail.""" + linkdef = { + "label": calendar.name, "modal": True, + "title": _("View calendar detail") + } if calendar.__class__.__name__ == "UserCalendar": linkdef["url"] = reverse( - "radicale:user_calendar", args=[calendar.pk] + "radicale:user_calendar_detail", args=[calendar.pk] ) - linkdef["modalcb"] = "radicale.edit_calendar_cb" else: linkdef["url"] = reverse( - "radicale:shared_calendar", args=[calendar.pk] + "radicale:shared_calendar_detail", args=[calendar.pk] ) - linkdef["modalcb"] = "radicale.shared_calendar_cb" return render_link(linkdef) @register.simple_tag def calendar_actions(calendar): - """ - """ - actions = [{ - "name": "delcalendar", - "title": _("Delete %s?" % calendar), - "img": "fa fa-trash" - }] + """Render per-calendar actions.""" + actions = [ + {"name": "editcalendar", + "title": _("Edit %s" % calendar), + "modal": True, + "img": "fa fa-edit"}, + {"name": "delcalendar", + "title": _("Delete %s?" % calendar), + "img": "fa fa-trash"} + ] if calendar.__class__.__name__ == 'UserCalendar': actions[0]["url"] = reverse( + "radicale:user_calendar", args=[calendar.pk]) + actions[0]["modalcb"] = "radicale.edit_calendar_cb" + actions[1]["url"] = reverse( "radicale:user_calendar", args=[calendar.id]) else: actions[0]["url"] = reverse( + "radicale:shared_calendar", args=[calendar.pk]) + actions[0]["modalcb"] = "radicale.shared_calendar_cb" + actions[1]["url"] = reverse( "radicale:shared_calendar", args=[calendar.id]) return render_actions(actions) diff --git a/modoboa/extensions/radicale/urls.py b/modoboa/extensions/radicale/urls.py index 5904c1f76..6ae2542f6 100644 --- a/modoboa/extensions/radicale/urls.py +++ b/modoboa/extensions/radicale/urls.py @@ -8,9 +8,13 @@ urlpatterns = patterns( url(r'^user/$', 'new_user_calendar', name='user_calendar_add'), url(r'^user/(?P\d+)/$', 'user_calendar', name='user_calendar'), + url(r'^user/(?P\d+)/detail/$', 'user_calendar_detail', + name='user_calendar_detail'), url(r'^shared/$', 'new_shared_calendar', name='shared_calendar_add'), url(r'^shared/(?P\d+)/$', 'shared_calendar', name='shared_calendar'), + url(r'^shared/(?P\d+)/detail/$', 'shared_calendar_detail', + name='shared_calendar_detail'), url(r'^usernames/$', 'username_list', name='username_list'), ) diff --git a/modoboa/extensions/radicale/views.py b/modoboa/extensions/radicale/views.py index 081ac18b1..281e7a719 100644 --- a/modoboa/extensions/radicale/views.py +++ b/modoboa/extensions/radicale/views.py @@ -90,8 +90,7 @@ def new_user_calendar(request): @login_required def user_calendar(request, pk): - """Edit or remove a calendar. - """ + """Edit or remove a calendar.""" try: ucal = UserCalendar.objects.select_related().get(pk=pk) except UserCalendar.DoesNotExist: @@ -106,11 +105,25 @@ def user_calendar(request, pk): return UserCalendarEditionForm(request, instances=instances).process() +@login_required +def user_calendar_detail(request, pk): + """Display user calendar's detail.""" + try: + ucal = UserCalendar.objects.select_related().get(pk=pk) + except UserCalendar.DoesNotExist: + raise NotFound + if request.user != ucal.mailbox.user and \ + not request.user.can_access(ucal.mailbox.domain): + raise PermDeniedException + return render(request, "radicale/calendar_detail.html", { + "title": ucal.name, "calendar": ucal + }) + + @login_required @permission_required("radicale.add_sharedcalendar") def new_shared_calendar(request): - """Shared calendar creation view. - """ + """Shared calendar creation view.""" if request.method == "POST": form = SharedCalendarForm(request.user, request.POST) if form.is_valid(): @@ -133,11 +146,10 @@ def new_shared_calendar(request): @login_required @user_passes_test( lambda u: u.has_perm("radicale.change_sharedcalendar") - or u.has_perm("radicale.delete_sharedcalendar") + or u.has_perm("radicale.delete_sharedcalendar") ) def shared_calendar(request, pk): - """Edit or remove a shared calendar. - """ + """Edit or remove a shared calendar.""" try: scal = SharedCalendar.objects.select_related().get(pk=pk) except SharedCalendar.DoesNotExist: @@ -168,6 +180,23 @@ def shared_calendar(request, pk): }) +@login_required +@user_passes_test( + lambda u: u.has_perm("radicale.change_sharedcalendar") +) +def shared_calendar_detail(request, pk): + """Display shared calendar's detail.""" + try: + scal = SharedCalendar.objects.select_related().get(pk=pk) + except SharedCalendar.DoesNotExist: + raise NotFound + if not request.user.can_access(scal.domain): + raise PermDeniedException + return render(request, "radicale/calendar_detail.html", { + "title": scal.name, "calendar": scal + }) + + @login_required def username_list(request): """Get the list of username the current user can see. diff --git a/modoboa/extensions/webmail/lib/imaputils.py b/modoboa/extensions/webmail/lib/imaputils.py index af360c9c3..ab956c8e3 100644 --- a/modoboa/extensions/webmail/lib/imaputils.py +++ b/modoboa/extensions/webmail/lib/imaputils.py @@ -253,12 +253,13 @@ class IMAPconnector(object): """ if self.m is not None: try: - self._cmd("CHECK") + self._cmd("NOOP") except ImapError: if hasattr(self, "current_mailbox"): del self.current_mailbox else: return + self.login(user, password) def login(self, user, passwd): @@ -272,6 +273,7 @@ class IMAPconnector(object): :param passwd: password """ import socket + if type(user) is unicode: user = user.encode("utf-8") if type(passwd) is unicode: diff --git a/modoboa/extensions/webmail/static/webmail/js/webmail.js b/modoboa/extensions/webmail/static/webmail/js/webmail.js index be8c40f13..f34a39365 100644 --- a/modoboa/extensions/webmail/static/webmail/js/webmail.js +++ b/modoboa/extensions/webmail/static/webmail/js/webmail.js @@ -361,10 +361,11 @@ Webmail.prototype = { } }, - /* - * Set the *unseen messages* counter for a particular mailbox in - * the list. If the mailbox is currently selected, we update the - * listing. + /** + * Set the *unseen messages* counter for a particular mailbox in + * the list. If the mailbox is currently selected, we force a + * listing update. + * */ set_unseen_messages: function(mailbox, value) { if (this.poller.running_request) { @@ -378,7 +379,7 @@ Webmail.prototype = { if (this.navobject.params.action == "listmailbox") { var curmb = this.get_current_mailbox(); if (curmb == mailbox) { - this.navobject.update(true); + this.navobject.setparam("reset_page", "true").update(true); } } diff --git a/modoboa/static/js/global.js b/modoboa/static/js/global.js index f13dc6343..3912197cd 100644 --- a/modoboa/static/js/global.js +++ b/modoboa/static/js/global.js @@ -175,7 +175,7 @@ function simple_ajax_form_post(e, options) { if (opts.modal) { $("#modalbox").modal('hide'); } - if (opts.success_cb != undefined) { + if (opts.success_cb !== undefined) { opts.success_cb(data); return; } diff --git a/modoboa/templates/nlayout.html b/modoboa/templates/nlayout.html index 1333246e9..822c3701f 100644 --- a/modoboa/templates/nlayout.html +++ b/modoboa/templates/nlayout.html @@ -11,7 +11,7 @@ - + {% block extra_css %}{% endblock %} @@ -60,7 +60,7 @@ - + {% if LANGUAGE_CODE != "en" %}{% endif %} {% if TEMPLATE_DEBUG %}