Commit ac27183f authored by David Stutz's avatar David Stutz

Merge pull request #438 from Tyf0x/fix_#434

** Fix for #429 and #434 **
parents bfa88e43 7b57edfb
......@@ -309,7 +309,9 @@
// Manually add button width if set.
if (this.options.buttonWidth && this.options.buttonWidth !== 'auto') {
this.$button.css({
'width' : this.options.buttonWidth
'width' : this.options.buttonWidth,
'overflow' : 'hidden',
'text-overflow' : 'ellipsis'
});
this.$container.css({
'width': this.options.buttonWidth
......
......@@ -854,7 +854,14 @@
buttonWidth: '400px'
});
});
$(document).ready(function() {
$('#example-buttonWidth-overflow').multiselect({
buttonWidth: '150px'
});
});
</script>
<p>The exemples below both demonstrate the fixed width option effects on the button. Note that if the text in the button title is too long, it will be truncated and use an ellipsis.</p>
<select id="example-buttonWidth" multiple="multiple">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
......@@ -863,6 +870,14 @@
<option value="5">Option 5</option>
<option value="6">Option 6</option>
</select>
<select id="example-buttonWidth-overflow" multiple="multiple">
<option value="1" selected>Option 1</option>
<option value="2" selected>Option 2</option>
<option value="3" selected>Option 3</option>
<option value="4">Option 4</option>
<option value="5">Option 5</option>
<option value="6">Option 6</option>
</select>
</div>
<div class="highlight">
<pre class="prettyprint linenums">
......@@ -871,6 +886,9 @@
$('#example-buttonWidth').multiselect({
buttonWidth: '400px'
});
$('#example-buttonWidth-overflow').multiselect({
buttonWidth: '150px'
});
});
&lt;/script&gt;
</pre>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment