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

Pre-populate party names depending on country #43

Open
slashme opened this issue Aug 9, 2017 · 2 comments
Open

Pre-populate party names depending on country #43

slashme opened this issue Aug 9, 2017 · 2 comments

Comments

@slashme
Copy link
Owner

slashme commented Aug 9, 2017

How about the user being able to choose a country and then having popular parties' data ready?

@hugolpz
Copy link

hugolpz commented Apr 24, 2018

Faster hack, could be done by exploiting available code such :

{{legend|#870000|MHP: 36 seats}} {{legend|#FFC300|AK Party: 316 seats}} {{legend|#EB0000|CHP: 116 seats}} {{legend|#05CEED|İYİ: 20 seats}} {{legend|#CF00C1|HDP: 48 seats}} {{legend|#FFFFFF|Vacant: 13 seats}} {{legend|#B0B0B0|Independents: 1 seat}}

So there is a bijection between apps and generated code. The apps filled by user produces a diagram and code. The code can be pasted back into the apps and parsed so to reproduce the diagram.

Requirements :

  • a text area
  • a regex to convert the wikicode into and array of objects
  • some jquery to regenerate and fill the fields by party

@slashme
Copy link
Owner Author

slashme commented Apr 24, 2018

That's a very good idea. It also allows the user to copy and paste legend data from an old diagram. I can code this; I'll just have to think carefully about security issues around parsing user-submitted text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants