jenkins-bot has submitted this change and it was merged.
Change subject: Use HTMLAutoCompleteSelectField
......................................................................
Use HTMLAutoCompleteSelectField
Use the new field type added in core in I42473cea for the wiki selection
widget.
Change-Id: I8f2fb3aea1d628fb31464f9245c2f3aa5ad195d2
Depends-On: I42473cea75f3706cc0125167f9191275ca6cb3b0
---
M frontend/MWOAuthUI.setup.php
D frontend/modules/ext.MWOAuth.WikiSelect.js
M frontend/specialpages/SpecialMWOAuthConsumerRegistration.php
3 files changed, 3 insertions(+), 25 deletions(-)
Approvals:
Aaron Schulz: Looks good to me, approved
jenkins-bot: Verified
diff --git a/frontend/MWOAuthUI.setup.php b/frontend/MWOAuthUI.setup.php
index c5b9282..836cf96 100644
--- a/frontend/MWOAuthUI.setup.php
+++ b/frontend/MWOAuthUI.setup.php
@@ -40,13 +40,6 @@
'remoteExtPath' => 'OAuth/frontend/modules',
'messages' => array( 'mwoauth-desc' )
);
- $wgResourceModules['ext.MWOAuth.WikiSelect'] = array(
- 'scripts' => array( 'ext.MWOAuth.WikiSelect.js' ),
- 'dependencies' => array( 'jquery.ui.autocomplete' ),
- 'localBasePath' => dirname( __FILE__ ) . '/modules',
- 'remoteExtPath' => 'OAuth/frontend/modules',
- 'messages' => array( 'mwoauth-desc' )
- );
}
/**
diff --git a/frontend/modules/ext.MWOAuth.WikiSelect.js
b/frontend/modules/ext.MWOAuth.WikiSelect.js
deleted file mode 100644
index 316c8b2..0000000
--- a/frontend/modules/ext.MWOAuth.WikiSelect.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * OAuth JavaScript
- * @author Chris Steipp 2013
- */
-( function( mw, $ ) {
- $( document ).ready( function () {
- if(window.mw){
- $( '#mw-input-wpwiki-other' ).autocomplete({
- source: mw.config.get( 'wgOAuthWikiList' )
- });
- }
- } );
-})( mediaWiki, jQuery );
diff --git a/frontend/specialpages/SpecialMWOAuthConsumerRegistration.php
b/frontend/specialpages/SpecialMWOAuthConsumerRegistration.php
index d65d286..ae3c71c 100644
--- a/frontend/specialpages/SpecialMWOAuthConsumerRegistration.php
+++ b/frontend/specialpages/SpecialMWOAuthConsumerRegistration.php
@@ -59,9 +59,6 @@
$this->setHeaders();
$this->getOutput()->disallowUserJs();
- $this->getOutput()->addModules( 'ext.MWOAuth.WikiSelect' );
- $this->getOutput()->addJsConfigVars( 'wgOAuthWikiList',
- array_values( MWOAuthUtils::getAllWikiNames() ) );
$block = $user->getBlock();
if ( $block ) {
@@ -121,11 +118,12 @@
'required' => true
),
'wiki' => array(
- 'type' => 'selectorother',
+ 'type' => 'autocompleteselect',
'options' => array(
wfMessage(
'mwoauth-consumer-allwikis' )->escaped() => '*',
wfMessage(
'mwoauth-consumer-wiki-thiswiki', wfWikiID() )->escaped() => wfWikiID()
- ),
+ ),
+ 'autocomplete' => array_flip(
MWOAuthUtils::getAllWikiNames() ),
'other' => wfMessage(
'mwoauth-consumer-wiki-other' )->escaped(),
'label-message' =>
'mwoauth-consumer-wiki',
'required' => true,
--
To view, visit https://gerrit.wikimedia.org/r/142671
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8f2fb3aea1d628fb31464f9245c2f3aa5ad195d2
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/OAuth
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: CSteipp <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits