diff --git a/package.json b/package.json index ebfe1c25..661a44bc 100644 --- a/package.json +++ b/package.json @@ -1,69 +1,70 @@ { - "name": "fuse2", - "version": "1.0.2", - "license": "", - "scripts": { - "ng": "ng", - "start": "ng serve", - "build": "ng build", - "test": "ng test", - "lint": "ng lint", - "e2e": "ng e2e" - }, - "private": true, - "dependencies": { - "@angular/animations": "4.3.6", - "@angular/cdk": "2.0.0-beta.10", - "@angular/common": "4.3.6", - "@angular/compiler": "4.3.6", - "@angular/core": "4.3.6", - "@angular/flex-layout": "2.0.0-beta.9", - "@angular/forms": "4.3.6", - "@angular/http": "4.3.6", - "@angular/material": "2.0.0-beta.10", - "@angular/platform-browser": "4.3.6", - "@angular/platform-browser-dynamic": "4.3.6", - "@angular/router": "4.3.6", - "@swimlane/ngx-charts": "6.0.2", - "@swimlane/ngx-datatable": "9.3.1", - "@swimlane/ngx-dnd": "3.0.0", - "angular-calendar": "0.19.0", - "angular-in-memory-web-api": "0.3.2", - "classlist.js": "1.1.20150312", - "core-js": "2.5.0", - "d3": "4.10.0", - "hammerjs": "2.0.8", - "highlight.js": "9.12.0", - "intl": "1.2.5", - "moment": "2.18.1", - "ngx-color-picker": "4.3.1", - "ngx-cookie-service": "1.0.7", - "ngx-perfect-scrollbar": "4.5.6", - "rxjs": "5.4.3", - "web-animations-js": "2.3.1", - "zone.js": "0.8.17" - }, - "devDependencies": { - "@angular/cli": "^1.3.2", - "@angular/compiler-cli": "4.3.6", - "@angular/language-service": "4.3.6", - "@ngtools/webpack": "^1.6.2", - "@types/jasmine": "^2.5.54", - "@types/jasminewd2": "^2.0.2", - "@types/node": "^6.0.88", - "codelyzer": "~3.0.1", - "jasmine-core": "~2.6.2", - "jasmine-spec-reporter": "~4.1.0", - "karma": "~1.7.0", - "karma-chrome-launcher": "~2.1.1", - "karma-cli": "~1.0.1", - "karma-coverage-istanbul-reporter": "^1.2.1", - "karma-jasmine": "~1.1.0", - "karma-jasmine-html-reporter": "^0.2.2", - "node-sass": "^4.5.3", - "protractor": "~5.1.2", - "ts-node": "~3.0.4", - "tslint": "~5.3.2", - "typescript": "~2.3.3" - } + "name": "fuse2", + "version": "1.0.2", + "license": "", + "scripts": { + "ng": "ng", + "start": "ng serve", + "build": "ng build", + "test": "ng test", + "lint": "ng lint", + "e2e": "ng e2e" + }, + "private": true, + "dependencies": { + "@angular/animations": "4.3.6", + "@angular/cdk": "2.0.0-beta.10", + "@angular/common": "4.3.6", + "@angular/compiler": "4.3.6", + "@angular/core": "4.3.6", + "@angular/flex-layout": "2.0.0-beta.9", + "@angular/forms": "4.3.6", + "@angular/http": "4.3.6", + "@angular/material": "2.0.0-beta.10", + "@angular/platform-browser": "4.3.6", + "@angular/platform-browser-dynamic": "4.3.6", + "@angular/router": "4.3.6", + "@swimlane/ngx-charts": "6.0.2", + "@swimlane/ngx-datatable": "9.3.1", + "@swimlane/ngx-dnd": "3.0.0", + "angular-calendar": "0.19.0", + "angular-in-memory-web-api": "0.3.2", + "classlist.js": "1.1.20150312", + "core-js": "2.5.0", + "d3": "4.10.0", + "hammerjs": "2.0.8", + "highlight.js": "9.12.0", + "intl": "1.2.5", + "md2": "0.0.28", + "moment": "2.18.1", + "ngx-color-picker": "4.3.1", + "ngx-cookie-service": "1.0.7", + "ngx-perfect-scrollbar": "4.5.6", + "rxjs": "5.4.3", + "web-animations-js": "2.3.1", + "zone.js": "0.8.17" + }, + "devDependencies": { + "@angular/cli": "^1.3.2", + "@angular/compiler-cli": "4.3.6", + "@angular/language-service": "4.3.6", + "@ngtools/webpack": "^1.6.2", + "@types/jasmine": "^2.5.54", + "@types/jasminewd2": "^2.0.2", + "@types/node": "^6.0.88", + "codelyzer": "~3.0.1", + "jasmine-core": "~2.6.2", + "jasmine-spec-reporter": "~4.1.0", + "karma": "~1.7.0", + "karma-chrome-launcher": "~2.1.1", + "karma-cli": "~1.0.1", + "karma-coverage-istanbul-reporter": "^1.2.1", + "karma-jasmine": "~1.1.0", + "karma-jasmine-html-reporter": "^0.2.2", + "node-sass": "^4.5.3", + "protractor": "~5.1.2", + "ts-node": "~3.0.4", + "tslint": "~5.3.2", + "typescript": "~2.3.3" + } } diff --git a/src/app/main/content/apps/scrumboard/board/add-list/add-list.component.ts b/src/app/main/content/apps/scrumboard/board/add-list/add-list.component.ts index f0265579..0d7f6713 100644 --- a/src/app/main/content/apps/scrumboard/board/add-list/add-list.component.ts +++ b/src/app/main/content/apps/scrumboard/board/add-list/add-list.component.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, Input, OnInit, Output, ViewChildren } from '@angular/core'; +import { Component, EventEmitter, OnInit, Output, ViewChild} from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; @Component({ @@ -11,7 +11,7 @@ export class FuseScrumboardBoardAddListComponent implements OnInit formActive = false; form: FormGroup; @Output() onlistAdd = new EventEmitter(); - @ViewChildren('nameInput') nameInputField; + @ViewChild('nameInput') nameInputField; constructor( private formBuilder: FormBuilder @@ -41,7 +41,7 @@ export class FuseScrumboardBoardAddListComponent implements OnInit focusNameField() { setTimeout(() => { - this.nameInputField.first.nativeElement.focus(); + this.nameInputField.nativeElement.focus(); }); } 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 857cb539..ed1dc068 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 @@ -74,8 +74,8 @@
- - + + diff --git a/src/app/main/content/apps/scrumboard/board/dialogs/card/card.component.ts b/src/app/main/content/apps/scrumboard/board/dialogs/card/card.component.ts index 73d8b3eb..050e6403 100644 --- a/src/app/main/content/apps/scrumboard/board/dialogs/card/card.component.ts +++ b/src/app/main/content/apps/scrumboard/board/dialogs/card/card.component.ts @@ -213,7 +213,7 @@ export class FuseScrumboardCardDialogComponent implements OnInit, OnDestroy onChecklistMenuOpen() { setTimeout(() => { - this.newCheckListTitleField._mdInputChild.focus(); + this.newCheckListTitleField.nativeElement.focus(); }); } diff --git a/src/app/main/content/apps/scrumboard/board/edit-board-name/edit-board-name.component.ts b/src/app/main/content/apps/scrumboard/board/edit-board-name/edit-board-name.component.ts index ddcbf583..d35face2 100644 --- a/src/app/main/content/apps/scrumboard/board/edit-board-name/edit-board-name.component.ts +++ b/src/app/main/content/apps/scrumboard/board/edit-board-name/edit-board-name.component.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, Input, OnInit, Output, ViewChildren } from '@angular/core'; +import { Component, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; @Component({ @@ -12,7 +12,7 @@ export class FuseScrumboardEditBoardNameComponent implements OnInit form: FormGroup; @Input() board; @Output() onNameChanged = new EventEmitter(); - @ViewChildren('nameInput') nameInputField; + @ViewChild('nameInput') nameInputField; constructor( private formBuilder: FormBuilder @@ -42,7 +42,7 @@ export class FuseScrumboardEditBoardNameComponent implements OnInit focusNameField() { setTimeout(() => { - this.nameInputField.first.nativeElement.focus(); + this.nameInputField.nativeElement.focus(); }); } diff --git a/src/app/main/content/apps/scrumboard/board/list/add-card/add-card.component.html b/src/app/main/content/apps/scrumboard/board/list/add-card/add-card.component.html index 74a65988..82c4bdbd 100644 --- a/src/app/main/content/apps/scrumboard/board/list/add-card/add-card.component.html +++ b/src/app/main/content/apps/scrumboard/board/list/add-card/add-card.component.html @@ -11,8 +11,8 @@ - - + +
diff --git a/src/app/main/content/apps/scrumboard/board/list/add-card/add-card.component.ts b/src/app/main/content/apps/scrumboard/board/list/add-card/add-card.component.ts index 977f1fd3..053b80bc 100644 --- a/src/app/main/content/apps/scrumboard/board/list/add-card/add-card.component.ts +++ b/src/app/main/content/apps/scrumboard/board/list/add-card/add-card.component.ts @@ -1,4 +1,4 @@ -import { Component, ContentChildren, EventEmitter, Input, OnInit, Output, ViewChildren } from '@angular/core'; +import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; @Component({ @@ -11,7 +11,7 @@ export class FuseScrumboardBoardAddCardComponent implements OnInit formActive = false; form: FormGroup; @Output() onCardAdd = new EventEmitter(); - @ViewChildren('nameInput') nameInputField; + @ViewChild('nameInput') nameInputField; constructor( private formBuilder: FormBuilder @@ -40,7 +40,7 @@ export class FuseScrumboardBoardAddCardComponent implements OnInit focusNameField() { setTimeout(() => { - this.nameInputField.first._mdInputChild.focus(); + this.nameInputField.nativeElement.focus(); }); } diff --git a/src/app/main/content/apps/scrumboard/board/list/edit-list-name/edit-list-name.component.ts b/src/app/main/content/apps/scrumboard/board/list/edit-list-name/edit-list-name.component.ts index bb2cc7b2..f480c7cd 100644 --- a/src/app/main/content/apps/scrumboard/board/list/edit-list-name/edit-list-name.component.ts +++ b/src/app/main/content/apps/scrumboard/board/list/edit-list-name/edit-list-name.component.ts @@ -1,4 +1,4 @@ -import { Component, EventEmitter, Input, OnInit, Output, ViewChildren } from '@angular/core'; +import { Component, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; @Component({ @@ -12,7 +12,7 @@ export class FuseScrumboardBoardEditListNameComponent implements OnInit form: FormGroup; @Input() list; @Output() onNameChanged = new EventEmitter(); - @ViewChildren('nameInput') nameInputField; + @ViewChild('nameInput') nameInputField; constructor( private formBuilder: FormBuilder @@ -42,7 +42,7 @@ export class FuseScrumboardBoardEditListNameComponent implements OnInit focusNameField() { setTimeout(() => { - this.nameInputField.first.nativeElement.focus(); + this.nameInputField.nativeElement.focus(); }); } diff --git a/src/app/main/content/apps/scrumboard/board/list/list.component.html b/src/app/main/content/apps/scrumboard/board/list/list.component.html index ae544bd8..910a01cc 100644 --- a/src/app/main/content/apps/scrumboard/board/list/list.component.html +++ b/src/app/main/content/apps/scrumboard/board/list/list.component.html @@ -40,7 +40,6 @@ diff --git a/src/app/main/content/apps/scrumboard/board/sidenavs/settings/board-color-selector/board-color-selector.component.html b/src/app/main/content/apps/scrumboard/board/sidenavs/settings/board-color-selector/board-color-selector.component.html index 07c277d7..678dbf0d 100644 --- a/src/app/main/content/apps/scrumboard/board/sidenavs/settings/board-color-selector/board-color-selector.component.html +++ b/src/app/main/content/apps/scrumboard/board/sidenavs/settings/board-color-selector/board-color-selector.component.html @@ -1,3 +1,15 @@ -

- board-color-selector works! -

+ + + +

{{color.key}}

+ check + +
+ +
diff --git a/src/app/main/content/apps/scrumboard/board/sidenavs/settings/board-color-selector/board-color-selector.component.scss b/src/app/main/content/apps/scrumboard/board/sidenavs/settings/board-color-selector/board-color-selector.component.scss index e69de29b..d6b3d042 100644 --- a/src/app/main/content/apps/scrumboard/board/sidenavs/settings/board-color-selector/board-color-selector.component.scss +++ b/src/app/main/content/apps/scrumboard/board/sidenavs/settings/board-color-selector/board-color-selector.component.scss @@ -0,0 +1,10 @@ +:host { + + .colors { + + .color { + position: relative; + cursor: pointer; + } + } +} diff --git a/src/app/main/content/apps/scrumboard/board/sidenavs/settings/board-color-selector/board-color-selector.component.ts b/src/app/main/content/apps/scrumboard/board/sidenavs/settings/board-color-selector/board-color-selector.component.ts index bf9ff816..c4a4195d 100644 --- a/src/app/main/content/apps/scrumboard/board/sidenavs/settings/board-color-selector/board-color-selector.component.ts +++ b/src/app/main/content/apps/scrumboard/board/sidenavs/settings/board-color-selector/board-color-selector.component.ts @@ -1,15 +1,43 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnDestroy, OnInit } from '@angular/core'; +import { MatColors } from '../../../../../../../../core/matColors'; +import { ScrumboardService } from '../../../../scrumboard.service'; +import { Subscription } from 'rxjs/Subscription'; @Component({ - selector: 'app-board-color-selector', - templateUrl: './board-color-selector.component.html', - styleUrls: ['./board-color-selector.component.scss'] + selector : 'fuse-scrumboard-board-color-selector', + templateUrl: './board-color-selector.component.html', + styleUrls : ['./board-color-selector.component.scss'] }) -export class BoardColorSelectorComponent implements OnInit { +export class FuseScrumboardBoardColorSelectorComponent implements OnInit, OnDestroy +{ + colors: any; + board: any; + onBoardChanged: Subscription; - constructor() { } + constructor( + private scrumboardService: ScrumboardService + ) + { + this.colors = MatColors.all; + } - ngOnInit() { - } + ngOnInit() + { + this.onBoardChanged = + this.scrumboardService.onBoardChanged + .subscribe(board => { + this.board = board; + }); + } + setColor(color) + { + this.board.settings.color = color; + this.scrumboardService.updateBoard(); + } + + ngOnDestroy() + { + this.onBoardChanged.unsubscribe(); + } } diff --git a/src/app/main/content/apps/scrumboard/board/sidenavs/settings/settings.component.html b/src/app/main/content/apps/scrumboard/board/sidenavs/settings/settings.component.html index 47485e4b..df4304e2 100644 --- a/src/app/main/content/apps/scrumboard/board/sidenavs/settings/settings.component.html +++ b/src/app/main/content/apps/scrumboard/board/sidenavs/settings/settings.component.html @@ -1,52 +1,76 @@ - -
-
Settings
-
- +
- -
+
-