diff --git a/r2/r2/lib/strings.py b/r2/r2/lib/strings.py index 70f52d4c1..9c76a0c30 100644 --- a/r2/r2/lib/strings.py +++ b/r2/r2/lib/strings.py @@ -217,6 +217,8 @@ Note: there are a couple of places outside of your subreddit where someone can c awesomeness_goes_here = _('awesomeness goes here'), add_multi_sr = _('add a subreddit to your multi.'), open_multi = _('open this multi'), + summarize_and_n_more = _('… and %(count)s more ⇒'), + summarize_less = _('⇐ less'), ) class StringHandler(object): diff --git a/r2/r2/public/static/css/reddit.less b/r2/r2/public/static/css/reddit.less index f50fb9bb9..089d08588 100755 --- a/r2/r2/public/static/css/reddit.less +++ b/r2/r2/public/static/css/reddit.less @@ -5096,6 +5096,23 @@ table.calendar { margin-left: 5px; } +#side-multi-list { + li { + display: inline-block; + width: 7.5em; + margin-right: .5em; + text-overflow: ellipsis; + overflow: hidden; + } + + & + .expand-summary { + padding: 0 4px; + margin: 0; + margin-top: 3px; + font-size: x-small; + } +} + .confirm-button .confirmation { color: red; white-space: nowrap; diff --git a/r2/r2/public/static/js/uibase.js b/r2/r2/public/static/js/uibase.js index 45f7b6b09..79063f623 100644 --- a/r2/r2/public/static/js/uibase.js +++ b/r2/r2/public/static/js/uibase.js @@ -42,6 +42,55 @@ r.ui.Collapse.prototype = { } } +r.ui.Summarize = function(el, maxCount) { + r.ui.Base.call(this, el) + this.maxCount = maxCount + + this._updateItems() + if (this.$hiddenItems.length > 0) { + this.$toggleButton = $('