mediawiki-extensions-Visual.../modules
Trevor Parscal b3b2d3fb91 Preserve unused Parsoid template properties
Problem:

Parsoid has a property called "i" which we don't use, but they need for
round-tripping purposes. Since we were generating a structure from
Parsoid data and then generating data from the structure without
preserving properties we didn't use, it was getting lost.

Solution:

Abstract creating a template from data vs. creating it from name. Make
only templates have an origin argument in their constructors, so and
set it within a set of static constructors that create a template for
either data or a template name. Store the original data in the former
case, and use it as a base when serializing.

Changes:

ve.ui.MWTranslcusionDialog.js
* Remove no-longer-needed mw global declaration
* Move most of the addTemplate function to a static constructor in the
  template model class

ve.dm.MWTransclusionPartModel.js,
ve.dm.MWTransclusionContentModel.js,
ve.dm.MWTemplatePlaceholder
* Remove unused origin argument/property/getter
* Add serialize method (if needed)

ve.dm.MWTranclusionModel.js
* Move template/parameter generation from data into static constructor
  of template model
* Move serialization to part classes

ve.dm.MWTemplateModel.js
* Add mw global declaration
* Stop passing origin to parent constructor, store it locally instead
* Add original data property/setter for preserving unused properties
  when round tripping
* Add static constructors for generating a template from data or by name
* Add serialize method

Bug: 51150
Change-Id: Ide596a0ca0ae8f93ffce6e79b7234a1db7e0586c
2013-07-12 00:47:01 +00:00
..
jquery jquery.client: Update to upstream from 92f06b4a in mediawiki/core.git 2013-07-10 23:23:11 +02:00
oojs oojs: Integrate with OOJS v1.0.0 2013-06-06 17:29:55 +02:00
qunit
rangy Convert from DOS line endings (CRLF) to Unix ones (LF) 2013-05-25 23:51:21 +02:00
unicodejs Separate out UnicodeJS tests properly 2013-07-05 14:15:08 +02:00
ve Adjust toolbar group margins for equal vertical alignment 2013-07-11 11:22:45 -07:00
ve-mw Preserve unused Parsoid template properties 2013-07-12 00:47:01 +00:00