From 1f7e02e4d4fa918d933b904abf12fca6fda2c526 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Thu, 31 Mar 2016 14:27:01 +0200 Subject: Add detailed logs hidden and show them on request --- core/js/update.js | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'core/js') diff --git a/core/js/update.js b/core/js/update.js index d15609ad471..31b97c56894 100644 --- a/core/js/update.js +++ b/core/js/update.js @@ -90,16 +90,16 @@ .removeClass('icon-loading-dark'); if (hasWarnings) { - $('') - .append('
') - .append(t('core', 'The update was successful. There were warnings.')) - .appendTo($el); + $el.find('.update-show-detailed').before( + $('') + .append('
') + .append(t('core', 'The update was successful. There were warnings.')) + ); var message = t('core', 'Please reload the page.'); - $('').append('
').append(message).append('
').appendTo($el); + $('').append(message).append('
').appendTo($el); } else { // FIXME: use product name $('') - .append('
') .append(t('core', 'The update was successful. Redirecting you to ownCloud now.')) .appendTo($el); setTimeout(function () { @@ -111,19 +111,31 @@ setMessage: function(message) { $('#update-progress-message').html(message); + $('#update-progress-detailed') + .append($('')) + .append(message) + .append($('
')); }, setPermanentMessage: function(message) { $('#update-progress-message').html(message); $('#update-progress-message-warnings') .show() - .append($('
    ').append(message)) + .append($('
      ').append(message)); + $('#update-progress-detailed') + .append($('')) + .append(message) + .append($('
      ')); }, setErrorMessage: function (message) { $('#update-progress-message-error') .show() .html(message); + $('#update-progress-detailed') + .append($('')) + .append(message) + .append($('
      ')); } }; @@ -143,4 +155,8 @@ $(document).ready(function() { }); return false; }); + $('.update-show-detailed').on('click', function() { + $('#update-progress-detailed').toggleClass('hidden'); + return false; + }); }); -- cgit v1.2.3