0001-Fix-JQMIGRATE-jQuery.fn.load-is-deprecated.patch

Marius BALTEANU, 2019-08-13 02:00

Download (1.94 KB)

View differences:

app/helpers/application_helper.rb
1571 1571
  def javascript_heads
1572 1572
    tags = javascript_include_tag('jquery-2.2.4-ui-1.11.0-ujs-5.2.3', 'application', 'responsive')
1573 1573
    unless User.current.pref.warn_on_leaving_unsaved == '0'
1574
      tags << "\n".html_safe + javascript_tag("$(window).load(function(){ warnLeavingUnsaved('#{escape_javascript l(:text_warn_on_leaving_unsaved)}'); });")
1574
      tags << "\n".html_safe + javascript_tag("$(window).on('load', function(){ warnLeavingUnsaved('#{escape_javascript l(:text_warn_on_leaving_unsaved)}'); });")
1575 1575
    end
1576 1576
    tags
1577 1577
  end
app/views/issues/bulk_edit.html.erb
208 208

  
209 209
<% if @values_by_custom_field.present? %>
210 210
<div class="flash warning">
211
  <%= l(:warning_fields_cleared_on_bulk_edit) %>:<br /> 
211
  <%= l(:warning_fields_cleared_on_bulk_edit) %>:<br />
212 212
  <%= safe_join(@values_by_custom_field.map {|field, ids| content_tag "span", "#{field.name} (#{ids.size})"}, ', ') %>
213 213
</div>
214 214
<% end %>
......
229 229
<% end %>
230 230

  
231 231
<%= javascript_tag do %>
232
$(window).load(function(){
232
$(window).on('load', function(){
233 233
  $(document).on('change', 'input[data-disables]', function(){
234 234
    if ($(this).prop('checked')){
235 235
      $($(this).data('disables')).attr('disabled', true).val('');
236
-