hi i think my example is very simple and straightforward so i'm not sure if it meets your needs (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.)
i did this
# 2 divs created here
<script language="_javascript_">
new Draggable('drag', {revert: false});
Droppables.add('drop',{accept:'drag', hoverclass:'over'});
</script>
this stops the div from returning from where it appears onload, however you cannot see it in its new position, i would like it to be visible(ontop of the droppable), i was looking for this functionality and through your post i found the first half of my answer
new Draggable('drag', {revert: false});
Droppables.add('drop',{accept:'drag', hoverclass:'over'});
</script>
this stops the div from returning from where it appears onload, however you cannot see it in its new position, i would like it to be visible(ontop of the droppable), i was looking for this functionality and through your post i found the first half of my answer
thanks for all the advice so far
On 2/27/06, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> 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
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Rails-spinoffs digest..."
Today's Topics:
1. Re: Disabling anchor clicking in a draggable (Chris Lear)
2. status = 200 something wrong??? (Grzesiek Slusarek)
3. RE: Re: [Rails-spinoffs] Question abour Draggables &
Droppables (::Alex Rengel::)
4. Re: Disabling anchor clicking in a draggable (David Z?lke)
5. RE: Re: [Rails-spinoffs] Question abour Draggables &
Droppables (Ryan Gahl)
----------------------------------------------------------------------
Message: 1
Date: Mon, 27 Feb 2006 12:38:48 +0000
From: Chris Lear <[EMAIL PROTECTED]>
Subject: Re: [Rails-spinoffs] Disabling anchor clicking in a draggable
To: rails-spinoffs@lists.rubyonrails.org
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1
* Robin Haswell wrote (27/02/06 12:12):
> Yeah I'm aware of this option. It's not ideal, as this is a CMS and I
> don't want the admin view of the site to be too different. Plus these
> elements are really small. I'd rather get a proper solution rather than
> a hack :-/
Draggables have onStart and onEnd events. You could use these to change
the onClick event for the <a> tag to a null event when the draggable is
being dragged, and back again when it stops, maybe. I don't know whether
this will work, because I use handles myself.
Chris
------------------------------
Message: 2
Date: Mon, 27 Feb 2006 14:59:15 +0100
From: "Grzesiek Slusarek" < [EMAIL PROTECTED]>
Subject: [Rails-spinoffs] status = 200 something wrong???
To: rails-spinoffs <rails-spinoffs@lists.rubyonrails.org>
Message-ID: < [EMAIL PROTECTED]>
Content-Type: text/plain; charset=iso-8859-2
Hello everyone. I have 2 methods on server: first is the redirect
method that redirect http request on second method and returnig
code 302 and that second method -> that returning data. I use
AJAX to call first method, then Ajax request is redirect to
second method and the second method return data which i can use.
And afterall I get status 200 from xmlHttpResponse object. Is it
right? Because I called url that redirect my request to other url
so shoudn't I get 302 code? How can I identify does the AJAX call
was redirect or not if I always get status code 200? I try using
function onFailure or onException but Ajax object ALWAYS calling
(ajax method) onSucces and when I checked status there is always
200. Can someone help me?
Gregor
----------------------------------------------------
Najs³ynniejszy detektyw ¶wiata powraca! Steve Martin
jako inspektor Clouseau w komedii "Ró¿owa pantera
- w kinach od 24 lutego
http://klik.wp.pl/?adr=http%3A%2F%2Fadv.reklama.wp.pl%2Fas%2Fpinkpanther.html&sid=668
------------------------------
Message: 3
Date: Mon, 27 Feb 2006 16:01:01 +0000
From: "::Alex Rengel::" <[EMAIL PROTECTED] >
Subject: RE: Re: [Rails-spinoffs] Question abour Draggables &
Droppables
To: <rails-spinoffs@lists.rubyonrails.org>
Message-ID: < [EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"
It's not working:
draggable.options.revert is not working...
Any other suggestions?
Date: Sun, 26 Feb 2006 19:39:24 -0500From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: 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:: <[EMAIL PROTECTED] > 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=""><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 [EMAIL PROTECTED] 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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails-spinoffs/attachments/20060227/c00e64fd/attachment-0001.html
------------------------------
Message: 4
Date: Mon, 27 Feb 2006 17:21:30 +0100
From: David Z?lke <[EMAIL PROTECTED]>
Subject: Re: [Rails-spinoffs] Disabling anchor clicking in a draggable
To: rails-spinoffs@lists.rubyonrails.org
Message-ID: <[EMAIL PROTECTED] >
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Assign an event handler to the links that stops event propagation
(a.k.a "bubbling").
- David
Am 27.02.2006 um 12:58 schrieb Robin Haswell:
> Hey guys
>
> I have an interesting problem - I have some draggable elements
> (sortable
> actually), with links (<A>) inside them. I want the user to be able to
> click on the link, however if the user drags the element I don't want
> the link to get fired. Can anyone think of a way to do this? It only
> needs to work in Firefox.
>
> Cheers
>
> -Rob
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
------------------------------
Message: 5
Date: Mon, 27 Feb 2006 10:30:36 -0600
From: "Ryan Gahl" < [EMAIL PROTECTED]>
Subject: RE: Re: [Rails-spinoffs] Question abour Draggables &
Droppables
To: <rails-spinoffs@lists.rubyonrails.org >
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"
<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...} );
droppable) {
draggableElement.draggable.options.revert = false;
}
That should do the trick.
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] ] On Behalf Of
::Alex Rengel::
Sent: Monday, February 27, 2006 10:01 AM
To: rails-spinoffs@lists.rubyonrails.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: [EMAIL PROTECTED]
To: rails-spinoffs@lists.rubyonrails.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:: <[EMAIL PROTECTED]> 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@lists.rubyonrails.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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails-spinoffs/attachments/20060227/97116f6d/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 9, Issue 103
**********************************************
_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs