Feature: Added timeout / loading button for vouchers and a few other forms.

This commit is contained in:
Amritanshu committed 2013-12-17 15:48:22 +05:30
1 parent 66aca999e2
commit e5f8a4f86f
16 files changed
+31 -30

No files matched your search

+2 -2
View File
@@ -84,7 +84,7 @@ var PurchaseReturnCtrl = ['$scope', '$location', 'dateFilter', '$modal', 'vouche
if (angular.isDate($scope.voucher.Date)) {
$scope.voucher.Date = dateFilter($scope.voucher.Date, 'dd-MMM-yyyy');
}
$scope.voucher.$save({type: 'Purchase Return'}, function (u, putResponseHeaders) {
return $scope.voucher.$save({type: 'Purchase Return'}, function (u, putResponseHeaders) {
$scope.toasts.push({Type: 'Success', Message: ''});
$location.path('/Return/' + u.VoucherID);
}, function (data, status) {
@@ -102,7 +102,7 @@ var PurchaseReturnCtrl = ['$scope', '$location', 'dateFilter', '$modal', 'vouche
};
$scope.post = function () {
$scope.voucher.$post(function (u, putResponseHeaders) {
return $scope.voucher.$post(function (u, putResponseHeaders) {
$scope.toasts.push({Type: 'Success', Message: ''});
}, function (data, status) {
$scope.toasts.push({Type: 'Danger', Message: data.data});