Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #2766 (reopened defect)

Opened 3 years ago

Last modified 6 months ago

Sortable.Create hoverclass not working

Reported by: anonymous Assigned to: thomas@fesch.at
Priority: normal Milestone:
Component: script.aculo.us Version:
Severity: normal Keywords: dragdrop
Cc:

Description

When creating a Draggable and using Droppables.add + hoverclass option its working while draggin over the droppable. (hovereffect)

When using hoverclass option in Sortable.create, with the same IDs as used in Droppables.add it's not.


Sortable.create('col1', {hoverclass:'colhover', dropOnEmpty:true, handle:'handle', containment:["col1"], constraint:false, ghosting:false}); 


Droppables.add('col1', {accept:'contentitems', hoverclass:'colhover', onDrop:function(element, droppableElement){checkType(droppableElement,element.id,'default')}});

Change History

11/14/05 11:26:32 changed by madrobby

  • status changed from new to closed.
  • resolution set to worksforme.

Works fine for me. See test/functional/sortable2_test.html for some tests of this.

02/13/06 12:24:10 changed by Tommy <tommy.skaue@gmail.com>

  • status changed from closed to reopened.
  • resolution deleted.

it seems the behaviour is different if the sortables are of divs using containment. I use hoverclass on two sortable lists (tag:div) with containment (similar to the example on the website with 3 div's). Hoverclass option does not work on that example, thomas.

-TS

02/13/06 12:26:41 changed by madrobby

Can you please provide a complete working (or rather, non-working) test case of this?

05/10/06 17:06:58 changed by tomg@byu.net

This could be an issue with the submitter's style sheet cascade.

#myDiv {background-color: white;}
.hover {background-color: red;}

Won't work, as the specificity of the #myDiv declaration trumps the hover class declaration. (I've made this mistake.)

Suggest this bug be closed unless/until a test case is provided--it's been open for three months with no action.

08/19/06 00:48:02 changed by tomg@byu.net

  • keywords changed from Sortable Create Hover to dragdrop.
  • status changed from reopened to closed.
  • resolution set to invalid.

Closing--submitter's style sheet cascade/specificity is cause, not scriptaculous.

Try:

#myDiv {background-color: white;}
#myDiv.hover {background-color: red;}

(in reply to: ↑ description ) 09/05/06 17:03:33 changed by anonymous

Replying to anonymous:

When creating a Draggable and using Droppables.add + hoverclass option its working while draggin over the droppable. (hovereffect)

When using hoverclass option in Sortable.create, with the same IDs as used in Droppables.add it's not.


{{{ Sortable.create('col1', {hoverclass:'colhover', dropOnEmpty:true, handle:'handle', containment:col1?, constraint:false, ghosting:false}); }}}
{{{ Droppables.add('col1', {accept:'contentitems', hoverclass:'colhover', onDrop:function(element, droppableElement){checkType(droppableElement,element.id,'default')}}); }}}

(in reply to: ↑ description ) 09/10/06 14:17:43 changed by anonymous

Replying to anonymous:

When creating a Draggable and using Droppables.add + hoverclass option its working while draggin over the droppable. (hovereffect)

When using hoverclass option in Sortable.create, with the same IDs as used in Droppables.add it's not.


{{{ Sortable.create('col1', {hoverclass:'colhover', dropOnEmpty:true, handle:'handle', containment:col1?, constraint:false, ghosting:false}); }}}
{{{ Droppables.add('col1', {accept:'contentitems', hoverclass:'colhover', onDrop:function(element, droppableElement){checkType(droppableElement,element.id,'default')}}); }}}

(in reply to: ↑ description ) 09/11/06 15:41:40 changed by anonymous

Replying to anonymous:

When creating a Draggable and using Droppables.add + hoverclass option its working while draggin over the droppable. (hovereffect)

When using hoverclass option in Sortable.create, with the same IDs as used in Droppables.add it's not.


{{{ Sortable.create('col1', {hoverclass:'colhover', dropOnEmpty:true, handle:'handle', containment:col1?, constraint:false, ghosting:false}); }}}
{{{ Droppables.add('col1', {accept:'contentitems', hoverclass:'colhover', onDrop:function(element, droppableElement){checkType(droppableElement,element.id,'default')}}); }}}

(in reply to: ↑ description ) 09/11/06 18:36:43 changed by anonymous

Replying to anonymous:

When creating a Draggable and using Droppables.add + hoverclass option its working while draggin over the droppable. (hovereffect)

When using hoverclass option in Sortable.create, with the same IDs as used in Droppables.add it's not.


{{{ Sortable.create('col1', {hoverclass:'colhover', dropOnEmpty:true, handle:'handle', containment:col1?, constraint:false, ghosting:false}); }}}
{{{ Droppables.add('col1', {accept:'contentitems', hoverclass:'colhover', onDrop:function(element, droppableElement){checkType(droppableElement,element.id,'default')}}); }}}

01/12/08 01:06:01 changed by zach-inglis-lt3

  • status changed from closed to reopened.
  • resolution deleted.

Same happens for me using the following:

   <%= sortable_element foo,
                         :containment => bar,
											 :droponempty => true,
												 :hoverclass => "sort",
												 :constraint => "vertical",
                         :url => baz_path %>

Contrary to suggestion, this happens with or without :containement. If removed works fine.

Firebug suggests that 'sort' is not defined.