From b237379fa1f9549b0ec3c79ba476d0a870454cce Mon Sep 17 00:00:00 2001 From: Daniel Calviño Sánchez Date: Thu, 3 Aug 2017 19:18:17 +0200 Subject: Replace loading icon GIF with pure CSS loading icon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pure CSS loading icon uses an ::after pseudo-element, and thus it can only be used on container elements; the input element is not a container element, so when the class "icon-loading-small" is set on an input element it falls back to a loading icon GIF. This commit modifies the markup of the login button to add a div element that holds the confirm icon and the loading icon (depending on the case). In order to position the icon in the same place as before the input and the icon are both wrapped by another div making possible to set the absolute position of the icon relative to the input. Signed-off-by: Daniel Calviño Sánchez --- core/js/login.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'core/js') diff --git a/core/js/login.js b/core/js/login.js index 034bb169c52..81ef25ef2d4 100644 --- a/core/js/login.js +++ b/core/js/login.js @@ -12,9 +12,10 @@ */ OC.Login = _.extend(OC.Login || {}, { onLogin: function () { - $('#submit') + $('#submit-icon') .removeClass('icon-confirm-white') - .addClass('icon-loading-small') + .addClass('icon-loading-small'); + $('#submit') .attr('value', t('core', 'Logging in …')); return true; }, -- cgit v1.2.3