mirror of https://github.com/moparisthebest/mail
Add comments for code regions in controllers
This commit is contained in:
parent
eb4bc13e3f
commit
33b30221f7
|
@ -159,7 +159,6 @@ module.exports = function(grunt) {
|
||||||
'test/unit/util/dialog-test.js',
|
'test/unit/util/dialog-test.js',
|
||||||
'test/unit/util/connection-doctor-test.js',
|
'test/unit/util/connection-doctor-test.js',
|
||||||
'test/unit/util/update-handler-test.js',
|
'test/unit/util/update-handler-test.js',
|
||||||
'test/unit/util/backbutton-handler-test.js',
|
|
||||||
'test/unit/util/status-display-test.js',
|
'test/unit/util/status-display-test.js',
|
||||||
'test/unit/crypto/pgp-test.js',
|
'test/unit/crypto/pgp-test.js',
|
||||||
'test/unit/crypto/crypto-test.js',
|
'test/unit/crypto/crypto-test.js',
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
var AboutCtrl = function($scope, appConfig) {
|
var AboutCtrl = function($scope, appConfig) {
|
||||||
|
|
||||||
|
//
|
||||||
|
// scope state
|
||||||
|
//
|
||||||
|
|
||||||
$scope.state.about = {
|
$scope.state.about = {
|
||||||
toggle: function(to) {
|
toggle: function(to) {
|
||||||
$scope.state.lightbox = (to) ? 'about' : undefined;
|
$scope.state.lightbox = (to) ? 'about' : undefined;
|
||||||
|
@ -15,9 +19,6 @@ var AboutCtrl = function($scope, appConfig) {
|
||||||
$scope.version = appConfig.config.appVersion + ' (beta)';
|
$scope.version = appConfig.config.appVersion + ' (beta)';
|
||||||
$scope.date = new Date();
|
$scope.date = new Date();
|
||||||
|
|
||||||
//
|
|
||||||
// scope functions
|
|
||||||
//
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = AboutCtrl;
|
module.exports = AboutCtrl;
|
|
@ -6,6 +6,10 @@ var AccountCtrl = function($scope, auth, keychain, pgp, appConfig, download, dia
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// scope state
|
||||||
|
//
|
||||||
|
|
||||||
$scope.state.account = {
|
$scope.state.account = {
|
||||||
toggle: function(to) {
|
toggle: function(to) {
|
||||||
$scope.state.lightbox = (to) ? 'account' : undefined;
|
$scope.state.lightbox = (to) ? 'account' : undefined;
|
||||||
|
@ -46,6 +50,7 @@ var AccountCtrl = function($scope, auth, keychain, pgp, appConfig, download, dia
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = AccountCtrl;
|
module.exports = AccountCtrl;
|
|
@ -6,10 +6,13 @@
|
||||||
|
|
||||||
var ContactsCtrl = function($scope, keychain, pgp, dialog) {
|
var ContactsCtrl = function($scope, keychain, pgp, dialog) {
|
||||||
|
|
||||||
|
//
|
||||||
|
// scope state
|
||||||
|
//
|
||||||
|
|
||||||
$scope.state.contacts = {
|
$scope.state.contacts = {
|
||||||
toggle: function(to) {
|
toggle: function(to) {
|
||||||
$scope.state.lightbox = (to) ? 'contacts' : undefined;
|
$scope.state.lightbox = (to) ? 'contacts' : undefined;
|
||||||
|
|
||||||
$scope.listKeys();
|
$scope.listKeys();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -93,6 +96,7 @@ var ContactsCtrl = function($scope, keychain, pgp, dialog) {
|
||||||
$scope.listKeys();
|
$scope.listKeys();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
var DialogCtrl = function($scope, dialog) {
|
var DialogCtrl = function($scope, dialog) {
|
||||||
|
|
||||||
|
//
|
||||||
|
// scope state
|
||||||
|
//
|
||||||
|
|
||||||
$scope.state.dialog = {
|
$scope.state.dialog = {
|
||||||
open: false
|
open: false
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,6 +4,10 @@ var util = require('crypto-lib').util;
|
||||||
|
|
||||||
var PrivateKeyUploadCtrl = function($scope, keychain, pgp, dialog, auth) {
|
var PrivateKeyUploadCtrl = function($scope, keychain, pgp, dialog, auth) {
|
||||||
|
|
||||||
|
//
|
||||||
|
// scope state
|
||||||
|
//
|
||||||
|
|
||||||
$scope.state.privateKeyUpload = {
|
$scope.state.privateKeyUpload = {
|
||||||
toggle: function(to) {
|
toggle: function(to) {
|
||||||
// open lightbox
|
// open lightbox
|
||||||
|
@ -33,6 +37,10 @@ var PrivateKeyUploadCtrl = function($scope, keychain, pgp, dialog, auth) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//
|
||||||
|
// scope functions
|
||||||
|
//
|
||||||
|
|
||||||
$scope.checkServerForKey = function(callback) {
|
$scope.checkServerForKey = function(callback) {
|
||||||
var keyParams = pgp.getKeyParams();
|
var keyParams = pgp.getKeyParams();
|
||||||
keychain.hasPrivateKey({
|
keychain.hasPrivateKey({
|
||||||
|
|
Loading…
Reference in New Issue