Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

twinklewarn - Treat userlink properly for uw-aiv #432

Merged

Conversation

Amorymeltzer
Copy link
Collaborator

Fixes #404
The function to change the input label for certain warnings (change_subcategory) is only called when changing items in the submenu, so since uw-aiv is the first item, it won't show unless you change submenu items rather than the main category menu. This is obviously less-than-ideal, but still an improvement over the current situation.

@MusikAnimal
Copy link
Collaborator

MusikAnimal commented Nov 11, 2018

I haven't tested, but would it work to call Twinkle.warn.callback.change_subcategory(e) at the bottom of the createEntries function? From the looks of it, e.target.form would be the same so twinklewarnCallbackChangeSubcategory won't care. Still kind of sloppy, I suppose.

@Amorymeltzer
Copy link
Collaborator Author

Putting it at the end of Twinkle.warn.callback.change_category did the trick; there're some cleanup functions there.

@MusikAnimal MusikAnimal merged commit 75cad1a into wikimedia-gadgets:master Nov 27, 2018
Amorymeltzer added a commit to Amorymeltzer/twinkle that referenced this pull request Jun 6, 2019
Closes wikimedia-gadgets#659.  Changing changing a selection via `jquery.chosen` didn't trigger `change_subcategory`.  We still need the extra `Twinkle.warn.callback.change_subcategory(e)` call from wikimedia-gadgets#432 to update display on simply `change_category` but I don't think we need the initial event in `sub_group` if we're using chosen
Amorymeltzer added a commit to Amorymeltzer/twinkle that referenced this pull request Jun 6, 2019
Closes wikimedia-gadgets#659.  Changing selection from a `jquery.chosen` menu doesn't trigger `change_subcategory` since the event was attached to the original select.  We still need the extra `Twinkle.warn.callback.change_subcategory(e)` call from wikimedia-gadgets#432 to update display on simply `change_category` as well as the original, initial event in `sub_group` for users who opt-out of the new `jquery.chosen` display (wikimedia-gadgets#661)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants