tags: simply display by just showing an icon with a tooltip listing tags
This commit is contained in:
@@ -174,4 +174,15 @@ viewHelpers = (view) ->
|
||||
|
||||
view.fn 'relativeDate', relative
|
||||
|
||||
view.fn 'noTags', (tags) ->
|
||||
_.isEmpty(tags) or _.isEmpty(_.filter( tags, (t) -> t ) )
|
||||
|
||||
view.fn 'appliedTags', (userTags, taskTags) ->
|
||||
arr = []
|
||||
_.each userTags, (t) ->
|
||||
arr.push(t.name) if taskTags?[t.id]
|
||||
arr.join(', ')
|
||||
|
||||
|
||||
|
||||
module.exports = { viewHelpers, removeWhitespace, randomVal, daysBetween, dayMapping, username }
|
||||
@@ -33,15 +33,18 @@
|
||||
</div>
|
||||
|
||||
<applied-filters:>
|
||||
<i rel=tooltip title="{appliedTags(_user.tags, :task.tags)}" class='{#if noTags(:task.tags)}hidden{/} icon-tags'></i>
|
||||
|
||||
<!-- At first we showed all applied tags, but it gets really cluttered: http://gyazo.com/fce50f91fd0f1d64cab9774f755e95c1 -->
|
||||
<!-- There's a very strange bug where live-bound #each here loses model.at reference on _{type}List alter -->
|
||||
|
||||
<!--
|
||||
{{#each _user.tags as :tag}}
|
||||
<span>
|
||||
<small>
|
||||
{#if :task.tags[:tag.id]}
|
||||
<span data-tag-id="{{:tag.id}}" x-bind="click:toggleFilterByTag" class="label tag-label {#if _user.filters[:tag.id]}label-info{/}">{:tag.name}</span>
|
||||
<small data-tag-id="{{:tag.id}}" x-bind="click:toggleFilterByTag" class="label tag-label {#if _user.filters[:tag.id]}label-info{/}">{:tag.name}</small>
|
||||
{/}
|
||||
</span>
|
||||
{{/}}
|
||||
</small>
|
||||
{{/}}-->
|
||||
|
||||
<filter-fieldgroup:>
|
||||
<fieldset class='option-group'>
|
||||
|
||||
@@ -111,6 +111,7 @@
|
||||
<span class='{#unless :task.streak}hide{/}'>
|
||||
{:task.streak}<span rel='tooltip' title='Streak Counter'><i class='icon-forward'></i></span>
|
||||
</span>
|
||||
<app:filters:applied-filters />
|
||||
<!-- edit -->
|
||||
<a x-bind=click:toggleTaskEdit data-hide-id="{{:task.id}}-chart" data-toggle-id="{{:task.id}}-edit" rel=tooltip title="Edit"><i class="icon-pencil"></i></a>
|
||||
<!-- delete -->
|
||||
@@ -152,7 +153,6 @@
|
||||
<!-- main content -->
|
||||
<p class="task-text">
|
||||
{:task.text}
|
||||
<app:filters:applied-filters />
|
||||
</p>
|
||||
|
||||
<!-- edit/options dialog -->
|
||||
|
||||
Reference in New Issue
Block a user