From b24f5bc01486fa08dd91f3f847894b6de5b9e864 Mon Sep 17 00:00:00 2001 From: swarnadipa-dev Date: Wed, 2 Aug 2023 17:41:01 +0530 Subject: [PATCH 1/3] WEBUI-1215: fix enable tab navigation through drawer --- elements/nuxeo-app.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/elements/nuxeo-app.js b/elements/nuxeo-app.js index ca6e034950..6e407b5bb9 100644 --- a/elements/nuxeo-app.js +++ b/elements/nuxeo-app.js @@ -339,6 +339,7 @@ Polymer({ on-iron-activate="_toggleDrawer" aria-label$="[[i18n('app.drawer')]]" aria-expanded="[[drawerOpened]]" + on-keyup="_toggleDrawer" > { + this._toggleDrawer(event, { detail: { selected: event.target.getAttribute('name') } }); + }); }, _resetTaskSelection() { @@ -987,11 +991,14 @@ Polymer({ this.navigateTo('search', target.searchName); }, - _toggleDrawer(e) { - if (e.detail.selected && this._selected === e.detail.selected && this.drawerOpened) { + _toggleDrawer(e, selectedObj) { + const selectedItem = e.type === 'keyup' ? selectedObj : e; + const selectedItemDetailSelected = + selectedItem.detail && selectedItem.detail.selected ? selectedItem.detail.selected : 0; + if (this._selected === selectedItemDetailSelected && this.drawerOpened) { this._closeDrawer(); } else { - this._selected = this.selectedTab = e.detail.selected; + this._selected = this.selectedTab = selectedItemDetailSelected; this._openDrawer(); } }, From 9c7e39cf0ce4f696b4a283291733a22245a0d58f Mon Sep 17 00:00:00 2001 From: swarnadipa-dev Date: Fri, 11 Aug 2023 10:17:33 +0530 Subject: [PATCH 2/3] Revert "WEBUI-1215: fix enable tab navigation through drawer" This reverts commit b24f5bc01486fa08dd91f3f847894b6de5b9e864. --- elements/nuxeo-app.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/elements/nuxeo-app.js b/elements/nuxeo-app.js index 6e407b5bb9..ca6e034950 100644 --- a/elements/nuxeo-app.js +++ b/elements/nuxeo-app.js @@ -339,7 +339,6 @@ Polymer({ on-iron-activate="_toggleDrawer" aria-label$="[[i18n('app.drawer')]]" aria-expanded="[[drawerOpened]]" - on-keyup="_toggleDrawer" > { - this._toggleDrawer(event, { detail: { selected: event.target.getAttribute('name') } }); - }); }, _resetTaskSelection() { @@ -991,14 +987,11 @@ Polymer({ this.navigateTo('search', target.searchName); }, - _toggleDrawer(e, selectedObj) { - const selectedItem = e.type === 'keyup' ? selectedObj : e; - const selectedItemDetailSelected = - selectedItem.detail && selectedItem.detail.selected ? selectedItem.detail.selected : 0; - if (this._selected === selectedItemDetailSelected && this.drawerOpened) { + _toggleDrawer(e) { + if (e.detail.selected && this._selected === e.detail.selected && this.drawerOpened) { this._closeDrawer(); } else { - this._selected = this.selectedTab = selectedItemDetailSelected; + this._selected = this.selectedTab = e.detail.selected; this._openDrawer(); } }, From 02686bef40c55914b1af15c2eceec2de374a23ad Mon Sep 17 00:00:00 2001 From: swarnadipa-dev Date: Fri, 11 Aug 2023 14:24:20 +0530 Subject: [PATCH 3/3] test --- elements/nuxeo-app.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/elements/nuxeo-app.js b/elements/nuxeo-app.js index ca6e034950..ad830c7029 100644 --- a/elements/nuxeo-app.js +++ b/elements/nuxeo-app.js @@ -1099,20 +1099,20 @@ Polymer({ _displayUser(user) { if (user) { - let result = ''; + let res = ''; if (user.properties.firstName) { - result += user.properties.firstName; + res += user.properties.firstName; } if (user.properties.lastName) { - if (result.length > 0) { - result += ' '; + if (res.length > 0) { + res += ' '; } - result += user.properties.lastName; + res += user.properties.lastName; } - if (result.length === 0) { - result = user.id; + if (res.length === 0) { + res = user.id; } - return result; + return res; } },