[NIFI-3925] for the jquery.combo plugin: update the calculation of the width of the combo box options overlay and also updated the plugins styles to now leverage the css calc() to determine the exact width of .combotext and .combo-option-text elements. This closes #1848

This commit is contained in:
Scott Aslan 2017-05-24 13:50:46 -04:00 committed by Matt Gilman
parent f97b3fe455
commit 86728bac7e
No known key found for this signature in database
GPG Key ID: DF61EC19432AEE37
2 changed files with 6 additions and 3 deletions

View File

@ -63,7 +63,7 @@
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width: 80%;
width: calc(100% - 15px);
font-weight: normal;
}
@ -89,6 +89,7 @@ div.selected-disabled-option {
height: 32px;
font-weight: normal;
line-height: 32px;
width: calc(100% - 15px);
}
.combo-glass-pane {

View File

@ -161,8 +161,8 @@
var comboOptions = $('<div></div>').addClass('combo-options').css({
'position': 'absolute',
'left': position.left + 'px',
'top': (position.top + combo.outerHeight() - 1) + 'px',
'width': (combo.outerWidth() - 2) + 'px',
'top': (position.top + Math.round(combo.outerHeight()) - 1) + 'px',
'width': (Math.round(combo.outerWidth()) - 2) + 'px',
'overflow-y': 'auto'
});
@ -235,6 +235,8 @@
}
}
);
} else {
optionText.css('width', '100%');
}
actualHeight += 16;