Commit graph

5241 commits

Author SHA1 Message Date
jenkins-bot 7b5af5bc79 Merge "Make ButtonWidgets more accessible" 2013-07-24 14:40:36 +00:00
jenkins-bot 9e8ce997db Merge "Show error when trying to save in read-only mode" 2013-07-24 14:35:52 +00:00
Ed Sanders 049bbf7b73 Make ButtonWidgets more accessible
* Give them a role=button, and a default tabIndex of 0
* Listen for a keypress of 'space' and emit a click event
  (you'd have thought role=button would do this, but oh well)

Bug: 50047
Change-Id: I429ad165c95f34d26975daf81db18cc966802cde
2013-07-24 14:34:06 +00:00
jenkins-bot 859ed359e4 Merge "Replace "Edit source" by "{{int:visualeditor-ca-editsource}}"" 2013-07-24 14:34:05 +00:00
jenkins-bot 10e21e4742 Merge "Show newarticletext(anon) when creating a new page" 2013-07-24 14:33:20 +00:00
Ed Sanders 7557dd39ed Show error when trying to save in read-only mode
We already correctly show the read only error if the user tries
to load VE which the database is locked, but if the database gets
locked after they've loaded VE, we also need to show the error
when they try to save.

Bug: 51636
Change-Id: I7a56f1b4387e7ea594a2a7f939c81626c9eee834
2013-07-24 14:33:10 +00:00
jenkins-bot a720d720b7 Merge "Set 'notminor' if minor edit box not checked" 2013-07-24 14:31:26 +00:00
jenkins-bot 12b250a929 Merge "Handle meta-only transclusions as meta items" 2013-07-24 14:29:21 +00:00
Ed Sanders cdfed7039f Handle meta-only transclusions as meta items
To achieve this we need to evaluate the DOM contents of
transclusion nodes to see if it consists solely of meta items
and whitespace.

To check for meta items we do a model registry match, but with an
additional parameter to exclude mwTransclusion types as a possible
result (as the first item may be a meta tag, but with a mw:Transclusion
typeof attribute).

Bug: 51322
Change-Id: I89a220350fb7e10e15f3682d21438539196a5846
2013-07-24 14:27:24 +00:00
Ed Sanders 78ec5e84d9 Set 'notminor' if minor edit box not checked
In order to properly override the minor-edit-by-default setting
if it is used.

Bug: 51515
Change-Id: Ic49d47971a795c7efd860a962cfe13b89d2bb95a
2013-07-24 15:07:05 +01:00
Ed Sanders 3f3e0c0721 Split continued link annotations on wordbreaks
For now this approach is bit of a hack and will hopefully
be replaced with an ability to cursor either side of an
annotation.

Bug: 51463
Change-Id: I701e3d26e06a28fed2d4950b1d418eda80a1fac5
2013-07-24 11:50:26 +01:00
Ed Sanders 67dbf621b6 Show newarticletext(anon) when creating a new page
Bug: 51459
Change-Id: Id8509c6c8b92a0355b97d7661affe749fcdfdcba
2013-07-24 10:43:21 +01:00
Yuki Shira 8ed6dfa542 Replace "Edit source" by "{{int:visualeditor-ca-editsource}}"
Spotted by Siddhartha_Ghai
http://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Visualeditor-beta-warning/hi

Change-Id: I50e3b9c33c71056158b947cd69579411776888b5
2013-07-24 17:18:17 +09:00
Roan Kattouw 393807462e Render check boxes from EditPage
EditPage has a lovely getCheckboxes() function which includes the
minor and watch checkboxes as rendered by MW core, as well as any
checkboxes extensions like FlaggedRevs might have added. Output
these in the API, render them, and send their values back.

ApiVisualEditor.php:
* Build a fake EditPage, get its checkboxes, and return them

ApiVisualEditorEdit.php:
* Pass through posted request data to ApiEdit, which passes it
  through to EditPage thanks to Idab5b524b0e3 in core

ve.init.mw.ViewPageTarget.js:
* Remove minor and watch checkboxes from the save dialog template
  and replace them with a generic checkbox container
* Have getSaveOptions() pull the state of all checkboxes in
** Special-case minor and watch, and pass the rest straight through
** Move normalization from true/false to presence/absence here, from
   ve.init.mw.Target.prototype.save(), because here we know which ones
   are checkboxes and we don't know that in save() without
   special-casing
* Remove getSaveDialogHtml(), we don't need to hide checkboxes based on
  rights anymore because in that case the API just won't send them to us.
** Moved logic for checking the watch checkbox down to where the same
   logic for the minor checkbox already is
* Unwrap getSaveDialogHtml() in setupSaveDialog()
* Access minor and watch by their new IDs throughout

ve.init.mw.Target.js:
* Get and store checkboxes from the API
* Pass all keys straight through to the API

Bug: 49699
Change-Id: I09d02a42b05146bc9b7080ab38338ae869bf15e3
2013-07-24 00:02:14 -07:00
jenkins-bot fd2fa931cb Merge "Hide contentSub completely" 2013-07-24 05:03:36 +00:00
Roan Kattouw 74e6b716a5 Hide contentSub completely
Previously it was faded out to 60%. contentSub contains FlaggedRevs
stuff we don't want around in the editor, and contains the revision
navigation when editing an oldid, which James decided also shouldn't
be visible when editing.

Change-Id: Icdef98f756ce92a32d276d6eeb22c9de04640d8b
2013-07-23 22:00:48 -07:00
jenkins-bot 71953d7ca6 Merge "Set target=_blank for links in the edit notices" 2013-07-24 04:49:55 +00:00
jenkins-bot 8b201c7dc4 Merge "Quickfix for Transclusion icon in RTL wikis" 2013-07-24 03:45:01 +00:00
Moriel Schottlender 5bb15c4332 Quickfix for Transclusion icon in RTL wikis
Added GUI-level and Page-level "getDir()" methods to get the direction
of the GUI and Page respectively in the ve.ui.Surface and ve.ce.Surface
respectively.

The correction to the direction-test condition in ve.ui.Context reflects
the new method of getting these directions, and fixes the problem with
the transclusion icon. The icon position depends on the wiki/page-level
directionality, regardless of the GUI-level direction.

Bug: 51819
Change-Id: I36cef115017542c461e6d757f1c8bfda92074607
2013-07-23 20:31:08 -07:00
jenkins-bot 292981746c Merge "Add bold/italic for cyrillic/georgian languages" 2013-07-24 02:24:56 +00:00
jenkins-bot 8b493a7e02 Merge "Add bold/italic for more latin langages" 2013-07-24 02:23:38 +00:00
James D. Forrester 0536d22370 Create temporary preference to disable VisualEditor during beta
This preference will allow users to opt-out of VisualEditor during the beta
if they so choose. We do not re-use the alpha enablement flag because (a) this
would lead to a confusing preference description, and (b) because opting in
and then out of the alpha is not the same user choice as opting out of the
beta period.

Change-Id: I0f0a1b5eb21703ad422d007cab65c75ac1aa6fd8
2013-07-24 01:59:47 +00:00
Roan Kattouw 64442148bf Set target=_blank for links in the edit notices
Change-Id: I63bbf557fa94cda7435614ba7d743e22a148fdce
2013-07-23 18:19:45 -07:00
jenkins-bot 890c14009e Merge "Image insertion alignment fix" 2013-07-24 00:27:20 +00:00
Moriel Schottlender 96fa010f58 Image insertion alignment fix
This removes the initial alignment (either left or right) from new
inserted images, letting the wiki decide the default positioning.
Also, it makes sure that VisualEditor positions the image properly
(according to wiki defaults tright/tleft for ltr/rtl) when editing.

Bug: 51851
Change-Id: I25b966cf6f2736437509ea7e70bfda1bdbc79021
2013-07-23 20:22:43 -04:00
jenkins-bot 6ca420ab60 Merge "Prepend section title to edit summary" 2013-07-23 23:02:15 +00:00
jenkins-bot 598b975171 Merge "RTL Fix for Category & Suggestion Popups" 2013-07-23 22:44:56 +00:00
Moriel Schottlender 12372b41c9 RTL Fix for Category & Suggestion Popups
Flipped the generated positions of the MWCategoryPopupWidget and the
suggestion popup in the TextInputMenuWidget. The RTL position within
TextInputMenuWidget is only adjusted if the popup appears inside another
frame. This fix also corrects the suggestion popup positions in general
when inside another frame.

Bug: 51490
Bug: 51828

Change-Id: I83436d50a4a0596fdae9526c3fc2804cf880a530
2013-07-23 15:43:06 -07:00
Ed Sanders 4e17496fa6 Prepend section title to edit summary
When section edit links are used.

Bug: 50872
Change-Id: I44cef7a892b4f2f22f60f8f7f531f4e9dcfe8363
2013-07-23 22:27:33 +00:00
jenkins-bot 6728b24f1c Merge "Add ve#graphemeSafeSubstring method" 2013-07-23 21:08:38 +00:00
jenkins-bot c6331c84d3 Merge "mw.ViewPageTarget.init: Move conditionals client-side" 2013-07-23 19:49:15 +00:00
jenkins-bot 2ceead1258 Merge "Ensure ve-ui-panelLayout-scrollable is actually scrollable" 2013-07-23 18:57:41 +00:00
Translation updater bot d2307b86f1 Localisation updates from http://translatewiki.net.
Change-Id: I5ae55bd0eebf9cb3ed07bb715d8d11de92cfb070
2013-07-23 18:45:10 +00:00
Timo Tijhof a81beef27a mw.ViewPageTarget.init: Move conditionals client-side
Load the module always and have the conditionals on the
client-side so that we can change these without running into
problems with the new conditions not being rolled-out quickly
for anonymous users because the load queue is in the HTML
and cached for 30+ days.

This also allows us to fix above problem retroactively in wmf
production by just adding a mw.loader.load for this module
in something like MediaWiki:Common.js or something else that is
already in the cached load queue (temporarily, until the cache
has rolled over).

Removed unreachable code for loading ext.visualEditor.splitTest.

Change-Id: I21114960a88d224747447f2dc83d17d160f5f066
2013-07-23 20:25:37 +02:00
jenkins-bot bf342d660c Merge changes I310e638a,I397ac16a
* changes:
  hooks: Only check relevant page title instead of both
  Don't set ignoreHidden=true when calling User::getOption
2013-07-23 18:04:06 +00:00
Ed Sanders c6c6a431d1 Add ve#graphemeSafeSubstring method
Allows us to take a substring without splitting a multibyte grapheme.

Change-Id: I811bdc7f010d10bf3c9509a73677939486751fec
2013-07-23 10:45:23 +01:00
Translation updater bot ce12fdb6eb Localisation updates from http://translatewiki.net.
Change-Id: I0e24aeda71307e8db8cf89f0fcf4bdd006b5137e
2013-07-22 20:18:18 +00:00
MatmaRex e6fd823d6f ve.ce.Surface: Prevent focus loss on the document node in Opera
Opera triggers 'blur' on the document node when clicking on any <a>
link and never trigger 'focus' until after the user blurs the document
node *again* (by clicking outside of it or pressing 'Esc').

This causes the change polling to stop (SurfaceObserver#stop is called
without a subsequent call to SurfaceObserver#start).

To avoid this let's bind a delegated 'focus' event on all <a> links
inside the document and refocus it whenever that happens.

Bug: 47793
Change-Id: I7962f59bd02e075f91e42e6514b390c0d0feb3ab
2013-07-22 21:09:52 +02:00
jenkins-bot e57d8709cf Merge "Array.prototype.splice polyfill for Opera" 2013-07-22 18:40:01 +00:00
Timo Tijhof 95f135b0c8 hooks: Only check relevant page title instead of both
The relevant page title is equal to the native page title
if we're on a regular page (e.g. both are Foo on Foo and on
Special:MovePage/Foo one is Special:MovePage and the other
Foo). In that case there is no point in checking both, especially
if it is with the OR condition.

Change-Id: I310e638a73312afea421a399ce4c6ea9b4254cbf
2013-07-22 19:50:25 +02:00
Translation updater bot 620df2c7ea Localisation updates from http://translatewiki.net.
Change-Id: Id9e57dfcbf8d78d26f1a9aeaaceafe7ca865d19b
2013-07-21 19:17:53 +00:00
Ed Sanders e7d423dd53 Add bold/italic for cyrillic/georgian languages
ru, ky, os, ka now covered

Bug: 51711
Bug: 51712
Bug: 51713
Change-Id: I07987361f18719e96f5cb1b5a2b5eb8987fbf207
2013-07-21 18:32:47 +01:00
Ed Sanders 1b5d950904 Add bold/italic for more latin langages
es, eu, fr, gl, hu, it, nl, pt(-br) all covered now.

Bug: 51702
Bug: 51703
Bug: 51704
Bug: 51705
Bug: 51706
Bug: 51707
Bug: 51709
Bug: 51710
Change-Id: Ie75cc0941245dffabf64f09d649982ba48fae340
2013-07-21 14:09:19 +01:00
Translation updater bot 89cd828d2c Localisation updates from http://translatewiki.net.
Change-Id: I51dd75f64dd4c4e52dff5b634916ca7a57bb59c2
2013-07-20 20:52:13 +00:00
MatmaRex 47edc8d7d0 Ensure ve-ui-panelLayout-scrollable is actually scrollable
Due to CSS specificity rules the styles defined for
.ve-ui-panelLayout-scrollable and .ve-ui-panelLayout-padded in
ve.ui.Layout.css were being overriden by more general rules for
.ve-ui-pagedDialog-pagesPanel .ve-ui-panelLayout in ve.ui.Dialog.css.

Bug: 51739
Change-Id: If2d5ec3168a874eb4f856450583d6c89967513df
2013-07-20 13:21:05 +02:00
Timo Tijhof 712a7e9674 Don't set ignoreHidden=true when calling User::getOption
This parameter is confusingly named, but the purpose of it is
is to undo what wgHiddenPrefs does. So instead of returning the
default value and ignoring the value previously stored in the
user's preferences, setting ignoreHidden=true would instead give
us the stored value dispite it being no longer visible on
Special:Preferences.

We also don't need to do $defaulOverride since the default (null)
is falsy already.

Change-Id: I397ac16aae4a2ed02687dff8552548c662f5d9bb
2013-07-20 03:14:18 +02:00
Translation updater bot 6b1a46d242 Localisation updates from http://translatewiki.net.
Change-Id: Ib49dd61483779454cc6dd4442c452baa533abf9d
2013-07-19 21:28:37 +00:00
jenkins-bot 47fec91adb Merge "Set Malayam to use B/I rather than A/A for toolbar icons" 2013-07-19 20:27:28 +00:00
James D. Forrester 7c477d3021 Set Malayam to use B/I rather than A/A for toolbar icons
This is how it is configured in WikiEditor; presuming that this is not
incorrect. :-)

Bug: 51314
Change-Id: If285c14d8a798c57924af04c1dabfe6cf53e018b
2013-07-19 13:19:07 -07:00
jenkins-bot 21e47c5a33 Merge changes I2edc46b6,Iea905f2b,Ia572fd06,Id81da87b,I98a7d3eb
* changes:
  Add a node class for mw:Nowiki
  Move getHashObject() from dm.Node up into dm.Model
  Allow annotations to render nothing
  Pass child DOM elements to annotations' toDomElements()
  Process annotations bottom-up rather than top-down in data->DOM
2013-07-19 19:11:38 +00:00