From 68897338f1c00e254a1699f83c55caa904182ab0 Mon Sep 17 00:00:00 2001 From: Tanshu Date: Fri, 7 Dec 2012 16:03:02 +0530 Subject: [PATCH] EmployeeAttendance controller and subcontroller minifiable. --- brewman/brewman/static/offline.appcache | 2 +- .../static/scripts/employee-attendance.js | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/brewman/brewman/static/offline.appcache b/brewman/brewman/static/offline.appcache index 33af769e..36a7c834 100644 --- a/brewman/brewman/static/offline.appcache +++ b/brewman/brewman/static/offline.appcache @@ -1,6 +1,6 @@ CACHE MANIFEST -# version 2012-12-07.5 +# version 2012-12-07.6 CACHE: /partial/404.html diff --git a/brewman/brewman/static/scripts/employee-attendance.js b/brewman/brewman/static/scripts/employee-attendance.js index 8be6f04e..24efed37 100644 --- a/brewman/brewman/static/scripts/employee-attendance.js +++ b/brewman/brewman/static/scripts/employee-attendance.js @@ -1,6 +1,6 @@ 'use strict'; -function EmployeeAttendanceCtrl($scope, $location, $routeParams, EmployeeAttendance, attendance_types, info) { +var EmployeeAttendanceCtrl = ['$scope', '$location', '$routeParams', 'EmployeeAttendance', 'attendance_types', 'info', function ($scope, $location, $routeParams, EmployeeAttendance, attendance_types, info) { $scope.attendance_types = attendance_types; $scope.info = info; $scope.show = function () { @@ -24,9 +24,9 @@ function EmployeeAttendanceCtrl($scope, $location, $routeParams, EmployeeAttenda }); }; $('#txtEmployee').focus(); -} +}] -function EmployeeAttendanceSubCtrl($scope) { +var EmployeeAttendanceSubCtrl = ['$scope', function ($scope) { $scope.original = {}; angular.copy($scope.item, $scope.original); @@ -49,9 +49,9 @@ function EmployeeAttendanceSubCtrl($scope) { $scope.isDirty = function(){ return !angular.equals($scope.original, $scope.item) } -} +}] EmployeeAttendanceCtrl.resolve = { - info:function ($q, $route, EmployeeAttendance) { + info:['$q', '$route', 'EmployeeAttendance', function ($q, $route, EmployeeAttendance) { var deferred = $q.defer(); var id = $route.current.params.id; @@ -67,13 +67,13 @@ EmployeeAttendanceCtrl.resolve = { EmployeeAttendance.get({id:id, StartDate:start_date, FinishDate:finish_date}, successCb); } return deferred.promise; - }, - attendance_types:function ($q, AttendanceTypes) { + }], + attendance_types:['$q', 'AttendanceTypes', function ($q, AttendanceTypes) { var deferred = $q.defer(); var successCb = function (result) { deferred.resolve(result); }; AttendanceTypes.query({}, successCb); return deferred.promise; - } + }] }; \ No newline at end of file