TasneemLo has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/237969

Change subject: Rename modules in resources
......................................................................

Rename modules in resources

Resource files have been moved to their own "resource" folder, but the
module names have not been modified to reflect this. Therefore, the
new names bring it back to the old convention of identifying the module
name based on the path.
The old module names have not been removed, and have been deprecated so
that other extensions do not break.

Bug: T100467
Change-Id: I07b43666db565183554012bf5eae46a3df911735
---
M resources/mobile.categories.overlays/CategoryApi.js
M resources/mobile.search.api/SearchApi.js
M resources/mobile.search.beta.api/SearchApi.js
M resources/mobile.search/SearchOverlay.js
M resources/mobile.search/init.js
M tests/qunit/mobile.search/test_SearchApi.js
6 files changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/69/237969/1

diff --git a/resources/mobile.categories.overlays/CategoryApi.js 
b/resources/mobile.categories.overlays/CategoryApi.js
index 425526c..9be0eca 100644
--- a/resources/mobile.categories.overlays/CategoryApi.js
+++ b/resources/mobile.categories.overlays/CategoryApi.js
@@ -1,7 +1,7 @@
 ( function ( M ) {
 
        var CategoryApi,
-               SearchApi = M.require( 'modules/search/SearchApi' );
+               SearchApi = M.require( 'mobile.search/SearchApi' );
 
        /**
         * Api for CategoryOverlay
diff --git a/resources/mobile.search.api/SearchApi.js 
b/resources/mobile.search.api/SearchApi.js
index 813787a..378241d 100644
--- a/resources/mobile.search.api/SearchApi.js
+++ b/resources/mobile.search.api/SearchApi.js
@@ -214,6 +214,6 @@
                }
        } );
 
-       M.define( 'modules/search/SearchApi', SearchApi );
+       M.define( 'mobile.search/SearchApi', SearchApi ).deprecate( 
'mobile.search/SearchApi' );
 
 }( mw.mobileFrontend, jQuery ) );
diff --git a/resources/mobile.search.beta.api/SearchApi.js 
b/resources/mobile.search.beta.api/SearchApi.js
index 587c5b6..75af8f6 100644
--- a/resources/mobile.search.beta.api/SearchApi.js
+++ b/resources/mobile.search.beta.api/SearchApi.js
@@ -1,5 +1,5 @@
 ( function ( M ) {
-       var SearchApi = M.require( 'modules/search/SearchApi' ),
+       var SearchApi = M.require( 'mobile.search/SearchApi' ),
                SearchApiBeta;
 
        /**
diff --git a/resources/mobile.search/SearchOverlay.js 
b/resources/mobile.search/SearchOverlay.js
index f653dbf..5b634e2 100644
--- a/resources/mobile.search/SearchOverlay.js
+++ b/resources/mobile.search/SearchOverlay.js
@@ -103,7 +103,7 @@
                        var self = this;
                        Overlay.prototype.initialize.call( this, options );
                        // use the given api module or use the default SearchApi
-                       this.api = options.api || new M.require( 
'modules/search/SearchApi' );
+                       this.api = options.api || new M.require( 
'mobile.search/SearchApi' );
 
                        // FIXME: Remove when search registers route with 
overlay manager
                        // we need this because of the focus/delay hack in 
search.js
diff --git a/resources/mobile.search/init.js b/resources/mobile.search/init.js
index b1c87ab..27a726d 100644
--- a/resources/mobile.search/init.js
+++ b/resources/mobile.search/init.js
@@ -7,7 +7,7 @@
                browser = M.require( 'browser' ),
                moduleConfig = {
                        modules: [ 'mobile.search.api', 'mobile.search' ],
-                       api: 'modules/search/SearchApi',
+                       api: 'mobile.search/SearchApi',
                        overlay: 'modules/search/SearchOverlay'
                },
                SearchOverlay,
diff --git a/tests/qunit/mobile.search/test_SearchApi.js 
b/tests/qunit/mobile.search/test_SearchApi.js
index a33b84e..84a57aa 100644
--- a/tests/qunit/mobile.search/test_SearchApi.js
+++ b/tests/qunit/mobile.search/test_SearchApi.js
@@ -1,6 +1,6 @@
 ( function ( $, M ) {
 
-       var SearchApi = M.require( 'modules/search/SearchApi' ),
+       var SearchApi = M.require( 'mobile.search/SearchApi' ),
                api;
 
        QUnit.module( 'MobileFrontend: SearchApi', {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I07b43666db565183554012bf5eae46a3df911735
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: TasneemLo <[email protected]>

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

Reply via email to