2013-05-06 02:38:45 +02:00
|
|
|
<ul class='expanded_subjects' data-stream='{{stream}}'>
|
2013-04-10 22:24:15 +02:00
|
|
|
{{#each subjects}}
|
Rewrite topic zoom to fix bugs and make cleaner.
In the first cut at topic zoom, I was re-rendering the
streams list, but this created glitches with orphaned
list items. The reproducible bug was that unread counts
on unshown streams weren't updating.
In the new approach, I keep the elements more permanent, and
I just hide and show them as needed, either through jQuery
show/hide or permanent CSS selectors.
I got rid of toggle_zoom(), so that we just explicitly zoom
in and zoom out in all situations. In particular, when we
narrow, it's more clear now that only stay zoomed in when
we're narrowing to the same stream as before (including topic
narrows within that stream).
When you zoom in, the number of topics is no longer limited
to 30, since that was kind of arbitrary anyway. (In practice,
the number of topics is usually well under 30, anyway, due to
the way we track them on the client.)
(imported from commit 5b6c143dee9ba9fe557d8cc36335ff28efb4b0de)
2013-11-26 23:06:39 +01:00
|
|
|
<li class='{{#if is_zero}}zero-subject-unreads{{/if}} {{#if is_muted}}muted_topic{{/if}} {{#if zoom_out_hide}} zoom-out-hide{{/if}} expanded_subject' data-name='{{topic_name}}'>
|
2013-07-09 03:25:39 +02:00
|
|
|
<span class='subject_box'>
|
2013-08-27 08:56:06 +02:00
|
|
|
<a href='{{url}}' class="subject-name">
|
2013-09-30 19:03:30 +02:00
|
|
|
{{topic_name}}
|
2013-05-07 20:02:24 +02:00
|
|
|
</a>
|
2013-08-27 08:56:06 +02:00
|
|
|
<div class="subject_count {{#if is_zero}}zero_count{{/if}}">
|
2013-08-29 00:02:09 +02:00
|
|
|
<div class="value">{{unread}}</div>
|
2013-08-27 08:56:06 +02:00
|
|
|
</div>
|
2013-07-09 03:25:39 +02:00
|
|
|
</span>
|
2013-10-11 18:25:10 +02:00
|
|
|
<span class="arrow topic-sidebar-arrow">
|
|
|
|
<i class="icon-vector-chevron-down"></i>
|
|
|
|
</span>
|
2013-04-10 22:24:15 +02:00
|
|
|
</li>
|
|
|
|
{{/each}}
|
2013-11-25 19:48:08 +01:00
|
|
|
{{#if want_show_more_topics_links}}
|
|
|
|
<li class="show-more-topics" data-stream="{{stream}}">
|
2016-05-12 13:53:41 +02:00
|
|
|
<a href="#">({{t "more topics" }})</a>
|
2013-11-25 19:48:08 +01:00
|
|
|
</li>
|
|
|
|
{{/if}}
|
2013-04-10 22:24:15 +02:00
|
|
|
</ul>
|