Commit graph

4409 commits

Author SHA1 Message Date
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
Roan Kattouw 983d9287e9 When editing meta items, modify them rather than rebuiding them
When editing the default sort key or a category's sort key, we would just
build a brand new meta item and replace the original item with it. This
destroys whitespace information tracked in the .internal property though,
so the resulting diffs looked pretty bad.

Instead, use ve.extendObject() to base the new meta item on the old one,
changing only what we need to change and keeping .internal (and
htmlAttributes and anything else that may be hiding in there) intact.

Change-Id: I40f4403ea2f2d13542d2e3c8c53e2d7f79515381
2013-06-10 14:36:35 -07:00
Trevor Parscal 8039b1c2f8 Insert Reference
Objective:

* Allow opening reference dialog with arbitrary selection
* Auto-insert reference when selection is not a reference node

Changes:

ve.init.mw.ViewPageTarget.js
* Added reference button to toolbar

ve.init.Target.js
* Add getToolbarSubset so we can exclude the reference button from
  the toolbar in the reference dialog (nested references are not
  allowed).

ve.ui.MWReferenceDialog.js
* Stop storing referenceNode (not needed)
* Only store internalItem on open if there's a focused node that's a
  reference
* Use wrapper paragraph when creating a new reference
* Create new reference on dialog close if required

ve.dm.InternalList.js
* Major rewrite to support key less references.
* Add new method for creating a transaction to insert a new iternal
  item. Also returns the index of the new item to be passed to the
  reference node.

Change-Id: I839ae165c299248484ce93d4ab087318a95fbb94
2013-06-10 20:14:08 +01:00
Translation updater bot 863fe70098 Localisation updates from http://translatewiki.net.
Change-Id: I531e6caedacd3be2fac25b972aa3e3a0a59c9c56
2013-06-10 07:32:31 +00:00
Ed Sanders 1a86cb9c61 Preserve location of reference body within key
Previously we populated the reference body into all <ref> tags
with the same key. Now we store an internal attribute marking
which element originally had the data.

If that tag is deleted the body is moved to the first <ref> tag
with that name.

Change-Id: If9f12bfb699e6ce85bb8f7d2ea9e6df528610a3d
2013-06-10 02:54:26 +00:00
jenkins-bot b910f135ad Merge "Disable Parsoid URL cache busting with touched ts" 2013-06-08 01:00:37 +00:00
Christian Williams babaa4118d FocusedNode Selection
Introduction of fake selection for single focused nodes. This
change specifically makes the selection much nicer in appearance
for Chrome users selecting floated FocusableNodes (block images)
for example.

Added ve-ce-surface-highlights DOM element to contain styled
highlight elements.

Made adjustments to getSelectionRect to return fake selection
bounds if necessary.

Replaced old uses of showSelection with model.change().

Change-Id: I96e66567cdce6455ef3eb77568e72f23140448ff
2013-06-07 17:49:35 -07:00
Gabriel Wicke e655c80bc0 Disable Parsoid URL cache busting with touched ts
The Parsoid extension now keeps the cache for the current oldid up to date.
Removing the touched parameter lets VE use the cached HTML.

Change-Id: Id025c69060cb9a0bc2478ec49e2c436022049d97
2013-06-07 16:57:48 -07:00
jenkins-bot 7a75f74ab2 Merge "mw: Remove 'Report problem' feature" 2013-06-07 23:23:29 +00:00
jenkins-bot b2c298774a Merge "mw.ViewPageTarget: Make 'review' step optional in save flow" 2013-06-07 23:22:36 +00:00
jenkins-bot cd2f411a93 Merge "Support for inline images" 2013-06-07 23:13:19 +00:00
Timo Tijhof a0d764b8ee mw: Remove 'Report problem' feature
Removed the "report" slide from the mw.ViewPageTarget save
dialog and everything that becomes obsolete as a result of it:

* JS saveDialogReviewWrongButton, which pointed to the report
     slide (was already hidden as of I90de95f6337ee).
* JS ve.init.mw.Target#reportProblem.
* JS ve.init.mw.ViewPageTarget#diffHtml.
* JS ve.dm.ElementLinearData#getUsedStoreValues.
* PHP mw.config wgVisualEditorConfig.reportProblemURL.
* PHP $wgVisualEditorParsoidProblemReportURL.
* I18N visualeditor-savedialog-title-report.
* I18N visualeditor-savedialog-label-review-wrong

Change-Id: I8a5e0ab2060d7c14086bba413d4c7d73b29c9b97
2013-06-08 01:11:27 +02:00
Inez Korczyński 2f15cb0067 Support for inline images
Handles typeof mw:Image and mw:Image/Frameless

Change-Id: Ie2fbd4a3e12fb6faa4ab8e6dd0aa8d1334ff6498
2013-06-07 23:09:32 +00:00
jenkins-bot 8a614ae395 Merge "Use blacklist instead of whitelist for storeHtmlAttributes of MWBlockImageNode." 2013-06-07 23:09:17 +00:00
Timo Tijhof d5868a0f13 mw.ViewPageTarget: Make 'review' step optional in save flow
Summary:

Instead of having a button "Review and save" that opens with a
diff and leads the user to the "Report a bug" and "Save page"
slides respectively, make it more like the default EditPage.

There is now a "Save page" button that opens with the save
form with a button to "Review changes" (diff) or "Save page".

The "Report a bug" slide has been unlinked from the UI and is
no longer accessible for now.

As a result of the UI no longer requesting a diff upfront this
also means we will no longer detect "nochanges" event (when it
turns out the submittted revision matches the latest version).

This is unfortunate as it was a nice feature to detect it
before the user spends time writing the edit summary) but it
is the same as how the default EditPage works.

Changes:

Improved interface messages.

Adapted "nochanges" caption to the new context (it is no
longer shown when clicking "Save page", it is now shown as a
result of clicking "Show changes").

Now that the "save" slide is accessible from multiple paths
it is needed to keep track of slide changes in a history
array. Previously the slide tree was 1 level deep with
everything descending from "review". Now it starts at "save"
and can go in multiple directions including a loop from
save>review>save. We also need to toggle the "Prev" button
based on history instead of based on whether or not we are
on the "first" slide.

Hid the "saveDialogReviewWrongButton" from the review slide.
We're approaching wider launches and this will not scale to
a wider audience.

Bug: 49258
Change-Id: I90de95f6337eeddd794b75d56543d8d152421a6f
2013-06-08 01:05:05 +02:00
Inez Korczyński b6b4855434 Use blacklist instead of whitelist for storeHtmlAttributes of MWBlockImageNode.
Change-Id: Ief029005b3326a94a8432a3bd6de50669bd3a3b2
2013-06-07 16:04:45 -07:00
Catrope 10d415e63a Render block templates as <div>s and inline ones as <span>s
Right now block templates are rendered as <span>s

Change-Id: I4c941a03e0e34a435990f0392080a3a8bf3e2835
2013-06-07 20:04:01 +00:00
Trevor Parscal 5aac2f756c Block Image Resizing
Allow block images to be resized by mixing in ResizableNode.

Made transitioning optional, and disabled it for block image nodes.

Change-Id: If89948d285ffb5efb104c44cbc9553a3d56f52e7
2013-06-07 10:52:04 -07:00
Trevor Parscal 1fd7e85846 Image insertion
Objective:

* Allow inserting images from local wiki and commons

Changes:

ve.init.mw.ViewPageTarget.js
* Add media insert button to toolbar

ve.init.mw.Platform.js
* Add getMediaSources method - defaults to local wiki and commons

ve.ui.MWMediaInsertDialog.js
* New dialog for inserting media
* Uses a media select widget and inserts block images

ve.ui.Dialog.css
* Added styling for media select widget in media insert dialog

ve.ui.Widget.css
* Added styles for media select widget and media select item widget

ve.ui.MWMediaInsertButtonTool.js
* New tool for inserting media

ve.ui.MediaSelectItemWidget.js
* New item widget for media select widgets

ve.ui.MediaSelectWidget.js
* New widget for searching for and selecting media items

ve.ui.TextInputWidget.js
* Added isPending method

VisualEditor.i18n.php
* New messages for media insert dialog

VisualEditor.php
* Added links to new files and messages

PhantomJS--

Change-Id: Ia803ff3ef518782ce76802d2dab7559686a1bb0a
2013-06-06 17:36:55 -07:00
jenkins-bot 9fcdd0b513 Merge "HACK: Update template dialog for Parsoid's url -> href change" 2013-06-07 00:21:44 +00:00
jenkins-bot 9168795ec3 Merge "For performance reasons use classes collection instead of jQuery.hasClass" 2013-06-07 00:13:52 +00:00
jenkins-bot 089cebd8e1 Merge "Hack around exceptions thrown when closing the reference dialog" 2013-06-07 00:13:10 +00:00
jenkins-bot 06551322ea Merge "Let's not put slugs around lists because there is no such need." 2013-06-07 00:10:19 +00:00
Inez Korczyński c67c1f714d For performance reasons use classes collection instead of jQuery.hasClass
Change-Id: Id64a58d71c49ad74c55e3a24b86955ece668ebba
2013-06-07 00:09:15 +00:00
jenkins-bot baa2f22db9 Merge "Fix freaky disappearance of template nodes" 2013-06-07 00:09:05 +00:00
Catrope 13c9b117c1 HACK: Update template dialog for Parsoid's url -> href change
Also need to strip ./ and ../

This is a dirty hack, Timo to clean this up

Change-Id: I7f377d916b90f5cdecfcd77a6d5276747a543761
2013-06-07 00:09:04 +00:00
Catrope 778a74daf7 Hack around exceptions thrown when closing the reference dialog
ce.ProtectedNode doesn't like to be torn down when it's detached,
and this was happening to CE nodes created in the MWReferenceList.

Hack around this by attaching the CE nodes generated by the
MWReferenceList to the ce.MWReferenceListNode (so they have a
parent and a way of getting to the surface), and by guarding against
multiple successive setups/teardowns in ce.ProtectedNode.

Change-Id: If00e75b939ccbdbaf681bbb6609fec54805bf9a0
2013-06-07 00:08:54 +00:00
Inez Korczyński 42d32286c7 Let's not put slugs around lists because there is no such need.
It is easy to exit the list at any given point by using the toolbar
button or pressing enter twice while at the end of the list.

Change-Id: Ie34300fc13a4548e283348ef58c88ce420fbe0c1
2013-06-07 00:08:26 +00:00
Catrope 4ce69758cc Fix freaky disappearance of template nodes
ce.GeneratedContentNode had an interesting bug where it called .append()
directly on DOM elements stored in the store. They weren't cloned,
which meant the previous rendering of the same node would just disappear,
and they also weren't adopted into the correct document which would
probably have caused other issues as well.

Properly clone and transplant the nodes from the store before attaching
them to the DOM.

Change-Id: I423db85cb7c3851a9bf68de03c72aa22994d9474
2013-06-07 00:06:23 +00:00
jenkins-bot 3557083eb0 Merge "mw.ViewPageTarget: Clean up transform/restore logic" 2013-06-07 00:05:25 +00:00
jenkins-bot 991f61a451 Merge "Prevent scrolling in top-level window while dialog is open" 2013-06-06 23:55:35 +00:00
jenkins-bot bf05782972 Merge "Fix protectedness of MWReferenceList" 2013-06-06 23:48:22 +00:00
jenkins-bot 22796f925d Merge "Fixing resize handle size" 2013-06-06 23:46:52 +00:00
jenkins-bot c73fdd7a4e Merge "Meta dialog messages were left in experimental mode" 2013-06-06 23:45:04 +00:00
jenkins-bot 45b970c8dc Merge "Remove tests for OOJS methods" 2013-06-06 23:44:13 +00:00
Trevor Parscal f1d481ff64 Prevent scrolling in top-level window while dialog is open
Because scroll events cannot be canceled or prevented from bubbling
up, the only way to prevent the scrolling is to cancel the actual key
and mouse wheel events.

PhantomJs -= 2

Change-Id: I540738459181c37d11caf5db07345703e7000ef9
2013-06-06 23:43:19 +00:00
jenkins-bot 351af0f5fe Merge "oojs: Integrate with OOJS v1.0.0" 2013-06-06 23:42:47 +00:00
Timo Tijhof ce8133cca6 Remove tests for OOJS methods
Change-Id: I6443e773fd2baf7e186ab4be0e227e78dd05b4b7
2013-06-06 23:41:52 +00:00
James D. Forrester 5bde1df44c Meta dialog messages were left in experimental mode
The messages 'visualeditor-dialogbutton-meta-tooltip' and 'visualeditor
-dialog-meta-title' were left in the experimental block rather than
production, so didn't appear in live. My fault, sorry.

Change-Id: I4d2f8d9ee0900d1d3ee635f348f2cc1491287f3d
2013-06-06 23:41:23 +00:00
Ed Sanders c86ff7529b Fix vewhitelist override.
This is mainly used for testing blacklisted browsers, so we just need
one parameter ('vewhitelist') which sets whitelist to true and
blacklist to false.

Change-Id: I38771ba7a49657d67c4d94ace1f30b5e41904df6
2013-06-06 23:39:43 +01:00
jenkins-bot 002e8d9095 Merge "Pending input refactor" 2013-06-06 21:47:09 +00:00
jenkins-bot 72f661dc69 Merge "ve.dm.MWBlockImageNode: Make toDomElements add more information to its output so round-tripping can work properly." 2013-06-06 21:46:21 +00:00
Trevor Parscal 8a8a337ce5 Pending input refactor
Objective:

* Make all text inputs have the ability to be "pending", not just ones
  with a special mixin

Changes:

* Delete pending input widget
* Move pending input widget implementation to text input widget
* Update all uses of pending input widget
* Make pending image a reusable "texture"
* Update styles of text input widget for pending state
* Get rid of checking for mixin since all text inputs can be pending now

Bonus:

* Get rid of unused images, including .psd and .ai files
* Add transparency texture
* Fix input widget not using documented config value
* Fix documentation in select widget (lies!)

Change-Id: Ib46ab01dc39d706e5c25fd473dee0edce51b7e44
2013-06-06 21:17:35 +00:00
Christian Williams eaba9833d2 Fixing resize handle size
Handles were missing vendor-specific box-sizing declarations.

Change-Id: I6f8e8a37df29cc351f4ca50b7dd02fadcc3bdda3
2013-06-06 11:18:57 -07:00