aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZog2018-04-06 08:07:46 +0200
committerZog2018-04-06 08:07:46 +0200
commitb97a7b721a6d334989d1fb73bd38d1dfe908aa88 (patch)
tree4e584e8d3f95d5aab59e98d4a0242200c85dc297
parent25473075be6b31632295c95696891368b5bc26f4 (diff)
downloadchouette-core-6411-fix-routes-editor.tar.bz2
Refs #6411; Fix routes editor6411-fix-routes-editor
Disable "moveup" action on first stop, and "mouvedown" on last
-rw-r--r--app/javascript/routes/components/StopPoint.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/javascript/routes/components/StopPoint.js b/app/javascript/routes/components/StopPoint.js
index 368ec8261..768d069c0 100644
--- a/app/javascript/routes/components/StopPoint.js
+++ b/app/javascript/routes/components/StopPoint.js
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types'
import BSelect2 from './BSelect2'
import OlMap from './OlMap'
-import { defaultAttribute } from '../actions'
+import { defaultAttribute } from '../actions'
export default function StopPoint(props, {I18n}) {
return (
@@ -42,13 +42,13 @@ export default function StopPoint(props, {I18n}) {
<div
className={'btn btn-link' + (props.first ? ' disabled' : '')}
- onClick={props.onMoveUpClick}
+ onClick={props.first ? null : props.onMoveUpClick}
>
<span className='fa fa-arrow-up'></span>
</div>
<div
className={'btn btn-link' + (props.last ? ' disabled' : '')}
- onClick={props.onMoveDownClick}
+ onClick={props.last ? null : props.onMoveDownClick}
>
<span className='fa fa-arrow-down'></span>
</div>