Hi, What I need to know is how to change revert:true to revert:false from a draggable after I drop it on a droppable so it doesn''t return to its original place. Something like: [CODE] <!-- Draggable image --> <img alt="Product" id="item" src="icon.png"> <script type="text/javascript"> new Draggable(item,{revert:true});</script> <!-- Droppable Div --> <div id="droparea" style="height:100px;width:100px;"><script type="text/javascript">//Droppable CartDroppables.add(''droparea'', {onDrop:function(element, dropon, event){ /* REVERT FALSE */ }});</script>[/CODE] Thank you in advance! _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it''s FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>From the wiki:OnDrop: Called whenever a Draggable is released over the Droppable and the Droppable is accepts it. The callback gets two parameters: the Draggable element, and the Droppable element Never actually tried this, but: onDrop: function(draggable,droppable){ draggable.options.revert = false; } should work, right? Not sure when the revert() function gets invoked though... -Jerod On 2/26/06, ::Alex Rengel:: <songokuu28-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:> > Hi, > > What I need to know is how to change revert:true to revert:false from a > draggable after I drop it on a droppable so it doesn''t return to its > original place. > > Something like: > > > > [CODE] > > <!-- Draggable image --> > > <img alt="Product" id="item" src="icon.png"> > > <script type="text/javascript"> new Draggable(item,{revert:true > });</script> > > > > <!-- Droppable Div --> > > <div id="droparea" style="height:100px;width:100px;"> > <script type="text/javascript"> > //Droppable Cart > Droppables.add(''droparea'', {onDrop:function(element, dropon, event){ /* > REVERT FALSE */ }}); > </script> > [/CODE] > > > > Thank you in advance! > > ------------------------------ > Express yourself instantly with MSN Messenger! MSN Messenger<http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/> > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
It''s not working: draggable.options.revert is not working... Any other suggestions? Date: Sun, 26 Feb 2006 19:39:24 -0500From: jvenema-Re5JQEeQqe/a73O7la2tQg@public.gmane.org: rails-spinoffs-1W37MKcQCpIf0INCOvqR/jsJP3MJ7z13ZOWd9udUmOE@public.gmane.org: Re: [Rails-spinoffs] Question abour Draggables & Droppables>From the wiki:OnDrop: Called whenever a Draggable is released over the Droppable and the Droppable is accepts it. The callback gets two parameters: the Draggable element, and the Droppable elementNever actually tried this, but:onDrop: function(draggable,droppable){ draggable.options.revert = false; } should work, right? Not sure when the revert() function gets invoked though... -Jerod On 2/26/06, ::Alex Rengel:: <songokuu28-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote: Hi, What I need to know is how to change revert:true to revert:false from a draggable after I drop it on a droppable so it doesn''t return to its original place. Something like: [CODE] <!-- Draggable image --> <img alt="Product" id="item" src="icon.png"> <script type="text/javascript"> new Draggable(item,{revert:true});</script> <!-- Droppable Div --> <div id="droparea" style="height:100px;width:100px;"><script type="text/javascript">//Droppable CartDroppables.add(''droparea'', {onDrop:function(element, dropon, event){ /* REVERT FALSE */ }});</script>[/CODE] Thank you in advance! Express yourself instantly with MSN Messenger! MSN Messenger _______________________________________________Rails-spinoffs mailing listRails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it''s FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
<p align=\"left\"><b><font face=\"Arial\" size=\"2\">GFI MailSecurity''s HTML threat engine found HTML scripts in this email and has disabled them.</font></b></p>I think the first argument isn''t the draggable itself, but the element that is draggable. So the below would only work if you also stored a reference to the draggable in the element, like this... $(''someElement'').draggable = new Draggable($(''someElement''), {...options...} ); onDrop = function(draggableElement, droppable) { draggableElement.draggable.options.revert = false; } That should do the trick. ________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of ::Alex Rengel:: Sent: Monday, February 27, 2006 10:01 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: Re: [Rails-spinoffs] Question abour Draggables & Droppables It''s not working: draggable.options.revert is not working... Any other suggestions? ________________________________ Date: Sun, 26 Feb 2006 19:39:24 -0500 From: jvenema-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Question abour Draggables & Droppables >From the wiki: OnDrop: Called whenever a Draggable is released over the Droppable and the Droppable is accepts it. The callback gets two parameters: the Draggable element, and the Droppable element Never actually tried this, but: onDrop: function(draggable,droppable){ draggable.options.revert = false; } should work, right? Not sure when the revert() function gets invoked though... -Jerod On 2/26/06, ::Alex Rengel:: <songokuu28-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote: Hi, What I need to know is how to change revert:true to revert:false from a draggable after I drop it on a droppable so it doesn''t return to its original place. Something like: [CODE] <!-- Draggable image --> <img alt="Product" id="item" src="icon.png"> <Xcript type="text/javascript"><!-- new Draggable(item,{revert:true});--></Xcript> <!-- Droppable Div --> <div id="droparea" style="height:100px;width:100px;"> <Xcript type="text/javascript"><!-- //Droppable Cart Droppables.add(''droparea'', {onDrop:function(element, dropon, event){ /* REVERT FALSE */ }}); --></Xcript> [/CODE] Thank you in advance! ________________________________ Express yourself instantly with MSN Messenger! MSN Messenger <http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/> _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs ________________________________ Express yourself instantly with MSN Messenger! MSN Messenger <http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/> The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Ryan Gahl escribió:> > I think the first argument isn’t the draggable itself, but the element > that is draggable. So the below would only work if you also stored a > reference to the draggable in the element, like this… > > $(‘someElement’).draggable = new Draggable($(‘someElement’), > {…options…} ); > > onDrop = function(draggableElement, droppable) { > > draggableElement.draggable.options.revert = false; > > } > > That should do the trick. > > ------------------------------------------------------------------------ > > *From:* rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] *On Behalf Of > *::Alex Rengel:: > *Sent:* Monday, February 27, 2006 10:01 AM > *To:* rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > *Subject:* RE: Re: [Rails-spinoffs] Question abour Draggables & Droppables > > It''s not working: > > draggable.options.revert is not working... > > Any other suggestions? > > ------------------------------------------------------------------------ > > Date: Sun, 26 Feb 2006 19:39:24 -0500 > From: jvenema-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails-spinoffs] Question abour Draggables & Droppables > > >From the wiki: > > OnDrop: Called whenever a Draggable is released over the Droppable > and the Droppable is accepts it. The callback gets two parameters: > the Draggable element, and the Droppable element > > Never actually tried this, but: > > onDrop: function(draggable,droppable){ draggable.options.revert > false; } > > should work, right? Not sure when the revert() function gets > invoked though... > > -Jerod > > On 2/26/06, *::Alex Rengel::* <songokuu28-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org > <mailto:songokuu28-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org>> wrote: > > Hi, > > What I need to know is how to change revert:true to revert:false > from a draggable after I drop it on a droppable so it doesn''t > return to its original place. > > Something like: > > [CODE] > > <!-- Draggable image --> > > <img alt="Product" id="item" src="icon.png"> > > <script type="text/javascript"> new > Draggable(item,{revert:true});</script> > > <!-- Droppable Div --> > > <div id="droparea" style="height:100px;width:100px;"> > <script type="text/javascript"> > //Droppable Cart > Droppables.add(''droparea'', {onDrop:function(element, dropon, > event){ /* REVERT FALSE */ }}); > </script> > [/CODE] > > Thank you in advance! > > ------------------------------------------------------------------------ > > Express yourself instantly with MSN Messenger! MSN Messenger > <http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/> > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > <mailto:Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org> > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > ------------------------------------------------------------------------ > > Express yourself instantly with MSN Messenger! MSN Messenger > <http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/> > > The information transmitted in this electronic mail is intended only > for the person or entity to which it is addressed and may contain > confidential, proprietary, and/or privileged material. Any review, > retransmission, dissemination or other use of, or taking of any action > in reliance upon, this information by persons or entities other than > the intended recipient is prohibited. If you received this in error, > please contact the sender and delete the material from all computers. > > ------------------------------------------------------------------------ > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >Hi! I read these threat but draggableElement.draggable.options.revert = false; doesn''t work the error is: draggableElement.draggable has no properties Any Idea? Thanks! -- Mis Cosas http://blogs.sistes.net/Garito/
> Hi!> I read these threat but draggableElement.draggable.options.revert = > false; doesn''t work> the error is: draggableElement.draggable has no properties> Any Idea?> Thanks!> -- > Mis Cosas > http://blogs.sistes.net/Garito/Mis, Can we please see the rest of the code so we can put your question into better context to try to troubleshoot your problem? PS: A couple people on this list now have called me out as being a notorious "top-poster". I just want to let everyone know that I apologize if my posting style has not conformed to the group''s preferences, and I''m changing my ways :-) The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.
Ryan Gahl escribió:>> Hi! >> > > >> I read these threat but draggableElement.draggable.options.revert = >> false; doesn''t work >> > > >> the error is: draggableElement.draggable has no properties >> > > >> Any Idea? >> > > >> Thanks! >> > > >> -- >> Mis Cosas >> http://blogs.sistes.net/Garito/ >> > > > Mis, Can we please see the rest of the code so we can put your question > into better context to try to troubleshoot your problem? > > > PS: A couple people on this list now have called me out as being a > notorious "top-poster". I just want to let everyone know that I > apologize if my posting style has not conformed to the group''s > preferences, and I''m changing my ways :-) > > The information transmitted in this electronic mail is intended only for the > person or entity to which it is addressed and may contain confidential, > proprietary, and/or privileged material. Any review, retransmission, > dissemination or other use of, or taking of any action in reliance upon, > this information by persons or entities other than the intended recipient > is prohibited. If you received this in error, please contact the sender and > delete the material from all computers. > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >Sure! this is the complete options for the droppable I''d used: var opciones_papelera = { hoverclass: "PapeleraSeleccionada", onDrop: function(elemento, contenedor) { //elemento.draggable.options.revert = false; var id = elemento.id.split("_")[1] if( confirm("Borro " + id + "?") ) { Notificar("Borrando " + id + "...", 1) var ajax = new Ajax.Request(elemento.getAttribute("borraren"), { onSuccess: function() { Element.remove(elemento.id) Notificar("Se ha borrado " + id, 0) }, on204: function() { padre = elemento.parentNode var ajaxSinDatos = new Ajax.Adder(padre.id, padre.getAttribute(''sindatos'')) Element.remove(element.id) Notificar("Se ha borrado " + id + ". No hay datos", 0) }, onFailure: function() { //elemento.draggable.options.revert = true; Notificar("No se ha borrado " + id, 0) } } ) } }, } If I uncomment this line: //elemento.draggable.options.revert = false; javascript raises the error Thanks! -- Mis Cosas http://blogs.sistes.net/Garito/
Ok, and are you sure that when you defined the draggable in the first place that you assigned it to a member variable of the element? Like this? $(''elemento'').draggable = new Draggable($(''elemento''), {... } ); -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Garito Sent: Saturday, March 11, 2006 7:29 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] Question abour Draggables & Droppables Ryan Gahl escribió:>> Hi! >> > > >> I read these threat but draggableElement.draggable.options.revert = >> false; doesn''t work >> > > >> the error is: draggableElement.draggable has no properties >> > > >> Any Idea? >> > > >> Thanks! >> > > >> -- >> Mis Cosas >> http://blogs.sistes.net/Garito/ >> > > > Mis, Can we please see the rest of the code so we can put your question > into better context to try to troubleshoot your problem? > > > PS: A couple people on this list now have called me out as being a > notorious "top-poster". I just want to let everyone know that I > apologize if my posting style has not conformed to the group''s > preferences, and I''m changing my ways :-) > > The information transmitted in this electronic mail is intended only for the > person or entity to which it is addressed and may contain confidential, > proprietary, and/or privileged material. Any review, retransmission, > dissemination or other use of, or taking of any action in reliance upon, > this information by persons or entities other than the intended recipient > is prohibited. If you received this in error, please contact the sender and > delete the material from all computers. > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >Sure! this is the complete options for the droppable I''d used: var opciones_papelera = { hoverclass: "PapeleraSeleccionada", onDrop: function(elemento, contenedor) { //elemento.draggable.options.revert = false; var id = elemento.id.split("_")[1] if( confirm("Borro " + id + "?") ) { Notificar("Borrando " + id + "...", 1) var ajax = new Ajax.Request(elemento.getAttribute("borraren"), { onSuccess: function() { Element.remove(elemento.id) Notificar("Se ha borrado " + id, 0) }, on204: function() { padre = elemento.parentNode var ajaxSinDatos = new Ajax.Adder(padre.id, padre.getAttribute(''sindatos'')) Element.remove(element.id) Notificar("Se ha borrado " + id + ". No hay datos", 0) }, onFailure: function() { //elemento.draggable.options.revert = true; Notificar("No se ha borrado " + id, 0) } } ) } }, } If I uncomment this line: //elemento.draggable.options.revert = false; javascript raises the error Thanks! -- Mis Cosas http://blogs.sistes.net/Garito/ _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Ryan Gahl escribió:> Ok, and are you sure that when you defined the draggable in the first place that you assigned it to a member variable of the element? Like this? > > $(''elemento'').draggable = new Draggable($(''elemento''), {... } ); > > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Garito > Sent: Saturday, March 11, 2006 7:29 AM > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails-spinoffs] Question abour Draggables & Droppables > > Ryan Gahl escribió: > >>> Hi! >>> >>> >> >> >>> I read these threat but draggableElement.draggable.options.revert = >>> false; doesn''t work >>> >>> >> >> >>> the error is: draggableElement.draggable has no properties >>> >>> >> >> >>> Any Idea? >>> >>> >> >> >>> Thanks! >>> >>> >> >> >>> -- >>> Mis Cosas >>> http://blogs.sistes.net/Garito/ >>> >>> >> Mis, Can we please see the rest of the code so we can put your question >> into better context to try to troubleshoot your problem? >> >> >> PS: A couple people on this list now have called me out as being a >> notorious "top-poster". I just want to let everyone know that I >> apologize if my posting style has not conformed to the group''s >> preferences, and I''m changing my ways :-) >> >> The information transmitted in this electronic mail is intended only for the >> person or entity to which it is addressed and may contain confidential, >> proprietary, and/or privileged material. Any review, retransmission, >> dissemination or other use of, or taking of any action in reliance upon, >> this information by persons or entities other than the intended recipient >> is prohibited. If you received this in error, please contact the sender and >> delete the material from all computers. >> >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> >> > Sure! > this is the complete options for the droppable I''d used: > > var opciones_papelera = { > hoverclass: "PapeleraSeleccionada", > onDrop: function(elemento, contenedor) > { > //elemento.draggable.options.revert = false; > var id = elemento.id.split("_")[1] > if( confirm("Borro " + id + "?") ) > { > Notificar("Borrando " + id + "...", 1) > var ajax = new Ajax.Request(elemento.getAttribute("borraren"), { > onSuccess: function() > { > Element.remove(elemento.id) > Notificar("Se ha borrado " + id, 0) > }, > on204: function() > { > padre = elemento.parentNode > var ajaxSinDatos = new Ajax.Adder(padre.id, > padre.getAttribute(''sindatos'')) > Element.remove(element.id) > Notificar("Se ha borrado " + id + ". No hay datos", 0) > }, > onFailure: function() > { > //elemento.draggable.options.revert = true; > Notificar("No se ha borrado " + id, 0) > } > } > ) > } > }, > } > > If I uncomment this line: > > //elemento.draggable.options.revert = false; > > javascript raises the error > > Thanks! > >Not always because some of these draggable objects are draggable because they are elements of a sortable list I think when you define a list as sortable all its elements are draggable, isn''t it? Thanks! -- Mis Cosas http://blogs.sistes.net/Garito/
> Not always because some of these draggable objects are draggablebecause> they are elements of a sortable list> I think when you define a list as sortable all its elements are > draggable, isn''t it?Hmm. Well for this technique to work, you''ll have to have a handle to the actual draggable object from within the onDrop function, and unfortunately, the argument that gets passed to that function is the element which is draggable (not the actual draggable object). So what you have to do then, is a loop to get the handle you need... try this... onDrop: function(draggableElement, droppable) { var thisDraggable; $A(Draggables.drags).each(function(d) { if (d.element == draggableElement) { thisDraggable = d; throw $break; } }); if (thisDraggable) thisDraggable.options.revert = false; //other code... } The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.
Ryan Gahl escribió:>> Not always because some of these draggable objects are draggable >> > because > >> they are elements of a sortable list >> > > >> I think when you define a list as sortable all its elements are >> draggable, isn''t it? >> > > Hmm. Well for this technique to work, you''ll have to have a handle to > the actual draggable object from within the onDrop function, and > unfortunately, the argument that gets passed to that function is the > element which is draggable (not the actual draggable object). > > So what you have to do then, is a loop to get the handle you need... try > this... > > onDrop: function(draggableElement, droppable) { > var thisDraggable; > $A(Draggables.drags).each(function(d) { > if (d.element == draggableElement) { > thisDraggable = d; > throw $break; > } > }); > if (thisDraggable) > thisDraggable.options.revert = false; > > //other code... > } > > The information transmitted in this electronic mail is intended only for the > person or entity to which it is addressed and may contain confidential, > proprietary, and/or privileged material. Any review, retransmission, > dissemination or other use of, or taking of any action in reliance upon, > this information by persons or entities other than the intended recipient > is prohibited. If you received this in error, please contact the sender and > delete the material from all computers. > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >Well, this seems to be logic but then when you define a sortable list all its items are not draggable objects? -- Mis Cosas http://blogs.sistes.net/Garito/
> Well, this seems to be logic but then when you define a sortable list > all its items are not draggable objects?There is a difference that I think you''re not seeing between the DOM element and the Draggable object. When a Draggable is created with the "new" keyword, you pass in as the 1st argument the DOM element which will get the draggable behavior applied to it. That does not make the DOM element the same thing as the Draggable object that is created. They remain 2 separate entities in the javascript environment. The Draggable object that was created in memory knows how to manipulate the DOM element to make it draggable, but nonetheless, the DOM element is unchanged; it''s still just an element. So to access properties on the Draggable object, you can''t do it with just a handle to the DOM element, which is what is passed into the onDrop callback function... hence the need for the loop. Is that a little more clear? The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.
Ryan Gahl escribió:>> Well, this seems to be logic but then when you define a sortable list >> all its items are not draggable objects? >> > > There is a difference that I think you''re not seeing between the DOM > element and the Draggable object. > > When a Draggable is created with the "new" keyword, you pass in as the > 1st argument the DOM element which will get the draggable behavior > applied to it. That does not make the DOM element the same thing as the > Draggable object that is created. They remain 2 separate entities in the > javascript environment. The Draggable object that was created in memory > knows how to manipulate the DOM element to make it draggable, but > nonetheless, the DOM element is unchanged; it''s still just an element. > > So to access properties on the Draggable object, you can''t do it with > just a handle to the DOM element, which is what is passed into the > onDrop callback function... hence the need for the loop. > > Is that a little more clear? > > The information transmitted in this electronic mail is intended only for the > person or entity to which it is addressed and may contain confidential, > proprietary, and/or privileged material. Any review, retransmission, > dissemination or other use of, or taking of any action in reliance upon, > this information by persons or entities other than the intended recipient > is prohibited. If you received this in error, please contact the sender and > delete the material from all computers. > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >Sure There are any solution in these case? -- Mis Cosas http://blogs.sistes.net/Garito/
> Sure > There are any solution in these case?I''m sorry, but I already gave you the solution. I''m not sure I know what you mean by the above question. The information transmitted in this electronic mail is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers.
Ryan Gahl escribió:>> Sure >> There are any solution in these case? >> > > I''m sorry, but I already gave you the solution. I''m not sure I know what > you mean by the above question. > > The information transmitted in this electronic mail is intended only for the > person or entity to which it is addressed and may contain confidential, > proprietary, and/or privileged material. Any review, retransmission, > dissemination or other use of, or taking of any action in reliance upon, > this information by persons or entities other than the intended recipient > is prohibited. If you received this in error, please contact the sender and > delete the material from all computers. > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >Ok, thanks! -- Mis Cosas http://blogs.sistes.net/Garito/