sogo/UI/WebServerResources/js/Preferences/AccountDialogController.js
Francis Lachapelle 1dc5f0d412 (js) New file structure for Angular modules
JavaScript files are now merged by the 'js' Grunt task.
2015-06-12 12:01:21 -04:00

33 lines
834 B
JavaScript

/* -*- Mode: javascript; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* JavaScript for SOGoPreferences */
(function() {
'use strict';
/**
* @ngInject
*/
AccountDialogController.$inject = ['$scope', '$mdDialog', 'account', 'accountId', 'mailCustomFromEnabled'];
function AccountDialogController($scope, $mdDialog, account, accountId, mailCustomFromEnabled) {
$scope.account = account;
$scope.accountId = accountId;
$scope.customFromIsReadonly = function() {
if (accountId > 0)
return false;
return !mailCustomFromEnabled;
};
$scope.cancel = function() {
$mdDialog.cancel();
};
$scope.save = function() {
$mdDialog.hide();
};
}
angular
.module('SOGo.PreferencesUI')
.controller('AccountDialogController', AccountDialogController);
})();