Local changes:
* Rename paste rules to import rules (also used by drag and drop)
New changes:
f5d83f8 Remove data-parsoid removal hack
99f938f Create 'preserveGenerated' mode for cloneElements and use in copy
938b44d [BREAKING CHANGE] Rename paste rules to import rules
c51288c ve.ce.Surface: Move insert HTML path to DM
10ce4cf Provide a FileDropHandler for HTML files
701bb9c Provide a FileDropHandler for CSV and TSV files
ca6b444 build: Update update-oojs.sh and update-oojs-ui.sh scripts
Change-Id: I5cfa15ab3efd03e2c64c2f9f725cb3098f53b32a
Otherwise the closure promise will be rejected as it was already closed with
different data, if you ever opened and closed the save dialog before pressing
the 'Read' button. This means the code in the $.when will never be run, and
the surface never destroyed.
Bug: T75589
Change-Id: I3ffdd1c82506bcd2accc0f3fa113c0950a31918e
It would tell you you were logged out when you were actually
logged in, and when I looked into it, I found lots of broken
things, including lots of confusion between the current
anon-ness and username and the new anon-ness and username.
ve.init.mw.Target:
* Check the new isAnon value, not the old one
* Pass the username to the event, rather than just anon-ness
ve.init.mw.ViewPageTarget:
* Use the passed username (new username) rather than the
username from mw.config (which is updated, but confusing)
Change-Id: Icf406d49100d81e87c677fd6b57ff93cc29f601f
Move ve.track() subscriber to its own file, and have it
route mwtiming.* events (for TimingData) and mwedit.* events
(for Edit schema) differently. Most of the data population
lives in the subscriber, so actual ve.track() calls are
pretty lightweight.
Existing ve.track() calls with timing data were kept with
their names intact for backwards compatibility, but
we may eventually want to throw them out and start from scratch.
ve.init.mw.ViewPageTarget.init.js:
* Remove old track subscriber
* Track init and ready events
* Remove old ve.track( 'Edit', ... ) crap that didn't work
ve.init.mw.ViewPageTarget.js:
* Fire the saveWorkflowBegin event before the save dialog
loads rather than after
* Remove unnecessary this.events.trackSaveError() calls:
TargetEvents already listens to these events itself
* Remove badtoken handler because all it was was an
unnecessary trackSaveError() call
* Add abort tracking
** Pass trackMechanism through deactivate() and cancel()
ve.init.mw.Target.js:
* Add static.integrationType to populate the 'integration'
field in the schema
ve.init.mw.TargetEvents.js:
* Simplify onSaveError* methods away into connect bindings
* Map track topics to mwtiming.* so they can be routed separately
* Track save-related mwedit.* events
Depends on I978eda96c in WikimediaEvents
Change-Id: Iae677d9b15c71d2b18e795bd5179d11876c06abd
Make sure it always gets torn down on deactivate, not
just on save. Otherwise we end up with multiple copies of it.
Change-Id: I7b95c316641fc48ce7087a0042ec6174fe03180b
If you clicked "Read" while the editor was loading
(but only while the "Edit" tab was already active, not before)
then you could get in a situation where surfaceReady fired
on an already-aborted target, which caused JS errors.
It seems like we should clean more things up in this
case, but I don't know what they are. In any case,
we should not try to set things up on a non-activating
target when surfaceReady fires.
Change-Id: Id57bd63ff288156725e472e7d89009022090253a
When you clicked the Back button in the browser, the URL
in the address bar would change (removing veaction=edit),
but we would not go back to read mode. This was broken
by 5c0c11753 almost a month ago but apparently no one noticed.
This is because 5c0c11753 moved the pushState() calls to
be earlier (in init init), making the replaceState() call
in the ViewPageTarget constructor (which is there
specifically for this bug) run too late in those cases.
The simplest way to fix this is to duplicate these replaceState()
calls before the pushState() calls in init init.
I feel a bit bad about copying code, but not very bad
because the code I'm copying already has a FIXME comment
about how there should be a better way :P
Change-Id: I6627a5d1d9377ae815bc58bceeb059ce9f4f19ab
Just like DOM interfaces such as document and location. And JS
constructors like Object.prototype, and libs like jQuery.
No need for the window host object.
Change-Id: Ie39aaea2ca17bdec5fb3afe32a4e6c9f751bd0c6
The location object is a global, just like document.
Using it via 'window' needlessly adds complexity and, for example,
makes it harder to catch typos in static analysis.
Standardise on location.href in place of the many different
variants for accessing and assinging the full url:
location =
location.href =
location.assign() =
And each with 'window', 'document' and without host object.
Change-Id: If88515bd88fc5b93ebacd4ec41fce02fec540f18
mw.msg can return things with <br />, which we want to be interpreted as HTML
rather than just escaped as text.
Bug: 73571
Change-Id: I7861432d9361e01f9def0578c342e60715c3d764
ApiEditPage can give us 'nochange' instead of the
'oldrevid'/'newrevid'/'newtimestamp' keys if we gave it a null edit.
Bug: 73463
Change-Id: Ic22597dfed11de3823471673404090a9bce12928
The container is zero-height and zero-width, so jQuery doesn't
consider it :visible, and yet it still takes up visual space.
Bug: 72693
Change-Id: I3bed5394a2a64a9f7f0a331f850aa412b5b11b7d
Moved the spinner code from ViewPageTarget to ViewPageTarget.init to make it appear immediately on clicking edit.
Bonus: also fixes the URL to add the parameter vesection when clicking a section edit link.
Bug: 65453
Change-Id: Ica33de675203cc0f0594b8362731c4e98a644313
Just hide them when opening the editor and show again afterwards. Will
need Parsoid for proper support.
Corresponding patch in core: I2389ff9a5332a2b1d033eb75f0946e5241cfaaf4.
Bug: 23796
Change-Id: I3ce5e7869be50dcd189ca24e2b3d7ebc62de4fc4
New changes:
8d5ec7a [BREAKING CHANGE] Rename ve.Document.getNodeFromOffset to getBranchNodeFromOffset
Local changes:
* Update calls for rename of getNodeFromOffset to getBranchNodeFromOffset
Change-Id: Ibc69f5a5deeed5698368bb19b30f14497c579e90
Instead of doing a blocking overlay, we're simply keeping the dialog open,
which is necessary for the pending status of the action buttons anyway.
Requires Ib2c8f336 in OOUI
Bug: 65012
Change-Id: I65b5de4a1666a81b157a71f6fec490007689eb44
That function needs to return the result immediately, not wait for module loading (via mw.notify).
This was breaking us being able to keep track of what wikitextWarning object was in use (but only
the first time we used the module), and therefore fail to close the warning when the wikitext
disappeared.
Bug: 70168
Change-Id: I0f1427423a5fe82ec8e70e2f0462a3044ca7ace8
IE doesn't accept null as a "do nothing" value, only undefined.
If you return null, it'll show a popup with the text "null".
Change-Id: I984a7ded483c4c178cbca2a9af9abd895e6ded56
If there is more than one span in #firstHeading, we only want to
update the first one.
This will still break if something inserts elements *before* the title
span, but fixing that would take more thought (we probably should
rebuild the entire heading element and fire 'wikipage.content' on it).
Bug: 69857
Change-Id: Id78b9b8275a57c9b3f3f1dbd0aaca356f94d0f03
The class provided a minimal coupling to the firsteditve guided tour,
which used it to attach a guider to the "Save page" button.
The class was removed in I30dc7020121f0dd6907b61ef674a7cb14eb00652.
Bug: 69784
Change-Id: I81fdc4f2fa41c86a6481cf478c154b5d6c99d41d