aboutsummaryrefslogtreecommitdiffstats
path: root/app/assets/javascripts
diff options
context:
space:
mode:
authorBruno Perles2015-12-03 16:18:49 +0100
committerBruno Perles2015-12-16 10:02:41 +0100
commite2602ff09070e8d752a3c3ddf90ea1d26487af27 (patch)
treec665e2af9b5f86c25f56bac1e21481e8915c74dc /app/assets/javascripts
parent18d7e19b30671f5d73ad57a9bcd2b4aca62611ba (diff)
downloadchouette-core-e2602ff09070e8d752a3c3ddf90ea1d26487af27.tar.bz2
Add rank
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/route_section.js.coffee18
1 files changed, 9 insertions, 9 deletions
diff --git a/app/assets/javascripts/route_section.js.coffee b/app/assets/javascripts/route_section.js.coffee
index 74f095772..e4a1021c3 100644
--- a/app/assets/javascripts/route_section.js.coffee
+++ b/app/assets/javascripts/route_section.js.coffee
@@ -36,14 +36,14 @@ class @RouteSectionMap
if id
features = route_section_geometry.getFeaturesByAttribute('id', id.toString())
if features.length > 0
- feature = features[0]
- style = null
- if !erase
- style =
- strokeWidth: 3
- strokeColor: 'green'
- feature.style = style
- feature.layer.redraw()
+ $.each features, (key, feature) ->
+ style = null
+ if !erase
+ style =
+ strokeWidth: 3
+ strokeColor: 'green'
+ feature.style = style
+ feature.layer.redraw()
@changeStyle = (el) ->
id = $(el).val()
@@ -54,6 +54,7 @@ class @RouteSectionMap
RouteSectionMap.featureStyle value, true
return
RouteSectionMap.featureStyle id, false
+ RouteSectionMap.editRoute el
jQuery ->
$route_sections_selector = $('[name^="route_sections_selector[sections_attributes]"]')
@@ -77,7 +78,6 @@ jQuery ->
$('#new_route_sections_selector select').on 'change', ->
RouteSectionMap.changeStyle this
- RouteSectionMap.editRoute this
$('form.route_section').find('button[type="submit"]').on 'click', (e) ->
e.preventDefault();