From 5ace09f78245fddf09dae1c688d7cd4d8cd228ba Mon Sep 17 00:00:00 2001 From: mustafahlvc Date: Fri, 22 Sep 2017 12:03:21 +0300 Subject: [PATCH] Calendar, Contacts, Mail, Scrumboard apps responsive refinements, + temporary fix for md-sidenav-locked transition --- .../md-sidenav-helper.directive.ts | 16 +- .../scss/partials/_angular-material-fix.scss | 3 +- .../apps/calendar/calendar.component.html | 3 +- .../apps/calendar/calendar.component.scss | 17 +- .../event-form/event-form.component.html | 239 +++--- .../event-form/event-form.component.scss | 13 +- .../contact-form/contact-form.component.html | 240 +++--- .../contact-form/contact-form.component.scss | 16 +- .../contact-list/contact-list.component.html | 6 - .../contact-list/contact-list.component.scss | 3 +- .../contact-list/contact-list.component.ts | 24 +- .../apps/contacts/contacts.component.html | 13 +- .../apps/contacts/contacts.component.scss | 7 + .../apps/contacts/contacts.component.ts | 32 +- .../dialogs/compose/compose.component.html | 174 ++-- .../dialogs/compose/compose.component.scss | 13 +- .../board/dialogs/card/card.component.html | 784 +++++++++--------- .../board/dialogs/card/card.component.scss | 11 +- 18 files changed, 827 insertions(+), 787 deletions(-) diff --git a/src/app/core/directives/md-sidenav-helper/md-sidenav-helper.directive.ts b/src/app/core/directives/md-sidenav-helper/md-sidenav-helper.directive.ts index ca6fa6af..f0ad7ab4 100644 --- a/src/app/core/directives/md-sidenav-helper/md-sidenav-helper.directive.ts +++ b/src/app/core/directives/md-sidenav-helper/md-sidenav-helper.directive.ts @@ -1,4 +1,4 @@ -import { Directive, Input, OnInit, HostListener, OnDestroy, HostBinding, AfterViewInit } from '@angular/core'; +import { Directive, Input, OnInit, HostListener, OnDestroy, HostBinding } from '@angular/core'; import { MdSidenav } from '@angular/material'; import { FuseMdSidenavHelperService } from 'app/core/directives/md-sidenav-helper/md-sidenav-helper.service'; import { FuseMatchMedia } from '../../services/match-media.service'; @@ -8,7 +8,7 @@ import { Subscription } from 'rxjs/Subscription'; @Directive({ selector: '[fuseMdSidenavHelper]' }) -export class FuseMdSidenavHelperDirective implements OnInit, AfterViewInit, OnDestroy +export class FuseMdSidenavHelperDirective implements OnInit, OnDestroy { matchMediaSubscription: Subscription; @@ -38,6 +38,7 @@ export class FuseMdSidenavHelperDirective implements OnInit, AfterViewInit, OnDe this.mdSidenav.mode = 'side'; this.mdSidenav.open(); }); + this.stopTransition = false; } else { @@ -46,6 +47,10 @@ export class FuseMdSidenavHelperDirective implements OnInit, AfterViewInit, OnDe this.mdSidenav.mode = 'over'; this.mdSidenav.close(); }); + + setTimeout(() => { + this.stopTransition = false; + }, 3000); } this.matchMediaSubscription = this.fuseMatchMedia.onMediaChange.subscribe(() => { @@ -69,13 +74,6 @@ export class FuseMdSidenavHelperDirective implements OnInit, AfterViewInit, OnDe } - ngAfterViewInit() - { - setTimeout(() => { - this.stopTransition = false; - }, 300); - } - ngOnDestroy() { this.matchMediaSubscription.unsubscribe(); diff --git a/src/app/core/scss/partials/_angular-material-fix.scss b/src/app/core/scss/partials/_angular-material-fix.scss index 437fe6ac..5a4cb7df 100644 --- a/src/app/core/scss/partials/_angular-material-fix.scss +++ b/src/app/core/scss/partials/_angular-material-fix.scss @@ -9,9 +9,10 @@ md-sidenav-container { md-sidenav { - &.md-stop-transition { + &[md-is-locked-open].md-stop-transition { transition: none !important; transform: translate3d(0, 0, 0) !important; + opacity: 0; ~ .mat-sidenav-content, ~ .mat-drawer-content { diff --git a/src/app/main/content/apps/calendar/calendar.component.html b/src/app/main/content/apps/calendar/calendar.component.html index 6f7969e7..0e04352d 100644 --- a/src/app/main/content/apps/calendar/calendar.component.html +++ b/src/app/main/content/apps/calendar/calendar.component.html @@ -1,6 +1,7 @@
+ -
+
diff --git a/src/app/main/content/apps/calendar/calendar.component.scss b/src/app/main/content/apps/calendar/calendar.component.scss index a525f698..4fc3c6a2 100644 --- a/src/app/main/content/apps/calendar/calendar.component.scss +++ b/src/app/main/content/apps/calendar/calendar.component.scss @@ -26,8 +26,8 @@ } .cal-open-day-events { - background: #455A64; - box-shadow: inset 0 0 12px 0 rgba(0, 0, 0, 0.54); + background: whitesmoke; + box-shadow: inset 0 0 15px 0 rgba(0, 0, 0, 0.13); padding: 0; display: flex; flex-direction: column; @@ -44,11 +44,11 @@ transition: box-shadow 300ms ease; &:first-of-type { - margin-top: 16px; + margin-top: 24px; } &:last-of-type { - margin-bottom: 16px; + margin-bottom: 24px; } &:hover { @@ -184,12 +184,13 @@ #calendar { background: #FFFFFF; + overflow-x: hidden; + overflow-y: auto; .header { height: 200px; min-height: 200px; max-height: 200px; - padding: 24px; position: relative; background-size: 100% auto; background-position: 0 50%; @@ -197,6 +198,12 @@ background-color: #FAFAFA; color: #FFFFFF; + @include media-breakpoint(xs) { + height: 164px; + min-height: 164px; + max-height: 164px; + } + &:before { content: ''; position: absolute; diff --git a/src/app/main/content/apps/calendar/event-form/event-form.component.html b/src/app/main/content/apps/calendar/event-form/event-form.component.html index 60270d72..3adb7c31 100644 --- a/src/app/main/content/apps/calendar/event-form/event-form.component.html +++ b/src/app/main/content/apps/calendar/event-form/event-form.component.html @@ -1,95 +1,98 @@ - -
- {{dialogTitle}} - -
-
- -
- -
- - - - - -
- - All Day - +
+ +
+ {{dialogTitle}} +
+
-
- +
+ + + + + name="title" + formControlName="title" + placeholder="Title" + required> - + +
+ + All Day + +
+ +
+ + + + + + +
+ +
+ + + + + + + + + + + +
+ +
+ + + + + + + + + + + +
+ + - -
- -
- - - - - - - - - -
- -
- - - - - - - - - + name="location" + formControlName="location" + placeholder="Location"> -
- - - - - - + - + - - -
- -
- - - - - - + +
+ +
+ + + + + + +
diff --git a/src/app/main/content/apps/calendar/event-form/event-form.component.scss b/src/app/main/content/apps/calendar/event-form/event-form.component.scss index b0e6b5e6..39481391 100644 --- a/src/app/main/content/apps/calendar/event-form/event-form.component.scss +++ b/src/app/main/content/apps/calendar/event-form/event-form.component.scss @@ -2,11 +2,12 @@ .mat-dialog-container { padding: 0; - width: 720px; + width: 480px; + } + + .dialog-content-wrapper { + max-height: 85vh; + display: flex; + flex-direction: column; } } - -:host { - display: flex; - flex-direction: column; -} diff --git a/src/app/main/content/apps/contacts/contact-form/contact-form.component.html b/src/app/main/content/apps/contacts/contact-form/contact-form.component.html index 3f5d83e7..66ba7464 100644 --- a/src/app/main/content/apps/contacts/contact-form/contact-form.component.html +++ b/src/app/main/content/apps/contacts/contact-form/contact-form.component.html @@ -1,126 +1,128 @@ - -
- {{dialogTitle}} - +
+ +
+ {{dialogTitle}} + +
+ + + +
{{contact.name}}
+
+
+ +
+ +
+ +
+ account_circle + + + +
+ +
+ + + + +
+ +
+ star + + + +
+ +
+ phone + + + +
+ +
+ email + + + +
+ +
+ domain + + + +
+ +
+ work + + + +
+ +
+ + + + + +
+ +
+ home + + + +
+ +
+ note + + + +
+ +
+
- - -
{{contact.name}}
-
- +
-
+ -
+ -
- account_circle - - - -
- -
- - - - -
- -
- star - - - -
- -
- phone - - - -
- -
- email - - - -
- -
- domain - - - -
- -
- work - - - -
- -
- - - - - -
- -
- home - - - -
- -
- note - - - -
- -
- -
- -
- - - - - - + +
diff --git a/src/app/main/content/apps/contacts/contact-form/contact-form.component.scss b/src/app/main/content/apps/contacts/contact-form/contact-form.component.scss index 9ad953f9..c54abb3b 100644 --- a/src/app/main/content/apps/contacts/contact-form/contact-form.component.scss +++ b/src/app/main/content/apps/contacts/contact-form/contact-form.component.scss @@ -3,14 +3,20 @@ .mat-dialog-container { padding: 0; width: 400px; + overflow: hidden; + + .mat-toolbar { + min-height: initial; + } .toolbar-bottom { - height: 200px; + height: auto; } } -} -:host { - display: flex; - flex-direction: column; + .dialog-content-wrapper { + max-height: 85vh; + display: flex; + flex-direction: column; + } } diff --git a/src/app/main/content/apps/contacts/contact-list/contact-list.component.html b/src/app/main/content/apps/contacts/contact-list/contact-list.component.html index 5e43e571..efc084d0 100644 --- a/src/app/main/content/apps/contacts/contact-list/contact-list.component.html +++ b/src/app/main/content/apps/contacts/contact-list/contact-list.component.html @@ -104,9 +104,3 @@ - - - diff --git a/src/app/main/content/apps/contacts/contact-list/contact-list.component.scss b/src/app/main/content/apps/contacts/contact-list/contact-list.component.scss index 78fd80ee..69281698 100644 --- a/src/app/main/content/apps/contacts/contact-list/contact-list.component.scss +++ b/src/app/main/content/apps/contacts/contact-list/contact-list.component.scss @@ -8,7 +8,7 @@ box-shadow: none; .mat-column-checkbox { - flex: 0 1 64px; + flex: 0 1 48px; } .mat-column-avatar { @@ -22,6 +22,7 @@ .mat-row { position: relative; cursor: pointer; + padding-right: 8px; .mat-cell { min-width: 0; diff --git a/src/app/main/content/apps/contacts/contact-list/contact-list.component.ts b/src/app/main/content/apps/contacts/contact-list/contact-list.component.ts index cc0e8287..671554a7 100644 --- a/src/app/main/content/apps/contacts/contact-list/contact-list.component.ts +++ b/src/app/main/content/apps/contacts/contact-list/contact-list.component.ts @@ -12,7 +12,7 @@ import { fuseAnimations } from '../../../../../core/animations'; selector : 'fuse-contacts-contact-list', templateUrl: './contact-list.component.html', styleUrls : ['./contact-list.component.scss'], - animations : fuseAnimations + animations : fuseAnimations }) export class FuseContactsContactListComponent implements OnInit { @@ -63,28 +63,6 @@ export class FuseContactsContactListComponent implements OnInit this.dataSource = new FilesDataSource(this.contactsService); } - newContact() - { - this.dialogRef = this.dialog.open(FuseContactsContactFormDialogComponent, { - panelClass: 'contact-form-dialog', - data : { - action: 'new' - } - }); - - this.dialogRef.afterClosed() - .subscribe((response: FormGroup) => { - if ( !response ) - { - return; - } - - this.contactsService.updateContact(response.getRawValue()); - - }); - - } - editContact(contact) { this.dialogRef = this.dialog.open(FuseContactsContactFormDialogComponent, { diff --git a/src/app/main/content/apps/contacts/contacts.component.html b/src/app/main/content/apps/contacts/contacts.component.html index 4df1bda9..070a1272 100644 --- a/src/app/main/content/apps/contacts/contacts.component.html +++ b/src/app/main/content/apps/contacts/contacts.component.html @@ -1,7 +1,7 @@ -
+
-
@@ -51,7 +51,7 @@ -
+
@@ -67,3 +67,10 @@
+ + + + diff --git a/src/app/main/content/apps/contacts/contacts.component.scss b/src/app/main/content/apps/contacts/contacts.component.scss index f191fe58..4662a5d2 100644 --- a/src/app/main/content/apps/contacts/contacts.component.scss +++ b/src/app/main/content/apps/contacts/contacts.component.scss @@ -4,3 +4,10 @@ overflow: hidden; } } +#add-contact-button { + position: absolute; + bottom: 12px; + right: 12px; + padding: 0; + z-index: 99; +} \ No newline at end of file diff --git a/src/app/main/content/apps/contacts/contacts.component.ts b/src/app/main/content/apps/contacts/contacts.component.ts index 68c708a1..381bc742 100644 --- a/src/app/main/content/apps/contacts/contacts.component.ts +++ b/src/app/main/content/apps/contacts/contacts.component.ts @@ -1,7 +1,9 @@ import { Component, OnInit, ViewEncapsulation } from '@angular/core'; import { ContactsService } from './contacts.service'; import { fuseAnimations } from '../../../../core/animations'; -import { FormControl } from '@angular/forms'; +import { FormControl, FormGroup } from '@angular/forms'; +import { FuseContactsContactFormDialogComponent } from './contact-form/contact-form.component'; +import { MdDialog } from '@angular/material'; @Component({ selector : 'fuse-contacts', @@ -14,12 +16,38 @@ export class FuseContactsComponent implements OnInit { hasSelectedContacts: boolean; searchInput: FormControl; + dialogRef: any; - constructor(private contactsService: ContactsService) + constructor( + private contactsService: ContactsService, + public dialog: MdDialog + ) { this.searchInput = new FormControl(''); } + newContact() + { + this.dialogRef = this.dialog.open(FuseContactsContactFormDialogComponent, { + panelClass: 'contact-form-dialog', + data : { + action: 'new' + } + }); + + this.dialogRef.afterClosed() + .subscribe((response: FormGroup) => { + if ( !response ) + { + return; + } + + this.contactsService.updateContact(response.getRawValue()); + + }); + + } + ngOnInit() { diff --git a/src/app/main/content/apps/mail/dialogs/compose/compose.component.html b/src/app/main/content/apps/mail/dialogs/compose/compose.component.html index 4f44c51e..aecdd630 100644 --- a/src/app/main/content/apps/mail/dialogs/compose/compose.component.html +++ b/src/app/main/content/apps/mail/dialogs/compose/compose.component.html @@ -1,109 +1,111 @@ - -
- New Message - -
-
+
+ +
+ New Message + +
+
-
+
-
+ - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - + - + -
+
-
-
- attachment-2.doc - (12 Kb) +
+
+ attachment-2.doc + (12 Kb) +
+ +
- -
+
+
+ attachment-1.jpg + (350 Kb) +
-
-
- attachment-1.jpg - (350 Kb) +
- -
-
- -
- -
-
- - - +
- +
+
+ + + +
+ + +
diff --git a/src/app/main/content/apps/mail/dialogs/compose/compose.component.scss b/src/app/main/content/apps/mail/dialogs/compose/compose.component.scss index 595dfc75..c9487a7e 100644 --- a/src/app/main/content/apps/mail/dialogs/compose/compose.component.scss +++ b/src/app/main/content/apps/mail/dialogs/compose/compose.component.scss @@ -1,15 +1,10 @@ -:host { - display: flex; - flex-direction: column; -} - .mail-compose-dialog { .mat-dialog-container { padding: 0; width: 720px; .compose-form { - + .mat-input-container { width: 100%; } @@ -36,4 +31,10 @@ } } } + + .dialog-content-wrapper { + max-height: 85vh; + display: flex; + flex-direction: column; + } } diff --git a/src/app/main/content/apps/scrumboard/board/dialogs/card/card.component.html b/src/app/main/content/apps/scrumboard/board/dialogs/card/card.component.html index 8218cd59..75e65ef5 100644 --- a/src/app/main/content/apps/scrumboard/board/dialogs/card/card.component.html +++ b/src/app/main/content/apps/scrumboard/board/dialogs/card/card.component.html @@ -1,452 +1,454 @@ - +
+ -
+
-
+
+ + +
+ + + + + + + + +
+ + + +
+ + + + + + + + +
+ + + +
+ + + + +
+ +
+ +

{{ member.name }}

+
+
+
+
+
+ + + + + + + +
+ + + + + +
+ + + + + + +
+ +
+
+ + + + + + + +
+ + + + +
+ +
+ + + + +
+ + +
+ +
+ + +
+ {{board.name}} + chevron_right + {{list.name}} +
+ -
+
- - - - - - -
- -
- - - - - - - - -
- - - -
- - - - -
- -
- -

{{ member.name }}

-
-
-
-
-
- - - - - - - -
- - - - - -
- - - - - - -
- -
-
- - - - - - - -
- - - - -
-
- - - -
- - -
- -
- - -
- {{board.name}} - chevron_right - {{list.name}} + +
+ remove_red_eye +
+ + + +
- + - -
- - - - -
- - -
- - -
- remove_red_eye -
- - + +
+ +
-
- + - -
- - - -
- + +
- -
+ +
- -
- -
-
- label - Labels +
+
+ label + Labels +
+
+ + + {{board.labels|getById:labelId:'name'}} + close + + +
-
- - - {{board.labels|getById:labelId:'name'}} - close - - + +
+
+ supervisor_account + Members +
+
+ + + + close + + +
+ -
-
- supervisor_account - Members -
-
- - - - close - - -
-
-
- + +
- -
+
-
- -
- attachment - Attachments -
- -
- -
- -
- -
-
- -
- -
- {{item.name}} - star - -
- - {{item.time}} - -
- - - - - -
- -
-
- -
-
- LINK -
-
- {{item.url}} - {{item.time}} -
-
+
+ attachment + Attachments
- + + + + +
+ +
+
+ +
+
+ LINK +
+
+ {{item.url}} + {{item.time}} +
+
- -
-
-
- - -
- -
- -
- - check_box - - {{checklist.name}} - - -
- - - -
-
+
+ -
+ +
-
+
- - {{checklist.checkItemsChecked}} / {{checklist.checkItems.length}} - +
+ + check_box + + {{checklist.name}} + + +
+ + + + +
- -
-
+
-
+
-
- - - - + + {{checklist.checkItemsChecked}} / {{checklist.checkItems.length}} + + + + +
+ +
+ +
+ +
+ + + + + +
+ + + +
+
+ +
+ +
+ add + + +
- - -
-
- - - -
- add - - - - -
- - - - -
-
-
- - - -
- -
- -
- comment - Comments -
- -
-
- -
- - - - -
- -
- -
-
+ -
+
+
+
+ - + +
-
-
- {{board.members | getById: comment.idMember:'name'}} +
+ +
+ comment + Comments +
+ +
+
+ +
+ + + + +
+ +
+ +
+
+ +
+ + + +
+
+ {{board.members | getById: comment.idMember:'name'}} +
+
{{comment.message}}
+
{{comment.time}}
-
{{comment.message}}
-
{{comment.time}}
-
- + - -
+ +
-
+
-
- list - Activity -
- -
-
- -
{{board.members| getById:activity.idMember:'name'}}
-
{{activity.message}}
-
{{activity.time}}
+
+ list + Activity
+ +
+
+ +
{{board.members| getById:activity.idMember:'name'}}
+
{{activity.message}}
+
{{activity.time}}
+
+
+
-
-
- + +
+
-
diff --git a/src/app/main/content/apps/scrumboard/board/dialogs/card/card.component.scss b/src/app/main/content/apps/scrumboard/board/dialogs/card/card.component.scss index 4bf9dae0..e8333209 100644 --- a/src/app/main/content/apps/scrumboard/board/dialogs/card/card.component.scss +++ b/src/app/main/content/apps/scrumboard/board/dialogs/card/card.component.scss @@ -1,10 +1,5 @@ @import "src/app/core/scss/fuse"; -:host { - display: flex; - flex-direction: column; -} - .scrumboard-card-dialog { .mat-dialog-container { @@ -387,6 +382,12 @@ } } + + .dialog-content-wrapper { + max-height: 85vh; + display: flex; + flex-direction: column; + } } .scrumboard-members-menu {