Backport #31205 to 4.0-stable in order to update Rails UJS (#33906).

git-svn-id: http://svn.redmine.org/redmine/branches/4.0-stable@20798 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2021-03-15 15:16:24 +00:00
parent ff5730cc88
commit 5c0ae4345d
4 changed files with 5 additions and 5 deletions

View File

@@ -1489,7 +1489,7 @@ module ApplicationHelper
# Returns the javascript tags that are included in the html layout head
def javascript_heads
tags = javascript_include_tag('jquery-1.11.1-ui-1.11.0-ujs-4.3.1', 'application', 'responsive')
tags = javascript_include_tag('jquery-1.11.1-ui-1.11.0-ujs-5.2.3', 'application', 'responsive')
unless User.current.pref.warn_on_leaving_unsaved == '0'
tags << "\n".html_safe + javascript_tag("$(window).load(function(){ warnLeavingUnsaved('#{escape_javascript l(:text_warn_on_leaving_unsaved)}'); });")
end

View File

@@ -37,7 +37,7 @@ module MyHelper
handle = content_tag('span', '', :class => 'sort-handle', :title => l(:button_move))
close = link_to(l(:button_delete),
{:action => "remove_block", :block => block},
:remote => true, :method => 'post',
:remote => true, :method => 'post',
:class => "icon-only icon-close", :title => l(:button_delete))
content = content_tag('div', handle + close, :class => 'contextual') + content

View File

@@ -1,5 +1,5 @@
<div class="contextual">
<%= form_tag({:action => "add_block"}, :remote => true, :id => "block-form") do %>
<%= form_tag({:action => "add_block"}, :remote => true, :id => "block-form", authenticity_token: true) do %>
<%= label_tag('block-select', l(:button_add)) %>:
<%= block_select_tag(@user) %>
<% end %>