Chore: Changed layout to confirm better with the Style Guide

This commit is contained in:
tanshu
2017-02-09 10:49:53 +05:30
parent 90c8e50cfa
commit 1468d43144
95 changed files with 127 additions and 123 deletions
@@ -0,0 +1,41 @@
'use strict';
var ProductGroupListController = ['$scope', 'productGroups', function ($scope, productGroups) {
$scope.info = productGroups;
}];
ProductGroupListController.resolve = {
productGroups: ['ProductGroup', function (ProductGroup) {
return ProductGroup.query({}).$promise;
}]
};
var ProductGroupController = ['$scope', '$location', 'productGroup', function ($scope, $location, productGroup) {
$scope.productGroup = productGroup;
$scope.save = function () {
$scope.productGroup.$save(function (u, putResponseHeaders) {
$scope.toasts.push({Type: 'Success', Message: ''});
$location.path('/ProductGroups')
}, function (data, status) {
$scope.toasts.push({Type: 'Danger', Message: data.data});
});
};
$scope.delete = function () {
$scope.productGroup.$delete(function (u, putResponseHeaders) {
$scope.toasts.push({Type: 'Success', Message: ''});
$location.path('/ProductGroups')
}, function (data, status) {
$scope.toasts.push({Type: 'Danger', Message: data.data});
});
};
$scope.foName = true;
}];
ProductGroupController.resolve = {
productGroup: ['$route', 'ProductGroup', function ($route, ProductGroup) {
var id = $route.current.params.id;
return ProductGroup.get({id: id}).$promise;
}]
};