diff options
Diffstat (limited to 'core/js/update.js')
-rw-r--r-- | core/js/update.js | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/core/js/update.js b/core/js/update.js index 22d680a0e8f..1613c3cc93b 100644 --- a/core/js/update.js +++ b/core/js/update.js @@ -146,21 +146,23 @@ })(); -$('.updateButton').on('click', function() { - var $updateEl = $('.update'); - var $progressEl = $('.update-progress'); - $progressEl.removeClass('hidden'); - $('.updateOverview').addClass('hidden'); - $('#update-progress-message-error').hide(); - $('#update-progress-message-warnings').hide(); - OC.Update.start($progressEl, { - productName: $updateEl.attr('data-productname'), - version: $updateEl.attr('data-version') +window.addEventListener('DOMContentLoaded', function() { + $('.updateButton').on('click', function() { + var $updateEl = $('.update'); + var $progressEl = $('.update-progress'); + $progressEl.removeClass('hidden'); + $('.updateOverview').addClass('hidden'); + $('#update-progress-message-error').hide(); + $('#update-progress-message-warnings').hide(); + OC.Update.start($progressEl, { + productName: $updateEl.attr('data-productname'), + version: $updateEl.attr('data-version') + }); + return false; }); - return false; -}); -$('.update-show-detailed').on('click', function() { - $('#update-progress-detailed').toggleClass('hidden'); - return false; + $('.update-show-detailed').on('click', function() { + $('#update-progress-detailed').toggleClass('hidden'); + return false; + }); }); |