Skip to content

Commit

Permalink
collapse all error lists when opening error
Browse files Browse the repository at this point in the history
  • Loading branch information
agnessa committed Sep 7, 2016
1 parent c52f848 commit ba2fcd2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Trade.AnnualReportUploadController = Ember.ObjectController.extend Trade.Flash,

transitionToSandboxShipments: (error) ->
@set('currentError', error)
@notifyPropertyChange('allErrorsCollapsed')
params = {
validation_error_id: error.get('id')
page: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
errorType="active"
content=validationErrors
collapsed=false
controller=this}}
}}

{{view Trade.ValidationErrorsView
heading="Ignored validation errors"
errorType="ignored"
content=ignoredValidationErrors
collapsed=true
controller=this}}
}}
</div>

{{ outlet }}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Trade.ValidationErrorsView = Ember.View.extend
# reset default collapse setting
if @get('controller.allErrorsCollapsed') == null
@set('collapsed', @get('defaultCollapsed'))
else
@set('collapsed', true)
).observes('controller.allErrorsCollapsed')

toggleHint: ( ->
Expand Down

0 comments on commit ba2fcd2

Please sign in to comment.