aboutsummaryrefslogtreecommitdiffstats
path: root/app/javascript/routes
diff options
context:
space:
mode:
authorcedricnjanga2017-10-09 17:14:27 +0200
committercedricnjanga2017-10-09 17:14:27 +0200
commit08b002abfb101b1edce9750231c989591e049bf7 (patch)
tree4b574c92de11caed87fa4ecb6bf4bcbf1bc944a7 /app/javascript/routes
parentc4362d355d6f3b2f407e8c51bb6c0bee43f39df3 (diff)
downloadchouette-core-08b002abfb101b1edce9750231c989591e049bf7.tar.bz2
Working standard webpacker config
Diffstat (limited to 'app/javascript/routes')
-rw-r--r--app/javascript/routes/components/BSelect2.js6
-rw-r--r--app/javascript/routes/reducers/stopPoints.js6
2 files changed, 6 insertions, 6 deletions
diff --git a/app/javascript/routes/components/BSelect2.js b/app/javascript/routes/components/BSelect2.js
index 5cc9561e9..340d9df95 100644
--- a/app/javascript/routes/components/BSelect2.js
+++ b/app/javascript/routes/components/BSelect2.js
@@ -1,6 +1,6 @@
import _ from'lodash'
import React, { Component, PropTypes } from 'react'
-import Select2 from 'react-select2-wrapper'
+import Select2 from 'react-select2'
// get JSON full path
@@ -8,7 +8,7 @@ var origin = window.location.origin
var path = window.location.pathname.split('/', 3).join('/')
-class BSelect3 extends Component{
+export default class BSelect3 extends Component {
constructor(props, context) {
super(props, context)
}
@@ -72,7 +72,7 @@ class BSelect3 extends Component{
}
}
-export default class BSelect2 extends Component{
+class BSelect2 extends Component{
componentDidMount() {
this.refs.newSelect.el.select2('open')
}
diff --git a/app/javascript/routes/reducers/stopPoints.js b/app/javascript/routes/reducers/stopPoints.js
index 25679e747..eeec06327 100644
--- a/app/javascript/routes/reducers/stopPoints.js
+++ b/app/javascript/routes/reducers/stopPoints.js
@@ -1,5 +1,5 @@
import _ from 'lodash'
-import { addInput } from '../form_helper'
+import formHelper from '../form_helper'
const stopPoint = (state = {}, action, length) => {
switch (action.type) {
@@ -23,8 +23,8 @@ const stopPoint = (state = {}, action, length) => {
const updateFormForDeletion = (stop) =>{
if (stop.stoppoint_id !== undefined){
let now = Date.now()
- addInput('id', stop.stoppoint_id, now)
- addInput('_destroy', 'true', now)
+ formHelper.addInput('id', stop.stoppoint_id, now)
+ formHelper.addInput('_destroy', 'true', now)
}
}