Hey I got a question regarding sortables. I can drag and drop the items on a
page to different locations. But when I refresh the page the contraols are
goin to their inital positions. Is there any way that I can make them stay
in their new positions even after post back (refresh)??? Thank you.
On 11/11/05, rails-spinoffs-request@lists.rubyonrails.org <
rails-spinoffs-request@lists.rubyonrails.org> wrote:>
> Send Rails-spinoffs mailing list submissions to
> rails-spinoffs@lists.rubyonrails.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
> or, via email, send a message with subject or body 'help' to
> rails-spinoffs-request@lists.rubyonrails.org
>
> You can reach the person managing the list at
> rails-spinoffs-owner@lists.rubyonrails.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Rails-spinoffs digest..."
>
>
> Today's Topics:
>
> 1. RE: array.each() on associative array? (Gregory Hill)
> 2. RE: Drag & Scroll (Gregory Hill)
> 3. Re: array.each() on associative array? (Thomas Fuchs)
> 4. AW: [Rails-spinoffs] array.each() on associative array?
> (Stich, Josef)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 11 Nov 2005 08:35:06 -0700
> From: "Gregory Hill" <Gregory_Hill@tni.com>
> Subject: RE: [Rails-spinoffs] array.each() on associative array?
> To: <rails-spinoffs@lists.rubyonrails.org>
> Message-ID:
> <A4A0540383098A489C41BF98C77AEE5DE7190D@USMAIL104.morinda.com>
> Content-Type: text/plain; charset="us-ascii"
>
> Can't you just do this? It's built into javascript:
>
>
> for (key in arrayname) {
> alert(key + '=' + arrayname[key]);
>
> }
>
>
>
>
>
> ________________________________
>
> From: rails-spinoffs-bounces@lists.rubyonrails.org
> [mailto:rails-spinoffs-bounces@lists.rubyonrails.org] On Behalf Of
> Stich, Josef
> Sent: Friday, November 11, 2005 3:32 AM
> To: rails-spinoffs@lists.rubyonrails.org
> Subject: [Rails-spinoffs] array.each() on associative array?
>
>
>
> Hi List!
>
>
>
> Is there a way to iterate through an associative array when prototype.js
> is used?
>
>
>
>
>
>
>
> arrayname.each(function (i) {
>
> alert(i);
>
> });
>
> seems to work only for numeric arrays.
>
>
>
>
>
> Thanks, Josef Stich
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
>
http://wrath.rubyonrails.org/pipermail/rails-spinoffs/attachments/20051111/a429ae7d/attachment-0001.html
>
> ------------------------------
>
> Message: 2
> Date: Fri, 11 Nov 2005 08:39:14 -0700
> From: "Gregory Hill" <Gregory_Hill@tni.com>
> Subject: RE: [Rails-spinoffs] Drag & Scroll
> To: <rails-spinoffs@lists.rubyonrails.org>
> Message-ID:
> <A4A0540383098A489C41BF98C77AEE5DE71911@USMAIL104.morinda.com>
> Content-Type: text/plain; charset="us-ascii"
>
> Ooh, that's a good idea about the parent element; I'll have to see
> what's possible there. We could provide the option to turn off
> scrolling or specify which element to scroll, but by default I think it
> should do the nearest parent element that is scrollable. That seems the
> most intuitive to me. I'll see what I can do.
>
> Greg
>
> -----Original Message-----
> From: rails-spinoffs-bounces@lists.rubyonrails.org
> [mailto:rails-spinoffs-bounces@lists.rubyonrails.org] On Behalf Of
> Thomas Fuchs
> Sent: Friday, November 11, 2005 2:49 AM
> To: rails-spinoffs@lists.rubyonrails.org
> Subject: Re: [Rails-spinoffs] Drag & Scroll
>
> Thanks for this, i'll definitely want to include it!
>
> What I want to see too is support for scrolling containers that have
> overflow:auto/scroll set. Could this be added?
>
> It should probably search for first parent that has overflow:auto set,
> if none is found, scroll the page.
>
> Maybe there should be some options to better control this, like
> a scroll: option that take an element (and defaults to body). if you
> set scroll:false then no scrolling takes place.
>
> What do you think?
>
> Cheers,
> Thomas
>
> Am 10.11.2005 um 22:27 schrieb Gregory Hill:
>
> > Ok, here's the best working version I can come up with.
There's
> > still a
> > little bit of choppiness, especially in Opera and Safari. Mozilla is
> > pretty smooth, at least on my computer. Someone who knows the
> > draggable
> > code might know better how to smooth out the jerkiness; I dunno. It
> > would be awesome if Thomas could include this in the scriptaculous
> > library, but I imagine he won't want to add something tested so
little
> > just before a major release. I was able to get this working on IE
> > 5.5 &
> > 6.0, Firefox 1.0.7, Safari 1.3, and Opera 8.5. Scrolling up and
> > left is
> > jerkier than down and right on all of them, and sometimes it
> > renders the
> > dragging element in the middle of the page instead of where the cursor
> > is (it flickers back and forth). Not sure how to correct that. So,
> > here's the code, hopefully someone a little more intimately
familiar
> > with scriptaculous can work out the kinks and get it included.
> >
> > Thanks,
> > Greg
>
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
>
> ------------------------------
>
> Message: 3
> Date: Fri, 11 Nov 2005 16:50:03 +0100
> From: Thomas Fuchs <t.fuchs@wollzelle.com>
> Subject: Re: [Rails-spinoffs] array.each() on associative array?
> To: rails-spinoffs@lists.rubyonrails.org
> Message-ID: <CBB6674B-C790-43EA-93BD-BDD4F222EEFC@wollzelle.com>
> Content-Type: text/plain; charset=WINDOWS-1252; delsp=yes;
> format=flowed
>
> Be careful with for .. in .. loops when you're treating objects as
> associative arrays.
>
> for .. in .. iterates over all properties, which include functions
> the object has.
>
> So, having an object like this:
>
> var obj = {
> a: 1,
> b: 2,
> test: function() { }
> }
>
> for .. in ... will iterate over a, b, and test.
>
>
> A "safer" way to call for .. in .. goes like this:
>
> for (p in obj) if(typeof obj[p] != 'function) alert(p + '=' +
obj[p]);
>
> Btw, it would probably ne a nice thing to have something like that in
> Prototype, so that this could be called like so:
>
> MyObj.each( function(k,v) { /* do somehting */ } )
>
> for designated "Hash" variables:
>
> $H({ a:1, b:2 }).each( function(k,v) { ... });
>
> Any thoughts?
>
> Cheers,
> Thomas
>
>
> Am 11.11.2005 um 16:35 schrieb Gregory Hill:
>
> > Can't you just do this? It's built into javascript:
> >
> >
> > for (key in arrayname) {
> > alert(key + '=' + arrayname[key]);
> >
> > }
> >
> >
> >
> >
> >
> > From: rails-spinoffs-bounces@lists.rubyonrails.org [mailto:rails-
> > spinoffs-bounces@lists.rubyonrails.org] On Behalf Of Stich, Josef
> > Sent: Friday, November 11, 2005 3:32 AM
> > To: rails-spinoffs@lists.rubyonrails.org
> > Subject: [Rails-spinoffs] array.each() on associative array?
> >
> >
> >
> > Hi List!
> >
> >
> >
> > Is there a way to iterate through an associative array when
> > prototype.js is used?
> >
> >
> >
> >
> >
> >
> >
> > arrayname.each(function (i) {
> >
> > alert(i);
> >
> > });
> >
> > seems to work only for numeric arrays.
> >
> >
> >
> >
> >
> > Thanks, Josef Stich
> >
> >
> >
> > _______________________________________________
> > Rails-spinoffs mailing list
> > Rails-spinoffs@lists.rubyonrails.org
> > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
>
>
> ------------------------------
>
> Message: 4
> Date: Fri, 11 Nov 2005 17:42:28 +0100
> From: "Stich, Josef" <j.stich@bee4me.net>
> Subject: AW: [Rails-spinoffs] array.each() on associative array?
> To: <rails-spinoffs@lists.rubyonrails.org>
> Message-ID:
> <672D2E3C19E265448940CF35D2E6D4DF1884DD@mail.kreativhaus.at>
> Content-Type: text/plain; charset="utf-8"
>
> Prototype.js seems to extend the standard javascript array constructor. It
> adds some methods and properties.
>
>
>
> If I do the for (key in array) I get additional keys that I didn’t add.
>
>
>
> ________________________________
>
> Von: rails-spinoffs-bounces@lists.rubyonrails.org [mailto:
> rails-spinoffs-bounces@lists.rubyonrails.org] Im Auftrag von Gregory Hill
> Gesendet: Freitag, 11. November 2005 16:35
> An: rails-spinoffs@lists.rubyonrails.org
> Betreff: RE: [Rails-spinoffs] array.each() on associative array?
>
>
>
> Can’t you just do this? It’s built into javascript:
>
>
> for (key in arrayname) {
> alert(key + ‘=’ + arrayname[key]);
>
> }
>
>
>
>
>
> ________________________________
>
> From: rails-spinoffs-bounces@lists.rubyonrails.org [mailto:
> rails-spinoffs-bounces@lists.rubyonrails.org] On Behalf Of Stich, Josef
> Sent: Friday, November 11, 2005 3:32 AM
> To: rails-spinoffs@lists.rubyonrails.org
> Subject: [Rails-spinoffs] array.each() on associative array?
>
>
>
> Hi List!
>
>
>
> Is there a way to iterate through an associative array when prototype.jsis
used?
>
>
>
>
>
>
>
> arrayname.each(function (i) {
>
> alert(i);
>
> });
>
> seems to work only for numeric arrays.
>
>
>
>
>
> Thanks, Josef Stich
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
>
http://wrath.rubyonrails.org/pipermail/rails-spinoffs/attachments/20051111/56957cda/attachment.html
>
> ------------------------------
>
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
>
> End of Rails-spinoffs Digest, Vol 6, Issue 17
> *********************************************
>
--
Kiran Nibbaragandla
Software Developer,
Nationwide Card Services, Inc.
Phone: +1 901-383-4151x24
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs