From f2a1e1142c963ef1759b8bef023d143db7704716 Mon Sep 17 00:00:00 2001 From: bee0005 Date: Mon, 5 Sep 2016 16:12:24 +0000 Subject: [PATCH] update --- app/controllers/home_controller.rb | 2 +- app/views/home/index.html.erb | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 16490f4..20b15e5 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -19,7 +19,7 @@ class HomeController < ApplicationController def delete_file file_name = params[:file_name] puts "rm #{file_name} -rf" - `rm #{file_name} -rf` + #`rm #{file_name} -rf` redirect_to '/home/index' end end diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 8e85d95..5429a0a 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -135,7 +135,6 @@

Current directory : <%=@current_dir%>

Make Directory - Loading Test

@@ -218,18 +217,18 @@ } $(".Del_dir").click(function(e){ - $(location).attr('href', "#loading"); - $.ajax({ + $(location).attr('href', "#loading"); + $.ajax({ method: "POST", url: "/home/delete", data: { file_name: $("#delete_name").val() }, success : function(result){ change_directory($("#select_dir").text()); + $(location).attr('href', "#"); } }) $(".contextmenu").hide(); $(document).unbind('mousedown'); - $(location).attr('href', "#"); });