Repository: nifi Updated Branches: refs/heads/master f97b3fe45 -> 86728bac7
[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 Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/86728bac Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/86728bac Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/86728bac Branch: refs/heads/master Commit: 86728bac7ef091dba79cd3ffd3219c80f4fca8ba Parents: f97b3fe Author: Scott Aslan <[email protected]> Authored: Wed May 24 13:50:46 2017 -0400 Committer: Matt Gilman <[email protected]> Committed: Wed May 24 16:15:42 2017 -0400 ---------------------------------------------------------------------- .../src/main/webapp/js/jquery/combo/jquery.combo.css | 3 ++- .../src/main/webapp/js/jquery/combo/jquery.combo.js | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi/blob/86728bac/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/combo/jquery.combo.css ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/combo/jquery.combo.css b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/combo/jquery.combo.css index 2764104..31c1d39 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/combo/jquery.combo.css +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/combo/jquery.combo.css @@ -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 { http://git-wip-us.apache.org/repos/asf/nifi/blob/86728bac/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/combo/jquery.combo.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/combo/jquery.combo.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/combo/jquery.combo.js index a8eec19..009f206 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/combo/jquery.combo.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/jquery/combo/jquery.combo.js @@ -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;
