mirror of https://github.com/apache/nifi.git
[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:
parent
15af764dd8
commit
ead9205458
|
@ -111,3 +111,7 @@ div.combo-nifi-tooltip {
|
|||
div.combo-button-normal {
|
||||
background-color: #eaeef0;
|
||||
}
|
||||
|
||||
span.combo-option-text {
|
||||
max-width: 227px;
|
||||
}
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue