diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2011-12-09 14:13:17 +0100 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2011-12-09 22:46:12 +0000 |
commit | 34e357e7138ee838583f69001c1d2ad067c98b27 (patch) | |
tree | 2bbed0127d3656ee5a1af203064aa9bc246e8a4f /install/ui/ipa.js | |
parent | 790ffc42a8e9ebd549eebffdef05da28ee96e129 (diff) | |
download | freeipa-34e357e7138ee838583f69001c1d2ad067c98b27.tar.gz freeipa-34e357e7138ee838583f69001c1d2ad067c98b27.tar.xz freeipa-34e357e7138ee838583f69001c1d2ad067c98b27.zip |
Additional better displaying of long names
- facet group headers, error dialog, non-scrollable tables, can manage long names
Size calculation of scrollable and non-scrollable tables was united. Now these types of tables differ only by style.
https://fedorahosted.org/freeipa/ticket/1821
Diffstat (limited to 'install/ui/ipa.js')
-rw-r--r-- | install/ui/ipa.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/install/ui/ipa.js b/install/ui/ipa.js index 6b0704606..b39a4e566 100644 --- a/install/ui/ipa.js +++ b/install/ui/ipa.js @@ -1097,6 +1097,19 @@ IPA.error_list = function() { return that; }; +IPA.limit_text = function(value, max_length) { + + if (!value) return ''; + + var limited_text = value; + + if (value.length && value.length > max_length) { + limited_text = value.substring(0, max_length - 3)+'...'; + } + + return limited_text; +}; + IPA.config = { default_priority: 500 }; |