Page MenuHomePhabricator

Overlay, Panel and Drawer should use View##events
Closed, ResolvedPublic

Description

They currently use this.$( '.selector' ).on instead
The View class has an events property that these classes should use instead to bind their events.

Someone needs to separate the click events into event handlers e.g. onThisAction

Event Timeline

Jdlrobson raised the priority of this task from to Needs Triage.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a project: Web-Team-Backlog.
Jdlrobson moved this task to Triaged but Future on the Web-Team-Backlog board.
Jdlrobson subscribed.
Jdlrobson set Security to None.
Jdlrobson renamed this task from Overlay and Drawer should use events property for its event bindings to Overlay, Panel and Drawer should use events property for its event bindings.Feb 2 2015, 5:33 PM

@Jdlrobson, if I get this right, we have to change the jquery event handlers to handlers defined by the native MobileFrontend OO library?

@Sumit EditorOverlayBase is a good example. Take a look at events and onClickSubmit function. Basically we don't want to bind events in the postRender function for these classes.

Jdlrobson renamed this task from Overlay, Panel and Drawer should use events property for its event bindings to Overlay, Panel and Drawer should use View##events.Feb 4 2015, 3:31 PM
gerritbot subscribed.

Change 188673 had a related patch set uploaded (by Sumit):
Overlay,Panel,Drawer made to use View##events

https://gerrit.wikimedia.org/r/188673

Patch-For-Review

@Sumit thanks for the patch! :D, i've left a buncha comments, this are very basic views so we have to make sure they extend their parents events, and check child classes and if they use events map, extend from this ones we are modifying.

I'm a bit scared we are going to miss something and break stuff subtly for millions of people! we gotta be careful ;)

Thanks again!

Change 188673 merged by jenkins-bot:
Overlay, Panel, Drawer made to use View##events

https://gerrit.wikimedia.org/r/188673

Sumit claimed this task.