mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-14 01:02:57 -07:00
All Sln changes
This commit is contained in:
parent
b5855f2644
commit
796f0fc188
615 changed files with 68 additions and 747 deletions
27
Ombi.UI/Content/Angular/angular-loading-spinner.js
vendored
Normal file
27
Ombi.UI/Content/Angular/angular-loading-spinner.js
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
(function() {
|
||||
angular.module('ngLoadingSpinner', ['angularSpinner'])
|
||||
.directive('usSpinner',
|
||||
[
|
||||
'$http', '$rootScope', function($http, $rootScope) {
|
||||
return {
|
||||
link: function(scope, elm, attrs) {
|
||||
$rootScope.spinnerActive = false;
|
||||
scope.isLoading = function() {
|
||||
return $http.pendingRequests.length > 0;
|
||||
};
|
||||
|
||||
scope.$watch(scope.isLoading,
|
||||
function(loading) {
|
||||
$rootScope.spinnerActive = loading;
|
||||
if (loading) {
|
||||
elm.removeClass('ng-hide');
|
||||
} else {
|
||||
elm.addClass('ng-hide');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
]);
|
||||
}).call(this);
|
Loading…
Add table
Add a link
Reference in a new issue