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

Change subject: Revert I59122b568cd353ca5c3aba0a28522effb15cfab4
......................................................................


Revert I59122b568cd353ca5c3aba0a28522effb15cfab4

Linking to the history page is not that useful. Ideally we should
link to Special:Log as seen in Ia99afed0402e58fb8fcec64b3d2c9642cb8fb541
but that requres design improvements to Special:Log. We can un-do this
change once that's done.

Bug: T95305
Change-Id: I2a80cc6d8555d7d32b1b0ef8ed2b424127f7a637
---
M i18n/en.json
M i18n/qqq.json
M includes/Resources.php
M resources/mobile.editor/init.js
4 files changed, 6 insertions(+), 40 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 15ac1bb..c8766e1 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -101,6 +101,7 @@
        "mobile-frontend-editor-captcha-try-again": "Wrong code, try again.",
        "mobile-frontend-editor-continue": "Next",
        "mobile-frontend-editor-cta": "Help improve this page!",
+       "mobile-frontend-editor-disabled": "This page is protected to prevent 
vandalism.",
        "mobile-frontend-editor-edit": "Edit",
        "mobile-frontend-editor-editing": "Editing",
        "mobile-frontend-editor-editing-page": "<span><strong>Editing</strong> 
$1</span>",
@@ -140,8 +141,6 @@
        "mobile-frontend-editor-redlink-leave": "No, thanks.",
        "mobile-frontend-editor-redlink-explain": "This page has not yet been 
created on {{SITENAME}}.",
        "mobile-frontend-editor-redlink-create": "Create page",
-       "mobile-frontend-editor-showhistory": "Show history",
-       "mobile-frontend-editor-protected": "This page is protected. You can 
consult the history page to see wherther a reason was given or not.",
        "mobile-frontend-enable-images": "Enable images on mobile site",
        "mobile-frontend-errorreport-button-label": "Report an error",
        "mobile-frontend-errorreport-error": "Error, feedback could not be 
posted.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 12845c0..5adfa94 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -135,8 +135,6 @@
        "mobile-frontend-editor-redlink-leave": "Used as a message for a link, 
that the user doesn't want to edit a page, that does not exist 
yet.\n{{Identical|No thanks}}",
        "mobile-frontend-editor-redlink-explain": "Question for the user, if he 
want to edit a page, which link he clicked and that does not exist yet, or 
not.",
        "mobile-frontend-editor-redlink-create": "Label for a create page 
button.\n{{Identical|Create page}}",
-       "mobile-frontend-editor-showhistory": "Label for a link redirect the 
user to the page history.",
-       "mobile-frontend-editor-protected": "Message that appears when a user 
is unable to edit a page and clicks edit icon.",
        "mobile-frontend-enable-images": "Unused at this time.\n\nSee also:\n* 
{{msg-mw|Mobile-frontend-disable-images}}",
        "mobile-frontend-errorreport-button-label": "Label for button for 
submitting an error report. Keep this short.",
        "mobile-frontend-errorreport-error": "Error displayed when feedback 
could not be posted.",
diff --git a/includes/Resources.php b/includes/Resources.php
index 2f677fe..0ddfc90 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -558,6 +558,7 @@
                ),
                'messages' => array(
                        // editor.js
+                       'mobile-frontend-editor-disabled',
                        'mobile-frontend-editor-unavailable',
                        'mobile-frontend-editor-uploadenable',
                        'mobile-frontend-editor-blocked-info-loggedin' => 
array( 'parse' ),
@@ -570,9 +571,6 @@
                        'mobile-frontend-editor-redlink-create',
                        'mobile-frontend-editor-redlink-leave',
                        'mobile-frontend-editor-redlink-explain' => array( 
'parse' ),
-                       'mobile-frontend-editor-protected',
-                       'mobile-frontend-editor-showhistory',
-                       'cancel',
                ),
                'scripts' => array(
                        'resources/mobile.editor/init.js',
diff --git a/resources/mobile.editor/init.js b/resources/mobile.editor/init.js
index 77615a2..59dcd07 100644
--- a/resources/mobile.editor/init.js
+++ b/resources/mobile.editor/init.js
@@ -264,7 +264,8 @@
                                } );
                                $( '.edit-page' ).detach();
                        } else {
-                               disableEditor();
+                               $caEdit.removeClass( 'hidden' );
+                               showSorryToast( 
'mobile-frontend-editor-disabled' );
                        }
                }
        }
@@ -293,41 +294,11 @@
                                makeCta( $a, section );
                        } );
                } else {
-                       disableEditor();
+                       $caEdit.removeClass( 'hidden' );
+                       showSorryToast( 'mobile-frontend-editor-disabled' );
                }
        }
 
-       /**
-        * Unhide the editor button, but still shows a locked editor icon, 
which, when clicked,
-        * shows a ContentOverlay with the message, that this page is protected.
-        * @method
-        * @ignore
-        */
-       function disableEditor() {
-               var title = mw.Title.newFromText( mw.config.get( 'wgPageName' ) 
),
-                       drawerOptions = {
-                               progressiveButton: new Button( {
-                                       progressive: true,
-                                       label: mw.msg( 
'mobile-frontend-editor-showhistory' ),
-                                       href: title.getUrl( { action: 'history' 
} )
-                               } ).options,
-                               closeAnchor: new Anchor( {
-                                       progressive: true,
-                                       label: mw.msg( 'cancel' ),
-                                       additionalClassNames: 'hide'
-                               } ).options,
-                               content: mw.msg( 
'mobile-frontend-editor-protected' ),
-                               actionAnchor: false
-                       },
-                       drawer;
-
-               $caEdit.removeClass( 'hidden' ).on( 'click', function () {
-                       if ( drawer === undefined ) {
-                               drawer = new CtaDrawer( drawerOptions );
-                       }
-                       drawer.show();
-               } );
-       }
        /**
         * Show a toast message with sincere condolences.
         * @method

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

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

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

Reply via email to