1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-16 06:05:07 -05: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,11 +43,18 @@ 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) {
if (window.chrome && chrome.identity) {
emailDao.imapListFolders(function(err, folders) { emailDao.imapListFolders(function(err, folders) {
if (err) { if (err) {
console.log(err); console.log(err);
@ -62,7 +62,22 @@ define(function(require) {
} }
callback(folders); callback(folders);
$scope.$apply();
}); });
return;
}
callback([{
type: 'Inbox'
}, {
type: 'Sent'
}, {
type: 'Outbox'
}, {
type: 'Drafts'
}, {
type: 'Trash'
}]);
} }
}; };