Skip to content

Commit

Permalink
Merge pull request snapappointments#170 from caseyjhol/master
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyjhol committed Jun 11, 2013
2 parents efabab9 + 04f5518 commit b3b23a4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions bootstrap-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,14 @@
title = _this.options.title != undefined ? _this.options.title : _this.options.noneSelectedText;
}

_this.$newElement.find('.filter-option').html( title );
var subtext;
if (this.options.showSubtext && this.$element.find('option:selected').attr('data-subtext')) {
subtext = ' <small class="muted">'+this.$element.find('option:selected').data('subtext') +'</small>';
} else {
subtext = '';
}

_this.$newElement.find('.filter-option').html( title + subtext );
},

setSize:function() {
Expand Down Expand Up @@ -568,11 +575,12 @@
noneSelectedText : 'Nothing selected',
width: null,
container: false,
hideDisabled: false
hideDisabled: false,
showSubtext: false
}

$(document)
.data('keycount',0)
.on('keydown', '[data-toggle=dropdown], [role=menu]' , Selectpicker.prototype.keydown)

}(window.jQuery);
}(window.jQuery);
Loading

0 comments on commit b3b23a4

Please sign in to comment.