mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Prevent accordion controllers from showing missing nextPanel
Resolves this issue: https://travis-ci.org/oeoeaio/openfoodnetwork/jobs/273323915
This commit is contained in:
@@ -13,8 +13,9 @@ Darkswarm.controller "AccordionCtrl", ($scope, localStorageService, $timeout, $d
|
||||
# scroll location is closed by show(), scrollTo() will scroll to the old location of
|
||||
# the element. Putting this in a 50 ms timeout is enough delay for the DOM to
|
||||
# have updated.
|
||||
$timeout (->
|
||||
$document.scrollTo $("##{section}"), offset_height, 500), 50
|
||||
$timeout ->
|
||||
$document.scrollTo($("##{section}"), offset_height, 500)
|
||||
, 50
|
||||
|
||||
$scope.$on 'purchaseFormInvalid', (event, form) ->
|
||||
# Scroll to first invalid section
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
window.FieldsetMixin = ($scope)->
|
||||
$scope.next = (event = false)->
|
||||
event.preventDefault() if event
|
||||
return unless $scope.nextPanel
|
||||
$scope.show $scope.nextPanel
|
||||
|
||||
$scope.onTimeout = ->
|
||||
|
||||
Reference in New Issue
Block a user