Commit 7b57edfb authored by Tyf0x's avatar Tyf0x

** Fix for #434 **

-> Added an overflow: hidden and text-overflow:ellipsis to the button CSS if a buttonWidth is specified
-> Updated doc
parent 847873e4
......@@ -297,7 +297,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