summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Selberg <svense@axis.com>2020-03-17 11:45:43 +0100
committerSven Selberg <svense@axis.com>2020-03-17 11:45:43 +0100
commit20c17f8803bd9c2cee11712d4c502636f5b98241 (patch)
treed82cb6c5fdedc31abf509d69de6581def4b3f5ae
parente10a77b9a7e48180abae82da942d5c6f139e15c0 (diff)
gr-change-view: Compute isParentCurrent
21f0ac88 - Removing Current Actions from Change load Changed the way change-actions were loaded, and instead of loading them in gr-change-view they were loaded in gr-change-actions and were populated through double binding into gr-change-view._currentChangeActions. When removing the code that populated _currentRevisionActions the code to populate isParentCurrent was removed as well, without replacement. Since isParentCurrent is used to calculate whether to show "Parent not current" tooltip this tooltip was never shown. Bug: Issue 12469 Change-Id: I00556db2799ec25f83d2ce6dc1b9c1f05a79f702
-rw-r--r--polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js
index 7ddd51cd1b..20c3d15287 100644
--- a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js
+++ b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js
@@ -248,7 +248,10 @@
value: false,
observer: '_updateToggleContainerClass',
},
- _parentIsCurrent: Boolean,
+ _parentIsCurrent: {
+ type: Boolean,
+ computed: '_isParentCurrent(_currentRevisionActions)',
+ },
_submitEnabled: {
type: Boolean,
computed: '_isSubmitEnabled(_currentRevisionActions)',
@@ -1321,6 +1324,14 @@
revisionActions.submit.enabled);
},
+ _isParentCurrent(revisionActions) {
+ if (revisionActions && revisionActions.rebase) {
+ return !revisionActions.rebase.enabled;
+ } else {
+ return true;
+ }
+ },
+
_getEdit() {
return this.$.restAPI.getChangeEdit(this._changeNum, true);
},