mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-03 00:09:41 +00:00
[#1683] ugly workaround to fix save/delete/cancel flashing. Problem is
$scope.challenge isn't resolved yet, so ._locked isn't set immediately. Well we could use $state.resolve instead of $state.controller, but it's just not resolving (ui-router not working with ng-resoure?)
This commit is contained in:
parent
bbf0194a7b
commit
398c52f3b0
1 changed files with 5 additions and 5 deletions
|
|
@ -1,14 +1,14 @@
|
|||
script(type='text/ng-template', id='partials/options.challenges.detail.html')
|
||||
// Edit button
|
||||
ul.unstyled()
|
||||
li(ng-show='challenge.leader==user._id && challenge._locked')
|
||||
ul.unstyled
|
||||
li(ng-show='challenge.leader==user._id', ng-hide='challenge._locked==false')
|
||||
button.btn.btn-default(ng-click='challenge._locked = false') Edit
|
||||
li(ng-hide='challenge._locked')
|
||||
li(ng-show='challenge._locked==false')
|
||||
button.btn.btn-primary(ng-click='save(challenge)') Save
|
||||
button.btn.btn-danger(ng-click='delete(challenge, $index)') Delete
|
||||
button.btn.btn-default(ng-click='challenge._locked=true') Cancel
|
||||
|
||||
div(ng-hide='challenge._locked')
|
||||
div(ng-hide='challenge._locked==false')
|
||||
.-options
|
||||
input.option-content(type='text', ng-model='challenge.name')
|
||||
textarea.option-content(cols='3', placeholder='Description', ng-model='challenge.description')
|
||||
|
|
@ -55,7 +55,7 @@ script(type='text/ng-template', id='partials/options.challenges.html')
|
|||
habitrpg-tasks(main=false, obj='newChallenge')
|
||||
|
||||
// Challenges list
|
||||
.accordion-group(ng-repeat='challenge in challenges|filter:filterChallenges', ng-init='challenge._locked=true')
|
||||
.accordion-group(ng-repeat='challenge in challenges|filter:filterChallenges')
|
||||
.accordion-heading
|
||||
ul.pull-right.challenge-accordion-header-specs
|
||||
li {{challenge.memberCount}} Participants
|
||||
|
|
|
|||
Loading…
Reference in a new issue