Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ export class SelectionTransformer {
context.querySelectorAll(`.${tableRowClassName}.${checkedClassName}`).forEach((el) => el.classList.remove(checkedClassName));

_.each(state.selected, (selected:boolean, workPackageId:any) => {
context.querySelector(`.${tableRowClassName}[data-work-package-id="${workPackageId}"]`)?.classList.toggle(checkedClassName, selected);
context.querySelectorAll(`.${tableRowClassName}[data-work-package-id="${workPackageId}"]`).forEach((el) => {
el.classList.toggle(checkedClassName, selected);
});
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export function registerWorkPackageMouseHandler(this:void,
deactivate(direction, false);
};

bodyTarget.on('keyup.timelinecell', () => keyPressFn);
bodyTarget.on('keyup.timelinecell', keyPressFn);
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -448,9 +448,8 @@ export class WorkPackageTimelineTableController extends UntilDestroyedMixin impl
// RR: kept both variants for documentation purpose.
// A: calculate the minimal width based on the width of the timeline view
// B: calculate the minimal width based on the window width
const width = Array.from(this.element.parentElement!.children)
.map(child => child.clientWidth)
.reduce((sum, cur) => sum + cur, 0);
const width = this.element.children[0]?.clientWidth || 0; // A
// const width = document.body.clientWidth; // B

const { pixelPerDay } = currentParams;
const visibleDays = Math.ceil((width / pixelPerDay) * 1.5);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class PersistentToggleComponent implements OnInit {

if (isNowHidden) {
slideUp(this.targetNotification, 400);
window.requestAnimationFrame(() => this.targetNotification.hidden = true);
setTimeout(() => this.targetNotification.hidden = true, 400);
} else {
this.targetNotification.hidden = false;
slideDown(this.targetNotification, 400);
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/app/shared/helpers/event-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ class EventListenerRegistry {
}

private getNamespaceAndType(namespacedEvent:NamespacedEvent|NamespacedEvents):[EventNamespace, EventType|null] {
const [namespace, type = null] = namespacedEvent.split('.').reverse() as [EventNamespace, EventType?];
const parts = namespacedEvent.split('.').reverse();
const namespace = parts[0];
const type = (parts[1] as EventType | undefined) ?? null;
return [namespace, type];
}
}
Expand Down
Loading