OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
close context menu while clicking for second time on WP create button
bsatarnejad75df4a2b6413
diff --git a/frontend/src/app/shared/components/op-context-menu/handlers/op-types-context-menu.directive.ts b/frontend/src/app/shared/components/op-context-menu/handlers/op-types-context-menu.directive.tsindex 77e142c3113..6eda8f0252a 100644--- a/frontend/src/app/shared/components/op-context-menu/handlers/op-types-context-menu.directive.ts+++ b/frontend/src/app/shared/components/op-context-menu/handlers/op-types-context-menu.directive.ts@@ -47,11 +47,15 @@ export class OpTypesContextMenuDirective extends OpContextMenuTrigger {@Input('dropdownActive') active:boolean;- constructor(readonly elementRef:ElementRef,+ public isOpen = false;++ constructor(+ readonly elementRef:ElementRef,readonly opContextMenu:OPContextMenuService,readonly browserDetector:BrowserDetector,readonly wpCreate:WorkPackageCreateService,- readonly $state:StateService) {+ readonly $state:StateService,+ ) {super(elementRef, opContextMenu);}@@ -69,13 +73,18 @@ export class OpTypesContextMenuDirective extends OpContextMenuTrigger {}protected open(evt:JQuery.TriggeredEvent) {- this- .wpCreate- .getEmptyForm(this.projectIdentifier)- .then((form) => {- this.buildItems(form.schema.type.allowedValues);- this.opContextMenu.show(this, evt);- });+ this.isOpen = !this.isOpen;+ if (this.isOpen) {+ this+ .wpCreate+ .getEmptyForm(this.projectIdentifier)+ .then((form) => {+ this.buildItems(form.schema.type.allowedValues);+ this.opContextMenu.show(this, evt);+ });+ } else {+ this.opContextMenu.close();+ }}public get locals():{ showAnchorRight?:boolean, contextMenuId?:string, items:OpContextMenuItem[] } {