challenges: chevron in collapsing title
This commit is contained in:
@@ -7,7 +7,6 @@ module.exports.app = (appExports, model) ->
|
||||
user = model.at '_user'
|
||||
|
||||
appExports.challengeCreate = ->
|
||||
id = model.id()
|
||||
model.set '_challenge.new',
|
||||
name: ''
|
||||
habits: []
|
||||
@@ -15,7 +14,7 @@ module.exports.app = (appExports, model) ->
|
||||
todos: []
|
||||
rewards: []
|
||||
assignTo: 'Party'
|
||||
id: id
|
||||
id: model.id()
|
||||
uuid: user.get('id')
|
||||
user: helpers.username(model.get('_user.auth'), model.get('_user.profile.name'))
|
||||
timestamp: +new Date
|
||||
@@ -40,3 +39,7 @@ module.exports.app = (appExports, model) ->
|
||||
appExports.challengeUnsubscribe = (e) ->
|
||||
i = user.get('challenges')?.indexOf e.get('id')
|
||||
user.remove("challenges.#{i}") if i? and i != -1
|
||||
|
||||
appExports.challengeCollapse = (e, el) ->
|
||||
$(el).next().toggle()
|
||||
i = $(el).find('i').toggleClass 'icon-chevron-down'
|
||||
@@ -40,7 +40,7 @@
|
||||
<a x-bind="click:challengeSubscribe" class='btn btn-large btn-success'><i class='icon-ok'></i> Subscribe</a>
|
||||
{/}
|
||||
</div>
|
||||
<h3 onClick="$(this).next().toggle();">{:challenge.name} (by {:challenge.user})</h3>
|
||||
<h3 x-bind="click:challengeCollapse"><i class='icon-chevron-down icon-chevron-right'></i> {:challenge.name} (by {:challenge.user})</h3>
|
||||
|
||||
|
||||
<div class="grid">
|
||||
|
||||
Reference in New Issue
Block a user