jQuery: The Write Less, Do More JavaScript Library

Droppable tolerance

View: New views
9 Messages — Rating Filter:   Alert me  

Droppable tolerance

by edwin@secureoffice.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have a collapsable/expandable tree menu for folders on my server. I
was trying to make a file draggable and droppable on a folder.

All works well on the folders that are visible in the tree after page
load. But if I expand a part of the tree, there appears to be no
droppable area for the newly shown folders. They have a link and all,
and they have been set up as a droppable, but no event is triggered
when I drag a file over it.

Someone who has experienced the same? Is it solvable? Can I
dynamically 'activate' the droppable?

Regards,


Edwin

--

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



Re: Droppable tolerance

by Richard D. Worth-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Are these new droppables being added dynamically while the draggable is being dragged?

Are you calling .droppable() on these elements after they're brought into the page?

Can you share a live sample page?

- Richard

On Tue, Nov 3, 2009 at 12:48 PM, edwin@... <edwin@...> wrote:
Hi,

I have a collapsable/expandable tree menu for folders on my server. I
was trying to make a file draggable and droppable on a folder.

All works well on the folders that are visible in the tree after page
load. But if I expand a part of the tree, there appears to be no
droppable area for the newly shown folders. They have a link and all,
and they have been set up as a droppable, but no event is triggered
when I drag a file over it.

Someone who has experienced the same? Is it solvable? Can I
dynamically 'activate' the droppable?

Regards,


Edwin

--

You received this message because you are subscribed to the Google Groups "jQuery UI" group.
To post to this group, send email to jquery-ui@....
To unsubscribe from this group, send email to jquery-ui%2Bunsubscribe@....
For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en.



--

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

Re: Droppable tolerance

by edwin@secureoffice.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Richard,

No, the droppables are already there for all the folders. They are
added when the tree is built.

I created an account for you at our dev server http://dev.secureoffice.net:
- user: rdworth@...
- pwd: rdworth
- site: ORANGEPORT

Start with the folder Archive collapsed, then expand it. Don't refresh
the page. Drag a file from Root to the subfolder 'JQuery test' by
dragging its icon. If the folder background becomes yellow, you can
drop it.

On 3 Nov, 18:48, "ed...@..." <ed...@...>
wrote:

> Hi,
>
> I have a collapsable/expandable tree menu for folders on my server. I
> was trying to make a file draggable and droppable on a folder.
>
> All works well on the folders that are visible in the tree after page
> load. But if I expand a part of the tree, there appears to be no
> droppable area for the newly shown folders. They have a link and all,
> and they have been set up as a droppable, but no event is triggered
> when I drag a file over it.
>
> Someone who has experienced the same? Is it solvable? Can I
> dynamically 'activate' the droppable?
>
> Regards,
>
> Edwin

--

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



Re: Re: Droppable tolerance

by Richard D. Worth-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I inspected the span with Firebug and it's not a droppable, as it doesn't have the ui-droppable class.

- Richard

On Fri, Nov 6, 2009 at 6:48 AM, edwin@... <edwin@...> wrote:
Hi Richard,

No, the droppables are already there for all the folders. They are
added when the tree is built.

I created an account for you at our dev server http://dev.secureoffice.net:
- user: rdworth@...
- pwd: rdworth
- site: ORANGEPORT

Start with the folder Archive collapsed, then expand it. Don't refresh
the page. Drag a file from Root to the subfolder 'JQuery test' by
dragging its icon. If the folder background becomes yellow, you can
drop it.

On 3 Nov, 18:48, "ed...@..." <ed...@...>
wrote:
> Hi,
>
> I have a collapsable/expandable tree menu for folders on my server. I
> was trying to make a file draggable and droppable on a folder.
>
> All works well on the folders that are visible in the tree after page
> load. But if I expand a part of the tree, there appears to be no
> droppable area for the newly shown folders. They have a link and all,
> and they have been set up as a droppable, but no event is triggered
> when I drag a file over it.
>
> Someone who has experienced the same? Is it solvable? Can I
> dynamically 'activate' the droppable?
>
> Regards,
>
> Edwin

--

You received this message because you are subscribed to the Google Groups "jQuery UI" group.
To post to this group, send email to jquery-ui@....
To unsubscribe from this group, send email to jquery-ui%2Bunsubscribe@....
For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en.



--

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

Re: Droppable tolerance

by edwin@secureoffice.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

But I do write that in the script. If you look in the source, it is
there.

On Nov 6, 1:59 pm, "Richard D. Worth" <rdwo...@...> wrote:

> I inspected the span with Firebug and it's not a droppable, as it doesn't
> have the ui-droppable class.
>
> - Richard
>
> On Fri, Nov 6, 2009 at 6:48 AM, ed...@... <
>
> ed...@...> wrote:
> > Hi Richard,
>
> > No, the droppables are already there for all the folders. They are
> > added when the tree is built.
>
> > I created an account for you at our dev serverhttp://dev.secureoffice.net
> > :
> > - user: rdwo...@...
> > - pwd: rdworth
> > - site: ORANGEPORT
>
> > Start with the folder Archive collapsed, then expand it. Don't refresh
> > the page. Drag a file from Root to the subfolder 'JQuery test' by
> > dragging its icon. If the folder background becomes yellow, you can
> > drop it.
>
> > On 3 Nov, 18:48, "ed...@..." <ed...@...>
> > wrote:
> > > Hi,
>
> > > I have a collapsable/expandable tree menu for folders on my server. I
> > > was trying to make a file draggable and droppable on a folder.
>
> > > All works well on the folders that are visible in the tree after page
> > > load. But if I expand a part of the tree, there appears to be no
> > > droppable area for the newly shown folders. They have a link and all,
> > > and they have been set up as a droppable, but no event is triggered
> > > when I drag a file over it.
>
> > > Someone who has experienced the same? Is it solvable? Can I
> > > dynamically 'activate' the droppable?
>
> > > Regards,
>
> > > Edwin
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "jQuery UI" group.
> > To post to this group, send email to jquery-ui@....
> > To unsubscribe from this group, send email to
> > jquery-ui+unsubscribe@...<jquery-ui%2Bunsubscribe@...>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/jquery-ui?hl=en.

--

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



Re: Re: Droppable tolerance

by Richard D. Worth-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You're calling .droppable(options) on the following elements

#tree_folder_8
#tree_folder_96
#tree_folder_97
#tree_folder_95

but you're doing that when the page loads. At that time, #tree_folder_97 is not on the page. You need to call .droppable() on that element after it is added to the page.

- Richard

On Fri, Nov 6, 2009 at 8:20 AM, edwin@... <edwin@...> wrote:
But I do write that in the script. If you look in the source, it is
there.

On Nov 6, 1:59 pm, "Richard D. Worth" <rdwo...@...> wrote:
> I inspected the span with Firebug and it's not a droppable, as it doesn't
> have the ui-droppable class.
>
> - Richard
>
> On Fri, Nov 6, 2009 at 6:48 AM, ed...@... <
>
> ed...@...> wrote:
> > Hi Richard,
>
> > No, the droppables are already there for all the folders. They are
> > added when the tree is built.
>
> > I created an account for you at our dev serverhttp://dev.secureoffice.net
> > :
> > - user: rdwo...@...
> > - pwd: rdworth
> > - site: ORANGEPORT
>
> > Start with the folder Archive collapsed, then expand it. Don't refresh
> > the page. Drag a file from Root to the subfolder 'JQuery test' by
> > dragging its icon. If the folder background becomes yellow, you can
> > drop it.
>
> > On 3 Nov, 18:48, "ed...@..." <ed...@...>
> > wrote:
> > > Hi,
>
> > > I have a collapsable/expandable tree menu for folders on my server. I
> > > was trying to make a file draggable and droppable on a folder.
>
> > > All works well on the folders that are visible in the tree after page
> > > load. But if I expand a part of the tree, there appears to be no
> > > droppable area for the newly shown folders. They have a link and all,
> > > and they have been set up as a droppable, but no event is triggered
> > > when I drag a file over it.
>
> > > Someone who has experienced the same? Is it solvable? Can I
> > > dynamically 'activate' the droppable?
>
> > > Regards,
>
> > > Edwin
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "jQuery UI" group.
> > To post to this group, send email to jquery-ui@....
> > To unsubscribe from this group, send email to
> > jquery-ui%2Bunsubscribe@...<jquery-ui%252Bunsubscribe@...>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/jquery-ui?hl=en.

--

You received this message because you are subscribed to the Google Groups "jQuery UI" group.
To post to this group, send email to jquery-ui@....
To unsubscribe from this group, send email to jquery-ui%2Bunsubscribe@....
For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en.



--

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

Re: Droppable tolerance

by edwin@secureoffice.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks, Richard. That made things clearer. I have now integrated
calling .droppable when the folder is expanded and it works when
starting a new drag.

Just one Q: how can I force the .droppable to be executed at the time
that the div is created? I mean, if I would make the folder expand on
mouseover, I need to run that bit of script to activate it.


On Nov 6, 2:33 pm, "Richard D. Worth" <rdwo...@...> wrote:

> You're calling .droppable(options) on the following elements
>
> #tree_folder_8
> #tree_folder_96
> #tree_folder_97
> #tree_folder_95
>
> but you're doing that when the page loads. At that time, #tree_folder_97 is
> not on the page. You need to call .droppable() on that element after it is
> added to the page.
>
> - Richard
>
> On Fri, Nov 6, 2009 at 8:20 AM, ed...@... <
>
> ed...@...> wrote:
> > But I do write that in the script. If you look in the source, it is
> > there.
>
> > On Nov 6, 1:59 pm, "Richard D. Worth" <rdwo...@...> wrote:
> > > I inspected the span with Firebug and it's not a droppable, as it doesn't
> > > have the ui-droppable class.
>
> > > - Richard
>
> > > On Fri, Nov 6, 2009 at 6:48 AM, ed...@... <
>
> > > ed...@...> wrote:
> > > > Hi Richard,
>
> > > > No, the droppables are already there for all the folders. They are
> > > > added when the tree is built.
>
> > > > I created an account for you at our dev serverhttp://
> > dev.secureoffice.net
> > > > :
> > > > - user: rdwo...@...
> > > > - pwd: rdworth
> > > > - site: ORANGEPORT
>
> > > > Start with the folder Archive collapsed, then expand it. Don't refresh
> > > > the page. Drag a file from Root to the subfolder 'JQuery test' by
> > > > dragging its icon. If the folder background becomes yellow, you can
> > > > drop it.
>
> > > > On 3 Nov, 18:48, "ed...@..." <ed...@...>
> > > > wrote:
> > > > > Hi,
>
> > > > > I have a collapsable/expandable tree menu for folders on my server. I
> > > > > was trying to make a file draggable and droppable on a folder.
>
> > > > > All works well on the folders that are visible in the tree after page
> > > > > load. But if I expand a part of the tree, there appears to be no
> > > > > droppable area for the newly shown folders. They have a link and all,
> > > > > and they have been set up as a droppable, but no event is triggered
> > > > > when I drag a file over it.
>
> > > > > Someone who has experienced the same? Is it solvable? Can I
> > > > > dynamically 'activate' the droppable?
>
> > > > > Regards,
>
> > > > > Edwin
>
> > > > --
>
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "jQuery UI" group.
> > > > To post to this group, send email to jquery-ui@....
> > > > To unsubscribe from this group, send email to
> > > > jquery-ui+unsubscribe@...<jquery-ui%2Bunsubscribe@...>
> > <jquery-ui%2Bunsubscribe@...<jquery-ui%252Bunsubscribe@...>
>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/jquery-ui?hl=en.
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "jQuery UI" group.
> > To post to this group, send email to jquery-ui@....
> > To unsubscribe from this group, send email to
> > jquery-ui+unsubscribe@...<jquery-ui%2Bunsubscribe@...>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/jquery-ui?hl=en.

--

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



Re: Droppable tolerance

by intrader-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It would be helpful if you provide a site or the code.

On Nov 3, 9:48 am, "ed...@..." <ed...@...>
wrote:

> Hi,
>
> I have a collapsable/expandable tree menu for folders on my server. I
> was trying to make a file draggable and droppable on a folder.
>
> All works well on the folders that are visible in the tree after page
> load. But if I expand a part of the tree, there appears to be no
> droppable area for the newly shown folders. They have a link and all,
> and they have been set up as a droppable, but no event is triggered
> when I drag a file over it.
>
> Someone who has experienced the same? Is it solvable? Can I
> dynamically 'activate' the droppable?
>
> Regards,
>
> Edwin

--

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



Re: Droppable tolerance

by edwin@secureoffice.net :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you read the thread, you would see that I already did...

On Nov 6, 8:40 pm, intrader <intrader.intra...@...> wrote:

> It would be helpful if you provide a site or the code.
>
> On Nov 3, 9:48 am, "ed...@..." <ed...@...>
> wrote:
>
> > Hi,
>
> > I have a collapsable/expandable tree menu for folders on my server. I
> > was trying to make a file draggable and droppable on a folder.
>
> > All works well on the folders that are visible in the tree after page
> > load. But if I expand a part of the tree, there appears to be no
> > droppable area for the newly shown folders. They have a link and all,
> > and they have been set up as a droppable, but no event is triggered
> > when I drag a file over it.
>
> > Someone who has experienced the same? Is it solvable? Can I
> > dynamically 'activate' the droppable?
>
> > Regards,
>
> > Edwin

--

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