Skip to content

Commit

Permalink
Fix busy state loading animation in files
Browse files Browse the repository at this point in the history
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
  • Loading branch information
skjnldsv committed Sep 21, 2017
1 parent 87d1d3e commit da1dc37
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 9 additions & 1 deletion apps/files/css/files.scss
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,19 @@ table td.filename a.name {
line-height: 50px;
padding: 0;
}
table td.filename label.icon-loading-small {
&:after {
z-index: 10;
}
.thumbnail {
opacity: 0.2;
}
}
table td.filename .thumbnail {
display: inline-block;
width: 32px;
height: 32px;
margin-left: 8px;
margin-left: 9px;
margin-top: 9px;
cursor: pointer;
float: left;
Expand Down
6 changes: 2 additions & 4 deletions apps/files/js/filelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -2540,11 +2540,9 @@
$tr.toggleClass('busy', state);

if (state) {
$thumbEl.attr('data-oldimage', $thumbEl.css('background-image'));
$thumbEl.css('background-image', 'url('+ OC.imagePath('core', 'loading.gif') + ')');
$thumbEl.parent().addClass('icon-loading-small');
} else {
$thumbEl.css('background-image', $thumbEl.attr('data-oldimage'));
$thumbEl.removeAttr('data-oldimage');
$thumbEl.parent().addClass('icon-loading-small');
}
});
},
Expand Down

0 comments on commit da1dc37

Please sign in to comment.