diff options
author | mhasbini <mohammad.hasbini@gmail.com> | 2017-02-21 22:21:49 +0300 |
---|---|---|
committer | mhasbini <mohammad.hasbini@gmail.com> | 2017-02-21 22:21:49 +0300 |
commit | 0a53a3d9664187cbd8c72c24666a8ff03f3dccec (patch) | |
tree | a3bf55f0d7403ed662a09a413b23f876587deebe /app/assets/javascripts/lib | |
parent | 881529495379505542033bf7fb0d91cdc5b51e8d (diff) |
change todos counter position & format ( for large counts )
Diffstat (limited to 'app/assets/javascripts/lib')
-rw-r--r-- | app/assets/javascripts/lib/utils/text_utility.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/assets/javascripts/lib/utils/text_utility.js b/app/assets/javascripts/lib/utils/text_utility.js index f755d212b3c..579d322e3fb 100644 --- a/app/assets/javascripts/lib/utils/text_utility.js +++ b/app/assets/javascripts/lib/utils/text_utility.js @@ -14,6 +14,9 @@ require('vendor/latinise'); gl.text.addDelimiter = function(text) { return text ? text.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") : text; }; + gl.text.highCountTrim = function(count) { + return count > 99 ? '99+' : count; + }; gl.text.randomString = function() { return Math.random().toString(36).substring(7); }; |