Commit graph

5161 commits

Author SHA1 Message Date
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
jenkins-bot 97bb435a1c Merge "mw.ViewPageTarget.init: Expose support.visualEditor" 2013-07-19 18:52:12 +00:00
jenkins-bot 41ff03c98a Merge "Math Node UI (Bug Fix)" 2013-07-19 17:14:58 +00:00
jiabao 8eadcb0a26 Math Node UI (Bug Fix)
Fixed two bugs found after merging:

1. Opened the Math node inspector without editing
anything, then clicked somewhere else on the page,
it crashed.

2. Similarly, opened the Math node inspector
without editing anything, then clicked the
"Cancel" button to cancel the edit, it crashed.

Both of these problems are fixed by this patch.
The issue was with using the getFocusedNode() in
the inspector onClose function to save changes.

Also, I included some minor changes relating to
the last code review. =D

Change-Id: I6e200f2a228b71dc5af5aa9843c461f43b926f8d
2013-07-20 01:42:08 +10:00
Timo Tijhof 61a1e8c738 mw.ViewPageTarget.init: Expose support.visualEditor
Refactor a few things to make it easier for scripts to see
not just whether mw.libs.ve is present but also whether it
allows the user to activate VisualEditor.

Change-Id: I50da8d9a260207d4ec1c43254dfe738f91386a9e
2013-07-19 03:56:25 +02:00
jenkins-bot 0edd857dfd Merge "De-alienate <code>foo</code> blocks (code element)" 2013-07-19 00:51:19 +00:00
James D. Forrester 79aff53400 De-alienate <code>foo</code> blocks (code element)
Adding the <code> element as a matched text style annotation, plus some
tests (for all the other un-tested text styles as well, whilst I'm at
it).

We'll need an icon, a button and a way of the buttons not forever
extending the length of the toolbar to properly edit <code> spans, but
this is a start.

Bonus: unit test coverage for all TextStyleAnnotations

Bug: 51590
Change-Id: I5438bcf2ec6eeb2e50400f8013964f91c33ce455
2013-07-19 00:48:46 +00:00
James D. Forrester 8c88e84be3 Maths icon for inspector menu as well as inspector itself
As not done by 992cb43de5 (whoops).

Change-Id: I29e9452e8bc85ec256f46ddfa4f5000f5fcd2ba4
2013-07-18 17:28:39 -07:00
jenkins-bot 13f2450e18 Merge "Now we have a maths icon, let's use it" 2013-07-18 23:21:35 +00:00
James D. Forrester 992cb43de5 Now we have a maths icon, let's use it
Change-Id: I057f74975c0cb61bee54733fd4153ab0f75416d5
2013-07-18 15:48:21 -07:00
jenkins-bot a2ea33fb95 Merge "Handle backspace correctly when in a slugs" 2013-07-18 22:20:05 +00:00
jenkins-bot f37e0c7359 Merge "Use ve.ui.SurfaceWidget for image captions" 2013-07-18 21:41:18 +00:00
jenkins-bot 9feb71ff4b Merge "Reference dialog commingling" 2013-07-18 21:39:20 +00:00
Trevor Parscal dc606823e2 Use ve.ui.SurfaceWidget for image captions
Objectives:

* Make use of the new ve.ui.SurfaceWidget.js for image caption editing

Changes:

ve.ui.MWDialog.css
* Remove styles that are no longer needed
** -body class isn't needed if you contain the content in a layout and
   configure it to be padded
** Toolbar styles are now part of surface widget

ve.ui.MWMediaEditDialog.js
* Wrap caption fieldset in an editPanel (also nice because we may merge
  this dialog with MediaInsert and use a stack panel layout in the future
* Replace surface and toolbar with surface widget which manages both

Change-Id: I1b7e0e2ec1cfa30879360a7ebde2b0f35d26aca5
2013-07-18 21:35:22 +00:00
Trevor Parscal 61ba07d409 Reference dialog commingling
Objectives:

* Merge reference insert and edit dialogs
* Change workflow to put editing/creating a new reference first
* Add secondary page in dialog for selecting an existing reference

Changes:

*.php
* Cleanup unused files/messages

ve.ui.Dialog.css
* In the footer; make primary, constructive and destructive buttons
  appear on the right; all others on the left

ve.ui.MWReferenceSearchWidget.js
* Fix documentation
* Remove create option and reuse section header items

ve.ui.MWReferenceInsertButtonTool.js,
ve.ui.MWReferenceEditButtonTool.js,
ve.ui.MWReferenceButtonTool.js
* Merge reference button tools

ve.ui.MWDialog.css
* Remove body styles, use padded option of layout instead
* Update selectors as per merging of dialogs

ve.ui.MWReferenceInsertDialog.js
ve.ui.MWReferenceEditDialog.js
ve.ui.MWReferenceDialog.js
* Merge reference dialogs
* Add buttons to switch between edit and select mode

ve.init.mw.ViewPageTarget.js
* Update reference button name as per merging of tools

ve.ui.SurfaceWidget.js
* New widget!
* Encapsulates a "sub-surface"

Bug: 51152
Bug: 50458
Change-Id: I8265febf4fd8f64d2ac40470ff033bac68b24d99
2013-07-18 14:14:14 -07:00
Translation updater bot 487a815d97 Localisation updates from http://translatewiki.net.
Change-Id: Ic2eea58a2cc5f5acb1d61b3401bb47bbc3e51379
2013-07-18 19:51:08 +00:00
jenkins-bot af16cbab52 Merge "Math(s) icon" 2013-07-18 19:01:00 +00:00
Ed Sanders 9c8409a987 Math(s) icon
Change-Id: Iaf5766d2d7751fdaf34161276b7ecf4f73456d91
2013-07-18 11:58:58 -07:00
jenkins-bot 565cb99e23 Merge "Update static loaders" 2013-07-18 16:40:10 +00:00
jenkins-bot 458c8757db Merge "Fix ordering of store items in converter tests" 2013-07-18 16:38:55 +00:00
Ed Sanders c414147b5a Handle backspace correctly when in a slugs
We need to detect if the endNode we are trying to move is
inside our original delete selection, and not perform the
move if it is.

Bug: 50076
Change-Id: Ib89706c8717d13829bf89e44c4fb39e16a00821e
2013-07-18 12:33:42 +01:00
Timo Tijhof 1c97668377 Update static loaders
Ran makeStaticLoader.php:
- Synced mis-match of css in demos.
- Added missing experimental.
  We originally had experimental in static. They were removed
  because the section became empty (not because we no longer
  wanted them in static loader). If we don't want them here, we
  should remove the entry from makeStaticLoader.php.

Change-Id: I275133d1cfebf174e54bf1b8f44465495949991a
2013-07-18 04:19:42 +02:00
Trevor Parscal 51ecf6d096 Fix for scrollable panels
Fixes mistake made in I50e996b9d2fde361238cde75e09baa5872e12223 which made scrollable panels not be, well scrollable.

Change-Id: I0ec59a1b76acf047b1a4d6de426a0ddb554a3e42
2013-07-17 17:17:01 -07:00
jenkins-bot d45ce7158a Merge "Default $wgVisualEditorNamespaces to $wgContentNamespaces" 2013-07-17 19:49:55 +00:00
jenkins-bot 47df9182ba Merge "Add padded option to layouts" 2013-07-17 19:37:25 +00:00
Translation updater bot ded706eee3 Merge "Localisation updates from http://translatewiki.net." 2013-07-17 19:29:44 +00:00
Translation updater bot addd3b63c1 Localisation updates from http://translatewiki.net.
Change-Id: I249b4aa4e5060e193201c5664c231243097794fe
2013-07-17 19:28:27 +00:00
Trevor Parscal ef262dc241 Add padded option to layouts
Objectives:

* Add option to layouts to control whether it's padded or not
* Rename "scroll" option to "scrollable" to better fit with it's boolean value

Changes:

ve.ui.Layout.css
* Add styles for scrollable and padded options

ve.ui.StackPanelLayout.js, ve.ui.PagedDialog.js, ve.ui.ReferenceListDialog.js
* Update use of scroll option

ve.ui.PanelLayout.js
* Add padded option
* Rename scroll option to scrollable
* Switch to using a class for scrollable option, rather than hardcoding CSS properties

Change-Id: I50e996b9d2fde361238cde75e09baa5872e12223
2013-07-17 19:10:44 +00:00
Trevor Parscal 3da34d7107 Fix getAnnotationIndexesFromOffset for last offset in doc
If the element is undefined, it would stand to reason that there are no annotations there.

Just sayin'.

Change-Id: I2b66e7adc2b3af19df1a3f490ab479627807636e
2013-07-17 19:10:38 +00:00
Timo Tijhof 553102644f mw.ViewPageTarget: Show AbuseFilter warning in save dialog
Misc:
* Updated signature of #showMessage to include allowing
  an array of nodes to be passed. We pass this to jQuery#append
  so we're just extending the explicitly documented subset of
  things it could already do due to passing to jQuery#append.

Bug: 50472
Change-Id: I3f56820a4f14b0684bfa265e3eb5e3820f2a3513
2013-07-17 17:20:29 +00:00
Helder.wiki 1cff9d9c1d Default $wgVisualEditorNamespaces to $wgContentNamespaces
The domains which contains articles are those from $wgContentNamespaces,
which by default is just array( NS_MAIN ).

Bug: 51527
Change-Id: I1f1356f1950c542ae05095a9ebd7b3d66ceb4e40
2013-07-17 09:23:22 -03:00