[NIFI-3075] remove fixed width from combo options and add max-width css style to display ellipsis when options text is too long. This closes #1253

This commit is contained in:
Scott Aslan 2016-11-21 13:54:09 -05:00 committed by Matt Gilman
parent 15af764dd8
commit ead9205458
2 changed files with 4 additions and 13 deletions

View File

@ -111,3 +111,7 @@ div.combo-nifi-tooltip {
div.combo-button-normal {
background-color: #eaeef0;
}
span.combo-option-text {
max-width: 227px;
}

View File

@ -244,19 +244,6 @@
actualHeight += 16;
});
// set the width of each option text
optionList.find('span.combo-option-text').each(function () {
var comboOptionText = $(this);
var offset = 22;
if (comboOptionText.parent().children('div').length > 0) {
offset = 34;
}
if (maxHeight > 0 && actualHeight > maxHeight) {
offset += 20;
}
comboOptionText.width(combo.outerWidth() - offset);
});
// show the glass pane to catch the click events
var comboGlassPane = $('<div class="combo-glass-pane"></div>').one('click', function () {
if (comboOptions.length !== 0) {