jenkins-bot has submitted this change and it was merged.

Change subject: Kill M.isApp method and less/app directory
......................................................................


Kill M.isApp method and less/app directory

Bug: 73158
Change-Id: Ifa56c7110e947089eb3129fe8c208ce30a6e1bab
---
M javascripts/loggingSchemas/MobileWebClickTracking.js
M javascripts/modes.js
M javascripts/modules/search/search.js
D less/app/common.less
4 files changed, 16 insertions(+), 42 deletions(-)

Approvals:
  Jdlrobson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/javascripts/loggingSchemas/MobileWebClickTracking.js 
b/javascripts/loggingSchemas/MobileWebClickTracking.js
index 746882f..1b98e53 100644
--- a/javascripts/loggingSchemas/MobileWebClickTracking.js
+++ b/javascripts/loggingSchemas/MobileWebClickTracking.js
@@ -47,24 +47,21 @@
 
        // Add EventLogging to hamburger menu
        $( function () {
-               var $profileLink;
-               if ( !M.isApp() ) {
-                       $profileLink = $( '#mw-mf-last-modified a' )
-                               .filter( function () {
-                                       return $( this ).children().length === 
0;
-                               } );
+               var $profileLink = $( '#mw-mf-last-modified a' )
+                       .filter( function () {
+                               return $( this ).children().length === 0;
+                       } );
 
-                       hijackLink( '#mw-mf-page-left .icon-home', 
'hamburger-home' );
-                       hijackLink( '#mw-mf-page-left .icon-random', 
'hamburger-random' );
-                       hijackLink( '#mw-mf-page-left .icon-nearby', 
'hamburger-nearby' );
-                       hijackLink( '#mw-mf-page-left .icon-watchlist', 
'hamburger-watchlist' );
-                       hijackLink( '#mw-mf-page-left .icon-settings', 
'hamburger-settings' );
-                       hijackLink( '#mw-mf-page-left .icon-uploads', 
'hamburger-uploads' );
-                       hijackLink( '#mw-mf-page-left .icon-profile', 
'hamburger-profile' );
-                       hijackLink( '#mw-mf-page-left .icon-anon', 
'hamburger-login' );
-                       hijackLink( '#mw-mf-page-left .icon-secondary-logout', 
'hamburger-logout' );
-                       hijackLink( $( '#mw-mf-last-modified a span' 
).parent(), 'lastmodified-history' );
-                       hijackLink( $profileLink, 'lastmodified-profile' );
-               }
+               hijackLink( '#mw-mf-page-left .icon-home', 'hamburger-home' );
+               hijackLink( '#mw-mf-page-left .icon-random', 'hamburger-random' 
);
+               hijackLink( '#mw-mf-page-left .icon-nearby', 'hamburger-nearby' 
);
+               hijackLink( '#mw-mf-page-left .icon-watchlist', 
'hamburger-watchlist' );
+               hijackLink( '#mw-mf-page-left .icon-settings', 
'hamburger-settings' );
+               hijackLink( '#mw-mf-page-left .icon-uploads', 
'hamburger-uploads' );
+               hijackLink( '#mw-mf-page-left .icon-profile', 
'hamburger-profile' );
+               hijackLink( '#mw-mf-page-left .icon-anon', 'hamburger-login' );
+               hijackLink( '#mw-mf-page-left .icon-secondary-logout', 
'hamburger-logout' );
+               hijackLink( $( '#mw-mf-last-modified a span' ).parent(), 
'lastmodified-history' );
+               hijackLink( $profileLink, 'lastmodified-profile' );
        } );
 } )( mw.mobileFrontend, jQuery );
diff --git a/javascripts/modes.js b/javascripts/modes.js
index 0349a92..1801d8b 100644
--- a/javascripts/modes.js
+++ b/javascripts/modes.js
@@ -35,15 +35,6 @@
                },
 
                /**
-                * Determines if we are running mobile application
-                * @method
-                * @return {Boolean}
-                */
-               isApp: function () {
-                       return this.getMode() === 'app';
-               },
-
-               /**
                 * Detect module being run outside allowed mode
                 * @method
                 * @param {Array} modes Array of allowed mode names
diff --git a/javascripts/modules/search/search.js 
b/javascripts/modules/search/search.js
index 2db61f7..80ef11b 100644
--- a/javascripts/modules/search/search.js
+++ b/javascripts/modules/search/search.js
@@ -16,7 +16,7 @@
        // FIXME: ugly hack that removes search from browser history when 
navigating
        // to search results (we can't rely on History API yet)
        // alpha does it differently in lazyload.js
-       if ( !M.isAlphaGroupMember() && !M.isApp() ) {
+       if ( !M.isAlphaGroupMember() ) {
                M.on( 'search-results', function ( overlay ) {
                        overlay.$( '.results a' ).on( 'click', function () {
                                var href = $( this ).attr( 'href' );
diff --git a/less/app/common.less b/less/app/common.less
deleted file mode 100644
index 5e47ff6..0000000
--- a/less/app/common.less
+++ /dev/null
@@ -1,14 +0,0 @@
-// FIXME: In future we want to support all of these!
-
-// Hide full text search button
-.icon-search,
-// Not possible to login with JavaScript and thus edit sections currently
-.edit-page,
-// Main menu links do not currently work
-#mw-mf-main-menu-button,
-// Languages lead to external URLS.
-#mw-mf-language-section,
-// Not possible to login with JavaScript currently
-#page-actions {
-       display: none !important;
-}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifa56c7110e947089eb3129fe8c208ce30a6e1bab
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Bmansurov <[email protected]>
Gerrit-Reviewer: Awjrichards <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to