jenkins-bot has submitted this change and it was merged.

Change subject: ButtonWidget: Remove pointless #isHyperlink property
......................................................................


ButtonWidget: Remove pointless #isHyperlink property

One can just check #href. This was private and undocumented.

Change-Id: Ie0621a0fbf3b33f553e7d13403841fbe163ab11d
---
M src/widgets/ButtonWidget.js
1 file changed, 2 insertions(+), 5 deletions(-)

Approvals:
  Esanders: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/widgets/ButtonWidget.js b/src/widgets/ButtonWidget.js
index f909dd4..db04b5d 100644
--- a/src/widgets/ButtonWidget.js
+++ b/src/widgets/ButtonWidget.js
@@ -54,7 +54,6 @@
        this.href = null;
        this.target = null;
        this.noFollow = false;
-       this.isHyperlink = false;
 
        // Initialization
        this.$button.append( this.$icon, this.$label, this.$indicator );
@@ -108,7 +107,7 @@
  */
 OO.ui.ButtonWidget.prototype.onClick = function ( e ) {
        var ret = OO.ui.ButtonElement.prototype.onClick.call( this, e );
-       if ( this.isHyperlink ) {
+       if ( this.href ) {
                return true;
        }
        return ret;
@@ -119,7 +118,7 @@
  */
 OO.ui.ButtonWidget.prototype.onKeyPress = function ( e ) {
        var ret = OO.ui.ButtonElement.prototype.onKeyPress.call( this, e );
-       if ( this.isHyperlink ) {
+       if ( this.href ) {
                return true;
        }
        return ret;
@@ -164,10 +163,8 @@
                this.href = href;
                if ( href !== null ) {
                        this.$button.attr( 'href', href );
-                       this.isHyperlink = true;
                } else {
                        this.$button.removeAttr( 'href' );
-                       this.isHyperlink = false;
                }
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/205592
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie0621a0fbf3b33f553e7d13403841fbe163ab11d
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz DziewoƄski <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to