Aligning colors to overhauled color palette, ensuring WCAG level AA
conformance. Also removing unnecessary `xmlns:xlink` where applicable.
Bug: T160602
Change-Id: I958d1868cd5ff80226af566dfe34885f1932b16e
This was an unfinished module to enable the CodeEditor to do inline
editing of <syntaxhighlight> blocks. It was never finished and I think
that with the VE and WE 2017 work, it likely will never be finished
either. For that reason, it is better to remove it altogether.
Change-Id: I83714188a53d2ca6bb7bf0dc6d0c89b7fb45a47a
Analogous to I82d278920695be12aa80a79548abf8b8ce5445fd, make sure that
we can lazy load any language that Ace supports. Not because we need
it, but because it's the nicer way to do it.
Change-Id: I19b8a31041814ac1273d62a24b5ed622fd91a7a8
* Use resource loader embedding for better performance
(uses a slightly hacky method to achieve this, the only
alternative would be to fix the WikiEditor API, but that
would introduce a version dependency)
* Use SVGs from OOUI where available or create new ones where not.
These are used and available under the OOjs UI MIT licence.
* Provide PNG fallbacks using LESS mixin
* Remove unused icons
Change-Id: If38d51d24958716e2617c4cb515e7c0575cdfeba
The delayed update of the status bar fails when the CodeEditor is disabled
in the meantime.
Bug: T119869
Change-Id: I6b23148f7a3d79021b87ad5f0f537eda9b68970f
This requires jQuery >= 1.6. This is included in MediaWiki >= 1.18.
This change drops support for MediaWiki 1.17.
Change-Id: I12f3f3e22d9bc47a0a2d9a9d201af4e44012e0a2
Instead of running the jshint test through jenkins, Run it through npm
instead.
Also add composer.json for running php code sniffer and phplint instead of
running phplint through jenkins.
Also update grunt-jsonlint to 1.0.6
Change-Id: Icd9aa1b1c7213d056aa5294a804341053141b0bd
* Write error.info instead of "[object Object]" into console.
* Avoid accessing result.error when not defined.
Bug: T119809
Change-Id: I23a124cbaf8ef9376c4c6071dec4d7e846f1eabe
Updates ACE to commit:
3fb55e8e37
This includes basic scrolling support in mobiles
https://github.com/ajaxorg/ace/pull/2555
iOS 6 or later supported.
Android 4.x or later is supported.
Re enabled indent and outdent seems to work now, Ive tested it.
Bug: T119086
Bug: T69328
Change-Id: If8ecc499c281c92c53982cee281a88119a773514
This fixes a bug where the event could be triggered before the
WikiEditor context was ready. Also make sure that the fragment monitor
takes into account the possible disabled state of the CodeEditor.
Bug: T103802
Change-Id: Id5564c4a91a0a14632024781f3e57b68c4803970
* Declare event as first function parameter.
* Move event.preventDefault() to the synchronous end of the function.
Change-Id: I813355088cbf215264dcccd474e97630915d63c5
The setting of the width is not necessary and sometimes it generates
a width which is to wide.
Bug: T102736
Change-Id: I7ed715fba4d65e7a571421b7a06d604e6b0958f7
- toggle invisible characters.
- search and replace (disabled)
- indent/outdent
- line wrapping
- go to line
Icons by Connor Shea
Bug: T61923
Change-Id: I9e434d1b23f8254bc654ebbd31b5e4b70bbf5fe1
In the past I had made the annotation indicators clickable, and your
cursor will in this case navigate to the next annotation in editor.
This was not really easily discoverable, so I have added a tooltip to
make it slightly more discoverable.
I also added a CSS line to prevent users from accidently selecting the
text (or rather numbers) in this area, which I had noticed happened to
me at times when trying to click it.
Change-Id: I47ecba232ff925169d0f64d85ae34ff6564cc1a5
Depends on I30bd709d8 in mediawiki-core.
The '#wpTextbox1' gets read by textSelection( 'getContents' ).
The trigger is not necessary anymore.
Change-Id: Iae54a2422ff1814f8858723d51fcb10d04645c51
There isn't much in it yet, but it's a start.
Also needs a patch in WikiEditor, which is forcing some elements to be
visible for no apparent reason.
Change-Id: I6b57e5c11066a104a89bef3b7c8efd2129a80a8f
Split context.evt up into 2 objects
- context.fn, where WikiEditor API functions are defined
- textSelectionFn, where all textSelection API function are defined.
- scrollToTop() is moved to the WikiEditor API block
- getElementAtCursor() is removed. It is no longer in use by the
WikiEditor API or the textSelection API.
This depends on MediaWiki core change I14492572
Bug: 29328
Change-Id: I57bc7791dc61b7edcf258e6c16445d5a4a8783cf
Follows-up 86622b6.
While these functions looked like placeholders in a configuration
object to allow calling them unconditionally, they actually had
meaning. They were event overrides to prevent WikiEditor from
running its own event handlers.
They were implicitly returning false by having no return statement
(implying a 'return undefined', which casts to false).
The separate functions were already quite obfuscated as returning
false, using $.noop made it even harder to understand what's
going on.
Use an explicit return value instead.
Change-Id: I0852fbc9225d069f50085787d2d0105fd7b1743c