Bartosz Dziewoński has uploaded a new change for review.
https://gerrit.wikimedia.org/r/243080
Change subject: mw.widgets.ComplexTitleInputWidget: Implement
gatherPreInfuseState/restorePreInfuseState
......................................................................
mw.widgets.ComplexTitleInputWidget: Implement
gatherPreInfuseState/restorePreInfuseState
Bug: T114134
Change-Id: I939551579fe1d03603d65b3562c1c977681994a6
---
M resources/src/mediawiki.widgets/mw.widgets.ComplexTitleInputWidget.js
1 file changed, 19 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/80/243080/1
diff --git
a/resources/src/mediawiki.widgets/mw.widgets.ComplexTitleInputWidget.js
b/resources/src/mediawiki.widgets/mw.widgets.ComplexTitleInputWidget.js
index 0c6c15e..7855bb9 100644
--- a/resources/src/mediawiki.widgets/mw.widgets.ComplexTitleInputWidget.js
+++ b/resources/src/mediawiki.widgets/mw.widgets.ComplexTitleInputWidget.js
@@ -60,4 +60,23 @@
this.title.setNamespace( Number( this.namespace.getValue() ) );
};
+ /**
+ * @inheritdoc
+ */
+ mw.widgets.ComplexTitleInputWidget.prototype.gatherPreInfuseState =
function ( node ) {
+ var state =
mw.widgets.ComplexTitleInputWidget.parent.prototype.gatherPreInfuseState.call(
this, node );
+ state.namespace = this.namespace.gatherPreInfuseState( $( node
).find( '.mw-widget-namespaceInputWidget' ) );
+ state.title = this.title.gatherPreInfuseState( $( node ).find(
'.mw-widget-titleInputWidget' ) );
+ return state;
+ };
+
+ /**
+ * @inheritdoc
+ */
+ mw.widgets.ComplexTitleInputWidget.prototype.restorePreInfuseState =
function ( state ) {
+
mw.widgets.ComplexTitleInputWidget.parent.prototype.restorePreInfuseState.call(
this, state );
+ this.namespace.restorePreInfuseState( state.namespace );
+ this.title.restorePreInfuseState( state.title );
+ };
+
}( jQuery, mediaWiki ) );
--
To view, visit https://gerrit.wikimedia.org/r/243080
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I939551579fe1d03603d65b3562c1c977681994a6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits