1
0
mirror of https://github.com/moparisthebest/mail synced 2024-08-13 16:43:47 -04:00

ui works in dev mode again

This commit is contained in:
Tankred Hase 2013-10-11 23:45:30 +02:00
parent fefd7dea25
commit 66a4921573

View File

@ -9,13 +9,6 @@ define(function(require) {
emailDao = appController._emailDao; emailDao = appController._emailDao;
initFolders(function(folders) {
$scope.folders = folders;
// select inbox as the current folder on init
$scope.openFolder($scope.folders[0]);
$scope.$apply();
});
// //
// scope functions // scope functions
// //
@ -50,19 +43,41 @@ define(function(require) {
window.open(url, 'Compose Message', 'toolbar=no,width=720,height=640,left=500,top=200,status=no,scrollbars=no,resize=no'); window.open(url, 'Compose Message', 'toolbar=no,width=720,height=640,left=500,top=200,status=no,scrollbars=no,resize=no');
}; };
initFolders(function(folders) {
$scope.folders = folders;
// select inbox as the current folder on init
$scope.openFolder($scope.folders[0]);
});
// //
// helper functions // helper functions
// //
function initFolders(callback) { function initFolders(callback) {
emailDao.imapListFolders(function(err, folders) { if (window.chrome && chrome.identity) {
if (err) { emailDao.imapListFolders(function(err, folders) {
console.log(err); if (err) {
return; console.log(err);
} return;
}
callback(folders); callback(folders);
}); $scope.$apply();
});
return;
}
callback([{
type: 'Inbox'
}, {
type: 'Sent'
}, {
type: 'Outbox'
}, {
type: 'Drafts'
}, {
type: 'Trash'
}]);
} }
}; };