diff options
Diffstat (limited to 'polygerrit-ui/app/elements/change/gr-confirm-rebase-dialog/gr-confirm-rebase-dialog.js')
-rw-r--r-- | polygerrit-ui/app/elements/change/gr-confirm-rebase-dialog/gr-confirm-rebase-dialog.js | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-rebase-dialog/gr-confirm-rebase-dialog.js b/polygerrit-ui/app/elements/change/gr-confirm-rebase-dialog/gr-confirm-rebase-dialog.js index 4ecb31fd34..eb0fa17f5c 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-rebase-dialog/gr-confirm-rebase-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-confirm-rebase-dialog/gr-confirm-rebase-dialog.js @@ -30,6 +30,10 @@ */ properties: { + /** + * Weird API usage requires this to be String or Null. Add this so + * the closure compiler doesn't complain. + * @type {?string} */ base: String, branch: String, hasParent: Boolean, @@ -40,29 +44,29 @@ '_updateSelectedOption(rebaseOnCurrent, hasParent)', ], - _displayParentOption: function(rebaseOnCurrent, hasParent) { + _displayParentOption(rebaseOnCurrent, hasParent) { return hasParent && rebaseOnCurrent; }, - _displayParentUpToDateMsg: function(rebaseOnCurrent, hasParent) { + _displayParentUpToDateMsg(rebaseOnCurrent, hasParent) { return hasParent && !rebaseOnCurrent; }, - _displayTipOption: function(rebaseOnCurrent, hasParent) { + _displayTipOption(rebaseOnCurrent, hasParent) { return !(!rebaseOnCurrent && !hasParent); }, - _handleConfirmTap: function(e) { + _handleConfirmTap(e) { e.preventDefault(); this.fire('confirm', null, {bubbles: false}); }, - _handleCancelTap: function(e) { + _handleCancelTap(e) { e.preventDefault(); this.fire('cancel', null, {bubbles: false}); }, - _handleRebaseOnOther: function(e) { + _handleRebaseOnOther() { this.$.parentInput.focus(); }, @@ -73,15 +77,15 @@ * rebased on top of the target branch. Leaving out the base implies that it * should be rebased on top of its current parent. */ - _handleRebaseOnTip: function(e) { + _handleRebaseOnTip() { this.base = ''; }, - _handleRebaseOnParent: function(e) { + _handleRebaseOnParent() { this.base = null; }, - _handleEnterChangeNumberTap: function(e) { + _handleEnterChangeNumberTap() { this.$.rebaseOnOtherInput.checked = true; }, @@ -89,7 +93,7 @@ * Sets the default radio button based on the state of the app and * the corresponding value to be submitted. */ - _updateSelectedOption: function(rebaseOnCurrent, hasParent) { + _updateSelectedOption(rebaseOnCurrent, hasParent) { if (this._displayParentOption(rebaseOnCurrent, hasParent)) { this.$.rebaseOnParentInput.checked = true; this._handleRebaseOnParent(); |