Commit graph

4352 commits

Author SHA1 Message Date
Inez Korczyński ec92614906 Handle deletion programmatically always
Change-Id: Ic68f80d92d32169ff60258b81a438e342b136128
2013-06-14 17:05:28 -07:00
Inez Korczyński 44f57135f0 (bug 43082) Fix problem by calling surfaceObserver.stop( true ) first - before calling handleEnter.
Change-Id: I35c892581943057acbf9ddd638576e998cc82c1a
2013-06-12 17:14:57 -07:00
Raimond Spekking 7a4237fc39 Revert "Localisation updates from http://translatewiki.net."
Overwrites I2af295a009121236d46c0705f85d3722dfb72aae

This reverts commit 78044e6cd5

Change-Id: I17e5fe0ea9026a2fca94237686739b14060b8eea
2013-06-12 20:09:07 +00:00
Translation updater bot 78044e6cd5 Localisation updates from http://translatewiki.net.
Change-Id: I6bfe49fd013591dfb020b86ccb10b48608650990
2013-06-12 19:59:59 +00:00
James D. Forrester 9d40239e06 Media display and insertion no longer an experimental feature
Media item dialog for settings; drag-and-drop placement; caption
editing still to come.

Bug: 37870
Change-Id: I547e06dcdb92e19f0159660314187c4f1a62f3ed
2013-06-12 12:39:35 -07:00
jenkins-bot a357d4430f Merge "Sort out i18n strings" 2013-06-12 19:28:28 +00:00
jenkins-bot 5f30bd9ed6 Merge "References dialog cleanup" 2013-06-12 19:25:59 +00:00
James D. Forrester 4b315cb4af Sort out i18n strings
Sort them alphabetically; trim unused ones; give descriptions for missing ones;
only use the needed messages in the ResourceLoader payload.

Change-Id: I2af295a009121236d46c0705f85d3722dfb72aae
2013-06-12 12:15:01 -07:00
jenkins-bot ed2018e58c Merge "Store empty annotations as alienMeta nodes" 2013-06-12 18:55:50 +00:00
jenkins-bot ddd88043fa Merge "Store alien meta items' dom nodes only" 2013-06-12 18:54:00 +00:00
Trevor Parscal 8f9d2a607e Cleanup unused dialogs
Objectives:
* Remove unused dialogs

Changes:

*.js
* Remove unused stuff
*.php
* Cleanup links to files and messages

Change-Id: Ie670afa3aef1757151e385bf922464b85f662a7d
2013-06-12 11:49:44 -07:00
Ed Sanders da51566d56 Store empty annotations as alienMeta nodes
Not a perfect solution, but better than deleting them completely.

Bug: 48605
Change-Id: I0f3a194f629b054f193a61af105733a555775d79
2013-06-12 19:46:41 +01:00
Trevor Parscal 2d044518bd References dialog cleanup
Objectives:

* Remove the whole toolbar subset thing, it's up to the creator of the
  subsurface to know what is and is now allowed, and the commands were
  still passing through unfiltered
* Correctly separate initialization from opening - fix issue where opening
  the reference dialog multiple times will keep adding more and more
  controls

Changes:

ve.init.Target.js
* Remove getToolbarSubset method

ve.ui.MWReferenceDialog.js
* Add toolbar tools and surface commands configs to reference dialog,
  including the things that are safe to use in references
* Move creation of field sets and reused controls to initialize method
  to prevent re-creation each time the dialog is opened
* Move static initialization stuff to the top near the other static stuff

Change-Id: I1c8577d17c506bac76e61b2b036655c59ef5a218
2013-06-12 11:27:49 -07:00
jenkins-bot 2bccb3da85 Merge "Replace alpha notice with beta label hiding the feedback link" 2013-06-12 17:16:42 +00:00
Ed Sanders 59bfc081df Store alien meta items' dom nodes only
We don't need to decompose and rebuild alien meta items
as they are uneditable, so just store the dom node and return that
in toDomElements.

Update test cases and several tests now need to use
assert.deepEqualWithDomElements.

Change-Id: I4d2eed267dac7855cb929a17d7aef566eaf0e287
2013-06-12 16:37:37 +01:00
jenkins-bot 06bf3b7864 Merge "mw.ViewPageTarget: Implement veaction=edit history state" 2013-06-12 11:16:31 +00:00
Trevor Parscal 18cde8a420 Actually fix bug 48556
Turns out that by skipping the last item, the following logic which
depended on that item being in the existing items list failed to keep
it's grubby hands off it.

Yes, I know I +2'd it. Shame on me too.

Bug: 48556
Bug: 48565
I93ce05f7cbb28313a3f0827539f0528c366aeb7e

Change-Id: If48e001b92c217bee0a35b6da41d1c1ff0e3271c
2013-06-12 01:53:14 +00:00
James D. Forrester 198caeb603 Replace alpha notice with beta label hiding the feedback link
Bug: 48428
Change-Id: I725beec4e76dadfb1ccca873758f8f37b7f58a73
2013-06-11 18:17:10 -07:00
jenkins-bot 75d36e5b32 Merge "Set sort keys on click-out too" 2013-06-11 21:16:55 +00:00
jenkins-bot 2573708132 Merge "Improve langlinks styling in meta dialog" 2013-06-11 21:16:02 +00:00
jenkins-bot 9e74da4f31 Merge "Add missing documentation for category widgets" 2013-06-11 21:14:54 +00:00
Trevor Parscal 0c935f69af Improve langlinks styling in meta dialog
Change-Id: I88d6d374d34dc08ecf46053cfc639c03ec23f8bf
2013-06-11 14:02:28 -07:00
Translation updater bot a8478b6fe7 Localisation updates from http://translatewiki.net.
Change-Id: Icd89869d643a9413d7f9230fad4a2b857cad5693
2013-06-11 20:57:43 +00:00
Roan Kattouw 9507b7767e Add missing documentation for category widgets
Change-Id: Idd01bb8d01363cb2eaf311abae8fa5ecf7b36f0e
2013-06-11 13:01:37 -07:00
jenkins-bot 2ce91bf4ca Merge "Text input widget enter event" 2013-06-11 19:59:33 +00:00
jenkins-bot 4d664cbeb6 Merge "Improve input widget value sanitization" 2013-06-11 19:47:34 +00:00
jenkins-bot f41045c51e Merge "Paged dialog upgrades" 2013-06-11 19:46:24 +00:00
Roan Kattouw 1be42c8fa6 Set sort keys on click-out too
Was previously only set on form submission, but there was no button so
you had to press the Enter key

Bug: 48555
Change-Id: I256d2b21bc2306959f6d6a0373386054b21dadfe
2013-06-11 12:41:22 -07:00
jenkins-bot ff48204896 Merge "Don't offer to move the very last category to the end" 2013-06-11 19:28:50 +00:00
jenkins-bot 0be4835151 Merge "Break words in the category dialog" 2013-06-11 19:28:09 +00:00
jenkins-bot 783a33624e Merge "Clean up incorrect use of regular expressions in CategoryInputWidget" 2013-06-11 19:27:22 +00:00
Roan Kattouw 514039b2ba Clean up incorrect use of regular expressions in CategoryInputWidget
getLookupMenuItemsFromData() constructed a regex from user input
without escaping. I don't *think* there are any injection
vulnerabilities here but at the very least it triggers exceptions
when the input is, say, a backslash. Instead, use .lastIndexOf() which
allows us to efficiently check whether a string starts with a certain
prefix.

getLookupCacheItemFromData() was stripping out the Category: prefix
using a regex that hardcoded Category: (so failed to detect localized
prefixes) and used global replacement, which meant that strings with
multiple occurrences of 'Category:' were handled incorrectly. Instead,
use mw.Title to strip the prefix. Also move away from .map() because we
may need to drop a result if it doesn't pass mw.Title validation.

this.categoryPrefix still has a few legitimate uses left, so keep it
around but set it to the localized namespace prefix rather than Category:

Change-Id: I6547f9df2e94fe81f6aefb9286e547425137344b
2013-06-11 12:25:41 -07:00
Trevor Parscal c32564f36d Text input widget enter event
Objective:

* Add an event to single line text input widgets to detect when the enter
  key has been pressed

Changes:

ve.ui.TextInputWidget.js
* Retain value of multiline config option
* Add key press handler to detect pressing of enter key
* Emit 'enter' event when enter key is pressed if input is single line

Bonus:

* Add missing documentation for multiline config option

Change-Id: Id9c64343f4a2ea8f0f45213fd2b59ca87c805b24
2013-06-11 19:21:32 +00:00
Trevor Parscal 6a3badfcc7 Improve input widget value sanitization
Objective:

* Prevent undefined and null from being converted to 'undefined' and
  'null' when given to setValue by converting them to empty string instead

Changes:

ve.ui.InputWidget.js
* Move all sanitization to one place
* Improve sanitization by adding cases for undefined and null

Change-Id: I8817a8fcac271e560a9e49887c68a035293866d4
2013-06-11 19:21:27 +00:00
Trevor Parscal 252e9b3d12 Paged dialog upgrades
Objective:

* Add functionality to paged dialogs to work with the pages and select
  them programmatically

Changes:

ve.ui.PagedDialog.js
* Keep track of the current page name
* Add setPage method, which is can be used publicly and is also used
  internally when items in the outline are selected
* Add a page content config option which auto-appends to the inside of
  the page
* Add removePage method for removing pages by name
* Add getPageName method which gets the current page name

Change-Id: I2a2f0c329d274796b8c9e7572ecff8294f472f7f
2013-06-11 19:20:57 +00:00
Roan Kattouw 73c393e3ab Use the correct $$ in the meta dialog
Change-Id: Id23228c67eb4e50b3912b6148374e459b0f59b34
2013-06-11 10:49:53 -07:00
jenkins-bot a61adfea45 Merge "Fix conversion of byte to grapheme offsets/lengths" 2013-06-11 16:46:13 +00:00
Ed Sanders 348d2355c6 Fix conversion of byte to grapheme offsets/lengths
Missed one case in ve.ce.Docuemnt#getNodeAndOffset.

Bug: 49246

Change-Id: Iff1dfb90130685bb710821f8386cfa2f296f2f95
2013-06-11 13:39:11 +01:00
jenkins-bot 9972fa86ea Merge "When editing meta items, modify them rather than rebuiding them" 2013-06-11 11:12:52 +00:00
Roan Kattouw b2fbe35962 Break words in the category dialog
Of course CSS is perfectly standardized and wonderful, so we need a bunch
of duplicative and non-standard rules.

Also fix the mixin in MWCategoryWidget

Change-Id: I24da0ddb29d2886c450da362fee47d22da8e631d
2013-06-10 16:49:01 -07:00
Roan Kattouw ad3a0ba1a2 Don't offer to move the very last category to the end
Bug: 48556
Change-Id: I93ce05f7cbb28313a3f0827539f0528c366aeb7e
2013-06-10 16:00:25 -07:00
Roan Kattouw 8e8ddd9cad Fix exception in InputWidget when config.value isn't set
Change-Id: I0d41d8b39aa6777f206ec47b8ceefff012e2b00b
2013-06-10 15:52:25 -07:00
Gabriel Wicke 0b558e0d09 Disable the 'cache' query parameter too
With explicit cache management on the Parsoid side there is no need to send
this explicitly any more.

Change-Id: I34bf3a6ffe631d3350c05ec4c21563f8a734effc
2013-06-10 15:41:49 -07:00
jenkins-bot fcfaa4c832 Merge "Wrap inline images in spans with display: inline-block." 2013-06-10 22:36:30 +00:00
Inez Korczyński 4d880cb28d Wrap inline images in spans with display: inline-block.
Change-Id: I8daac35c752ad33691955b2493191be990c78f58
2013-06-10 15:34:53 -07:00
jenkins-bot 03ed1a5a7f Merge "Match non-BMP characters in wordbreak regexes" 2013-06-10 22:19:15 +00:00
David Chan 6dacf615c0 Match non-BMP characters in wordbreak regexes
unicodejs.js:
* charRangeArrayRegexp to write surrogate-aware regexps
* private helper functions

unicodejs.wordbreak.test.js:
* test charRangeArrayRegexp
* corrected tests for non-BMP wordbreaks

unicodejs.wordbreak.js:
* use new surrogate-aware regexps

unicodejs.wordbreakproperties.js:
* generated from Unicode data

unicodejs.graphemebreakproperties.js:
* generated from Unicode data

unicodejs.wordbreak.groups.js:
* delete as no longer used

unicodejs-properties.py:
* generate unicodejs.wordbreakproperties.js from Unicode data
* generate unicodejs.graphemebreakproperties.js from Unicode data

index.php:
* update script tag links

/VisualEditor.php:
* update script tag links

/demos/ve/index.php:
* update script tag links

/maintenance/makeStaticLoader.php:
* update script tag links

Change-Id: I39c0386a85b0cf21d68d3385b84018a5d7648de5
2013-06-10 23:16:23 +01:00
jenkins-bot c41ee66ac7 Merge "Fix selection and hover for MW inline images." 2013-06-10 22:06:50 +00:00
Inez Korczyński 435b61303c Fix selection and hover for MW inline images.
Change-Id: I82444157a2f57739dc81039dd919233201041634
2013-06-10 15:03:38 -07:00
Ed Sanders e67b4030f3 Remove Parsoid hack and fix new references.
Now that I797b2bd87 is in we can remove the data-parsoid hack
for new references. Also fix the converter to always insert content
for keyless references.

Change-Id: Ia42907feb8f64637189eba15139177c7eb5e8899
2013-06-10 23:01:17 +01:00