fixes size of the download spinner

This commit is contained in:
Vincent Chan 2016-05-25 01:11:07 +02:00 committed by Joas Schilling
parent 12b482b976
commit 3538e90ba1
No known key found for this signature in database
GPG key ID: 70A0B324C41C0946
2 changed files with 4 additions and 4 deletions

View file

@ -665,11 +665,11 @@
OCA.Files.FileActions.updateFileActionSpinner = function($downloadButtonElement, showIt) {
var $icon = $downloadButtonElement.find('.icon');
if (showIt) {
var $loadingIcon = $('<span class="icon loading"></span>');
var $loadingIcon = $('<span class="icon icon-loading-small"></span>');
$icon.after($loadingIcon);
$icon.addClass('hidden');
} else {
$downloadButtonElement.find('.loading').remove();
$downloadButtonElement.find('.icon-loading-small').remove();
$downloadButtonElement.find('.icon').removeClass('hidden');
}
};

View file

@ -666,13 +666,13 @@ describe('OCA.Files.FileActions tests', function() {
it('replaces download icon with spinner', function() {
FileActions.updateFileActionSpinner($el, true);
expect($el.find('.icon.loading').length).toEqual(1);
expect($el.find('.icon.icon-loading-small').length).toEqual(1);
expect($el.find('.icon.icon-download').hasClass('hidden')).toEqual(true);
});
it('replaces spinner back with download icon with spinner', function() {
FileActions.updateFileActionSpinner($el, true);
FileActions.updateFileActionSpinner($el, false);
expect($el.find('.icon.loading').length).toEqual(0);
expect($el.find('.icon.icon-loading-small').length).toEqual(0);
expect($el.find('.icon.icon-download').hasClass('hidden')).toEqual(false);
});
});