More form validation

This commit is contained in:
Ludovic Marcotte
2015-03-27 15:33:44 -04:00
committed by Francis Lachapelle
parent ae2990d8d6
commit cf4593917f
3 changed files with 24 additions and 24 deletions

View File

@@ -108,12 +108,13 @@
};
$scope.editMailAccount = function(index) {
var account = $scope.preferences.defaults.AuxiliaryMailAccounts[index];
var account = $scope.preferences.defaults.AuxiliaryMailAccounts[index];
$mdDialog.show({
controller: AccountDialogCtrl,
templateUrl: 'editAccount?account=' + index,
targetEvent: null,
locals: { account: account }
locals: { account: account,
accountId: index}
}).then(function() {
$scope.preferences.defaults.AuxiliaryMailAccounts[index] = account;
});
@@ -244,8 +245,9 @@
};
}
function AccountDialogCtrl($scope, $mdDialog, account) {
function AccountDialogCtrl($scope, $mdDialog, account, accountId) {
$scope.account = account;
$scope.accountId = accountId;
$scope.cancel = function() {
$mdDialog.cancel();
};