Re: Best UI for letting users select an item from a large selection of records?

2009-11-27 Thread David De La Harpe Golden
Stodge wrote:
> Thanks. I have the DataTables plugin working so I can filter my
> records. Now I just need to work out how to select specific ones from
> the table and work with them.
> 

Well, that depends a bit on what you want. if you, say, used javascript
 to directly populate a field in a html form when the user clicks on a
row in the datatable, you're pretty firmly tied to functioning
javascript, but it should be straightforward enough.
http://www.datatables.net/examples/example_select_single_row.html

One thing to consider could be actual click-through html links on each
row in the table that go to a small helper view taking the ticket and
relevant requirement as parameters that performs the desired
association, possibly after prompting for confirmation, then redirect
back to the main page.  At first glance, that might seem unpleasant,
because the user apparently navigates away - However once you have got
that basic interaction working, you can go back and use jquery to
intercept clicking the link and make the request in an ajax manner so
that the user doesn't navigate away from the main page.  Django has
request.is_ajax() you can use in the helper view to detect and respond
appropriately to ajax requests from jquery.   This approach has the
advantage of progressive enhancement (or graceful degradation) like
datatables itself - the ui doesn't become unusable just because
javascript is disabled, it just gets clunkier.  It also means you can
focus on getting something working , then worry about javascript
wierdness.  The ticket object also kinda has to already exist for this
approach to be simple, but you can have separate "ticket add" and
"ticket edit" views with the former only asking for a subset of
essential fields, say.














--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: Best UI for letting users select an item from a large selection of records?

2009-11-27 Thread Margie Roginski
After much struggling on this same topic, I found that autocomplete
was by far better than a dropdown or a set of chained dropdowns.  I
looked at a variety of jquery autocomplete packages, and eventually
settled on this one, which has worked very well for me:

http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/

It is unfortunately maintained in a somewhat haphazard way (as you'll
see from the blog that that link takes you to).  But on firefox at
least, I find that the 1.1 verson works fine.  It has the nice feature
that the user can put in multiple entries.  For example, in my case, I
have an autocomplete field where teh user needs to be able to enter
one or more names of users, and this package allowed that whereas the
standard one on the jquery site only allowed you to enter one.

Margie

On Nov 26, 5:47 am, Stodge  wrote:
> I have a Ticket model that has a Requirement foreign key. The problem
> is, there could be hundreds of requirements. Offering the user a drop
> down combo box of requirements to choose from isn't the best option.
> So how would you let the user select one record from a large
> selection? What UI widget(s) would you use?
>
> I suppose I could create an auto-complete text box widget that offers
> a list of requirements that matches what they typed. But that's a lot
> of work for someone who doesn't know Javascript (though I do have
> JQuery plugged into my app) and I don't want to spend hours coding it
> to find out it's not the best solution. Any suggestions appreciated.
>
> Thanks

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: Best UI for letting users select an item from a large selection of records?

2009-11-27 Thread Stodge
Thanks. I have the DataTables plugin working so I can filter my
records. Now I just need to work out how to select specific ones from
the table and work with them.

On Nov 26, 9:31 am, David De La Harpe Golden
 wrote:
> Stodge wrote:
> > Offering the user a drop
> > down combo box of requirements to choose from isn't the best option.
>
> Rant: combo box /means/ a text entry widget plus dropdown menu "combo".
>  For some reason web developers in particular seem prone to using it to
> mean a dropdown alone (html forms sadly lack built-in combo boxes, of
> course)http://en.wikipedia.org/wiki/Combo_box
>
> > I suppose I could create an auto-complete text box widget that offers
> > a list of requirements that matches what they typed. But that's a lot
> > of work for someone who doesn't know Javascript (though I do have
> > JQuery plugged into my app)
>
> If you're using jquery there are quite a few ready-made jquery plugins
> that mean you can make a combo box (for various ideas of what
> a combo box is or should be) quickly. Kinda one of the points of jquery
> is the large array of plugins, though with the usual problems of plugins
> - variable quality and design.
>
> Here's a couple of 
> examples:http://phone.witamean.net/sexy-combo/examples/index.htmlhttp://www.fairwaytech.com/Technology/FlexBoxDemo.aspx#demo8
> see the jquery plugins list:http://plugins.jquery.com/
> search for "combo" or "autocomplete" or "autosuggest".
>
> OTOH, a combo box might still be a cramped interface. One could
> e.g. present a filterable table with the likes of 
> dataTables.http://www.datatables.net/

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: Best UI for letting users select an item from a large selection of records?

2009-11-26 Thread David De La Harpe Golden
Stodge wrote:

> Offering the user a drop
> down combo box of requirements to choose from isn't the best option.

Rant: combo box /means/ a text entry widget plus dropdown menu "combo".
 For some reason web developers in particular seem prone to using it to
mean a dropdown alone (html forms sadly lack built-in combo boxes, of
course)
http://en.wikipedia.org/wiki/Combo_box

> I suppose I could create an auto-complete text box widget that offers
> a list of requirements that matches what they typed. But that's a lot
> of work for someone who doesn't know Javascript (though I do have
> JQuery plugged into my app) 

If you're using jquery there are quite a few ready-made jquery plugins
that mean you can make a combo box (for various ideas of what
a combo box is or should be) quickly. Kinda one of the points of jquery
is the large array of plugins, though with the usual problems of plugins
- variable quality and design.

Here's a couple of examples:
http://phone.witamean.net/sexy-combo/examples/index.html
http://www.fairwaytech.com/Technology/FlexBoxDemo.aspx#demo8
see the jquery plugins list:
http://plugins.jquery.com/
search for "combo" or "autocomplete" or "autosuggest".

OTOH, a combo box might still be a cramped interface. One could
e.g. present a filterable table with the likes of dataTables.
http://www.datatables.net/






--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: Best UI for letting users select an item from a large selection of records?

2009-11-26 Thread Stodge
Thanks. No, I'm not talking about the admin interface - sorry I should
have made that clear. I'm talking about the front end UI.

On Nov 26, 9:11 am, Michel Thadeu Sabchuk  wrote:
> Hi,
>
> > I have a Ticket model that has a Requirement foreign key. The problem
> > is, there could be hundreds of requirements. Offering the user a drop
> > down combo box of requirements to choose from isn't the best option.
> > So how would you let the user select one record from a large
> > selection? What UI widget(s) would you use?
>
> Do you talking about admin interface? You can use raw_id_fields on the
> ModelAdmin class and this way, your user may inform the ID of the
> foreign key he wants, but it have a link to a popup list of item the
> user can filter.
>
> > I suppose I could create an auto-complete text box widget that offers
> > a list of requirements that matches what they typed. But that's a lot
> > of work for someone who doesn't know Javascript (though I do have
> > JQuery plugged into my app) and I don't want to spend hours coding it
> > to find out it's not the best solution. Any suggestions appreciated.
>
> I like the raw_id_fields approach for general use, it offer a great
> flexibility with less code. Anyway, a widget that shows choices as the
> users digits is easier for the user.
>
> I did something on this approach on a brazilian classifieds portal:
>
> http://portaldoclassificado.com/
>
> You can take a look on his javascript code (it do not use jquery). The
> script filter a hidden ul subitens as the user digits on a input
> field.
>
> Best regards!
>
> PS: sorry any language mistakes.
>
> --
> Michel Sabchuk
> Curitiba / Brasil

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: Best UI for letting users select an item from a large selection of records?

2009-11-26 Thread Michel Thadeu Sabchuk
Hi,

> I have a Ticket model that has a Requirement foreign key. The problem
> is, there could be hundreds of requirements. Offering the user a drop
> down combo box of requirements to choose from isn't the best option.
> So how would you let the user select one record from a large
> selection? What UI widget(s) would you use?

Do you talking about admin interface? You can use raw_id_fields on the
ModelAdmin class and this way, your user may inform the ID of the
foreign key he wants, but it have a link to a popup list of item the
user can filter.

> I suppose I could create an auto-complete text box widget that offers
> a list of requirements that matches what they typed. But that's a lot
> of work for someone who doesn't know Javascript (though I do have
> JQuery plugged into my app) and I don't want to spend hours coding it
> to find out it's not the best solution. Any suggestions appreciated.

I like the raw_id_fields approach for general use, it offer a great
flexibility with less code. Anyway, a widget that shows choices as the
users digits is easier for the user.

I did something on this approach on a brazilian classifieds portal:

http://portaldoclassificado.com/

You can take a look on his javascript code (it do not use jquery). The
script filter a hidden ul subitens as the user digits on a input
field.

Best regards!

PS: sorry any language mistakes.

--
Michel Sabchuk
Curitiba / Brasil

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Best UI for letting users select an item from a large selection of records?

2009-11-26 Thread Stodge
I have a Ticket model that has a Requirement foreign key. The problem
is, there could be hundreds of requirements. Offering the user a drop
down combo box of requirements to choose from isn't the best option.
So how would you let the user select one record from a large
selection? What UI widget(s) would you use?

I suppose I could create an auto-complete text box widget that offers
a list of requirements that matches what they typed. But that's a lot
of work for someone who doesn't know Javascript (though I do have
JQuery plugged into my app) and I don't want to spend hours coding it
to find out it's not the best solution. Any suggestions appreciated.

Thanks

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.