Commit 2d07809eac55b7293e6203a2de0c7d1ab20c354b
Committed by
Rafael Manzo
1 parent
698b4b83
Exists in
colab
and in
4 other branches
Trying to create a gif animation to show while the processing isn't ready.
Signed-off By: Diego Araujo <diegoamc90@gmail.com>
Showing
4 changed files
with
13 additions
and
2 deletions
Show diff stats
app/controllers/modules_controller.rb
@@ -32,6 +32,8 @@ class ModulesController < ApplicationController | @@ -32,6 +32,8 @@ class ModulesController < ApplicationController | ||
32 | end | 32 | end |
33 | 33 | ||
34 | # POST /project/1/repositories/42/modules/24 | 34 | # POST /project/1/repositories/42/modules/24 |
35 | - def load_tree; end | 35 | + def load_tree |
36 | + render :partial => "modules/javascript.html.erb" | ||
37 | + end | ||
36 | 38 | ||
37 | end | 39 | end |
38 | \ No newline at end of file | 40 | \ No newline at end of file |
app/views/repositories/show.html.erb
@@ -36,6 +36,14 @@ | @@ -36,6 +36,14 @@ | ||
36 | <% end %> | 36 | <% end %> |
37 | 37 | ||
38 | <hr/> | 38 | <hr/> |
39 | + <div id="teste"></div> | ||
40 | + <script> | ||
41 | + window.onload=function(){ | ||
42 | + $.post("project_load_module_tree").done(function(data){ | ||
43 | + $("#teste").append(data); | ||
44 | + }); | ||
45 | + } | ||
46 | + </script> | ||
39 | 47 | ||
40 | <% if @processing.ready? %> | 48 | <% if @processing.ready? %> |
41 | <h2>Modules Tree</h2> | 49 | <h2>Modules Tree</h2> |
config/routes.rb
@@ -6,7 +6,7 @@ Mezuro::Application.routes.draw do | @@ -6,7 +6,7 @@ Mezuro::Application.routes.draw do | ||
6 | 6 | ||
7 | resources :projects do | 7 | resources :projects do |
8 | resources :repositories, except: [:update, :index] | 8 | resources :repositories, except: [:update, :index] |
9 | - get '/repositories/:id/modules/:module_result_id' => 'repositories#show', as: :repository_module | 9 | + get '/repositories/:id/modules/:module_result_id' => 'repositories#show', as: :repository_module |
10 | put '/repositories/:id' => 'repositories#update', as: :repository_update | 10 | put '/repositories/:id' => 'repositories#update', as: :repository_update |
11 | post '/repositories/:id/modules/:module_result_id' => 'modules#load_tree', as: :load_module_tree | 11 | post '/repositories/:id/modules/:module_result_id' => 'modules#load_tree', as: :load_module_tree |
12 | end | 12 | end |