diff options
| author | Michel Etienne | 2014-08-22 10:57:46 +0200 |
|---|---|---|
| committer | Michel Etienne | 2014-08-22 10:57:46 +0200 |
| commit | b827bc2007a820341314da284a83a431803a573f (patch) | |
| tree | 4691456f15b771bba8c8eb287d129f10031ff39b /app/views | |
| parent | 194bb28c4acbc144493c2096341d9126ffeaae35 (diff) | |
| download | chouette-core-b827bc2007a820341314da284a83a431803a573f.tar.bz2 | |
clean correctly modal combine form
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/time_table_combinations/_combine.html.erb | 2 | ||||
| -rw-r--r-- | app/views/time_table_combinations/new.js.erb | 4 | ||||
| -rw-r--r-- | app/views/time_tables/show.html.erb | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/app/views/time_table_combinations/_combine.html.erb b/app/views/time_table_combinations/_combine.html.erb index 85fc5ab26..27b5f056f 100644 --- a/app/views/time_table_combinations/_combine.html.erb +++ b/app/views/time_table_combinations/_combine.html.erb @@ -1,4 +1,4 @@ -<div id="combine_form" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> +<div id="modal_combine" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> diff --git a/app/views/time_table_combinations/new.js.erb b/app/views/time_table_combinations/new.js.erb new file mode 100644 index 000000000..ea98d9aaf --- /dev/null +++ b/app/views/time_table_combinations/new.js.erb @@ -0,0 +1,4 @@ +var combine_form_partial = '<%= j render "time_table_combinations/combine_form" %> '; +$('#new_time_table_combination').replaceWith(combine_form_partial); + + diff --git a/app/views/time_tables/show.html.erb b/app/views/time_tables/show.html.erb index e02d96a58..7e9a5aa62 100644 --- a/app/views/time_tables/show.html.erb +++ b/app/views/time_tables/show.html.erb @@ -12,7 +12,7 @@ <li><%= link_to t('time_tables.actions.edit'), edit_referential_time_table_path(@referential, @time_table), :class => "edit" %></li> <li><%= link_to t('time_tables.actions.destroy'), referential_time_table_path(@referential, @time_table), :method => :delete, :data => {:confirm => t('time_tables.actions.destroy_confirm')}, :class => "remove" %></li> <li><font color="green"><i class="fa fa-files-o fa-fw"></i></font><%= link_to t('time_tables.actions.duplicate'), duplicate_referential_time_table_path(@referential, @time_table), :class => "with_fa" %></li> - <li><font color="#D98F3B"><i class="fa fa-cogs fa-fw"></i></font><%= link_to t('time_tables.actions.combine'), '#combine_form', 'data-toggle' => 'modal', :class => "with_fa"%></li> + <li><font color="#D98F3B"><i class="fa fa-cogs fa-fw"></i></font><%= link_to t('time_tables.actions.combine'), new_referential_time_table_time_table_combination_path(@referential, @time_table), {:remote => true, 'data-toggle' => "modal", 'data-target' => '#modal_combine', :class => "with_fa"} %></li> </ul> |
