Add button to create new mailbox from account root

This commit is contained in:
Francis Lachapelle
2015-04-29 14:37:04 -04:00
parent b390a4b117
commit d0ee85e77a
2 changed files with 11 additions and 4 deletions

View File

@@ -267,7 +267,16 @@
<var:component className="UIxSidenavToolbarTemplate" />
<md-content md-scroll-y="md-scroll-y" class="md-flex">
<section ng-repeat="account in accounts track by account.id">
<md-subheader class="sg-md-subheader md-padding">{{account.name}}</md-subheader>
<md-subheader class="sg-md-subheader">
<div layout="row" layout-align="space-between center">
<span>{{account.name}}</span>
<md-button class="iconButton"
label:aria-label="New Folder..."
ng-click="newFolder(account)">
<i class="md-icon-add-circle-outline"><!-- add --></i>
</md-button>
</div>
</md-subheader>
<md-list>
<md-list-item ng-repeat="folder in account.$flattenMailboxes() track by folder.path"
ng-click="selectFolder(account, folder)"

View File

@@ -180,9 +180,7 @@
Dialog.prompt(l('New folder'),
l('Enter the new name of your folder :'))
.then(function(name) {
if (name && name.length > 0) {
parentFolder.$newMailbox(parentFolder.id, name);
}
parentFolder.$newMailbox(parentFolder.id, name);
});
};
$scope.editFolder = function(folder) {