mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-24 00:06:49 +00:00
Remove out of date invalid link alert
The alert text is now added as a red message under the form field for the link target text, and there's no need to have an additional alert because the dialog's insert-link button can't be clicked while there's an invalid internal link anyway. Bug: T298596 Change-Id: Ib536b51baae24a6cfe7a7426d039fdf11c4cb150
This commit is contained in:
parent
8e05e5d8d0
commit
5c9d867847
|
@ -176,15 +176,6 @@
|
|||
}
|
||||
var insertText = '';
|
||||
if ( insertLinkLinkTypeField.isInternal() ) {
|
||||
// FIXME: Exactly how fragile is this?
|
||||
// eslint-disable-next-line no-jquery/no-sizzle
|
||||
if ( $( '#wikieditor-toolbar-link-int-target-status-invalid' ).is( ':visible' ) ) {
|
||||
// Refuse to add links to invalid titles
|
||||
// eslint-disable-next-line no-alert
|
||||
alert( mw.msg( 'wikieditor-toolbar-tool-link-int-invalid' ) );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( target === text || !text.length ) {
|
||||
insertText = '[[' + target + ']]';
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue