diff options
| author | Zog | 2018-04-11 16:22:22 +0200 | 
|---|---|---|
| committer | Zog | 2018-04-11 16:22:22 +0200 | 
| commit | 61130315087432434fbbae50d30ad1753ff596a8 (patch) | |
| tree | b1976594f2a074961c331fead0fc25c8298e98ec /app/javascript/journey_patterns | |
| parent | 2d1ebb630ecfdd7b745571202ee60a35902b545f (diff) | |
| download | chouette-core-61130315087432434fbbae50d30ad1753ff596a8.tar.bz2 | |
Make ReactJS views IE-compliant :firework:ie-fixes
Diffstat (limited to 'app/javascript/journey_patterns')
| -rw-r--r-- | app/javascript/journey_patterns/actions/index.js | 18 | 
1 files changed, 8 insertions, 10 deletions
| diff --git a/app/javascript/journey_patterns/actions/index.js b/app/javascript/journey_patterns/actions/index.js index ea54f4e05..a813f4b9e 100644 --- a/app/javascript/journey_patterns/actions/index.js +++ b/app/javascript/journey_patterns/actions/index.js @@ -1,10 +1,3 @@ -import Promise from 'promise-polyfill' - -// To add to window -if (!window.Promise) { -  window.Promise = Promise; -} -  const actions = {    enterEditMode: () => ({      type: "ENTER_EDIT_MODE" @@ -195,15 +188,19 @@ const actions = {            dispatch(actions.unavailableServer())          } else {            if(json.length != 0){ -            let val -            for (val of json){ -              for (let stop_point of val.route_short_description.stop_points){ +            let j = 0 +            while(j < json.length){ +              let val = json[j] +              let i = 0 +              while(i < val.route_short_description.stop_points.length){ +                let stop_point = val.route_short_description.stop_points[i]                  stop_point.checked = false                  val.stop_area_short_descriptions.map((element) => {                    if(element.stop_area_short_description.id === stop_point.id){                      stop_point.checked = true                    }                  }) +                i ++                }                journeyPatterns.push(                  _.assign({}, val, { @@ -212,6 +209,7 @@ const actions = {                    deletable: false                  })                ) +              j ++              }            }            window.currentItemsLength = journeyPatterns.length | 
