fix(tags): fix sortable tags by separating edit & !edit into diff

<ul>s (cc @Fandekasp)
This commit is contained in:
Tyler Renelle 2014-08-19 15:14:10 -06:00
parent 88d27e2153
commit 50a34eb6c7

View file

@ -22,17 +22,16 @@
form.hrpg-input-group
input(type='text', ng-model='_newTag', placeholder=env.t('newTag'))
button(ng-click='createTag(_newTag)')=env.t('add')
ul(ng-if='!areTagsHidden || _editing', ui-sortable='sortableOptions', ng-model='user.tags')
li.filters-edit(bindonce='user.tags', ng-class='{active: user.filters[tag.id]}', ng-repeat='tag in user.tags')
//- Edit tags
form.hrpg-input-group(ng-show='_editing')
input(type='text', ng-model='tag.name')
button(ng-click='user.ops.deleteTag({params:{id:tag.id}})')
span.glyphicon.glyphicon-trash
//- List of Tags
li.filters-tags(ng-if='!_editing', bindonce='user.tags',
ng-class='{active: user.filters[tag.id], challenge: tag.challenge}', ng-repeat='tag in user.tags')
a(ng-click='toggleFilter(tag)')
span.glyphicon.glyphicon-bullhorn(bo-if="tag.challenge")
markdown(ng-model='tag.name')
// <li class="{#unless activeFilters(users[_userId].filters)}hidden{/}">
div(ng-if='!areTagsHidden || _editing')
ul(ng-if='_editing')
li.filters-edit(ng-class='{active: user.filters[tag.id]}', ng-repeat='tag in user.tags', bindonce='user.tags')
form.hrpg-input-group
input(type='text', ng-model='tag.name')
button(ng-click='user.ops.deleteTag({params:{id:tag.id}})')
span.glyphicon.glyphicon-trash
ul(ng-if='!_editing', ui-sortable='sortableOptions', ng-model='user.tags')
li.filters-tags(ng-class='{active: user.filters[tag.id], challenge: tag.challenge}', ng-repeat='tag in user.tags', bindonce='user.tags')
a(ng-click='toggleFilter(tag)')
span.glyphicon.glyphicon-bullhorn(ng-if="::tag.challenge")
markdown(ng-model='tag.name')
// <li class="{#unless activeFilters(users[_userId].filters)}hidden{/}">