Updated spinner visualization.

pull/3113/head
Taloth Saldono 9 years ago
parent c8b7446f7c
commit 645c9c25d1

@ -72,7 +72,31 @@
.icon-sonarr-spinner { .icon-sonarr-spinner {
.fa-icon-content(@fa-var-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 { .icon-sonarr-rename {

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

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

Loading…
Cancel
Save