master
Nick Sergeant 2013-09-06 01:33:56 -04:00
parent a34c8eb65e
commit 4c32397cbe
1 changed files with 1 additions and 1 deletions

View File

@ -1 +1 @@
'use strict';(function(window){if(typeof angular!=='undefined'){var root=window;var $=root.jQuery;var controllers={};var app=root.app;app.filter('startFrom',function(){return function(input,start){start=+start;return input?input.slice(start):input;};});controllers.JobSearchController=function($http,$scope){$scope.currentPage=0;$scope.pageSize=10;$http.get('/jobs-json/').then(function(response){$scope.jobs=response.data;});$scope.numberOfPages=function(){if($scope.jobs){return Math.ceil($scope.jobs.length/$scope.pageSize);}};};app.controller(controllers);}})(window);
'use strict';(function(window){if(typeof angular!=='undefined'){var root=window;var $=root.jQuery;var controllers={};var app=root.app;app.filter('startFrom',function(){return function(input,start){start=+start;return input?input.slice(start):input;};});controllers.JobSearchController=function($http,$scope,filterFilter){$scope.currentPage=0;$scope.pageSize=10;$http.get('/jobs-json/').then(function(response){$scope.jobs=response.data;$scope.filterJobs();});$scope.filterJobs=function(){$scope.filteredJobs=filterFilter($scope.jobs,$scope.query);};$scope.numberOfPages=function(){if($scope.filteredJobs){return Math.ceil($scope.filteredJobs.length/$scope.pageSize);}};$scope.$watch('query',function(val){$scope.filterJobs();});};app.controller(controllers);}})(window);