diff --git a/src/app/core/fuseUtils.ts b/src/app/core/fuseUtils.ts index 66f706ed..fcacfa09 100644 --- a/src/app/core/fuseUtils.ts +++ b/src/app/core/fuseUtils.ts @@ -84,4 +84,14 @@ export class FuseUtils } return false; } + + public static genearateGUID() + { + function S4() + { + return (((1 + Math.random()) * 0x10000) || 0).toString(16).substring(1); + } + + return (S4() + S4()); + } } diff --git a/src/app/main/apps/calendar/event-form/event-form.component.html b/src/app/main/apps/calendar/event-form/event-form.component.html index b3396e26..170ef2af 100644 --- a/src/app/main/apps/calendar/event-form/event-form.component.html +++ b/src/app/main/apps/calendar/event-form/event-form.component.html @@ -115,7 +115,7 @@ md-raised-button (click)="dialogRef.close(eventForm)" class="save-button mat-accent" - [disabled]="eventForm.pristine" + [disabled]="eventForm.invalid" aria-label="SAVE"> SAVE @@ -124,7 +124,7 @@ md-raised-button (click)="dialogRef.close(['save',eventForm])" class="save-button mat-accent" - [disabled]="eventForm.pristine" + [disabled]="eventForm.invalid" aria-label="SAVE"> SAVE diff --git a/src/app/main/apps/chat/chat.service.ts b/src/app/main/apps/chat/chat.service.ts index 59998e4b..7996a17a 100644 --- a/src/app/main/apps/chat/chat.service.ts +++ b/src/app/main/apps/chat/chat.service.ts @@ -4,6 +4,7 @@ import { Observable } from 'rxjs/Observable'; import { Http } from '@angular/http'; import { Subject } from 'rxjs/Subject'; import { BehaviorSubject } from 'rxjs/BehaviorSubject'; +import { FuseUtils } from '../../../core/fuseUtils'; @Injectable() export class ChatService implements Resolve @@ -80,7 +81,7 @@ export class ChatService implements Resolve return item.id === contactId; }); - const chatId = this.guidGenerator(); + const chatId = FuseUtils.genearateGUID(); const chat = { id : chatId, @@ -243,18 +244,4 @@ export class ChatService implements Resolve }, reject); }); } - - /** - * Random ID Generator - * @returns {string} - */ - guidGenerator() - { - function S4() - { - return (((1 + Math.random()) * 0x10000) || 0).toString(16).substring(1); - } - - return (S4() + S4()); - } } diff --git a/src/app/main/apps/todo/sidenavs/main/main-sidenav.component.html b/src/app/main/apps/todo/sidenavs/main/main-sidenav.component.html index e0476296..b2969663 100644 --- a/src/app/main/apps/todo/sidenavs/main/main-sidenav.component.html +++ b/src/app/main/apps/todo/sidenavs/main/main-sidenav.component.html @@ -22,6 +22,15 @@
+
+ +
+