Run user select Js only where needed
Created by: cirosantilli
Transform current implementation into regular Coffescript classes so that the same call method can be reused on the dispatcher as for other classes.
Same rationale as: https://github.com/gitlabhq/gitlabhq/pull/8123
I have built the map by grepping for the touched classes + testing it out.
Double check
That I didn't make any mistakes when converting the existing coffee into classes.
The only changes are:
-
formatResult
andformatSelection
became instance methods. For this to work, callbacks that use them need to bind with=>
instead of->
( to avoid repeating class names by using the bindedthis
) - removed the prefix from instance methods, e.g.
userFormatSelection
became justformatSelection
since it is already inside theUserSelect
class