Commit 4525e349 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Display total count when no more comments to load.

It's helpful to know how many comments there are in total.
Previously you didn't see the total count when there was < 100.
parent 23fb66e6
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -627,7 +627,10 @@ Ext.define('Docs.controller.Comments', {
            var loaded = last.offset + last.limit;
            var next_load = Math.min(last.limit, total - loaded);
            if (loaded >= total) {
                more.remove();
                var span = document.createElement("span");
                span.className = "fetchMoreComments";
                span.innerHTML = '<span></span>That\'s all. Total '+total+' comments.';
                Ext.get(span).replace(more);
            } else {
                more.update(
                    '<span></span>Showing comments 1-' + loaded + ' of ' + total + '. ' +
+1 −1
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@ Ext.define('Docs.view.Comments', {
                        '</a>'
                    ].join('');
                } else {
                    return '';
                    return '<span class="fetchMoreComments"><span></span>That\'s all. Total '+total+' comments.</span>';
                }
            }
        };
+2 −0
Original line number Diff line number Diff line
@@ -46,6 +46,8 @@
    background: url(../images/comment.png) no-repeat 0 -25px; }
  &:hover span {
    background-position: -59px -25px; } }
span.fetchMoreComments {
  color: gray; }

.comments-div {
  border-width: 1px 0;