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

Support simplecolorpicker in flask-admin and new list_html_formatters method #58

Closed
wants to merge 2 commits into from
Closed

Support simplecolorpicker in flask-admin and new list_html_formatters method #58

wants to merge 2 commits into from

Conversation

klinkin
Copy link
Contributor

@klinkin klinkin commented Sep 11, 2012

Hi Sergey,

  1. I added support simplecolorpicker (https://github.com/tkrotoff/jquery-simplecolorpicker)

See screenshot http://cl.ly/image/2p3a1i0R4218

  1. Then add new list_html_formatters method

See screenshot http://cl.ly/image/1v0b1I1W1p1t

Soon i prepare tests new function and an example of using.

Could this be an interesting for you?

@plaes
Copy link
Contributor

plaes commented Sep 12, 2012

+1 for the list_html_formatters idea, despite the yet another extra property. I wish there was a simple way for the list_formatters to call Jinja2's safe filter.

-1 on including the colorpicker in core. Mostly because html5 defines color input type and secondly - it's probably

@klen
Copy link

klen commented Sep 12, 2012

I agree with @plaes

@plaes
Copy link
Contributor

plaes commented Sep 12, 2012

Hack warning!

Distinguish between safe and unsafe return values in list_formatters:
plaes@843273a

@mrjoes
Copy link
Member

mrjoes commented Sep 13, 2012

Decided to implement it differently.

Now, list formatting callback will accept jinja2 context and with context you can call jinja2 macros.

Sample how to add colorpicker is here: https://gist.github.com/3714266

@mrjoes mrjoes closed this Sep 13, 2012
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.

None yet

4 participants