diff options
| author | jpl | 2016-08-31 18:27:27 +0200 | 
|---|---|---|
| committer | jpl | 2016-08-31 18:27:39 +0200 | 
| commit | ca32433af8c42394ba45c91d4bf39948f77c33dc (patch) | |
| tree | 1b2b8cff2d65bc6e2ca05384a9f267b6739bfb04 | |
| parent | 5b80c096c66ed30910f8dfa326f864f050c3a40c (diff) | |
| download | chouette-core-ca32433af8c42394ba45c91d4bf39948f77c33dc.tar.bz2 | |
Refs #1528: fix the problemous
25 files changed, 87 insertions, 95 deletions
| diff --git a/app/views/companies/index.js.slim b/app/views/companies/index.js.slim index 308b71da6..cfb1c719c 100644 --- a/app/views/companies/index.js.slim +++ b/app/views/companies/index.js.slim @@ -1 +1 @@ -$('#companies').html("= escape_javascript(render('companies'))");
\ No newline at end of file +| $('#companies').html("= escape_javascript(render('companies'))");
\ No newline at end of file diff --git a/app/views/compliance_checks/index.js.slim b/app/views/compliance_checks/index.js.slim index 43ef88a36..cfd8dc40d 100644 --- a/app/views/compliance_checks/index.js.slim +++ b/app/views/compliance_checks/index.js.slim @@ -1 +1 @@ -$('#compliance_checks').html("#{escape_javascript(render('compliance_checks'))}");
\ No newline at end of file +| $('#compliance_checks').html("#{escape_javascript(render('compliance_checks'))}");
\ No newline at end of file diff --git a/app/views/connection_links/index.js.slim b/app/views/connection_links/index.js.slim index bf7d9dceb..2be61610e 100644 --- a/app/views/connection_links/index.js.slim +++ b/app/views/connection_links/index.js.slim @@ -1 +1 @@ -$('#connection_links').html("#{escape_javascript(render('connection_links'))}");
\ No newline at end of file +| $('#connection_links').html("#{escape_javascript(render('connection_links'))}");
\ No newline at end of file diff --git a/app/views/exports/index.js.slim b/app/views/exports/index.js.slim index 0bb790b7a..b9a413b1b 100644 --- a/app/views/exports/index.js.slim +++ b/app/views/exports/index.js.slim @@ -1 +1 @@ -$('#exports').html("#{escape_javascript(render('exports'))}");
\ No newline at end of file +| $('#exports').html("#{escape_javascript(render('exports'))}");
\ No newline at end of file diff --git a/app/views/group_of_lines/index.js.slim b/app/views/group_of_lines/index.js.slim index afd8a87bc..c21aa99cd 100644 --- a/app/views/group_of_lines/index.js.slim +++ b/app/views/group_of_lines/index.js.slim @@ -1 +1 @@ -$('#group_of_lines').html("#{escape_javascript(render('group_of_lines'))}");
\ No newline at end of file +| $('#group_of_lines').html("#{escape_javascript(render('group_of_lines'))}");
\ No newline at end of file diff --git a/app/views/group_of_lines/show.js.slim b/app/views/group_of_lines/show.js.slim index 4fd1e4ad6..786400a58 100644 --- a/app/views/group_of_lines/show.js.slim +++ b/app/views/group_of_lines/show.js.slim @@ -1,3 +1 @@ -$(function (){ -  $('.lines_detail').html("#{escape_javascript(render(partial: 'lines_detail'))}"); -});
\ No newline at end of file +| $(function (){ $('.lines_detail').html("#{escape_javascript(render(partial: 'lines_detail'))}"); });
\ No newline at end of file diff --git a/app/views/imports/index.js.slim b/app/views/imports/index.js.slim index b15c00084..2fac7d26c 100644 --- a/app/views/imports/index.js.slim +++ b/app/views/imports/index.js.slim @@ -1 +1 @@ -$('#imports').html("#{escape_javascript(render("imports"))}");
\ No newline at end of file +| $('#imports').html("#{escape_javascript(render("imports"))}");
\ No newline at end of file diff --git a/app/views/lines/index.js.slim b/app/views/lines/index.js.slim index 6f760a2e6..1e94d130c 100644 --- a/app/views/lines/index.js.slim +++ b/app/views/lines/index.js.slim @@ -1 +1 @@ -$('#lines').html("#{escape_javascript(render('lines'))}");
\ No newline at end of file +| $('#lines').html("#{escape_javascript(render('lines'))}");
\ No newline at end of file diff --git a/app/views/networks/index.js.slim b/app/views/networks/index.js.slim index 1b5581307..930880dfa 100644 --- a/app/views/networks/index.js.slim +++ b/app/views/networks/index.js.slim @@ -1 +1 @@ -$('#networks').html("#{escape_javascript(render('networks'))}");
\ No newline at end of file +| $('#networks').html("#{escape_javascript(render('networks'))}");
\ No newline at end of file diff --git a/app/views/referential_lines/index.js.slim b/app/views/referential_lines/index.js.slim index 6f760a2e6..0165fb077 100644 --- a/app/views/referential_lines/index.js.slim +++ b/app/views/referential_lines/index.js.slim @@ -1 +1 @@ -$('#lines').html("#{escape_javascript(render('lines'))}");
\ No newline at end of file +| $('#lines').html("#{escape_javascript(render('lines'))}");
\ No newline at end of file diff --git a/app/views/referential_stop_areas/index.js.slim b/app/views/referential_stop_areas/index.js.slim index 3105fb356..322feb105 100644 --- a/app/views/referential_stop_areas/index.js.slim +++ b/app/views/referential_stop_areas/index.js.slim @@ -1 +1 @@ -$('#stop_areas').html("#{escape_javascript(render('stop_areas'))}");
\ No newline at end of file +| $('#stop_areas').html("#{escape_javascript(render('stop_areas'))}");
\ No newline at end of file diff --git a/app/views/referentials/show.js.slim b/app/views/referentials/show.js.slim index a551f66cc..f1d01ce6c 100644 --- a/app/views/referentials/show.js.slim +++ b/app/views/referentials/show.js.slim @@ -1,25 +1,20 @@ -$(function() { -  var ref, update_infos, update_referential_details, _i, _len, _ref, _results; - -  update_infos = function(json) { -    var info, update_info; -    info = $('#referential_' + json.referential_id); -    console.log(info) -    update_info = function(key, value) { -      if (key.match(/_count$/)) { -        return $(info.find('.' + key)[0]).text(value); -      } -    }; -    return $.each(json, update_info); -  }; -   -  update_referential_details = function() { -    return $.getJSON("#{referential_path(@referential, format: :json)}", update_infos); -  }; - -  _results = []; -  _results.push(update_referential_details()); - -  return _results;  -}); - +| $(function() { +|   var ref, update_infos, update_referential_details, _i, _len, _ref, _results; +|   update_infos = function(json) { +|     var info, update_info; +|     info = $('#referential_' + json.referential_id); +|     console.log(info) +|     update_info = function(key, value) { +|       if (key.match(/_count$/)) { +|         return $(info.find('.' + key)[0]).text(value); +|       } +|     }; +|     return $.each(json, update_info); +|   }; +|   update_referential_details = function() { +|     return $.getJSON("#{referential_path(@referential, format: :json)}", update_infos); +|   }; +|   _results = []; +|   _results.push(update_referential_details()); +|   return _results;  +| });
\ No newline at end of file diff --git a/app/views/rule_parameter_sets/mode.js.slim b/app/views/rule_parameter_sets/mode.js.slim index 313599aff..392446a7c 100644 --- a/app/views/rule_parameter_sets/mode.js.slim +++ b/app/views/rule_parameter_sets/mode.js.slim @@ -1,10 +1,9 @@ -if ( $("#specific_parameters_#{@mode}").length == 0 ) { -  - form_content = "" -  - semantic_form_for [@referential, @rule_parameter_set] do |form| -    - form_content += render(partial: 'mode_fields', locals: { mode: @mode, f: form }) - -  $('#added_mode_parameter_set').before("#{escape_javascript(form_content).html_safe}"); -} else { -  $("#_destroy_mode_#{@mode}").attr( "value", false); -  $("#specific_parameters_#{@mode}").toggle(); -}
\ No newline at end of file +| if ( $("#specific_parameters_#{@mode}").length == 0 ) { +|   - form_content = "" +|   - semantic_form_for [@referential, @rule_parameter_set] do |form| +|     - form_content += render(partial: 'mode_fields', locals: { mode: @mode, f: form }) +|   $('#added_mode_parameter_set').before("#{escape_javascript(form_content).html_safe}"); +| } else { +|   $("#_destroy_mode_#{@mode}").attr( "value", false); +|   $("#specific_parameters_#{@mode}").toggle(); +| }
\ No newline at end of file diff --git a/app/views/stop_areas/index.js.slim b/app/views/stop_areas/index.js.slim index 3105fb356..322feb105 100644 --- a/app/views/stop_areas/index.js.slim +++ b/app/views/stop_areas/index.js.slim @@ -1 +1 @@ -$('#stop_areas').html("#{escape_javascript(render('stop_areas'))}");
\ No newline at end of file +| $('#stop_areas').html("#{escape_javascript(render('stop_areas'))}");
\ No newline at end of file diff --git a/app/views/time_table_combinations/create_failure.js.slim b/app/views/time_table_combinations/create_failure.js.slim index 8eee027a8..c5b544483 100644 --- a/app/views/time_table_combinations/create_failure.js.slim +++ b/app/views/time_table_combinations/create_failure.js.slim @@ -1,3 +1,3 @@ -var combine_form_partial = "#{j render 'time_table_combinations/combine_form'}"; +| var combine_form_partial = "#{j render 'time_table_combinations/combine_form'}"; -$('#new_time_table_combination').replaceWith(combine_form_partial);
\ No newline at end of file +| $('#new_time_table_combination').replaceWith(combine_form_partial);
\ No newline at end of file diff --git a/app/views/time_table_combinations/create_success.js.slim b/app/views/time_table_combinations/create_success.js.slim index 54712142e..f18eea4bc 100644 --- a/app/views/time_table_combinations/create_success.js.slim +++ b/app/views/time_table_combinations/create_success.js.slim @@ -1,6 +1,6 @@ -var combine_form_partial = "#{j render 'time_table_combinations/combine_form'}"; +| var combine_form_partial = "#{j render 'time_table_combinations/combine_form'}"; -$('#new_time_table_combination').replaceWith(combine_form_partial); +| $('#new_time_table_combination').replaceWith(combine_form_partial); -var time_table_partial = "#{j render 'time_tables/show_time_table'}"; -$('#time_table_show').replaceWith(time_table_partial);
\ No newline at end of file +| var time_table_partial = "#{j render 'time_tables/show_time_table'}"; +| $('#time_table_show').replaceWith(time_table_partial);
\ No newline at end of file diff --git a/app/views/time_table_combinations/new.js.slim b/app/views/time_table_combinations/new.js.slim index 3bc6c22f8..749ec04f6 100644 --- a/app/views/time_table_combinations/new.js.slim +++ b/app/views/time_table_combinations/new.js.slim @@ -1,2 +1,2 @@ -var combine_form_partial = "#{j render 'time_table_combinations/combine_form'}"; -$('#new_time_table_combination').replaceWith(combine_form_partial);
\ No newline at end of file +| var combine_form_partial = "#{j render 'time_table_combinations/combine_form'}"; +| $('#new_time_table_combination').replaceWith(combine_form_partial);
\ No newline at end of file diff --git a/app/views/time_tables/index.js.slim b/app/views/time_tables/index.js.slim index 8cdb70084..bc9585c4b 100644 --- a/app/views/time_tables/index.js.slim +++ b/app/views/time_tables/index.js.slim @@ -1 +1 @@ -$('#time_tables').html("#{escape_javascript(render('time_tables'))}");
\ No newline at end of file +| $('#time_tables').html("#{escape_javascript(render('time_tables'))}");
\ No newline at end of file diff --git a/app/views/vehicle_journey_frequencies/edit.js.slim b/app/views/vehicle_journey_frequencies/edit.js.slim index 704cc877e..de74b80c7 100644 --- a/app/views/vehicle_journey_frequencies/edit.js.slim +++ b/app/views/vehicle_journey_frequencies/edit.js.slim @@ -1,10 +1,10 @@ -$(document).ready(function() { -  $("#vehicle_journey_frequency_journey_pattern_id").change( -    function(){ -      var url = "#{select_journey_pattern_referential_line_route_vehicle_journey_path( @referential, @line, @route, @vehicle_journey_frequency)}?journey_pattern_id="+ -          $("#vehicle_journey_frequency_journey_pattern_input select option:selected").attr("value"); -      url += "&journey_category=frequency"; -      $.get(url); -    } -  ); -}); +|  $(document).ready(function() { +|    $("#vehicle_journey_frequency_journey_pattern_id").change( +|      function(){ +|        var url = "#{select_journey_pattern_referential_line_route_vehicle_journey_path( @referential, @line, @route, @vehicle_journey_frequency)}?journey_pattern_id="+ +|            $("#vehicle_journey_frequency_journey_pattern_input select option:selected").attr("value"); +|        url += "&journey_category=frequency"; +|        $.get(url); +|      } +|    ); +|  });
\ No newline at end of file diff --git a/app/views/vehicle_journey_frequencies/new.js.slim b/app/views/vehicle_journey_frequencies/new.js.slim index ba97df682..f4d742f72 100644 --- a/app/views/vehicle_journey_frequencies/new.js.slim +++ b/app/views/vehicle_journey_frequencies/new.js.slim @@ -1,13 +1,13 @@ -$(document).ready(function() { -  $("#vehicle_journey_frequency_journey_pattern_id").change( -    function(){ -      var vehicle_journey_journey_pattern_id = $("#vehicle_journey_frequency_journey_pattern_input select option:selected").attr("value"); -      if (vehicle_journey_journey_pattern_id > 0) { -        var url = "#{referential_line_route_journey_patterns_path(@referential.id,@line.id,@route.id)}"; -        url = url + "/" + vehicle_journey_journey_pattern_id + -            "/new_vehicle_journey?journey_category=frequency"; -        $.get(url); -      } -    } -  ); -}); +| $(document).ready(function() { +|   $("#vehicle_journey_frequency_journey_pattern_id").change( +|     function(){ +|       var vehicle_journey_journey_pattern_id = $("#vehicle_journey_frequency_journey_pattern_input select option:selected").attr("value"); +|       if (vehicle_journey_journey_pattern_id > 0) { +|         var url = "#{referential_line_route_journey_patterns_path(@referential.id,@line.id,@route.id)}"; +|         url = url + "/" + vehicle_journey_journey_pattern_id + +|             "/new_vehicle_journey?journey_category=frequency"; +|         $.get(url); +|       } +|     } +|   ); +| });
\ No newline at end of file diff --git a/app/views/vehicle_journey_frequencies/select_journey_pattern.js.slim b/app/views/vehicle_journey_frequencies/select_journey_pattern.js.slim index 114b99e29..205fee59e 100644 --- a/app/views/vehicle_journey_frequencies/select_journey_pattern.js.slim +++ b/app/views/vehicle_journey_frequencies/select_journey_pattern.js.slim @@ -1 +1 @@ -$('.journey_pattern_dependent_list').html("#{escape_javascript(render(partial: 'vehicle_journey_frequencies/vehicle_journey_at_stop_fields', collection: @vehicle_journey.vehicle_journey_at_stops, as: :vehicle_journey_at_stop, locals: { vehicle_journey_at_stops_size: @vehicle_journey.vehicle_journey_at_stops.size })).html_safe}");
\ No newline at end of file +| $('.journey_pattern_dependent_list').html("#{escape_javascript(render(partial: 'vehicle_journey_frequencies/vehicle_journey_at_stop_fields', collection: @vehicle_journey.vehicle_journey_at_stops, as: :vehicle_journey_at_stop, locals: { vehicle_journey_at_stops_size: @vehicle_journey.vehicle_journey_at_stops.size })).html_safe}");
\ No newline at end of file diff --git a/app/views/vehicle_journeys/edit.js.slim b/app/views/vehicle_journeys/edit.js.slim index a692bb543..9556d8474 100644 --- a/app/views/vehicle_journeys/edit.js.slim +++ b/app/views/vehicle_journeys/edit.js.slim @@ -1,9 +1,9 @@ -$(document).ready(function() { -  $("#vehicle_journey_journey_pattern_id").change( -    function(){ -      var url = "#{select_journey_pattern_referential_line_route_vehicle_journey_path( @referential, @line, @route, @vehicle_journey)}?journey_pattern_id="+ -      $("#vehicle_journey_journey_pattern_input select option:selected").attr("value"); -      $.get(url); -    } -  ) -}); +| $(document).ready(function() { +|   $("#vehicle_journey_journey_pattern_id").change( +|     function(){ +|       var url = "#{select_journey_pattern_referential_line_route_vehicle_journey_path( @referential, @line, @route, @vehicle_journey)}?journey_pattern_id="+ +|       $("#vehicle_journey_journey_pattern_input select option:selected").attr("value"); +|       $.get(url); +|     } +|   ) +| }); diff --git a/app/views/vehicle_journeys/index.js.slim b/app/views/vehicle_journeys/index.js.slim index 5f1b08f2c..bc4c1f780 100644 --- a/app/views/vehicle_journeys/index.js.slim +++ b/app/views/vehicle_journeys/index.js.slim @@ -1 +1 @@ -$('#vehicle_journeys').html("#{escape_javascript(render('vehicle_journeys'))}");
\ No newline at end of file +| $('#vehicle_journeys').html("#{escape_javascript(render('vehicle_journeys'))}");
\ No newline at end of file diff --git a/app/views/vehicle_journeys/select_journey_pattern.js.slim b/app/views/vehicle_journeys/select_journey_pattern.js.slim index efddb25b6..b42748cf7 100644 --- a/app/views/vehicle_journeys/select_journey_pattern.js.slim +++ b/app/views/vehicle_journeys/select_journey_pattern.js.slim @@ -1 +1 @@ -$('.journey_pattern_dependent_list').html("#{escape_javascript(render(partial: 'vehicle_journeys/vehicle_journey_at_stop_fields', collection: @vehicle_journey.vehicle_journey_at_stops, as: :vehicle_journey_at_stop, locals: { :vehicle_journey_at_stops_size => @vehicle_journey.vehicle_journey_at_stops.size })).html_safe}");
\ No newline at end of file +| $('.journey_pattern_dependent_list').html("#{escape_javascript(render(partial: 'vehicle_journeys/vehicle_journey_at_stop_fields', collection: @vehicle_journey.vehicle_journey_at_stops, as: :vehicle_journey_at_stop, locals: { :vehicle_journey_at_stops_size => @vehicle_journey.vehicle_journey_at_stops.size })).html_safe}");
\ No newline at end of file diff --git a/app/views/vehicle_translations/new.js.slim b/app/views/vehicle_translations/new.js.slim index faef9897f..ff5ae577d 100644 --- a/app/views/vehicle_translations/new.js.slim +++ b/app/views/vehicle_translations/new.js.slim @@ -1,2 +1,2 @@ -var modal_translation_content = "#{escape_javascript(render 'vehicle_translations/translate_form')}"; -$('#translate_form').html(modal_translation_content);
\ No newline at end of file +| var modal_translation_content = "#{escape_javascript(render 'vehicle_translations/translate_form')}"; +| $('#translate_form').html(modal_translation_content);
\ No newline at end of file | 
