From 0092d11e1cdc68dc698c3d5cedb9c6e89995342a Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 1 Feb 2013 23:22:25 +0100 Subject: Move external libs to better directory --- chimere/static/bsmSelect/js/jquery.bsmselect.js | 381 ++++++++++++++++++++++++ 1 file changed, 381 insertions(+) create mode 100644 chimere/static/bsmSelect/js/jquery.bsmselect.js (limited to 'chimere/static/bsmSelect/js/jquery.bsmselect.js') diff --git a/chimere/static/bsmSelect/js/jquery.bsmselect.js b/chimere/static/bsmSelect/js/jquery.bsmselect.js new file mode 100644 index 0000000..25527c6 --- /dev/null +++ b/chimere/static/bsmSelect/js/jquery.bsmselect.js @@ -0,0 +1,381 @@ +/* + * Better Select Multiple - jQuery Plugin + * + * 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 + * + * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. + * + * bsmSelect version: v1.4.3 - 2011-05-05 + */ + +(function($) { + + function BsmSelect(target, options) + { + this.$original = $(target); // the original select multiple + this.buildingSelect = false; // is the new select being constructed right now? + this.ieClick = false; // in IE, has a click event occurred? ignore if not + this.ignoreOriginalChangeEvent = false; // originalChangeEvent bypassed when this is true + this.options = options; + this.buildDom(); + } + + BsmSelect.prototype = { + /** + * Generate an UID + */ + generateUid: function(index) { + return (this.uid = this.options.containerClass + index); + }, + + /** + * Build the DOM for bsmSelect + */ + buildDom: function() { + var self = this, o = this.options; + + if (o.addItemTarget === 'original') { + $('option', this.$original).each(function(i, o) { + if ($(o).data('bsm-order') === null) { $(o).data('bsm-order', i); } + }); + } + + for (var index = 0; $('#' + this.generateUid(index)).size(); index++) {} + + this.$select = $(' + optionDisabledClass: 'bsmOptionDisabled', // Class for items that are already selected / disabled + listClass: 'bsmList', // Class for the list ($list) + listItemClass: 'bsmListItem', // Class for the
  • list items + listItemLabelClass: 'bsmListItemLabel', // Class for the label text that appears in list items + removeClass: 'bsmListItemRemove', // Class given to the 'remove' link + highlightClass: 'bsmHighlight' // Class given to the highlight + }; + +})(jQuery); -- cgit v1.2.3