From 9f3392eba88d8435dfd2939d94414430e8444807 Mon Sep 17 00:00:00 2001 From: linhk <304431313@.com> Date: Sat, 23 Aug 2014 16:41:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=B8=BB=E7=95=99=E8=A8=80?= =?UTF-8?q?=E6=97=B6=E7=A1=AE=E8=AE=A4=E5=88=A0=E9=99=A4=E7=9A=84=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/words_controller.rb | 1 - app/views/projects/feedback.html.erb | 2 +- config/routes.rb | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index 2d03b2112..f2502e03e 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -90,7 +90,6 @@ class WordsController < ApplicationController end def destroyJournal - @journalP=JournalsForMessage.find(params[:object_id]) @journalP.destroy diff --git a/app/views/projects/feedback.html.erb b/app/views/projects/feedback.html.erb index 8e36b8c59..f9182c544 100644 --- a/app/views/projects/feedback.html.erb +++ b/app/views/projects/feedback.html.erb @@ -85,7 +85,7 @@ function checkMaxLength() { <% if User.current.logged? %> <% if journal.user_id==User.current.id|| User.current.admin? %> <%= link_to(l(:button_delete),{:controller => 'words', :action => 'destroyJournal', :object_id => journal.id, :project_id=>@project.id, :page=>@page}, - :remote => true, :title => l(:button_delete)) %> + :remote => true, :title => l(:button_delete), :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete") %> <% end %> <% end %> diff --git a/config/routes.rb b/config/routes.rb index ed9001ee2..33b5cd16a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -652,6 +652,7 @@ RedmineApp::Application.routes.draw do post 'words/append', :to => 'words#append' post 'words/create_reply', :to => 'words#create_reply' delete 'words/destroy', :to => 'words#destroy' + delete 'words/destroyJournal', :to => 'words#destroyJournal' get 'words/more', :to => 'words#more' get 'words/back', :to=> 'words#back' get 'words/destroyJournal', :to => 'words#destroyJournal'