1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-24 01:11:12 +00:00

Fix JQMIGRATE: jQuery.fn.load() is deprecated (#31884, #31196).

Patch by Marius BALTEANU.


git-svn-id: http://svn.redmine.org/redmine/trunk@18364 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA 2019-08-13 14:23:46 +00:00
parent 49090c5889
commit e2a00d2dc8
2 changed files with 3 additions and 3 deletions

View File

@ -1571,7 +1571,7 @@ module ApplicationHelper
def javascript_heads
tags = javascript_include_tag('jquery-2.2.4-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)}'); });")
tags << "\n".html_safe + javascript_tag("$(window).on('load', function(){ warnLeavingUnsaved('#{escape_javascript l(:text_warn_on_leaving_unsaved)}'); });")
end
tags
end

View File

@ -208,7 +208,7 @@
<% if @values_by_custom_field.present? %>
<div class="flash warning">
<%= l(:warning_fields_cleared_on_bulk_edit) %>:<br />
<%= l(:warning_fields_cleared_on_bulk_edit) %>:<br />
<%= safe_join(@values_by_custom_field.map {|field, ids| content_tag "span", "#{field.name} (#{ids.size})"}, ', ') %>
</div>
<% end %>
@ -229,7 +229,7 @@
<% end %>
<%= javascript_tag do %>
$(window).load(function(){
$(window).on('load', function(){
$(document).on('change', 'input[data-disables]', function(){
if ($(this).prop('checked')){
$($(this).data('disables')).attr('disabled', true).val('');