mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-24 22:25:27 +00:00
Merge "Less harsh failure mode when attempting to undo in mobile editor"
This commit is contained in:
commit
282bdaaefa
|
@ -17,7 +17,6 @@
|
||||||
"mobile-frontend-editor-tutorial-confirm": "Start editing",
|
"mobile-frontend-editor-tutorial-confirm": "Start editing",
|
||||||
"mobile-frontend-editor-tutorial-summary": "Try improving the $1 page.<br />Don't be scared of markup.",
|
"mobile-frontend-editor-tutorial-summary": "Try improving the $1 page.<br />Don't be scared of markup.",
|
||||||
"mobile-frontend-editor-unavailable": "Mobile editing is not currently available on your browser. Please try a different browser.",
|
"mobile-frontend-editor-unavailable": "Mobile editing is not currently available on your browser. Please try a different browser.",
|
||||||
"mobile-frontend-editor-undo-unsupported": "Undo is not currently supported on mobile devices.",
|
|
||||||
"mobile-frontend-editor-uploadenable": "Please upload a photo first to enable editing.",
|
"mobile-frontend-editor-uploadenable": "Please upload a photo first to enable editing.",
|
||||||
"mobile-frontend-footer-sitename": "{{SITENAME}}",
|
"mobile-frontend-footer-sitename": "{{SITENAME}}",
|
||||||
"mobile-frontend-history": "View edit history of this page.",
|
"mobile-frontend-history": "View edit history of this page.",
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
"mobile-frontend-editor-tutorial-confirm": "Text for the button a user clicks after they have read the editing tutorial and are ready to edit the page.\n\nSee also:\n* {{msg-mw|Mobile-frontend-editor-tutorial-summary}}",
|
"mobile-frontend-editor-tutorial-confirm": "Text for the button a user clicks after they have read the editing tutorial and are ready to edit the page.\n\nSee also:\n* {{msg-mw|Mobile-frontend-editor-tutorial-summary}}",
|
||||||
"mobile-frontend-editor-tutorial-summary": "Text for tutorial overlay presented to a user the first time they try to edit a page.\n\nParameters:\n* $1 - page title\nSee also:\n* {{msg-mw|Mobile-frontend-editor-tutorial-alt-summary}}",
|
"mobile-frontend-editor-tutorial-summary": "Text for tutorial overlay presented to a user the first time they try to edit a page.\n\nParameters:\n* $1 - page title\nSee also:\n* {{msg-mw|Mobile-frontend-editor-tutorial-alt-summary}}",
|
||||||
"mobile-frontend-editor-unavailable": "Message that appears when a user attempts to edit with an unsupported/incapable browser.\n\nPreceded by the header {{msg-mw|Mobile-frontend-editor-unavailable-header}}.",
|
"mobile-frontend-editor-unavailable": "Message that appears when a user attempts to edit with an unsupported/incapable browser.\n\nPreceded by the header {{msg-mw|Mobile-frontend-editor-unavailable-header}}.",
|
||||||
"mobile-frontend-editor-undo-unsupported": "Shown when user attempts to do an undo which is currently not supported.",
|
|
||||||
"mobile-frontend-editor-uploadenable": "Shown when try to edit a new file page.",
|
"mobile-frontend-editor-uploadenable": "Shown when try to edit a new file page.",
|
||||||
"mobile-frontend-footer-sitename": "Name of site",
|
"mobile-frontend-footer-sitename": "Name of site",
|
||||||
"mobile-frontend-history": "Used as label for the link which points to the \"Edit history\" page.\n\nThis is shown on the Main Page in place of a last modified label to avoid confusion caused by transclusions.\n\nIf not the Main Page, the following message is used:\n* {{msg-mw|Mobile-frontend-last-modified-date}}",
|
"mobile-frontend-history": "Used as label for the link which points to the \"Edit history\" page.\n\nThis is shown on the Main Page in place of a last modified label to avoid confusion caused by transclusions.\n\nIf not the Main Page, the following message is used:\n* {{msg-mw|Mobile-frontend-last-modified-date}}",
|
||||||
|
|
|
@ -166,12 +166,6 @@
|
||||||
isNewPage = page.options.id === 0,
|
isNewPage = page.options.id === 0,
|
||||||
leadSection = page.getLeadSectionElement();
|
leadSection = page.getLeadSectionElement();
|
||||||
|
|
||||||
if ( mw.util.getParamValue( 'undo' ) ) {
|
|
||||||
// TODO: Replace with an OOUI dialog
|
|
||||||
// eslint-disable-next-line no-alert
|
|
||||||
alert( mw.msg( 'mobile-frontend-editor-undo-unsupported' ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
page.$( '.edit-page, .edit-link' ).removeClass( disabledClass )
|
page.$( '.edit-page, .edit-link' ).removeClass( disabledClass )
|
||||||
.on( 'click', onEditLinkClick );
|
.on( 'click', onEditLinkClick );
|
||||||
overlayManager.add( /^\/editor\/(\d+|all)$/, function ( sectionId ) {
|
overlayManager.add( /^\/editor\/(\d+|all)$/, function ( sectionId ) {
|
||||||
|
@ -410,6 +404,11 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( mw.util.getParamValue( 'undo' ) ) {
|
||||||
|
// Our fancy editor doesn't support undo, but we can rely on the fallback.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ( !isEditingSupported ) {
|
if ( !isEditingSupported ) {
|
||||||
// Editing is disabled (or browser is blacklisted)
|
// Editing is disabled (or browser is blacklisted)
|
||||||
updateEditPageButton( false );
|
updateEditPageButton( false );
|
||||||
|
|
|
@ -533,7 +533,6 @@
|
||||||
"mobile-frontend-editor-unavailable",
|
"mobile-frontend-editor-unavailable",
|
||||||
"mobile-frontend-editor-uploadenable",
|
"mobile-frontend-editor-uploadenable",
|
||||||
"mobile-frontend-editor-cta",
|
"mobile-frontend-editor-cta",
|
||||||
"mobile-frontend-editor-undo-unsupported",
|
|
||||||
"mobile-frontend-editor-edit",
|
"mobile-frontend-editor-edit",
|
||||||
"mobile-frontend-editor-redlink-create",
|
"mobile-frontend-editor-redlink-create",
|
||||||
"mobile-frontend-editor-redlink-leave",
|
"mobile-frontend-editor-redlink-leave",
|
||||||
|
|
Loading…
Reference in a new issue