Snippet List
A simple model ColorField that allows picking from a predefined list (currently picked up from settings.py
The widget displays as a row of coloured SPAN's with the hex code inside. Simply click to choose a color.
(requires jQuery in the page assigned to it's normal $ shortcut. Easy to change this is you don't use jQuery in this way)
- models
- admin
- jquery
- widget
- custom-field
- modelfield
Add this to any admin changelist and your actions drop-down will be replaced with user-friendly buttons.
Why mess around with templates and subclassing admin classes when you can just mangle the page with jQuery! ;-)
It also adds a 'select all' label to explain the mystery top check-box (well it was a mystery to several of my clients).
The line "if ($('div.actions option:gt(0)').length<=8)" checks that there aren't more than 8 actions and falls back to the drop-down if there are.
Requires jQuery to be loaded.
andybak has posted 4 snippets.