1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-25 01:02:05 +00:00

Updated spinner visualization.

This commit is contained in:
Taloth Saldono 2015-07-26 21:37:46 +02:00
parent c8b7446f7c
commit 645c9c25d1
3 changed files with 31 additions and 5 deletions

View file

@ -72,7 +72,31 @@
.icon-sonarr-spinner {
.fa-icon-content(@fa-var-spinner);
margin: 0px -0.14em;
}
.fa-spin-overlay {
.fa-icon();
position : relative;
text-align : center;
vertical-align : baseline;
i {
opacity : 0.2;
&.icon-sonarr-spinner {
opacity : 1.0;
}
}
span {
position : absolute;
top : 0;
left : 0;
right : 0;
bottom : 0;
margin : 0 -0.5em;
}
}
.icon-sonarr-rename {

View file

@ -1,5 +1,5 @@
@import "../../Content/Bootstrap/mixins";
@import "../../Content/icons";
@import (reference) "../../Content/icons";
@import "../../Shared/Styles/clickable.less";
ul.qualities {

View file

@ -25,7 +25,7 @@ module.exports = function() {
var iconClasses = icon.attr('class').match(/(?:^|\s)icon\-.+?(?:$|\s)/);
if (iconClasses.length === 0) {
if (!iconClasses || iconClasses.length === 0) {
return this;
}
@ -38,7 +38,8 @@ module.exports = function() {
} else {
icon.attr('data-idle-icon', iconClass);
icon.removeClass(iconClass);
icon.addClass('fa-spin icon-sonarr-spinner');
icon.addClass('fa-spin-overlay');
icon.html('<i class="' + iconClass + '" /><span><i class="fa-spin icon-sonarr-spinner" /></span>');
}
return this;
@ -47,8 +48,9 @@ module.exports = function() {
$.fn.stopSpin = function() {
var icon = this.find('i').andSelf('i');
icon.empty();
this.removeClass('disabled');
icon.removeClass('fa-spin icon-sonarr-spinner');
icon.removeClass('fa-spin fa-spin-overlay');
var idleIcon = icon.attr('data-idle-icon');
if (idleIcon) {