Drop issues on editor
T196150 disabled the fallback editor when JavaScript is available. As a result the code for page issues on the editor screen is redundant. This simplifies our code. The css rules relating to editor issues are retained, given they simplify the editor screen for mobile devices. Bug: T196150 Change-Id: I76d586414cdd8de533bb891b87d1e0b7efc20a68
This commit is contained in:
parent
44e59d625d
commit
6718bc4351
|
@ -5,7 +5,6 @@
|
||||||
KEYWORD_ALL_SECTIONS = 'all',
|
KEYWORD_ALL_SECTIONS = 'all',
|
||||||
config = mw.config,
|
config = mw.config,
|
||||||
user = mw.user,
|
user = mw.user,
|
||||||
ACTION_EDIT = config.get( 'wgAction' ) === 'edit',
|
|
||||||
NS_MAIN = 0,
|
NS_MAIN = 0,
|
||||||
NS_TALK = 1,
|
NS_TALK = 1,
|
||||||
NS_CATEGORY = 14,
|
NS_CATEGORY = 14,
|
||||||
|
@ -229,20 +228,16 @@
|
||||||
*/
|
*/
|
||||||
function initPageIssues( overlayManager, page ) {
|
function initPageIssues( overlayManager, page ) {
|
||||||
var label,
|
var label,
|
||||||
headingText = ACTION_EDIT ? mw.msg( 'edithelp' ) : getNamespaceHeadingText( CURRENT_NS ),
|
headingText = getNamespaceHeadingText( CURRENT_NS ),
|
||||||
$lead = page.getLeadSectionElement(),
|
$lead = page.getLeadSectionElement(),
|
||||||
issueOverlayShowAll = CURRENT_NS === NS_CATEGORY || CURRENT_NS === NS_TALK || ACTION_EDIT || !$lead,
|
issueOverlayShowAll = CURRENT_NS === NS_CATEGORY || CURRENT_NS === NS_TALK || !$lead,
|
||||||
inline = newTreatmentEnabled && CURRENT_NS === 0,
|
inline = newTreatmentEnabled && CURRENT_NS === 0,
|
||||||
$container = $( '#bodyContent' );
|
$container = $( '#bodyContent' );
|
||||||
|
|
||||||
// set A-B test class.
|
// set A-B test class.
|
||||||
$( 'html' ).addClass( newTreatmentEnabled ? 'issues-group-B' : 'issues-group-A' );
|
$( 'html' ).addClass( newTreatmentEnabled ? 'issues-group-B' : 'issues-group-A' );
|
||||||
|
|
||||||
if ( ACTION_EDIT ) {
|
if ( CURRENT_NS === NS_TALK || CURRENT_NS === NS_CATEGORY ) {
|
||||||
// Editor uses different parent element
|
|
||||||
$container = $( '#mw-content-text' );
|
|
||||||
createBanner( $container, mw.msg( 'edithelp' ), KEYWORD_ALL_SECTIONS, inline, overlayManager );
|
|
||||||
} else if ( CURRENT_NS === NS_TALK || CURRENT_NS === NS_CATEGORY ) {
|
|
||||||
// e.g. Template:English variant category; Template:WikiProject
|
// e.g. Template:English variant category; Template:WikiProject
|
||||||
createBanner( $container, mw.msg( 'mobile-frontend-meta-data-issues-header-talk' ),
|
createBanner( $container, mw.msg( 'mobile-frontend-meta-data-issues-header-talk' ),
|
||||||
KEYWORD_ALL_SECTIONS, inline, overlayManager );
|
KEYWORD_ALL_SECTIONS, inline, overlayManager );
|
||||||
|
|
|
@ -403,7 +403,6 @@
|
||||||
],
|
],
|
||||||
"messages": [
|
"messages": [
|
||||||
"skin-minerva-issue-learn-more",
|
"skin-minerva-issue-learn-more",
|
||||||
"edithelp",
|
|
||||||
"mobile-frontend-language-change",
|
"mobile-frontend-language-change",
|
||||||
"mobile-frontend-meta-data-issues",
|
"mobile-frontend-meta-data-issues",
|
||||||
"minerva-meta-data-issues-section-header",
|
"minerva-meta-data-issues-section-header",
|
||||||
|
|
Loading…
Reference in New Issue