fix(mail(css)): add explicit expanded/collapsed mailbox status
parent
6ab3633a61
commit
2545caf2e5
|
@ -546,13 +546,18 @@ static NSString *inboxFolderName = @"INBOX";
|
||||||
&& [currentFolderName caseInsensitiveCompare: sharedFoldersName] == NSOrderedSame)
|
&& [currentFolderName caseInsensitiveCompare: sharedFoldersName] == NSOrderedSame)
|
||||||
currentFolderName = [self labelForKey: @"SharedFoldersName"];
|
currentFolderName = [self labelForKey: @"SharedFoldersName"];
|
||||||
|
|
||||||
flags = [NSMutableArray array];;
|
flags = [NSMutableArray array];
|
||||||
|
|
||||||
if (last)
|
if (last)
|
||||||
folderType = [self _folderType: currentPath
|
{
|
||||||
flags: flags];
|
folderType = [self _folderType: currentPath
|
||||||
|
flags: flags];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
folderType = @"additional";
|
{
|
||||||
|
folderType = @"additional";
|
||||||
|
[flags addObject: @"noselect"];
|
||||||
|
}
|
||||||
|
|
||||||
if ([subscribedFolders objectForKey: folderPath])
|
if ([subscribedFolders objectForKey: folderPath])
|
||||||
isSubscribed = YES;
|
isSubscribed = YES;
|
||||||
|
|
|
@ -203,7 +203,7 @@
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.$isSpecial = false;
|
this.$isSpecial = false;
|
||||||
this.$icon = 'folder_open';
|
this.$icon = 'folder';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.$isNoInferiors = this.isNoInferiors();
|
this.$isNoInferiors = this.isNoInferiors();
|
||||||
|
|
|
@ -25,11 +25,12 @@
|
||||||
' ng-model="$ctrl.mailbox.$expanded"',
|
' ng-model="$ctrl.mailbox.$expanded"',
|
||||||
' ng-disabled="$ctrl.mailbox.children.length == 0"',
|
' ng-disabled="$ctrl.mailbox.children.length == 0"',
|
||||||
' ng-change="$ctrl.mailbox.$account.$flattenMailboxes({ reload: true, saveState: true })">',
|
' ng-change="$ctrl.mailbox.$account.$flattenMailboxes({ reload: true, saveState: true })">',
|
||||||
' <md-icon>{{$ctrl.mailbox.$icon}}</md-icon></md-checkbox>',
|
' </md-checkbox>',
|
||||||
' </div>',
|
' </div>',
|
||||||
' <p class="sg-item-name"',
|
' <p class="sg-item-name"',
|
||||||
' ng-click="$ctrl.selectFolder($event)"',
|
' ng-click="$ctrl.selectFolder($event)"',
|
||||||
' ng-dblclick="$ctrl.editFolder($event)">',
|
' ng-dblclick="$ctrl.editFolder($event)">',
|
||||||
|
' <md-icon ng-class="{ \'sg-opacity-70\': $ctrl.mailbox.isNoSelect() }">{{$ctrl.mailbox.$icon}}</md-icon>',
|
||||||
' <span ng-bind="$ctrl.mailbox.$displayName"></span>',
|
' <span ng-bind="$ctrl.mailbox.$displayName"></span>',
|
||||||
' <span class="sg-counter-badge ng-hide"',
|
' <span class="sg-counter-badge ng-hide"',
|
||||||
' ng-show="$ctrl.mailbox.unseenCount"',
|
' ng-show="$ctrl.mailbox.unseenCount"',
|
||||||
|
@ -111,7 +112,7 @@
|
||||||
this.inputElement.value = this.mailbox.name;
|
this.inputElement.value = this.mailbox.name;
|
||||||
this.clickableElement.classList.add('ng-hide');
|
this.clickableElement.classList.add('ng-hide');
|
||||||
this.inputContainer.classList.remove('ng-hide');
|
this.inputContainer.classList.remove('ng-hide');
|
||||||
if ($event.srcEvent.type == 'touchend') {
|
if ($event.srcEvent && $event.srcEvent.type == 'touchend') {
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$ctrl.inputElement.select();
|
$ctrl.inputElement.select();
|
||||||
$ctrl.inputElement.focus();
|
$ctrl.inputElement.focus();
|
||||||
|
|
|
@ -29,6 +29,10 @@ html * {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sg-opacity-70 {
|
||||||
|
opacity: .7;
|
||||||
|
}
|
||||||
|
|
||||||
.sg-category {
|
.sg-category {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
|
@ -92,16 +92,30 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
md-sidenav {
|
md-sidenav {
|
||||||
|
md-list-item.sg-mailbox-list-item {
|
||||||
|
// Lower by half the left padding of list items to accomodate the expand/collapse button
|
||||||
|
padding-left: $bl;
|
||||||
|
.sg-item-name {
|
||||||
|
transform: translateX(-$bl);
|
||||||
|
margin-right: 0;
|
||||||
|
md-icon {
|
||||||
|
margin-right: $bl;
|
||||||
|
}
|
||||||
|
&:focus {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
md-checkbox {
|
md-checkbox {
|
||||||
&.sg-folder {
|
&.sg-folder {
|
||||||
// Show checkbox as a "closed" folder when unchecked and "opened" folder when checked
|
// Show checkbox as a collapsed/right arrow when unchecked and expanded/down arrow when checked
|
||||||
.md-container:after {
|
.md-container:after {
|
||||||
color: rgba(0,0,0,0.54);
|
color: rgba(0,0,0,0.54);
|
||||||
font-family: 'Material Icons';
|
font-family: 'Material Icons';
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
content: "\e2c7"; // folder
|
content: "\e5df"; // arrow_right (collapsed folder)
|
||||||
top: -4px;
|
top: 0;
|
||||||
left: 0px;
|
left: 0;
|
||||||
width: 1em;
|
width: 1em;
|
||||||
height: 1em;
|
height: 1em;
|
||||||
}
|
}
|
||||||
|
@ -110,7 +124,7 @@ md-sidenav {
|
||||||
}
|
}
|
||||||
&.md-checked {
|
&.md-checked {
|
||||||
.md-container:after {
|
.md-container:after {
|
||||||
content: "\e2c8"; // folder open
|
content: "\e5c5"; // arrow_drop_down (expanded folder)
|
||||||
}
|
}
|
||||||
.md-icon {
|
.md-icon {
|
||||||
background-color: initial !important;
|
background-color: initial !important;
|
||||||
|
@ -119,11 +133,7 @@ md-sidenav {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Hide the label (which contains an icon) if the checkbox is enabled ..
|
// Hide the checkbox when disabled (no children)
|
||||||
.md-label {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
// .. but show the label and hide the checkbox when disabled (no children)
|
|
||||||
&[disabled] {
|
&[disabled] {
|
||||||
.md-container {
|
.md-container {
|
||||||
width: 0;
|
width: 0;
|
||||||
|
@ -131,18 +141,9 @@ md-sidenav {
|
||||||
content: '';
|
content: '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.md-label {
|
|
||||||
display: inline-block;
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.sg-item-name {
|
|
||||||
&:focus {
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.msg-attachment-image,
|
.msg-attachment-image,
|
||||||
.msg-attachment-link {
|
.msg-attachment-link {
|
||||||
|
|
Loading…
Reference in New Issue