Sbisson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402073 )

Change subject: Ensure TitledElement mixin uses the right getTitle() function
......................................................................

Ensure TitledElement mixin uses the right getTitle() function

TitledElement mixin defines a getTitle() function which
it uses to access this.title.

mw.widgets.TitleWidget also defines a getTitle() function
to make a title object from the text in the input box.

This change removes getTitle() from TitledElement and
access this.title directly, as it is already done
in other parts of the same mixin.

Bug: T184181
Change-Id: I0e0b52e833438a59d16fa398f2e8e75764436158
---
M src/mixins/TitledElement.js
1 file changed, 1 insertion(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/73/402073/1

diff --git a/src/mixins/TitledElement.js b/src/mixins/TitledElement.js
index 389648e..58e3b6a 100644
--- a/src/mixins/TitledElement.js
+++ b/src/mixins/TitledElement.js
@@ -98,7 +98,7 @@
  * @chainable
  */
 OO.ui.mixin.TitledElement.prototype.updateTitle = function () {
-       var title = this.getTitle();
+       var title = this.title;
        if ( this.$titled ) {
                if ( title !== null ) {
                        // Only if this is an AccessKeyedElement
@@ -113,11 +113,3 @@
        return this;
 };
 
-/**
- * Get title.
- *
- * @return {string} Title string
- */
-OO.ui.mixin.TitledElement.prototype.getTitle = function () {
-       return this.title;
-};

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0e0b52e833438a59d16fa398f2e8e75764436158
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Sbisson <sbis...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to