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'