Replace "getSelectedItem" with "findSelectedItem" for consistency

Bug: T184040
Change-Id: I469d0e0b9982ea5f5de35b514c76e817b1d8e9b5
This commit is contained in:
zoranzoki21 2018-01-09 23:32:41 +01:00 committed by Zoranzoki21
parent 20f8c063eb
commit 6e33405482

View file

@ -488,7 +488,7 @@ mw.TemplateData.Dialog.prototype.displayToFormat = function ( s ) {
* @param {string} value Input widget value
*/
mw.TemplateData.Dialog.prototype.onTemplateFormatInputWidgetChange = function ( value ) {
var item = this.templateFormatSelectWidget.getSelectedItem(),
var item = this.templateFormatSelectWidget.findSelectedItem(),
format,
newValue;
if ( item.getData() === 'custom' ) {
@ -521,7 +521,7 @@ mw.TemplateData.Dialog.prototype.onParamPropertyInputChange = function ( propert
allProps = mw.TemplateData.Model.static.getAllProperties( true );
if ( property === 'type' ) {
value = this.propInputs[ property ].getMenu().getSelectedItem() ? this.propInputs[ property ].getMenu().getSelectedItem().getData() : 'unknown';
value = this.propInputs[ property ].getMenu().findSelectedItem() ? this.propInputs[ property ].getMenu().findSelectedItem().getData() : 'unknown';
}
// TODO: Validate the name