Rip out spinjs in favor of a font-awesome + css spinner.
This commit is contained in:
parent
31a72253a9
commit
237b0418f9
8 changed files with 16 additions and 50 deletions
|
@ -1,30 +1,3 @@
|
|||
// Register any plugin code.
|
||||
$.fn.spin = function(opts) {
|
||||
this.each(function() {
|
||||
var $this = $(this),
|
||||
spinner = $this.data('spinner');
|
||||
|
||||
if (spinner) spinner.stop();
|
||||
if (opts !== false) {
|
||||
options = {
|
||||
color: $this.css('color') || '#000',
|
||||
lines: 12, // The number of lines to draw
|
||||
length: 7, // The length of each line
|
||||
width: 4, // The line thickness
|
||||
radius: 10, // The radius of the inner circle
|
||||
speed: 1, // Rounds per second
|
||||
trail: 100, // Afterglow percentage
|
||||
shadow: false // Whether to render a shadow
|
||||
};
|
||||
|
||||
opts = $.extend(options, opts);
|
||||
spinner = new Spinner(opts).spin(this);
|
||||
$this.data('spinner', spinner);
|
||||
}
|
||||
});
|
||||
return this;
|
||||
};
|
||||
|
||||
// Start the application code itself.
|
||||
quayApp = angular.module('quay', ['restangular', 'angularMoment'], function($provide) {
|
||||
$provide.factory('UserService', ['Restangular', function(Restangular) {
|
||||
|
|
|
@ -108,7 +108,6 @@ function RepoListCtrl($scope, Restangular, UserService) {
|
|||
return getMarkedDown(string);
|
||||
};
|
||||
|
||||
$('.spin').spin();
|
||||
$scope.loading = true;
|
||||
$scope.public_repositories = null;
|
||||
$scope.private_repositories = null;
|
||||
|
@ -131,7 +130,6 @@ function RepoListCtrl($scope, Restangular, UserService) {
|
|||
|
||||
function LandingCtrl($scope, $timeout, Restangular, UserService) {
|
||||
$('.form-signup').popover();
|
||||
$('.spin').spin();
|
||||
|
||||
$scope.$watch( function () { return UserService.currentUser(); }, function (currentUser) {
|
||||
if (!currentUser.anonymous) {
|
||||
|
@ -262,7 +260,6 @@ function RepoCtrl($scope, Restangular, $routeParams, $rootScope) {
|
|||
var name = $routeParams.name;
|
||||
var tag = $routeParams.tag || 'latest';
|
||||
|
||||
$('.spin').spin();
|
||||
$scope.loading = true;
|
||||
|
||||
var repositoryFetch = Restangular.one('repository/' + namespace + '/' + name);
|
||||
|
@ -417,7 +414,6 @@ function RepoAdminCtrl($scope, Restangular, $routeParams, $rootScope) {
|
|||
});
|
||||
};
|
||||
|
||||
$('.spin').spin();
|
||||
$scope.loading = true;
|
||||
|
||||
// Fetch the repository information.
|
||||
|
@ -472,8 +468,6 @@ function UserAdminCtrl($scope, Restangular) {
|
|||
planDict[$scope.plans[i].stripeId] = $scope.plans[i];
|
||||
}
|
||||
|
||||
$('.spin').spin();
|
||||
|
||||
var subscribedToPlan = function(sub) {
|
||||
$scope.subscription = sub;
|
||||
$scope.subscribedPlan = planDict[sub.plan];
|
||||
|
|
Reference in a new issue