diff options
| author | Zog | 2018-05-07 09:06:55 +0200 | 
|---|---|---|
| committer | Zog | 2018-05-07 09:06:55 +0200 | 
| commit | 8316ed020e2bcd2e9b28d0827ae626a9d927eed4 (patch) | |
| tree | 2f8a8952a519171c2254862938b68438787a8402 | |
| parent | f5d2df936e76aa06360363ee27e3a6b28ea48c90 (diff) | |
| download | chouette-core-8316ed020e2bcd2e9b28d0827ae626a9d927eed4.tar.bz2 | |
Refs #6923; :lipstick:
| -rw-r--r-- | app/assets/stylesheets/modules/_vj_collection.sass | 15 | ||||
| -rw-r--r-- | app/views/referential_vehicle_journeys/_consolidated.html.slim | 14 | 
2 files changed, 26 insertions, 3 deletions
| diff --git a/app/assets/stylesheets/modules/_vj_collection.sass b/app/assets/stylesheets/modules/_vj_collection.sass index da61cc5e5..b68b191d8 100644 --- a/app/assets/stylesheets/modules/_vj_collection.sass +++ b/app/assets/stylesheets/modules/_vj_collection.sass @@ -234,14 +234,18 @@        .route          background: #F9F9F9          & > .head -          padding: 15px            &.highlighted              .pull-right, span.fa                color: $highlighted !important            a +            padding: 15px              color: black              font-size: 1.2em              text-transform: capitalize +            display: block +            text-decoration: none +            &:hover +              background-color: #F0F0F0              .fa                color: $red                transition: transform 0.1s @@ -251,7 +255,14 @@                font-size: 0.9em                text-transform: lowercase          .vehicle-journeys -          margin-bottom: 40px +          display: block +          overflow: hidden +          transition: height 0.5s, margin-bottom 0.5s +          margin-bottom: 0px +          & > * +            display: inline-block +          &.open +            margin-bottom: 40px            .highlighted              background-color: lighten($highlighted, 20%) !important diff --git a/app/views/referential_vehicle_journeys/_consolidated.html.slim b/app/views/referential_vehicle_journeys/_consolidated.html.slim index b79a61dfb..e2de526bc 100644 --- a/app/views/referential_vehicle_journeys/_consolidated.html.slim +++ b/app/views/referential_vehicle_journeys/_consolidated.html.slim @@ -15,7 +15,19 @@ coffee:      $(e.target).toggleClass 'active'      $(e.target).parents('.table').find('.detailed-purchase-windows').toggleClass 'hidden' +  $('.route').find('.vehicle-journeys').each (i, e)-> +    $e = $(e) +    $e.removeClass 'hidden' +    e.setAttribute 'data-original-height', $e.height() +    $e.height 0 +    $('a.toggle-route').click (e)->      e.preventDefault()      $(e.currentTarget).toggleClass 'active' -    $(e.currentTarget).parents('.route').find('.vehicle-journeys').toggleClass 'hidden' +    tab = $(e.currentTarget).parents('.route').find('.vehicle-journeys') +    if tab.hasClass 'open' +      tab.removeClass 'open' +      tab.height 0 +    else +      tab.addClass 'open' +      tab.height tab.attr('data-original-height') | 
