Commit graph

3325 commits

Author SHA1 Message Date
Inez Korczyński f0bc9935d2 (bug 41199) Fix the problem with placing cursor by clicking next to article content.
The specific use case is when user clicks on the left side of the inline alien node which
is at the beginning of the line or on the right side of the inline alien node at the end of
the line. This fix does not cover Monobook.

Change-Id: Ib24b03e30e753850698ed6b10be49b4f2642c92b
2013-02-13 15:36:45 -08:00
Ed Sanders 2c719b3e74 Add Ed
Change-Id: Iec9896de979a0aa787a724cfbe3ac54cb55bb71e
2013-02-12 16:06:21 -08:00
Translation updater bot 76dca4d077 Merge "Localisation updates from http://translatewiki.net." 2013-02-12 20:33:42 +00:00
Translation updater bot 90f5b95e9a Localisation updates from http://translatewiki.net.
Change-Id: I1d654ef2a718211bf4ba41e032c5530de60b7640
2013-02-12 20:30:16 +00:00
jenkins-bot 6b51b0f635 Merge "Annotate newly inserted target text as a link." 2013-02-11 20:00:26 +00:00
Translation updater bot 4a25f6714c Localisation updates from http://translatewiki.net.
Change-Id: I55ee9d5914bdb7dba7c28ba59041b1024bd46fc2
2013-02-09 23:05:39 +00:00
jenkins-bot 8d274c19e6 Merge "Implement inline documentation examples." 2013-02-09 01:50:44 +00:00
Timo Tijhof 62aeb254d9 Implement inline documentation examples.
Refactored the (previously unused) eg-iframe file to be a
template with 2 placeholders for script and styles.

The previous version was just the basic version to execute
javascript code, but that's not good enough since we need a
whole bunch of classes to be loaded.

A bash file processes the template into proper html, with the
help of the makeStaticLoader maintenance script we already had.

Updated demo.css, cleaned up redundant properties restyled
slightly to be more like the Vector skin and less "raw".

Fixed default $IP path in makeStaticLoader.php to work with simple mediawiki core installs having the extension in the
regular extensions directory, and prefixed __DIR__ so it
doesn't rely on the directory you call it from.

Change-Id: Ic789121dfeca08d9db69564d2ad2e52b3fa45de9
2013-02-08 17:47:10 -08:00
jenkins-bot 5ee7b12119 Merge "ve.dm.DocumentSlice does not extend ve.Node" 2013-02-08 23:22:22 +00:00
Trevor Parscal 9eed973ca5 ve.dm.DocumentSlice does not extend ve.Node
Change-Id: I11d28d6eb1c7db1d6b5796ec36c8e9a6f46b7c9e
2013-02-08 14:11:11 -08:00
Translation updater bot 1ee96c9e0e Localisation updates from http://translatewiki.net.
Change-Id: Ic8bc2d5212d5653157c73b474af478778a905039
2013-02-08 21:34:51 +00:00
Catrope 98a914e9fe Optimize ve.filterArray a bit
Change-Id: I8fc9c8d5f57a4af3b5421c65664351f21e488c53
2013-02-07 17:16:18 -08:00
Rob Moen 4d3ccb7b99 Annotate newly inserted target text as a link.
Fixes (Bug 44086)

Changes:
ve.ui.LinkInspector.js
- Annotate fragment for affected range.
- Fragment returned by insertContent was a zero length range, therefore
no content was being annotated.  It is questionable whether insertContent
should return the affected range or not.
- Also changes behavior of editing existing link annotations so that the cursor is after the annotation rather than covering it when the inspector is closed

Change-Id: Ic53b9844f84781cad05ac1f63964c9aaf7de68c3
2013-02-07 16:06:08 -08:00
jenkins-bot d1a4b903df Merge "Change the HTML attribute prefix from html/ to html/0/" 2013-02-07 23:52:22 +00:00
Translation updater bot 45591e903e Localisation updates from http://translatewiki.net.
Change-Id: I174b1db993124f5d965e06287a80d60654abb96c
2013-02-06 20:18:07 +00:00
Catrope 591f2e7396 Change the HTML attribute prefix from html/ to html/0/
This means that <p data-foo="bar"> will now be converted to a paragraph
with attributes {"html/0/data-foo":"bar"} rather than {"html/foo":"bar"}

This paves the way for multi-element node (about group) handling in the
node API: nodes representing multiple DOM elements will have html/i/attr
to represent an attribute of the i'th DOM element.

Change-Id: Iea52bdccd721942ca708c8f9f47e934524809845
2013-02-06 12:00:43 -08:00
jenkins-bot edd0baf4fe Merge "Check for instance of generic LinkAnnotation when querying target." 2013-02-05 22:55:39 +00:00
Translation updater bot e17220a0af Localisation updates from http://translatewiki.net.
Change-Id: I3a0914ad5d1dc4acd067991a624bca03af2a08e2
2013-02-05 21:32:18 +00:00
Rob Moen 78a99fb0a3 Check for instance of generic LinkAnnotation when querying target.
Resolves (Bug 44686)

Change-Id: I0ff962330e061aea66a25a923f46d6759e5ff6af
2013-02-05 11:55:27 -08:00
Translation updater bot c4ee328edf Localisation updates from http://translatewiki.net.
Change-Id: I637f92daed34ac338e858a0fd151cfae43cc2895
2013-02-04 22:24:09 +00:00
Translation updater bot 269ad2392b Localisation updates from http://translatewiki.net.
Change-Id: I1d4ab6e2e6012124c9ede2bc0ab895d74babb2f0
2013-02-02 21:35:49 +00:00
jenkins-bot 7ea4b94604 Merge "Fix bug where inline nodes didn't trigger wrapping" 2013-02-02 00:28:07 +00:00
jenkins-bot 6c5d83449d Merge "Remove trailing commas" 2013-02-02 00:26:59 +00:00
jenkins-bot 67ad11b163 Merge "Make JSHint ignore the docs/ directory" 2013-02-02 00:24:50 +00:00
jenkins-bot 9a96f894ff Merge "Node cleanup" 2013-02-02 00:23:03 +00:00
Catrope 57ad316988 Fix bug where inline nodes didn't trigger wrapping
When encountering an inline node (i.e. content node that's not a text
node) within a branch node that's not a content branch node, the
converter should start a wrapper. But it doesn't do this, it only opens
wrappers for text nodes and annotations.

Fixed this in the converter, added a test for it, and fixed an existing
test that asserted the broken behavior.

Change-Id: I6e143e21e68b68f0d85b8772e24a2d3a5d465410
2013-02-01 16:06:17 -08:00
Trevor Parscal 363961a9e2 Node cleanup
ve.Node.js
* Removed unused emitUpdate property
* Made traverseUpstream a dynamic method rather than static

ve.ce.Node.js, ve.ce.Surface.js
* Updated calls to traverseUpstream

Change-Id: I28a2dac61aa32668d35854fbdb7712401c42336a
2013-02-01 15:35:48 -08:00
jenkins-bot 7155bcea16 Merge "i18n icons" 2013-02-01 23:34:15 +00:00
Trevor Parscal f49d80d27a i18n icons
Graphics (*.ai, *.png, *.svg)
* Took a pass on all images making them sharper and clearer
* Renamed bold and italic to bold-b and bold-a
* Added bold-f, italic-k, bold-a and italic-a
* Reorganized illustrator file

ve.ui.Icons-raster.css, ve.ui.Icons-vector.css
* Added classes for new icons
* Appended bullet, number, indent and outdent class names with "list"

ve.ui.*ButtonTool.js
* Added definitions for static icon property
* For bold and italic, added i18n style definitions

ve.ui.ButtonTool.js
* Switched from re-using the name property (which is intended to be the symbolic name of the tool used when registering with the tool factory) to using an static icon property for defining the icon

Change-Id: I43e7c35835a1e6dfb06f2a70226fac0d395008e8
2013-02-01 15:29:18 -08:00
Catrope 46957736a4 Remove trailing commas
JSHint doesn't detect this (this is an open bug against jshint), but
Eclipse does

Change-Id: Iebfc0f9c6263f60898739c9d19400357a65da0e9
2013-02-01 14:45:35 -08:00
Catrope 963b5f24e4 Make JSHint ignore the docs/ directory
Change-Id: I1d590b44cf663a024ebb6c09a807f25392625152
2013-02-01 10:19:33 -08:00
jenkins-bot 626257fb39 Merge "Introduce context object in getDataFromDom()" 2013-01-31 23:36:57 +00:00
jenkins-bot 6aefc761e6 Merge changes Ie5f1f94b,I7b7a2d50,Ieda8383c,I36860bee
* changes:
  Use AnnotationSet rather than array in getDataFromDom()
  Hybrid-ify MetaBlock/MetaInline
  Hybrid-ify AlienBlock/AlienInline
  Specify (but do not implement) the context parameter to toDataElement()
2013-01-31 23:36:30 +00:00
Catrope a97f777685 Introduce context object in getDataFromDom()
* Introduce context object as specified for
  ve.dm.Node.static.toDataElement()
* Remove wrapping variable in favor of context.wrapping
* Remove wrappingIsOurs in favor of context.canCloseWrapper
* Introduce originallyExpectingContent and use it to repopulate
  context.expectingContent after closing a wrapper
* Replace most uses of branchHasContent with context.expectingContent
** Except for two cases where we need originallyExpectingContent

These changes fix a case where a metaBlock was generated in an inline
position. Updated the tests to reflect this.

Change-Id: I6baf6053f8a3a0b7d91487f812b9235a7b2b3db1
2013-01-31 15:00:00 -08:00
Catrope 1927330352 Use AnnotationSet rather than array in getDataFromDom()
Change-Id: Ie5f1f94bd62739ccf74c027dd0ba418fe2d91fa6
2013-01-31 15:00:00 -08:00
Catrope e083afb029 Hybrid-ify MetaBlock/MetaInline
Change-Id: I7b7a2d50637e2009742b290cb1bd0f4fc0395934
2013-01-31 15:00:00 -08:00
Catrope c0690634ee Hybrid-ify AlienBlock/AlienInline
Change-Id: Ieda8383c0c04df208f4c5f2aa7380427467049b7
2013-01-31 14:59:59 -08:00
Catrope ac6c9b2418 Specify (but do not implement) the context parameter to toDataElement()
This allows the converter to provide the node handlers with context
information, which hybrid nodes (such as alien and meta) need to decide
which shape to take.

Change-Id: I36860bee560a38ee39a149109be3706e39258edc
2013-01-31 14:59:59 -08:00
Translation updater bot d894c84ea7 Localisation updates from http://translatewiki.net.
Change-Id: Ia91eccdbac663c4cbcd0a967d98acce893cd9db4
2013-01-31 20:44:48 +00:00
jenkins-bot 48bf0fbaab Merge "Fixed documentation warning" 2013-01-30 21:20:09 +00:00
Trevor Parscal 100e67c128 Fixed documentation warning
Please use backtick (it's to the left of the 1 key) around HTML elements in comments.

Change-Id: I473e88a2cb1f7fb725f21cd0e8b3f659189c15a0
2013-01-30 12:52:03 -08:00
Translation updater bot 186dabf40b Localisation updates from http://translatewiki.net.
Change-Id: I5f90aee8638592987274beb2456b109c85eca5e1
2013-01-30 20:51:45 +00:00
Catrope 36d99ad901 Add Iceweasel to supported browsers list
Depends on https://gerrit.wikimedia.org/r/46666

Change-Id: I1192ce6687ba69504d0c4be484e479ddebedbc87
2013-01-29 17:53:09 -08:00
jenkins-bot 602d01e461 Merge "Added tests and fixed inconsistencies for empty text node handling" 2013-01-29 23:16:30 +00:00
jenkins-bot 9bf5eb5b5b Merge "Added support for passing data into annotation constructors" 2013-01-29 23:15:21 +00:00
Trevor Parscal 16310f7535 Added tests and fixed inconsistencies for empty text node handling
Continues where Ibb682332a6084e357104183641a104e3ae1e253f left off, adding tests and removing inconsistencies between the behavior of the document constructor, which was adding empty text nodes to empty paragraphs, and correcting other tests which expected empty text nodes to be there as well.

Change-Id: I414d061cdd494b8023f14e944eda2910a4dab0d4
2013-01-29 15:13:17 -08:00
jenkins-bot a9b7c5c5e3 Merge "Trigger refactor" 2013-01-29 22:03:53 +00:00
Trevor Parscal ea4b42b2b2 Automatically prune empty text nodes
When there's 2 entities or inline content nodes (like aliens) with text between them, removing that text should remove the node too. If you don't remove the node then CE won't think to make a slug between the two inline nodes.

Change-Id: Ibb682332a6084e357104183641a104e3ae1e253f
2013-01-28 17:09:56 -08:00
Trevor Parscal 294db5e3ef Trigger refactor
Objective: Simplify the registration and use of triggers

Changes:

* Renamed ve.Command to ve.Trigger
* Renamed command demo to trigger demo
* Removed language prefixing of triggers
* Generating trigger tooltips rather than hard-coding them in i18n
* Added documentation to clarify that only 'mac' and 'pc' are supported platforms, and how the default is chosen
* Simplified trigger registry's register command
* Updated trigger registrations

Change-Id: Ibab6ad5b5c86f24707f064967dc2119a81125392
2013-01-28 17:06:13 -08:00
Translation updater bot c9f444b9b1 Localisation updates from http://translatewiki.net.
Change-Id: I5171de253449ce947efe8969518da3a94bb839c6
2013-01-28 22:04:40 +00:00