Follows-up 0547d8c8.
It's still very difficult to test whether this code works, but
doing $( newDoc ).remove( 'selector1' ).remove( 'selector2' )...
demonstrably doesn't work, because 1) the selector passed to remove()
filters the collection, it doesn't descend into it, and 2) remove()
returns the collection of removed items, so chaining it doesn't work.
Instead, use $( newDoc ).find( 'selector1, selector2, ...' ).remove();
Also normalise selectors.
Change-Id: I97f3b28c4d5120f08e5d7fbf4598ddc0c01d4ecf
* Ensure that the toolbar remains inside the target so that
target triggers still work
* To keep the page title beneath the toolbar, move it inside
the target on setup, and restore it on teardown
* Have teardownToolBar/DebugBar return promises so we know
when teardown is completely finished.
Change-Id: If2a9ce9a653aed51d21c8e8dd7795f2533d54f70
We used to send data like { title: { missing: true|false } }
With this change, we send data like { missing: [titles], existing: true|[titles] }
where 'existing' is set to true (assume all non-missing titles exist)
for current revisions and to an array of existing titles for
old revisions.
This is because we always output this data for links in the current
revision, even when loading an old revision: in that case we rely
on the client to request the omitted information, so there we can't
assume that all pages we don't have information about exist.
Bug: T88259
Change-Id: I7b58b3f669cc78fd81b60859cf76928a9087066f
If added afterwards, this causes child elements styles with
'em'-values to get redrawn (or even animated).
Bug: T88387
Change-Id: Ic1aba14b7cfe0ff6e7191f0b6052ed9cc4585fcd
* Add a class to the indentation toolbar button, similarly to what was done in
Ib0cb67151d893a5d2efccf798d6b25d197ed34d2
* Fix the definition of the indentation pull-down element acordingly.
* Restore the Indentation menu screenshot scenario, which was disabled in
I3e892baa9cb2c8c1303fab232a2b1c64ebdd8f26
Change-Id: If2d92aab6d04aa487d6f753fa7cac94f8d8215c8
I think somebody somewhere pointed to this as the reason why VE
wouldn't load when user's common.js has syntax errors, but I actually
can't reproduce that. Not sure if this is needed, but looks like a
good idea anyway.
(Once more, with feeling. Reverted broken attempt: aa531488.)
Change-Id: I252c5c20f75b3bbea51200560408dc4cfc7174f6
I think somebody somewhere pointed to this as the reason why VE
wouldn't load when user's common.js has syntax errors, but I actually
can't reproduce that. Not sure if this is needed, but looks like a
good idea anyway.
Change-Id: I3abecacf083c1c9dfb2ea30207a9911eeea54b50
This cleans up the selectors for the elements on the toolbar
so that they can be tested.
Class names in the form of ve-test-* are added to elements
that have words for labels: 'Paragraph', 'Cite', 'Insert'.
There is no other way to look up these elements in the DOM
except using the UI text, but it is different in different languages,
so this is unusable for the language_screenshots job,
which is multilingual by its nature.
Bug: T76143
Change-Id: Ib0cb67151d893a5d2efccf798d6b25d197ed34d2
Follows-up b0e8900, 447e8de, d3f26e65.
Contrary to binding a reference, this-overiddes for inline
functions gets messy and fragile. There's also a minor
performance overhead that can be avoided. No separation of
concerns, eiter, as the object is held by the closure.
Also:
* Remove left-over instances of @method.
* Remove redundant '0' argument to setTimeout.
* Use null instead of $ for apply() on static methods like $.when.
* Use .empty().append() instead of .html(). Does the same but
without additional overhead and without confusion association
with "html" which isn't used (it doesn't serialise and re-parse
or clone, it just appends when given one or more nodes).
Change-Id: I797a3667c67d52568150be9be5d043d149f22077
New changes:
9929b6d [BREAKING CHANGE] Make ve.init.target an OO.ui.Element
Local changes:
* Fix target constructors now they generate this.$element
Change-Id: Ia6bf604c67305834a3f73863a10336cfbb83fa77
New changes:
776e801 Delimit text nodes in debug observations
72643bc Remove debug bar hiding now it is handled by the surface
cf1e167 [BREAKING CHANGE] Multiple surface support and demo
Local changes:
Account for detachable toolbars in core being setup in a different order.
Change-Id: I29156948711d55ba5f6dd4f6c35ca0e4cca32373
New changes:
fc4af20 Fix filibuster expansion bug
3feadb2 [BREAKING CHANGE] Refactor for multiple surfaces
Local changes:
* Use target.getSurface now that targets can have multiple surfaces
* Remove debug bar code now surfaces manage their own
* Remove import rules code now implemented in base target
Change-Id: I18d6f9f2f36431959d31347b4c1952a1aca1350e
Move reference style hack to MWReferenceNode.css, and move
heading style hack to ve.init.mw.Target.css
Change-Id: Icbd53f8df998c9f7bcc701b7c29dc226dfc5c05f
New changes:
5e60f12 Ensure clipboard key is removed from paste target
32397d8 Update OOjs UI to v0.4.0
Local changes to compensate for new OOUI version, and updated wfUseMW call.
Change-Id: I005f7b23a36e04f1305d4aa037c19a5c7db9a699
Method was moved to parent, but not deleted from child. Also move
sanityCheckPromise to parent where it is used.
Change-Id: Ie2b00330d796cd089fd4bc84d9332c316500633f
Also push it into correct place in the toolbar, and disable it from media and
reference dialogs' toolbars.
Change-Id: Icc3bf056860e35def13e03e77ffc6782acc4196a
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
Also remove toolbar definitions as they can now be derived from
command availability.
Depends on If32d514a in core.
Change-Id: I2313f3cc2531686b27f96dc1110b28bb4b295f89
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
New changes:
2cc219a Update OOjs UI to v0.1.0-pre (571f26d0ab)
3543cb7 Protect against offset=-1 in insertContent()
7a3d456 [BREAKING CHANGE] Move selection restrictions from tools to commands
3d847bb Disable desktop context on table selections
41282dd Missed function rename from RangeFix change
dd6c8b8 Support toDomElements returning an empty array
9be6464 Placholder -> placeholder
9bdd0a8 Restore basic styling to toolbar in core target (only)
Local changes:
Move selection restrictions from tools to commands
Change-Id: I88f3d04946bd1d03ed001d747475a8b495a0f64c
New changes:
d845991 Data model implementation for tables
a27c148 ContentEditable implementation for tables
3c47428 Actions and context menus for manipulating tables
543ca54 Support annotation tool on table selections
149cf3d Supporting copy paste of single table cells
25c9eee Table header/data format tools
e557e46 Merge cells tool
afcf2d9 Allow custom type and attributes when creating a table
Local changes:
Add the files and messages for table editing
Change-Id: I6e6c33b96d3089049a0fd5385191caa83df5756b
New changes:
6bbcd6a Localisation updates from https://translatewiki.net.
b8d8a5b [BREAKING CHANGE] The Great Selection Rewrite of 2014
Local changes:
Update to use new selection/range API
Change-Id: I5480d5c77d599c93c2d374fac88bb2fdb68b0024
Hack to try to kill a class of bugs caused by misbehaving browser plugins.
Unable to test whether this fixes them or not.
Bug: 68900
Bug: 51423
Bug: 51521
Bug: 52791
Bug: 52884
Bug: 53252
Bug: 61776
Bug: 63121
Bug: 63229
Change-Id: I8af9f7ba4be45b42f6e2e382ff1a3e1f452058ba
Introduced in VE core in I0fb47f7c91f61.
In IE, this fixes corruption of style and bgcolor attributes.
In other browsers, the only change is that we now use
XMLSerializer rather than .outerHTML to serialize, but as
far as I can tell this isn't materially different. XMLSerializer
correctly uses HTML semantics when given an HTML document.
Bug: 70856
Change-Id: If48555fa4763e763484bbabfa0bc4ded0d0a5c58