[ 10 posts ]

Zaar Hai

YUI Contributor

  • Username: haizaar
  • Joined: Tue Sep 20, 2011 7:18 am
  • Posts: 46
  • GitHub: haizaar
  • Gists: haizaar
  • Offline
  • Profile
Tags:

Django admin-like SelectBox in YUI3?

Post Posted: Mon Jan 30, 2012 1:13 am
+0-
Good day!

Is there SelectBox widget similar to one used by Django admin for user permissions? Like here: http://imagebin.org/196299.

Thank you,
Zaar

Alberto Santini

YUI Contributor

  • Offline
  • Profile

Re: Django admin-like SelectBox in YUI3?

Post Posted: Mon Jan 30, 2012 2:07 am
+0-
Hello haizaar.

Did you give a look at Autocomplete widget?

http://yuilibrary.com/yui/docs/autocomplete/

Hope that helps,
IceBox

P.S.: I think I misunderstood the request. :) Maybe there is something similar in the gallery, but I don't remember exactly the name.

Zaar Hai

YUI Contributor

  • Username: haizaar
  • Joined: Tue Sep 20, 2011 7:18 am
  • Posts: 46
  • GitHub: haizaar
  • Gists: haizaar
  • Offline
  • Profile

Re: Django admin-like SelectBox in YUI3?

Post Posted: Wed Feb 01, 2012 12:28 am
+0-
Thanks Alberto.

Unfortunately I've tried searching gallery before posing and have not found anything similar.

Regards,
Zaar

Todd Smith

YUI Contributor

  • Username: stlsmiths
  • Joined: Thu Nov 05, 2009 10:03 am
  • Posts: 675
  • GitHub: stlsmiths
  • Gists: stlsmiths
  • IRC: t_smith
  • Offline
  • Profile
Tags:

Re: Django admin-like SelectBox in YUI3?

Post Posted: Wed Feb 01, 2012 6:23 am
+0-
Zaar,

I worked up a simple widget in 2.x a few years ago http://www.blunderalong.com/pub/pick_list_widget.html that was basically a starter project for working with HTML Listboxes. It was very basic, not pretty, but functional. I might be able to rework it in YUI 3 if there is any interest.

For what it's worth!

Todd

Zaar Hai

YUI Contributor

  • Username: haizaar
  • Joined: Tue Sep 20, 2011 7:18 am
  • Posts: 46
  • GitHub: haizaar
  • Gists: haizaar
  • Offline
  • Profile
Tags:

Re: Django admin-like SelectBox in YUI3?

Post Posted: Wed Feb 01, 2012 6:32 am
+0-
Hello Todd!

Yes, I'm very interested!
This widget is exactly what I need. If you can rework it for YUI3, it will be just excellent!

Thanks,
Zaar

Todd Smith

YUI Contributor

  • Username: stlsmiths
  • Joined: Thu Nov 05, 2009 10:03 am
  • Posts: 675
  • GitHub: stlsmiths
  • Gists: stlsmiths
  • IRC: t_smith
  • Offline
  • Profile

Re: Django admin-like SelectBox in YUI3?

Post Posted: Mon Feb 06, 2012 12:14 pm
+0-
Hi Zaar,

Well I did a little work upgrading the "multi-select" PickList that I had given you before, which was a 2.8 widget, and worked something up as a YUI 3 widget. There is an example of using it at http://blunderalong.com/yui/picklist.html.

Let me throw out a few caveats;
* It ain't pretty ... I have "no style" :-). Seriously, you may want to work on CSS for the template.
* It's my first "real" YUI 3 widget. I tried to properly .destroy and remove listeners, but use at your own peril.
* The present design is "stack" mode, wherein if an OPTION is moved from one SELECT, it moves the whole thing over, doesn't leave a reference to the original.
* My documentation of the internal methods, etc ... well they suck too.
* It uses 3.5.0pr2 as the CDN, because it uses Y.Button.

Anyway, try it out. Modify it, redesign it, or forget about it. It doesn't cost anything to try it though.

Take care,

Todd

Todd Smith

YUI Contributor

  • Username: stlsmiths
  • Joined: Thu Nov 05, 2009 10:03 am
  • Posts: 675
  • GitHub: stlsmiths
  • Gists: stlsmiths
  • IRC: t_smith
  • Offline
  • Profile
Tags:

Re: Django admin-like SelectBox in YUI3?

Post Posted: Tue Feb 07, 2012 9:32 am
+0-
Zaar,

I also posted this Picklist widget to the gallery at http://yuilibrary.com/gallery/show/picklist if you're interested.

Todd

Zaar Hai

YUI Contributor

  • Username: haizaar
  • Joined: Tue Sep 20, 2011 7:18 am
  • Posts: 46
  • GitHub: haizaar
  • Gists: haizaar
  • Offline
  • Profile
Tags:

Re: Django admin-like SelectBox in YUI3?

Post Posted: Wed Feb 08, 2012 1:08 am
+0-
Wow, Todd!
Thank you so much for this effort!

I'll definitely use this widget. If I'll find any bugs I'll be happy to let your know.

Is there a chance you can also implement a filtering of results in left column, i.e. put an input field above left options box that will filter values in left column based on string in input field (see my original screenshot)?

Thank you again,
Zaar

Todd Smith

YUI Contributor

  • Username: stlsmiths
  • Joined: Thu Nov 05, 2009 10:03 am
  • Posts: 675
  • GitHub: stlsmiths
  • Gists: stlsmiths
  • IRC: t_smith
  • Offline
  • Profile

Re: Django admin-like SelectBox in YUI3?

Post Posted: Wed Feb 08, 2012 2:40 pm
+0-
Don't really think I have the time to workup a filtering option for this. The concept is almost identical.

As Alberto said before, you would basically use an AutoComplete on the left-hand side and set a "select" handler to add selections to the right-hand "selected" options. The devil is in the details.

Todd

Zaar Hai

YUI Contributor

  • Username: haizaar
  • Joined: Tue Sep 20, 2011 7:18 am
  • Posts: 46
  • GitHub: haizaar
  • Gists: haizaar
  • Offline
  • Profile
Tags:

Re: Django admin-like SelectBox in YUI3?

Post Posted: Thu Feb 09, 2012 8:27 am
+0-
I understand.

Thank you again for initial push.
I'll try to extend your work.

Best regards,
Zaar
  [ 10 posts ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum