EmployeeAttendance controller and subcontroller minifiable.

This commit is contained in:
Tanshu 2012-12-07 16:03:02 +05:30
parent b5518a7577
commit 68897338f1
2 changed files with 9 additions and 9 deletions

View File

@ -1,6 +1,6 @@
CACHE MANIFEST
# version 2012-12-07.5
# version 2012-12-07.6
CACHE:
/partial/404.html

View File

@ -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;
}
}]
};