From 4d483ae06f8e7f90c76d2f4c6bb2745dc573c89e Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sun, 6 Mar 2016 19:06:02 +0100 Subject: Update bsmselect to last version --- chimere/static/bsmSelect/MIT-LICENSE.txt | 4 +- chimere/static/bsmSelect/README.md | 22 +++++++---- chimere/static/bsmSelect/css/jquery.bsmselect.css | 8 +++- .../bsmSelect/js/jquery.bsmselect.compatibility.js | 10 ++--- chimere/static/bsmSelect/js/jquery.bsmselect.js | 43 ++++++++++++---------- .../bsmSelect/js/jquery.bsmselect.sortable.js | 18 +++++---- 6 files changed, 64 insertions(+), 41 deletions(-) (limited to 'chimere/static') diff --git a/chimere/static/bsmSelect/MIT-LICENSE.txt b/chimere/static/bsmSelect/MIT-LICENSE.txt index 908016b..c5d6611 100644 --- a/chimere/static/bsmSelect/MIT-LICENSE.txt +++ b/chimere/static/bsmSelect/MIT-LICENSE.txt @@ -1,5 +1,5 @@ Copyright (c) 2008 by Ryan Cramer, http://www.ryancramer.com -Copyright (c) 2010 by Victor Berchet +Copyright (c) 2010-2013 by Victor Berchet Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -18,4 +18,4 @@ 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. \ No newline at end of file +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/chimere/static/bsmSelect/README.md b/chimere/static/bsmSelect/README.md index bd14c6a..8d65624 100644 --- a/chimere/static/bsmSelect/README.md +++ b/chimere/static/bsmSelect/README.md @@ -50,7 +50,8 @@ The newly created select default option is the original select title attribute: * listType: * Specify what list will be created or used as part of the bsmSelect. - * Can accept a callback that accepts the original as an argument and + returns a jQuery object with a single list. * Allowed values: * 'ol' * 'ul' @@ -88,13 +89,16 @@ The newly created select default option is the original select title attribute: * addItemTarget: * Where to place new selected items that are added to the list. - * Allowed values: 'top' or 'bottom' or 'original' to keep the original select sort order + * Allowed values: 'top' or 'bottom' or 'original' to keep the original select + sort order * Default: 'bottom' - * Note: When using the 'original' mode, the sort order can be overriden by setting the 'bsm-order' data on each option. + * Note: When using the 'original' mode, the sort order can be overriden by setting + the 'bsm-order' data on each option. * debugMode: - * Keeps original select multiple visible so that you can monitor live changes made to it when debugging. + * Keeps original select multiple visible so that you can monitor live changes + made to it when debugging. * Default: false * extractLabel: @@ -104,14 +108,16 @@ The newly created select default option is the original select title attribute: * plugins - * An array of plugins objects to enable (they only are required to have an `init` method which is called on init with the Bsmselect instance as single argument). + * An array of plugins objects to enable (they only are required to have an `init` + method which is called on init with the Bsmselect instance as single argument). * Default: an empty array (no plugin enabled by default) ### Text Labels ### * title - * Text used for the default select label (when original select title attribute is not set) + * Text used for the default select label (when original select title attribute + is not set) * Default: 'Select...' * removeLabel: @@ -179,7 +185,9 @@ The newly created select default option is the original select title attribute: * [Victor Berchet](http://github.com/vicb) is the author of bsmSelect * [Andy Fowler](http://github.com/andyfowler) has contributed many enhancements * [Cracky](https://github.com/Cracky) - * [Marc Busqué](https://github.com/laMarciana) has contributed to fix [issue #21](https://github.com/vicb/bsmSelect/issues/21) and with minimal CSS + * [Marc Busqué](https://github.com/laMarciana) has contributed to fix + [issue #21](https://github.com/vicb/bsmSelect/issues/21) and with minimal CSS + * [DrewBe121212](https://github.com/DrewBe121212) has fixed issues 28 et 29. ## History ## diff --git a/chimere/static/bsmSelect/css/jquery.bsmselect.css b/chimere/static/bsmSelect/css/jquery.bsmselect.css index ad770d0..cc35cc3 100644 --- a/chimere/static/bsmSelect/css/jquery.bsmselect.css +++ b/chimere/static/bsmSelect/css/jquery.bsmselect.css @@ -36,7 +36,7 @@ list-style: none; background: #ddd; border: 1px solid #bbb; - width: 100%; + width: auto; margin: 0 0 -1px 0; line-height: 1em; } @@ -62,3 +62,9 @@ top: 0; padding: 5px; } + +.bsmScrollWorkaround { + /* Fix a bug when the 'html' element has an overflow set to either 'scroll' or 'auto' on FF. */ + padding-bottom: 1px; + overflow: auto; +} diff --git a/chimere/static/bsmSelect/js/jquery.bsmselect.compatibility.js b/chimere/static/bsmSelect/js/jquery.bsmselect.compatibility.js index a743a07..683d865 100644 --- a/chimere/static/bsmSelect/js/jquery.bsmselect.compatibility.js +++ b/chimere/static/bsmSelect/js/jquery.bsmselect.compatibility.js @@ -1,17 +1,17 @@ /* * Better Select Multiple Compatibility Plugin - jQuery Plugin * - * Copyright (c) 2010 by Victor Berchet - http://www.github.com/vicb + * Copyright (c) 2010-2011 by Victor Berchet - http://www.github.com/vicb * * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. * - * version: v1.0.0 - 2010-09-05 + * version: v1.0.1 - 2011-11-14 */ (function($) { $.bsmSelect.plugins.compatibility = function() { - if (!(this instanceof arguments.callee)) { - return new arguments.callee(); + if (!(this instanceof $.bsmSelect.plugins.compatibility)) { + return new $.bsmSelect.plugins.compatibility(); } } @@ -31,7 +31,7 @@ o.showEffect = $.bsmSelect.effects[o.animate.add]; } else { o.showEffect = $.bsmSelect.effects.show; - } + } if ($.isFunction(o.animate.drop)) { o.hideEffect = o.animate.drop; diff --git a/chimere/static/bsmSelect/js/jquery.bsmselect.js b/chimere/static/bsmSelect/js/jquery.bsmselect.js index 25527c6..7751418 100644 --- a/chimere/static/bsmSelect/js/jquery.bsmselect.js +++ b/chimere/static/bsmSelect/js/jquery.bsmselect.js @@ -4,11 +4,11 @@ * based on Alternate Select Multiple (asmSelect) 1.0.4a beta (http://www.ryancramer.com/projects/asmselect/) * * Copyright (c) 2009 by Ryan Cramer - http://www.ryancramer.com - * Copyright (c) 2010 by Victor Berchet - http://www.github.com/vicb + * Copyright (c) 2010-2013 by Victor Berchet - http://www.github.com/vicb * * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. * - * bsmSelect version: v1.4.3 - 2011-05-05 + * bsmSelect version: v1.4.7 - 2013-12-19 */ (function($) { @@ -39,7 +39,7 @@ if (o.addItemTarget === 'original') { $('option', this.$original).each(function(i, o) { - if ($(o).data('bsm-order') === null) { $(o).data('bsm-order', i); } + if ($(o).data('bsm-order') === undefined) { $(o).data('bsm-order', i); } }); } @@ -47,7 +47,6 @@ this.$select = $('