Fixes found in docs update
This commit is contained in:
parent
0c9b1b00d6
commit
ad37cb2880
@ -29,7 +29,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "ng b --output-hashing=none",
|
"build": "ng b --output-hashing=none",
|
||||||
"build:prod": "npm-run-all -s \"build -- --prod\" api-changed package",
|
"build:prod": "npm-run-all -s \"build -- --prod\" api-writeable package",
|
||||||
"build:dev": "npm-run-all -s build api-changed",
|
"build:dev": "npm-run-all -s build api-changed",
|
||||||
"watch": "npm-run-all -p \"build -- --watch\" dist-watch",
|
"watch": "npm-run-all -p \"build -- --watch\" dist-watch",
|
||||||
"dist-watch": "npm-watch api-changed",
|
"dist-watch": "npm-watch api-changed",
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label *ngIf="activeBoard.categories.length">
|
||||||
{{ strings['boards_categoryFilter'] }}:
|
{{ strings['boards_categoryFilter'] }}:
|
||||||
|
|
||||||
<select [(ngModel)]="categoryFilter" (change)="filterTasks()">
|
<select [(ngModel)]="categoryFilter" (change)="filterTasks()">
|
||||||
|
@ -145,15 +145,17 @@ export class BoardDisplayComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateBoards(): void {
|
updateBoards(): void {
|
||||||
this.boardService.getBoards().subscribe((response: ApiResponse) => {
|
this.boardService.refreshToken(() => {
|
||||||
this.boards = [];
|
this.boardService.getBoards().subscribe((response: ApiResponse) => {
|
||||||
|
this.boards = [];
|
||||||
|
|
||||||
if (response.data.length > 1) {
|
if (response.data.length > 1) {
|
||||||
this.updateBoardsList(response.data[1]);
|
this.updateBoardsList(response.data[1]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,8 +184,8 @@ export class BoardService {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
refreshToken(): void {
|
refreshToken(callback: any): void {
|
||||||
this.http.post('api/refresh', {}).subscribe();
|
this.http.post('api/refresh', {}).subscribe(() => callback());
|
||||||
}
|
}
|
||||||
|
|
||||||
private async convertBoardData(boardData: any): Promise<Board> {
|
private async convertBoardData(boardData: any): Promise<Board> {
|
||||||
|
@ -188,7 +188,7 @@
|
|||||||
item.filename"></i>
|
item.filename"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<i class="icon icon-trash-empty"
|
<i class="icon icon-trash-empty color-secondary"
|
||||||
[title]="strings['settings_remove'] + ' ' + item.filename"
|
[title]="strings['settings_remove'] + ' ' + item.filename"
|
||||||
(click)="attachmentToRemove = item;
|
(click)="attachmentToRemove = item;
|
||||||
modal.open(MODAL_CONFIRM_ATTACHMENT_ID +
|
modal.open(MODAL_CONFIRM_ATTACHMENT_ID +
|
||||||
@ -213,7 +213,16 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="viewModalProps.comments.length">
|
<div *ngIf="viewModalProps.comments.length">
|
||||||
<h3>{{ strings['boards_taskComments'] }}</h3>
|
<h3>
|
||||||
|
{{ strings['boards_taskComments'] }}
|
||||||
|
|
||||||
|
<div class="right">
|
||||||
|
<select [(ngModel)]="commentOrder" (change)="sortComments()">
|
||||||
|
<option value="oldest">Oldest First</option>
|
||||||
|
<option value="newest">Newest First</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</h3>
|
||||||
|
|
||||||
<div class="comment" *ngFor="let comment of viewModalProps.comments">
|
<div class="comment" *ngFor="let comment of viewModalProps.comments">
|
||||||
<div [innerHTML]="comment.html" *ngIf="!comment.isEdit"></div>
|
<div [innerHTML]="comment.html" *ngIf="!comment.isEdit"></div>
|
||||||
|
@ -61,6 +61,7 @@ export class ColumnDisplayComponent implements OnInit, OnDestroy {
|
|||||||
public taskToRemove: number;
|
public taskToRemove: number;
|
||||||
|
|
||||||
public newComment: string;
|
public newComment: string;
|
||||||
|
public commentOrder: string;
|
||||||
public sortOption: string;
|
public sortOption: string;
|
||||||
|
|
||||||
public templateElement: any;
|
public templateElement: any;
|
||||||
@ -98,6 +99,7 @@ export class ColumnDisplayComponent implements OnInit, OnDestroy {
|
|||||||
private sanitizer: DomSanitizer) {
|
private sanitizer: DomSanitizer) {
|
||||||
this.templateElement = elRef.nativeElement;
|
this.templateElement = elRef.nativeElement;
|
||||||
this.collapseTasks = false;
|
this.collapseTasks = false;
|
||||||
|
this.commentOrder = "oldest";
|
||||||
this.sortOption = 'pos';
|
this.sortOption = 'pos';
|
||||||
|
|
||||||
this.MODAL_ID = 'add-task-form-';
|
this.MODAL_ID = 'add-task-form-';
|
||||||
@ -139,7 +141,6 @@ export class ColumnDisplayComponent implements OnInit, OnDestroy {
|
|||||||
user.board_access,
|
user.board_access,
|
||||||
user.collapsed);
|
user.collapsed);
|
||||||
this.userOptions = auth.userOptions;
|
this.userOptions = auth.userOptions;
|
||||||
this.showActivity = this.activeUser.isAnyAdmin();
|
|
||||||
});
|
});
|
||||||
this.subs.push(sub);
|
this.subs.push(sub);
|
||||||
}
|
}
|
||||||
@ -204,6 +205,16 @@ export class ColumnDisplayComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sortComments() {
|
||||||
|
this.viewModalProps.comments.sort((a, b) => {
|
||||||
|
if (this.commentOrder === 'oldest') {
|
||||||
|
return a.timestamp - b.timestamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
return b.timestamp - a.timestamp;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
toggleCollapsed() {
|
toggleCollapsed() {
|
||||||
this.templateElement.classList.toggle('collapsed');
|
this.templateElement.classList.toggle('collapsed');
|
||||||
|
|
||||||
@ -250,7 +261,7 @@ export class ColumnDisplayComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.boardService.updateActiveBoard(boardData);
|
this.boardService.updateActiveBoard(boardData);
|
||||||
this.boardService.refreshToken();
|
this.onUpdateBoards.next();
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
}, err => {
|
}, err => {
|
||||||
this.notes.add({ type: 'error', text: err.toString() });
|
this.notes.add({ type: 'error', text: err.toString() });
|
||||||
@ -296,9 +307,9 @@ export class ColumnDisplayComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.boardService.updateActiveBoard(response.data[2][0]);
|
this.boardService.updateActiveBoard(response.data[2][0]);
|
||||||
|
this.onUpdateBoards.next();
|
||||||
this.modal.close(this.MODAL_ID + this.columnData?.id + '');
|
this.modal.close(this.MODAL_ID + this.columnData?.id + '');
|
||||||
|
|
||||||
this.boardService.refreshToken();
|
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -313,7 +324,7 @@ export class ColumnDisplayComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.boardService.updateActiveBoard(response.data[1][0]);
|
this.boardService.updateActiveBoard(response.data[1][0]);
|
||||||
this.boardService.refreshToken();
|
this.onUpdateBoards.next();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -624,10 +635,8 @@ export class ColumnDisplayComponent implements OnInit, OnDestroy {
|
|||||||
this.viewModalProps = Object.assign({}, viewTask);
|
this.viewModalProps = Object.assign({}, viewTask);
|
||||||
this.checkDueDate();
|
this.checkDueDate();
|
||||||
|
|
||||||
if (this.showActivity) {
|
this.showActivity = false;
|
||||||
this.showActivity = false;
|
setTimeout(() => (this.showActivity = true), 500);
|
||||||
setTimeout(() => (this.showActivity = true), 500);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.modal.open(this.MODAL_VIEW_ID + this.columnData.id);
|
this.modal.open(this.MODAL_VIEW_ID + this.columnData.id);
|
||||||
}
|
}
|
||||||
@ -732,6 +741,8 @@ export class ColumnDisplayComponent implements OnInit, OnDestroy {
|
|||||||
comment.task_id, comment.timestamp)
|
comment.task_id, comment.timestamp)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.sortComments();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Needs anonymous function for proper `this` context.
|
// Needs anonymous function for proper `this` context.
|
||||||
|
@ -461,6 +461,10 @@
|
|||||||
background: transparent;
|
background: transparent;
|
||||||
border: 0;
|
border: 0;
|
||||||
margin: 1em 0 0;
|
margin: 1em 0 0;
|
||||||
|
|
||||||
|
div {
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.activity {
|
.activity {
|
||||||
|
Reference in New Issue
Block a user