Replace $.escapeRE from 'jquery.mwExtension' by
mw.RegExp.escape from 'mediawiki.RegExp'.
This change requires MediaWiki 1.26+
Bug: T103993
Change-Id: I5fc19e1313fc6a06726981e0365cea6d00abb5f3
* Re adds svg images that were reverted earler for causing problems.
* Adds some missing rtl svg images.
* Fixes insert-ilink.svg that was causing it to not show in some browsers eg internet explorer.
User Perhelion Fixed the problem in insert-ilink.svg and insert-signature.svg. I just added it to button-sprite.svg.
Related less file adding svg to it is at https://gerrit.wikimedia.org/r/#/c/195529/
Bug: T37342
Change-Id: I14482c7b66901609689bf9ddb67b8d2add937612
Use mw.language.getFallbackLanguageChain() to get the
fallback language chain. This chain currently always contains 'en'
as last element. Remove the last element to prevent a fallback to 'en'.
Reimplement autoIconOrOffset to correctly prefer sprite before icon.
Bug: T87247
Change-Id: I452dd45d20ea4dd542d63274b7aad0272e20ea12
Using document.activeElement at the time of the unload
event as a proxy for whether the user is switching to VE.
Switching to VE is weighed more heavily than whether or not
the user made changes: switching to VE causes abort.type to be
'switchwithout' regardless of whether changes were made; only
if the user isn't switching to VE do we look at whether changes
were made and use 'abort' or 'nochange' as appropriate.
When wgAction === 'submit' (i.e. we're on a preview / show changes
view), it is assumed that the user has made changes.
Bug: T95938
Change-Id: Ic91b87c4fc5b601e1fd98b237100d808e97400bd
Needed because session IDs can be generated on the client
from the unload handler (when the back button is used).
Bug: T95919
Change-Id: Iac921bc36806205fc11ac76154ed8b3890f10d31
So that the ID isn't reused when the user uses the back button
to navigate back to an edit page.
It would be more natural to use pageshow for this, but that
event also fires on initial load. There is a .persisted property
that indicates whether the page was recycled, but that
property doesn't work in Chrome:
https://code.google.com/p/chromium/issues/detail?id=344507
Doing this from pagehide doesn't work either, because that
runs before unload (at least in Chrome) and causes the
abort event to be emitted with the new ID. So instead,
regenerate the ID in the unload handler after the
abort event has been sent.
Bug: T95919
Change-Id: I20a602a7896e75ffa116dcd2c137306ca84164b6
Some very weird issues going on involving multiple wikiEditor instances being
set up on the same textarea element. It's probably a race condition of some
sort and I'm hoping that restoring the modules like this will fix it.
Bug: T93384
Change-Id: I44c9c013993220ab709893d239614552d7b25d46
Seems to be causing errors on view (!) on plwiki, and I would not expect this
to work on non-wikitext pages.
Bug: T93242
Change-Id: I0336a85a2ab4bef1d20086382012047688ffa909
Also update the actual HTML with what the current parser outputs:
* width:104px -> width:102px (2px in addition to 100px image width)
* No more "title" attribute on the outer <a>.
And reduce duplication in the message:
* Re-use "thumbnail-more" message.
* Re-use "wikieditor-toolbar-help-content-file-caption" message.
Change-Id: I25f0763b2274ebdcf681c78af277a9be302350a1
If the WikiEditor is enabled for Semantic Forms Text Area Input there is
no license warning div around.
Change-Id: I8d39f8d47a73cdc2d4be198061e8f68f22c0c308
* Fix errors and warnings from phpcs.
* Add commas at end of lines for arrays in PHP.
* Add space between // and comment.
* Add space between ) and {.
* Use tabs instead of spaces for indenting.
* Break lines in PHP with more than 100 characters.
* Remove double spaces and spaces at end of line.
* Remove spaces before comma.
* Fix some typos.
Change-Id: I9c014bdfa9832fa6a20d0190fe2fc668983d0fb9
* This patch convert .css to .less
* Semantic changes are avoided, but there are minor
tweaks such as capitalization and ordering.
Change-Id: Iebff0f8e3d87bb792093a10d87f33540aca301d5
An early version of WikiEditor added a workaround for a reported
bug with IE 8 where textarea scroll and selection state was lost
when the contents were modified.
This doesn't seem to be needed on modern versions of IE such as 11
and above and the newer 'Edge' HTML engine mode in Windows 10.
Actually, I can't reproduce it in Windows 7 or XP with IE 8 either
from the original bugs, but just in case it's needed on some particular
version that we don't know about I've only added a check for modern
IEs, which is already in use on other old-IE workarounds in the
module.
Bug: T88875
Change-Id: I25b667a8d8378c417441adee5d97571c71a1c8c7
The search-replace box in WikiEditor was blacklisted entirely from
MSIE, although it appears to work fine in IE 11 on Windows 8.1
and Windows 10 Tech Preview.
IE/Spartan team specifically requested a fix for this bug; looks like
it's an easy case of adjusting the blacklist with a version component...
(Note that in RTL the dialog positioning is bad, but that affects
other WikiEditor dialogs too.)
Bug: T88875
Change-Id: I4cf1eb76cc8a788cab233fe9ed04aaeba4af5725
This changes the color of the line under the hader of the dialog boxes
from #6bc8f3 to the default #aed0ea.
This difference is nearly not recognizable and it is not worth to overwrite
the default color.
Change-Id: I88580ab74fc158ec1a498fc489fbdd9cd5ba897a
The only dialog with a table is the table creator dialog.
For this table a more specific definition exist in
jquery.wikiEditor.dialogs.config.css
These rules overwrite all here removed definitions except of
wikiEditor-toolbar-dialog table { margin-top: 0.75em; }
Without this definition the margin-top slightly increase to the
definition from .wikitable with margin-top: 1em.
Change-Id: I0aab246db05cb4330287666f6a71b56d6b88b0af
* Reflect that we're now calling mw.message( ... ).plain()
* Remove vague statement about "may eventually become a wrapper for
some kind of core MW functionality."
Change-Id: Ibe743162c1f72bb3977ec16e2ba4b023a66e3907
Use
font-family: monospace, Courier
instead of
font-family: monospace, "Courier New"
like in resources/src/mediawiki.skinning/elements.css from core.
Change-Id: I87145f8254d34b6d00d76f22c3d0819b9ea5839f
magnify-clip.png was recently removed from the core styles directory,
but the Help panel of the WikiEditor still references it by way of i18n
message: wikieditor-toolbar-help-content-file-result
Also remove unused local copy
Bug: T85920
Change-Id: Icc17092c0f854360b2f2999b8f153827bf194c0c
Instead of having this magic word in the translation message, make it a
parameter of the translation message and retrieve it from
wgWikiEditorMagicWords.
Bug: T40831
Change-Id: Id3155221aa61bc86da2d90000dedab36cbe9dd96
This patch replaces the manually operated test module for ext.wikiEditor.toolbar
with one based on QUnit. The new test suite uncovered a bug with the removeFromToolbar
API function in jquery.wikiEditor.toolbar, which prevented the removal of select buttons
from the toolbar. This issue has also been fixed in this commit. .jshintrc was updated
to ignore the new QUnit global.
Bug: T39485
Change-Id: Icef3debcffa484a8d78628bcd9da0892b750bb40
There were issues with shadows, and the sprite creating weird
offsetted buttons on Chrome.
Subsequent attempts have been incomplete at solving these, so
reverting this and hoping that the next person to attempt a conversion
to SVG is more successful.
This reverts commit e027051c58.
Bug: 35342
Change-Id: Id296899a2c3746957c17068ab17ca8266f6ff0d3
Since we now have a full fledged mobile solution, I think we should
strive to have the site 'proper' work as much on any platform as
possible.
WikiEditor traditionally was not loaded on iOS.
No one really knows why this was not loaded. It can have been bugs or
just to 'slim down'. It works on iOS 6 and iOS 7, so for that reason
I'm now changing the blacklist in this respect. It might work with
earlier versions, but I can't really test that right now.
Bug: 63277
Change-Id: I605eb0e093b84203f1157d9e20788eaa0040ddbf
jQuery's show/hide/fadeIn/fadeOut methods makes changes to the
style attributes of elements. That makes them rather hard to override
their visibility, without adding an entire API to the module to do so.
This replaces the default animations with one using classes to control
visibility and only animates the animatable properties using
the style attributes.
Follow-up to: Iadaae3fb9ae1899e12605d653b2688616b8f7c40
Change-Id: I4652ade66c6de864ee3e74b3817ed9b93967ce3d
In I0f53a68e50fc950d7f407ee81b2bf0d81ef4948d and
I47119d6cfdde4b40ff5b07be0c7d327b80598142 I forgot to remove the images
of the corresponding modules.
Change-Id: I8de59f6ce54d0cc7f67f56853386d4338c693b98
Add a new styles module. This module makes sure that the textarea is
already properly styled (jumping lineheight bug) before we start the
JS. Also hide the toolbar before it's styles have finished loading, so
you don't see it being constructed on the fly. Move inline styling for
the old toolbar into this stylesheet as well.
Bug: 47708
Change-Id: I40bec0a24dbd295db301e7faefb93d8991981acb
* Rename 'collection' to 'loadmodules'.
* Consistently close parentheses and brackets at the same
indentation level as they were opened.
* Use $.ajax directly instead of $.post, especially the fourth
argument to $.post makes it hard to read.
* Use promise interface of $.ajax and $.post instead of the
(deprecated) callback parameter.
Change-Id: I48924c9a1ce29829f8994be05c46d5563b2c25d6
Ib97f47ef1d66420682bd429c9c12e66c3392e77d Didn't cause
problems so this is now safe to reapply (to wmf2).
This reverts commit 908e7cc56c.
Change-Id: I510536959b58ff0adacd7908f6150c95bfdb3ec1
Sadly this caused bug 64289; so we're going to revert this for now;
then redeploy this and Ib97f47ef1d66420682bd429c9c12e66c3392e77d
in one of the swats next week.
This reverts commit effd98be7e.
Change-Id: Idde3e51e894f8c92f47fb06f0cf08d01e82ccb48
When we are wrapping the textarea in the Editor UI, the focus state,
cursor position and the scrollposition might get lost. This is
especially annoying on slower machines, where users might have started
using the textarea before the WikiEditor UI was constructed.
Bug: 41911
Change-Id: Ie472c6c88d98f7ba89873a2db73463ef01bd995a
We had some crazy stuff here with negative margins, border boxes and
what not. There were some problems with IE versions, zooming in and out
in pages and with the side by side preview.
This should take care of those. Mostly it moves the borders inside the
elements that are 100%. This was also required because of the
side-by-side preview which was using a dirty trick to hide the border at
the top
Bug: 26828
Change-Id: I3c3466fac53df3e79de6f12f404005e55409fa7c
This makes sure that on narrow page views, it's contents won't bleed
into the textarea.
Bug: 37392
Change-Id: Ia14b354a5a2de049d219e735795a9bd9f558f660
because apparently we do have empty tools boxes. Alternative
implementation in I4652ade66c6de864ee3e74b3817ed9b93967ce3d
This reverts commit dd46fc383b.
Change-Id: I358c34d63261989d49b0a4156cbc05b544727d5c