mirror of
https://github.com/sismics/docs.git
synced 2024-11-22 05:57:57 +01:00
Loading feedback
This commit is contained in:
parent
988f55de3f
commit
d1644dcbc0
@ -1 +0,0 @@
|
|||||||
- Loading feedback for document (list), document.view, tag.default
|
|
@ -3,7 +3,7 @@
|
|||||||
/**
|
/**
|
||||||
* Navigation controller.
|
* Navigation controller.
|
||||||
*/
|
*/
|
||||||
App.controller('Navigation', function($scope, $state, $rootScope, User, Restangular) {
|
App.controller('Navigation', function($scope, $http, $state, $rootScope, User, Restangular) {
|
||||||
$rootScope.userInfo = User.userInfo();
|
$rootScope.userInfo = User.userInfo();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -16,4 +16,8 @@ App.controller('Navigation', function($scope, $state, $rootScope, User, Restangu
|
|||||||
});
|
});
|
||||||
$event.preventDefault();
|
$event.preventDefault();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.isLoading = function() {
|
||||||
|
return $http.pendingRequests.length > 0;
|
||||||
|
};
|
||||||
});
|
});
|
BIN
docs-web/src/main/webapp/img/loader.gif
Normal file
BIN
docs-web/src/main/webapp/img/loader.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
@ -60,6 +60,10 @@
|
|||||||
<div class="navbar" ng-controller="Navigation">
|
<div class="navbar" ng-controller="Navigation">
|
||||||
<div class="navbar-inner">
|
<div class="navbar-inner">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
<div class="brand loader" ng-class="{hide: !isLoading() }">
|
||||||
|
<img src="img/loader.gif" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<a class="brand hidden-phone" href="#">Sismics Docs</a>
|
<a class="brand hidden-phone" href="#">Sismics Docs</a>
|
||||||
|
|
||||||
<ul class="nav" ng-show="!userInfo.anonymous">
|
<ul class="nav" ng-show="!userInfo.anonymous">
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
<img src="img/loader.gif" ng-show="!document" />
|
||||||
|
|
||||||
|
<div ng-show="document">
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button class="btn btn-danger" ng-click="deleteDocument(document)"><span class="icon-trash icon-white"></span> Delete</button>
|
<button class="btn btn-danger" ng-click="deleteDocument(document)"><span class="icon-trash icon-white"></span> Delete</button>
|
||||||
@ -38,3 +41,4 @@
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div ui-view="file"></div>
|
<div ui-view="file"></div>
|
||||||
|
</div>
|
@ -27,12 +27,16 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span8 well">
|
<div class="span8 well" ng-if="stats.length >= 0">
|
||||||
<h1>{{ tags.length }} <small>tag{{ tags.length > 1 ? 's' : '' }}</small></h1>
|
<h1>{{ tags.length }} <small>tag{{ tags.length > 1 ? 's' : '' }}</small></h1>
|
||||||
<dl class="dl-horizontal" ng-repeat="stat in stats | orderBy: '-count'">
|
<dl class="dl-horizontal" ng-repeat="stat in stats | orderBy: '-count'">
|
||||||
<dt>{{ stat.name }} <span class="badge badge-info" ng-style="{ 'background': stat.color }">{{ stat.count }}</span></dt>
|
<dt>{{ stat.name }} <span class="badge badge-info" ng-style="{ 'background': stat.color }">{{ stat.count }}</span></dt>
|
||||||
<dd><progress percent="stat.count / getStatCount() * 100" class="progress-info"></progress></dd>
|
<dd><progress percent="stat.count / getStatCount() * 100" class="progress-info"></progress></dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="span8 well" ng-if="!stats">
|
||||||
|
<img src="img/loader.gif" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
@ -43,6 +43,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// $http loader
|
||||||
|
.loader {
|
||||||
|
position: relative;
|
||||||
|
top: -2px;
|
||||||
|
|
||||||
|
&.hide {
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Tags list
|
// Tags list
|
||||||
.table-tags {
|
.table-tags {
|
||||||
tbody td {
|
tbody td {
|
||||||
|
Loading…
Reference in New Issue
Block a user