When closing the alert that appears when a link looks like an
internal URL, the link target text was changed but the radio
button was not. This patch rectifies this.
Bug: T295517
Change-Id: Ie0339f3aac8ccfd118c604602ce638539ff67e03
When the insert-link dialog is opened, a change event is manually
fired in order to get the system in sync. This is not optimum,
but until we refactor jquery.wikiEditor.dialogs.config.js it's
a simple way to do it.
The issue was that this manual event was being given an empty string
as the title value, but it should've been the actual current field
value. The reason it's not the same is that when the dialog is
closed with the cancel button, the state of all the fields is not
reset (this is a long-standing design feature of the dialog).
Bug: T293167
Change-Id: I8e2a0a5169b5d2a6d706623dc0c879469acd9afa
Also capitalize them and don't keep them in an array.
The data values for the radio buttons are also removed, because
they're not used for anything.
This is a follow-up to Ie40e8bdebe6f1330fc75ea1861f120e51ad58224.
Bug: T293168
Change-Id: I2f6de07f6f82e9e59ab67c771fcd60a68ad577dc
* When the link target text is changed, only change the URL mode if the user
hasn't explicitely set the type (internal/external).
* Improve the conditions for the display of the 'external' and 'exists'
link-target messages.
* Validate the link target (i.e. show messages) not only when the text is
changed but also when the target type radio is changed.
* Rename the TitleInputWidget.isExternalLink() method to
looksLikeExternalLink(), to make its purpose clearer.
Bug: T293168
Change-Id: Ie40e8bdebe6f1330fc75ea1861f120e51ad58224
Add a new top-level section to the right side of the toolbar,
containing a single (empty) 'default' group.
Bug: T296447
Change-Id: If88789f20420f02c729122392e16509bbc5ae7d0
Set the opening state of the insertion button (in the insert-link
dialog) to disabled, and also disable it whenever the target field
is empty. This makes it unneccessary to show an alert when trying
to insert a blank target so that code is removed.
Bug: T293167
Change-Id: I3541f438fad9b7e0bf23ead2f2e164e84565d254
The static function WikiEditorHooks::editPageShowEditFormInitial is
kept for compatibility because there are usages in other extensions.
Change-Id: I7ba9f56fd3d00d575696f00f9f1c868fa7ad223b
ConfirmEdit should be added as a phan dependency, so thing like this no
longer happen in the future.
Bug: T296287
Change-Id: Ic9942b3a6d872c0d3c0e3a53d9462df6f82b06c6
This isn't strictly WikiEditor business, but other logging is done
here, and soon real-time previewing will be built in WikiEditor,
so it makes sense to keep all the logging for the different types
of preview together.
Bug: T290521
Change-Id: If42697e43c1bec95d743244d0acf96c47df8b681