aboutsummaryrefslogtreecommitdiff
path: root/src/main/webapp/apps/frontPageApp
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2012-12-28 13:13:14 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2012-12-28 13:13:14 +0100
commitc9ff3d5495b0229d837fa0ec23486cc7b6b191d0 (patch)
treeb978427f431aa41c59115978c6a017db84b9f2ec /src/main/webapp/apps/frontPageApp
parent422b1caeaa9f7d069a9208ecb0d0249485b1a05e (diff)
downloadesper-testing-c9ff3d5495b0229d837fa0ec23486cc7b6b191d0.tar.gz
esper-testing-c9ff3d5495b0229d837fa0ec23486cc7b6b191d0.tar.bz2
esper-testing-c9ff3d5495b0229d837fa0ec23486cc7b6b191d0.tar.xz
esper-testing-c9ff3d5495b0229d837fa0ec23486cc7b6b191d0.zip
o Listing builds on the person view.
Diffstat (limited to 'src/main/webapp/apps/frontPageApp')
-rw-r--r--src/main/webapp/apps/frontPageApp/frontPageApp.js21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/main/webapp/apps/frontPageApp/frontPageApp.js b/src/main/webapp/apps/frontPageApp/frontPageApp.js
index d92a163..c4fa0cc 100644
--- a/src/main/webapp/apps/frontPageApp/frontPageApp.js
+++ b/src/main/webapp/apps/frontPageApp/frontPageApp.js
@@ -1,11 +1,11 @@
'use strict';
-var frontPageApp = angular.module('frontPageApp', ['ngGrid', 'personService']).config(function ($routeProvider, $locationProvider) {
+var frontPageApp = angular.module('frontPageApp', ['ngGrid', 'person']).config(function ($routeProvider, $locationProvider) {
$routeProvider.
when('/', {controller: FrontPageCtrl, templateUrl: '/apps/frontPageApp/frontPage.html?noCache=' + noCache});
});
-function FrontPageCtrl($scope, $http, PersonService) {
+function FrontPageCtrl($scope, $http, Person) {
$scope.persons = [];
$scope.pagingOptions = {
@@ -19,6 +19,8 @@ function FrontPageCtrl($scope, $http, PersonService) {
data: 'persons',
displayFooter: true,
enablePaging: true,
+ enableRowReordering: false,
+ enableColumnReordering: false,
showFilter: false,
showColumnMenu: false,
canSelectRows: false,
@@ -41,7 +43,8 @@ function FrontPageCtrl($scope, $http, PersonService) {
$scope.setPagingData = function(data, page, pageSize){
// $scope.persons = data.slice((page - 1) * pageSize, page * pageSize);
$scope.persons = data;
- $scope.personsGridOptions.totalServerItems = data.length;
+// $scope.personsGridOptions.totalServerItems = data.length;
+ window.x = $scope.personsGridOptions;
if (!$scope.$$phase) {
$scope.$apply();
}
@@ -50,7 +53,7 @@ function FrontPageCtrl($scope, $http, PersonService) {
$scope.getPagedDataAsync = function (pageSize, page/*, searchText*/) {
setTimeout(function () {
- PersonService.query({startIndex: page * pageSize, count: pageSize}, function (persons) {
+ Person.query({startIndex: page * pageSize, count: pageSize}, function (persons) {
$scope.setPagingData(persons, page, pageSize);
});
}, 100);
@@ -60,9 +63,9 @@ function FrontPageCtrl($scope, $http, PersonService) {
$scope.getPagedDataAsync($scope.pagingOptions.pageSize, $scope.pagingOptions.currentPage);
}, true);
- $http.get('/resource/core/person-count').success(function(count) {
- $scope.pagingOptions.totalServerItems = count;
-
- $scope.getPagedDataAsync($scope.pagingOptions.pageSize, $scope.pagingOptions.currentPage);
- });
+// $http.get('/resource/core/person-count').success(function(count) {
+// $scope.pagingOptions.totalServerItems = count;
+//
+// $scope.getPagedDataAsync($scope.pagingOptions.pageSize, $scope.pagingOptions.currentPage);
+// });
}