Replace ve.trackRegisterHandler with two methods: ve.trackSubscribe and
ve.trackSubscribeAll. The former takes an additional string argument 'topic',
which specifies a string prefix on which to match event names. The callback is
only called on matching events. The latter, ve.trackSubscribeAll, binds a
handler to all track events, regardless of topic.
This patch simplifies argument-handling by eliminating variadic ve.track calls
in favor of a single object that encodes all event data. The loose coupling of
track event emitters and subscribers makes relying on unnamed positional
argument conventions brittle; property access works better.
Change-Id: I3b58ce0f48ad3c9b56fcaa9c2226cc79bbcd4051
* Add config option to disable if required
* Centre label within resize handles
* Only show when resizing
* Sexy opacity transitions, rounded corners and multiplication
character
Bug: 54297
Change-Id: Ic49430ce3302f780ae4b05d1fa29e14db1192c84
Resizes the $resizable element as you drag.
Can be disabled by setting the 'outline' config option.
FocusableNode
* Redraw on resize
ProtectedNode
* Destroy and prevent creation of phantoms on resize
MWInlineImageNode
* Correctly pass this.$image to ResizableNode
Bug: 54298
Change-Id: I7d6d345af8bb4712bbf154072b4704943a5a620d
* Followup 75270e24: use this.surface directly in MWMetaDialog
* Document that MWDialogTools need a SurfaceToolbar
* Namespace CE events and CSS classes with ve-ce- rather than ve-ui-
* Namespace SurfaceToolbar CSS classes correctly and put them in their
own CSS file
Change-Id: I9e70917d9c220b39e68833f67ed49fae7f7cbe6a
The default is to store the entire generated DOM node, but in
general classes can store anything that can be held by the store.
Change-Id: Ia761079fadfb5a6cfa2f00e5b5e23d6c6d3468ac
The logic requires the size of $resizable when the resizing started.
This is already stored in this.resizeInfo, but for some reason the
code recalculates every time, which is both inefficient and wrong
(but not a problem at the moment as $resizable doesn't change size
until resizeEnd).
Change-Id: I37a3c98e24b9e7d5e1970212975cef5ce9ef8a99
'resize' is actually 'resizeEnd'. Added 'resizeStart' and 'resizing'
which is triggered on mouse move.
Change-Id: I13c6e426cbcc965b3db50082c5294ca76979fe57
There was code in there once, but it's now empty. Removed it in favor
of adding explicit listeners in the handful of subclasses that
override it.
Change-Id: I160e55ad3c7d85c9f830a4bd7d42ec5dc18ad04f
* Moved isNodeFocusable to ve.ce.NodeFactory
* Added isFocusable static property to ve.ce.Node
* Set isFocusable to true on ve.ce.FocusableNode
Change-Id: I3cf666280abdfce55bf9b0710827bb25c40bfd51
This was probably correct by default on OSX but Ubuntu's
default theme uses an orange highlight, and Windows uses
dark blue.
Change-Id: I601c2d27f6d928b38799f3a6502de5be1dccc199
Was previously calling show(), which showed the context regardless
of whether one was required or not. Changed this to update().
Change-Id: I2c6c37b6b988cca60f3f3f2429476ab4b429184b
Because of the change to ButtonWidget, the button returned false after
onClick and as a result, ULS dialog didn't open.
This fix adds a fake 'href' value to the PushButtonWidget instance
in ve.ui.LanguageInputWidget so clicking the 'change language' button
continues to evoke ULS.
(Notice, this widget will soon be split into ve-MW with a smaller fallback
widget in core, but for now, this fixes the fact ULS doesn't appear when it
should)
Change-Id: I32eabdc5ee1b3681c20c756f45a3257c7a0b5681
Fix things that 4aa86d0f8 broke:
* Update surface parameter to windowSet in all ve.ui.SurfaceDialog subclasses
* Do the same for ve.ui.SurfaceInspector subclasses
* Fix @extends documentation for SurfaceDialog
* Fix documentation for ve.ui.SurfaceInspector, copypasta from SurfaceDialog
Bonus:
* Add .getMetaList() getter to dm.Surface
Change-Id: I843e99e45e9b013cb9cb559f050384d39bbbddf2
Instead select the node and require the user to press delete
again if they really meant to delete the node.
Also test cases!
Bug: 55336
Change-Id: I66520e18740e78ce6313f9b31bb575d06b91bea8
Also make sure surface observers are detached so they don't try to
poll the CE when it has been destroyed. This was causing exceptions
to be thrown in test runners.
Change-Id: Ic8864a73f3ee04da6018f552b1aa68748d7ffba7
ve.EventSequencer.js:
* Initialise listener lists to []
* Call afterLoop listeners even if there are no after listeners
Change-Id: I63a0bafa74f2c3135bd3ca75adc91a57c19319ed
Major changes:
* Create a MW specific save dialog class
* Widgetize save dialog elements
* Simplification of viewPageTarget
Minor changes:
* Added getWindow method to windowSet and setTitle methods to window class
* Add transition css properties to dialog styles
Bug: 48566
Bug: 50722
Bug: 51918
Bug: 52175
Bug: 53313
Change-Id: I8c0db01fb8477a9b3d3dfe2a6073ac67869ce40e
ve.EventSequencer.js - Implement new types of event listener:
* onLoop( f ) to set a listener for the start of the event loop
* afterLoop( f ) to set a listener for the end of the event loop
* afterOne( f ) to set a one-time listener for after an event
* afterLoopOne( f ) to set a one-time listener for the end of the event loop
Change-Id: Ie388e0e9edcfccaa20e04c649a8b85d028ddde9c
What I learned today:
* Window doesn't have a scrollTop property, body does (that's why animate
doesn't work on window)
* jQuery.scrollTop() doesn't work on body (in firefox) but works on
window everywhere
* jQuery.scrollTop() uses scroll offset, not the scrollTop property
* Body doesn't have an onscroll event, window does
What I really learned today:
* Browsers are very poorly designed
Objective:
* Make clippable elements properly resize in Firefox when scrolled
Diagnosis:
* Scroll events were not being emitted from the scrollable container
after the merge of Ifec0dae598f7fd99270588bd8ca77777a07e9669 because
such events are not emitted from body tags, only scrollable divs and
windows
* jQuery.scrollTop was giving incorrect values when called on the body
instead of the window, so also due to the aforementioned change, the
clipping was being calculated incorrectly
Treatment:
* Add $clippableScroller property, which is either a scrollable div or
the window (could this have side-effects if someone did something
ridiculous like made the body absolutely positioned and overflow:auto?
Yes, but I have no other option and that's a strange edge case don't
you think?)
* Use $clippableScroller for listening to scroll events and getting the
scrollTop value from jQuery
Bug: 55343
Change-Id: I819aba60b200059886b347115fda437b3dc9cb7a
Objective:
* Remove surface dependencies in dialogs, inspectors, windows and window sets
* Introduce surface-specific versions of dialogs, inspectors and window sets
Change-Id: I2db59127d2085b02e173a3605e174317e419e213