aboutsummaryrefslogtreecommitdiff
path: root/src/main/webapp/apps/frontPageApp/frontPageApp.js
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-01-06 12:43:09 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2013-01-06 12:43:09 +0100
commit37207267bf3a1149f78a5022ed8e016cac6b85ca (patch)
tree6cb1166ba3904780ab64f5edf52528bc743c0817 /src/main/webapp/apps/frontPageApp/frontPageApp.js
parenta9543bd5570b7435b760a8eb3c8b457c889a5fca (diff)
downloadesper-testing-37207267bf3a1149f78a5022ed8e016cac6b85ca.tar.gz
esper-testing-37207267bf3a1149f78a5022ed8e016cac6b85ca.tar.bz2
esper-testing-37207267bf3a1149f78a5022ed8e016cac6b85ca.tar.xz
esper-testing-37207267bf3a1149f78a5022ed8e016cac6b85ca.zip
o Adding a view for showing a list of people.
Diffstat (limited to 'src/main/webapp/apps/frontPageApp/frontPageApp.js')
-rwxr-xr-xsrc/main/webapp/apps/frontPageApp/frontPageApp.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main/webapp/apps/frontPageApp/frontPageApp.js b/src/main/webapp/apps/frontPageApp/frontPageApp.js
index ef0de81..c973983 100755
--- a/src/main/webapp/apps/frontPageApp/frontPageApp.js
+++ b/src/main/webapp/apps/frontPageApp/frontPageApp.js
@@ -3,15 +3,20 @@
var frontPageApp = angular.module('frontPageApp', ['ngGrid', 'person', 'badge', 'build', 'pagingTableService', 'core.directives']).config(function ($routeProvider, $locationProvider) {
$routeProvider.
when('/', {controller: FrontPageCtrl, templateUrl: '/apps/frontPageApp/frontPage.html?noCache=' + noCache}).
+ when('/person/', {controller: PersonListCtrl, templateUrl: '/apps/frontPageApp/personList.html?noCache=' + noCache}).
when('/person/:personUuid', {controller: PersonCtrl, templateUrl: '/apps/frontPageApp/person.html?noCache=' + noCache});
});
-function FrontPageCtrl($scope, Person, Badge, PagingTableService) {
- $scope.persons = PagingTableService.create($scope, PagingTableService.defaultCallback(Person));
+function FrontPageCtrl($scope, Person, Badge) {
+ $scope.persons = Person.query();
$scope.recentBadges = Badge.query();
}
-function PersonCtrl($scope, $routeParams, Person, Badge, Build, PagingTableService) {
+function PersonListCtrl($scope, Person, PagingTableService) {
+ $scope.persons = PagingTableService.create($scope, PagingTableService.defaultCallback(Person, {orderBy: "name"}));
+}
+
+function PersonCtrl($scope, $routeParams, Person, Build, PagingTableService) {
var personUuid = $routeParams.personUuid;
$scope.mode = 'overview';