Remove unused jquery.wikiEditor.html file

Has sat there since the first commit in 2010 (r73055), but not used.
I imagine it was was a design prototype at some point.

Also fix a few minor eslint warnings about line length, and remove the
one-off "ext-" prefix and capitilised "WikiEditor" CSS class name that
the rest of the repo doesn't use.

Change-Id: Id0eeb456fffdb490a6a86974288e57099e53ce71
This commit is contained in:
Timo Tijhof 2022-03-03 15:24:22 +00:00
parent 06ceb65228
commit 90e6ccaced
6 changed files with 26 additions and 49 deletions

View file

@ -15,7 +15,7 @@ function LinkTextField() {
var config = {
align: 'top',
label: mw.msg( 'wikieditor-toolbar-tool-link-int-text' ),
classes: [ 'ext-WikiEditor-InsertLink-LinkTextField' ]
classes: [ 'mw-wikiEditor-InsertLink-LinkTextField' ]
};
LinkTextField.super.call( this, input, config );

View file

@ -26,7 +26,7 @@ function LinkTypeField() {
var config = {
align: 'top',
classes: [ 'ext-WikiEditor-InsertLink-LinkTypeField' ]
classes: [ 'mw-wikiEditor-InsertLink-LinkTypeField' ]
};
LinkTypeField.super.call( this, radioSelect, config );
}

View file

@ -1,4 +1,4 @@
.ext-WikiEditor-InsertLink-LinkTypeField {
.mw-wikiEditor-InsertLink-LinkTypeField {
.oo-ui-radioOptionWidget {
display: inline-block;
margin-left: 1em;

View file

@ -28,7 +28,7 @@ function TitleInputField() {
var config = {
align: 'top',
label: mw.msg( 'wikieditor-toolbar-tool-link-int-target' ),
classes: [ 'ext-WikiEditor-InsertLink-TitleInputField' ]
classes: [ 'mw-wikiEditor-InsertLink-TitleInputField' ]
};
TitleInputField.super.call( this, input, config );
}
@ -113,7 +113,11 @@ TitleInputField.prototype.onChange = function ( value ) {
*/
TitleInputField.prototype.validate = function ( value ) {
if ( this.urlMode === LinkTypeField.static.LINK_MODE_INTERNAL && value !== '' && !mw.Title.newFromText( value ) ) {
this.setMessage( 'error', mw.message( 'wikieditor-toolbar-tool-link-int-target-status-invalid' ).parse(), 'error' );
this.setMessage(
'error',
mw.message( 'wikieditor-toolbar-tool-link-int-target-status-invalid' ).parse(),
'error'
);
this.emit( 'invalid' );
} else {
// Remove message; it'll be re-added if required (after selection or blur).
@ -129,13 +133,25 @@ TitleInputField.prototype.onSelect = function ( item ) {
if ( this.urlMode === LinkTypeField.static.LINK_MODE_EXTERNAL ||
( !this.urlModeManual && this.urlMode === LinkTypeField.static.LINK_MODE_INTERNAL && item.isExternal() )
) {
this.setMessage( 'linkExternal', mw.message( 'wikieditor-toolbar-tool-link-int-target-status-external' ).parse() );
this.setMessage(
'linkExternal',
mw.message( 'wikieditor-toolbar-tool-link-int-target-status-external' ).parse()
);
} else if ( item.isDisambiguation() ) {
this.setMessage( 'articleDisambiguation', mw.message( 'wikieditor-toolbar-tool-link-int-target-status-disambig' ).parse() );
this.setMessage(
'articleDisambiguation',
mw.message( 'wikieditor-toolbar-tool-link-int-target-status-disambig' ).parse()
);
} else if ( !item.isMissing() && !item.isExternal() ) {
this.setMessage( 'article', mw.message( 'wikieditor-toolbar-tool-link-int-target-status-exists' ).parse() );
this.setMessage(
'article',
mw.message( 'wikieditor-toolbar-tool-link-int-target-status-exists' ).parse()
);
} else {
this.setMessage( 'articleNotFound', mw.message( 'wikieditor-toolbar-tool-link-int-target-status-notexists' ).parse() );
this.setMessage(
'articleNotFound',
mw.message( 'wikieditor-toolbar-tool-link-int-target-status-notexists' ).parse()
);
}
};

View file

@ -1,6 +1,6 @@
@import 'mediawiki.ui/variables.less';
.ext-WikiEditor-InsertLink-TitleInputField .oo-ui-messageWidget {
.mw-wikiEditor-InsertLink-TitleInputField .oo-ui-messageWidget {
color: @color-base--subtle;
font-weight: normal;
}

View file

@ -1,39 +0,0 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>WikiEditor</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
font-family: monospace;
font-size: 9.5pt;
line-height: 1.5em;
overflow-x: auto; /* Use horizontal scroller if needed; for Firefox 2, not needed in Firefox 3 */
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
body.pasting {
white-space: normal;
}
p {
margin: 0;
padding: 0;
}
/* General WikiEditor stuff */
.wikiEditor-nodisplay {
display: none !important;
}
.wikiEditor-tab {
padding-left: 4em;
}
</style>
</head>
<body></body>
</html>