diff --git a/src/app/main/content/apps/scrumboard/board/board.component.html b/src/app/main/content/apps/scrumboard/board/board.component.html index 255efcf1..82a12219 100644 --- a/src/app/main/content/apps/scrumboard/board/board.component.html +++ b/src/app/main/content/apps/scrumboard/board/board.component.html @@ -49,12 +49,15 @@
-
+
diff --git a/src/app/main/content/apps/scrumboard/board/board.component.ts b/src/app/main/content/apps/scrumboard/board/board.component.ts index 9eecc068..cf025cdb 100644 --- a/src/app/main/content/apps/scrumboard/board/board.component.ts +++ b/src/app/main/content/apps/scrumboard/board/board.component.ts @@ -53,6 +53,11 @@ export class FuseScrumboardBoardComponent implements OnInit, OnDestroy this.location.go('/apps/scrumboard/boards/' + this.board.id + '/' + this.board.uri); } + onDrop(ev) + { + this.scrumboardService.updateBoard(); + } + ngOnDestroy() { this.onBoardChanged.unsubscribe(); 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 050e6403..1951a62e 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 @@ -1,9 +1,10 @@ import { Component, Inject, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; -import { MD_DIALOG_DATA, MdDialogRef, MdMenuTrigger } from '@angular/material'; +import { MD_DIALOG_DATA, MdDialog, MdDialogRef, MdMenuTrigger } from '@angular/material'; import { Subscription } from 'rxjs/Subscription'; import { ScrumboardService } from '../../../scrumboard.service'; import { NgForm } from '@angular/forms/src/forms'; import { FuseUtils } from '../../../../../../../core/fuseUtils'; +import { FuseConfirmDialogComponent } from '../../../../../../../core/components/confirm-dialog/confirm-dialog.component'; @Component({ selector : 'fuse-scrumboard-board-card-dialog', @@ -23,9 +24,12 @@ export class FuseScrumboardCardDialogComponent implements OnInit, OnDestroy @ViewChild('checklistMenuTrigger') checklistMenu: MdMenuTrigger; @ViewChild('newCheckListTitleField') newCheckListTitleField; + confirmDialogRef: MdDialogRef; + constructor( public dialogRef: MdDialogRef, @Inject(MD_DIALOG_DATA) private data: any, + public dialog: MdDialog, private scrumboardService: ScrumboardService ) { @@ -243,8 +247,19 @@ export class FuseScrumboardCardDialogComponent implements OnInit, OnDestroy */ removeCard() { - this.dialogRef.close(); - this.scrumboardService.removeCard(this.card.id, this.list.id); + this.confirmDialogRef = this.dialog.open(FuseConfirmDialogComponent, { + disableClose: false + }); + + this.confirmDialogRef.componentInstance.confirmMessage = 'Are you sure you want to delete the card?'; + + this.confirmDialogRef.afterClosed().subscribe(result => { + if ( result ) + { + this.dialogRef.close(); + this.scrumboardService.removeCard(this.card.id, this.list.id); + } + }); } /** diff --git a/src/app/main/content/apps/scrumboard/board/list/card/card.component.scss b/src/app/main/content/apps/scrumboard/board/list/card/card.component.scss index 79d56b2e..518269a1 100644 --- a/src/app/main/content/apps/scrumboard/board/list/card/card.component.scss +++ b/src/app/main/content/apps/scrumboard/board/list/card/card.component.scss @@ -1,6 +1,6 @@ @import "src/app/core/scss/fuse"; -:host { +.scrumboard-board-card { position: relative; display: block; width: 100%; @@ -111,4 +111,41 @@ } } } + + &:not(.has-handle):not(.move-disabled), + &.has-handle [ngxdraghandle], + &.has-handle [ngxDragHandle] { + //cursor: move; + } + + .ngx-dnd-content { + user-select: none; + } + + &.gu-mirror { + position: fixed !important; + margin: 0 !important; + z-index: 9999 !important; + opacity: 0.8; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; + filter: alpha(opacity=80); + @include mat-elevation(7); + } + + &.gu-hide { + display: none !important; + } + + &.gu-unselectable { + -webkit-user-select: none !important; + -moz-user-select: none !important; + -ms-user-select: none !important; + user-select: none !important; + } + + &.gu-transit { + opacity: 0.2; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)"; + filter: alpha(opacity=20); + } } diff --git a/src/app/main/content/apps/scrumboard/board/list/card/card.component.ts b/src/app/main/content/apps/scrumboard/board/list/card/card.component.ts index 8ec3ab68..61aaf9ac 100644 --- a/src/app/main/content/apps/scrumboard/board/list/card/card.component.ts +++ b/src/app/main/content/apps/scrumboard/board/list/card/card.component.ts @@ -1,12 +1,13 @@ -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, ViewEncapsulation } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { ScrumboardService } from '../../../scrumboard.service'; import * as moment from 'moment'; @Component({ - selector : 'fuse-scrumboard-board-card', - templateUrl: './card.component.html', - styleUrls : ['./card.component.scss'] + selector : 'fuse-scrumboard-board-card', + templateUrl : './card.component.html', + styleUrls : ['./card.component.scss'], + encapsulation: ViewEncapsulation.None }) export class FuseScrumboardBoardCardComponent implements OnInit { 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 910a01cc..62b1b29a 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 @@ -24,13 +24,15 @@
-
- - +
+
diff --git a/src/app/main/content/apps/scrumboard/board/list/list.component.scss b/src/app/main/content/apps/scrumboard/board/list/list.component.scss index 75cc7d82..f237a726 100644 --- a/src/app/main/content/apps/scrumboard/board/list/list.component.scss +++ b/src/app/main/content/apps/scrumboard/board/list/list.component.scss @@ -1,4 +1,6 @@ -:host { +@import "src/app/core/scss/fuse"; + +.scrumboard-board-list { width: 344px; min-width: 344px; max-width: 344px; @@ -19,10 +21,9 @@ .list-header { height: 64px; min-height: 64px; - padding: 0 0 0 16px; + padding: 0 8px 0 16px; border-bottom: 1px solid rgba(0, 0, 0, 0.12); - } .list-content { @@ -54,4 +55,44 @@ } } + + &:not(.has-handle):not(.move-disabled), + &.has-handle [ngxdraghandle], + &.has-handle [ngxDragHandle] { + //cursor: move; + } + + .ngx-dnd-content { + user-select: none; + } + + &.gu-mirror { + position: fixed !important; + margin: 0 !important; + z-index: 9999 !important; + opacity: 0.8; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; + filter: alpha(opacity=80); + + > .list { + @include mat-elevation(7); + } + } + + &.gu-hide { + display: none !important; + } + + &.gu-unselectable { + -webkit-user-select: none !important; + -moz-user-select: none !important; + -ms-user-select: none !important; + user-select: none !important; + } + + &.gu-transit { + opacity: 0.2; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)"; + filter: alpha(opacity=20); + } } diff --git a/src/app/main/content/apps/scrumboard/board/list/list.component.ts b/src/app/main/content/apps/scrumboard/board/list/list.component.ts index e471340a..49619441 100644 --- a/src/app/main/content/apps/scrumboard/board/list/list.component.ts +++ b/src/app/main/content/apps/scrumboard/board/list/list.component.ts @@ -1,16 +1,18 @@ -import { Component, Input, OnDestroy, OnInit, ViewChild } from '@angular/core'; +import { Component, Input, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core'; import { FuseUtils } from '../../../../../../core/fuseUtils'; import { ScrumboardService } from 'app/main/content/apps/scrumboard/scrumboard.service'; import { ActivatedRoute } from '@angular/router'; import { Subscription } from 'rxjs/Subscription'; import { PerfectScrollbarDirective } from 'ngx-perfect-scrollbar'; -import { MdDialog } from '@angular/material'; +import { MdDialog, MdDialogRef } from '@angular/material'; import { FuseScrumboardCardDialogComponent } from '../dialogs/card/card.component'; +import { FuseConfirmDialogComponent } from '../../../../../../core/components/confirm-dialog/confirm-dialog.component'; @Component({ - selector : 'fuse-scrumboard-board-list', - templateUrl: './list.component.html', - styleUrls : ['./list.component.scss'] + selector : 'fuse-scrumboard-board-list', + templateUrl : './list.component.html', + styleUrls : ['./list.component.scss'], + encapsulation: ViewEncapsulation.None }) export class FuseScrumboardBoardListComponent implements OnInit, OnDestroy { @@ -22,6 +24,8 @@ export class FuseScrumboardBoardListComponent implements OnInit, OnDestroy onBoardChanged: Subscription; + confirmDialogRef: MdDialogRef; + constructor( private route: ActivatedRoute, private scrumboardService: ScrumboardService, @@ -79,7 +83,18 @@ export class FuseScrumboardBoardListComponent implements OnInit, OnDestroy removeList(listId) { - this.scrumboardService.removeList(listId); + this.confirmDialogRef = this.dialog.open(FuseConfirmDialogComponent, { + disableClose: false + }); + + this.confirmDialogRef.componentInstance.confirmMessage = 'Are you sure you want to delete the list and it\'s all cards?'; + + this.confirmDialogRef.afterClosed().subscribe(result => { + if ( result ) + { + this.scrumboardService.removeList(listId); + } + }); } openCardDialog(cardId) @@ -97,6 +112,11 @@ export class FuseScrumboardBoardListComponent implements OnInit, OnDestroy }); } + onDrop(ev) + { + 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 df4304e2..43dd7966 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 @@ -3,7 +3,7 @@
-
+
Settings
@@ -58,7 +58,7 @@
-
+
Background Color