|
@@ -442,18 +442,8 @@ define(['app/app'], function(app) {
|
|
|
|
|
|
|
|
}]);
|
|
}]);
|
|
|
|
|
|
|
|
- app.register.controller('RoleEditCtrl', ['$scope', '$modalInstance', '$timeout', 'toaster','role', 'BaseService', function ($scope, $modalInstance, $timeout, toaster,role, BaseService) {
|
|
|
|
|
- BaseService.scrollBackToTop();
|
|
|
|
|
- $scope.role = role;
|
|
|
|
|
- $scope.master = angular.copy($scope.role);
|
|
|
|
|
- var isNew = role == null;
|
|
|
|
|
- $scope.cancel = function () {
|
|
|
|
|
- $modalInstance.close(false);
|
|
|
|
|
- };
|
|
|
|
|
-
|
|
|
|
|
- }]);
|
|
|
|
|
|
|
|
|
|
- app.register.controller('RoleEditCtrl', ['$scope', '$modalInstance', '$timeout', 'AccountResource', 'AccountRole', 'toaster', 'role', 'ngAlert', 'BaseService', function ($scope, $modalInstance, $timeout, AccountResource, AccountRole, toaster, role, ngAlert, BaseService) {
|
|
|
|
|
|
|
+ app.register.controller('RoleEditCtrl', ['$scope', '$modalInstance', '$timeout', 'AccountResource', 'AccountRole', 'toaster', 'role', 'BaseService', function ($scope, $modalInstance, $timeout, AccountResource, AccountRole, toaster, role, BaseService) {
|
|
|
BaseService.scrollBackToTop();
|
|
BaseService.scrollBackToTop();
|
|
|
$scope.role = role;
|
|
$scope.role = role;
|
|
|
$scope.master = angular.copy($scope.role);
|
|
$scope.master = angular.copy($scope.role);
|
|
@@ -543,17 +533,17 @@ define(['app/app'], function(app) {
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
$scope.del = function () {
|
|
$scope.del = function () {
|
|
|
- new ngAlert({
|
|
|
|
|
|
|
+ /*new ngAlert({
|
|
|
title: '提示',
|
|
title: '提示',
|
|
|
content: '确定删除角色(' + $scope.role.desc + ')吗?'
|
|
content: '确定删除角色(' + $scope.role.desc + ')吗?'
|
|
|
- }, function () {
|
|
|
|
|
|
|
+ }, function () {*/
|
|
|
AccountRole.remove({id: role.id}, function () {
|
|
AccountRole.remove({id: role.id}, function () {
|
|
|
toaster.pop('success', '提示', '角色:' + $scope.role.desc + ' 删除成功');
|
|
toaster.pop('success', '提示', '角色:' + $scope.role.desc + ' 删除成功');
|
|
|
$modalInstance.close(true);
|
|
$modalInstance.close(true);
|
|
|
}, function (response) {
|
|
}, function (response) {
|
|
|
toaster.pop('error', '错误', response.data);
|
|
toaster.pop('error', '错误', response.data);
|
|
|
});
|
|
});
|
|
|
- })
|
|
|
|
|
|
|
+ //})
|
|
|
};
|
|
};
|
|
|
}]);
|
|
}]);
|
|
|
});
|
|
});
|