diff options
-rw-r--r-- | app/helpers/application_helper.rb | 2 | ||||
-rw-r--r-- | app/views/issues/bulk_edit.html.erb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d355d95a7..bb5a21fd8 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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 diff --git a/app/views/issues/bulk_edit.html.erb b/app/views/issues/bulk_edit.html.erb index 1298f0365..468bee148 100644 --- a/app/views/issues/bulk_edit.html.erb +++ b/app/views/issues/bulk_edit.html.erb @@ -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(''); |