mirror of
				https://github.com/richard-loafle/fuse-angular.git
				synced 2025-10-31 06:53:33 +00:00 
			
		
		
		
	Code inspections.
This commit is contained in:
		
							parent
							
								
									8dcfcaac4e
								
							
						
					
					
						commit
						c0fc801208
					
				| @ -1,4 +1,4 @@ | ||||
| import { Component, OnInit, ViewChild, ViewChildren } from '@angular/core'; | ||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | ||||
| import { FuseNavigationService } from '../navigation/navigation.service'; | ||||
| 
 | ||||
| @Component({ | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| <button #openButton *ngIf="!isOpened" md-icon-button class="open-button md-primary-bg mat-elevation-z2" (click)="openBar()"> | ||||
| <button #openButton md-icon-button class="open-button md-primary-bg mat-elevation-z2" (click)="openBar()"> | ||||
|     <md-icon>settings</md-icon> | ||||
| </button> | ||||
| 
 | ||||
|  | ||||
| @ -26,7 +26,6 @@ | ||||
|         position: absolute; | ||||
|         top: 0; | ||||
|         left: -48px; | ||||
|         z-index: 998; | ||||
|         width: 48px; | ||||
|         height: 48px; | ||||
|         line-height: 48px; | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core'; | ||||
| import { style, animate, sequence, AnimationBuilder, AnimationPlayer } from '@angular/animations'; | ||||
| import { style, animate, AnimationBuilder, AnimationPlayer } from '@angular/animations'; | ||||
| import { Subscription } from 'rxjs/Subscription'; | ||||
| import { FuseLayoutService } from '../../services/layout.service'; | ||||
| 
 | ||||
|  | ||||
| @ -1,4 +1,4 @@ | ||||
| import { AfterViewInit, ContentChild, Directive, ElementRef, OnInit, ViewChild } from '@angular/core'; | ||||
| import { AfterViewInit, Directive, ElementRef, OnInit } from '@angular/core'; | ||||
| 
 | ||||
| @Directive({ | ||||
|     selector: '[fuseWidgetToggle]' | ||||
|  | ||||
| @ -78,11 +78,7 @@ export class FuseUtils | ||||
| 
 | ||||
|     public static searchInSting(value, searchText) | ||||
|     { | ||||
|         if ( value.toLowerCase().includes(searchText) ) | ||||
|         { | ||||
|             return true; | ||||
|         } | ||||
|         return false; | ||||
|         return value.toLowerCase().includes(searchText); | ||||
|     } | ||||
| 
 | ||||
|     public static genearateGUID() | ||||
|  | ||||
| @ -248,7 +248,7 @@ $carded-header-height-without-toolbar-sm: $carded-header-height-sm - $carded-too | ||||
|                     &.md-is-locked-open { | ||||
| 
 | ||||
|                         ~ .mat-sidenav-content { | ||||
|                             margin-right: 0px !important; | ||||
|                             margin-right: 0 !important; | ||||
| 
 | ||||
|                             .center { | ||||
|                                 margin-right: 0; | ||||
|  | ||||
| @ -1,6 +1,4 @@ | ||||
| import { MediaChange, ObservableMedia } from '@angular/flex-layout'; | ||||
| import { Observable } from 'rxjs/Observable'; | ||||
| import { Observer } from 'rxjs/Observer'; | ||||
| import { EventEmitter, Injectable } from '@angular/core'; | ||||
| 
 | ||||
| @Injectable() | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| import { startOfDay, endOfDay, subDays, addDays, endOfMonth, isSameDay, isSameMonth, addHours } from 'date-fns'; | ||||
| import { ChangeDetectionStrategy, Component, OnInit, TemplateRef, ViewChild, ViewEncapsulation } from '@angular/core'; | ||||
| import { ChangeDetectionStrategy, Component, OnInit, ViewEncapsulation } from '@angular/core'; | ||||
| import { Subject } from 'rxjs/Subject'; | ||||
| import { MdDialog, MdDialogRef } from '@angular/material'; | ||||
| import { EventFormDialogComponent } from './event-form/event-form.component'; | ||||
| @ -41,8 +41,10 @@ export class CalendarComponent implements OnInit | ||||
| 
 | ||||
|     selectedDay: any; | ||||
| 
 | ||||
|     constructor(public dialog: MdDialog, | ||||
|                 public calendarService: CalendarService) | ||||
|     constructor( | ||||
|         public dialog: MdDialog, | ||||
|         public calendarService: CalendarService | ||||
|     ) | ||||
|     { | ||||
|         this.view = 'month'; | ||||
|         this.viewDate = new Date(); | ||||
| @ -124,7 +126,6 @@ export class CalendarComponent implements OnInit | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     /** | ||||
|      * Day clicked | ||||
|      * @param {MonthViewDay} day | ||||
|  | ||||
| @ -127,7 +127,6 @@ | ||||
| 
 | ||||
|                         <div class="" fxFlex fxLayout="column" fxLayoutAlign="center start"> | ||||
|                             <div class="contact-name">{{contacts |getById:chat.contactId:'name'}}</div> | ||||
|                             <p class="contact-last-message text-truncate">{{chat.lastMessage}}</p> | ||||
|                         </div> | ||||
| 
 | ||||
|                         <div fxLayout="column" fxLayoutAlign="center end"> | ||||
|  | ||||
| @ -1,7 +1,7 @@ | ||||
| import { Component, Inject, OnInit, ViewEncapsulation } from '@angular/core'; | ||||
| import { MD_DIALOG_DATA, MdDialogRef } from '@angular/material'; | ||||
| import { CalendarEvent } from 'angular-calendar'; | ||||
| import { FormBuilder, FormControl, FormGroup } from '@angular/forms'; | ||||
| import { FormBuilder, FormGroup } from '@angular/forms'; | ||||
| import 'rxjs/Rx'; | ||||
| import { Contact } from '../contact.model'; | ||||
| 
 | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; | ||||
| import { FuseLayoutService } from '../../../../../core/services/layout.service'; | ||||
| import { ProjectsDashboardService } from './projects.service'; | ||||
| import * as shape from 'd3-shape'; | ||||
| import { BehaviorSubject } from 'rxjs/BehaviorSubject'; | ||||
|  | ||||
| @ -1,5 +1,4 @@ | ||||
| import { Component, OnInit } from '@angular/core'; | ||||
| import { Http } from '@angular/http'; | ||||
| import { FileManagerService } from '../file-manager.service'; | ||||
| import { DataSource } from '@angular/cdk'; | ||||
| import { Observable } from 'rxjs/Observable'; | ||||
|  | ||||
| @ -1,8 +1,8 @@ | ||||
| import { AfterViewInit, Component, OnDestroy, OnInit, ViewChildren } from '@angular/core'; | ||||
| import { Component, OnDestroy, OnInit, ViewChildren } from '@angular/core'; | ||||
| import { TodoService } from '../todo.service'; | ||||
| import { Todo } from '../todo.model'; | ||||
| import { Subscription } from 'rxjs/Subscription'; | ||||
| import { FormBuilder, FormControl, FormGroup } from '@angular/forms'; | ||||
| import { FormBuilder, FormGroup } from '@angular/forms'; | ||||
| import { FuseUtils } from '../../../../../core/fuseUtils'; | ||||
| 
 | ||||
| @Component({ | ||||
| @ -23,8 +23,10 @@ export class TodoDetailsComponent implements OnInit, OnDestroy | ||||
|     onTagsChanged: Subscription; | ||||
|     onNewTodoClicked: Subscription; | ||||
| 
 | ||||
|     constructor(private todoService: TodoService, | ||||
|                 private formBuilder: FormBuilder) | ||||
|     constructor( | ||||
|         private todoService: TodoService, | ||||
|         private formBuilder: FormBuilder | ||||
|     ) | ||||
|     { | ||||
| 
 | ||||
|     } | ||||
| @ -45,11 +47,11 @@ export class TodoDetailsComponent implements OnInit, OnDestroy | ||||
|                         this.todoForm = this.createTodoForm(); | ||||
| 
 | ||||
|                         this.onFormChange = this.todoForm.valueChanges | ||||
|                             .debounceTime(500) | ||||
|                             .distinctUntilChanged() | ||||
|                             .subscribe(data => { | ||||
|                                 this.todoService.updateTodo(data); | ||||
|                             }); | ||||
|                                                 .debounceTime(500) | ||||
|                                                 .distinctUntilChanged() | ||||
|                                                 .subscribe(data => { | ||||
|                                                     this.todoService.updateTodo(data); | ||||
|                                                 }); | ||||
|                     } | ||||
|                 }); | ||||
| 
 | ||||
| @ -62,13 +64,13 @@ export class TodoDetailsComponent implements OnInit, OnDestroy | ||||
| 
 | ||||
|         // Subscribe to update on tag change
 | ||||
|         this.onNewTodoClicked = this.todoService.onNewTodoClicked | ||||
|             .subscribe(() => { | ||||
|                 this.todo = new Todo({}); | ||||
|                 this.todo.id = FuseUtils.genearateGUID(); | ||||
|                 this.formType = 'new'; | ||||
|                 this.todoForm = this.createTodoForm(); | ||||
|                 this.focusTitleField(); | ||||
|             }); | ||||
|                                     .subscribe(() => { | ||||
|                                         this.todo = new Todo({}); | ||||
|                                         this.todo.id = FuseUtils.genearateGUID(); | ||||
|                                         this.formType = 'new'; | ||||
|                                         this.todoForm = this.createTodoForm(); | ||||
|                                         this.focusTitleField(); | ||||
|                                     }); | ||||
|     } | ||||
| 
 | ||||
|     focusTitleField() | ||||
| @ -94,7 +96,6 @@ export class TodoDetailsComponent implements OnInit, OnDestroy | ||||
|         }); | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     toggleStar(event) | ||||
|     { | ||||
|         event.stopPropagation(); | ||||
|  | ||||
| @ -2,7 +2,7 @@ import { Component, HostBinding, Input, OnDestroy, OnInit, ViewEncapsulation } f | ||||
| import { Todo } from '../../todo.model'; | ||||
| import { TodoService } from '../../todo.service'; | ||||
| import { Subscription } from 'rxjs/Subscription'; | ||||
| import { ActivatedRoute, ActivatedRouteSnapshot, Route, Router } from '@angular/router'; | ||||
| import { ActivatedRoute } from '@angular/router'; | ||||
| 
 | ||||
| @Component({ | ||||
|     selector     : 'fuse-todo-list-item', | ||||
| @ -21,8 +21,10 @@ export class TodoListItemComponent implements OnInit, OnDestroy | ||||
|     onSelectedTodosChanged: Subscription; | ||||
|     onTagsChanged: Subscription; | ||||
| 
 | ||||
|     constructor(private todoService: TodoService, | ||||
|                 private route: ActivatedRoute) | ||||
|     constructor( | ||||
|         private todoService: TodoService, | ||||
|         private route: ActivatedRoute | ||||
|     ) | ||||
|     { | ||||
|         // Disable move if path is not /all
 | ||||
|         if ( route.snapshot.url[0].path !== 'all' ) | ||||
|  | ||||
| @ -391,7 +391,7 @@ export class TodoService implements Resolve<any> | ||||
| 
 | ||||
|     /** | ||||
|      * Update the todo | ||||
|      * @param todo | ||||
|      * @param todos | ||||
|      * @returns {Promise<any>} | ||||
|      */ | ||||
|     updateTodos(todos) | ||||
|  | ||||
| @ -4,7 +4,6 @@ | ||||
| 
 | ||||
|     #login { | ||||
|         width: 100%; | ||||
|         overflow: auto; | ||||
|         overflow: hidden; | ||||
|         background: url('/assets/images/backgrounds/march.jpg') no-repeat; | ||||
|         background-size: cover; | ||||
|  | ||||
| @ -4,7 +4,6 @@ | ||||
| 
 | ||||
|     #register { | ||||
|         width: 100%; | ||||
|         overflow: auto; | ||||
|         overflow: hidden; | ||||
|         background: url('/assets/images/backgrounds/march.jpg') no-repeat; | ||||
|         background-size: cover; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user