Commit graph

717 commits

Author SHA1 Message Date
Derk-Jan Hartman 2d4810f186 Add setContents to textSelection impl of CodeEditor
Change-Id: I0a5434b9d40d8945b6b801e2aa2b4b23466ea71c
2014-11-29 20:10:44 +01:00
Translation updater bot 6a0dca2492 Localisation updates from https://translatewiki.net.
Change-Id: Ie04afb394a1d6940e142f2d6eda39185f476027d
2014-11-26 22:29:19 +01:00
Translation updater bot 3423dcccca Localisation updates from https://translatewiki.net.
Change-Id: I9fc3bc49e8db3879cc2376d440f75a303d39c44f
2014-11-23 22:39:41 +01:00
Translation updater bot 8f9078397c Localisation updates from https://translatewiki.net.
Change-Id: I0f275e428c542a4f63c8f43bacde04b220e074db
2014-11-21 22:07:08 +01:00
jenkins-bot 8d45645cdc Merge "Disable CodeEditor on mobile" 2014-10-31 17:28:35 +00:00
Florianschmidtwelzow 64b286d04e Remove whitespace at the end of lines
Change-Id: Icccee7461ecff22cbc5076df9f3803b6c2e29f28
2014-10-29 18:23:00 +01:00
Derk-Jan Hartman c91e62b74f Improve the CodeEditor toolbar
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
2014-10-26 18:09:26 +00:00
Derk-Jan Hartman 37228b2578 Split jquery.textSelection and WikiEditor api overrides
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
2014-10-16 21:18:15 +02:00
Timo Tijhof 72f3c78381 Use returnFalse instead of jQuery.noop
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
2014-10-16 20:37:18 +02:00
Fomafix 86622b63fb Use jQuery.noop
This avoids the definition of several empty functions.

Change-Id: Ic6fe5c46e1ed90217c1935dd0a87c6b97a0ad513
2014-10-16 19:25:17 +02:00
jenkins-bot aefe1def47 Merge "Use mediawiki.api.parse" 2014-10-16 17:16:42 +00:00
jenkins-bot 18423323d2 Merge "Apply coding conventions for JavaScript" 2014-10-16 17:16:41 +00:00
Fomafix d3e3a9796e Use mediawiki.api.parse
Change-Id: I9106245c6c0ee98093155c8b9a8f92b270bde063
2014-10-10 13:31:02 +00:00
Fomafix 3b30aaf78a Apply coding conventions for JavaScript
* Fix closure invocation
* Avoid global variablesin closure
* Avoid unused variable
* Fix whitespaces

Change-Id: I67552a67e8ab493e5af8717c11668430886ee468
2014-10-10 13:24:22 +00:00
Fomafix 9e2d2c842a Apply coding convections for JavaScript
* Reorder functions to avoid forward references
* Remove unused variables saved and summary
* Fix whitespaces
* Avoid else after return
* Combine var blocks

Change-Id: I2a66645c24b9cce287c4196f2c4a762420ad80a0
2014-10-10 11:58:58 +00:00
Kunal Mehta 6e59232eeb Use CodeEditor for JSON pages
Change-Id: I5395fa847944640bc9ae59f269bfe4e156885e5d
2014-10-07 12:57:03 -07:00
Translation updater bot a3db72d1b3 Localisation updates from https://translatewiki.net.
Change-Id: I825d505481907de9ef88d0c17b9c54a202e76201
2014-09-13 00:45:19 +02:00
Translation updater bot 3cc158aff1 Localisation updates from https://translatewiki.net.
Change-Id: Ib233ba817e29d09fb2f410b726ce4ddfc3f2ec1e
2014-08-31 21:52:47 +02:00
Derk-Jan Hartman 7bfd574cbe CodeEditor: Keep experimental Geshi editor working
Still experimental, not really functional, but this fixes it to at
least run again.

Change-Id: Ia71aa9421179654a063c706e0cbf3016a2fcc280
2014-08-28 19:41:19 +00:00
Translation updater bot b7413b5ff8 Localisation updates from https://translatewiki.net.
Change-Id: I2b18a648b6efca72e0430e3061922a0cfd02736d
2014-08-23 21:51:54 +02:00
Translation updater bot a65e1cb369 Localisation updates from https://translatewiki.net.
Change-Id: I71a0022f9244573bec060226e1e382f2616c361a
2014-08-18 22:37:25 +02:00
Derk-Jan Hartman 4aa22a1df1 Undefined function mw.log.error
Bug: 68557
Change-Id: Ib9e8b291711f3d582ab70cab25ace6f61500f5af
2014-08-14 22:18:02 +02:00
Translation updater bot 47602ccad1 Localisation updates from https://translatewiki.net.
Change-Id: I0cd8543bd12d8fb955548bc6bdce2bc9f5a79ffe
2014-08-09 19:52:23 +02:00
Translation updater bot ad908b2da6 Localisation updates from https://translatewiki.net.
Change-Id: I7eb34f726393cf64a8b9fc8d9985cf80345a9fef
2014-07-27 22:17:36 +02:00
Translation updater bot 56b9e4c350 Localisation updates from https://translatewiki.net.
Change-Id: I8aa2a609abba67043bf296a595c7e2d53b650b01
2014-07-25 23:03:47 +02:00
Derk-Jan Hartman 853282fa34 Disable CodeEditor on mobile
Disabled on our known android/iphone/ipod UAs, because of Bug 55345.

Change-Id: I8c5377889c349df14d43803fecaab09d7554e97a
2014-07-14 12:18:35 +02:00
Derk-Jan Hartman c949981553 Allow on the fly loading of language modes
Change-Id: Ie04138677dead4c23b1bcfef4e1f7a2cd6e8826e
2014-07-10 16:47:42 +02:00
Translation updater bot 0e1ed1f8ce Localisation updates from https://translatewiki.net.
Change-Id: I988f54f18c664236d63357383f66f78f5a82f6e9
2014-07-08 20:59:55 +00:00
Translation updater bot e444e66a74 Localisation updates from https://translatewiki.net.
Change-Id: Iabc5d9b082b07c9afa0e1dc18d40d90bea1e73c8
2014-06-13 20:48:29 +00:00
Translation updater bot 3f1b08b37c Localisation updates from https://translatewiki.net.
Change-Id: I77293d4f251f8c158d9639c9427e04778f98117e
2014-06-03 19:50:01 +00:00
Translation updater bot 9d74f1fa32 Localisation updates from https://translatewiki.net.
Change-Id: I3c0535406a1e248d426692103a2f3b8652bed8fa
2014-06-01 19:39:50 +00:00
Translation updater bot a15ace2936 Localisation updates from https://translatewiki.net.
Change-Id: I046360cf016bcddd3c5f49943fa08b007de6aaf2
2014-05-25 19:35:13 +00:00
Translation updater bot 96cfea0fdd Localisation updates from https://translatewiki.net.
Change-Id: Ia87a402a0451b8e37c6ab3fbef7a459a7f8cd7cd
2014-05-24 15:19:15 +00:00
jenkins-bot d1c3f04a7a Merge "Clear the statusbar if no annotations are left" 2014-05-09 09:18:11 +00:00
Derk-Jan Hartman 96f421386f Clear the statusbar if no annotations are left
Bug: 64758
Change-Id: Id2a26742420d03242265e537dc5404707c4bf714
2014-05-09 09:17:59 +00:00
Translation updater bot 91461650f2 Localisation updates from https://translatewiki.net.
Change-Id: Ia172b89a63ded63d3d69530f34e0d5182aa59629
2014-05-07 19:58:04 +00:00
Derk-Jan Hartman 1373c915df CodeEditor: Add basic code completion and snippet support
Bug: 48828
Change-Id: If7d165fc849ca9687dd7d511b0d111b9969fb2a7
2014-05-06 22:55:16 +02:00
jenkins-bot 26973c1fa9 Merge "Persistent disabling of CodeEditor" 2014-05-06 17:39:33 +00:00
Derk-Jan Hartman 0c172d6359 Persistent disabling of CodeEditor
This makes it so that if you do not have WikiEditor enabled, you also
will not have CodeEditor enabled. In the feedback we have seen so far,
this seems to be desirable for those users (bug 55936).

Also people were not able with the cookie pref for the editor, because
it can easily expire. This introduces a hidden pref, controlled by the
enable/disable CodeEditor button, to preserve this value instead (bug
46779).

It also gives a more reliable way to detect if the editor is enabled or
disabled. mw.user.options.get( 'usebetatoolbar' ) and
mw.user.options.get( 'usecodeeditor' ) combined should be able to convey
this information to something like WikEd (bug 62250).

Bug: 46779
Bug: 62250
Bug: 55936
Change-Id: I4639f68c00a2b9183a6f89b5e00983c07a8592a2
2014-05-01 10:33:26 +02:00
Derk-Jan Hartman 96afba23d6 IE8: Fix line endings in CodeEditor
IE8 uses innerText, which is a bit more sloppy with line ending
preservation than other browsers are. Instead of copying the value into
the DOM and have the Editor pick it up during init, just set it directly
on the EditSession. Should even be faster.

Bug: 64559
Change-Id: Iafbb07afb6d06ed94057f8ddf8b080fd136d7fb3
2014-04-30 14:26:53 +02:00
Derk-Jan Hartman 0154e0d0e8 Fix trailing comma
Also applied upstream at https://github.com/ajaxorg/ace/pull/1938

Bug: 64559
Change-Id: Ieb55819b634c14335806bd7ce3e6c1f063a346cc
2014-04-29 20:51:51 +02:00
jenkins-bot 8da019fe29 Merge "CodeEditor: Disable in IE7, too unstable." 2014-04-29 17:48:24 +00:00
Derk-Jan Hartman a99f5c824c CodeEditor: Disable in IE7, too unstable.
Bug: 64559
Change-Id: I59a8cebf1d1c7f3e839295d8a85739d9c2dc2683
2014-04-29 14:35:02 +02:00
Derk-Jan Hartman 7847555702 Update Ace to 29-04-2014
Updates ACE to commit: 4949e18f00e4dbf34fc8a213909ef6ae3e1a1015

This includes fixes for IE7/8 support, which was broken in the last ACE
release. Specifically
051128c16f (diff-502b909e9de186749df3051f8d4bfa42L137)

Bug: 64559
Change-Id: I0765c5f95de81a5ce9632f6eb5422b98c02941ff
2014-04-29 11:03:14 +02:00
jenkins-bot 0343d914c3 Merge "Add a status bar to the CodeEditor" 2014-04-22 17:37:11 +00:00
Translation updater bot cc19d3b989 Update i18n shim
A performance issue was fixed in the shim(s) generated by
generateJsonI18n.php, so it needed to be updated.

Change-Id: I964d5aa94d17417b1907144543591df9a7052401
2014-04-22 13:14:08 +00:00
Translation updater bot 1af1ad0edd Localisation updates from https://translatewiki.net.
Change-Id: I034c015ca9eebf4aeaa2354b07fcf9aa094ccb9a
2014-04-20 20:03:34 +00:00
Translation updater bot fdac02596a Localisation updates from https://translatewiki.net.
Change-Id: I412455732d324d516115dd435fb972ca46e78027
2014-04-18 19:34:38 +00:00
jenkins-bot 411ca4eaf1 Merge "Allow the CodeEditor in read only mode" 2014-04-17 03:21:21 +00:00
Derk-Jan Hartman 0759a6de4f Allow the CodeEditor in read only mode
Depends on: I6885d617e18562acf0331e8db5790b53b489dbc2
Bug: 45258
Change-Id: Ie69e9c33bc307ec34abb7dcf3f427cfbe407fde3
2014-04-16 23:54:01 +02:00