Skip to content

Commit

Permalink
Released 0.6.8.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianreavis committed Jul 29, 2013
1 parent 0a5959a commit 01aa533
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 34 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "selectize",
"keywords": ["select", "ui", "form", "input", "control", "autocomplete", "tagging", "tag"],
"description": "Selectize is a jQuery-based custom <select> UI control. Useful for tagging, contact lists, country selectors, etc.",
"version": "0.6.7",
"version": "0.6.8",
"license": "Apache License, Version 2.0",
"readmeFilename": "README.md",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion selectize.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! selectize.css - v0.6.7 | https://github.com/brianreavis/selectize.js | Apache License (v2) */
/*! selectize.css - v0.6.8 | https://github.com/brianreavis/selectize.js | Apache License (v2) */

/* --- file: "src/selectize.css" --- */

Expand Down
2 changes: 1 addition & 1 deletion selectize.jquery.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "selectize",
"version": "0.6.7",
"version": "0.6.8",
"title": "Selectize.js",
"author": {
"name": "Brian Reavis",
Expand Down
20 changes: 11 additions & 9 deletions selectize.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! selectize.js - v0.6.7 | https://github.com/brianreavis/selectize.js | Apache License (v2) */
/*! selectize.js - v0.6.8 | https://github.com/brianreavis/selectize.js | Apache License (v2) */

(function(factory) {
if (typeof exports === 'object') {
Expand Down Expand Up @@ -1943,14 +1943,16 @@
* Updates all state-dependent CSS classes.
*/
refreshClasses: function() {
var isFull = this.isFull();
var isLocked = this.isLocked;
var self = this;
var isFull = self.isFull();
var isLocked = self.isLocked;
this.$control
.toggleClass('focus', this.isFocused)
.toggleClass('disabled', this.isDisabled)
.toggleClass('focus', self.isFocused)
.toggleClass('disabled', self.isDisabled)
.toggleClass('locked', isLocked)
.toggleClass('full', isFull).toggleClass('not-full', !isFull)
.toggleClass('has-items', this.items.length > 0);
.toggleClass('dropdown-active', self.isOpen)
.toggleClass('has-items', self.items.length > 0);
this.$control_input.data('grow', !isFull && !isLocked);
},

Expand Down Expand Up @@ -2014,10 +2016,10 @@
var self = this;

if (self.isLocked || self.isOpen || (self.settings.mode === 'multi' && self.isFull())) return;
self.focus();
self.focus(true);
self.isOpen = true;
self.refreshClasses();
self.$dropdown.css({visibility: 'hidden', display: 'block'});
self.$control.addClass('dropdown-active');
self.positionDropdown();
self.$dropdown.css({visibility: 'visible'});
self.trigger('dropdown_open', this.$dropdown);
Expand All @@ -2031,9 +2033,9 @@

if (!self.isOpen) return;
self.$dropdown.hide();
self.$control.removeClass('dropdown-active');
self.setActiveOption(null);
self.isOpen = false;
self.refreshClasses();
self.trigger('dropdown_close', self.$dropdown);
},

Expand Down
Loading

0 comments on commit 01aa533

Please sign in to comment.