draggable lists

26 views
Skip to first unread message

Hernan Astudillo

unread,
Apr 23, 2012, 1:51:52 PM4/23/12
to activescaffold
For HABTM relations, draggable lists are awesome, but sadly they look ugly.

Basic problems:

- colors are too strong for backgrounds, and doesn't fit with rest of AS colouring
- margin/padding needs fixing: they get sticked to other form elements. Looks like overlapped.
- visual impresion is way different from a form element.

I was trying to add classes to both DL elements, but conf.options[:column].options => {:class => 'xxx'} doesn't seem to work. (actually, that attribute gets overrided at active_scaffold_input_options() with element id ).

I wanted to add the "well" class from twitter-bootstrap which gives an adequate look&feel.

So, questions are:

1) how can i add classes to dl lists, or is it a bug, or is it needs an override?

2) since the default look is ugly, and doesn't seems right to be overriding by default every time you use it, how about giving a little touch of love to that nasty default CSS?

cheers,

Sergio Cambra

unread,
Apr 27, 2012, 6:07:48 AM4/27/12
to actives...@googlegroups.com
On Lunes, 23 de abril de 2012 13:51:52 Hernan Astudillo escribió:
> For HABTM relations, draggable lists are awesome, but sadly they look ugly.
>
> Basic problems:
>
> - colors are too strong for backgrounds, and doesn't fit with rest of AS
> colouring
> - margin/padding needs fixing: they get sticked to other form elements.
> Looks like overlapped.
> - visual impresion is way different from a form element.
>
> I was trying to add classes to both DL elements, but
> conf.options[:column].options => {:class => 'xxx'} doesn't seem to work.
> (actually, that attribute gets overrided at active_scaffold_input_options()
> with element id ).
>
> I wanted to add the "well" class from twitter-bootstrap which gives an
> adequate look&feel.
>
> So, questions are:
>
> 1) how can i add classes to dl lists, or is it a bug, or is it needs an
> override?

Class is set in li tag, you should be able to define css styles with ".active-
scaffold .css_class .draggable-list" and ".active-scaffold .css_class
.draggable-list.selected"

>
> 2) since the default look is ugly, and doesn't seems right to be overriding
> by default every time you use it, how about giving a little touch of love
> to that nasty default CSS?

You can set in your css, below require active_scaffold line, styles like:
.active-scaffold .css_class .draggable-list {
}
.active-scaffold .css_class .draggable-list.selected {
}



Anyway, I can change the styles if you send them here, or send a pull request.

Reply all
Reply to author
Forward
0 new messages