diff --git a/media/js/src/jobs.min.js b/media/js/src/jobs.min.js index f3c36df..f823836 100644 --- a/media/js/src/jobs.min.js +++ b/media/js/src/jobs.min.js @@ -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); \ No newline at end of file +'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); \ No newline at end of file