aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorjpl2016-11-07 10:16:48 +0100
committerThomas Haddad2016-11-08 18:15:11 +0100
commit949e09cb05b600072e505176c083b4c22fe1db9c (patch)
treec3e9deecd2e1b225e6de76ffcfb023c35f6e3f4b /app
parentf7127c73e854be7044c1a36d28b54400cf34a8ac (diff)
downloadchouette-core-949e09cb05b600072e505176c083b4c22fe1db9c.tar.bz2
starting front adjustments for reactux stop_points fields
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/es6_browserified/containers/AddTodo.js5
-rw-r--r--app/assets/javascripts/es6_browserified/stop_points.js2
-rw-r--r--app/views/routes/_form.html.slim20
3 files changed, 14 insertions, 13 deletions
diff --git a/app/assets/javascripts/es6_browserified/containers/AddTodo.js b/app/assets/javascripts/es6_browserified/containers/AddTodo.js
index 90a187f5f..21b5c88d6 100644
--- a/app/assets/javascripts/es6_browserified/containers/AddTodo.js
+++ b/app/assets/javascripts/es6_browserified/containers/AddTodo.js
@@ -11,8 +11,9 @@ let AddTodo = ({ dispatch }) => {
e.preventDefault()
dispatch(addTodo())
}}>
- <button type="submit">
- Add Todo
+ <button type="submit" className="btn btn-primary btn-xs pull-right">
+ <span className="fa fa-plus"></span>
+ Ajouter un arrêt // i18N?
</button>
</form>
</div>
diff --git a/app/assets/javascripts/es6_browserified/stop_points.js b/app/assets/javascripts/es6_browserified/stop_points.js
index 9e8b62fbc..a324ef5bd 100644
--- a/app/assets/javascripts/es6_browserified/stop_points.js
+++ b/app/assets/javascripts/es6_browserified/stop_points.js
@@ -11,5 +11,5 @@ render(
<Provider store={store}>
<App />
</Provider>,
- document.getElementById('root')
+ document.getElementById('stop_points')
)
diff --git a/app/views/routes/_form.html.slim b/app/views/routes/_form.html.slim
index b4ead3fe7..295e2b38a 100644
--- a/app/views/routes/_form.html.slim
+++ b/app/views/routes/_form.html.slim
@@ -1,4 +1,3 @@
-div#root
= simple_form_for [@referential, @line, @route] do |f|
.row
.col-lg-4.col-md-4.col-sm-4.col-xs-4
@@ -25,11 +24,12 @@ div#root
.row style="margin-top:20px"
.col-lg-12.col-md-12.col-sm-12.col-xs-12
#stop_points
- div.clearfix style="margin-bottom:5px"
- label style="margin:0" Arrêts
- .btn.btn-primary.btn-xs.pull-right data-event="add_stop_point"
- span.fa.fa-plus
- = " #{t('routes.actions.add_stop_point')}"
+ / #stop_points
+ / div.clearfix style="margin-bottom:5px"
+ / label style="margin:0" Arrêts
+ / .btn.btn-primary.btn-xs.pull-right data-event="add_stop_point"
+ / span.fa.fa-plus
+ / = " #{t('routes.actions.add_stop_point')}"
/ = link_to_add_association f, :stop_points, class: 'btn btn-primary btn-xs pull-right' do
/ span.fa.fa-plus
@@ -37,9 +37,9 @@ div#root
/ THIS IS BROKEN
/ = link_to t('routes.actions.new_stop_point'), new_referential_stop_area_path(@referential), target: '_blank'
- .list-group
- = f.simple_fields_for :stop_points do |point|
- = render 'stop_point_fields', f: point
+ / .list-group
+ / = f.simple_fields_for :stop_points do |point|
+ / = render 'stop_point_fields', f: point
.row
.col-lg-12.col-md-12.col-sm-12.col-xs-12.text-right
@@ -47,7 +47,7 @@ div#root
= f.button :submit, class: 'btn btn-danger'
-
+// Get JSON data for route stop points
= javascript_tag do
| window.itinerary_stop = "#{URI.escape(@route.stop_areas.all.to_json)}"