mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-14 19:31:55 +00:00
Merge "Remove unused jquery.wikiEditor.html file"
This commit is contained in:
commit
5f13929858
|
@ -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 );
|
||||
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.ext-WikiEditor-InsertLink-LinkTypeField {
|
||||
.mw-wikiEditor-InsertLink-LinkTypeField {
|
||||
.oo-ui-radioOptionWidget {
|
||||
display: inline-block;
|
||||
margin-left: 1em;
|
||||
|
|
|
@ -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()
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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>
|
Loading…
Reference in a new issue