(fix) hide the detail view when we have nothing to show

This commit is contained in:
Ludovic Marcotte
2015-05-05 15:42:09 -04:00
committed by Francis Lachapelle
parent a5cf7659eb
commit 7e82ece74c
4 changed files with 4 additions and 2 deletions

View File

@@ -326,7 +326,7 @@
<!-- This extra container is used to animate views transitions
double quotes in ng-animate is not a typo -->
<div id="detailView" class="view-detail" layout="column">
<div ng-show="card" id="detailView" class="view-detail" layout="column">
<md-card class="viewer" ui-view="card"><!-- card view --></md-card>
</div>

View File

@@ -55,6 +55,6 @@
<!-- This extra container is used to animate views transitions
double quotes in ng-animate is not a typo -->
<div id="detailView" class="view-detail ng-cloak" layout="column" ui-view="message" ng-animate="'view'"><!-- message view --></div>
<div ng-show="message" id="detailView" class="view-detail ng-cloak" layout="column" ui-view="message" ng-animate="'view'"><!-- message view --></div>
</container>

View File

@@ -112,6 +112,7 @@
// $scope functions
$scope.select = function(folder) {
$scope.editMode = false;
$rootScope.card = null;
$state.go('app.addressbook', {addressbookId: folder.id});
};
$scope.newAddressbook = function() {

View File

@@ -196,6 +196,7 @@
return;
$rootScope.currentFolder = folder;
$scope.editMode = false;
$rootScope.message = null;
$state.go('mail.account.mailbox', { accountId: account.id, mailboxId: encodeUriFilter(folder.path) });
};
$scope.saveFolder = function(folder) {